Driver support bipolar stepper motors for 3 axes. They are named A/B/C and usually have defined function:
$S- Return version string
Command returns version string concentrated into single line [
EVB.1.0.2, SCF4-M RevB, Kurokesu, 5DDFF39-3739584E-xxxxxxxx] received information is comma separated:
EVB.1.0.2- Module firmware version
SCF4-M RevB- Module PCB revision
Kurokesu- Manufacturer Brand
5DDFF39-3739584E-xxxxxxxx- Unique serial number
G0- Rapid positioning
The main motor drive command. It moves motor specified number steps. Any or all axes can be specified at the same time. Minimal step size is 1.
G0 command replies as soon as the command is parsed and does not wait until motors stop.
G0 A100] - drives A-axis 100 steps
G0 A-100] - drives A-axis -100 steps
G0 A100 B-100 C1000] - drives all three axes by specified step count
Instructs controller to delay (stall) defined interval in milliseconds [ms]. This is an only command which sends response not after parsing command but after prolonged execution time. During this time command parser is blocked and the only way to complete this command is to wait until it finishes.
G90- Relative coordiantes
Switch to relative coordinate programming mode. Motors can be instructed to turn positive or negative 0 ~ 65535 steps (16-bits). When the counter exceeds this range, it will overflow. And will not affect motor movement.
G91- Absolute coordiantes
Switch to absolute coordinate programming mode. In this mode, the range is limited by the internal 16-bit motor register and can be operated in a range of 0 ~ 65535.
G92- Set position
The controller sets an internal counter to the specified value.
G92 A0] - Set A axis counter to 0
G92 A100] - Set A axis counter to 100
G92 A100 B1000 C200] - Set all axis counters to specified counter values
M0- Compulsory stop
If the controller is not in G4 delay mode it will instruct motors to stop moving
M8- Infrared filter switch commands
Instructs controller to shift filter one of two fixed positions
M231- normal / forced move
M0or reset command is issued. PIN_x is connected to internal 12bit Analog to Digital Converter (ADC), lower and upper thresholds can be controlled with
M232- Set PI low/high detection voltage
Set 12bit comparator values for limit switch detection inputs. Upper voltage is 3.3V, lower - 0V
M232 A1242 E2483] - If the input voltage is below ~1V - set flag to
0. If the value is above ~2V, set flag to
1. Everything in between - is hysteresis and does not change the flag. Used to debounce and filter the input signal
M234- Set motor and DN drive current
Sets motor and coil drive current. Expects 8-bit value.
M234 A120 B120 C120 D80] - Set A, B, C stepper motors strength to 120 and IR filter driver to 80
M235- Set motor idle current
When motors are not moving, idle current can be reduced to eliminate heating and save energy. It is not advised to completely turn off motors as the driver can lose micro-step holding position
M234 A50 B50 C50] - Sets A/B/C motors holding current to value 50
M239- control output pins
Opto-interrupter LEDs can be controlled by connecting them to PIS_AB and PIS_C pins. They can stay in either state, but some lenses in IR mode can leak light into the sensor so after referencing/calibration procedure is complete it is advised to switch them off
M240- Set motor drive speed
Each motor can drive at different speeds. Speed is 16-bit register. Register specifies internal timing interval, the lower value is the faster pulse rate will be.
M240 A800 B800 C1200] - Set motion speeds for each axis to corsponding value
M244- advanced timing registers
!1- Return status
Command returns 9 values indicating:
4000, 20000, 0, 0, 0, 0, 0, 0] - example output
A Motor position counter
B Motor position counter
C Motor position counter
A Limit switch status
B Limit switch status
C Limit switch status
A Moving status
B Moving status
C Moving status