View Full Version : arbotix/dynamixel serial/EPROM reset

03-17-2018, 03:43 AM
typically when my swerial connection is compromised I have to cycle through power of the arbotix and reconnect USB to get serial to come alive again. For some reason my dynamixel EPROMS seem to reset various parameters- in particular I have speed limited by table 32 item 'moving speed'. This is somehow lost and resets (I believe to default full speed). IM trying to figure out where this is happening .... is it a dynamixel reset, or is it an arbotix reset ? Anybody notice this phenomenon ? Im going to open ax12.h file in Atom and dig around and see if there is some sort of 'global default' item in there.
Or it could just be the nature of the dynamixels when the serial connection is comporomised and garbled. Oddly though the ID stays the same, which leads me to believe its not a dynamixel reset, but rather some instruction from the arbotix that is losing my speed settings.
Or maybe I need code to assure the arbotix is permanently writing new EPROM table to the dynamixel ?

03-17-2018, 06:43 AM
Only registers 0 to 18 are stored in EEPROM on the AX-12. All others are stored in SRAM, which is not always preserved during a power loss and may be in an indeterminate state upon powerup. The only SRAM registers that do not require initialization within user code are the few that are automatically initialized with a default value (e.g. SLOPE, MARGIN, PUNCH, etc.) or initialized from EEPROM (TORQUE_LIMIT).

MOVING_SPEED and GOAL_POSITION have no default value or initial value taken from EEPROM. So, while they may have the same value as before the servo was power cycled, there is no guarantee of this occurring and it is best to initialize the MOVING_SPEED within user code.

03-17-2018, 11:04 AM
Ah, thks for that info... That makes sense now. Im trying to assure that the motors never lurch in unpredictable ways, damaging delicate payloads. Are there any other parameters that would be more ' stable' and essential provide a cap on acceleration that would be more failsafe ?

03-17-2018, 11:23 AM
As Tician mentioned when the servos gain power, the first N registers are in EEPROM (how many depends on which type of servo). AX12 - the first 23...
The others are in RAM and are initialized to their default values. If you look at the AX12 register list it gives you the default values for each of these...

Things like Torque Enable (0 - Off)
Goal position (Present position)
Moving Speed (0 full speed ahead)

When first starting up, you might do things like:

Find the current position

Depending on how far you are from your initial position, may set speed to be slow.

May set torque limit to be a lower value so if it hits something...

Then set torque on and set your new initial goal position...

With Some things like Arms, I have at times did the initialization to not go directly to my desired starting position, but instead go to some neutral location and then to the initial position. I did this as there were times that the arm may be powered up in some strange configuration, which could bind up if you tried to go straight to the desired starting locations...

03-17-2018, 12:04 PM
I see, essentially every new connection to serial should start with a 'soft homing cycle' routine programmed in software. That makes sense to me now.