Terminal-specific register description – BECKHOFF KL6001 User Manual
Page 11
Register description
KL6001
11
Terminal-specific register description
Process variables
R0: Number of data bytes in the send FIFO
The number of data items in the send FIFO is in the low byte. The high
byte is not used.
R1: Number of data bytes in the receive FIFO
The low byte contains the number of data in the receive FIFO. The high
byte is not used.
R2 - R5: no function
R6: Diagnostic register
High byte: not used
Low byte: status of the receive channel (bits 0 – 7)
Bit No.
Meaning
Bit 0
1
The receive buffer has overflown and arriving
data is lost.
Bit 1
1
Parity error has occurred.
Bit 2
1
Framing error has occurred.
Bit 3
1
Over run error has occurred.
Bit 4
1
Buffer is full
Bits 5 - 15
-
not used, don't change
Manufacturer parameters
R18: Buffer size
[0x0080]
Register R18 defines the number of data items in the receive FIFO as from
which the BUF_F bit is set in the status byte.
Low byte: BUF_F is set in the status if this value is reached.
High byte: not used
User parameters
R32: Baud rate:
[0x0006]
Bit No.
Baud rate
Bit 2 Bit 1 Bit 0
0 1 1
1200 Baud
1 0 0
2400 Baud
1 0 1
4800 Baud
1 1 0
9600 Baud [1 1 0]
1 1 1
19200 Baud
Bits 3 - 15
-
not used, don't change
The baud rate can also be set in accordance with the following equation:
Baud rate = 4 MHz/(16*(HB+1))
At the same time, 0xFF must be written into the low byte and the high byte
(HB) specifies the operator.