From 04:00 PM CDT – 08:00 PM CDT (09:00 PM UTC – 01:00 AM UTC) Tuesday, April 16, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

How to have variable time (intermittent time) data logging, with a real time display

Solved!
Go to solution

I am a complete Labview novice. We are currently developing a piece of hardware in the laboratory to automatically take concentration readings of a sample, via correlations with voltage readings.I have read and worked through the getting started with Labview .pdf, but other than that my knowledge is minimal. I have a working flowsheet which is able to do this correctly and display and write the data in real time. However, I want to be able to write to a file only every 10 mintues or so, since the experiments can run for many days and amount of data it currently logs is unncecessary.

 

It would be nice if it could write it in columns like this:

 

[date time]  [ave voltage]  [concentrations]

xx                     xx                        xxx

xx                     xx                        xxx

xx                     xx                        xxx

 

 

...but only every 10 minutes. Or at any time interval I set.

I have tried linking different parallel loops but I fail miserably. I'm sure that this is a relatively simple problem for you guys to help me with.

 

I have attatched the file. Please note that the variables.txt file is simply there to hold the parameters for the concentration correlation, which it loads from it.

 

Also, any other tips or advice to make this better would be greatly appreciated.

 

Message Edited by mooray on 02-12-2010 03:16 AM
Download All
0 Kudos
Message 1 of 5
(3,506 Views)
Solution
Accepted by topic author mooray

Hi mooray,

 

I only took a quick look at your code, but you should be able to do something like this:

 

disable_write.png

 

where you have an Elapsed Time Express VI that is set for 600 seconds (10 minutes). So every 600 seconds the Time has Elapsed output will pass out a TRUE boolean which will enable the Write To Measurement File Express VI. Therefore, in that iteration of the while loop, you would write whatever input is coming into the Signals input of the Write To Measurement File.

 

There are other ways to do this as well, but this is a pretty simple one. Hope this helps!

 

Thank you for choosing National Instruments.

 

Aaron P

National Instruments

Applications Engineer

http://www.ni.com/support

0 Kudos
Message 2 of 5
(3,478 Views)

Thanks Penata!

That definitely solves my problem.

 

Could I please ask one other thing though. I wish to write the date and time to the file along with the voltage and concentration signals. Is it possible to convert a date-time stamp to a signal and then merge it to the existing signals? I attempted to do this but was unable to.

 

Regards

mooray

0 Kudos
Message 3 of 5
(3,448 Views)

You must not have used the 'Upload or Insert an Image' on the toolbar since your images do not appear - they are linked to your hard drive.

 

You removed all timing information by using the From DDT and DC/RMS functions. Since you are using express VIs, perhaps the Express Amplitude and Level Measurements is what you should be using. Otherwise, you will have to convert the dynamic signal to waveform data type, get the to/dt with the Get Waveform Components and after your analysis, convert the DBL arrays to waveform data type with the Build Waveform function.

0 Kudos
Message 4 of 5
(3,444 Views)

Thanks Dennis. I have changed it to use the Express Amplitude and Level Measurements block. It works much better and I see what you mean with respect to how it keeps time information now.

 

Somone here on campus has been able to show me how to add date/time to the data logging, so that is no longer a problem.

 

 

Regards

mooray

0 Kudos
Message 5 of 5
(3,411 Views)