02-24-2015 05:22 AM
Hi!
I'm trying to do a custom control to workspace in which I'd be able to download by ftp the log file created in the embedded data logger.
My problem is that, as the log file name changes with the timestamp, how do I get the filename created? There is a way?
Anyone can give a hint?
Thank you all
02-24-2015 06:07 AM
HI,
In the Embedded Data Logger Custom Device configuration, you can choice to use or not the timestamp in the filename.
Regards,
02-24-2015 06:35 AM
Thank you hrobitaille
I know that, but I'd like to have the timestamp to not overwrite the previous file.
02-24-2015 06:49 AM
Hi,
Where it's not exactly what you are looking for, you can (using FTP command) list the content of the sub-folder in which you store your files and, as a sanity check, ensure that file name complies to naming standard of files produced by EDL. The only tricky thing is that you need to ensure that files are not being written (closed).
Regards
02-24-2015 09:58 AM
Well, I was thinking as the embedded data logger has the file status channel that says if the file is open or closed, would be a easier way to know the file name created by the embedded data logger.
I will have in the server something like: My_file_16_34_45_24_02_15.tdms
My_file_16_43_23_24_02_15.tdms
My_file_16_55_49_24_02_15.tdms
............
Then I will have to list those files and compare them to see which is the most recent.
And only then, I can download that file. Just because I don't know what is the correct name of the file.
If there is a channel that shows the status of this file, it must knows the file name right?
It just seems to me that I'm trying to discover something that should be very easy to know.
Anyway, thank you for your help Vicent
02-24-2015 10:10 AM
You can also use the FTP Directory Listing VI to determine which TDMS file is the most recent.
02-24-2015 10:27 AM
Hum ok nice Sarci Vicent should be talking about that also, I thought that it would get only the names of the files.
I was also thinking in save it without timestamp, download it and then rename it in the server and in the host with timestamp.
I will try both ways to see which seems better.
If you think that my second approach isn't good somehow, please warn me
Thank you again
02-24-2015 11:13 AM
Keep in mind that the embedded data logger (and any other log generating thing inside NI VeriStand's engine like XNET and DAQmx Waveform logging) generates a notification to the gateway whenever a file is finished. If you have a continually running host process, you can just wait for a notification (which contains a path), and then FTP that file.
For future reference, the engine uses "NI VeriStand - Notify New Log Files Complete.vi" to send these notifications
02-24-2015 12:05 PM
Thanks a lot Stephen
That was what I was talking about!
It works perfectly
02-24-2015 01:12 PM
Awesome!
Also, if you haven't used the data logging control provided in NI VeriStand... it also does this for you. Similar to what you made.