How to read a Numeric label value to a tag

I have a numeric label that is populated by a named query. I want to get this value to control another tag. What is the best way to do this? Any idea is much appreciated.

When is this control supposed to happen? (All the time? Only on user action?)

Is it always the same tag? Or does it depend on what the user is doing?

What parameters are used on the Named Query? Are they also tags, or are they only properties in the user interface?

image
Numeric label is the one shows 5 above. Query in that label uses measured time (above the numeric label) as a parameter. Numeric label values come as a machine makes a part. Once that numeric label hit a certain number, I have to turn OFF another tag to stop the machine. And yes, it's the same tag that i have to turn OFF. Numeric label query runs every 5 seconds.

This does not belong in a user interface. (What happens if the UI client crashes?)

Write a gateway timer event that runs at a suitable pace. It would run the NQ, examine any other necessary information, and write to machine tags as needed.

A user interface should never be in the middle of a control loop. User interfaces should be only writing to tags that represent configuration values or setpoints or similar. All runtime logic should be in the PLC itself (best), or in a gateway task.

1 Like

Ok makes sense to write a timer event. However, i have to select a part type in Ignition Client and machine is a CNC not a PLC and that's why i have to trigger the signal from ignition

Perfectly reasonable. Connect part-type selection UI to a memory tag to hold the selected part number or ID. This will persist if the UI closes.

Have the gateway event use that memory tag to run the NQ.

1 Like