LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

read data continuously, record at different interval

I would like to perform calculations on my data continuously, but have
a different record interval, such as every 15 minutes, every hour.

How do I condintionally write to my array at the given interval?

I am in a while loop and can create this in 2 while loops. I am
trying not to have to wait for the write loop to complete to stop
program execution. I don't want to wait up to 1 hour after I tell the
program to stop to actually stop.

I don't care if I get the last reading.

Thanks

Terry
0 Kudos
Message 1 of 6
(2,897 Views)
Use a case structure inside the second while loop to control when the code for writing the data executes.
Message 2 of 6
(2,897 Views)
Oops - a little too quick with the upload - need to change the logic for the case structure execution.
Hope this works this time.
0 Kudos
Message 3 of 6
(2,896 Views)
THANK YOU! THANK YOU!

I knew the logic, but couldn't transfer my old line style programming logic to LabView. It works like a charm. I have even changed the write interval to a control and put it on the front panel, it works great.
0 Kudos
Message 4 of 6
(2,896 Views)
OK, got it into my code, but having a little logic problem.

I store my info into an array and am writing to it from the true case. However, I don't want anything stored during the false case, so how do I wire it up so that it doesn't add a line during the false case.

I have attached the file. It is very messy, crossed lines and such, but once I get the logic, I will redo it neater.

Thanks
0 Kudos
Message 5 of 6
(2,896 Views)
Your are indexing the array data out of the loop - this means that the array will only be updated after the loop is finished. Try building your array within the true case, and then no tunnels will be needed to be wired out of the case structure.
0 Kudos
Message 6 of 6
(2,896 Views)