Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

NI Vision Builder 2013 SP1 on NI 1722 Smart Camera: Cannot connect to FTP

Hi,

 

I'm using VBAI 2013 on an NI 1722 smart cam, I'm trying to save the acquired image to an FTP server (FileZilla on my PC).

 

The server works fine, I can connect to it from both my PC and my android phone and add/modify/delete files with the configured users.

Clicking the "Test Login" button from the "Image Logging" setup also returns a success popup message.

 

Problem is, when I run inspection, no images are saved and no errors are displayed. I don't know what's wrong.

 

Here I attached screenshots of what happens (I apologize if the pictures are too big):

 

BEFORE "Test Login"

 beforeTest.PNG

 

 

 testpopup.PNG

 

 

AFTER "Test Login" (Notice FileZilla log)

afterTest.PNG

 

After running Inspection on Conitnuous mode for a few seconds (Image Logging step displays "FTP Image Buffer Full" error):

emptyfolder.PNG

 

Thanks,

Hazim

0 Kudos
Message 1 of 29
(7,404 Views)

It's me again:

 

 

Its seems to be a port problem. I specified ports 21 (default) and 2000 to connect to the FileZilla server. I can connect from my Android phone via port 2000 but cannot connect with the default port 21.

However, VBAI does not have an option to change the port it connects to. Any solution?

 

Thanks again.

0 Kudos
Message 2 of 29
(7,385 Views)

If you need to use a port other than the default 21, you can modify the Vision Builder.ini so the[Settings] section includes:

FTPRemotePort=2000

Make sure you make this update on the remote target's INI (c:\vbai\Vision Builder.ini). Also, to aoid missing images because the buffer is too full, uncheck the option to log in the background. This will make sure the image is done logging before the inspection continues past the image logging step.

 

Another option is to increase the default number of background images to buffer, if you do want to log in the background is to update the [Settings] section of the Vision Builder.ini with

FTPNumBacklogImages=<Num>

The default is 5.

 

Hope this helps,

Brad

Message 3 of 29
(7,373 Views)

Thanks Brad! worked like a charm.

 

For future reference (for anyone with the same problem): Don't forget to set up your firewall inbound rules to allow the necessary ports.

0 Kudos
Message 4 of 29
(7,363 Views)

Hello Brad,

 

I have exactly same problem like hsalem. I have done what you suggested. But it does not work. I have camera 1764 and VBAI 2009 sp1, compatible to OS windows 7. I did not find  "FTPRemotePort" in  Vision Builder.ini for VBAI in the computer system. I just added this option. But I did find "FTPRemotePort=21" in  Vision Builder.ini on the camera. 

 

Also I set up Windows 7 as the FTP server according to NI website (http://digital.ni.com/public.nsf/allkb/9CAD9C2723AB685D862575CC003B5A0C). I use the computer IP for "Image Logging" setup.  

 

Please advise. I have been working on this issue for a long time. Greatly appreciate your advises. 

 

Allendale

0 Kudos
Message 5 of 29
(6,591 Views)

The FTPRemotePort may not be in the INI, in which case it uses the default of 21. If you are trying to log images from your 1722 to your Windows machine, you need to specify the IP Address of your Windows machine and not 127.0.0.1. This will try to log images on the smart camera since this is where the code runs and if you use 127.0.0.1 it will try to log locally, which would mean it will try to log on the Smart Camera. When you're setting up your Windows FTP Server, try to make sure port 21 is configured to make things easier so you shouldn't even need to worry about updating the INI file on the smart camera. So ignore the last picture in the link you provided. I have not tried using the Windows service to act like an FTP Server. I use Cerberus or FileZilla.

 

Hope this helps,

Brad

0 Kudos
Message 6 of 29
(6,585 Views)

Brad, Thanks for your quick response. I actually changed the IP to the computer's IP. And run it again. Still Filezilla shows "disconnected" at the end. I am able to creat a folder through the logging setting but not save any pics. Please see the first print screen. 

 

 

filezilla and VBAI.jpg

 

 

When I log in Filezilla, I only can use this loop IP and port is 14147. I tried to change the port to 14147, but it does not work.

 

I hope I have made myself clear enough. Please give me more detailed guidances.  I highly appreciate your advise. FTP_logging.jpg

 

0 Kudos
Message 7 of 29
(6,581 Views)

It is expected that you get a message in FileZilla about Disconnected when you press the Test button. We just try ot login and save a sample file at the path you specified to ensure the login credentials are good and that the path is valid and writable, but then we close the connection once we have checked this out. So don't worry about the disconnected message. It would be more interesting to see the FileZilla log when you are actually running your inspection in Inspection mode (or you can use the top Run Button "Run Inspection Once" in Configuration mode). This will actually run the inspection on the target. If you press the bottom Run button "Run State Once" or "Run State in Loop", it doesn't run the inspection on the target, but locally and this can have different behavior. It looks like from your FileZilla log, it is using port 21, so you shouldn't need to change the default port used by VBAI.

 

So basically, try running the inspection and show us what the File Zilla log says.

 

Hope this helps,

Brad

0 Kudos
Message 8 of 29
(6,554 Views)

Thank Brad, I am showing you the step by step that how I set up FTP and test the "run state once". thanks for your help. 

 

1. log in FTP server

 

1_FTP_login_page.jpg

 

2. FTP parellel with VBAI after logged on

 

2_FTP_loggedon.jpg

 

3. Open image logging page

 

3_Turn_on_image_loggin.jpg

 

4. Test login

 

4_Testlogin.jpg

 

5. Click "OK" after test loggin

5_click_OK_imagelogin.jpg

 

6. Run state once

 

6_click_run_state_once.jpg

 

7. the targeted folder is empty. No image is saved. 

 

7_target_folder.jpg

0 Kudos
Message 9 of 29
(6,541 Views)

As I mentioned in my previous post, use the Run Inspection buttons at the top:

Run Buttons.png

To make the Configuration mode more interactive, we don't actually save files unless you run using the top buttons. When you press the Run State, it doesn't actually deploy the inspection to the target and so there are some things that aren't actually run on the target.  You can also switch to Inspection Mode (Ctrl-I) and run and this will save your images.

 

Sorry for the confusion, hope this helps,

Brad

0 Kudos
Message 10 of 29
(6,535 Views)