Tutorial: Setting up a Motion Control System via CANopen over EtherCAT


Having carried out all steps regarding Hardware setup and OBLAC Drives setup, you should now have prepared the following:

  • Your SOMANET Servo Node connected to power supply, motor, position sensor and to a computer
  • OBLAC Drives installed, running and established a connection to your drive
  • Latest firmware installed on the drive
  • All basic configuration parameters of your motor and sensor copied from their datasheets to your drive configuration
  • The position sensor provides plausible data, the commutation offset was found.

Rotate your motor at a defined torque

If you have met all the prerequisites, you are ready to operate your motor.

  1. Go to OBLAC Drives
  2. Switch to the Playground section from the top menu
  3. Select “TORQUE CONTROL”
  4. Use the slider or the buttons to enter a reference torque


  • Applying a constant torque means that the motor shaft will start moving and not stop before you manually set it back to a lower value. If anything is attached to your motor shaft (e.g. robotic manipulator), make sure there are no mechanical limits to be exceeded or anything might be hit.
  • Torque is given in the unit per thousands of rated torque. So, if your motor’s datasheet specifies T_rated = 0.5 Nm and you entered the corresponding 500 mNm into your configuration, setting the torque setpoint to 100 will lead to
    100 * 1/1000 * 0.5 Nm = 0.05 Nm
  • Usually, a value between 50 and 300 should be sufficient to make any motor start rotating - regardless of its absolute size and rated torque

Your motor should start rotating now and you should be able to observe the motion in OBLAC Drives.


If you encounter any problems, make sure they are sorted out before you continue. Reviewing the above-mentioned list of prerequisites should be your first step. You can also have a look at our troubleshooting site and our forum.

Rotate your motor to defined positions

Common tasks in robotics involve moving a manipulator, vehicle or gripper to a predefined position. In order to do so, your SOMANET Servo Node comes with an internal position controller that can be configured and adapted to your surrounding mechanical system automatically.

The automatic controller configuration procedure (auto-tuning) estimates physical parameters of the system and calculates controller gains based on them and a set of desired performance specifications. To use the auto-tuning feature

  1. Go to the area ‘tuning’ and select position control and cascade PID control.


The motor shaft will move significantly during this procedure. So please make sure that your motor can move freely and no large load (like a full robot arm) is attached to it. A gearbox and / or small loads are allowed.

  1. Press the button auto-tune.

This procedure will set the gains of the position controller to values suitable for a system with decent performance for standard robotic applications.

You can now go back to the playground and investigate the behavior of your system.

First of all, enter a target position in the units of encoder increments (‘tics’) and see how the motor moves there. Depending on your encoder resolution, quite large numbers are necessary to create visible motions. For example, with a 16-bit encoder 65,536 tics represent one motor shaft revolution. If you even have a reducer (gearbox) attached to your motor shaft, you may have to change the position setpoint by several 100,000 tics to create visible motion. However, we recommend to start with small steps and then slowly increase them.

Finally, you can check the performance of your position control loop by using one of the position setpoint test functions available in OBLAC Drives. Depending on what suits your application best, you can choose from

  • step
  • sinusoidal
  • trapezoidal

position reference signals.


Use the buttons on the right hand side of the window to see detailed plots of the tracking behavior (position setpoint and actual position) and other values like the torque. You can use the figures to check if the overshoot, response times or bandwidth of your entire control loop suit your application.

Congratulations! You are now successfully running your motor and able to follow your axis trajectory.