Configuration of KL terminals via EtherCAT
The following is an explanation of how register communication with the KL terminals is parameterized during the EtherCAT start-up.
This ensures that the KL terminal used always contains the desired register set, even if the terminal (hardware) is exchanged, because the register data is written to the KL terminal again at the next start-up of the system or EtherCAT.
The principle:
- a set of calls is stored in the CoE startup list of the BK11x0/BK1250 for each terminal to be parameterized.
- the entering and cancelling of the code word must thereby be included if required.
- the startup entries are processed in succession by the TwinCAT EtherCAT master during the start-up.
- in doing so, confirmed mailbox communication takes place, so that the next entry will be initiated only when the previous one has been successfully completed.
- no check is made of whether certain values already exist in the KL terminal; the defined startup entries will be written to the terminal position in all cases.
- the startup entries are to be sent in the PREOP -> SAFEOP transition.
This is the process to be adhered to for each terminal:
- entry of the terminal number to CoE 0x427F: 00 as a 2-byte value
the first KL terminal after the BK11x0/BK1250 also has the number 1; accordingly consecutive. - if necessary: set the code word in register 31
0x4280:20 = 0x1235. - List the register values sequentially; subindexhex = register number + 1
e.g. 0x4280: 21 = 0x0800
See table, among others, for the required CoE index. - if the code word was needed: delete the code word in order to accept data
0x4280:20 = 0. - deselect terminal selection by CoE 0x427F: 00 = 0
Information for the register values
- a KL terminal can have a maximum of 4 parameterisable channels/register pages; see the corresponding terminal documentation.
- each channel/register page has n registers, 0 – 63 is usual.
- each register is accessible via the CoE sub-index: Subindexhex = Register number + 1.
- the following assignments apply to the channels/register pages:
Channel |
Register |
CoE Index |
---|---|---|
Channel /Register page 0 |
Register 0 - 63 |
0x4280 |
|
Register > 63 (if available) |
0x4281 |
Channel /Register page 1 |
Register 0 - 63 |
0x4282 |
|
Register > 63 (if available) |
0x4283 |
Channel /Register page 2 |
Register 0 - 63 |
0x4284 |
|
Register > 63 (if available) |
0x4285 |
Channel /Register page 3 |
Register 0 - 63 |
0x4286 |
|
Register > 63 (if available) |
0x4287 |
![]() | Code word The user parameters in registers 32 - 47 can only be changed if the code word 0x1235 is written in register 31. Register 31 must be set back to 0 for non-volatile storage of the modified user parameters in the terminal. |
Example
TwinCAT 2:11 b1539 and a BK1120 with firmware B8 were used in the following example.
In an existing configuration (scanned or manually created), the user scaling (offset) of the KL3314 is to be changed in the startup list of the BK1120 coupler in order to ensure that the desired scaling is also saved in the terminal in the event of the terminal being exchanged.
2 entries have already been created: selection of terminal 3 and setting of the code word.
Now the user scaling (offset) will be set in register 33 (see terminal documentation). A right click opens the "Insert" dialog.

The following is to be entered in the dialogue
- The state transition P -> S
- the sub-index as register number + 1
in this case: Register 33dec = Subindex 22hex - the hexadecimal register value as a byte pair, the high-order byte first
in this case: Set value 1234dec = 04D2hex

The complete entry is shown in Fig. Entry.

Since the code word was used, it must also be reset in order to complete the terminal access.

More extensive register access is possible, if required, see Fig. Access to two KL terminals. In this case, two KL2541s with the numbers 3 and 4 will be parameterized in the startup phase.
