05-02-2013 10:17 AM
Hi,
I'm working with a cRIO-9025, chassis cRIO-9118 and NI 9239 module.
I've done an acquisition (voltage) where data is in 1D Wfm SGL. I've saved this data using a TDMS file, but now I want to send this file to an other computer (in this case mine) because the file is stored in the target. To do that I've implemented this example:
http://zone.ni.com/devzone/cda/epd/p/id/2842#0requirements
The problem is that the tdms file is created but it hasn't any data. I attach the image of the program. The program is done in other project (not which I use to make acq) to make it easy and then implement it when it works.
*The name file in the client is not used because I had a conflict with path.
What I'm looking for is make an acquisition of 10 minutes every 30 minutes and then send this data to an other computer (or others). I'm not sure if it's the best way, maybe is better to send data at the same time as the acquisition is being done, but my theacher told me that is easier if I send the file when acquisition has finished. To make acq I use FPGA and RT.
I would appreciate your help. Thanks!!
Solved! Go to Solution.
05-02-2013 10:47 AM
If you're transmitting a single file every 10 minutes (or more), then I would recommend just using the FTP VIs. There is an FTP server on the 902x controller, and the FTP VIs can transfer the file onto the local host. Was there a reason you decided to transfer the contents of the TDMS file instead of just transferring the file itself?
-Danny
05-02-2013 10:56 AM
There wasn't any reason to choose this method, it was that I didn't know that using FTP could be easier (and at first I tried to send data at the same time of acq). But, can you give me some more information about that? I've read some things about what you've mentioned but it wasn't really useful.
Thank you very much!!!
05-02-2013 11:04 AM
What version of LabVIEW are you using? The FTP VIs were part of the Internet Connectivity Toolkit for a long while, until they were moved into the core product a few years ago. If you let me know what version of LabVIEW you're using, I can provide an example or recommend a better implementation.
-Danny
05-02-2013 11:08 AM
LabVIEW 2011 Service Pack 1
05-02-2013 12:02 PM
I should add that I'll send the data using a wifi GSM data transmission module and a fiber optic data transmission module, to store it in a PC.
Thanks!
05-02-2013 01:03 PM
I believe the FTP VIs are built into LabVIEW 2011SP1 - I have the VI present, but I could have installed the internet toolkit (don't know).
Look in the following location: Function Palette -> Connectivity -> Internet -> FTP
You're really looking for the VI named, "FTP Get File.vi". What this VI does is contacts an FTP server and requests a file from it. If your files are on the target, and you know the filename that will be created (such as files created in a sequence) you can request the file from the target and have them copied to the local machine (Windows). RT cannot "push" files to the Windows side unless you have an FTP server (like FileZilla Server) running on the Windows host.
It's a very simple one-VI solution. You specify host (the IP Address of the target you're pulling files from), the remote path for the file (for instance if the file is located in c:\ni-rt\data\myfile.zip then that's what you put as the remote path of the file), the local path for the file (where you want the file copied to, along with the name of the file, such as c:\mydir\myfile.zip), the username to log into the FTP server with (default is 'anonymous') and the password to use (default is an empty string). The importan thing to note is whether to use a binary transfer or not - if the file is a text file, no binary transfer needed; if the file is a binary file then you get better results using a binary transfer - I prefer to always use binary transfers, as non-binary transfers actually "interpret" and "convert" text information in the files.
-Danny
05-03-2013 07:17 AM - edited 05-03-2013 07:18 AM
"I believe the FTP VIs are built into LabVIEW 2011SP1 - I have the VI present, but I could have installed the internet toolkit (don't know)."
FTP-VIs are part of the internet toolkit up to LabVIEW 2011 SP1.
With LabVIEW 2012 the FTP-VIs are part of the standard LabVIEW distribution.
Jens
05-03-2013 09:29 AM
Thank you for the answers. I have the FTP Get File.vi
This VI has to be located in the RT part, no?
On the other hand, what you've explained is the same as this? http://digital.ni.com/public.nsf/allkb/9A004CF5241F3CB68625779E004EE159
Because here it uses FTP Put File.vi
I have configured the fileZilla as the link I've put but it doesn't work (but I've implemented what you said). The problem is that fileZilla don't do anything. Here a screenshot:
Thank you!
05-03-2013 09:39 AM
Anyway I think that what I put in remote path is not correct, I should put data.tdms
But it stills not working.