取消
显示结果 
搜索替代 
您的意思是: 

stream data from a subvi to the main vi

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

下载全部
0 项奖励
1 条消息(共 8 条)
5,278 次查看

Hi Diatom

 

Queues would be good for such as scenario.

0 项奖励
2 条消息(共 8 条)
5,275 次查看

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.

DAQmxBuffer.JPG

 

Br,

 

/Roger

 

0 项奖励
3 条消息(共 8 条)
5,271 次查看

you could use references and refnum controls ....main.png

4 条消息(共 8 条)
5,263 次查看

Thanks to all that replied, your help is appreciated!  I will try using references and property nodes as suggested.

Regards

 

0 项奖励
5 条消息(共 8 条)
5,206 次查看

Do you need to act on all the data? Or are you just concerned with current values?

Certified LabVIEW Architect
Certified Professional Instructor
0 项奖励
6 条消息(共 8 条)
5,203 次查看

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.

 

 

0 项奖励
7 条消息(共 8 条)
5,194 次查看

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.  

Certified LabVIEW Architect
Certified Professional Instructor
0 项奖励
8 条消息(共 8 条)
5,183 次查看