This article shows how to setup the communication configuration between the EtherCAT master of the ctrlX CORE and an S20 EtherCAT bus coupler with S20-IOL-8 IO-Link Master using the EtherCAT App and the PLC App with S20 configuration libraries so you can read IO-Link sensors on the Data Layer.
ctrlX CORE with system image 1.18 or higher
EtherCAT App version 1.18 or higher
PLC App version 1.18 or higher
ctrlX WORKS version 1.18 or higher
Familiarity with connecting to and setting up a ctrlX CORE
EtherCAT Master IO Configuration
In ctrlX IO Engineering, scan for devices and apply them to the IO project. Then under the S20 EtherCAT bus coupler, manually add the S20-IOL-8 module. Make sure all devices on the EtherCAT bus coupler are in the correct order.
Then download the configuration to the ctrlX CORE. If the 'D' status indicator LED on the S20-IOL-8 module is not active at this point, cycle the EtherCAT master.
In the PLC engineering software, add the EtherCAT master info to the Data Layer.
Enable the S20-IOL-8 in the Data Layer.
Add the CXA_S20 library, then add the example code for IH_S20IOL8SetPortConfig and IH_S20IOL8GetLivePortList, in the IOL8 folder, to a POU in your program. You only need one instance of IH_S20ComConfiguration.
Remember to add the configuration POU to the Main_task.
After building the code, Login to the ctrlX CORE and download the code. Execute IH_S20IOL8SetPortConfig to activate the IO Ports on the S20-IOL-8 IO-Link Master. Then execute IH_S20IOL8GetLivePortList. The array assigned to IH_S20IOL8GetLivePortList will now contain the configuration data for all IO-Link sensors connected to the S20-IOL-8 IO-Link Master.
Use the data acquired from the array tied to IH_S20IOL8GetLivePortList to populate the array tied to IH_S20IOL8SetPortConfig. Then execute IH_S20IOL8SetPortConfig again to load the correct port configuration data. In the array tied to IH_S20IOL8SetPortConfig, any unused ports should be disabled to avoid an error signal on the S20-IOL-8 module.
... View more