Access from the user program
KL6001
34
Version: 3.0.0
Example 2
Writing of register 31 in the BK2000 with an intelligent terminal and the end terminal:
If the following bytes (user codeword) are transferred from the controller to the terminal,
Byte
Byte0
Byte1
Byte2
Byte3
Name
Control
Not used
Data out, high byte
Data out, low byte
Value
0xDF
0xXX
0x12
0x35
the user code word is set and the terminal returns the register address with the bit 7 for register access as
acknowledgement.
Byte
Byte0
Byte1
Byte2
Data3
Name
State
Not used
Data in, high byte
Data in, low byte
Value
0x9F
0x00
0x00
0x00
5.6
Data exchange, function
Control Byte for process data exchange
The control byte is transmitted from the terminal to the controller. It can be used in register mode (REG = 1)
or in process data exchange (REG = 0) (see note in the annex). For setting up data exchange (handshake),
the control and the status byte are used in process data exchange.
MSB
REG=0
OL2
OL1
OL0
0
IR
RA
TR
Status byte in process data mode
The status byte is transmitted from the terminal to the controller. It contains the data required for handshake.
MSB
REG=0
IL2
IL1
IL0
BUF_F
IA
RR
TA
TR/TA: TRANSMIT-REQUEST/TRANSMIT-ACCEPTED bits
The handshake for data transmission is provided via this bit. A change of state in TR causes the data set
defined via OL0-OL2 (5 bytes maximum) to be loaded into the transmission FIFO. The terminal signals
execution of this instruction via TA.