OPC tag with a query binding?

Hi There!

So I’m not sure if there is a way to do this but figured I’d ask.

The process flow is this:

  1. PLC reads a part number from a QR code and puts it in an OPC tag
  2. Ignition looks up the part number in the database and populates another tag with a test criteria
  3. PLC executes test and decides pass or fail based on the test criteria tag

How I am doing this currently is with tag event script on the part number tag, whenever a change occurs run the query and then write the result into the test criteria tag.

What I am wondering, is there a way to just do a query tag that also the PLC can have access to? I.e. Have a query tag that looks up the test criteria of whatever part number is in the part number tag and it’s value is bound to that query result?

This seems so much simpler and more elegant that having an event script to keep up with.

Thanks!
-Kelly

What you’re doing is probably the right approach. If you find yourself applying this pattern over and over then maybe a UDT could be used to cut out the duplication. Or perhaps transaction groups.

(begin daydreaming about a better future)

What you’re really trying to do is call a function (lookupCriteria(code)) from the PLC against Ignition.

In theory this could be accomplished via OPC UA methods. If Ignition allowed you to define methods in its server, then it would already be possible with some PLCs, such as the Siemens S7-1500, which have OPC UA client functionality built in.

1 Like

Sounds awesome, thank you very much! Glad to hear I’m at least on the right approach :slight_smile: