Register description
The registers can be read or written via the register communication. They are used for the parameterization of the terminal.
R0 to R7: Registers in the internal RAM of the terminal
The process variables can be used in addition to the actual process image. Their function is specific to the terminal.
- R0, R1: no function
- R2 cycle duration
In PWM mode, you can specify the cycle duration for ongoing operation. Following a power-on reset, the cycle duration is taken from R35 (cycle duration for PWM mode). - PWMH mode, Cnt-Cnt PWM mode:
- 1 digit corresponds to 1 µs
- Example: 250 Hz => 4000 μs = 0xFA0
- 4 KHz => 250 μs = 0xFA
- PWML mode, Frq-Cnt PWM mode, Frq-Cnt pulse mode:
- 1 digit corresponds to 8 µs
- Example: 2 Hz => 500 ms = 0xF424
- 200 Hz => 5 ms = 0x271
- R3 base frequency
In PWM mode the base frequency can be specified here. [R/W]
1 digit corresponds to 1 Hz
- R4: Reserved
- R5: PWM raw value
The raw value of the processor PWM unit is stored in this register. This value can be used to calculate the maximum resolution at a specified frequency.
- R6: Diagnostic register
not used
- R7: Command register
High-Byte_Write = function parameter
Low-Byte_Write = function number
High-Byte_Read = function result
Low-Byte_Read = function number
R8 to R15: Registers in the internal ROM of the terminal
The type and system parameters are hard programmed by the manufacturer, and the user can read them but cannot change them.
- R8: Terminal type
The terminal type in register R8 is needed to identify the terminal.
- R9: Software version (X.y)
The software version can be read as a string of ASCII characters.
- R10: Data length
R10 contains the number of multiplexed shift registers and their length in bits.
The Bus Coupler sees this structure.
- R11: Signal channels
Related to 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 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 |
- R14: reserved
- R15: Alignment bits (RAM)
The alignment bits are used to place the analog terminal in the Bus Coupler on a byte boundary.
R16 to R30: Manufacturer parameter area (SEEROM)
The manufacturer parameters are specific for each type of terminal. They are programmed by the manufacturer, but can also be modified by the controller. The manufacturer parameters are stored in a serial EEPROM in the terminal, and are retained in the event of voltage drop-out.
These registers can only be altered after a code word has been set in R31.
- R16: Hardware version number
Register R16 contains the hardware version of the terminal.
- R19: Manufacturer scaling - offset (B_h)
16 bit signed integer
Line equation: Y = A_hX +B_h
This register contains the offset of the manufacturer’s linearization equation. The line equation is enabled via feature register R32.
- R20: Manufacturer scaling - gain (A_h)
16 bit signed integer*2-8
This register contains the scale factor of the manufacturer’s linearization equation. The line equation is enabled via feature register R32.
1 corresponds to register value 0x0100.
R31 to R47: User parameter area (SEEROM)
The user parameters are specific for each type of terminal. They can be modified by the programmer. The user parameters are stored in a serial EEPROM in the terminal, and are retained in the event of voltage drop-out. The user area is write-protected by a code word.
R31: Code word register in RAM
![]() | Functionality of the code word register The code word 0x1235 must be entered here so that parameters in the user area can be modified. If any other value is entered into this register, the write-protection is active. When write protection is not active, the code word is returned when the register is read. If the write protection is active, the register contains a zero value. |
- R32: Feature register
[0x0004] for KL2502-0000 and KL2512-0000
[0xA0B4] for KL2502-0010
This register specifies the operation mode of the terminal. Thus, for instance, a user-specific scaling can be enabled for the analog I/Os.
Feature bit no. |
| Description of the operation mode | |
---|---|---|---|
Bit 0 | 1 | User scaling active [0] | |
Bit1 | 1 | Manufacturer scaling active [0] | |
Bit 2 | 0 | [0] watchdog timer active; the PWM signal is set to 0 % duty cycle if the terminal does not receive any data for 100 ms. | |
Bit 3* | 1 | Jitter-free pulse output has priority over K-bus cycle | |
Bit 4* | 1 | Interpolation is active | |
Bit 5...12 | 0 | Reserved, do not modify! | |
Bit 13...15 |
| Operation mode | Range of values |
000 | PWMH mode | 250 Hz ... 20 kHz | |
001 | PWML mode | 2 Hz ... 250 Hz | |
011 | Frq-Cnt PWM mode | 2 Hz ... 2 kHz | |
101 | Frq-Cnt pulse mode | 2 Hz ... 2 kHz | |
111 | Cnt-Cnt PWM mode | 250 Hz ... 8 kHz |
*) KL2502-0010 only
- R33: User scaling - offset (B_w)
16 bit signed integer
Line equation: Y = A_wX+B_w
This register contains the offset of the user linearization equation. The line equation is enabled via feature register R32.
- R34: User scaling - gain (A_w)
16 bit signed integer*2-8
This register contains the scale factor of the user linearization equation. The line equation is enabled via feature register R32.
- R36: Duty cycle
[0x4000]
The ratio of duty cycle to cycle duration in Frq-Cnt PWM mode and Cnt-Cnt PWM mode is determined by this register.
0x2000 corresponds to 25 % duty cycle
0x4000 corresponds to 50 % duty cycle.
- R37:Pulse duration for Frq-Cnt pulse mode (T_impulse)
[0x0005]
This register is used to enter the pulse duration in Frq-Cnt pulse mode.
KL2502-0000, KL2512-0000: 1 digit corresponds to 8 µs.
KL2502-0010: 1 digit corresponds to 2 µs
- R38: Maximum frequency step size (F_delta), KL2502-0010 only
Sets the maximum frequency step size for interpolation.
1 digit corresponds to 8 Hz
- R39: Start frequency (F_start), KL2502-0010 only
[0x0080]
Above the start frequency the interpolation starts with the maximum frequency step size.
- R40: Time base (T_delta), KL2502-0010 only
[0x0010]
Time base for frequency interpolation in 64 µs/digit
Value range: 0 ... 255
Values smaller than 250 µs are not possible.