To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcxOpen lugnet.robotics.rcx in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / 373
Subject: 
How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Mon, 10 Jan 2000 18:47:20 GMT
Viewed: 
1409 times
  
I got my RIS a couple of weeks ago, and I have been building simple robots
and programmed them using the program on the RIS cd.

I´ve heard that you can program the RCX in very advanced ways, multitasking
and so on.
How advanced can it be?
How do you use the advanced progamming features?
And what does the multitasking do?

--Tobias


Subject: 
Re: How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Mon, 10 Jan 2000 19:07:36 GMT
Reply-To: 
MATTDM@MATTDMsaynotospam.ORG
Viewed: 
1394 times
  
Tobias Möller <tobias.moller@telia.com> wrote:
I´ve heard that you can program the RCX in very advanced ways, multitasking
and so on.
How advanced can it be?

Depends how hard you want to work. With LegOS or pbForth, which replace the
official firmware, you can program the hardware at the machine level, so you
can do very advanced stuff. With NQC (or RoboLab) you're still limited by
Lego's firmware, so it's not as powerful. (For example, with NQC, you're
limited to 32 variables.)

How do you use the advanced progamming features?

Use something other than the RCX Code program!

And what does the multitasking do?

You get a certain number of "threads" which can be happening at the same
time. It's very useful, but you have to think a lot about conflicts between
the various things you've got going on.

--
Matthew Miller                      --->                  mattdm@mattdm.org
Quotes 'R' Us                       --->             http://quotes-r-us.org/


Subject: 
Re: How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Mon, 10 Jan 2000 19:16:19 GMT
Viewed: 
1431 times
  
Hi Tobias,

If you're a computer programmer, I'd definitly suggest using something other
than the RCX Code method of writing programs for the RCX. NQC is a nice
environment if you know C. If you know a language that supports ActiveX, you
can program the RCX using the Spirit ActiveX control. This is a bit harder than
using NQC, but lets you go the object-oriented route, distrubute binaries
rather than source, and links you to every other ActiveX control in existance.
I don't think NQC can do any of those things (Dave Baum, the creator of NQC, is
on this list, so I'm sure he'll correct me if I'm wrong about that.)

The real limits to what you can do come from the limited amount of resources
you have available on the RCX. There's only 6k of memory and 32 variables
available for your programs.

Multitasking lets you have two pieces of code running at the same time. I'm
using it in the software I'm writing, but the more I use it, the more I have
questions about whether it's an advantage or a disadvantage. It definitly means
you have to do a bit more work, either in the design, the code, or both, to
make sure your different pieces of code don't step on each other. The O'Riley
Mindstorms book says you need multitasking to implement whats called a
Subsumption Architecture. I'm using a Subsumption Architecture, and it's
multitasking, but I really don't think it needs to be.

For me, the joy of programming the RCX comes from the interaction between my
code and the hardware. My code may say to spin a motor, but what happens when
that motor spins depends entirely on how I build my robot. The body of the
robot is literally an extension of its mind. It contains instructions just as
surely as the code does. Coming up with ways to exploit that relationship is
something totally new to me. This area is where you'll make up for the
limitations of the RCX. Small amounts of code can produce a lot of action in
the real world if you hook up the right hardware.

David Leeper (thinks the body is an extension of the brain)

In lugnet.robotics.rcx, Tobias Möller writes:
I got my RIS a couple of weeks ago, and I have been building simple robots
and programmed them using the program on the RIS cd.

I´ve heard that you can program the RCX in very advanced ways, multitasking
and so on.
How advanced can it be?
How do you use the advanced progamming features?
And what does the multitasking do?

--Tobias


Subject: 
Re: How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Mon, 10 Jan 2000 19:22:13 GMT
Viewed: 
1475 times
  
Hi Tobias,

If you're a computer programmer, I'd definitly suggest using something other
than the RCX Code method of writing programs for the RCX. NQC is a nice
environment if you know C. If you know a language that supports ActiveX, you
can program the RCX using the Spirit ActiveX control. This is a bit harder than
using NQC, but lets you go the object-oriented route, distrubute binaries
rather than source, and links you to every other ActiveX control in existance.
I don't think NQC can do any of those things (Dave Baum, the creator of NQC, is
on this list, so I'm sure he'll correct me if I'm wrong about that.)

The real limits to what you can do come from the limited amount of resources
you have available on the RCX. There's only 6k of memory and 32 variables
available for your programs.

Multitasking lets you have two pieces of code running at the same time. I'm
using it in the software I'm writing, but the more I use it, the more I have
questions about whether it's an advantage or a disadvantage. It definitly means
you have to do a bit more work, either in the design, the code, or both, to
make sure your different pieces of code don't step on each other. The O'Riley
Mindstorms book says you need multitasking to implement whats called a
Subsumption Architecture. I'm using a Subsumption Architecture, and it's
multitasking, but I really don't think it needs to be.

For me, the joy of programming the RCX comes from the interaction between my
code and the hardware. My code may say to spin a motor, but what happens when
that motor spins depends entirely on how I build my robot. The body of the
robot is literally an extension of its mind. It contains instructions just as
surely as the code does. Coming up with ways to exploit that relationship is
something totally new to me. This area is where you'll make up for the
limitations of the RCX. Small amounts of code can produce a lot of action in
the real world if you hook up the right hardware.

David Leeper (thinks the body is an extension of the brain)

In lugnet.robotics.rcx, Tobias Möller writes:
I got my RIS a couple of weeks ago, and I have been building simple robots
and programmed them using the program on the RIS cd.

I´ve heard that you can program the RCX in very advanced ways, multitasking
and so on.
How advanced can it be?
How do you use the advanced progamming features?
And what does the multitasking do?

--Tobias


Subject: 
Re: How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Mon, 10 Jan 2000 19:23:47 GMT
Reply-To: 
mattdm@%ihatespam%mattdm.org
Viewed: 
1493 times
  
David Leeper <david.leeper@destiny.com> wrote:
If you're a computer programmer, I'd definitly suggest using something other
than the RCX Code method of writing programs for the RCX. NQC is a nice
environment if you know C. If you know a language that supports ActiveX, you

Even if you don't know C, NQC is pretty easy to learn.

--
Matthew Miller                      --->                  mattdm@mattdm.org
Quotes 'R' Us                       --->             http://quotes-r-us.org/


Subject: 
Re: How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Mon, 10 Jan 2000 20:00:38 GMT
Viewed: 
1504 times
  
Even if you don't know C, NQC is pretty easy to learn.

You are right, Matthew. It also supports the Mac and Unix, which RCX Code and
the Spirit ActiveX control don't.

David Leeper


Subject: 
Re: How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Tue, 11 Jan 2000 03:38:54 GMT
Viewed: 
1421 times
  
In article <Fo4wH1.A91@lugnet.com>, "David Leeper"
<david.leeper@destiny.com> wrote:

Hi Tobias,

If you're a computer programmer, I'd definitly suggest using something other
than the RCX Code method of writing programs for the RCX. NQC is a nice
environment if you know C. If you know a language that supports ActiveX, you
can program the RCX using the Spirit ActiveX control. This is a bit harder than
using NQC, but lets you go the object-oriented route, distrubute binaries
rather than source, and links you to every other ActiveX control in existance.
I don't think NQC can do any of those things (Dave Baum, the creator of NQC, is
on this list, so I'm sure he'll correct me if I'm wrong about that.)


IMHO, spirit.ocx doesn't provide OO capability - it does serve as an
enabler, though.

What it provides is the ability to write a VB program that writes an RCX
program.  This VB program can be as OO as you want it, but the calls to
spirit.ocx are still rather awkward.

Of course, this also opens the way for other to write their own
development systems (OO or otherwise) on top of spirit.ocx.  In that
sense, spirit.ocx is an enabler for OO programming of the RCX, however
actual OO capability would come from this other development system
(perhaps a full GUI application, or even just a set of wrapper classes
around spirit.ocx to be used within VB).

Don't get me wrong - I'm not knocking spirit.ocx.  It allows a lot of very
useful things to be developed for the RCX.  However, many people
mistakenly believe that spirit.ocx allows you to write VB programs for the
RCX.  Quite simply, this isn't true.  The VB program you write runs on the
PC.  Its output, however, may be commands or even a program that is sent
to the RCX.

As for binaries, NQC supports generating/downloading binary forms of
programs, but this isn't used too often.  Source versions of the program
are much more useful to other people, and so far most users are perfectly
willing to share their work.  However, if you needed to keep the source
private, you could still generate a binary file containing the bytecodes.

Dave Baum

--
reply to: dbaum at enteract dot com


Subject: 
Re: How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Tue, 11 Jan 2000 14:17:16 GMT
Viewed: 
1586 times
  
In lugnet.robotics.rcx, David Leeper writes:

I´m no computer programmer, but I´ve downloaded NQC but haven´t installed it
yet.

If I´ve understood this multi-tasking right, then it means that you can have
one program running for the motors of a robot, and another for the sensors, but
at the same time.

I´ll give NQC a try.

--Tobias

Even if you don't know C, NQC is pretty easy to learn.

You are right, Matthew. It also supports the Mac and Unix, which RCX Code and
the Spirit ActiveX control don't.

David Lee


Subject: 
Re: How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Tue, 11 Jan 2000 14:44:30 GMT
Viewed: 
1603 times
  
In lugnet.robotics.rcx, David Leeper writes:

I´m no computer programmer, but I´ve downloaded NQC but haven´t installed it
yet.


That wasn't me!

David Leeper (has been a computer programmer for 17 years! :^))


Subject: 
Re: How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Tue, 11 Jan 2000 15:00:40 GMT
Viewed: 
1625 times
  
"TM" == Tobias Möller <tobias.moller@telia.com> writes:

TM> If I´ve understood this multi-tasking right, then it means that
TM> you can have one program running for the motors of a robot, and
TM> another for the sensors, but at the same time.

It could mean that, yes. However, you needn't restrict yourself like
that. You can have a number of programs running (how many was that
again?), and they certainly don't have to limit themselves to either
sensors or motors. Just like on just about any computer these days,
multi tasking means that the computer can (appear to) do multiple
things at the same time. While you're busy reading this article, for
example, your MP3 player may continue playing a song, and the clock on
your desktop will update, and, well, who knows what else.

Regards,

Johannes.
--
"If 600 Hertz, 700 must kill." -- The Spin Doctors

Virtually researching virtual behaviour in a virtual world.


Subject: 
Re: How advanced can RCX programming be?
Newsgroups: 
lugnet.robotics.rcx, lugnet.robotics
Date: 
Tue, 11 Jan 2000 16:24:17 GMT
Viewed: 
1767 times
  
In lugnet.robotics.rcx, Tobias Möller writes:
In lugnet.robotics.rcx, David Leeper writes:

I´m no computer programmer, but I´ve downloaded NQC but haven´t installed it
yet.

If I´ve understood this multi-tasking right, then it means that you can have
one program running for the motors of a robot, and another for the sensors, • but
at the same time.
More than that.
You can (for instance) have a 'command' thread, which looks at a variable, and
decides according to the values on this whether to turn left/right or issue
some other response, and does this by changeing other values. You can then
have a seperate program for each motor that keeps each motor at a specific
speed, by monitoring the revolution counters, and also watches the
instructions from the command thread, telling it which way to go. This type of
writing allows you to keep the 'housekeeping' tasks seperate from the
'thought' processes. You can do the same using the standard software, but with
RCX, you can (for instance) elect to start a different process to handle
reversing, to the one for forward (often useful given the differences in the
steering responses), whereas the normal software does not allow this control -
the Dacta RoboLab software does, though with only a small number of variables
(5 I think), against the 32 available in NQC.

Best Wishes


©2005 LUGNET. All rights reserved. - hosted by steinbruch.info GbR