Swap Axis Direction
If a robot is mechanically set up as intended by the manufacturer all axes should move as shown in the 3D simulation. However in some special cases the motion direction of an axis needs to be swapped. If you are setting up a standard gantry robot read Gantry axes moving in wrong direction instead for mechanical troubleshooting.
This article explains how to do this. Follow it's sections in their order.
Mechanical Set Up
If an axis unintentionally moves in the opposite direction first check the mechanical setup. Mounting a motor or referencing sensor at the wrong side of the axis can cause this. Try mounting motor and sensor at the correct places if possible. If all goes well the issue should be solved now.
Motion Direction
The motion direction can be changed by negating the GearScale parameter in the Robot Configuration File:
- Find the line for the axis in question: Joint0 refers to axis 1, Joint1 to axis 2 etc.
- Find the GearScale entry in that line and note it down for later
- Negate it's value (add/remove a minus sign)
- Save the configuration file and write it back to the robot control
- Restart the robot control
Jogging the axis should now result in a reversed motion. The referencing motion is handled separately from the general motion and therefore does not change (see next section).
Referencing Direction
If the axis moves away from the referencing sensor first check whether it is at the correct position (in most cases the referencing sensor should be at or near the 0 position of the axis) and mount it accordingly.
If the axis still moves away from the sensor change the referencing direction:
- Load the firmware parameters off the motor modules as described here: Firmware Parameter Configuration
- Find the section for the axis in question: Joint0 refers to axis 1, Joint1 to axis 2 etc
- In that section find the parameters RefSpeed and RefSpeedSlow
- Negate it's value (add/remove a minus sign)
- Save the file and write it back to the robot control
- Restart the robot control
The axis should now move towards the referencing sensor and reference correctly.
Referencing Offset
Depending on where the referencing sensor is placed motion may not be possible (e.g. when the sensor is at the far end of the axis, the robot control may only allow motion in positive direction towards the end stop). To fix this the referencing offset needs to be changed.
- Reference the axis. Do not move it afterwards.
- Measure the distance to the 0 position.
- Multiply that distance (in millimeters or degrees) with the GearScale of that axis (see section Motion Direction)
- Load the firmware parameters as described in the previous section
- Find the Offset parameter of that axis and add or subtract the calculated value
- Write it back to the robot and do a restart
After referencing the control software should show the correct position and be able to move to the 0 position. If the position is far off try subtracting instead of adding.