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 / 98
97  |  99
Subject: 
Re: Using 'containers' in Robolab
Newsgroups: 
lugnet.robotics.rcx.robolab
Date: 
Mon, 16 Apr 2001 21:13:28 GMT
Viewed: 
4768 times
  
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 has 1 Reply:
  Re: Using 'containers' in Robolab
 
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. (...) (23 years ago, 18-Apr-01, to lugnet.robotics.rcx.robolab)

Message is in Reply To:
  Using 'containers' in Robolab
 
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 (...) (23 years ago, 14-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

This Message and its Replies on One Page:
Nested:  All | Brief | Compact | Dots
Linear:  All | Brief | Compact
    

Custom Search

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