Lynxmotion Tech Support

www.lynxmotion.com
It is currently Fri Sep 10, 2010 5:04 am

All times are UTC - 6 hours [ DST ]




Post new topic Reply to topic  [ 6 posts ] 
Author Message
 Post subject: How to access the value of variables of RN
PostPosted: Wed Feb 06, 2008 12:05 pm 
Offline
Roboteer

Joined: Wed Jun 27, 2007 9:08 am
Posts: 9
Does someone know hoe to access the memory positions where the value of the angles
are stored. Because I would like to make the same thing that GETMOTOR but without making the robot limp. Using POKE or something like this? Then How?

Can anyone help me?


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 07, 2008 8:34 am 
Offline
Roboteer

Joined: Thu May 11, 2006 8:30 am
Posts: 51
Yes, I can make you a map of the variables within the Controller. You need to understand there are quite a few angles which are visible as PEEKs.

The software has a move controller which maintains two angles:
Desired angle = where the servo should move to
Current angle = where the move controller thinks the servo is
It also has the speed, which determines how fast the Current is updated to achieve the desired.
A move is complete when Desired = Current, there is also a bit flag for each servo to show this.

The current angle is then modified, by adding the zero position, the Gyro inputs, and the direction is set. This then gives the servo output angle, which is sent to the servo. This can also be PEEKed

When you perform a MOTORIN, you are reading the actual servo position from the servo itself. This may differ from the servo output angle, depending on time and servo load. This value is not saved

When you perform a GETMOTORSET, the controller does a MOTORIN type command to all servos and writes the values returned to both the current and desired positions(asuming you selected that option)

MOTORIN is a pretty disruptive instruction to the C3024 code, and hence why GETMOTORSET is a problem.

I will map out the memory locations for you, and you can PEEK them. The POKE instruction in the standard C3024 code is broken for variables, so you will need my fixed version of the C3024 flash code if you want to POKE them


Top
 Profile  
 
 Post subject:
PostPosted: Thu Feb 07, 2008 2:26 pm 
Offline
Roboteer

Joined: Wed Jun 27, 2007 9:08 am
Posts: 9
Yea, cool! I'll wait what it takes, thanks!


Top
 Profile  
 
 Post subject:
PostPosted: Sun Feb 10, 2008 9:25 am 
Offline
Roboteer

Joined: Thu May 11, 2006 8:30 am
Posts: 51
Sorry, I have a few distractions this weekend, so I have not pulled together as much information to describe this as I hoped.

To keep you going:
The desired positions are stored in 24 memory locations from &H300.
The current positions are stored in 24 memory locations from &H320
They can both be PEEKed there.

When a move is started a bit is cleared in locations &H4E3, &H4E4, &H4E5.
there is one bit per servo starting at bit 0 in &H4E3.
When the current = the desired, then the corresponding bit is set.
A move is complete when all 3 bytes = &HFF

If you want to POKE any of these lcations remember the POKE instruction in Robobasic is broken, for Poking varaibles. Constant values are OK


Top
 Profile  
 
 Post subject:
PostPosted: Tue Feb 12, 2008 3:55 am 
Offline
Roboteer

Joined: Wed Jun 27, 2007 9:08 am
Posts: 9
Thanks anyway.
I'll try what you've said.

Thanks again. Keep in touch.


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 20, 2008 10:56 am 
Offline
Roboteer

Joined: Sun Apr 20, 2008 10:10 am
Posts: 4
Location: Poland
Yes, it works perfectly.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 6 posts ] 

All times are UTC - 6 hours [ DST ]


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group