https://florianmuller.com/quickly-resize-and-shrink-raspberry-pi-sd-card-image-on-macos


Line format:

line:
<len> 4 x <move> <checksum>

move:
<cmd><distance><speed>

ramp;
<cmd><distance><acceleration>

get queue state:
<cmd>

cmd line len for 4 motors:
command : 1+4 x 5 + 1 = 22 bytes
response : 1+4+1 = 6 bytes

get state for 4 motors:
command: 1 + 4 + 1 = 6 bytes (3 for 1 motor)
response: 1 + 4 * 2 + 1 = 10 bytes (6 for 1 motor)

so:

2 x 16 = 32 bytes to check queue state (2x9 = 18 for 1 motor)

28 bytes to command four motors

28 (18) + 32 =    60 (50) bytes / update motor speed/pos 

9600 baud = 960 char/sec => 16 updates / sec
960 / 50 = 19.2 updates / sec 

improvements possible:
use one command to send all motor deltas with only 8 bits
one command to query all queue statuses


single command to check all queue states:
3 (for command) + 3 for response = 6 bytes / query = 12 bytes sustainable 
move commands:
1 + 1 + 4 x 2 + 1 (for command) + 3 (for response) =  14 bytes sustainalbe

26 bytes / update => 36.9 updates / sec

tightest possible:

xon/xoff control: 2 bytes
12 bytes for update 

14 bytes/update => 68.6 updates/sec


motor speed 2000 step/sec
motor 200 step/r 
=> 10 r/sec 
15 mm pulley = 50 mm / r 

=> 500 mm / sec

500 mm / 16 => 30 mm/update at full speed
500 mm / 60 => 10 mm/update at full speed

estimated maximum necessary plasma cutting speed for 1 mm plate aluminium

18000 mm /min = 300 mm sec

0.5 mm resolution means 0.5/300 sec time resolution ~ 1.6 msec / update

64 mm / sec / 16 update/sec => 0.25 mm resolution










