LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

sub VI

 

Hi

   Now I am confused by a problem. I want to converse the VI to sub VI, but when I did it, it can not work very well. I need your help.

 

 

Best regards

 

 

vivian

0 Kudos
Message 1 of 7
(3,372 Views)
Hi Vivian,

I'm not sure exactly what you are asking but just looking at your code quickly I see that your while loop will continue forever since you have a FALSE constant wired to the stop terminal.

David
0 Kudos
Message 2 of 7
(3,363 Views)
Your question does not make any sense. The VI you posted does not have any subVI in it. Also, saying 'it can not work very well' is not a good description of a prblem. Be specific in explaining what does and what does not work.
0 Kudos
Message 3 of 7
(3,362 Views)
What was it that did "not work very well"? Also, what exactly are you trying to do with the VI? I have a suspicion by just looking at it that it's far more complicated than it needs to be.
0 Kudos
Message 4 of 7
(3,357 Views)

Hi

 I want to create the VI to sub VI. What I want to say is that when the VI is created sub VI, it can not achieve the function in the host VI. I did not send the host VI, this VI is that I want to create to sub VI.

Vivian  

0 Kudos
Message 5 of 7
(3,325 Views)

Hi, as mentioned in above thread, modify your While Loop so that it can stop when the condition reaches. Then convert into Sub VI. Either run while loop once or limit with Array Size or from external condition. By that way the sub VI can finish its execution and the main VI can proceed further.

0 Kudos
Message 6 of 7
(3,320 Views)
Hi,

I've had a go at tidying your vi up, see the attachments and comments within. It still will not work though, you need to wire the stop terminal of the while loop so that it will stop when you want it to. At the moment it will just loop forever becasue you have a False constant wired to a 'Stop if true' condition.

Also, if you want to pass values to/from sub vi to from your main vi you will need to wire up the connector pane on the front diagram.

Hope this helps

Dave
Download All
0 Kudos
Message 7 of 7
(3,297 Views)