How to access the value of variables of RN

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?

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

Yea, cool! I’ll wait what it takes, thanks!

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

Thanks anyway.
I’ll try what you’ve said.

Thanks again. Keep in touch.

Yes, it works perfectly.