Set Motor Speed
SET_MOTOR_SPEED · V4.23Set the current-task speed override for the selected independent motor. Subsequent runs use the effective task speed; this instruction does not start the motor.
Hexadecimal notation is used for IDs, indexes, modes and sentinel values where applicable. Physical quantities (such as pulses, milliseconds and pulse/s) remain in their native units. Macro names are shown only when defined by the firmware.
Input parameters
| Parameter | Initial value | Meaning |
|---|---|---|
Motor IDmotor_index | 0x04U (M4) | M4–M7 in interpolation mode; M0–M7 in independent-motor mode. M0–M7 encode IDs 0x00U–0x07U. |
Motor ratespeed_hz | Use Current (CURRENT) | Selected independent-motor rate: CURRENT, DEFAULT or 1–64000 Hz. |
Initial values are editor defaults for a newly inserted instruction; configure them for the actual machine.
Execution and usage
- Parameters accept CURRENT (keep the current value), DEFAULT (clear this task override and use the saved system default), or an explicit number. Task parameters do not write machine Flash; called functions use the caller task parameter context.
- Select M4–M7 in interpolation mode or M0–M7 in independent-motor mode. Explicit rates are 1–64000 Hz; actual operation also depends on machine settings and mode.