Register description

The following registers are used for parameterization of the KL3681. They can be read or written via the register communication with the aid of control, status and data bytes.

  • R0: Raw value A/D-C
    Raw value of the A/D converter (XR)
  • R1: Current measuring range / mode
  • R2: Internal calibration value
  • R3: Sampling duration
    In milliseconds
  • R4: Register page selection register
    This register defines which register page is displayed in registers R32 to R63 (default: 0x0000).
    The terminal supports two register pages.
    • Register page 0 is used to save the configuration data (see from register RP0.R32)
    • Register page 1 is used for internal calibration data and manufacturer calibration and must not be changed by the user!
  • R6: Diagnostic register
    The status byte is mapped to the low-order byte (bit 7 to bit 0) of register R6.
    The high-order byte (bit 15 to bit 8) of register R6 is reserved.
  • R7: Command register

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
    An entry of 0X7000 in register R7 sets the following registers for the two channels to the following default values:
    • RP0.R32: 0x2804 (10244dec)
    • RP0.R33: 0x0000 (0dec)
    • RP0.R34: 0x0000 (0dec)
    • RP0.R35: 0x0000 (0dec)
    • RP0.R36, RP0.R38 ... RP0.R62: 0x0000 (0dec)
    • RP0.R37, RP0.R39 ... RP0.R63: 0x2000 (8192dec)
  • R8: Terminal description
    The terminal identifier is contained in register R8: KL3681: 0x0E61 (3681dec).
  • R9: Firmware version
    Register R9 contains the ASCII coding of the terminal's firmware revision level, e.g. 0x3141 (1A)ASCII. '0x31' corresponds to the ASCII character '1' and '0x41' to the ASCII character 'A'. This value cannot be changed.
  • R10: Data length (multiplex shift register)
    R10 contains the number of multiplexed shift registers and their length in bits.
  • R11: Signal channels
    Unlike R10, this contains the number of channels that are logically present. Thus for example a shift register that is physically present can perfectly well consist of several signal channels.
  • R12: Minimum data length
    The particular byte contains the minimum data length for a channel that is to be transferred. If the MSB is set, the control and status byte is not necessarily required for the terminal function and is not transferred to the control, if the Bus Coupler is configured accordingly.
  • R13: Data structure (data type register)

Data type register

Meaning

0x00

Terminal with no valid data type

0x01

Byte array

0x02

Structure: 1 byte, n bytes

0x03

Word array

0x04

Structure: 1 byte, n words

0x05

Double word array

0x06

Structure: 1 byte, n double words

0x07

Structure: 1 byte, 1 double word

0x08

Structure: 1 byte, 1 double word

0x11

Byte array with variable logical channel length

0x12

Structure: 1 byte, n bytes with variable logical channel length (e.g. 60xx)

0x13

Word array with variable logical channel length

0x14

Structure: 1 byte, n words with variable logical channel length

0x15

Double word array with variable logical channel length

0x16

Structure: 1 byte, n double words with variable logical channel length

  • R15: Alignment register
    Via the alignment register bits, the Bus Coupler arranges the address range of an analog terminal such that it starts at a byte boundary.
  • R16: Hardware version number
    Register R16 contains the hardware revision level of the terminal; this value cannot be changed.
  • R29: Terminal type, special version
    The special terminal identifier is contained in register R8: KL3681-0000: 0x0000 (0)dec).
  • R31: Code word register
    • If you write values 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 with each restart of the terminal.

Register page 0

If register page 0 was selected with register R4, registers R32 to R63 have the following meaning.

  • R32: Feature register
    The feature register specifies the terminal's configuration. Default: 0x2804 (10244dec)

Bit

R32.15

R32.14

R32.13

R32.12

R32.11

R32.10

R32.9

R32.8

Name

presentation

enFilter

-

-

enUserCalli

Bit

R32.7

R32.6

R32.5

R32.4

R32.3

R32.2

R32.1

R32.0

Name

frequency

-

-

-

-

enWdTimer

-

-

Bit

Name

Description

Default

R32.15 to
R32.12

presentation

0dec

Left aligned (In left aligned presentation the extended measuring range is not available!)

2dec

1dec

right aligned

2dec

scaled: 1 bit per µV/µA

3dec

reserved

4dec

reserved

5dec

float: Scaled presentation in floating-point format

6dec

reserved

7dec

reserved

R32.12

-

reserved

0bin

R32.11

enFilter

0bin

Filter not active

1bin

1bin

filter active

R32.10

enLimit2

0bin

Threshold 2 is not active

0bin

1bin

Threshold 2 is active

R32.9

enLimit1

0bin

Threshold 1 is not active

0bin

1bin

Threshold 1 is active

R32.8

enUserCalli

0bin

User calibration not active

0bin

1bin

User calibration active

R32.7

frequency

0bin

50 Hz mains frequency

0bin

1bin

60 Hz mains frequency

R32.6

-

reserved

0bin

...

...

...

...

R32.3

-

reserved

0bin

R32.2

enWdTimer

0bin

Watchdog timer is not active

1bin

1bin

Watchdog timer is active (the watchdog is triggered if no process data are received for 100 ms)

R32.1

-

reserved

0bin

R32.0

-

reserved

0bin

  • R33: Zero Comp Interval
  • R36: User scaling, measuring range 300 mV DC, offset
    (Default: 0x0000)
  • R37: User scaling, measuring range 300 mV DC, gain
    (Default: 0x2000)
  • R38: User scaling, measuring range 3 V DC, offset
    (Default: 0x0000)
  • R39: User scaling, measuring range 3 V DC, gain
    (Default: 0x2000)
  • R40: User scaling, measuring range 30 V DC, offset
    (Default: 0x0000)
  • R41: User scaling, measuring range 30 V DC, gain
    (Default: 0x2000)
  • R42: User scaling, measuring range 300 V DC, offset
    (Default: 0x0000)
  • R43: User scaling, measuring range 300 V DC, gain
    (Default: 0x2000)
  • R44: User scaling, measuring range 300 mV AC, offset
    (Default: 0x0000)
  • R45: User scaling, measuring range 300 mV AC, gain
    (Default: 0x2000)
  • R46: User scaling, measuring range 3 V AC, offset
    (Default: 0x0000)
  • R47: User scaling, measuring range 3 V AC, gain
    (Default: 0x2000)
  • R48: User scaling, measuring range 30 V AC, offset
    (Default: 0x0000)
  • R49: User scaling, measuring range 30 V AC, gain
    (Default: 0x2000)
  • R50: User scaling, measuring range 300 V AC, offset
    (Default: 0x0000)
  • R51: User scaling, measuring range 300 V AC, gain
    (Default: 0x2000)
  • R52: User scaling, measuring range 100 mA DC, offset
    (Default: 0x0000)
  • R53: User scaling, measuring range 100 mA DC, gain
    (Default: 0x2000)
  • R54: User scaling, measuring range 1 A DC, offset
    (Default: 0x0000)
  • R55: User scaling, measuring range 1 A DC, gain
    (Default: 0x2000)
  • R56: User scaling, measuring range 10 A DC, offset
    (Default: 0x0000)
  • R57: User scaling, measuring range 10 A DC, gain
    (Default: 0x2000)
  • R58: User scaling, measuring range 100 mA AC, offset
    (Default: 0x0000)
  • R59: User scaling, measuring range 100 mA AC, gain
    (Default: 0x2000)
  • R60: User scaling, measuring range 1 A AC, offset
    (Default: 0x0000)
  • R61: User scaling, measuring range 1 A AC, gain
    (Default: 0x2000)
  • R62: User scaling, measuring range 10 A AC, offset
    (Default: 0x0000)
  • R63: User scaling, measuring range 10 A AC, gain
    (Default: 0x2000)

Register page 1

If register page 1 was selected with register R4, registers R32 to R63 have the following meaning.

  • R32 to R35: Internal calibration data
    These registers contain internal calibration data and must not be changed by the user!
  • R36 to R63: Manufacturer calibration
    These registers are used for manufacturer calibration and must not be changed by the user!