Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

Sentech GigE Camera works in NI-MAX but not in Labview

Solved!
Go to solution

Hello,

 

I am trying to take a continuous acquisition for real-time processing of images in Labview but have been running into a timeout error; specifically Error -1074360293 at IMAQdx Get Image2.vi with the possible reason being Timeout.  I am able to get a continuous acquisition in NI-MAX with no timeouts or errors, but when I try in Labview it always times out.  I've used the Acquire Every Image.vi in the examples with the same issue.  The camera I'm using is a Sentech STC-SBS500POE which is a GigE camera.  It seems to be that after 5 seconds it times out.  I've set the timeout in the camera attributes and the IMAQdx SubVIs to something higher than 5 seconds and still see it timing out at around 5 seconds.  

0 Kudos
Message 1 of 8
(3,686 Views)

Attached is a video of what I've been experiencing and the VI used in the video.  It normally stops at around 10 or 11 buffers and I set the packet size to 1500.

Download All
0 Kudos
Message 2 of 8
(3,533 Views)

What your video shows looks clearly like a network bandwidth problem and packet loss.

I would be surprised if you have good behaviour in MAX with the same packet size (1500). What is the packet size set in MAX ?

Some suggestions :

  • you can check lost and resent packet statistics in MAX ("network tab in the camera panel) and through property nodes in LabVIEW. I'm pretty sure you'll see all values quickly growing.
  • you should definitely increase the packet size to a higher value (8k if possible, 4k maximum on some adapters) as long as your adapter supports jumbo frames.
  • if you can't increase the packet size, then reduce the maximum camera frame rate to a reasonable value but most of all you should reduce the Maximum Peak Bandwidth attribute (part of Acquisition attributes not the camera one) to prevent the camera to limit the camera bandwidth. You could try a value of 500 for instance instead of the default 1000.

Hope this helps

Sami Fathallah
ALLIANCE VISION
HW and SW Components for Scientific Imaging and Machine Vision
http://www.alliancevision.com
0 Kudos
Message 3 of 8
(3,515 Views)

The packet size was set to 1500 in MAX, the same as in Labview.  MAX wouldn't allow me to change the packet size to greater than 1500 even though my NIC does support Jumbo Packets (I have an Intel I219-LM NIC).  I just found out that it was due to the dock for my laptop.  It seems that when the laptop is docked, it uses the dock ethernet port and disables the ethernet port on the laptop itself.  So after undocking my laptop, I am able to use a packet size of 9000 which allows the camera to capture at the intended frame rate of 21 fps. However, I'm experiencing the same issue in Labview that I've been experiencing; the camera times out at around 5 seconds.  While I am taking a continuous acquisition in MAX I checked to see if there were any lost packets, and there were none.  In my Labview code, I added an indicator to display the Lost Packet Count attribute and didn't see any lost packets until the camera timed out.  I have attached another video of me using the camera in MAX and Labview but using a packet size of 9000.

0 Kudos
Message 4 of 8
(3,508 Views)
Solution
Accepted by topic author Brickman93

I figured out a solution to the problem; if I place an Enumerate Attributes VI in the acquisition loop, it doesn't time out.  I noticed that some attributes that show up in MAX were not available in the property nodes for IMAQdx, but they do show up if I use the Enumerate Attributes VI during run-time.  One of the attributes that wouldn't populate in the IMAQdx property node in particular was Firewall Traversal which did show up in the Enumerate Attributes VI.  Coincidentally enough when I placed that VI in the acquisition loop with the Grab VI, I didn't get any timeouts.  It seems as though this attribute (along with others) are only accessible during run-time (reference: https://forums.ni.com/t5/Machine-Vision/IMAQdx-timestamp-off-by-one/m-p/1966557/highlight/true#M3528... ).  I had a hunch that the timeouts were being caused by my firewall which I can't turn off as it is controlled by my company's IT department, but at least this "fix" can work around it easily enough.

0 Kudos
Message 5 of 8
(3,448 Views)

This is a very tricky one !

Do you confirm you solved the issue just by including an enumerate atrribute vi ? Or did you set the firewall traversal to true ?

 

 

Sami Fathallah
ALLIANCE VISION
HW and SW Components for Scientific Imaging and Machine Vision
http://www.alliancevision.com
0 Kudos
Message 6 of 8
(3,427 Views)

Well, I had set firewall traversal to true in MAX and saved the configuration to the camera.  But yes, all I did in Labview was include an enumerate attribute vi and it works.  I'm not sure why that is.

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

I am also struggling with the same problem. I haven't found a complete solution.

0 Kudos
Message 8 of 8
(1,337 Views)