How to read EPIC Quality indicator via Codesys

How to read module quality in opto22 epic pr1 via OPCUA. I am using CODESYS for programming. Plz help us for our project

Our GROOV EPIC PR1 version: 3.6.0-b.32
CODESYS : V3.5 SP17 PATCH3

Welcome to the OptoForums!

Lets page @greichert to the thread to get some help on this question.

you have to use the MMP functions(Opto 22 Codesys Library Package 3.0.0 minimum), then you can access the module and channel quality codes.

I have a sample project showing how to do this:
image.png

You can find the MMP address using groov Manage->I/O->I/O Services->MMP Calculator. Then select the type(digital/analog/input/output), set the module and channel position, and then you will see the MMP address required for quality:

hello Greichert
As per your suggestion I check your given program. Same program I uploaded in my OPTO. Quality bit MMP address is also put in it. Can you tell us what’s my mistake there.

@projects: if you look at the documentation in the Opto 22 CODESYS library, it says that the xExecute bit on the MmpClientReadBlock function block needs to see a rising edge to start the read, meaning it has to see that bit flip from false to true. The way you have your code written, it’s only going to see that bit flip when the client connection is interrupted and restored.

One thing you could consider depending on the number of modules for which you want to read this bit: read the value over Modbus TCP. The Modbus configuration information is displayed in your second screenshot. If you set it up that way, the reading/refreshing of the quality bit is handled in the background and you can just worry about what to do with that information in your logic.

1 Like