LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

advanced settings for "write to measurement file" available for text files?

Hi All, 

 

I have a GPS driver which gives me multiple data types - timestamp (time/date), and double (lat, long, heading). Currently I have them in a cluster. 

 

I would like to write these to a text file for logging purposes. csv or something similar would be fine. 

 

The simple way would be to just use the format into file function, but I would like a bit more functionality than that. 

 

The "write to measurement" express vi seemed perfect - enable/disable so I can control the logging rate, incremental naming of files so data is not overwritten, and starting a new file every hour are all things i would like to do, but i am unsure how to get the above cluster (or a formatted string) into a format where the "signals" input on the express vi is happy?

 

Any help?

 

Cheers,

Ben

0 Kudos
Message 1 of 12
(3,965 Views)

Could you attach the VI or image?

0 Kudos
Message 2 of 12
(3,939 Views)

the first pic is my read loop which is pretty straightforward. But as well as display the data I would also like to log it. 

 

The easiest way for me to do this is to just use the format into file vi (sitting by itself). But if possible i would like some extra functionality. 

 

If i was writing a waveform, I would use the "write to measurement file" express vi as it has some pretty nice options (the second and third attached pics)

The incremental naming, automatically starting a new file after an hour etc etc, are all things that are desireable to me. 

I would love to be able to get my data into some format that the "signals" input accepts. 

 

Is this possible at all? Will save a lot of effort on my part writing a more complex logging vi

Download All
0 Kudos
Message 3 of 12
(3,933 Views)

Im happy enough to produce a formatted string from the gps cluster, but ive never seen the "signals" input before. seems to be numeric only. 

0 Kudos
Message 4 of 12
(3,929 Views)

converting the timestamp to a double could potentially work. But it would be a pain as it would make the file harder to read (they are usually opened up elsewhere for analysis)

 

would be excellent if you would write whatever you wanted to the signals input!

 

 

0 Kudos
Message 5 of 12
(3,914 Views)

instead of writing a text file write your data in tdms file format..then it will work

0 Kudos
Message 6 of 12
(3,911 Views)

not true unfortunately - the issue is with the dynamic data type of the signals input, which as far as i can tell only allows me to convert numbers (or arrarys of numbers) to a dynamic, and does not allow a string 

0 Kudos
Message 7 of 12
(3,903 Views)

use convert or flatten string to number option and write that 

0 Kudos
Message 8 of 12
(3,895 Views)

thanks for your help - unfortunately thats not really what im after, as i would like the files to be readable in excel, notepad or matlab. 

 

 

 

I think i may have to just use the format into file vi, and then manually work out how to limit how much data gets written and how to periodically open a new file. 

0 Kudos
Message 9 of 12
(3,888 Views)

bump

 

Any ideas would be muchly appreciated

0 Kudos
Message 10 of 12
(3,829 Views)