LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

I created a subVI in order to output boolean status to my main VI, but I failed

Solved!
Go to solution

I created a subVI and wanted to output boolean status to my main vi, I wrote a simple code in the subVI but I fail to achieve my goal in the mainVI,

 

I know i dont have to create subVI but just one VI to do this job, however, output boolean is only one function of my work, the subVI has another things to do

 

so in order to do this correctly, what should I do?

 

Thank you

Download All
0 Kudos
Message 1 of 4
(2,736 Views)
Solution
Accepted by topic author ivy037

goto main block diagram, instructions are there...

Spoiler
mainVI.png
Spoiler
mySubVI.png
0 Kudos
Message 2 of 4
(2,723 Views)

WOW, a little complex, but i redid everything based on your instructions. you are so great.

 

So, the idea is to create a reference value in the subVI and that reference can be controlled by the subVi and the final result is reflected in the main VI

 

what's wrong with my origin method?

 

Based on your idea, i even dont have to create a boolean arrary in the subVI (see picture) and run the mainVI without problem 🙂

 

Thankyou!!

 

by the way, to master this skill, any other tutorial I can practice?

 

0 Kudos
Message 3 of 4
(2,718 Views)

no problem my friend....i would question your use of flat sequences in the sub vi., when you could use a state machine or do this that does the same thing: inserts a true/false into a bool array, the iteration looks for odd numbers and inserts a true and false for even numbered iterations @500ms wait per iteration...also, look at the tutorials

Spoiler
mySubVI.png

 use of cntrl ref....

Spoiler
mySubVI_BD.png
0 Kudos
Message 4 of 4
(2,698 Views)