When the value are positive I receive the correct value, but if the value is negative (negative velocity, negative current or negative position (in extended position control mode)) the value that I get is completely wrong.
If I use the dynamixel wizard 2.0 I get the correct value in any case.
I think is a problem of the read2ByteTxRx and read4ByteTxRx function in the Dynamixel SDK library, I think they handle in the wrong way negative value.
Hey. I’m running in a similar issue I guess, not sure. I cannot take a twos compliment of a number that’s not binary and the current value I’m receiving are in the range of 65523. Did you end up figuring it out ?
The “integer” received from ROBOTIS hardware via DXL-SDK function calls such as read2ByteTxRx is already in its 2-complement format. So let’s say that we are dealing with a parameter being returned from the Control Table as a 16-bit integer using a 2-complement coding scheme, meaning that its “real” value is between -32768 and + 32767 (and not between 0 and 65535), for example, the Acc_X of the IMU in the Controller CM-550, see screen capture below:
Thanks a lot for a detailed response. I had tried this approach but the control table for the XC330M288T motor does not have these parameters so im not sure what range to use for the logic.
i will try this logic and get back .
Thanks a lot !!