05-01-2009 04:03 PM
Dear all,
i am working on an application where i need to acquire data from the H/W, process it, display it on the graph, and the user later can do some modifications(like changing the senstivity, sweep speed, or filter values) on the plotted data.
I am using producer Consumer architecture to implement my program.
In the producer loop i have an event strucutre which has a timeout event(10 ms) where i acquire data from the H/W and in the Consumer loop i process the data.
So all the data i recieve from my H/W is processed and loops around in the Consumer loop.
And all the events of change in Senstivity, Sweep, Filter are in Producer loop. So where these events are occured, i need to operate on the data which is lying in the Consumer loop.
I just need to know how can i process on data which is lying in another loop. Do i need to use Variables, Graph values, or is there any more efficeint way to operate on the data?
Thanks,
Ritesh
Solved! Go to Solution.
05-01-2009 04:22 PM
In Producer/Consumer Design Pattern that Labview has, it uses a queue to transfer the data to the other loop.
So there is one answer. Use a queue.
You didn't say how big are your data or what type are those. So i will just say this: Another solution, i usually use, is to store the data in a function global (or action engine)
All your actions should start reading this, and at the end write the new value back at the function global, so it will be ready to be read by the next action
05-02-2009 04:08 AM
Hi Pnt,
Thanks a lot for your reply.
Action Engines are indeed great structures to work with. And the link to that Nugget is simply awesome for any beginner to the topic like me .
Ritesh