
Access from the user program
KL5101
34
Version: 3.1
Fig. 16: Register mode control byte
The control or status byte occupies the lowest address of a logical channel. The corresponding register
values are located in the following 2 data bytes. (The BK2000 is an exception: here, an unused data byte is
inserted after the control or status byte, and the register value is therefore placed on a word boundary).
Example 1:
Reading register 8 in the BK2000 with a KL5101 and the end terminal:
If the following bytes are transferred from the controller to the terminal,
Byte
Byte 3
Byte 2
Byte 1
Byte 0
Name
DataOUT, low byte
DataOUT, high byte
Not used
Control byte
Value
0xXX
0xXX
0xXX
0x88
the terminal then returns the following type designation (0x0BCE 0x13ED corresponds to the unsigned
integer 5101).
Byte
Byte 3
Byte 2
Byte 1
Byte 0
Name
DataIN, low byte
Data IN, high byte
Not used
Status byte
Value
0xED
0x13
0x00
0x88
Example 2
Writing of register 31 in the BK2000 with an intelligent terminal and the end terminal:
If the following bytes (user code word) are transferred from the controller to the terminal,
Byte
Byte 3
Byte 2
Byte 1
Byte 0
Name
DataOUT, low byte
DataOUT, high byte
Not used
Control byte
Value
0x35
0x12
0xXX
0xDF
the user code word is set and the terminal returns the register address with the bit 7 for register access as
acknowledgement.
Содержание KL5101
Страница 1: ...Documentation KL5101 Incremental encoder interface 3 1 2019 10 14 Version Date...
Страница 2: ......
Страница 4: ...Table of content KL5101 4 Version 3 1...