LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How do I activate my cDAQ-9172 to output 12V to a pin persay on a circuit board without using a boolean switch?

I am new to Labview and have been playing around with it, I am developing a test procedure for a production board at my company. The first test needed to be ran is just simply providing 12V to a certain pin on the board, so far the only way I know how to do that is by using a boolean switch wired to the data input of the DAQ which is setup as a sourcing digital output. I want the Labview to automatically supply the 12V to the pin as soon as I run the VI without having to click on a boolean switch????? Help....
0 Kudos
Message 1 of 12
(2,583 Views)

It's not clear whether you have a hardware issue or a programming issue at the moment.

 

Since you said " I know how to do that is by using a boolean switch wired to the data input of the DAQ which is setup as a sourcing digital output" I believe your only issue is the programming aspect.

 

Take what you've done with the boolean switch going to the "data input of the DAQ" (which I am reading as the DAQ or DAQmx function in your VI).  Right click and change the Boolean switch to a constant. Set the constant to True.  Make this all part of any initialization sequence or frame that will run first when your VI starts.

0 Kudos
Message 2 of 12
(2,573 Views)
K I actually figured the boolean constant out shortly after I posted that message...now I have a new question. With the boolean constant set to true as soon as the VI turns on the 12V is applied to the pin which is great...but when you stop the VI the 12V is still being applied to the pin which is not what I want...so how do I program to make suere the 12V is applied when the VI is run but when I stop the 12V is no longer supplied????
0 Kudos
Message 3 of 12
(2,565 Views)
Same thing, but make a false constant.  And have that function execute outside your program's while loop in a way so that it is guaranteed to happen last.  This could either be the last frame of a flat sequence, or an error cluster wire that is sourced from inside the while loop.
0 Kudos
Message 4 of 12
(2,559 Views)
I did not understand any of that, sorry new to labview...want to try again???? Or someone else please help that may be a little more descriptive
0 Kudos
Message 5 of 12
(2,550 Views)
Easiest way to describe it is to show it.  And the easiest way to show it would be for you to post whatever is in your VI so far.
0 Kudos
Message 6 of 12
(2,547 Views)

Here it is using the error cluster wire.  I cleaned up the code a bit.  There was no reason for the number of sequence frames you had.  And I despise the stacked sequence as it hides code.  Always use a flat sequence when necessary.

 

There isn't any need to use an Express VI for a time delay.  The Wait (ms) function is much cleaner to use.  I also eliminated the lost constants and Express VI's that were hanging out in space.

0 Kudos
Message 9 of 12
(2,528 Views)
The reason I have a stacked sequence is because like I said before I am going to be conducting several tests such as applying 12 V to various pins and checking voltage at various pins and applying GND to various pins one step at a time...is this the right approach???
0 Kudos
Message 10 of 12
(2,521 Views)