05-19-2016 09:02 PM
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
05-20-2016 12:35 AM
Could you attach the VI or image?
05-20-2016 12:48 AM
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
05-20-2016 12:50 AM
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.
05-20-2016 01:11 AM
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!
05-20-2016 01:11 AM
instead of writing a text file write your data in tdms file format..then it will work
05-20-2016 01:16 AM
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
05-20-2016 01:19 AM - edited 05-20-2016 01:20 AM
use convert or flatten string to number option and write that
05-20-2016 01:25 AM
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.
05-22-2016 07:59 PM
bump
Any ideas would be muchly appreciated