LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Lab View FTP Put File

Solved!
Go to solution

Hi,

 

I am trying to use the FTP Put File VI to get images off of my NI Smart Camera, and I simply cannot get it to work, and I have no idea what I'm doing wrong. I'm using FileZilla Server as the FTP Server on my host PC. The images are being saved in the C:\Images folder of my camera, and I would like to save it in the folder I have shared through FilleZilla, which is C:\FTP Share. I'm using the default settings on FilleZilla of IP 127.0.0.1 and port 14147, and my user name is simply 'user'. I have followed the online guides found here https://decibel.ni.com/content/docs/DOC-15379 and here http://digital.ni.com/public.nsf/allkb/9A004CF5241F3CB68625779E004EE159?OpenDocument , with no luck. I know very little about FTP, and this has me pulling my hair out, so please take a look at the attached VI and try to see what I'm doing wrong.

0 Kudos
Message 1 of 12
(5,099 Views)
Solution
Accepted by topic author mprevodnik

I don't fully understand what you're trying to do. Where is the FTP server and where the client? Since you use put I guess the FTP client is on the Smart Camera and you're trying to put a file on your host PC where you have the filezilla server running.

If this is the case then everything is wrong. The local file on the camera would be "C:\Images\Arcing.bmp", the remote path "FTP Share/Arcing.bmp". The IP address must be the address of the machine where the FTP server is running. 127.0.0.1 is localhost. Also, the default FTP ports are 20/21, but since you left the port unconnected this should be ok.

 

If the camera has a built-in FTP server you don't need another FTP server on the host PC. Just use FTP Get to copy the file from the camera. Also in this case, the IP address must be the one from the FTP server (in this case the camera).

 

 

0 Kudos
Message 2 of 12
(5,075 Views)

Hi dan_u,

 

Thank you for the quick reply. I tried using FTP Get first, because I understand the camera has an FTP server and I don't necessarily need one on my dev PC to get the file, but it didnt work (using Untitled 1). I get error 7 for 'file error' and 15425 for error out. Maybe I wired it up wrong, if so then I guess I just don't understand the terminology (host, remote path etc.). I'm sure about the cameras FTP server IP and user/password so that's not the problem. I couldn't get it to work, so I looked up examples and they all use FTP Put, but I couldn't get that to work either.

 

Your assumption is correct, that is what I'm trying to do. I tried your suggestion regarding that (Untitled 2) and I got error 15550 'could not open file'. 

 

I'm really quite stuck, no idea what the problem could be.

Download All
0 Kudos
Message 3 of 12
(5,046 Views)

Well I'm not going to respond here since you already got answers and also the information how to format the remote path (which I also said in my last post) in your other thread.

0 Kudos
Message 4 of 12
(5,025 Views)

Can you please explain the answer that I got? Because all I'm getting is more confused. People keep giving me file paths with a  "/ " instead of a " \ " but labview won't accept the former, it just changes it to the latter, so that can't be right. I've only begun doing this about 2 weeks ago and have no formal education, so I'm quite confused.

0 Kudos
Message 5 of 12
(5,023 Views)

The local path (which is actually a path control) must use \ on windows. The remote path on the other hand is a string, there LV won't change a / to a \. And don't use a drive letter on the remote path, FTP just starts from the home directory (which can be root, but usually you can't specify a drive letter).

 

0 Kudos
Message 6 of 12
(5,019 Views)

So,

 

Remote Path : /Images/Arcing.bmp

 

Local Path: C:\FTP Share\Arcing.bmp

 

Would that work?

0 Kudos
Message 7 of 12
(5,009 Views)

If the file is in this directory (relative to the FTP root directory) on the server then yes. I have no idea what the FTP root directory on your Smart Camera is.

 

0 Kudos
Message 8 of 12
(5,003 Views)

Do you have any idea how I would go about finding what the root directory is? There's nothing in the manual.

0 Kudos
Message 9 of 12
(4,994 Views)

Just list the files (FTP directory listing.vi) in the root directory '/' and you should be able to see which directory this is.

0 Kudos
Message 10 of 12
(4,986 Views)