Run the motor with serial command - makerbase-mks/MKS-SERVO42C GitHub Wiki
Applicable to MKS-SERVO42C-V1.1
Configure the motor
-
In the SERVO42C menu settings, enable the serial port direct control function.
-
Configure the baudrate to 38400, as shown below.
-
Configure the Uart Assistant
Select the Channel;
Set the Baudrate to 38400, Must be equal to motor baudrate)
Recv Options: select “HEX”. Tick word wrap
Send Options: select “HEX”.Check Automatically send additional as, select the calibration algorithm as CHECKSUM-8.
As shown below:
Read the real-time position of the motor
Send e0 36(e0 36 16 after additional calibration bits), read the real-time position of the closed-loop motor
return E0 FF FF F0 07 D5
As shown below:
Run the motor forward/reverse
Send e0 f6 10 (e0 f6 10 e6 after additional calibration bits)
return E0 01 E1
The motor rotates forward in speed 16.
As shown below:
Send e0 f6 90 (e0 f6 90 66 after additional calibration bits)
return E0 01 E1
The motor rotates reverse in speed 16.
As shown below: