LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Algorithm to SubVI

I created a VI to verify that a data file is formatted correctly.  I simply created a file path control and LED indicator.  For development, I added an "OK Button" with the algorithm inside it's "Value Changed" event. 

I now want to make my algorithm a subVI.  Would it be better to remove the event loop, or should I wire the OK Button to an input terminal to call the routine?


0 Kudos
Message 1 of 2
(2,051 Views)
The latter part won't work because all that you'd be passing is the value of the Boolean, and the subVI would have no way of knowing if that's from a control or a constant. While you could pass in a control reference of the button and do dynamic event registration, that would be fairly pointless in this situation. Just have the subVI with the file path control and indicator. No event structure in the subVI. Keep the event structure in the main VI. When the user presses the button, call the subVI.
Message 2 of 2
(2,046 Views)