KL6201/KL6211 at CANopen couplers

Chapter overview

This chapter comprises the following sections:

Selecting the size of the process image

The size of the process image of the AS-i master terminal can be set to 6, 12, 22 or 38 bytes. This can be done with the KS2000 configuration software or via the fieldbus. To this end, parameter 0x20 has to be modified via the parameter data block (see AS-i parameter 0x20). The Bus Coupler must then be reset, after which it starts with the last selected process image size.

KL6201/KL6211 at CANopen couplers 1:

Process Images

If the 22-byte or 38-byte process image is to be used under CANopen, the Bus Coupler may require a particular firmware version (see chapter Firmware version of the Bus Coupler). The delivered firmware version is shown on the back of the Bus Coupler (see example below). If required, the firmware can be updated via the serial interface (KS2000 cable required) or via CANopen (using the FC5101 fieldbus card, if firmware version C2 is already loaded on the Bus Coupler).
The current firmware versions and the program for the firmware update can be found at http://www.beckhoff.de. BK5120 devices with KL6201/KL6211 are supported in TwinCAT from version 2.8 (build 739).

KL6201/KL6211 at CANopen couplers 2:
Specification of the firmware version of the BK5120 CANopen coupler

Mapping of the process data

Like for the CANopen Bus Couplers, the process image of the KL6201/KL6211 is mapped to several 8-byte data objects. The 8-byte data objects are located in the CANopen object directory at index 0x3000 (input data) or index 0x3100 (output data). The coupler automatically maps these objects to the first free PDO (from PDO3) during start-up.

6-byte process image

Parameter data block

The 6-byte process image only consists of the parameter data block, supplemented by 2 dummy bytes. This block is located at index 0x3000 and is fully mapped into a PDO.

In contrast to the other process images, the 6-byte process image does not support direct access to the process data of the AS-i slaves. The process data access must take place via the AS-i parameters 0x80 to 0x87 (digital slaves) or 0x204 to 0x27F (analog slaves).

The TxPDO (KL6201/KL6211 -> PLC) with the input data (index 0x3000) has following structure:

Parameter data block

Dummy bytes

Byte 0

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Byte 7

SB0

SB1

Para In 0

Para In 1

Para In 2

Para In 3

reserved

reserved

The RxPDO (PLC -> KL6201/KL6211) with the output data (index 0x3100) has following structure:

Parameter data block

Dummy bytes

Byte 0

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Byte 7

CB0

CB1

Para Out 0

Para Out 1

Para Out 2

Para Out 3

reserved

reserved

Key

SB n: status byte n
CB n: control byte n
Para Out n: Output parameter, byte n
Para In n: Input parameter, byte n

12-byte process image

Parameter data block

The first 8-byte object contains the parameter data block, complemented by 2 dummy bytes. This block is located at index 0x3000 and is fully mapped into a PDO.

The TxPDO (KL6201/KL6211 -> PLC) with the input data (index 0x3000) has following structure:

Parameter data block

Dummy bytes

Byte 0

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Byte 7

SB0

SB1

Para In 0

Para In 1

Para In 2

Para In 3

reserved

reserved

The RxPDO (PLC -> KL6201/KL6211) with the output data (index 0x3100) has following structure:

Parameter data block

Dummy bytes

Byte 0

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Byte 7

CB0

CB1

Para Out 0

Para Out 1

Para Out 2

Para Out 3

reserved

reserved

Key

SB n: status byte n
CB n: control byte n
Para Out n: Output parameter, byte n
Para In n: Input parameter, byte n

Process data block

The next 8-byte object contains the process data block with AS-i status nibble (ASI SN) and the AS-i input data. The next TxPDO (KL6201/KL6211 -> PLC) therefore has the following content:

Process data block

Dummy bytes

Byte 0

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Byte 7

ASiSN +
ASiIn Slave 1

ASiIn
Slave 2+3

ASiIn
Slave 4+5

ASiIn
Slave 6+7

ASiIn
Slave 8+9

ASiIn
Slave 10+11

reserved

reserved

The next RxPDO (PLC -> KL6201/KL6211) contains the AS-i command nibble (ASI CN) and the AS-i output data:

Process data block

Dummy bytes

Byte 0

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

Byte 6

Byte 7

ASiCN +
ASiOut Slave 1

ASiOut
Slave 2+3

ASiOut
Slave 4+5

ASiOut
Slave 6+7

ASiOut
Slave 8+9

ASiOut
Slave 10+11

reserved

reserved

Key

ASiSN: AS-i status nibble
ASi CN: AS-i command nibble
ASiIn Slave x+y: Input data of the AS-i slaves x and y (one nibble per slave)
ASiOut Slave x+y: Output data of the AS-i slaves x and y (one nibble per slave)

For the 12-byte process image, the AS-i data are therefore mapped to the CANopen process data objects (PDOs) as follows:

KL6201/KL6211 at CANopen couplers 3:
Mapping of the AS-i data to the CANopen process data objects for the 12-byte process image

22-byte process image

Parameter data block

See 12-byte process image.

Process data block

If the 22-byte process image was selected (AS-i slave addresses > 11 in use), dummy bytes are used for further process data (slave addresses 12 to 31). Furthermore, one further 8-byte object with process data is created for the slaves from 16 to 31 in index 0x3000 or 0x3100 and mapped into the next free PDO.

Process data block

Byte 0

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

...

Byte 15

ASiSN +
ASiIn Slave 1

ASiIn
Slave 2+3

ASiIn
Slave 4+5

ASiIn
Slave 6+7

ASiIn
Slave 8+9

ASiIn
Slave 10+11

...

ASiIn
Slave 30+31

The next RxPDO (PLC -> KL6201/KL6211) contains the AS-i command nibble (ASI CN) and the AS-i output data:

Process data block

Byte 0

Byte 1

Byte 2

Byte 3

Byte 4

Byte 5

...

Byte 15

ASiCN +
ASi Out Slave 1

ASiOut
Slave 2+3

ASiOut
Slave 4+5

ASiOut
Slave 6+7

ASiOut
Slave 8+9

ASiOut
Slave 10+11

...

ASiOut
Slave 30+31

Key

See 12-byte process image.

Accordingly, in the 22-byte process image the AS-i data are mapped to the CANopen process data objects (PDO) as follows:

KL6201/KL6211 at CANopen couplers 4:
Mapping of the AS-i data to the CANopen process data objects for the 22-byte process image

38-byte process image

Parameter data block

See 12-byte process image.

Process data block

If the 38-byte process image was selected (AS-i slave addresses > 32 are used), a further 8-byte object with process data for AS-i slaves 33 to 63 is created in index 0x3000 or 0x3100 and mapped to the next free PDO.

Mapping of the AS-i data for slave addresses greater than 32 to the additional CANopen PDO for the 38-byte process image looks as follows (PDO n, PDO n+1, PDO n+2 as for the 22-byte process image):

KL6201/KL6211 at CANopen couplers 5:
Mapping of the AS-i data to the CANopen process data objects for the 38-byte process image

Mapping example

A BK5120 (Bus Coupler for CANopen) has

PDO

Data contents (mapping)

Object
directory

PDO

Data contents (mapping)

Object
directory

RxPDO1

5-byte digital outputs 1..48

0x6200,
SI 1...5

TxPDO1

8-byte digital inputs 1...64

0x6000,
SI 1...8

RxPDO2

8-byte analog outputs 1..4

0x6411,
SI 1...4

TxPDO2

4-byte analog inputs 1...4

0x6401,
SI 1...4

RxPDO3

4-byte serial interface

0x2900,
SI 1

TxPDO3

2-byte digital inputs 65...78

0x6000,
SI 9...10

RxPDO4

6-byte encoder outputs

0x2D00,
SI 1

TxPDO4

analog inputs 5 and 6

0x6401,
SI 5..6

RxPDO5

8-byte AS-i master 1: parameter data block

0x3100,
SI 1

TxPDO5

8 bytes: 4-byte SSI and 4-byte serial interface

0x2800,
SI 1...2

RxPDO6

8-byte AS-i master 1: Process data block outputs ASI slave 1...15

0x3100,
SI 2

TxPDO6

6 bytes encoder input

0x2C00,
SI 1

RxPDO7

8-byte AS-i master 1: Process data block outputs AS-i slave 16...31

0x3100,
SI 3

TxPDO7

8-byte AS-i master 1: parameter data block

0x3000,
SI 1

 

 

 

TxPDO8

8-byte AS-i master 1: Process data block inputs AS-i slave 1...15

0x3000,
SI 2

 

 

 

TxPDO9

8-byte AS-i master 1: Process data block inputs AS-i slave 16...31

0x3000,
SI 3

Access to the parameters of the KL6201/KL6211

The KL6201/KL6211 parameters are accessible via the parameter data block in the first receive process data object (RxPDO) and transmit process data object (TxPDO).

General examples for parameter access can be found in Chapter Access to AS-i parameters.