03/15/2023

Ethercat: Use AoE with IO-LINK devices to Read Write Parameters

Disclaimer

The Goal is to read/write AOE parameters over IOLINK devices. The System topology is shown below:

cttrlXCORE IO-link Setup

Requirements

Needed devices, Apps:

  • ctrlX CORE.
  • An IO-LINK device, for this guide we're using a SICK MPB10 IO-LINK sensor.
  • An Ethercat IO-LINK master that supports AoE.
  • PLC and ETHERCAT apps.

STEP1: IO project

Once we have all connected we have to install the right device descriptives using the Device Repository menu.

Add device ctrlXIO

Once the device is installed we need to scan the network and parametrize the IO-LINK realtime channel. To be able to use AoE we need to check that the device has AoE over his own menus otherwise it means that the device does not support the feature.

AOE supported IO-LINK device

Download the Ethercat configuration and and Open the PLC engineering:

STEP2: PLC engineering software

The first operation we need to do is to import the right library: the CXA_ETHERCATMASTER. Inside there are the AoE function blocks together with the Examples, this guide is based over them.

AOE ETHERCAT codesys library

 

To Read and Write the Parameters we need first to get our IO-LINK master NetworkID, for that we need to use the IL_ECATAoEGetConfigInfo Function Block. The function blocks takes as input the device Ethercat address and Answers with the Network ID address. 

Read configuration AoE

Once we have the network ID we need to insert it inside our IL_ECATAoERead FB as well as the other parameters needed:

  • Adress of a string containing the ethercatmaster mastername.
  • NetID (got before)
  • Target port: calculated as 16#1000 + the number of the IO-LINK
  • Index Group: 16#F302 which is always the same
  • IndexOffset: calculated from the address and subaddress of the parameter we want to read.
  • Our Destination variable size and adr.

The size of our variable should be equal to our parameter size atherwire the read procedure can go wrong, ending with an error. Down we can see all the parametrizations we created.

AOE blocks configuration

For this test we used the parameter number 16 obtaining the device vendor name, the write function is just like the read function, uses the same parameters but works in the opposite direction.

Parametrize FB AoE Blocks

 

I leave the example here attached. Have FUN  😎

1
MPB10_Sick.zip
7.32MB

Latest published/updated articles

Types
How-to
Categories
IOT
PLC
Attachments
Project