Disclaimer
The Goal is to read/write AOE parameters over IOLINK devices. The System topology is shown below:
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.
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.
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.
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.
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.
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.
I leave the example here attached. Have FUN 😎