Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Unreliable connection to GigE camera

Solved!
Go to solution

I'm having intermittent communication trouble with a GigE camera (Allied Vision Manta 201B).   My program basically uses all the subVI's in the 'Grab.vi' example program.  Everything runs fine for awhile, but eventually I start to get either a black image or a garbled image.  Most of the time I get no error from the 'IMAQdx Get Image' vi; but sometimes it throws error -1074360293.

The funny thing is that if I go back and reinitialize the camera it always works properly again.   If I had a bad wire or something I would think sometimes it would fail to reinitialize.  As a 'band-aid' I've incorporated a stop-reset-close, followed by reinitializing the camera every 2000 frames.  This works for the most part (my frame rate needs are not demanding), but occasionally the problem crops up faster than 2000 frames so I get some bad frames.

I welcome any suggestions

I'm on a Windows10 computer with the latest Allied Vision driver for the brand-new camera.  My packet size is 1500 (my hardware doesn't support Jumbo packets).  Adjusting the StreamByteperSecond parameter does not seem to influence the problem.

0 Kudos
Message 1 of 8
(4,052 Views)

Hi djb,

 

What are your frame rate and image size? That behavior definitely seems like some kind of bandwidth issue, but interesting that it goes away when you reinitialize the camera. Does the camera have a dedicated NIC or is it connected to the computer via a switch? 

 

You could try changing the Desired Peak Bandwidth attribute to see if that makes a difference.

 

-Jordan

0 Kudos
Message 2 of 8
(4,033 Views)

Image size is 2.1 MP (1624 x 1234).  Frame rate is ~14/sec.  I have tried slowing the frame-rate by adjusting the StreamBytesPerSecond parameter in NI-MAX; but it did not help.

I have not tried messing with the peak desired band-width setting, but I'll give it a try.

0 Kudos
Message 3 of 8
(4,030 Views)

I set the desired band-width parameter as low and 250 (from a starting point of 1000); but did not see any improvement in the problem.

I am using am Ethernet-to-USB adapter to interface directly with the camera (no switch).  The camera is a Power-over-Ethernet type; so I do have a power injector module between the camera and computer.

0 Kudos
Message 4 of 8
(4,023 Views)
Solution
Accepted by topic author djb

I would suspect the USB to Ethernet adapter.  It could be that the USB port is going into power saving mode, or something like that.  I assume this is a laptop, otherwise you would use a PCIe Ethernet card.  Maybe switch to the built in port for the camera, and use the USB one for whatever else you need.  You might be able to adjust the settings on the USB port so it stays fully powered and active.

 

Bruce

Bruce Ammons
Ammons Engineering
0 Kudos
Message 5 of 8
(4,019 Views)
Solution
Accepted by topic author djb

Agreed on the USB-Ethernet adapter. 

They fail in different ways: Underpowered USB, their drivers are temporarily deactivated by random services, they might not have enough capacity for buffering (how does your RAM/CPU look while acquiring?) and their chipsets might be unreliable.  

 

Try with a direct network card, ideally Intel Pro/1000 chipset - but same cabling and parameters- to find out if that is the source of error.

 

0 Kudos
Message 6 of 8
(3,998 Views)

BruceAmmons and b.ploetzeneder - Thanks for the advice.  I do have available an Intel Ethernet Connection on the computer normally used to connect to our internal network.  I thought I had tried the camera in both connections with about the same result, but I will give it a more thorough trial with the Intel adapter.

0 Kudos
Message 7 of 8
(3,995 Views)

I ran a long duration test while we were shutdown during the holidays.  The connection is not flawless, but the built in Ethernet card gives a significantly more reliable connection than the USB to Ethernet converter.

Thanks for the advice!

0 Kudos
Message 8 of 8
(3,949 Views)