11-01-2012 05:34 AM
Hi
I’m wondering if someone can help me. I’m trying to stream data from a sub vi to the main vi without opening and closing the sub vi continuously. The data also needs to be extracted from a while loop within the sub vi. background info: The sub vi controls a photomultipler tube, which once it is on it is best kept on. The PMT signal is generated in while loop of the sub vi. Attached are some basic vis showing what I’m trying to do.
Thanks
11-01-2012 06:01 AM
Hi Diatom
Queues would be good for such as scenario.
11-01-2012 06:19 AM
If you are streaming measurements continously I would consider using a circular buffer instead of the queued producer/consumer approach.
Check out this implementataion of such a buffer, use only this if your DAQ device does not have an internal circular buffer.
https://decibel.ni.com/content/docs/DOC-20403
Alternatively if you are using a DAQmx device, consider using the device buffer for sharing DAQ data between loops.
Br,
/Roger
11-01-2012 07:48 AM - edited 11-01-2012 07:59 AM
you could use references and refnum controls ....
11-03-2012 12:16 AM
Thanks to all that replied, your help is appreciated! I will try using references and property nodes as suggested.
Regards
11-03-2012 12:48 AM
Do you need to act on all the data? Or are you just concerned with current values?
11-03-2012 05:05 AM
Hi
The data will be collected from the PMT for about 3 to 5 minutes, massaged (averaged etc) and then saved for analysis. So the answer is yes all the data will be acted upon.
11-03-2012 09:54 AM
The only reason why I ask is if you use control references that will give you current data and there is a chance you might miss a datapoint. If acting on every piece of data is important, then queues would be a better approach.