04-04-2012 08:15 AM
Hi all,
I need to import and export files from my host system to the target (RT) system using LabVIEW VIs. How can I do that.
Firstly I was trying do the above action through MAX, but in vain. This is what I did:
1. I created a random text file : 'test.txt' on my host machine.
2. Opened MAX and went to Remote Systems
3. Rt clicked on the controller icon (self detected by MAX) and choose Import function
4. The system prompted to select the file I need to 'Import'.
5. When I selected the 'test.txt' file and clicked 'Next' it is throwing me an error
Can someone help me what's wrong here. Also I need to tutorial so that I can actually do all this activity using LabVIEW (automate the above process).
Thanks
Sreedhar
04-04-2012 08:28 AM - edited 04-04-2012 08:29 AM
Hi
You can study the available material on FTP protocol, and using it in LabVIEW. You can have the code to read from and write to the Remote system. LabVIEW Help also has good amount of information on the FTP functions available in LabVIEW.
Also, what is the error you get in MAX?
04-04-2012 08:32 AM
Please post the error message what you are getting.
If you are having different versions on RT and the Host then you will get an error. Make sure of the version and try.
04-04-2012 08:42 AM
I'm getting an error saying: "The wizard does not recognize the specified configuration file. IF this configuration file is valid, it might not be recognized because its associated product is not installed. Or, an older version of the product that does not support the wizard might be installed".
It may be a problem with the version mismatch because, my RT is on LV2010 and host (Max) is on 8.6.
However I just tried another thing now: I first got the data from the RT using 'export' function. I received some ConfigData.ini file for a particular device that is installed on my PXI.
Then, I used 'import' function to send the same file back to the RT machine, it actually went (with warnings that the file will be replaced) but it worked.
Now my question is why am I not able to put a file that I have created on my own.
04-04-2012 08:45 AM - edited 04-04-2012 08:49 AM
@Sreedhar T wrote:
I'm getting an error saying: "The wizard does not recognize the specified configuration file. IF this configuration file is valid, it might not be recognized because its associated product is not installed. Or, an older version of the product that does not support the wizard might be installed".
It may be a problem with the version mismatch because, my RT is on LV2010 and host (Max) is on 8.6.
You can import or export configuration files with the extension '.ini'. If you are trying to copy other files, like a txt or a doc, you will get an error. What you inport or export are the configuration settings for the different devices connected to the PC. These files are used to configure these devices.
If you wish to copy files to the RT hard disc, that are not configuration files for the devices, use an FTP or some other method.
If you wish to configure the devices programatically, using ini file, you can use the property nodes for the same.
Now my question is why am I not able to put a file that I have created on my own.
04-04-2012 08:49 AM
Ok. I will try to create a random .ini (eg: test.ini) file and try to import to the RT. Will it work?
04-04-2012 08:51 AM - edited 04-04-2012 08:52 AM
Be sure you are not disrupting the configuration of the devices connected. The MAX can be used to export configuration files that are to be used for CONFIGURING the RT, FP, etc.
If you are only tring to copy some data files or text files to the RT hard disc, do not use MAX.
Also, have a backup of the correct ini file for the PXI system connected in the RT and be sure you configure the system back with the correct ini file.
04-04-2012 09:10 AM
Thank you Freelance LV. I created a .ini file and imported. It worked. So I will upgrade MAX and check it.
Coming to your suggestion regarding FTP (and that is what I was actually intending to do), I need some turorial (cannot find in labview help) to actually write an application in LV and do FTP to import and export files. It will be great if you can provide me with some material to start with (even some examples will also be appreciated).
Thanks once again.
Regards.
04-05-2012 06:12 AM
Hi
Unfortunately, I do not have the modules I developed using FTP for data communication between RT and Host. You will need to install Internet Connectivity Toolkit, I suppose. Once you have the toolkit installed, you can have the examples under LabVIEW Help.
Meanwhile, I can get back to you only on Monday, if you need any further help. I shall try to find out if I can get hold onto some FTP related files, but till Monday!
Good luck
04-05-2012 07:28 AM
Hi, I will surely try and find out what is reqd for doing the FTP. Will surely wait and anticipate your help in providing me with some VIs for doing FTP on Monday.