NI VeriStand Add-Ons Discussions

cancel
Showing results for 
Search instead for 
Did you mean: 

Embedded Data Logger - File Download

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

0 Kudos
Message 1 of 11
(7,811 Views)

HI,

In the Embedded Data Logger Custom Device configuration, you can choice to use or not the timestamp in the filename.

Regards,

0 Kudos
Message 2 of 11
(5,546 Views)

Thank you hrobitaille


I know that, but I'd like to have the timestamp to not overwrite the previous file.

0 Kudos
Message 3 of 11
(5,546 Views)

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

0 Kudos
Message 4 of 11
(5,546 Views)

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



0 Kudos
Message 5 of 11
(5,546 Views)

You can also use the FTP Directory Listing VI to determine which TDMS file is the most recent.

National Instruments
Senior Systems Engineer
0 Kudos
Message 6 of 11
(5,546 Views)

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

0 Kudos
Message 7 of 11
(5,546 Views)

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.

log notification.png

For future reference, the engine uses "NI VeriStand - Notify New Log Files Complete.vi" to send these notifications

Stephen B
Message 8 of 11
(5,546 Views)

Thanks a lot Stephen

That was what I was talking about!

It works perfectly

0 Kudos
Message 9 of 11
(5,546 Views)

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.

Stephen B
0 Kudos
Message 10 of 11
(5,546 Views)