LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

digital output control from separate loops

Hello,

I have a control system that uses state machines to switch digital outputs to motors and actuators in a sequence.  Now, to manage interlocks and resetting, I find that I need to set some outputs low from another loop.  Basically, the outputs are in various states (on/off) and I'd like to reset them all with one pushbutton control.

Since I can't have two DAQ tasks for the same line, an alternative that comes to mind is to control all the outputs from a functional global VI that can be written to from various loops. 
An instance of this global would then be wired to the a DAQ task containing all the outputs.

Is there a better way to do this?  Some of the outputs are time critical so I don't want to slow things down.

Thanks.
0 Kudos
Message 1 of 2
(2,379 Views)
Hello. 
 
Thank you for contacting National Instruments. 
 
From the sounds of it, a functional global VI would work just fine for your application.  However, there are a few other options that you could consider.  First, you could use local variables to pass data between loops and constantly monitor whether or not the "reset button" has been pressed.  The other way that you could implement this functionality is by creating another state in your state machine that is called reset.  The value of the reset boolean will be polled at the end of every state, and the reset state will take priority over other operations.  Then, once inside the reset state, you can reset all lines to the values you would like to have. 
 
Any of these options should do the trick for you.  If I were to chose, from my limited knowledge of your application, I would choose adding the extra state to my state machine. 
 
Have a great day and let me know if you have any further questions!
 
Brian F
Applications Engineer
National Instruments
 
 
0 Kudos
Message 2 of 2
(2,345 Views)