beautypg.com

Control/status byte, Register communication kl4112 – BECKHOFF KL4112 User Manual

Page 12

background image

Register description

12

KL4112

R35: User activation value
16 bit signed Integer [0x0000]
If the user activation value in R32 is activated, this value is applied to the
output of the terminal after a system reset or a watchdog timer overlow
(terminal has not received any process date for 100ms).

Control/Status byte

CONTROL byte
in process data transfer
Gain and offset adjustment

The control byte is transferred from the controller to the terminal. It can be
used in the register mode (REG = 1) or in process data transfer (REG = 0).
The gain and offset of the terminal can be adjusted with the control byte
(process data transfer).The code word must be entered in R31 to enable
adjustment of the terminal. The terminal’s gain and offset can then be ad-
justed.

The parameters are not permanently stored until the code word is reset!

Control byte:

Bit7 = 0

Bit6 = 1 Terminal adjustment function is active

Bit4 = 1 gain adjustment

Bit2 = 0 slow clock = 1000ms

1 fast clock = 50ms

Bit1 = 1 up

Bit0 = 1 down

Bit3 = 1 offset adjustment

Bit2 = 0 slow clock = 1000ms

1 fast clock = 50ms

Bit1 = 1 up

Bit0 = 1 down

STATUS byte
in process data transfer

The status byte is transferred from the terminal to the controller. In the
case of the KL4112, the status byte has no function in process data trans-
fer.



Register communication KL4112

Register access via
process data transfer
Bit 7=1: register mode

When bit 7 of the control byte is set, the first two bytes of the user data are
not used for process data transfer, but are written into or read out of the
terminal’s register.

Bit 6=0: read
Bit 6=1: write

In bit 6 of the control byte, you define whether a register is to be read or
written. When bit 6 is not set, a register is read without modification. The
value can be taken from the input process image.

When bit 6 is set, the user data is written into a register. The operation is
concluded as soon as the status byte in the input process image has supp-
lied an acknowledgement (see examples).

Bits 0 to 5: address

The address of the register to be addressed is entered in bits 0 to 5 of the
control byte.