03-08-2017 02:09 PM
- Camera: Microsoft LifeCam Studio
- Camera Driver Version: 5.20.102.0
- Camera Driver Date: 1/7/2016 [Up to Date]
- LabVIEW version: LabVIEW 2015 SP1 f2 Patch
- VAS 2016 - VDM 2016 [Up to Date]
- No usb extension cable is used (original camera cable)
Problem is camera timeout error after certain iterations (unspecified number)
(Condition 1): sometimes it timeout after high number of iterations (ex:10000-15000)
(Condition 2): sometimes it timeout after low number of iterations (ex:500-600)
(Condition 3): sometimes it timeout before giving an acquisition
The above conditions are applied in LabVIEW and MAX
Error -107436029
(Condition 1) Illustrated in the gif below:
(Condition 3) Illustrated:
Trials to solve the Problem:
- Increasing the Timeout value from 5000ms to 10000ms in MAX
- Separating the Acquisition and the Processing steps (each step has its own loop)
- Increasing the wait value in while loops from 50ms to 80ms (above the 80 value, I am facing laggy images)
After these trials, I am still facing the problem and can not find out how can I solve it, any clues ?
Thanks
Solved! Go to Solution.
03-08-2017 11:40 PM
It looks like the camera's drivers are dropping data before it gets to IMAQdx. It sort of looks like the camera may be using an isochronous transfer mode on the USB bus and some packets towards the end of each buffer are getting dropped. This may occur due to power throttling of your system's CPU. You might want to turn off all power saving features in windows and see if that helps. The other suggestion would be to try changing video modes, as some may use compression that would limit the data rate significantly.
03-08-2017 11:45 PM
03-10-2017 10:14 AM
The other suggestion would be to try changing video modes, as some may use compression that would limit the data rate significantly.
How can I change the video modes ? If you're talking in MAX, it has the same YUY2 format with different fps values and resolutions.
03-10-2017 10:28 AM
Hi,
It is a bit misleading since DirectShow devices go through a device-specific filter that converts the formats to various internal types that may not match what is actually used on the wire. For instance, 1920x1080x30fps is almost certainly has some sort of lossy compression applied (and not just YUY format), as the raw data rate would simply not fit through a USB 2.0 connection.
Have you tried this camera with other video software on the PC? You may just need to try various resolutions/rates until you find one that works well. Unfortunately the issue is below the layer IMAQdx connects to the camera, so there's not much other help I can provide. You may want to consider switching to a machine vision oriented camera (like a USB3 Vision one) if reliability is your concern.
Eric
03-10-2017 10:34 AM
What is NI IMAQdx Version installed?
IMAQdx 16.1
-In LabVIEW Which mode of acquisition you are using? Grab/Snap?
Grab
-How the buffers are setup?
I don't understand, how can I figure out that ?
-Are you seeing any increase in memory usage in Task Manager?(Because of long acquisition is there any memory leak or images not disposed and filling up memory?)
No, and I have 16GB of memory
-Can you add screenshot of Acquisition attributes in Camera Attributes tab?
Acquisition Attributes
-Is the camera connected directly to Machine's USB Port or via USB Hub?
Directly to machine USB Port
03-13-2017 01:56 AM - edited 03-13-2017 01:56 AM
There are two types of buffers for acquisition: IMAQdx Driver Buffer and User Buffers.
-IMAQdx Driver Buffer is configured via IMAQdx Configure Acquisition(Inside IMAQdx Configure Grab.vi) and by default it will be 5.
-Try using low-level VIs by increasing the number and see if you still get the same error.
-User Buffers are the one's which you create when you use IMAQ Create(Which gets image from driver and keeps in the memory with the reference you give as name to IMAQ Create).
-Did you try with default examples shipped with LabVIEW and still receive the same error?
03-13-2017 06:16 AM
03-14-2017 06:49 PM
I've tried different resolutions mode and different fps and still getting the same behavior.
Tried the camera on other softwares to test it and still getting the same behavior.
Is my camera has a problem with it ?
03-15-2017 12:09 AM
-In your first post, message(1) I see strange number of acquired(412506) and displayed(1) frames: whenever you get the time out message you have similar numbers?
-Try disable all firewall, AntiVirus Programs.
-Did you try with Low-Level IMAQdx acquisition and see what buffer counts you were getting stuck at?
-Try deleting the camera files(.iid and .icd) and Drivers and do fresh installation of drivers.
-Try with Different PC/USB Cable/USB Port and see if it is same.