08-30-2018 08:22 AM
Hi,
In my application I have to acquire various signals from a hardware in Labview as well as handle multiple front panel events.
I want the data capture to work in parallel. And front panel events like save data, plot data, etc to work an and when user wants.
I have seen many videos for queued message handlers but could not quite modify it for my application. Can anyone please suggest me a good option along with good tutorials?
Solved! Go to Solution.
08-30-2018 08:49 AM
A QMH is definitely the way to go with your acquisition loop. Your GUI loop should be a simple While Loop with an Event Structure inside to handle all of your UI events. What I like to do is then use User Events (search for them in the Example Finder in LabVIEW) to pass the data from the QMH to the GUI loop. The GUI loop can then update indicators and store what it needs to in shift registers.
I wish I had a good example to show this. But keep digging to find a good simple QMH example and build on the exact same concepts to use the User Events.
08-30-2018 08:50 AM
08-31-2018 09:31 AM
Expanding (very) slightly on crossrulz's excellent suggestion, when the GUI loop changes a parameter, it can notify the QMH by simply generating a Message ("New Sampling Rate") with the new Front Panel Value, such as "Sampling Rate", sent as the "Data" part of the Message. The QMH will simply process this Message and can update its parameters (which it is probably also keeping in Shift Registers). You now have two-way communication between these two loops.
Bob Schor