Multifunction DAQ

cancel
Showing results for 
Search instead for 
Did you mean: 

having problems with simple labview program

This task was seemingly simple yet I am having problems.
 
I guess mainly, I don't understand how to handle simple sequential logic with Labview because it doesn't have a concept of reading one line of code to the next.
 
Pseudo code for my program would be
 
While (user does not hit stop button)
{
 
output 5v
wait 10 minutes
output 0v
wait 20 minutes
 
}
 
My first problem is that I don't know how to overwrite the first value of 5v for the output with the express VI. Secondly, I can't get the VI to read in sequence like I want it to, instead it just starts everything at once.
0 Kudos
Message 1 of 3
(2,926 Views)

The ability to 'reading one line of code to the next' is absolutely inherent to LabVIEW. LabVIEW is a dataflow language and to control sequencing, you just have to have data out from one function wired to data in of the next function. The easiest way to do that is to use the error in/error out connections that all of the express VIs (and the majoirty of all other functions) have. In your case, wire the error out of the first express VI to the error in of the Delay function, error out of this to the error in of the next express VI, etc.

With delays of 10 minutes, you might want to use something other than the Delay function. If you do add a stop button to your while loop, it would take up to 10 minutes for the loop to stop. Do a search of the LabVIEW forum for methods to abort a wait.

You might also want to check the resources available for learning LabVIEW at http://zone.ni.com/devzone/cda/tut/p/id/5199.

p.s. In the future, it's better to ask general LabVIEW questions in the LabVIEW forum instead of multifunction DAQ.

0 Kudos
Message 2 of 3
(2,923 Views)
Thank you for the reply.
 
I posted this in the DAQ forum because of the issue with the DAQ asst. express VI.
0 Kudos
Message 3 of 3
(2,920 Views)