4.3.11. User defined position units¶
Controller position is set and read in stepper motor steps or encoder counts, if encoder is available and enabled. Is it convenient to set position in mm (in case of translation stages), in degrees (in case of rotator stages) or in any other natural units. Controller software can translate coordinates to user-defined units: user can set a ratio, where a certain amount of controller steps is equal to the certain amount of user-defined units. This enables one to issue movement commands and read controller position in these user units. It applies both to XiLab interface and to usage in custom programs or scripts. Speed and acceleration are also set in units derived from user-defined ones (for example mm/s). Zero position adjustment can be done the same way in user-defined units as in encoder counts or step motor steps.
You can enable user-defined units in XiLab on page User units settings. You can define the name of the natural units in XiLab.
Libximc library functions operating in user defined units have a _calb suffix. They take calibration structure calibration_t as an additional input. For more information see Programming guide.