We’re using an XM430-W350 mounted to the front of a mobile robot that records video. The user can position the camera using our software, which uses the C# interface in the Dynamixel SDK 3.7.42.
Before I explain, remember that the absolute position in a single revolution starting at 0 (bottom center) is tracked as a number between 0 and 4095, increasing in value in a counter-clockwise direction such that 4095 is adjacent to 0 on the left.
We were using extended position control, and only allowing a range between 1024 and -1024 to keep the cable from wrapping around the spindle. The idea is to only allow the pan to move counter-clockwise to return to center (0 position) if it’s left of center, and clockwise to return to 0 if it’s right of center. This works fine when your initial position is exactly 0, but when the device is rebooted and the initial position is left of center, what the software previously understood as position -1024 is now reported as approximately position 3072! The way to reconcile this position using extended position control is to maintain what I’ll refer to as “relative zero.” If the initial position when the device reboots is left of center (position 2048-4095), relative zero is 4095 instead of 0; if the initial position is right of center, relative zero is 0. So, in my case where the initial position was 3072, I went to position 4095 (relative zero) to center the pan, moving it counter-clockwise to avoid wrapping the cable around the spindle. To move it right in to get to absolute position 1024, I have to consider that relative zero is 4095 and move to extended position 5119.
I hope this makes sense and saves you some time.