Description:
Read settings of joystick. If joystick position is outside DeadZone limits from the central position a movement with speed, defined by
the joystick DeadZone edge to 100% deviation, begins. Joystick positions inside DeadZone limits correspond to zero speed (soft stop of
motion) and positions beyond Low and High limits correspond MaxSpeed [i] or -MaxSpeed [i] (see command SCTL), where i = 0 by
default and can be changed with left/right buttons (see command SCTL). If next speed in list is zero (both integer and microstep
parts), the button press is ignored. First speed in list shouldn't be zero. The DeadZone ranges are illustrated on the following picture.
The relationship between the deviation and the rate is exponential, allowing no switching speed combine high mobility and accuracy.
The following picture illustrates this:
The nonlinearity parameter is adjustable. Setting it to zero makes deviation/speed relation linear.
Command SCTP
result_t set_ctp_settings (device_t id, const ctp_settings_t* ctp_settings)
Command code (CMD): "sctp" or 0x70746373.
Request: (18 bytes)
INT32U CMD Command
INT8U CTPMinError
Minimum contrast steps from step motor encoder position, wich set STATE_CTP_ERROR flag. Measured in steps
step motor.
INT8U CTPFlags Flags.
0x01 - CTP_ENABLED (Position control is enabled, if flag set.)
0x02 - CTP_BASE (Position control is based on revolution sensor, if this flag is set; otherwise it is based on
encoder.)
0x04 - CTP_ALARM_ON_ERROR (Set ALARM on mismatch, if flag set.)
0x08 - REV_SENS_INV (Sensor is active when it 0 and invert makes active level 1. That is, if you do not invert,
it is normal logic - 0 is the activation.)
0x10 - CTP_ERROR_CORRECTION (Correct errors which appear when slippage if the flag is set. It works only
with the encoder. Incompatible with flag CTP_ALARM_ON_ERROR.)
INT8U
Reserved
[10]
Reserved (10 bytes)
INT16U CRC Checksum
Answer: (4 bytes)
INT32U CMD Command (answer)
Description:
Set settings of control position(is only used with stepper motor). When controlling the step motor with 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 (flag CTP_ENABLED), the controller stores the current position in the footsteps of SM and
the current position of the encoder. Further, at each step of the position encoder is converted into steps and if the difference is greater
CTPMinError, a flag STATE_CTP_ERROR. When controlling the step motor with speed sensor (CTP_BASE 1), the position is controlled by
him. The active edge of input clock controller stores the current value of steps. Further, at each turn checks how many steps shifted.
When a mismatch CTPMinError a flag STATE_CTP_ERROR.
Command GCTP
result_t get_ctp_settings (device_t id, ctp_settings_t* ctp_settings)
Command code (CMD): "gctp" or 0x70746367.
Request: (4 bytes)
INT32U CMD Command
Answer: (18 bytes)