11-27-2017 10:30 AM
Hello,
I have a VI that continuously acquires data from an Agilent DAQ and compares them to an array of limits that can be changed. Is there a way to make it so that if any of the values in the limit array are changed, it would pops up a confirmation dialog/OK box before updating the array? Is it also possible to make it so that the VI still acquire data and uses the old array if no one press OK on the dialog box? Thanks in advance for your help!
Solved! Go to Solution.
11-27-2017 11:10 AM
You need to have 2 while loops running in parallel, one for the UI, and the other for your data acquisition. This is a typical producer-consumer design. If you search, you'll find a lot of examples. One of my recent post answered a similar question.
Good luck.
11-27-2017 11:47 AM
@MarcDub wrote:
This is a typical producer-consumer design.
Probably not really a Producer-Consumer. You can just store the limits in a global variable. The DAQ loop only reads from the global. The GUI loop reacts to a value change event on the limits control, evaluates the validity (have pop up for confirmation), and updates the global after confirmation. If canceled, use a local variable to set the limits control back to the previous value.