Data transfer, function – BECKHOFF KL5121 User Manual
Page 13

Data transfer, function
KL5121
13
Example
Reading register 8 in the BK2000 with a Kl3022 and the end terminal.
If the following bytes are transferred from the controller to the terminal,
Byte0
Control
Byte1
Not used
Byte2
Data OUT, high byte
Byte3
Data OUT, low byte
0x88
0xXX
0xXX
0xXX
the terminal returns the following type designation (0x0BCE corresponds to
the unsigned integer 3022).
Byte0
Status
Byte1
Not used
Byte2
Data IN, high byte
Byte3
Data IN, low byte
0x88
0x00
0x0B
0xCE
A further example
Writing 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,
Byte0
Control
Byte1
Not used
Byte2
Data OUT, high byte
Byte3
Data OUT, low byte
0xDF
0xXX
0x12
0x35
the user code word is set and the terminal returns the register address with
the bit 7 for register access and the acknowledgement.
Byte0
Status
Byte1
Not used
Byte2
Data IN, high byte
Byte3
Data IN, low byte
0x9F
0x00
0x00
0x00
Data transfer, function
Process data
The KL5121 terminal occupies 6 bytes in the coupler’s input process image
and 6 bytes in the output process image. There are two logical channels:
data channel 0 and data channel 1.
Data channel 0
Data channel zero consists of the control byte 0, input data word 0, status
byte 0 and output data word 0. Enables for the output functions are
communicated through channel zero, and status information is read in.
Parameter data can also be accessed.
Controller output data
CT-0: control byte 0
D0-0, D1-0: the terminal’s input data word 0
Controller input data
ST-0: status byte 0
D0-0, D1-0: the terminal’s output data word 0
Control byte 0
Control byte 0 is only used for register access.
MSB
REG=0