To LUGNET HomepageTo LUGNET News HomepageTo LUGNET Guide Homepage
 Help on Searching
 
Post new message to lugnet.robotics.rcx.robolabOpen lugnet.robotics.rcx.robolab in your NNTP NewsreaderTo LUGNET News Traffic PageSign In (Members)
 Robotics / RCX / ROBOLAB / 100
99  |  101
Subject: 
Re: Using 'containers' in Robolab
Newsgroups: 
lugnet.robotics.rcx.robolab
Date: 
Wed, 18 Apr 2001 03:36:31 GMT
Viewed: 
5009 times
  
Thanks to you and Ben Irwin for your replies.

After considerable beating my head against the wall I found my mistake:  For
the value in the angle container I had a constant instead of 'value of port
2' modifier.  I surely will not forget that one.  Interestingly, when you
string a constant to that port it does not show a wiring or other error, it
just does not work.

The larger question is:  Where is there a writeup of the basic syntax (if
you can call it that) of this icon based software.  I'm sure other little
problems will crop up to keep me busy for more hours before I hack my way
through it all.

I have Robolab 2.01 too.  You say it does not have ABS values, yet I have a
container identified by a || symbol.  I wonder if I got it by 'install
extras' in the Project Menu.

Anyway, the struggle is worth it.  I find that programs have extraordinary
compactness.  Also, it seems that a program builds faster than with NQC.
There is a lot of front-end work in NQC that you don't have to do in
Robolab, such as defining constants and variables and assigning names to
devices.

Regards, Jerry

In lugnet.robotics.rcx.robolab, Richard Hamilton writes:
In lugnet.robotics.rcx.robolab, Jerry Kalpin writes:
I'm having a bad time with the use of containers.  I have an angle-container
and then a container-fork.  I was careful to use a (blue) modifier for both
of them, set the port number on the angle-container and the specified number
to the container-fork.

But that bit of circuitry never works.  Also, I don't seem to get any
reasonable number in the container.  I check the value in the container
using 'Interrogate RCX' and it never corresponds to the value displayed in
the RCX for port 2 where it is connected.

So I have a basic *wrong understanding* about the use of containers as
variables.  Is there anything written anywhere giving some basic discussion
on containers?

I suppose I will find it in Ben Irwin's book when it comes out but...?!  :(

Thanks for your help, Jerry
What version of Robolab are you using? I use Robolab 2.01 and have not had
the problems you are describing. As an example of using the Angle Sensor, I
tried the program:
Empty Container - Blue
Zero Angle Sensor - Port 1
Wait 2
Play Sound 5
Angle Container - Blue ; Port 1
Start of Loop - Value of Blue
Wait 1
Play Sound 1
End of Loop
Stop
When this program starts, you have two seconds to turn the angle sensor.
After two seconds the program beeps a low tone and then clicks the number of
the angle sensor (only if the value is positive). So if you rotate the angle
sensor one entire rotation, you will hear the first tone followed by 16
clicks one second apart. (16 = 360 degrees of rotation) Since this version
of Robolab does not have the ABS function, this program example only works
for positive values from the angle sensor. To more exactly duplicate your
problem modify the program to look like:
Empty Container - Blue
Zero Angle Sensor - Port 1
Wait 2
Play Sound 5
Angle Container - Blue ; Port 1
Container Fork - Blue ; Value 0
Play Sound 1
  Merge
<= Merge
Stop
Once again you have two seconds after starting this program to turn the
angle sensor in a positive direction. Then the program clicks once if the
number on the angle sensor is a positive value. If you use the Interrogate
RCX you will see the proper container and sensor values after both of these
programs.

The only trick to using containers is they start at zero after the RCX is
first powered on, but are not automatically zeroed out at the start of every
program thereafter. I usually initialize all values at the start of the
program, although it is not necessary in these examples to initialize the
blue container or the angle sensor.

Just for kicks, if you are still having problems please send me the file or
upload it and I will look at it. Thanks.



Message is in Reply To:
  Re: Using 'containers' in Robolab
 
(...) What version of Robolab are you using? I use Robolab 2.01 and have not had the problems you are describing. As an example of using the Angle Sensor, I tried the program: Empty Container - Blue Zero Angle Sensor - Port 1 Wait 2 Play Sound 5 (...) (23 years ago, 16-Apr-01, to lugnet.robotics.rcx.robolab)

4 Messages in This Thread:


Entire Thread on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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