From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, 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: 

input date in analogue DAQ file

Hi all,
I want to write a file with data acquired from analogue input and in first
column having date/time/secs of the measurement.
I have problem connecting the date string with the array of measurements.
any help will be great!
thank you.
0 Kudos
Message 1 of 3
(2,266 Views)
gkonstan wrote in message <8lp1cp$sfr$1@foo.grnet.gr>...
>Hi all,
>I want to write a file with data acquired from analogue input and in first
>column having date/time/secs of the measurement.
>I have problem connecting the date string with the array of measurements.
>any help will be great!
>thank you.
>
>
Arrays should contain data of the same type - you can't stick a string in an
array of double precisions.

It depends on what you want to do with the file after you've created it. If
you will be reading the file back into Labview, and you need it in 'number'
format (for graphs or something), you could use the 'get time/date in
seconds' function (which returns a huge number representing the number of
seconds elapsed since the year 1066, or something like that). You could
put
this number in your first column and then 'index array' it out when you read
the file back. You could then convert it to a time/date string if you need
to display it

Alternatively you could convert your data array to a spreadsheet string,
then concatenate your time/date string (plus a Tab) to the start of the data
string. You could either convert the resulting spreadsheet string back to an
array of strings, then index to form a 2D array of strings for your file; or
you could concatenate all the spreadsheet strings together and form a tab
delimited txt file.
0 Kudos
Message 2 of 3
(2,266 Views)
paul F wrote:

>
> >
> Arrays should contain data of the same type - you can't stick a string in an
> array of double precisions.
>
> It depends on what you want to do with the file after you've created it. If
> you will be reading the file back into Labview, and you need it in 'number'
> format (for graphs or something), you could use the 'get time/date in
> seconds' function (which returns a huge number representing the number of
> seconds elapsed since the year 1066, or something like that). You could put

I think the data you are looking for here is 1904.
Kevin Kent
0 Kudos
Message 3 of 3
(2,265 Views)