I own a structured light 3D scanner and I'm interested in building a rotary table controlled by the scanner's software. I couldn't find anything similar on this forum.
The commands sent and received over USB by the software follow this protocol:
General Rotary Communication Protocol
All commands sent to the rotary table are in simple character format including the motor numbers. Only the parts marked as xxx are passed to the table as byte data. For example, if you want table 1 to rotate 4 steps, instead of passing "I1M004" you pass "I1M" + (char)0 + (char)0 + (char)4 In general all commands get a reply in the form of ^XXXXXX.
Request the status of the rotary table. Usual reply would be ^R1R2R3R4 indicating rotary 1 ready, rotary 2 ready, etc. ^B1xxxR2R3R4 means rotary 1 is busy where xxx are 3 bytes indicates how many steps the rotary still has to perform.
Sets the speed of the motor m to xxx, where xxx is a 3 bytes of data indicating the speed. Example code: port.Write("S1M" + (char)0 + (char)6 + (char)255); // set motor 1 to speed 1791. The standard speed range of our rotary table is: 0x000001 to 0x0012FF (1 to 4863). Controller will respond with ^mxx mirroring the motor number and 2 last bytes of speed setting.
Turns motor m xxx number of steps. Controller will acknowledge with ^Bmxxx.
Set motor number m to rotate clockwise. Each consecutive command to rotate the motor m will rotate it clockwise.
Sets rotary m to rotate counterclockwise.
Rotary m stop.
Rotary Sample Command Sequence
Motor numbers are passed as characters but the number of steps and speed are passed as 3 bytes of binary for simplicity.
send: V reply: ^R1R2R3R4 send: S1M1791 reply: ^191 send: D1CWLO reply: ^ send: I1M100 reply: ^B1100