Captron CANEO Series10 IO-Link Control
A LinkedIn connection of mine was kind enough to send me one of the new Captron CANEO Series 10 IO-Link buttons to tinker around with. Having just purchased some IO-Link masters for my home automation lab, I was looking forward to my first real venture into programming IO-Link devices.
Here is a LinkedIn post showing the results and this article will walk you through how I got there.
Hopefully this helps someone new to this technology.
IO-Link Master - Banner DXMR90-4K
Captron Button - CANEO Series10
PLC software - Studio 5000, v36
IO Link Configurator - Banner IO Link Configuration Software
The first step was to import the correct AOIs into Studio 5000 per Banner’s documentation. I imported the AOI to control the IO-Link Master as well as the generic process data AOI. The latter is because the device being controlled is not a Banner device, so I am using the process data image to control the button.
Next I installed the EDS file from Banner for the particular IO-Link Master I was using. Then added an instance to my configuration and assigned the IP address. You will also have to find the device using the Banner IO-Link configuration software to assign the IP address of your IO-Link master.
Per Banner’s documentation of how to use their AOIs, the below lines of code needed to be added. First group is to copy in/out data, the second rung is to activate the port being used. In my case, the button is connected to port 4.
Note: The tags IOLinkStatus and IOLinkMasterPort4 were created as datatypes for their use in the below shown AOI’s.
There are several modes to control this button in. I chose to operate it in Advanced IO-Link control. This requires writing a value of 2 into parameter 293 using the Banner IO Link configuration software. The default mode is 3 - Classic Two LED Mode.
The next programming step is to write a 1 into register 283 so that port 4 is activated because, as mentioned earlier, the device I’m using is connected to port 4 of my IO-Link master. See the below screenshot from Banner’s documentation.
IMPORTANT: The process data is byte-swapped for this device. I did not find that in the Captron documentation. This was discovered by trial and error. I’ve been told by Captron that the information regarding byte swapping was added so I must have had an older version of that document.
Byte-swapping is not uncommon in the world of IO-Link, but it can be frustrating if not known ahead of time. This means the bytes of process data are in the opposite order of what is in the documentation.
The Banner documentation indicates that the first register of process output data is at 284. With byte-swapping, that corresponds to the last byte of process data, not the first.
The Captron documentation indicates that the PDO (Process Data Out) contains (6) 8-bit registers and (1) 16-bit register. Since the process data is byte-swapped, register 284 as seen above corresponds to the Effect Frequency, not the Active LEDs.
Knowing that the process data is byte-swapped, and seeing the above information, we know that the PDO is as follows:
[291/290] = Active LEDs
[289] = LED Brightness
[288] = LED Color R
[287] = LED Color G
[286] = LED Color B
[285] = LED Effect
[284] = Effect Frequency
Now I can finish writing my code and test the results. First, let’s handle the registers that need hardcoding. That would be activating port 4, setting the bitmask to activate the LED, and setting the brightness to 60%
I wanted to use this Start button in a realistic scenario. So what I programmed is a situation where the button can indicate four states:
Idle and either permissives not ok (pulsing yellow) or permissives are ok (pulsing green).
Starting, button flashes green.
Running, button is solid green.
The simulated state changes of this machine are as simple as toggling PermOK or StopCmd. See the control code below.
For that final line of code - the PDI registers are also available in the Captron documentation and the Banner documentation shows that they start at register 286 for Port 4, as seen previously in this article. Keeping in mind that they are byte-swapped, that leads us to register 294 for what is named Actuation Flag. That detects a button press.
Let me know if this helped you break into the world of IO-Link. It’s complex but once you understand it, there is a lot you can do with it.