User manual

Brick Controller User Manual
PinOuts and Software Setup 80
Absolute Power-On Position Read (Technique 2)
With technique 2, the absolute power-on position can be read directly from the serial data registers. But,
proper scaling (5-bit right shift, in a PLC) is required to conform to the unshifted on-going position.
Example 1: Channel 1 driving a 37-bit (25-bit single turn, 12-bit multi-turn) rotary serial encoder:
I180=0 ; Absolute power-on read disabled
I110=$78B20 ; Absolute power-on position address (ch1 serial data register A)
I195=$A50000 ; Parallel Read, 37 bits, Signed, from Y-Register User Input
Bit 23: =1 Signed
=0 Unsigned
1 0 1 0 0 1 0 1
Bit 22: =1 X-Register
=0 Y-Register
Bits16-21: Number of Bits to read
(Resolution 37 bits or 100101 )
Ixx95
Binary:
Hex($): A 5
0 0 0 0 0 0 0 0
0 0
0 0 0 0 0 0 0 0
0 0
Bits 0-15: reserved
(always 0)
In this mode, PMAC reads 37 bits from the consecutive serial data registers:
Serial Register A
(Ch1 Y:$78B20)
Serial Register B
(Ch1 Y:$78B21)
37 bits
02347
With the setting of Ixx80=0, the actual position is not reported automatically on power-up. It will be
reported after scaling (i.e. in PLC, below).
Example 2: Channel 1 driving a 25-bit (25-bit Singleturn, No Multiturn) absolute rotary serial encoder,
or a similar protocol resolution (25 bits) linear scale:
I180=0 ; Absolute power-on read disabled
I110=$78B20 ; Absolute power-on position address (ch1 serial data register A)
I195=$190000 ; Parallel Read, 25 bits, Unsigned, from Y-Register User Input
Bit 23: =1 Signed
=0 Unsigned
0 0 0 1 1 0 0 1
Bit 22: =1 X-Register
=0 Y-Register
Bits16-21: Number of Bits to read
(Resolution 25 bits or 011001 )
Ixx95
Binary:
Hex($): 1 9
0 0 0 0 0 0 0 0
0 0
0 0 0 0 0 0 0 0
0 0
Bits 0-15: reserved
(always 0)
In this mode, PMAC reads 25 bits from the first serial data register:
Serial Data Register A
(Ch1 Y:$78B20)
Serial Data Register B
(Ch1 Y:$78B21)
25 bits
02347
With the setting of Ixx80=0, the actual position is not reported automatically on power-up. It will be
reported after scaling (i.e. in PLC, below).