Power Brick Controller User Manual
Connections and Software Setup
76
Example:
A 36-bit binary serial encoder with 24 bits of single-turn in the lower fields of serial data register
A, and 12 bits of multi-turn position data in the lower fields of serial data register B.
PowerBrick[
i
].Chan[
j
].SerialEncDataA
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Single-Turn Position Data
PowerBrick[
i
].Chan[
j
].SerialEncDataB
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Multi-Turn Position Data
The single turn data must be shifted 8 bits left first, to make it contiguous with the multi-turn data. This
shift is done using the upper 5 bits of the $aa byte of
Motor[
x
].AbsPosFormat
. The data would then look
like:
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
31 30 29 28 27 26 25 24 23 22 21 20 19 18 17 16 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Motor[
x
].AbsPosFormat = $
Shift data A left 8 bits
Motor[1].pAbsPos = PowerBrick[0].Chan[0].SerialEncDataA.a
Motor[1].AbsPosSf = 1
Motor[1].AbsPosFormat = $81002408
Motor[1].HomeOffset = 0