IOLINK ctrlX SICK

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

MauroRiboniMX
Contributor
Disclaimer

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

cttrlXCORE IO-link SetupcttrlXCORE 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 ctrlXIOAdd 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 deviceAOE 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 libraryAOE 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 AoERead 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 configurationAOE 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 BlocksParametrize FB AoE Blocks

 

I leave the example here attached. Have FUN  😎

MauroRiboniMX
MauroRiboniMX
Hello, I am Mauro a ctrlX DEVELOPR at night and an Application Engineer during the day 😎 . Ask me anything about ctrlX AUTOMATION but my best topics are IoT, AI, SDK and Communication!
Must Read
Icon--AD-black-48x48Icon--address-consumer-data-black-48x48Icon--appointment-black-48x48Icon--back-left-black-48x48Icon--calendar-black-48x48Icon--center-alignedIcon--Checkbox-checkIcon--clock-black-48x48Icon--close-black-48x48Icon--compare-black-48x48Icon--confirmation-black-48x48Icon--dealer-details-black-48x48Icon--delete-black-48x48Icon--delivery-black-48x48Icon--down-black-48x48Icon--download-black-48x48Ic-OverlayAlertIcon--externallink-black-48x48Icon-Filledforward-right_adjustedIcon--grid-view-black-48x48IC_gd_Check-Circle170821_Icons_Community170823_Bosch_Icons170823_Bosch_Icons170821_Icons_CommunityIC-logout170821_Icons_Community170825_Bosch_Icons170821_Icons_CommunityIC-shopping-cart2170821_Icons_CommunityIC-upIC_UserIcon--imageIcon--info-i-black-48x48Icon--left-alignedIcon--Less-minimize-black-48x48Icon-FilledIcon--List-Check-grennIcon--List-Check-blackIcon--List-Cross-blackIcon--list-view-mobile-black-48x48Icon--list-view-black-48x48Icon--More-Maximize-black-48x48Icon--my-product-black-48x48Icon--newsletter-black-48x48Icon--payment-black-48x48Icon--print-black-48x48Icon--promotion-black-48x48Icon--registration-black-48x48Icon--Reset-black-48x48Icon--right-alignedshare-circle1Icon--share-black-48x48Icon--shopping-bag-black-48x48Icon-shopping-cartIcon--start-play-black-48x48Icon--store-locator-black-48x48Ic-OverlayAlertIcon--summary-black-48x48tumblrIcon-FilledvineIc-OverlayAlertwhishlist