LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

smoke alarm

The relay is latching you mean? IT latches and you have to set a false to turn it back to false probably. 

Certified LabVIEW Architect
Certified Professional Instructor
0 Kudos
Message 21 of 22
(434 Views)

Several problems.

 

1.  You have a weird combination of DAQ Assistants and lower level DAQmx functions.  You should only be using one or the other.  Since you are never using the Data inputs or outputs of the DAQ assistants, you should just eliminate them and use the lower level DAQ functions.

2.  Your 2nd while loop runs forever since you have a False constant wired to the stop terminal.  The only way to stop your VI is to Abort it.  That is not good.

3.  You have a sequence structure that really isn't needed.  Because of dataflow, the 2nd while loop will always execute after the 1st while loop ends.

4.  Your inner most while loop in that 2nd frame really doesn't change much.  The only way that executes is if the Boolean wire coming in is true.  Once it is true, it is always true because it is based on the value coming out of the first while loop.  You never read your digital input line again to see if it ever changes from True back to False.  This is why you never see anything change.  Along with the fact that if that wire did somehow magically change to False while the 2nd while loop is running, you would never change your power supply or digital output because that code is stuck in the True case.  The False case never executes.

 

I have a feeling you don't understand dataflow, which is how LabVIEW passes data among the different parts of the VI.  I would recommend looking at the online LabVIEW tutorials
LabVIEW Introduction Course - Three Hours
LabVIEW Introduction Course - Six Hours

Message 22 of 22
(431 Views)