LabWindows/CVI

cancel
Showing results for 
Search instead for 
Did you mean: 

Acquire Time stamp data in acquision file

I am collecting one analog input as a data in ASCI text file. I would like to know how to setup time stamp data in acquisition file using CVI. Looking for idea or a simple example file for collecting data as under.


Time Data(From An Input)
08:28:55 55.67
08:28:56 57.78
08:28:57 45.63
08:28:58 57.64
08:28:59 54.20
| |
| |
| |

and so on.....


Please help.
0 Kudos
Message 1 of 5
(3,347 Views)
Hi SVP3761,

If I get you right, your question is about getting a useful time string.
See example attached.
Regards,
0 Kudos
Message 2 of 5
(3,338 Views)
Maybe I am missing part of the problem, but why cannot you simply use TimeStr ()?


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 3 of 5
(3,331 Views)
Thanks "dilution"

I looked at your code but what I was looking forward is that I am using an array to file for one analog input from sensor as a voltage input and acquire continuously data of the pressure sensor. I want to acquire time stamp data with FIRST column AND pressure data on next column for every second as shown.

I do not know how to acquire first column for "Time" and second for pressure reading as a data.

Time Pressure
1:30:00 PM 45.03
1:30:01 PM 45.04
1:30:02 PM 45.05
1:30:03 PM 45.06
1:30:04 PM 45.07
1:30:05 PM 45.08
1:30:06 PM 45.09
1:30:07 PM 45.1
1:30:08 PM 45.11
1:30:09 PM 45.12
1:30:10 PM 45.13
1:30:11 PM 45.14
1:30:12 PM 45.15

Please help

Thanks

Message Edited by svp3761 on 06-06-2005 09:35 PM

0 Kudos
Message 4 of 5
(3,318 Views)
Unfortunately ArrayToFile can treat only array of doubles, so there's no way to obtain your output file with one simple passage.

With such a low pace, you could open a text file and write down time and pressure while you are acquiring it:

handle = OpenFile ("MyOutputFile.txt",...)

while (!ProcessConcluded) {
AcquireOnePressure (); // Your acquisition
FmtFile (handle, "%s\t%.2f", TimeStr (), pressure);
}

CloseFile (handle);

It's pseudo-code, so please revise it and put proper values for function parameters.


Proud to use LW/CVI from 3.1 on.

My contributions to the Developer Community
________________________________________
If I have helped you, why not giving me a kudos?
0 Kudos
Message 5 of 5
(3,309 Views)