Logix Designer and IO Link Device

cdwilliams496

Member
Join Date
Apr 2018
Location
Aiken, SC
Posts
19
All,

First all that for all help in trying to help me. I am currently testing different IO link devices with an AB Control Logix PLC. I am using a Logix 5585E processor, an 1732E-8IOLM12R AB IO Link Master and a Keyence LR-TB2000 distance laser on a test rack. I have attached (2) pictures of what I have so far.

I have configured the IO master correctly and I am seeing the feeback from the laser. Where I am getting lost is how the distance is coming back from the laser into the PLC. I can see values in IO_Link_ModuleI.Ch2Data[0]0 and IO_Link_ModuleI.Ch2Data[0]1 change as I move the laser from the target. But as I move, the value in Data[0]1 go from a positive to a negative number then back to positive. The number in Data[0]0 only increases as I move away from the target.

I was expecting the distance to just be in one register instead of across two registers. And why is one number increasing and decreasing.

What PLC command do I use to merge those two data registers together for an overall distance that I can use for calculations?

Again, thanks for all the help and suggestions.

Davis

IO Link.jpg IO Link 2.jpg
 
Great question !

The Ch2Data[0] and Ch2Data[1] sub-elements are defined as 8-bit signed integers (SINT) data types, but the actual value is probably a 16-bit data type.

When you look at the low byte like a signed data type, the most significant bit is interpreted as a sign bit, rather than as 2^7 = 128.

The simple thing to do is to use a Copy Synchronous (CPS) instruction to copy Ch2Data[0] and [1] into a single tag that's an INT or DINT data type.
 
An example: what you see for the device position now is:

Ch2Data[0] = 1 (decimal) = 1 (hex) = 0000 0001 (binary)
Ch2Data[1] = 83 (decimal) = 53 (hex) = 0101 0011‬ (binary)

0101 0011 0000 0001 (binary) = 0x5301 (hex) = 21249 (decimal)
 
Or perhaps even simpler?...

In the IO-Link Master's AOP in Logix Designer, under the Module Definition, does the Connection for the I/O data support various data types? If so, you could change from SINT to INT or DINT and see how you fair?

I'm not near software to have double-checked before posting so I'll cross some appendages here.

Also, "if" you can change it, just be mindful of how it might "upset" the format of other I/O data that you may have already thought "put to bed".

Regards,
George
 
I’m not sure with keyence but banner published aoi for this exact example. Import the aoi and create your tags. The aoi takes the raw io link data and will convert it to something meaningful like a distance in a REAL format. I would look and see if keyence has anything like this on their website.

To answer your original question I don’t know that it can be answered without a lot of trial and error or without further documentation from keyence. Some devices coming from io link also require byte swapping.
 

Similar Topics

Hi all! looking for help converting an 8 bit word SINT tag into decimal. I have an IFM SBN246 flow sensor wired in my controller (L310ER) and it...
Replies
4
Views
2,161
How do I organize the template for my controls. I am new to Logix Designer but have used RS500 and RS5000. My new Logix Designer has Toolbars...
Replies
8
Views
201
Hello, Im building project with 1756-L82ES controller and 1756-IB16S card but i cant find it when trying to add the card to IO configuration...
Replies
3
Views
119
Does anyone know how to set the background colors of instuction blocks (TON, MOV, etc)?
Replies
1
Views
123
Hello all, I'm trying to use the Logix Designer SDK to upload and download a single ACD to many controllers. I got this to work fine copying...
Replies
0
Views
60
Back
Top Bottom