LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Accessing File on Non-Windows System

I am trying to access a file on a thridy partty system.  The third party system is a dedicated microprocessor that uses a real-time OS.  When using Windows Explore, if I type in the IP address of the systems I am able to see to its directory strutcture and read files once I have typed in the username and passowrd.  To test out a program I want to use as part of my applicatoin, I have been working with a VI in delopment mode.  I use LabVIEW's built in function VI Open/Create/Replace File.vi.  When I leave file path (use dialog) unwired, a dialog box appears from which I can select a file as expected.  . From the file dialog box I select My Network Places and select the 3rd party system.  I am then able to seled the file after entering the usernam and password without any problems and my VI runs as I woudl expect it.
 
Here is my Question/Problem - In trying to get to take things to the next level, instea of leaving file path (use dialog) unwired, I connect a path constant to the function.  I have tried specifying various permutations of what I know the "file path is".  I have tried 1. 192.168.1.122/Setting/Config.XML, 2. ft://192.168.1.122/Setting/Config.XML and others.  I always get an Error 1430 telling me the path I have specified is empty or realtive and that I need to specify an absolute path.  The 3rd party system is on a peer-to-peer network where all the systems have static IP addresses.  How can I specify the file path, because in my final application I do not want the operator to have to browse around for the the file.  My second part of the question, I'll anticipate a potential problem here, how can I also pre-specify the username and password so the operator does not have to enter this information.  In order for me to interface to the third party system I need to exchagne information back and forth betweeen a couple of different files, but I want this exchange to hapopen in the background without the operator being aware of it.  IN my final application, I do not want the operator accessing this file manually or knowing waht the usernames and passwords are.
 
Sincerely,
Nelson Orozco
0 Kudos
Message 1 of 6
(3,512 Views)

Hi Nelson,

it sounds like your microprocessor OS has a running FTP server. You can use the TCP/IP functions to build your own library to connect to your controller and get files from there or you use the ftp vi´s from the internet toolkit.

Hope it helps.
Mike

0 Kudos
Message 2 of 6
(3,497 Views)

Hello Mike,

Thank you for your response.

I created a simple VI using the ftp functions available.  I used the FTP Open Session.VI and wired the IP address.  I then wired this VI to the FTP Logon VI and wired the username and password to it.  I then wired this to the FRP Directory Listing VI and wire to it different path names I know exist on the system.  For Example, if I want to get to my configuration direction using Windows Explorer I just have to type ftp://192.168.1.122/Settings.  So for a path, I tried wiring "/" and "/Settings" and Settings to the FTP Directory Listing VI.  The last subVI is the FTP Close Session VI.

The results are that after execution of the FTP Open VI there is a warning #220 (Warning 220 occrurred at 220 192.168.1.122 FTP Server Ready.  This error code is undefined).  After the FTP Login VI there is a warning #230 (Warning 230 occurred at 230 - Welcome to QNX Neutrino!  230 USer username logged in.  This error code is undefined).  After the FTP Directory Listing VI, there is a warning #15226 (Warning 15226 occurred at FTP transaction: 226 Transfer Complete.  Possible reason(s):  Internet Toolkit:  (Hex 0x3B7A) 226 Closing data connection).  In the resultant directory listing cluster, the name and link name variables in the cluster are empty but some of the other variables are not.

I must be missing something simple if I can open and see the files from Windows Explorer.

Thanks,  Nelson 

0 Kudos
Message 3 of 6
(3,485 Views)
Those "warnings" are bogus. Those probably stem from NI's convention of how to designate errors and warnings (which is not universally accepted). Those result codes indicate no errors. You can see a short list of codes here.

Windows Explorer is just hiding all that information from you.
0 Kudos
Message 4 of 6
(3,480 Views)

Thank you for your reply,

I have seen enough of these in other circumstances to have guessed they are bogus.  I included them for completeness since I am still not having any luck tyring to establish an ftp connnection and seeing the same directory listing I see when I connect using Windows explorer.

0 Kudos
Message 5 of 6
(3,476 Views)
You said that you tried wiring "/" and "/Settings" and "Settings" as the paths. Did they all give the same result? I don't know if you'll have better luck with the OpenG ftp VIs.
0 Kudos
Message 6 of 6
(3,468 Views)