How to read primary data from P+F UC1000 Sensor Using AXL SE IOL4 and IOL_Basic_7?
Hi everyone,
I'm working with the AXC 1152/2152 controllers and integrating them with AXL SE IOL4 modules. I've installed the IOL_Basic_7 app to facilitate this process. My current task involves reading process data input from a series of (three) Pepperl+Fuchs Ultrasonic sensors UC1000-18GS-IUEP-IO-V15 (and UC500).
From what I understand, when accessing primary process data, setting an Index number isn’t necessary. However, to read or write specific parameters, an Index number with a corresponding Subindex number would be required.
Additionally, the P+F IOL parameters datasheet notes that process data input content can also be accessed using the parameter ‘Process Data Input’ at index 40 (0x28).
My focus is on reading the measurement value (level indication) of the sensor. I'm uncertain about how to properly configure this, as the documentation leaves some gaps for me. It appears that for the Index number, a WORD data type should be entered into wIndex, and for the Subindex number, a BYTE should be entered into bSubIndex. Inputs of 0.1 or 1 are not accepted as Subindex.
Does anyone have suggestions on how to correctly use the function block to get the proper data readout?
The help file also mentions an ExampleMachine function block – is this necessary in this case?
I can only copy this 'ExampleMachine' function block from the sample project file -- it's not available for me within the Compononents > Programming > AsynCom or Compononents > Programming > IOL_Basic_7 tree, on the.
Moreover, there seems to be a need for the AsynCom function block. I'm unsure if wSlot and bSubSlot need to be manually entered, or if they are read automatically. The help file mentions: wSlot WORD Module number (found in the bus configuration under the Axioline settings of the module, adapted when the block is activated) and bSubslot BYTE Module sub number (also found in the bus configuration, adapted when the block is activated).
Or is this AsynCom function block getting this data from the ExampleMachine function block, and is the IOL_COM function block getting it's data from the AsynCom? Is ExampleMachine optional, is AsynCom optional?
My IOL module appears on the third line of the Device List, and for this module, the bSubSlot ranges from 1-4. How can I determine the necessary WORD or BYTE values if they need to be entered? In the IOL_COM function block, you can specify with iPort which port you want to read – but it must be clear which module/device this port can be found on.
I felt like I made some progress, but no it’s still not clear what else I need to do to extract the desired data from the sensor using IO-Link. I'd like to know how this works and I’m looking for some guidance to navigate this setup successfully.
Thanks in advance for your help.
Comments
If you add your IOL module to the hardware configuration, it should appear in the Axioline hardware list (at the bottom of your project). In my example, I have a LB6-20ILWCBW stack light. Double-click on this item and it will bring up the details page. There is a tab called "Data List." This will be where your process data is mapped. In my example, I have mapped the variable iol_patlite_out. Your process data will look different; this depends on the IODD file that you (hopefully) imported.
If you want to read / write to other items (index, sub-index), you can use the PDI_READ or PDI_WRITE commands that are built in. Here is an example where I am changing Index 810 Subindex 0.
Hope this helps,
SFW
Hi Steve,
Thanks for the detailed guidance on adding the IOL module/device to the hardware configuration and accessing the "Data List." I followed your instructions to add my IOL device (sensor) and had already added the Axioline Smart Element IOL module. However, I encountered a significant issue when trying to import the IODD file, which is crucial for mapping the process data as you described. Each attempt to import results in PLCnext Engineer crashing with an error stating, "Unable to parse struct, label or offset expected!" This issue persists in both versions 2023.3 and 2024.0.2, despite the XML file having no validation errors.
Regarding the PDI_READ and PDI_WRITE commands you mentioned, I am unable to find these blocks in my current PLCnext Engineer environment. It appears they might be part of a specific library that I haven't installed yet. From what the PLCnext Engineer Help suggests, it seems they should be built-in. Could you clarify if these are included in a standard installation or require additional components? Where exactly can I find these function blocks?
Searching the PLCnext Store on "PDI" leads to the AsynCom_9 library, but that's already added to the project via the IOL_Basic_7 library. AsynCom:
The function blocks of the AsynCom library are working as an interface between function blocks which are intended to communicate acyclically and bus system dependent firmware function blocks (PCP_CONNECT, PCP_READ,
PCP_WRITE, PDI_READ, PDI_WRITE, RDREC, WRREC). The standard udtAsynCom exchange structure can be used to control acyclic writing or reading. The AsynCom function block, compatibly selected for the bus system, uses the information from the exchange structure and sets the communication by controlling the firmware function blocks internally.
Additionally, your example with the LB6-20ILWCBW stack light and mapping variables like `iol_patlite_out` was very insightful. However, without a successful IODD import, I can't see any variables to map.
You mentioned using the PDI_READ and PDI_WRITE function blocks; are you able to manage everything without the IOL_Basic_7 library?
One more thing: when I check the Parameter/Settings of the IOL ports on the AXL SE IOL module, the default setting for operation mode is DI, with other options being DO, IO-Link, and disabled. It seems odd that DI is the default for an IO-Link module.
I would appreciate it if someone from Phoenix Contact, reading this, could look into the IODD import issue.
Thanks again for your help. I look forward to your suggestions on these points.
Best regards,
Michel
IODD files Pepperl+Fuchs UC-18GS sensors: https://www.pepperl-fuchs.com/global/en/classid_186.htm?view=productdetails&prodid=91868#software
Hello, I checked the IODD file from Pepperl & Fuchs with the official IODD Checker Tool. The IODD file has some problems:
I suggest you contact Pepperl & Fuchs for an updated IODD file.
The PDI_READ and PDI_WRITE should be in the PLCnext Engineer without adding any libraries.
For my IO-Link applications, I have only used the PDI_Read and PDI_Write functions; I have not tried the other library you mention.
Here is where they are in the COMPONENTS list.
You can always use the search function at the top of the COMPONENTS tree:
PS: I tried to import the IODD file you mentioned (I downloaded it from the P-F USA website). I have the same issue with the program crashing.
SFW
Hi Steve,
I'm unable to find anything when searching for "PDI", when I'm inside my project.
Also, the "PLCnext Controller" is missing under components in my project file.
Interestingly, when I start a new project, it appears, and searching "PDI" shows results for the two components/function blocks you mentioned.
It's strange that I can access the "PLCnext Controller" components in a new project but not in the one I'm currently working on, even though I created both projects the same way. I can't find any options to delete or add these components.
@Stefan, thanks, I'll reach out to Pepperl + Fuchs regarding this issue.
PLCnext Engineer projects created from one of the 1152 templates contain the PLCnext Controller library by default:
If this library is deleted, then the PDI function blocks will disappear.
It's possible to add this library again using the Add Library ... menu option:
Okay, thank you, Martin. That helps. Both PDI components are now available.
The IODD file issue has been reported to Pepperl+Fuchs, and my contact will forward it within their organization.
Just received a reaction from Pepperl+Fuchs:
The wrong IODD Checker was used. The sensor does not have v1.1.3, so IODD Checker version 1.1.2 must be used instead.
Here you can find the latest 1.1.2 version:
https://io-link.com/share/Downloads/authenticated/IODD_V1.1.2_Checker_V1.1.4_R2.zip
With this version, the check no longer shows any errors.
@Stefan Brinkmann
Hi Stefan,
Could you take a look at this? It seems that the IODD file is not causing the issue, yet it results in a shutdown of PLCnext Engineer.
Thanks,
Michel
Hi, I have the same issue when I try to install the IODD file. I think this needs to be addressed to the development team.
@Martin PLCnext Team Can you please forward this to the PLCnext developers?
The developers are aware of this issue (ref for Stefan: #278640).
Thank you.