KL6021-0023 - EnOcean
Home


Foreword

Foreword
Foreword
Additional information
•
Notes on the documentation
•
Safety instructions
•
Documentation issue status


Notes on the documentation

Foreword [image] Notes on the documentation
Notes on the documentation
Intended audience
This description is only intended for the use of trained specialists in control and automation engineering who are familiar with the applicable national standards.
It is essential that the documentation and the following notes and explanations are followed when installing and commissioning these components.
It is the duty of the technical personnel to use the documentation published at the respective time of each installation and commissioning.
The responsible staff must ensure that the application or use of the products described satisfy all the requirements for safety, including all the relevant laws, regulations, guidelines and standards.
Disclaimer
The documentation has been prepared with care. The products described are, however, constantly under development.
We reserve the right to revise and change the documentation at any time and without prior announcement.
No claims for the modification of products that have already been supplied may be made on the basis of the data, diagrams and descriptions in this documentation.
Trademarks
Beckhoff®, TwinCAT®, EtherCAT®, EtherCAT G®, EtherCAT G10®, EtherCAT P®, Safety over EtherCAT®, TwinSAFE®, XFC®, XTS® and XPlanar® are registered trademarks of and licensed by Beckhoff Automation GmbH. Other designations used in this publication may be trademarks whose use by third parties for their own purposes could violate the rights of the owners.
Patent Pending
The EtherCAT Technology is covered, including but not limited to the following patent applications and patents: EP1590927, EP1789857, EP1456722, EP2137893, DE102015105702 with corresponding applications or registrations in various other countries.
EtherCAT® is registered trademark and patented technology, licensed by Beckhoff Automation GmbH, Germany.
Copyright
© Beckhoff Automation GmbH & Co. KG, Germany.
The reproduction, distribution and utilization of this document as well as the communication of its contents to others without express authorization are prohibited.
Offenders will be held liable for the payment of damages. All rights reserved in the event of the grant of a patent, utility model or design.


Safety instructions

Foreword [image] Safety instructions
Safety instructions
Safety regulations
Please note the following safety instructions and explanations!
Product-specific safety instructions can be found on following pages or in the areas mounting, wiring, commissioning etc.
Exclusion of liability
All the components are supplied in particular hardware and software configurations appropriate for the application. Modifications to hardware or software configurations other than those described in the documentation are not permitted, and nullify the liability of Beckhoff Automation GmbH & Co. KG.
Personnel qualification
This description is only intended for trained specialists in control, automation and drive engineering who are familiar with the applicable national standards.
Description of instructions
In this documentation the following instructions are used.
These instructions must be read carefully and followed without fail!
SmallWarningYellow DANGER
Serious risk of injury!
Failure to follow this safety instruction directly endangers the life and health of persons.
SmallWarningYellow WARNING
Risk of injury!
Failure to follow this safety instruction endangers the life and health of persons.
SmallWarningYellow CAUTION
Personal injuries!
Failure to follow this safety instruction can lead to injuries to persons.
Note
Damage to environment/equipment or data loss
Failure to follow this instruction can lead to environmental damage, equipment damage or data loss.
Tip or pointer
This symbol indicates information that contributes to better understanding.


Documentation issue status

Foreword [image] Documentation issue status
Documentation issue status
Version
Comment
2.0
▪
Migration
1.1
▪
Mounting description expanded
▪
Information on basic function principles expanded
▪
Introduction to the KL6023 added
1.0
▪
Description of the KL6023 (wireless adapter for EnOcean radio technology) added
▪
Wiring instructions added
▪
Description of the KS2000 configuration software added
▪
Technical data added
0.1
First preliminary version
Firmware and hardware versions
Documentation Version | KL6021-0023 |  | KL6023
 | Firmware | Hardware | Firmware | Hardware
2.0 | 5D | 03 | 1A | 02
1.1 | 5D | 01 | 1A | 01
1.0 | 5A | 00 | 1A | 00
0.1 | 5A | 00 | - | -
The firmware and hardware versions (delivery state) of the terminal can be found in the serial number printed on the side.
Syntax of the serial number
Structure of the serial number: WW YY FF HH
WW - week of production (calendar week)
YY – year of production
FF - firmware version
HH - hardware version
Example with ser. no.: 12 06 3A 02:
12 - week of production 12
06 - year of production 2006
3A - firmware version 3A
02 - hardware version 02


Product overview

Product overview
Product overview
Additional information
•
KL6021-0023 - Introduction
•
KL6021-0023 - Technical Data
•
KL6023 - Introduction
•
KL6023 - Technical Data
•
Basic Function Principles


KL6021-0023 - Introduction

Product overview [image] KL6021-0023 - Introduction
KL6021-0023 - Introduction
KL6021-0023 – serial interface terminal for the connection of the KL6023 wireless adapter
The KL6021-0023 serial interface connects the wireless adapter via an RS485 signal. The KL6023 wireless adapter operates as an EnOcean radio receiver and receives the radio signals from EnOcean sensors.
LEDs
LED | Color | Meaning
RUN | green | This LED indicates the terminal's operating state:
 |  | on | normal operation
 |  | off | A watchdog timer overflow has occurred. The RUN LED goes out if no process data is transmitted to the terminal from the Bus Coupler for 100 ms.
TxD | green | State of the transmit signal line
RxD | green | State of the receive signal line
Connection
Terminal point | Name | Signal
1 | TxD+ | Signal line (Transmit Data)
5 | TxD- | Signal line (Transmit Data)
2 | RxD+ | Signal line (Receive Data)
6 | RxD- | Signal line (Receive Data)
3 | GND | Ground for the KL6023 (bridged internally with terminal point 7)
7 | GND | Ground for the KL6023 (bridged internally with terminal point 3)
4 | +5 V | Supply voltage for the KL6023 (bridged internally with terminal point 8)
8 | +5 V | Supply voltage for the KL6023 (bridged internally with terminal point 4)


KL6021-0023 - Technical Data

Product overview [image] KL6021-0023 - Technical Data
KL6021-0023 - Technical Data
Technical data | KL6021-0023
Number of inputs | 1, for wireless adapter (EnOcean radio technology)
Cable impedance | approx. 120 Ω
Connecting cable to KL6023 wireless adapter | 2 twisted pairs
Length of connection to KL6023 wireless adapter | max. 300 m
Bit width in process image | 11 x 8 bit user data, 1 x 8 bit control/status
Power supply for the electronics | via the K-bus
Current consumption via K-bus | typically 65 mA
Weight | approx. 60 g
Dimensions (W x H x D) | approx. 15 mm x 100 mm x 70 mm
Mounting | on 35 mm mounting rail according to EN 60715
Permissible ambient temperature range during operation | 0 °C ... + 55 °C
Permissible ambient temperature range during storage | -25 °C ... + 85 °C
Permissible relative air humidity | 95 %, no condensation
Vibration / shock resistance | conforms to EN 60068-2-6 / EN 60068-2-27, see also Installation instructions for enhanced mechanical load capacity
EMC immunity / emission | conforms to EN 61000-6-2 / EN 61000-6-4
Protection class | IP20
Mounting position | variable
Approval | CE, cULus, ATEX


KL6023 - Introduction

Product overview [image] KL6023 - Introduction
KL6023 - Introduction
KL6023 - Wireless Adapter for EnOcean radio technology
The KL6023 Wireless Adapter receives signals from battery-less sensors with EnOcean technology. These signals are converted by the Wireless Adapter to a RS485 signal and directly processed further by the KL6021-0023 serial Bus Terminal. With a radio signal range of at least 30 m, the wiring of buildings can be simplified significantly.
Application
The status LEDs of the Wireless Adapter are helpful during commissioning. The LEDs indicate all telegrams they receive as faulty or faultless. With a maximum distance of 300 m between the receiver and the Bus Terminal station, it is possible to place the receivers at any radio-technically favorable location within a building. The system does not stipulate a maximum number of transmitters per receiver unit. In practice, between 25 and 100 transmitters per receiver are used.


KL6023 - Technical Data

Product overview [image] KL6023 - Technical Data
KL6023 - Technical Data
Technical data | KL6023 (Wireless Adapter for EnOcean radio technology)
Connection | 2 twisted pairs, direct to Bus Terminal KL6021-0023
Power supply | via KL6021-0023 Bus Terminal (with electrical isolation)
Length of connecting cable to the KL6021-0023 | max. 300 m
Configuration | not required
Frequency band | 868.35 MHz
Transfer range | In open spaces: approx. 300 m Inside buildings: approx. 30 m
Radio telegram | depending on sensor type: - 32 bit sensor identification number - number of user bytes is not limited
Receiving aerial | integrated in the housing
Housing | Box: Polystyrene (grey) with M16 PG threaded fitting for cable connection Cover: polycarbonate (transparent)
Weight | approx. 55 g
Dimensions (W x H x D) | approx. 52 mm x 50 mm x 35.5 mm (without PG threaded fitting)
Permissible ambient temperature range during operation | 0 °C ... + 55 °C
Permissible ambient temperature range during storage | -25 °C ... + 85 °C
Vibration / shock resistance | conforms to EN 60068-2-6 / EN 60068-2-27
EMC immunity / emission | conforms to EN 61000-6-2 / EN 61000-6-4
Protection class | IP66
Mounting position | variable
Approval | CE


Basic Function Principles

Product overview [image] Basic Function Principles
Basic Function Principles
The KL6021-0023 serial communication terminal connects the KL6023 EnOcean receiver module with the Beckhoff Bus Terminal system. EnOcean (http://www.enocean.de) permits radio transmission without either batteries or an external power supply to the transmitter.
KL6021-0023 and KL6023
Approval of EnOcean radio technology
Note
Nature and source of the danger
The KL6032 EnOcean receiver module can be operated in the following countries without registration and fees.
Permission for use in other countries must be clarified explicitly!
•
European union
•
Switzerland
Reading received telegrams
When the KL6021-0023 has received new telegrams it indicates this by setting the bit SB.2 in the status byte to 1. Reading out received telegrams is initiated through bit CB.0 in the control byte being inverted by the higher-level controller. The change from 0 to 1 or from 1 to 0 always causes the next telegram in the memory to be displayed in the process data. The value of the bit CB.0 is adopted by SB.0 as acknowledgement.
The leading synchronization byte and the closing checksum are part of the EnOcean standard, and the KL6021-0023 filters them out of the telegram, so that the displayed data starts with the telegram header and ends with the status field.
Longer telegrams
If the telegram from an EnOcean transmitter consists of more than 4 data bytes, it cannot be transferred in a single K-bus cycle. In that case, the KL6021-0023 sets bit SB.1 in the status byte in the next read cycle, placing the next data block from the telegram into the process data.
Faulty telegrams
The KL6021-0023 calculates the checksum for every EnOcean telegram that is received. If this does not agree with the checksum that has been transmitted the terminal sets bit SB.6 in the status byte. A telegram is not then placed into the data memory, and is lost.
Data memory overflow
If the telegrams received by the KL6021-0023 are not read by the higher-level controller, the terminal's receive memory will overflow, and it will set bit SB.3 in the status byte. It is also possible for a telegram only to be partially written into the memory. This will automatically cause an error in the checksum, and it will be displayed and handled accordingly.
Protocol
The following table illustrates the general structure of an EnOcean telegram:
Bit 7
Bit 0
Description
Sync_Byte1 (0xA5)
Synchronization byte
Sync_Byte0 (0x5A)
H_Seq
Length
Header identification
H_Seq (3 bit)
▪
0 unknown transmitter ID received
▪
1 known transmitter ID received
▪
2 new transmitter learnt
Length (5 bit)
▪
Number of byte following the header (here: 11)
ORG
Telegram type
Data Byte 3
Data byte
Data Byte 2
Data Byte 1
Data Byte 0
ID Byte 3
32 bit transmitter ID
ID Byte 2
ID Byte 1
ID Byte 0
Status
Status field
Check Sum
Checksum (LSB resulting from the addition of all bytes, not including the synchronization byte or the checksum itself)


Mounting and wiring

Mounting and wiring
Mounting and wiring
Additional information
•
Installation on mounting rails
•
Connection of the wireless adapter


Installation on mounting rails

Mounting and wiring [image] Installation on mounting rails
Installation on mounting rails
SmallWarningYellow WARNING
Risk of electric shock and damage of device!
Bring the bus terminal system into a safe, powered down state before starting installation, disassembly or wiring of the bus terminals!
Assembly
Attaching on mounting rail
The bus coupler and bus terminals are attached to commercially available 35 mm mounting rails (DIN rails according to EN 60715) by applying slight pressure:
1.
First attach the fieldbus coupler to the mounting rail.
2.
The bus terminals are now attached on the right-hand side of the fieldbus coupler. Join the components with tongue and groove and push the terminals against the mounting rail, until the lock clicks onto the mounting rail.
If the terminals are clipped onto the mounting rail first and then pushed together without tongue and groove, the connection will not be operational! When correctly assembled, no significant gap should be visible between the housings.
Fixing of mounting rails
The locking mechanism of the terminals and couplers extends to the profile of the mounting rail. At the installation, the locking mechanism of the components must not come into conflict with the fixing bolts of the mounting rail. To mount the mounting rails with a height of 7.5 mm under the terminals and couplers, you should use flat mounting connections (e.g. countersunk screws or blind rivets).
Disassembly
Disassembling of terminal
Each terminal is secured by a lock on the mounting rail, which must be released for disassembly:
1.
Pull the terminal by its orange-colored lugs approximately 1 cm away from the mounting rail. In doing so for this terminal the mounting rail lock is released automatically and you can pull the terminal out of the bus terminal block easily without excessive force.
2.
Grasp the released terminal with thumb and index finger simultaneous at the upper and lower grooved housing surfaces and pull the terminal out of the bus terminal block.
Connections within a bus terminal block
The electric connections between the Bus Coupler and the Bus Terminals are automatically realized by joining the components:
▪
The six spring contacts of the K-Bus/E-Bus deal with the transfer of the data and the supply of the Bus Terminal electronics.
▪
The power contacts deal with the supply for the field electronics and thus represent a supply rail within the bus terminal block. The power contacts are supplied via terminals on the Bus Coupler (up to 24 V) or for higher voltages via power feed terminals.
Power Contacts
During the design of a bus terminal block, the pin assignment of the individual Bus Terminals must be taken account of, since some types (e.g. analog Bus Terminals or digital 4-channel Bus Terminals) do not or not fully loop through the power contacts. Power Feed Terminals (KL91xx, KL92xx or EL91xx, EL92xx) interrupt the power contacts and thus represent the start of a new supply rail.
PE power contact
The power contact labeled PE can be used as a protective earth. For safety reasons this contact mates first when plugging together, and can ground short-circuit currents of up to 125 A.
Power contact on left side
Note
Possible damage of the device
Note that, for reasons of electromagnetic compatibility, the PE contacts are capacitatively coupled to the mounting rail. This may lead to incorrect results during insulation testing or to damage on the terminal (e.g. disruptive discharge to the PE line during insulation testing of a consumer with a nominal voltage of 230 V). For insulation testing, disconnect the PE supply line at the Bus Coupler or the Power Feed Terminal! In order to decouple further feed points for testing, these Power Feed Terminals can be released and pulled at least 10 mm from the group of terminals.
SmallWarningYellow WARNING
Risk of electric shock!
The PE power contact must not be used for other potentials!


Connection of the wireless adapter

Mounting and wiring [image] Connection of the wireless adapter
Connection of the wireless adapter
SmallWarningYellow WARNING
Risk of electric shock and damage of device!
Bring the bus terminal system into a safe, powered down state before starting installation, disassembly or wiring of the bus terminals!
Connection of the wireless adapter
KL6021-0023 |  | KL6023 – Wireless adapter
Signal | Terminal point no. | Signal | Terminal point no.
RxD+ | 2 | RxD+ | 1
RxD- | 6 | RxD- | 2
GND | 3 or 7 | GND | 3
5 V | 4 or 8 | 5 V | 4


KS2000 Configuration Software

KS2000 Configuration Software
KS2000 Configuration Software
Additional information
•
KS2000 - Introduction
•
Parameterization with KS2000
•
Register
•
Settings
•
Process data


KS2000 - Introduction

KS2000 Configuration Software [image] KS2000 - Introduction
KS2000 - Introduction
The KS2000 configuration software permits configuration, commissioning and parameterization of bus couplers, of the affiliated bus terminals and of Fieldbus Box Modules. The connection between bus coupler / Fieldbus Box Module and the PC is established by means of the serial configuration cable or the fieldbus.
KS2000 configuration software
Configuration
You can configure the Fieldbus stations with the Configuration Software KS2000 offline. That means, setting up a terminal station with all settings on the couplers and terminals resp. the Fieldbus Box Modules can be prepared before the commissioning phase. Later on, this configuration can be transferred to the terminal station in the commissioning phase by means of a download. For documentation purposes, you are provided with the breakdown of the terminal station, a parts list of modules used and a list of the parameters you have modified. After an upload, existing fieldbus stations are at your disposal for further editing.
Parameterization
KS2000 offers simple access to the parameters of a fieldbus station: specific high-level dialogs are available for all bus couplers, all intelligent bus terminals and Fieldbus Box modules with the aid of which settings can be modified easily. Alternatively, you have full access to all internal registers of the bus couplers and intelligent terminals. Refer to the register description for the meanings of the registers.
Commissioning
The KS2000 software facilitates commissioning of machine components or their fieldbus stations: Configured settings can be transferred to the fieldbus modules by means of a download. After a login to the terminal station, it is possible to define settings in couplers, terminals and Fieldbus Box modules directly online. The same high-level dialogs and register access are available for this purpose as in the configuration phase.
The KS2000 offers access to the process images of the bus couplers and Fieldbus Box modules.
▪
Thus, the coupler's input and output images can be observed by monitoring.
▪
Process values can be specified in the output image for commissioning of the output modules.
All possibilities in the online mode can be used in parallel with the actual fieldbus mode of the terminal station. The fieldbus protocol always has the higher priority in this case.


Parameterization with KS2000

KS2000 Configuration Software [image] Parameterization with KS2000
Parameterization with KS2000
Connect the configuration interface of your Fieldbus Coupler with the serial interface of your PC via the configuration cable and start the KS2000 Configuration Software.
Click on the Login button. The configuration software will now load the information for the connected fieldbus station.
In the example shown, this is
▪
a BK2020 Lightbus Coupler
▪
a KL1xx2 Digital Input Terminal
▪
a KL6021-0023 serial interface terminal (RS485 for EnOcean receiver KL6023)
▪
a KL9010 Bus End Terminal
Display of the fieldbus station in KS2000
The left-hand KS2000 window displays the terminals of the fieldbus station in a tree structure.
The right-hand KS2000 window contains a graphic display of the fieldbus station terminals.
In the tree structure of the left-hand window, click on the plus-sign next to the terminal whose parameters you wish to change (item 2 in the example).
KS2000 branch for channel 1 of the KL6021-0023
For the KL6021-0023, the branches Register, Settings and ProcData are displayed:
▪
Register permits direct access to the registers of the KL6021-0023.
▪
There are no dialog masks to be found for parameterizing the KL6021-0023 under Settings, since no terminal-specific settings are required.
▪
ProcData displays the KL6021-0023 process data.


Register

KS2000 Configuration Software [image] Register
Register
Under Register you can directly access the registers of the KL6021-0023. The meaning of the register is explained in the Register Overview.
Register view in KS2000


Settings

KS2000 Configuration Software [image] Settings
Settings
No terminal-specific settings are necessary for the KL6021-0023 and the KL6023.


Process data

KS2000 Configuration Software [image] Process data
Process data
The Status byte (Status), the Control byte (Ctrl) and the process data (Data) are displayed in a tree structure under ProcData.
ProcData
The spectacles mark the data that are currently graphically displayed in the History field.
History field
The current input value is displayed numerically in the Value field.
Value field
Output values can be modified through direct input or by means of the fader control.
Value field
SmallWarningYellow WARNING
Changing output values (forcing)
Note that changing output values (forcing) can have a direct effect on your automation application.
Only change these output values if you are certain that the state of your system permits it, and that there will be no risk to people or to the machine!
After pressing the Settings button you can set the format of the numerical display to hexadecimal, decimal or binary.
Settings


Programming

Programming
Programming
Additional information
•
TwinCAT libraries


TwinCAT libraries

Programming [image] TwinCAT libraries
TwinCAT libraries
Software documentation in the Beckhoff Information System:
TwinCAT 2: TwinCAT 2 PLC Lib: EnOcean
TwinCAT 3: TwinCAT 3 PLC Lib: Tc2_EnOcean


Access from the user program

Access from the user program
Access from the user program
Additional information
•
Process image
•
Control and status byte
•
Register overview
•
Register description
•
Examples of Register Communication


Process image

Access from the user program [image] Process image
Process image
The KL6021-0023 is represented in the process image with 12 bytes of input data and 12 bytes of output data. These are organized as follows:
Byte offset | Format | Input data | Output data
0 | Byte | Status byte (SB) | Control byte (CB)
1 | Byte | DataIn0 | DataOut0
2 | Byte | DataIn1 | DataOut1
3 | Byte | DataIn2 | DataOut2
4 | Byte | DataIn3 | DataOut3
5 | Byte | DataIn4 | DataOut4
6 | Byte | DataIn5 | DataOut5
7 | Byte | DataIn6 | DataOut6
8 | Byte | DataIn7 | DataOut7
9 | Byte | DataIn8 | DataOut8
10 | Byte | DataIn9 | DataOut9
11 | Byte | DataIn10 | DataOut10


Control and status byte

Access from the user program [image] Control and status byte
Control and status byte
Register communication
Control byte (for register communication)
The control byte (CB) is located in the output image, and is transmitted from the controller to the terminal.
Bit | CB.7 | CB.6 | CB.5 | CB.4 | CB.3 | CB.2 | CB.1 | CB.0
Name | RegAccess | R/W | Reg. no.
Key
Bit | Name | Description
CB.7 | RegAccess | 1bin | Register communication switched on
CB.6 | R/W | 0bin | Read access
 |  | 1bin | Write access
CB.5 to CB.0 | Reg. no. | Register number: Enter the number of the register that you want to read or write here.
Status byte (for register communication)
The status byte (SB) is located in the input image, and is transmitted from the terminal to the controller.
Bit | SB.7 | SB.6 | SB.5 | SB.4 | SB.3 | SB.2 | SB.1 | SB.0
Name | RegAccess | R/W | Reg. no.
Key
Bit | Name | Description
SB.7 | RegAccess | 1bin | Acknowledgment for register access
SB.6 | R | 0bin | Read access
SB.5 to SB.0 | Reg. no. | Number of the register that was read or written.
Process data during the register communication
The process data that is displayed is set to zero during the register communication!
Process data mode
Control byte in process data mode
The control byte (CB) is located in the output image, and is transmitted from the controller to the terminal.
Bit | CB.7 | CB.6 | CB.5 | CB.4 | CB.3 | CB.2 | CB.1 | CB.0
Name | RegAccess | - | - | - | - | - | - | NextTelegramReq
Key
Bit | Name | Description
CB.7 | RegAccess | 0bin | Register communication off (process data mode)
CB.6 to CB.1 | - | 0bin | reserved
CB.0 | NextTelegramReq | 0/1bin | By inverting this bit, the next EnOcean telegram in the input memory of the KL6021-0023 is copied into the process data.
Status byte in process data mode
The status byte (SB) is located in the input image, and is transmitted from the terminal to the controller.
Bit | SB.7 | SB.6 | SB.5 | SB.4 | SB.3 | SB.2 | SB.1 | SB.0
Name | RegAccess | Error | - | - | BufferFull | NewTelegram | SameTelegram | NextTelegramAck
Key
Bit | Name | Description
SB.7 | RegAccess | 0bin | Acknowledgment for process data mode
SB.6 | Error | 1bin | The EnOcean telegram presently displayed in the process data of the KL6021-0023 has an incorrect checksum.
SB.5 | - | 0bin | reserved
SB.4 | - | 0bin | reserved
SB.3 | BufferFull | 1bin | The receive memory of the KL6021-0023 is full.
SB.2 | NewTelegram | 1bin | There is at least one new EnOcean telegram in the receive memory of the KL6021-0023.
SB.1 | SameTelegram | 1bin | The data currently displayed belongs to the same EnOcean telegram as the data previously displayed, because the telegram contains more than 4 data bytes.
SB.0 | NextTelegramAck | 0/1bin | Acknowledgement of having copied the EnOcean telegram into the process data. The bit adopts the value of the control bit CB.0 when the telegram has been copied into the process data.


Register overview

Access from the user program [image] Register overview
Register overview
These registers are used to parameterize the terminal KL6021. They can be read or written by means of the register communication.
Register no. | Comment | Default value |  | R/W | Memory
R0 | reserved | - | - | - | -
... | ... | ... | ... | ... | ...
R5 | reserved | - | - | - | -
R6 | Diagnostic register | 0x0000 | 0dec | R | RAM
R7 | Command register | 0x0000 | 0dec | R/W | RAM
R8 | Terminal type | 0x1785 | 6021dec | R | ROM
R9 | Firmware version | e.g. 0x3541 | e.g. 13633dec | R | ROM
R10 | Multiplex shift register | 0x0230 | 560dec | R | ROM
R11 | Signal channels | 0x0160 | 352dec | R | ROM
R12 | Minimum data length | 0x6060 | 24672dec | R | ROM
R13 | Data structure | 0x0002 | 2dec | R | ROM
R14 | reserved | - | - | - | -
R15 | Alignment register | typically 0x7F80 | typically 32640dec | R/W | RAM
R16 | Hardware version number | e.g. 0x0000 | e.g. 0dec | R/W | SEEPROM
R17 | reserved | - | - | - | -
... | ... | ... | ... | ... | ...
R28 | reserved | - | - | - | -
R29 | Terminal type - special identification | 0x0017 | 23dec | R | ROM
R30 | reserved | - | - | - | -
R31 | Code word register | 0x0000 | 0dec | R/W | RAM
R32 | Feature register | 0x0000 | 0dec | R/W | SEEPROM
R33 | reserved | - | - | - | -
R34 | reserved | - | - | - | -
R35 | Number of data bytes sent to the Bus Coupler | 0x000B | 11dec | R | ROM
R36 | reserved | - | - | - | -
... | ... | ... | ... | ... | ...
R63 | reserved | - | - | - | -


Register description

Access from the user program [image] Register description
Register description
The registers are used to parameterize the terminal. They can be read or written by means of the register communication.
R6: Diagnostic register
Status byte SB is placed into register R6.
R7: Command register
No commands are implemented in this terminal.
R8: Terminal description
The name of the terminal is contained in register R8. KL6021: 0x1785 (6021dec)
R9: Firmware version
Register R9 contains the ASCII coding of the terminal's firmware version, e.g. 0x3541 = '5A'. The '0x35' corresponds here to the ASCII character '5', while the '0x41' represents the ASCII character 'A'.
This value cannot be changed.
R16: Hardware version number
Register R16 contains the hardware version of the terminal; this value cannot be changed.
R29: Terminal type - special identification
The name of the special type of the terminal is contained in register R29. KL6021-0023: 0x0017 (0023dec)
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 when the terminal is restarted.
The code word is reset when the terminal is restarted.
R32: Feature register
The feature register specifies the terminal's configuration. There are no configurations that can be made for this terminal.
R35: Number of data bytes sent to the Bus Coupler
Register R35 indicates the number of data bytes that transmitted to the Bus Coupler. This value cannot be changed.


Examples of Register Communication

Access from the user program [image] Examples of Register Communication
Examples of Register Communication
The numbering of the bytes in the examples corresponds to the display without word alignment.
Additional information
•
Example 1: reading the firmware version from Register 9
•
Example 2: Writing to an user register


Example 1: reading the firmware version from Register 9

Access from the user program [image] Examples of Register Communication [image] Example 1: reading the firmware version from Register 9
Example 1: reading the firmware version from Register 9
Output Data
Byte 0: Control byte | Byte 1: DataOUT1, high byte | Byte 2: DataOUT1, low byte
0x89 (1000 1001bin) | 0xXX | 0xXX
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 1001bin.
▪
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 | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0x89 | 0x33 | 0x41
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.


Example 2: Writing to an user register

Access from the user program [image] Examples of Register Communication [image] Example 2: Writing to an user register
Example 2: Writing to an user register
Code word
In normal mode all user registers are read-only with the exception of Register 31. In order to deactivate this write protection you must write the code word (0x1235) into Register 31. If a value other than 0x1235 is written into Register 31, write protection is reactivated. Please note that changes to a register only become effective after restarting the terminal (power-off/power-on).
I. Write the code word (0x1235) into Register 31.
Output Data
Byte 0: Control byte | Byte 1: DataOUT1, high byte | Byte 2: DataOUT1, low byte
0xDF (1101 1111bin) | 0x12 | 0x35
Explanation:
▪
Bit 0.7 set means: Register communication switched on.
▪
Bit 0.6 set means: writing to the register.
▪
Bits 0.5 to 0.0 specify the register number 31 with 01 1111bin.
▪
The output data word (byte 1 and byte 2) contains the code word (0x1235) for deactivating write protection.
Input Data (answer of the bus terminal)
Byte 0: Status byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0x9F (1001 1111bin) | 0xXX | 0xXX
Explanation:
▪
The terminal returns a value as a receipt in the status byte that differs only in bit 0.6 from the value of the control byte.
▪
The input data word (byte 1 and byte 2) is of no importance after the write access. Any values still displayed are invalid!
II. Read Register 31 (check the set code word)
Output Data
Byte 0: Control byte | Byte 1: DataOUT1, high byte | Byte 2: DataOUT1, low byte
0x9F (1001 1111bin) | 0xXX | 0xXX
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 31 with 01 1111bin.
▪
The output data word (byte 1 and byte 2) has no meaning during read access.
Input Data (answer of the bus terminal)
Byte 0: Status byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0x9F (1001 1111bin) | 0x12 | 0x35
Explanation:
▪
The terminal returns the value of the control byte as a receipt in the status byte.
▪
The terminal returns the current value of the code word register in the input data word (byte 1 and byte 2).
III. Write to Register 32 (change contents of the feature register)
Output data
Byte 0: Control byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0xE0 (1110 0000bin) | 0x00 | 0x02
Explanation:
▪
Bit 0.7 set means: Register communication switched on.
▪
Bit 0.6 set means: writing to the register.
▪
Bits 0.5 to 0.0 indicate register number 32 with 10 0000bin.
▪
The output data word (byte 1 and byte 2) contains the new value for the feature register.
SmallWarningYellow CAUTION
Observe the register description!
The value of 0x0002 given here is just an example!
The bits of the feature register change the properties of the terminal and have a different meaning, depending on the type of terminal. Refer to the description of the feature register of your terminal (chapter Register description) regarding the meaning of the individual bits before changing the values.
Input data (response from the Bus Terminal)
Byte 0: Status byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0xA0 (1010 0000bin) | 0xXX | 0xXX
Explanation:
▪
The terminal returns a value as a receipt in the status byte that differs only in bit 0.6 from the value of the control byte.
▪
The input data word (byte 1 and byte 2) is of no importance after the write access. Any values still displayed are invalid!
IV. Read Register 32 (check changed feature register)
Output Data
Byte 0: Control byte | Byte 1: DataOUT1, high byte | Byte 2: DataOUT1, low byte
0xA0 (1010 0000bin) | 0xXX | 0xXX
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 indicate register number 32 with 10 0000bin.
▪
The output data word (byte 1 and byte 2) has no meaning during read access.
Input Data (answer of the bus terminal)
Byte 0: Status byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0xA0 (1010 0000bin) | 0x00 | 0x02
Explanation:
▪
The terminal returns the value of the control byte as a receipt in the status byte.
▪
The terminal returns the current value of the feature register in the input data word (byte 1 and byte 2).
V. Write Register 31 (reset code word)
Output Data
Byte 0: Control byte | Byte 1: DataOUT1, high byte | Byte 2: DataOUT1, low byte
0xDF (1101 1111bin) | 0x00 | 0x00
Explanation:
▪
Bit 0.7 set means: Register communication switched on.
▪
Bit 0.6 set means: writing to the register.
▪
Bits 0.5 to 0.0 specify the register number 31 with 01 1111bin.
▪
The output data word (byte 1 and byte 2) contains 0x0000 for reactivating write protection.
Input Data (answer of the bus terminal)
Byte 0: Status byte | Byte 1: DataIN1, high byte | Byte 2: DataIN1, low byte
0x9F (1001 1111bin) | 0xXX | 0xXX
Explanation:
▪
The terminal returns a value as a receipt in the status byte that differs only in bit 0.6 from the value of the control byte.
▪
The input data word (byte 1 and byte 2) is of no importance after the write access. Any values still displayed are invalid!


Appendix

Appendix
Appendix
Additional information
•
Support and Service


Support and Service

Appendix [image] Support and Service
Support and Service
Beckhoff and their partners around the world offer comprehensive support and service, making available fast and competent assistance with all questions related to Beckhoff products and system solutions.
Beckhoff's branch offices and representatives
Please contact your Beckhoff branch office or representative for local support and service on Beckhoff products!
The addresses of Beckhoff's branch offices and representatives round the world can be found on her internet pages:
http://www.beckhoff.com
You will also find further documentation for Beckhoff components there.
Beckhoff Headquarters
Beckhoff Automation GmbH & Co. KG
Huelshorstweg 20
33415 Verl
Germany
Phone: | +49 5246 963 0
Fax: | +49 5246 963 198
e-mail: | info@beckhoff.com
Beckhoff Support
Support offers you comprehensive technical assistance, helping you not only with the application of individual Beckhoff products, but also with other, wide-ranging services:
▪
support
▪
design, programming and commissioning of complex automation systems
▪
and extensive training program for Beckhoff system components
Hotline: | +49 5246 963 157
Fax: | +49 5246 963 9157
e-mail: | support@beckhoff.com
Beckhoff Service
The Beckhoff Service Center supports you in all matters of after-sales service:
▪
on-site service
▪
repair service
▪
spare parts service
▪
hotline service
Hotline: | +49 5246 963 460
Fax: | +49 5246 963 479
e-mail: | service@beckhoff.com