Referencing Program

From Wiki

The precision of robots generally is best when referencing is always done at the same position. Since iRC / TinyCtrl version V13-040 a program can be executed after referencing that moves the robot to a position specified by the user. After the program finishes the robot automatically re-references all axes.

This is useful for ReBeL robots that can reference themselves at any position using absolute encoders. It is not relevant for most other igus robots that need to reference at a referencing switch.

Note that the robot must be referenced before the referencing program can be run. This means the referencing program can not be used to move the robot before the inital referencing, e.g. to avoid obstacles.

Warning: The referencing program causes the robot to move. Keep the emergency stop ready and watch for collisions! Make other users aware of this behavior!


The referencing program can be set in the project configuration menu in iRC: Click "File" -> "Configure Project" -> "Referencing". There you can select a program that you created like any other robot program. It must be uploaded to the robot beforehand, e.g. by running it once like a normal program.

If the setting "Run after 'Reference all'" is set the program is always run after "Reference all joints" finishes without error. This affects the "Reference All" button in the referencing menu, referencing via CRI, Modbus and the PLC interface.


If the referencing program is enabled "Reference all joints" will behave like this:

  1. Reference all joints (as usual)
  2. Check pre-conditions for the referencing program. Abort if this check fails.
    • Was referencing succesful?
    • Did any hardware error (other than MNE_LAG / position lag) occur?
    • Is the referencing program set?
  3. Load the referencing program and run it
  4. Once the program finishes check whether any errors occured
  5. Reset and enable the motors
  6. Reference all joints again

During this process the users program is stopped and unloaded and the referencing program is loaded. The user program is loaded after the process finishes successfully or with an error.

Note that setting the referencing program to repeat aborts the process.


If "Run after 'Reference all'" is enabled the normal "Reference All" command of all interfaces will run the referencing program.

The CRI command "CMD ReferenceWithProg" starts the referencing program without implicit referencing beforehand. The robot still needs to be referenced and referencing will be done after the program finishes.

This feature is available on Modbus coil 74. Write a rising edge to start the referencing program.

Example program

The robot should lean to one side so that all axes are at a slight load by their weight.
In this example program the robot moves to a specific position, then a bit further and back to minimize gear play effects.

The robot should move to a position at which all axes are at a slight load (i.e. it should not point straight up but e.g. to one side). We recommend to also move back and forth by a few degrees to counteract gear play. Try lower speeds to increase accuracy.

Example program for ReBeL robots.

If the example does not help try other angles or speed.