Register description

All registers can be read or written via register communication. They are used for parameterizing the terminals.

R0: Number of data bytes in the send buffer

R0 contains the number of data in the transmission FIFO.

R1: Number of data bytes in the receive buffer

R0 contains the number of data in the receive FIFO.

R6: Diagnostic register

Bit

Description

default

R6.15 … R6.5

-

reserved

-

R6.4

1bin

Buffer is full

0bin

R6.3

1bin

An overrun error has occurred

0bin

R6.2

1bin

A framing error has occurred

0bin

R6.1

1bin

A parity error has occurred

0bin

R6.0

1bin

The receive buffer has overflowed, incoming data is lost

0bin

R7: Command register

Register description 1:

User code word

For the following commands to be executed, it is first necessary for the user code word, 0x1235, to be entered into register R31!

Command 0x7000: Restore Factory Settings

Entering 0x7000 in register R7 restores the delivery state for the following registers.

R18: 0x0400
R32: 0x0006
R33: 0x0003
R34: 0x0181
R35: 0x0017

R8: Terminal type

The terminal name is contained in register R8:
KL6031: 0x178F (6031dec)
KL6041: 0x1799 (6041dec)

R9: Firmware version

Register R9 contains the ASCII coding of the terminal's firmware version, e.g. 0x3143 = '1C'. The '0x31' corresponds here to the ASCII character '1', while the '0x43' represents the ASCII character 'C'.
This value cannot be changed.

R16: Hardware version number

Register R16 contains the hardware version of the terminal.

R18: Buffer full

Register R18 defines the number of data in the input FIFO from which the BUF_F bit is set in the Status word

R31-R35: User registers

R31: Code word register

The code word is reset when the terminal is restarted.

R32: Bit/s rate

R32 defines the bit/s rate of the terminal. The delivery state is 9600 bit/s.

Bit 15 … 4

Bit 3

Bit 2

Bit 1

Bit 0

Baud rate

reserved

1

0

1

0

115200 bit/s

reserved

1

0

0

1

57600 bit/s

reserved

1

0

0

0

38400 bit/s

reserved

0

1

1

1

19200 bit/s

reserved

0

1

1

0

9600 bit/s (default)

reserved

0

1

0

1

4800 bit/s

R33: Data Frame

R33 defines the setting of the data format. The delivery state is 8 data bits, no parity.

Bit 15 … 4

Bit 3

Bit 2

Bit 1

Bit 0

Meaning

reserved

0bin: 1 stop bit; 1bin: 2 stop bits

1

0

1

8 data bits, odd parity

reserved

0bin: 1 stop bit; 1bin: 2 stop bits

1

0

0

8 data bits, even parity

reserved

0bin: 1 stop bit; 1bin: 2 stop bits

0

1

1

8 data bits, no parity (default)

reserved

0bin: 1 stop bit; 1bin: 2 stop bits

0

1

0

7 data bits, odd parity

reserved

0bin: 1 stop bit; 1bin: 2 stop bits

0

0

1

7 data bits, even parity

R34: Feature register

R34 defines the operation mode of the terminal.

Bit

Description of the operation mode

default

R34.15 … R34.9

-

reserved

-

R34.8

0bin

No transfer rate optimization
The data are immediately placed on the bus.

1bin

1bin

Transfer rate optimization
After receipt of a byte, the system waits for max. 4 ms for a further byte. If the receive buffer is full, the data are immediately placed on the bus.

R34.7

0bin

Small and medium process data image
3 or 5 bytes of user data (setting in R35) can be transferred.

1bin

1bin

Extended process data image
Up to 22 bytes of user data (setting in R35) can be transferred.
(Compatible couplers: BCxx50, BXxxxx, CXxxxx, BKxx20, BKxx50, BKxx50)

R34.6

0bin

Direct transmission from the FIFO
The buffer contents are transmitted immediately.

0bin

1bin

Continuous transmission from the FIFO
The send buffer is filled (up to 128 bytes) by the controller. The filled buffer contents will be transmitted on the rising edge of the bit "Control Byte (Word), Bit 3" (CB.3, CW.3). Once the data have been transferred, the terminal confirms this to the controller by setting the bit "Status Byte (Word), Bit 2" (SB.2, SW.2). SB.2 (SW.2) is canceled with CB3 (CW.3).

R34.5

0bin

KL6031:

reserved

-

KL6041:

Point to point connection disabled

0bin

1bin

KL6031:

reserved

-

KL6041:

Point to point connection enabled

-

R34.4

0bin

No support for the XON/XOFF protocol when receiving data

0bin

1bin

Support for the XON/XOFF protocol when receiving data
The terminal sends the control character XOFF when the terminal buffer contains 1014 characters. XON is sent if XOFF was sent previously and the value falls below the lower buffer limit of 18 bytes.

R34.3

0bin

No support for the XON/XOFF protocol when transmitting data

0bin

1bin

Support for the XON/XOFF protocol when transmitting data
The terminal transmits the data transferred by the controller until it receives from the controller the sign XOFF (DC3ASCII == 0x13) from the partner. Thereafter, transmission is prevented until the sign (DC1ASCII == 0x11) is received.

R34.2

0bin

No delayed Status byte

0bin

1bin

Delayed Status byte
The Status byte is copied by the terminal into the shift register of the K-bus one cycle later than the higher-value data bytes. This reduces the rate of data transmission to the controller.

R34.1

0bin

Standard output format (note R35!)

0bin

1bin

Alternative output format
In the alternative output format, 4 or 5 bytes (3 bytes for data and 1 or 2 control/status byte(s)) are mapped in the Bus Coupler.

R34.0

0bin

KL6031:

RTS, CTS deactivated

-

KL6041:

Full duplex

0bin

1bin

KL6031:

RTS, CTS activated

1bin

KL6041:

Half duplex

-

R35: Number of data bytes mapped in the Bus Coupler

R35 defines the number of data bytes mapped in the Bus Coupler.

Bit 15 … 15

Bit 4

Bit 3

Bit 2

Bit 1

Bit 0

Data bytes

reserved

1

0

1

1

1

22 bytes + 1 Control/Status word in the extended process data image (see R34.7)

reserved

0

0

1

1

0

5 bytes + 1 Control/Status byte

reserved

0

0

0

1

1

3 bytes + 1 Control/Status byte

R36 - 63: reserved