# Help with understanding position values

15 years 1 month ago #4160331 by slauziere
Help with understanding position values was created by slauziere
I have been testing and debugging on a spare motor and motor controller (3550). I am now testing with another motor controller (2550) and the positions seem to be reversed.

For instance, all the way in before stalling out a motor on the 2550 was a command of !A76 or so. On the current motor controller, I have to send it !a70 or so.

I guess the pot for feedback got reversed, but I am still a little confused.

I can adapt for either one, I was more curious for some theory behind the -127 to 127 values that the position sensor sends out.

I am curious to know why !a45 returns a position of 0xB6, whereas !A10 returns 0x10. It appears to be signed two's complement, but I feel like I am missing something that may make my life easier.

Thanks for any input.

15 years 1 month ago #4188943 by cosma
Replied by cosma on topic Re:Help with understanding position values
<P style="MARGIN: 0px">Commands are given using an unsigned Hex value from 0 to 7F (0-127), with the preceeding letter used to indicate the channel (a or b), and the capitalisation to indicate the sign (a=-, A=+).
<P style="MARGIN: 0px">
<P style="MARGIN: 0px">Position values are reported as signed binary. When position is reached (ie. command = position value) !A45 should return 45, !a45 should return BB

15 years 1 month ago #4191014 by slauziere
Replied by slauziere on topic Re:Help with understanding position values
Thanks cosma. I understand the A vs. a, positive vs. negative. I guess my question was aiming to be more theoretical...for example, why not have values ranging from 0&lt;-&gt;255 instead of -127&lt;-&gt;+127, and then using 'A' or 'a' would not matter? Depending on application, in your current scheme, the Zero point (!A00) could be the null position of the actuator.

I wasn't sure if there was some other reason to use positive and negative position values.