Digital I/O

cancel
Showing results for 
Search instead for 
Did you mean: 

generic wire input terminal to run subvi

I have a vi a contractor wrote to set all digital and DAQ card outputs to zero. It requires no input date and it runs OK. Now I want to have it executed at the end of other vi programs so the user does not need to run it. I changed it to a subvi but how do I make a generic input that will run this subvi? It would be wired to the last function of the calling vi which could be anything.

Also, how do I insure that this subvi will complete before it will allow the calling vi MS Window to be closed? Is there direct DAQ and digital card commands that will set their outputs to zero without clearing their channel configurations data?
0 Kudos
Message 1 of 3
(3,332 Views)
Hi B@T,

I suggest you post an example of the code you want to modify. I am forced to guess otherwise.

I think you want to take a stand-alone VI and integrate it into another app such that it executes after all other functions have completed.

LV uses data sequencing to control program execution order. This can be summarized as "A node cannot execute until all of its inputs are satisfied."

The current recomended LV "generic" inputs data types is the "error cluster". This can be found on the Array & Cluster palette.

Make sure the sub-VI that you want to call at the end has a Error cluster wired to the icon terminal.

You can then use that input to ensure that it is the last action performed.

I also suggest you post follow-up Q's to teh LabVIEW Gene
ral list where you will get a broader audience.


Ben

Ben Rayner
Certified LabVIEW Developer
www.DSAutomation.com
Retired Senior Automation Systems Architect with Data Science Automation LabVIEW Champion Knight of NI and Prepper LinkedIn Profile YouTube Channel
0 Kudos
Message 2 of 3
(3,332 Views)
Greetings,

All you will need to do is create an input terminal for a control on this VI. If you do not want to use one of the VI's current controls, you could add a "dummy" control and create an input terminal for this control. When you us this VI as a subVI, and wire data to the input you just created, it will not execute until it receives this input. Thus, you will need to make sure that this input receives its data after all of the other subVIs have executed.

Good luck with your application.

Spencer S.
0 Kudos
Message 3 of 3
(3,332 Views)