NI LabVIEW,CVI,数据采集等产品讨论区

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

顶层界面如何与子VI的数据实现同步显示。

已解决!
转到解答
我有一个子VI在while中连续采集并绘制出图形,但在顶层vi中需要同步显示出子VI中绘制的波形,该如何实现?谢谢!
0 项奖励
1 条消息(共 8 条)
6,535 次查看
子VI设置端子,连接到顶层的图形输入端不可以么?
Thomas | Xi'an China

LabVIEW 7.1 | LabVIEW 2018
DAQmx | CompactRIO | myRIO
微信公众号: 钟博士LabVIEW工作室
0 项奖励
2 条消息(共 8 条)
6,524 次查看

是这样的,子VI(SOUND DAQ.vi)中采集是在一个while循环中连续采集的,采用接线端的话,是采集的条件结束返回时,主VI才能显示出波形,但是我需要主VI中能实时显示出当前子VI中的波形以实现实时监控信号状况。

我现在使用全局变量和外部并行While循环不断的去更新波形(如图中声音频谱图),但这样感觉不太好,想问问看大家有没有更好的办法?

 

另有问题补充:在两个或多个并行WHILE循环中,如何使用一个while循环当中的按钮去结束这两个while循环?

 twoVI.JPG

Message Edited by StevenGerrard8 on 12-14-2009 05:16 AM
0 项奖励
3 条消息(共 8 条)
6,517 次查看

Create a Reference of the indicator (in caller VI), wire it to the sub VI (Sound DAQ.vi must have Reference input created too).

 

Now, in the sub VI, you may create Right-click the Reference and create property i.e. Value, and have this property updated with the Sound DAQ's data...

 

Try it out and see 😉

(Hope I did't remember that steps wrongly :p) 

 

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
4 条消息(共 8 条)
6,499 次查看

Hi,

 

Attached is quickly done up example that uses Refnum (Reference) for updating caller's control/ indicator with sub-VI's data at runtime.

 

Attention!

Please beware of how sub-VI is terminated... In this example, sub-VI stops after 10 iterations. 

Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
5 条消息(共 8 条)
6,497 次查看

A little busy this day, i appreciate your help very much, and i had notice your sample works excellent, but there are error in my program when i follow your instruction. Can you please tell me why?

未命名.JPG

Message Edited by StevenGerrard8 on 12-17-2009 10:08 AM
0 项奖励
6 条消息(共 8 条)
6,438 次查看
解答
已被主题作者 StevenGerrard8 接受

Did you pass the Reference in from the caller VI?

 

You must call the sub-VI i.e. SoundDAQ.vi once from the main-VI (caller), before you can run and debug the sub-VI alone.

If you open the sub-VI immediately after launching LabVIEW,  you will get such error as the control/ indicator Reference is not passed in to the sub-VI, yet. 

Message Edited by ian fung on 12-18-2009 09:09 AM
Ian F
Since LabVIEW 5.1... 7.1.1... 2009, 2010, 2014
依恩与LabVIEW
LVVILIB.blogspot.com
7 条消息(共 8 条)
6,428 次查看

Not try yet because i had finished the program in the gloable variant method. maybe later^_^

But thank you anyway!

0 项奖励
8 条消息(共 8 条)
6,361 次查看