Datum DX4 Using Absolute Encoder

Datum DX4 Using Absolute Encoder

To get the full 39 bit absolute position, you need to do a couple of reads and then combine the values.

Key COE objects:

$30A6:00             Multipos
$3044:00             Rotation Pulses

So you should read the multipos counts and multiply them by the number of bits per turn, which is 23 bits, then add to the pulse position in one turn.

CO_READ_AXIS(axis_number, $30A6, 0, 4, 20) ' read multipos to VR(20)
CO_READ_AXIS(axis_number, $3044, 0, 4, 21) ' read single turn value to VR(21)

abs_position = VR(21) + VR(20) * 2^23
DEFPOS(abs_position)