Automation, Robotics?
[1/16] from: sharriff:aina:med-iq at: 7-Mar-2001 11:04
Hi guys!
Anyone with experience in robotics or microcontrollers in REBOL?
Best regards
Sharriff Aina
[2/16] from: robbo1mark::aol::com at: 7-Mar-2001 7:12
Sharriff,
Although I've no direct experience in this field, microcontrollers & robotic devices
generally require manipulating bit values or placing bit values in specific addresses
or ports, something that I'm not sure REBOL is designed with in mind, Forth language
might be more appropriate in this instance, as it is smaller & closer to the metal.
Mark Dickson
In a message dated Wed, 7 Mar 2001 6:17:15 AM Eastern Standard Time, [Sharriff--Aina--med-iq--de]
writes:
<<
Hi guys!
Anyone with experience in robotics or microcontrollers in REBOL?
Best regards
Sharriff Aina
[3/16] from: fsievert:uos at: 7-Mar-2001 13:27
Hi!
Yes, I've written a Rebol-Protocoll and Dialect to control and program the
LEGO Cybemaster Roboter.
--> http://proton.cl-ki.uni-osnabrueck.de/REBOL/lego.r
For more information/documentation -> mail
CU,
Frank
On Wed, 7 Mar 2001 [Sharriff--Aina--med-iq--de] wrote:
[4/16] from: sharriff:aina:med-iq at: 7-Mar-2001 12:58
Hi Mark!
Thanks for the reply, actually I donīt want to program anything low-level.
There are several controllers that can be programmed in BASIC dialects,
dialecting these dialects in REBOL could be an advantage. Another aspect
is using a Mini-Pc board (386or 486 INTEL) and REBOL on a FLASH
disk-->Embedded REBOL!. Then Iīll use Rebol to control the the
SERIAL/PARALLEL Ports.
Regards
Sharriff Aina
[Robbo1Mark--ao]
l.com An: <[rebol-list--rebol--com]>
Gesendet von: Kopie:
rebol-bounce@ Thema: [REBOL] Re: Automation, Robotics?
rebol.com
07.03.01
12:12
Bitte
antworten an
rebol-list
Sharriff,
Although I've no direct experience in this field, microcontrollers &
robotic devices generally require manipulating bit values or placing bit
values in specific addresses or ports, something that I'm not sure REBOL is
designed with in mind, Forth language might be more appropriate in this
instance, as it is smaller & closer to the metal.
Mark Dickson
In a message dated Wed, 7 Mar 2001 6:17:15 AM Eastern Standard Time,
[Sharriff--Aina--med-iq--de] writes:
<<
Hi guys!
Anyone with experience in robotics or microcontrollers in REBOL?
Best regards
Sharriff Aina
[5/16] from: sharriff:aina:med-iq at: 7-Mar-2001 13:13
Thanks Frank!
Itīll take me ages to understand your script, but itīs a good starting
point for me.
Sharriff Aina
Frank
Sievertsen An: <[rebol-list--rebol--com]>
<[fsievert--uos] Kopie:
.de> Thema: [REBOL] Re: Automation, Robotics?
Gesendet von:
rebol-bounce@
rebol.com
07.03.01
12:27
Bitte
antworten an
rebol-list
Hi!
Yes, I've written a Rebol-Protocoll and Dialect to control and program the
LEGO Cybemaster Roboter.
--> http://proton.cl-ki.uni-osnabrueck.de/REBOL/lego.r
For more information/documentation -> mail
CU,
Frank
On Wed, 7 Mar 2001 [Sharriff--Aina--med-iq--de] wrote:
[6/16] from: dvydra2::yahoo at: 7-Mar-2001 8:09
REBOL does use more memory than other solutions, but
memory is getting quite cheap, so I think there is a
great future in this market.
Regards,
David
--- [Sharriff--Aina--med-iq--de] wrote:
> Hi Mark!
> Thanks for the reply, actually I donīt want to
<<quoted lines omitted: 58>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
=====
please reply to: [david--vydra--net]
[7/16] from: bo:rebol at: 7-Mar-2001 11:42
Not yet!
My son and I have a robot partially built and we are planning on
controlling it with an Amiga 500 using the serial port and REBOL.
We only work on it 60 minutes/week, so it may be a while before we
get to that point.
-Bo
On 7-Mar-2001/11:04:25, [Sharriff--Aina--med-iq--de] wrote:
>Hi guys!
>Anyone with experience in robotics or microcontrollers in REBOL?
<<quoted lines omitted: 4>>
>[rebol-request--rebol--com] with "unsubscribe" in the
>subject, without the quotes.
--
Bohdan "Bo" Lechnowsky
REBOL Adventure Guide
REBOL Technologies 707-467-8000 (http://www.rebol.com)
The Official Source for REBOL Books (http://www.REBOLpress.com)
[8/16] from: ryanc:iesco-dms at: 7-Mar-2001 14:43
I have been working on an addressable serial controlled stepper motor
controller during the last few weeks. It uses the pic12c508. It will
control 1 stepper motor and provide two I/O lines. You will be able to
run multiple controllers off a single rs-232 line. Maybe some a/d
capability, if I have room--only 512 bytes of rom. Also if there is
room, optional encoded positioning. Of course I will be making some
control routines for rebol.
Being a multiprocessed system, it should excel in situations where you
need to control several motors simultaniously and where specific
stepping speeds are required. I designed it so I can build an
inexpensive CNC style mill.
I have been working on it only a few hours a week, at least another
month or so before I am done. I possibly might build other devices
based on this archetecture.
--Ryan
[Sharriff--Aina--med-iq--de] wrote:
> Hi guys!
> Anyone with experience in robotics or microcontrollers in REBOL?
<<quoted lines omitted: 4>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Ryan Cole
Programmer Analyst
www.iesco-dms.com
707-468-5400
I am enough of an artist to draw freely upon my imagination.
Imagination is more important than knowledge. Knowledge is
limited. Imagination encircles the world.
-Einstein
[9/16] from: sharriff:aina:med-iq at: 8-Mar-2001 7:11
Sounds great Ryan! is it very complicated?
Best regards
Sharriff Aina
Ryan Cole
<[ryanc--iesco-] An: [rebol-list--rebol--com]
dms.com> Kopie:
Gesendet von: Thema: [REBOL] Re: Automation, Robotics?
rebol-bounce@
rebol.com
07.03.01
22:43
Bitte
antworten an
rebol-list
I have been working on an addressable serial controlled stepper motor
controller during the last few weeks. It uses the pic12c508. It will
control 1 stepper motor and provide two I/O lines. You will be able to
run multiple controllers off a single rs-232 line. Maybe some a/d
capability, if I have room--only 512 bytes of rom. Also if there is
room, optional encoded positioning. Of course I will be making some
control routines for rebol.
Being a multiprocessed system, it should excel in situations where you
need to control several motors simultaniously and where specific
stepping speeds are required. I designed it so I can build an
inexpensive CNC style mill.
I have been working on it only a few hours a week, at least another
month or so before I am done. I possibly might build other devices
based on this archetecture.
--Ryan
[Sharriff--Aina--med-iq--de] wrote:
> Hi guys!
> Anyone with experience in robotics or microcontrollers in REBOL?
<<quoted lines omitted: 4>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
Ryan Cole
Programmer Analyst
www.iesco-dms.com
707-468-5400
I am enough of an artist to draw freely upon my imagination.
Imagination is more important than knowledge. Knowledge is
limited. Imagination encircles the world.
-Einstein
[10/16] from: sharriff:aina:med-iq at: 8-Mar-2001 7:25
Cool! are you using self tailored or standard off the shelf components?
Best regards
Sharriff Aina
[bo--rebol--com]
Gesendet von: An: [rebol-list--rebol--com]
rebol-bounce@ Kopie:
rebol.com Thema: [REBOL] Re: Automation, Robotics?
07.03.01
18:42
Bitte
antworten an
rebol-list
Not yet!
My son and I have a robot partially built and we are planning on
controlling it with an Amiga 500 using the serial port and REBOL.
We only work on it 60 minutes/week, so it may be a while before we
get to that point.
-Bo
On 7-Mar-2001/11:04:25, [Sharriff--Aina--med-iq--de] wrote:
>Hi guys!
>Anyone with experience in robotics or microcontrollers in REBOL?
<<quoted lines omitted: 4>>
>[rebol-request--rebol--com] with "unsubscribe" in the
>subject, without the quotes.
--
Bohdan "Bo" Lechnowsky
REBOL Adventure Guide
REBOL Technologies 707-467-8000 (http://www.rebol.com)
The Official Source for REBOL Books (http://www.REBOLpress.com)
[11/16] from: dlhawley:home at: 8-Mar-2001 11:11
I'm working on a prototype home data acquisition/control device. It currently runs on
a 486 class SBC onder QNX but only because I don't have a lower power board lying around.
It drives a serial LCD and serial i/o pretty easily. The REBOL e-mail stuff is pretty
handy as is the serial port (exp) control. The biggest problem I've had developing is
is the silly license expiration gaps on the experimental releases.
Dave
Previously, you ([Sharriff--Aina--med-iq--de]) wrote:
> Hi guys!
>
> Anyone with experience in robotics or microcontrollers in REBOL?
>
--
David L. Hawley D.L. Hawley and Associates 1.503.274.2242
Software Engineer [David--L--Hawley--computer--org]
[12/16] from: nhytro:compuserve at: 9-Mar-2001 1:11
Sounds like the direction that Iīm trying to get into, I would appreciate
it , naturally if youīve got the time, if you could explain the basic
steps I would need to take in controlling devices over the serial port on a
80x86 processor( hardware and software)
Best regards
Sharriff
Message text written by INTERNET:[rebol-list--rebol--com]
>'m working on a prototype home data acquisition/control device. It
currently runs on a 486 class SBC onder QNX but only because I don't have a
lower power board lying around. It drives a serial LCD and serial i/o
pretty easily. The REBOL e-mail stuff is pretty handy as is the serial port
(exp) control. The biggest problem I've had developing is is the silly
license expiration gaps on the experimental releases.
Dave
Previously, you ([Sharriff--Aina--med-iq--de]) wrote:
> Hi guys!
>
> Anyone with experience in robotics or microcontrollers in REBOL?
>
--
David L. Hawley D.L. Hawley and Associates 1.503.274.2242
Software Engineer [David--L--Hawley--computer--org]
--
To unsubscribe from this list, please send an email to
[rebol-request--rebol--com] with "unsubscribe" in the
subject, without the quotes.<
[13/16] from: dlhawley:home at: 15-Mar-2001 21:38
Previously, you (Holger Kruse) wrote:
>> Although striping the /dev prefix is somewhat handy it at first
seemed limiting in QNX where a serial port on another node has a node number or name
in front of /dev. ie: //4/dev/ser5 refers to serial port 5 on node 4 and can be opened
accross the net just like /dev/ser1 on whatever the local node is. Fortunately, QNX allow
one to symbolic link (prefix) a remote node into the local namespace. One could thus
prefix //4/dev/ser5 -> /dev/ser4.5 and open ser4.5 using REBOL - so REBOL does not to
be QNX net aware to benefit.
> At the moment REBOL does not directly support any QNX-specific
> features. It accesses QNX through standard Posix functions, which is
> why any QNX-specific extensions to the serial mechanism (or other
> features) probably won't work.
You miss my point here I think. What I mean is that since QNX allows building symbolic
links accross network nodes, REBOL does not need to know about the QNX network features
- it just works.
> This is also why some users have problems setting the baud rate from
> REBOL in QNX. Apparently some versions of QNX have some bugs in their > Posix emulation
code. This is not a bug in REBOL. The same code works > fine for "regular" Unix flavors.
I hope that you'vde reported this to QSSL. I do find it hard to believe though. The GNU
stuff I've played with tends to handle the serial ports correctly if it compiles. The
QNX 4 posix functions seem to work well in code I've written with the exception that
flow control has a funny "lock" bit which is not obvious.
>> The crazy thing that REBOL does is make you open the port with a path name serial://port[N]
where N is the index? of the port name in system/ports/serial. Thus in serial-path-to
above, I find the index? or append the passed name and use the length? to get port[N].
Of course, REBOL then has to change this back into an open( "/dev/serX", ..) so to me
it would make sense to use the port name instead of index.
> One of the main goals of /Core is interoperability across platforms.
> Introducing a standardized naming scheme for serial ports means that
> scripts do not have to be changed when moving them across platforms.
> With the current scheme the only part of a script that has to change
> is the port number, as opposed to changing full port specs.
How is changing a port number any easier that changing a name? Don't you still need to
either edit hard coded port numbers of build some cover function which creates a port
spec given a number parameter?
>> and REBOL would figure out that you want 2400 baud, 7 data bits, even parity and 2
stop bits. I don't think that REBOL provides a mechanisim to change the option after
an open.
> It does. Just change the parameters in the port structure and call
> 'update on the port.
Great I had assumed that there must be a method, just hadn't a clue on where to find
it. This is probably my biggest gripe re REBOL - it does a lot of cool things, but figuring
out how is a mystery. Yes, I've read the official guide, but port coverage is pretty
skimpy. Of course serial ports are new so I know that I'm out on a limb there.
Dave
--
David L. Hawley D.L. Hawley and Associates 1.503.274.2242
Software Engineer [David--L--Hawley--computer--org]
[14/16] from: dlhawley:home at: 13-Mar-2001 22:52
Previously, you (Sharriff Aina) wrote:
> Sounds like the direction that Iīm trying to get into, I would
> appreciate it , naturally if youīve got the time, if you could
> explain the basic steps I would need to take in controlling
> devices over the serial port on a 80x86 processor( hardware and
> software)
REBOL makes serial port control pretty easy. You open a serial port and get a port which
you can read, write and wait on. There are some funny design decisions, but I think that
they make sense.
Here's some code snippits:
path: serial-path-to/options lcd 19200
path == serial://port2/19200/none/8/1
fp: open/mode path [ direct write read binary no-wait ]
serial-path-to is:
serial-path-to: func [
'name ; port name ser1, com1, ...
/options opts ; baud setting options in REBOL open fmt
/loc number
] [
either number: find system/ports/serial name [
number: index? number
][ append system/ports/serial name
number: length? system/ports/serial
]
; Append opts or default (redundant)
either options [opts: join "/" opts] [ opts: "/9600/none/8/1" ]
; this was the hard statement for me to figure out
join serial://port rejoin [ number opts ]
]
REBOL (still exp versions) puts the port names in: system/ports/serial
The defaults are [ ser0 ser1 ] which will be useless in most cases. In QNX, ports are
in /dev and are typically names ser1, ser2 ... In the MS world they are com1 and so on.
So the first thing that one needs to do is replace system/ports/serial with valid OS
names without the /dev prefix. In my box, I make symbolic links to ser1 and ser2 to lcd
and cbr - hence the lcd in the first code line above.
Although striping the /dev prefix is somewhat handy it at first seemed limiting in QNX
where a serial port on another node has a node number or name in front of /dev. ie: //4/dev/ser5
refers to serial port 5 on node 4 and can be opened accross the net just like /dev/ser1
on whatever the local node is. Fortunately, QNX allow one to symbolic link (prefix) a
remote node into the local namespace. One could thus prefix //4/dev/ser5 -> /dev/ser4.5
and open ser4.5 using REBOL - so REBOL does not to be QNX net aware to benefit.
The crazy thing that REBOL does is make you open the port with a path name serial://port[N]
where N is the index? of the port name in system/ports/serial. Thus in serial-path-to
above, I find the index? or append the passed name and use the length? to get port[N].
Of course, REBOL then has to change this back into an open( "/dev/serX", ..) so to me
it would make sense to use the port name instead of index.
To set baud, parity, stop bits one just appends resonable values to the port path so
an open could look like:
fp: serial://port3/2400/odd/7/2
and REBOL would figure out that you want 2400 baud, 7 data bits, even parity and 2 stop
bits. I don't think that REBOL provides a mechanisim to change the option after an open.
This does bring up a buglett in QNX4 and QNX RTP - the open parameters are not correctly
set. To solve this, I call the stty command after the open so that the baud and so on
are correct. At least the port has internal attributes of speed, parity, data-bits and
stop-bits which make the stty command trivial to build. I currently execute stty in core
by writing the command "stty baud=xxx ..." to a fifo (named pipe) which has a shell script
on the other end. This scriptsimply executes whatever command is fed to it.
OK, you have a port, now what? Well it behaves pretty much like a socket so you can read,
write and wait on it.
I have an event loop that looks like this:
loop: func [ /loc ok pd ] [
ok: 1
while [ ok ][
pd: eval-rules ; do something on every pass
wait [ pd lcd/fp ] ; wait for a timeout or lcd key press
ok: not-equal? 'A pick lcd/fp 1 ; get pressed key.
]
]
OK, I don't have the keypad doing anything cool yet.
If your device returns lines of data, then you'd probably open the port with something
like:
cbr/fp: open/mode/with serial://port4/9600/none [ direct write read
no-wait lines ] "^M"
The cbr port device returns strings of data terminated with ^M in response to a command.
I have a function which sends a command, waits for a response and returns whatever the
device sent back minus some prefix. The read removes the ^M. It's all pretty slick and
with any luck would work on a MS OS if I used com[N} type names.
read-check: func [ cmd prefix /loc data] [
insert fp cmd ; write command to the serial port
wait timeout ; wait for a response
data: first fp ; get line of data
return find/match data prefix ; return stuff after prefix
]
> >I'm working on a prototype home data acquisition/control device. It
> currently runs on a 486 class SBC onder QNX but only because I don't
<<quoted lines omitted: 15>>
> [rebol-request--rebol--com] with "unsubscribe" in the
> subject, without the quotes.
--
David L. Hawley D.L. Hawley and Associates 1.503.274.2242
Software Engineer [David--L--Hawley--computer--org]
[15/16] from: holger:rebol at: 14-Mar-2001 11:04
On Tue, Mar 13, 2001 at 10:52:37PM -0800, David Hawley wrote:
> The defaults are [ ser0 ser1 ] which will be useless in most cases.
The defaults depend on the operating systems, and are usually useful. For operating systems
which provide an API to query which serial ports exist, that API is used to set the defaults.
Otherwise a reasonable OS-specific default is used. Depending on the particular OS version
and build (and for Linux, the package) the ports still may not match your setup though.
> Although striping the /dev prefix is somewhat handy it at first seemed limiting in
QNX where a serial port on another node has a node number or name in front of /dev. ie:
//4/dev/ser5 refers to serial port 5 on node 4 and can be opened accross the net just
like /dev/ser1 on whatever the local node is. Fortunately, QNX allow one to symbolic
link (prefix) a remote node into the local namespace. One could thus prefix //4/dev/ser5
-> /dev/ser4.5 and open ser4.5 using REBOL - so REBOL does not to be QNX net aware to
benefit.
At the moment REBOL does not directly support any QNX-specific features. It accesses
QNX through
standard Posix functions, which is why any QNX-specific extensions to the serial mechanism
(or other features) probably won't work. This is also why some users have problems setting
the baud rate from REBOL in QNX. Apparently some versions of QNX have some bugs in their
Posix
emulation code. This is not a bug in REBOL. The same code works fine for "regular" Unix
flavors.
> The crazy thing that REBOL does is make you open the port with a path name serial://port[N]
where N is the index? of the port name in system/ports/serial. Thus in serial-path-to
above, I find the index? or append the passed name and use the length? to get port[N].
Of course, REBOL then has to change this back into an open( "/dev/serX", ..) so to me
it would make sense to use the port name instead of index.
One of the main goals of /Core is interoperability across platforms. Introducing a standardized
naming scheme for serial ports means that scripts do not have to be changed when moving
them
across platforms. With the current scheme the only part of a script that has to change
is
the port number, as opposed to changing full port specs.
> and REBOL would figure out that you want 2400 baud, 7 data bits, even parity and 2
stop bits. I don't think that REBOL provides a mechanisim to change the option after
an open.
It does. Just change the parameters in the port structure and call 'update on the port.
--
Holger Kruse
[holger--rebol--com]
[16/16] from: ryanc:iesco-dms at: 12-Mar-2001 17:54
It is actually much simpler than one may think. The hardest part is debugging the
communication. The program is hard to debug before the communication is working.
Once your talking, you can transmit the contents of memory locations in order debug
parts of your program.
--Ryan
[Sharriff--Aina--med-iq--de] wrote:
Notes
- Quoted lines have been omitted from some messages.
View the message alone to see the lines that have been omitted