キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

subVI

Hello guys,

 

I am facing a basic problem in using subVI. In the subVI, I let the LED lights switch to flash periodically. Then I would like to use this subVI in other VI, but no output in the main VI. I highlighted the process and found out the data flow stuck at the subVI. I think it is because the data flow can go through the subVI only after it finished, since the while loop inside the subVI does not stop, the subVI could not finished. Is there any solution about this problem? Thanks a lot! 

すべてをダウンロード
0 件の賞賛
メッセージ1/9
3,943件の閲覧回数

The subVI probably should not have a continuously running subVI.

 

One option is to use a queue or notifier to send the data to the main VI.  But I still question your architecture.



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
0 件の賞賛
メッセージ2/9
3,935件の閲覧回数

so, you mean, in my case, I should not use subVI?, use the code in the main VI directly?

0 件の賞賛
メッセージ3/9
3,903件の閲覧回数
No, that is not at all what was said. What was said and what I agree with is that the subVI should not have the loop. The simple solution is to have a loop in the main VI.
0 件の賞賛
メッセージ4/9
3,896件の閲覧回数

I see. But what about I need to repeat this loop several times? I have to repeatly use the loop in the main VI?

0 件の賞賛
メッセージ5/9
3,891件の閲覧回数

@phyyu wrote:

I see. But what about I need to repeat this loop several times? I have to repeatly use the loop in the main VI?



Yes.  By definition that is what a loop does.  To repeatedly use it.

0 件の賞賛
メッセージ6/9
3,882件の閲覧回数

well, I don't think it is a good idea to use a several same function loops in another big loops...

0 件の賞賛
メッセージ7/9
3,876件の閲覧回数

You take the loop out of the subVI.  Put the loop in the main VI.  This is what Dennis was telling you.

0 件の賞賛
メッセージ8/9
3,861件の閲覧回数

thanks guys, I will try.

0 件の賞賛
メッセージ9/9
3,858件の閲覧回数