KL3132, KL3142, KL3152, KL3162, KL3172, KL3182 - Register Description

BECKHOFF KL31x2

 
BECKHOFF KL3132, KL3142, KL3152, KL3162, KL3172, KL3182: Access from the user program

Register Description

The registers are used for the parameterization of the bus terminals and exist once for each channel. They can be read or written via register communication.

R0: Raw ADC value

Register R0 contains the raw value of the analog/digital converter. This is the unchanged analog value prior to any scaling.

R1: Calibration value - offset

After a calibration, the offset value that was determined is entered in register R1 and used for the correction calculation.

R2: Calibration value - gain

After a calibration, the gain value that was determined is entered in register R2 and used for the correction calculation.

R6: Diagnostic register

Status byte SB is placed into register R6.

R7: Command register

Note For a command 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 factory settings for the following registers of both channels:

KL3162, KL3172, KL3142, KL3152:

R32: 0x0180 (384dec)
R33: 0x0000 (0dec)
R34: 0x0100 (256dec)
R35: 0x0000 (0dec)
R36: 0x0000 (0dec)
R37: 0x35C0 (13760dec)
R40: 0x0708 (1800dec)
R44: 0x0003 (3dec)
R47: 0x0032 (50dec)
R48: 0x0005 (5dec)

KL3132, KL3182:

R32: 0x0182 (386dec)
R33: 0x0000 (0dec)
R34: 0x0100 (256dec)
R35: 0x0000 (0dec)
R36: 0x0000 (0dec)
R37: 0x35C0 (13760dec)
R40: 0x0708 (1800dec)
R44: 0x0003 (3dec)
R47: 0x0032 (50dec)
R48: 0x0005 (5dec)

Note The Restore Factory Settings command resets both channels in the terminal to the factory settings simultaneously, regardless of which register set it is called from!

R8: Terminal description

The description of the terminal is contained in register R8.
KL3172: 0x0C64 (3172dec)
KL3182: 0x0C6E (3182dec)
KL3132: 0xC3C (3132dec)
KL3162: 0xC5A (3162dec)
KL3142: 0xC46 (3142dec)
KL3152: 0xC50 (3152dec)

R9: Firmware revision level

Register R9 contains the ASCII coding of the terminal's firmware revision level, e.g. 0x3141 = '1A'. The '0x31' corresponds here to the ASCII character '1', while the '0x41' represents the ASCII character 'A'. This value can not be changed.

R12: Minimum data length of one channel

Bit 0 to 6 of the most significant byte show the minimum number of output data in bit: 000.0000bin = 0dec so 0 Byte.

Bit 0 to 6 of the least significant byte show the minimum number of output data in bit: 001.1000bin = 24dec so 3 Byte.
That bit 7 is set shows, that control and status byte are not mandatory for terminal operation and are not transmitted in compact mode.

R16: Hardware version number

Register R16 contains the hardware version of the terminal.

R17: Manufacturer compensation - offset

This register contains the offset of the manufacturer compensation (16 bit signed integer).

R18: Manufacturer compensation - gain

This register contains the gain of the manufacturer compensation (16 bit unsigned integer x 2-16 + 1). Examples:
0x0000 means factor 1
0xFFFF means factor 2

R19: Manufacturer scaling - offset:

This register contains the offset of the manufacturer scaling. It can be activated by R32.1 in the feature register (16 bit signed integer).

R20: Manufacturer scaling - gain:

This register contains the gain of the manufacturer scaling. It can be activated by R32.1 in the feature register (16 bit unsigned integer x 2-8 + 1). Examples:
0x0100 means factor 1.
0x0080 means factor 0,5

R21: Upper measuring range limit

This register contains the upper measuring range limit. It can be activated by R32.8 in the feature register.

R22: Lower measuring range limit

This register contains the lower measuring range limit. It can be activated by R32.8 in the feature register.

R23: Reference calibration value: offset

This register contains the reference value of the calibration, which is determined during the manufacturer compensation.

R24: Reference calibration value: gain

This register contains the reference value of the calibration, which is determined during the manufacturer compensation.

R31: Code word register

  • If you write into the user registers without first entering the user code word (0x1235) into the code word register, the terminal will not accept the supplied data.
  • If you write values into the user registers and have previously entered the user code word (0x1235) in the code word register, these values are stored in the RAM registers and in the SEEPROM registers and are therefore retained if the terminal is restarted.

The code word is reset if the terminal is restarted.

R32: Feature register

The feature register specifies the terminal's configuration.

Bit R32.15 R32.14 R32.13 R32.12 R32.11 R32.10 R32.9 R32.8
Name - - - - disChannel enTh2 enTh1 enOverProt
Bit R32.7 R32.6 R32.5 R32.4 R32.3 R32.2 R32.1 R32.0
Name enStable disDiffMeasure disCali enSiemensFormat enAverageFormat disWdTimer enManScal enUsrScal
Key
Bit Name Description default
R32.15 - reserved 0bin
... ... ... ...
R32.12 - reserved 0bin
R32.11 disChannel 0bin Channel enabled 0bin
1bin Channel disabled
R32.10 enTh2 0bin Threshold 2 not active 0bin
1bin Threshold 2 active
R32.9 enTh1 0bin Threshold 1 not active 0bin
1bin Threshold 1 active
R32.8 enOverProt 0bin Measuring range limitation not active 1bin
1bin Measuring range limitation active
R32.7 enStable 0bin Calibration value stabilization not active 1bin
1bin Calibration value stabilization active
R32.6 disDiffMeasure 0bin Differential measurement active 0bin
1bin Differential measurement not active (only KL3132, KL3162, KL3172, KL3182)
R32.5 disCali 0bin Cyclic calibration of the A/D converter is active 0bin
1bin Cyclic calibration of the A/D converter is not active
R32.4 enSiemensFormat 0bin Siemens output format not active 0bin
1bin Siemens output format active
R32.3 enAverageFormat 0bin Signed amount representation not active 0bin
1bin Signed amount representation active
R32.2 disWdTimer 0bin Watchdog timer is active (the watchdog will trigger if no process data is received for 100 ms) 0bin
1bin Watchdog timer is not active
R32.1 enManScal 0bin Manufacturer scaling is not active KL3162, KL3172, KL3142, KL3152 0bin
1bin Manufacturer scaling is active KL3132, KL3182: 1bin
R32.0 enUsrScal 0bin User scaling is not active 0bin
1bin User scaling is active

R33: User scaling - offset

This register contains the offset of the user scaling. User scaling can be activated through bit R32.0 in the feature register (16 bit signed integer).

R34: User scaling - gain

This register contains the gain of the user scaling. User scaling can be activated through bit R32.0 in the feature register (16 bit unsigned integer x 2-8 + 1, 1dec corresponds to 0x0100).

R35: Threshold 1

Threshold 1 is entered in register R35. The threshold can be activated through bit R32.9 in the feature register.

R36: Threshold 2

Threshold 2 is entered in register R36. The threshold can be activated through bit R32.10 in the feature register.

R37: Filter constants of the A/D converter, and configuration bits for the filter

(Default value: 35C0hex)

The terminal possesses two low-pass filter stages:

  • The first stage consists of a sinc³ filter, and is always active.
  • The second stage consists of a 22nd order FIR filter. This can be deactivated.
Bit 15 14 13 12 11 10 9 8 7 6 5 4 3 2 1 0
Name Filter constants SF (SF.11 to SF.0) Zero Zero  SkipFIR Fast
Key
Bit Name Description default
R37.15 Filter constants SF
(SF.11 - SF.0)

The filter constant SF specifies the 3dB limit frequency of the sinc3 filter. The value ranges from 150 to 2047.
The 3 dB limit frequency Flimit and the 64.5 dB stop frequency Fstop are calculated as follows:

Skip = 0 Flimit = 11981 / SF
Fstop = 43008 / SF
Skip = 1 Flimit = 80486 / SF
35Chex

(860dec)

...
R37.4
R37.3 Zero     0bin
Warning Bits R37.2 and R37.3 must always be Zero, otherwise errors will occur in the A/D converter!
0bin
R37.2 Zero     0bin 0bin
R37.1 SkipFIR 0bin FIR filter is active. 0bin
1bin FIR filter is bypassed.
R37.0 Fast 0bin Fast Step Mode is not active. 0bin
1bin Fast Step Mode is active: a fast reaction will follow jumps at the input, in spite of the filter stage being active. In this case the filter is bypassed!
Examples
Value in R37 Fstop cycle time
0x35C0 50 Hz 140 ms
0x2660 70 Hz 100 ms
0x1330 140 Hz 50 ms
0x7FF1   40 ms
0x3FF1   20 ms
0x1001   <4 ms
Value in R37 Flimit cycle time
0x7FF2 39,6 Hz 40 ms
0x3FF2 77,36 Hz 20 ms
0x1002 158 Hz <4 ms

R40: Calibration interval

This register contains the calibration interval for the terminal's automatic calibration. The unit is 100 ms. The automatic calibration can be activated through bit R32.5 in the feature register.

R44: Forced calibration interval

This register contains the interval for the terminal's forced calibration. This interval is always a multiple (the default is 3dec) of the calibration interval. (R40). The interval for forced calibration when the terminal leaves the factory is therefore 3 x 180 s = 540 s. The forced calibration can be activated through bit R32.5 in the feature register.

R47: Number of stable measured values

This register contains the number of stable measured values recorded during the calibration.

R48: Tolerance for measured value stability

This register contains the specified stable measured value tolerance.