LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Which type of framework/architecture is best for acquiring data and handling front panel events

Solved!
Go to solution

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?

0 Kudos
Message 1 of 4
(2,135 Views)
Solution
Accepted by topic author rk_t

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.


GCentral
There are only two ways to tell somebody thanks: Kudos and Marked Solutions
Unofficial Forum Rules and Guidelines
"Not that we are sufficient in ourselves to claim anything as coming from us, but our sufficiency is from God" - 2 Corinthians 3:5
Message 2 of 4
(2,114 Views)

I would suggest Producer/Consumer Design Pattern (events). You can have multiple consumer loops and each loop can have a design pattern (state machine, …)

 

Ben64

0 Kudos
Message 3 of 4
(2,113 Views)

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

0 Kudos
Message 4 of 4
(2,079 Views)