-
Notifications
You must be signed in to change notification settings - Fork 6
MSG 0x01: coordinated_segment
Alden Hart edited this page Aug 30, 2020
·
1 revision
This message type specifies a move segment to be clocked out of the core. It uses 64bit words to specify the DDA values, and returns 64bit precision encoder readings.
I/O | Word 1 (Control / Status) | Words 2,4,6,etc. | Words 3,5,7,etc. | |||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
B1 | B2 | B3 | B4 | B5 | B6 | B7 | B8 | B1 | B2 | B3 | B4 | B5 | B6 | B7 | B8 | B1 | B2 | B3 | B4 | B5 | B6 | B7 | B8 | |
CO | 0x01 |
RESERVED |
0bPONM_LKJI |
0bHGFE_DCBA |
dda_ticks |
substep_increment_N |
substep_increment_increment_N |
|||||||||||||||||
CI | Status word is TBD | shaft_encoder_N |
effector_encoder_N |
- CO is the forward SPI channel from the controller to the peripheral (core). CI is the reverse channel.
- Word1 is the 64bit message header, consisting of 8 bytes, MSbyte = B1, LSbyte = B8
- Word1 from CO is the
control word
. Word1 back from the CI is thestatus word
- _N is the number of motor channels configured - making the message length 2xN+1 64bit words
- CO Word1, Byte1 is the message number in the control word
- CO direction bitfield: bit
A
is direction for motor 0; bitP
is direction for motor 15;- Direction is arbitrary - 0 is considered Normal, 1 is Reverse
- CO
dda_ticks
is the segment length in DDA ticks. For example, a value of 16000 at a 16 MHz DDA clock sets a 1 mS segment - CI
shaft_encoder_N
is the absolute, unscaled encoder count for the shaft encoder. If no encoder is present it's absolute step count. - CI
effector_encoder_N
is the absolute, unscaled encoder count for the effector encoder; or zero if no encoder present