cancel
Showing results for 
Search instead for 
Did you mean: 
Reply

Write to measurement file

Solved!
Go to solution

Write to measurement file

Spanish:

Hola! Estoy teniendo un problema cuando intento crear un archivo de excel con los niveles de un sistema de 4 tanques por medio del "Write to measurement file", específicamente con la columna del tiempo. Cuando se crea el archivo de excel aparece correctamente el nivel de los tanques, sin embargo, la primera columna "time" aparece en la primera fila una fecha y hora dada y el resto de filas aparece 00:00:00:00. Lo que me gustaría es que cada fila contenga la fecha y hora a la cual el dato fue tomado.

Gracias por su ayuda.

 

English:

 

Hello! I am having a problem when I try to create an excel file with the levels of a 4 tank system by  "Write to measurement file", specifically with the time column. When the excel file is created, the level of the tanks appears correctly, however, the first column "time" appears in the first row, a given date and time and the remaining rows appear 00: 00: 00: 00. What I would like is that each row contains the date and time at which the data was taken.

 

Thanks for your help.

 

 

0 Kudos
Message 1 of 5
(357 Views)

Re: Write to measurement file

Hi Juanma,

 

When the excel file is created, the level of the tanks appears correctly, however, the first column "time" appears in the first row, a given date and time and the remaining rows appear 00: 00: 00: 00. What I would like is that each row contains the date and time at which the data was taken.

You seem to like ExpressVIs a lot! Smiley Very Happy

Those ExpressVIs offer several options to configure them. Unfortunately there is no option in the WriteMeasurementFile ExpressVI to set the formatting of the timestamps. But hey: LabVIEW is a programming language and so you can actually program your requirements using "plain" (aka non-express) functions!

 

I recommend to write your data into a CSV file using your own formatting rules…

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

0 Kudos
Message 2 of 5
(348 Views)

write excel file

Hi friends, 

 

I am trying to save the level information of 4 tanks in a excel file. I need the first row contains the headers: Time-T1-T2-T3-T4-T5 and then all the data. How could be the easy way to do that with NO VI's. I have tryed but i had some problems. I am new in LabVIEW.

 

Thanks.

0 Kudos
Message 3 of 5
(332 Views)

Re: write excel file

Hi JuanMa,

 

why do you think creating a new thread for the same old topic would be a good idea?

Please stick with your original thread for the same topic!

 

How could be the easy way to do that with NO VI's.

So you want to create a program without the need to do some actual programming?

 

I have tryed but i had some problems. I am new in LabVIEW.

What have you tried?

Did you take the beginner courses offered in the header of the LabVIEW board?

 

I am trying to save the level information of 4 tanks in a excel file.

Pleae define the word "excel file"! Do you really insist on XLS(x) files (a file format created especially for use with Microsoft Excel)?

Or wouldn't it be much easier to go with simple CSV files, readable with every texteditor - and Excel too?

(As I already suggested before!)

 

I need the first row contains the headers: Time-T1-T2-T3-T4-T5 and then all the data.

Use WriteToSpreadsheetFile (or WriteToDelimitedTextfile in recent LabVIEW version).

Create an array consiting of timestamp in the first column and your measurement values in the following columns. As you want to save differently formatted values in the file I suggest to go with a 2D array of string and do the formatting on your own…

Best regards,
GerdW
CLAD expired, using 2009SP1 + LV2011SP1 + LV2017 (+LV2018 sometimes) on Win7+cRIO
Kudos are welcome Smiley Wink

Message 4 of 5
(291 Views)
Solution
Accepted by topic author Juanma96
05-24-2018 02:31 PM

Re: write excel file

So you want to create a program without the need to do some actual programming?

What do you mean? Like you said me before, VI's are simple but the omit a lot of details.

 

What have you tried?

Did you take the beginner courses offered in the header of the LabVIEW board?

I just tried saving data with de VI's like the image. The problem is the next one: when i configure the DAQ with the option "one sample (ON DEMAND) " the header on the .xls file appears like untitled. So i tried to solve this problem whit a VI called "Set Dynamic Data", this solve the problem of the header, but the time  column was not good. 

 

When i configured the DAQ with the option "N Samples " the header looked ok, but then i cant configured the time column to just one sample per second.

 

I am trying to save the level information of 4 tanks in a excel file.

You are right, i dont know why i am insisting whit .xls file, i will read more about a CVS file.

 

 

Use WriteToSpreadsheetFile (or WriteToDelimitedTextfile in recent LabVIEW version).

Create an array consiting of timestamp in the first column and your measurement values in the following columns. As you want to save differently formatted values in the file I suggest to go with a 2D array of string and do the formatting on your own…

 

Thank you so much, i will try it.

 

Regards Smiley Happy.

0 Kudos
Message 5 of 5
(264 Views)