BECKHOFF KL3681 User Manual
Page 39
![background image](https://www.manualsdir.com/files/774787/content/doc039.png)
Access from the user programm
• The output data word (Byte 1 and Byte 2) contains the code word 0x1235) to deactivate the write
protection.
Byte 0: Status Byte
Byte 1: DataIN1, high byte
Byte 2: DataIN1, low byte
0x9F (1001 1111
bin
)
0xXX
0xXX
Explanation:
• In the Status Byte, the terminal returns a value, that differs only at bit 0.6 from the value of the of the
Control Byte.
• The input data word (Byte 1 and Byte 2) has no function after the writing access. Values that might be
shown are not valid!
II. Reading Register 31 (verifying the set code word)
Byte 0: Control Byte
Byte 1: DataOUT1, high byte
Byte 2: DataOUT1, low byte
0x9F (1001 1111
bin
)
0xXX
0xXX
Explanation:
• Bit 0.7 set indicates register communication active.
• Bit 0.6 not set indicates reading the register.
• Bit 0.5 to Bit 0.0 indicates with 01 1111
bin
the register number 31.
• The output data word (Byte 1 and Byte 2) has no function at the reading access.
Byte 0: Status Byte
Byte 1: DataIN1, high byte
Byte 2: DataIN1, low byte
0x9F (1001 1111
bin
)
0x12
0x35
Explanation:
• The terminal returns the value of the Control Byte in the Status Byte, as an acknowledgement.
• The terminal returns the current value of the code word register in the input data word (Byte 1 and Byte
2).
III. Writing into Register 32 (changing the content of the feature register)
Byte 0: Control Byte
Byte 1: DataIN1, high byte
Byte 2: DataIN1, low byte
0xE0 (1110 0000
bin
)
0x00
0x02
Explanation:
• Bit 0.7 set indicates register communication active.
• Bit 0.6 set indicates: writing to the register
• Bit 0.5 to Bit 0.0 indicates with 10 0000
bin
the register number 32.
• The output data word (Byte 1 and Byte 2) contains the new value for the feature register.
CAUTION
Pay attention to the register description!
The given value 0x0002 is only an example! The bits of the feature register change the
properties of the terminal und and have different meanings, depending on the terminal type.
Please check the description of the feature register of your terminal type (chapter register
description) about the meanings of the bits in detail, before changing the values!
Byte 0: Status Byte
Byte 1: DataIN1, high byte
Byte 2: DataIN1, low byte
0xA0 (1010 0000
bin
)
0xXX
0xXX
Explanation:
KL3681, KS3681
39
Version 2.0.0