Home >Taking back control
Taking back control
04 April 2017
Andy Pye reviews some recently released guidance from motor manufacturer maxon on the advantages and limitations of the different modes available when using CANbus in machinery
Though it was originally designed as a fieldbus, CANbus provides a lot of design flexibility because it lets individual components be easily exchanged without major changes. For example, control software hardly changes if a stepper motor and controller is replaced by a DC motor with another manufacturer’s controller. Both drive systems appear almost the same on the CANbus when using CANopen-profiles.
There are three basic techniques:
- interpolated position mode
- velocity mode
- profile torque/current mode.
Other techniques include:
- profile position mode
- position mode
- profile velocity mode.
Each mode represents trade-offs between the dynamic response of the controls and the amount of signal traffic on the CANbus lines.
Position control & load
Interpolated position mode puts the least load on the CANbus. Here, the machine controller calculates the movement of all drives, intermittently generates existing support points using position and velocity, and writes these into the positioning controller’s message buffer. The position controller, in turn, calculates reference values for position control through cubic interpolation. Local timers on multiple positioning controllers can be synchronised on the CAN-bus with SYNC messages.
The master only sends updated position commands to the position controller every 10 to 100ms. Consequently, the controller cannot be commanded to change position quickly. The update times are typically too slow for additional synchronization with external sensors (vision, encoders from conveyor belts, and so forth).
If the update time must be 10ms or faster, velocity modes provide for greater dynamics in motion planning by using the CANopen master for motion planning and a degree of drive control.
The CANopen master performs positioning regulator functions (typically PI control using position feedback from the controlled axis). The drive control serves as a subordinate speed controller. The controllers then operate in “profile velocity mode.” In this mode, the controller must use reference values immediately, or position feedback will be outdated and the position loop can’t be closed. Some positioning controllers also offer true “velocity mode” where velocity reference values feed directly to the controller, creating better motion planning dynamics. The potential drawback of velocity modes, though, is that the 2 to 5ms cycle times weigh on the master’s real-time response requirements.
Another possibility involves realising the positioning and velocity controller in the master and specifying the torque or current set values in the drive controls via CANbus. To do this, CANopen specifies “profile torque mode” for motion control products. As an alternative, some controllers offer “current mode”, which is when current references via CANbus feed directly to the current controller on the motion controller chip.
This creates a high dynamic range which is essential for some types of motors such as coreless dc motors. This approach lets complex algorithms be implemented in the master. It works well for robots with non-linear dynamics. But it requires hard real-time capacity; short cycle times place high demands on the CANbus.
For example, sending a CAN message with a default position value and receiving a message with a current position value takes almost 200µs at a transmission rate of 1Mb/s per drive. A cycle time of 0.5ms for only two drives on one CANbus thus takes up around 80% of the CANbus capacity.
- Interpolated position mode puts the least load on the CANbus; the machine controller calculates the movement of all drives
- The master only sends updated position commands to the position controller every 10 to 100ms; it cannot be commanded to change position quickly
- If the update time must be 10ms or faster, velocity modes provide for greater dynamics in motion planning