Showing results for 
Search instead for 
Did you mean: 



Dear friends,

                 My problem can be stated as follows,

I want to continuously monitor one of my analog input channels, when input is less than 1V one of the analog outputs gives .5V,then when the input reaches/crosses 1V I need the analog out to switch to 0V then wait for 5 sec and then the analog output should give 2V constantly for 10sec, and during that 10secs I need to store whatever coming to the analog input channel in a file. I'm using NI-6009 DAQ. Just got the module yesterday.I could switch from from one level to other but kindly help someone to include the time delay and storing option.I've attached the file.


(I've in this program used loopback only for testing. knob 1 & 2 sets the voltage levels x gives the voltage point when switching occurs)

0 Kudos
Message 1 of 3

If you open LabVIEW (2012 or 2013) and choose Create Project, you can create two Projects from Templates -- a Simple State Machine, which shows you how to organize your thinking for "do this, then when that happens, do that", and the Queued Message Handler, which allows two sections of code to work independently yet communicate with each other (very useful when "do this" is something like "Wait 5 seconds then ...".


If you create a Project from each template and study the code that is produced, especially reading the documentation, you should have all of the tools you'll need to complete your project, and will have the satisfaction of doing it by yourself.

0 Kudos
Message 2 of 3

Thanks for your reply. I'll definitely go through the state machines. Though I don't have labview labview 2012/'13, standard state machines in 8.5version I guess will serve the purpose.

But here is what I could design. Please see the attachment. This program switches from one level to another with time delay.But the switching isn't instataneous. I need the analog input that is compared with constant 'x' to change as soon as its input (given by knob 4 in loopback mode)becomes greater than x. But with this confign it switches only after a whole loop delay.

It would be extremely helpful if someone can provide some suggestion with this design. Till then I'll try out with the state machines.


0 Kudos
Message 3 of 3