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: 

Continuous timestamp wusing "Write to Measurment File"

I am traying to log continuous data using the VI "Write to Measurement File" but the time stamp is not appropriate for my aplication. I follow the instructions in this post: http://digital.ni.com/public.nsf/allkb/68806B93A21355E98625726F0064822B but this is for the start timestamp and I would like to get a time stamp for every measurement. Is this possible?

 

Thanks

Juan

0 Kudos
Message 1 of 4
(2,163 Views)

Hi jfgallego,

 

There isn't a way to make the Write to Measurement File.vi function output a timestamp for every data point other than using the method that you linked and only collecting single samples at a time. You could use the rate at which you are collecting the data and the initial time stamp to calculate the time the measurements were made, but you will have to build an array to link those values in with your data measurement.

 

Regards,

Peter W.

0 Kudos
Message 2 of 4
(2,136 Views)

Thanks Peter. I'll try that. However, is there other vi, other tan "Write to Measurement File" that allows me to write into a file with a timestamp?

 

Take care

Juan

0 Kudos
Message 3 of 4
(2,130 Views)

Hi jfgallego,

 

I would recommend using the Write to Spreadsheet File.vi, which is in the Functions Palette under Programming » File I/O. That's what I use to write to files, it will take a little bit more setup but has a lot more options than the Write to Measurement File Express VI. Like I mentioned in my previous post, you will have to build the data into an array (and convert it from Dynamic Data to Double or something else) that includes the timestamp, and then you can write that array to many different types of spreadsheets depending on what you are looking for.

 

I would go through some of the examples on our website to become familiar with how to program using this function, I linked a search for "Write to Spreadsheet File" below that should get you started.

 

http://search.ni.com/nisearch/app/main/p/bot/no/ap/tech/lang/en/pg/1/sn/catnav:ex,ssnav:dzn/q/write%...

 

Regards,

Peter W.

0 Kudos
Message 4 of 4
(2,117 Views)