libximc  2.14.22
Data Fields
ctp_settings_t Struct Reference

Control position settings (used with stepper motor only) More...

Data Fields

unsigned int CTPMinError
 The minimum difference between the SM position in steps and the encoder position that causes the setting of the STATE_CTP_ERROR flag.
unsigned int CTPFlags
 Position control flags.

Detailed Description

Control position settings (used with stepper motor only)

When controlling the step motor with the encoder (CTP_BASE=0), it is possible to detect the loss of steps. The controller knows the number of steps per revolution (GENG::StepsPerRev) and the encoder resolution (GFBS::IPT). When the control is enabled (CTP_ENABLED is set), the controller stores the current position in the steps of SM and the current position of the encoder. Next, the encoder position is converted into steps at each step, and if the difference between the current position in steps and the encoder position is greater than CTPMinError, the flag STATE_CTP_ERROR is set.

Alternatively, the stepper motor may be controlled with the speed sensor (CTP_BASE 1). In this mode, at the active edges of the input clock, the controller stores the current value of steps. Then, at each revolution, the controller checks how many steps have been passed. When the difference is over the CTPMinError, the STATE_CTP_ERROR flag is set.

See Also
set_ctp_settings
get_ctp_settings
get_ctp_settings, set_ctp_settings

Field Documentation

unsigned int CTPFlags
unsigned int CTPMinError

The minimum difference between the SM position in steps and the encoder position that causes the setting of the STATE_CTP_ERROR flag.

Measured in steps.