Examples Of Register Communication; Example 1: Reading The Firmware Version From Register 9 - Beckhoff KL3222 Documentation

2 channel accurate input terminals for pt100 (rtd)
Hide thumbs Also See for KL3222:
Table of Contents

Advertisement

Access from the user program
• R33: User scaling - offset
This register contains the offset of the user scaling. User scaling can be enabled in the feature register
via bit R32.0 [} 37].
• R34: user scaling - gain
This register contains the gain of the user scaling. User scaling can be enabled in the feature register
via bit R32.0 [} 37].
• R37: filter constant of the A/D converter
Value in R37
0
dec
1
dec
2
dec
3
dec
4
dec
5
dec
6
dec
7
dec
8
dec
9
dec
10
dec
11
dec
5.5

Examples of Register Communication

The numbering of the bytes in the examples corresponds to the display without word alignment.
5.5.1

Example 1: reading the firmware version from Register 9

Output Data
Byte 0: Control byte
0x89 (1000 1001
)
bin
Explanation:
• Bit 0.7 set means: Register communication switched on.
• Bit 0.6 not set means: reading the register.
• Bits 0.5 to 0.0 specify the register number 9 with 00 1001
• The output data word (byte 1 and byte 2) has no meaning during read access. To change a register,
write the required value into the output word.
Input Data (answer of the bus terminal)
Byte 0: Status byte
0x89
Explanation:
• The terminal returns the value of the control byte as a receipt in the status byte.
• The terminal returns the firmware version 0x3341 in the input data word (byte 1 and byte 2). This is to
be interpreted as an ASCII code:
◦ ASCII code 0x33 represents the digit 3
◦ ASCII code 0x41 represents the letter A
The firmware version is thus 3A.
38
Limit frequency
50 Hz
60 Hz
100 Hz
500 Hz
1000 Hz
2000 Hz
3750 Hz
7500 Hz
15 kHz
30 kHz
5 Hz
10 Hz
Byte 1: DataOUT1, high byte
0xXX
Byte 1: DataIN1, high byte
0x33
Version: 2.3.0
Byte 2: DataOUT1, low byte
0xXX
.
bin
Byte 2: DataIN1, low byte
0x41
Default
0
dec
KL3222

Advertisement

Table of Contents
loading

Table of Contents