Turntables control

When connected via USB, turntable is represented as virtual COM port and use simple text protocol to communicate with PC. To test following commands manually software like PuTTY can be used.

Old turntables (before June 2018)

Command format Description
#sN. Set max speed to N
#aN. Set max acceleration to N
#pN. Move engine N ticks
#e[1,0]. Set engine state (1 - enabled, 0 - disabled)
#i*. Version number
#nN. StepsPerRound
#r*. Infinite rotation
#c*. Stop rotation
#x[0,1]. Set finity (similar to c if 0)
#w[1,0]. Set WiFi enabled
#m*. Return current steps
#vN. Set steps per notify

New turntables (after June 2018)

For compatibility reasons, new turntables are using legacy protocol (described above) by default. To switch to new messages format, send command #l..

PC-to-table commands

These commands are sent from pc to turntable. Turntable will send status message for every command received.



For commands without arguments they must be omitted:

Symbol Contents
# Command begin character
command Command string
: Delimiter
argument Command argument string
. Command end character

Currently only integer arguments are used. For commands where argument is boolean, positive values are true, negative or zero are false.

List of commands

Command Desctiption Argument
GetVersionInfo Returns version string -
GetStepsPerRound Returns amount of steps needed to rotate 360 degrees -
GetMaxAllowedSpeed Returns max speed in steps per second -
GetInitialSpeed Returns speed at which turntable starts rotation -
GetCurrentSteps Returns amount of steps rotated during rotation, 0 if turntable is not rotating at the moment -
GetIsRotating Returns whether turntable is currently rotating -
GetIsCancellationRequested Returns whether turntable is currently stopping rotation -
GetManualRotationModeEnabled Returns whether turntable is in manual speed control mode -
SetSendNewLines Set whether to send line breaks after messages (useful for readability) boolean
SetInitialSpeed Set starting rotation speed number (steps per second)
SetTargetSpeed Set target rotation speed number (steps per second)
SetAcceleration Set acceleration number (steps per second^2)
SetEngineEnabled Enable or disable engine lock boolean
SetStepsPerNotify Set steps interval at which rotation progress notification messages would be sent to PC number (steps count)
SetManualRotationModeEnabled Enable or disable manual rotation mode. Usual commands are disabled in this mode, rotation speed is not controlled by user. boolean
SetSpeedManually Set rotation speed in manual control mode number (steps per second)
RotateSteps Start rotation for desired amount of steps with the set speed and acceleration number (steps count)
RotateInfinite Start infinite rotation boolean (direction, 1 for CW, 0 for CCW)
CancelRotation Start braking -



Table-to-PC messages


Symbol Contents
#command. Command of described previously format.
[ Message begin character
message Message string
] Message begin character

Messages types

Commands status messages:




Commands info messages

... (all commands with "Get" prefix)

Global info messages

The command part is empty in this messages (message does not belong to any particular command and can be sent at any time).

[#.CurrentSteps:100] - sent during rotation if steps per notify not set to zero
[Assertion failed at ...] - internal contract was violated, probably firmware bug


GetVersionInfo returns strings like



"MFTv1" (a bit earlier version, no STEP_MOTOR_DRIVER_TYPE, assume MFT)

Following STEP_MOTOR_DRIVER_TYPE values are currently used, indicating type of the turntable: