Machine Vision

cancel
Showing results for 
Search instead for 
Did you mean: 

(IMAQdx Timeout) 0XBFF6901B after running camera acquisition for some time

Solved!
Go to solution
ok if you test your camera in different system and different software and NI max
there is problem in your camera this problem could also be in your camera interface file for connecting your camera
Message 11 of 22
(4,153 Views)

-Try deleting the camera files(.iid and .icd) and Drivers and do fresh installation of drivers.

 


Where is the location of those files to delete them ?

you mean by fresh installation, uninstalling the camera drivers from device manager, then unplug the camera usb, and then plug the usb and let the computer automatically detects the device and install the drivers again, right ?

0 Kudos
Message 12 of 22
(4,129 Views)

The Original Poster discovered (perhaps by searching the LabVIEW Forums) that I have used a Logitech C920 WebCam with IMAQdx, and asked me a series of questions in a Private Message.  I posted an answer, but realized that I did not directly address the questions I was asked.  So, for the benefit of the Original Poster and others who may have a similar problem, I'm going to post the Q&A here.  Here are the questions, with my answers and comments below.

 

I am going to purchase a new Logitech C920 camera, and while I am searching in the forum, I find that you own one.

I am afraid of having the same issue with the Logitech camera. That's why I am texting you.

- Did you face such an issue in your camera ? 

- Are the drivers supported in windows 10 ?

- Is there any problem working with grabbing 1280x720p @30fps ?

- Did you try to work with USB 3.0 interface ? If yes, is there any improvements in the performance ?

- What modes are you having in MAX ? YUY2 or MJPEG ?

 

Did I face "such an issue"?  I explained that I was unclear what the "issue" was, as no code was posted, so I wasn't even clear if the problem was viewing images in MAX at the stated resolution (I pointed out that this is a transfer of >100MB/sec), viewing the images in LabVIEW, or saving the Images to a Video file.

 

I'm currently on my home Desktop, running Windows 10 with LabVIEW 2016.  The drivers "auto-installed" without a hitch.  I also have a Microsoft LifeCam Cinema (don't know the model, but the camera is pretty old, maybe 8 years) that shows up, as well.

 

Problem grabbing at 1280x720, 30 fps, MJPG?  Works just fine in MAX -- I left it running for >15 minutes, looked pretty smooth.

 

USB 3.0 or 2.0?  I'm pretty sure this is plugged into a USB 3.0 socket, but haven't yet crawled around to the back of my PC to verify -- just a second ...  

 

Good thing I checked -- the camera is plugged into a USB 2.0 hub (along with my wireless keyboard/mouse, a Logitech controller, a Label Printer, something else I'm not sure about), which is plugged into a USB 2.0 port on my PC.  I have another one of these Cameras at work, where it is easier to plug into USB 2 or 3 without a lot of crawling (somehow I managed to lock up my PC just now, requiring me to power down and restart -- fortunately the Forum saved my unfinished partial reply).  So at the present time, I can't say what "improvement" plugging into USB 3.0 would be, as, in MAX, it looked fine in USB 2.0.

 

What mode?  I was using MJPG.

 

OK, so "just for fun", I whipped up a few IMAQdx VIs to try to do the same thing in LabVIEW (the code's gone "bye-bye" in my reboot, but it's dirt simple to set up).  I used about 4 or 5 IMAQdx functions (plus an IMAQ Create to create my Image, U32 RGB).  The camera (in MAX) was configured as 1280x720, 30fps, MJPG, and when I looked at the image being displayed on the LabVIEW Front Panel, it was very "jerky", I'd say about 3-5 fps.  Of course, the reason was obvious when looking at the information shown on the Image Display -- the camera was running at max resolution, 2304x1536 RGB24, 2fps.  Simple fix to change the Video Mode to 1280x720, 30fps MJPG, and once again, images smooth as silk (I only wanted for a few minutes).

 

Some comments on earlier posts.

  • If you installed LabVIEW, LabVIEW Vision Acquisition, and the Vision Drivers from a recent (say, LabVIEW 2015 or 2016 distribution), and you installed the 32-bit version of LabVIEW on the 64-bit version of Windows 10, you shouldn't need to worry about Drivers or the IID/ICD files that MAX creates for the Cameras that it "sees".  Don't mess with them (it largely does not help, as MAX will probably try to rebuild them, anyway).
  • I still don't know what it is you are trying to do, nor where you are having problems.  A number of suggestions have been posted, several by people who really do know how LabVIEW Vision works.  If you post your code (attaching the actual VIs that you use, as a file with the extension .VI, or, even better, if you compress the folder that contains your Project (or, alternatively, the VIs that you have written to do whatever you are trying to do) and attach the resulting .ZIP file, we will be in a much better position to (a) know and understand what you are trying to do, and (b) "fill in the missing steps" that are probably present (since your code doesn't work, but the VI I whipped together in 10 minutes did).

Don't give up -- it is definitely "do-able", though if you want to write Video files, you may have to think about compression techniques (which IMAQ will probably handle for you).

 

Bob Schor

 

 

Message 13 of 22
(4,122 Views)

Did I face "such an issue"?  I explained that I was unclear what the "issue" was, as no code was posted, so I wasn't even clear if the problem was viewing images in MAX at the stated resolution (I pointed out that this is a transfer of >100MB/sec), viewing the images in LabVIEW, or saving the Images to a Video file.

The issue is stated in the first post in the thread. Problem is camera timeout which leads to glitch images and freezing. This situation is applied to both software MAX (no code here) and LabVIEW (with code). I am making sure first that the camera is working fine in MAX then try it after that with my LabVIEW and the post-acquisition steps which is image processing. I am getting the error in both cases. Several resolutions are tested with different fps but problem is still there. Other softwares are tested, different computers and still no luck. I doubt that there is something wrong with the code because I tested it with my laptop built in webcam and I didn't face any timeout problems. I looked up in microsoft forums and searched about this issue,

[Dropped frames, timeout, image freezing, USB device not recognized suddenly]

and here are some suggestions:

- Scale down (mute) the microphone of the camera from the driver [Tested, didn't fix it]

- Disable the option of power management in USB Root Hub (Allow the computer to turn off this device to save power mode [Tested, didn't fix it]

- Some people report problem with the camera driver and windows 10, specifically after the anniversary update 1607

- Some people converted to Logitech products [That's why I asked the user with Logitech C920]

 

Logitech claims that their C920 is a USB 3.0 ready device. As far as I know, USB 2.0 only have enough speed for 720p @30fps, or a less fps at higher resolution. The USB 2.0 bandwidth is limited to delivering a maximum of 60 Mbytes/sec. Higher resolutions encoded frames @30fps will be compressed and sent over this limited bus through UVC 1.1 compliant of the camera. 

If your getting higher bandwidth >60 Mbytes/sec with your Logitech C920, maybe you're getting a benefit of USB 3.0 claimed product.

 

My Lifecam Studio doesn't show MJPG format in MAX. It only shows YUY2, I don't know if there is way to configure that.

 

Code is attached, as I stated at the beginning, I tested it with my built in laptop camera and no timeout problem appeared

 

0 Kudos
Message 14 of 22
(4,118 Views)

At last!  Code!  Something I can run and inspect.

  • I tried running your program (before I took a good look at it).  I specified Cam2, which is my Logitech Camera in the USB 2.0 port.  It ran, but "slowly", no errors or timeouts.  When I look at the three displays (3!) on the Front Panel, they all say 2304x1560, 8-bit image (and they are Greyscale).
  • I look a look at the code.  Where is the Stop/Continue indicator in the top While Loop?  I didn't find it, didn't see a second Stop control.  However, when I opened the Navigation Window, I found a control named "Stop", but when I tried to view the Control on the Block Diagram, it seemed to be "invisible".  This is very strange and definitely "non-standard" -- don't do this!
  • I still don't know how you made a While Loop with no Stop indicator.  If I delete your While Loop and re-create it, the Stop is right there in the lower left corner.
  • In an earlier response to you, I mentioned that the Logitech Camera, when started with IMAQdx, defaults to the maximum Video Mode of 2304x1560.  I also said you might want to change that.
  • When working with video, the high data rates mean that you should almost always use something like a Producer/Consumer Design Pattern, with the Producer loop doing nothing except acquiring images and enqueuing them for the Consumer to process.  Note that you don't put images on the Queue -- you put image buffers, which are basically pointers into the IMAQdx driver where the Images are located.

A good idea when getting started with Video is to do what I did (yesterday?) -- spend 10-15 minutes and create a loop that does nothing except take images and display them on a single (1!) Image output.  Do include the Stop control.  When you do this, look at the Image Indicator and note whether or not the Image is what you expect (i.e. 1280 x 720 32-bit RGB).  If not, post your simple code and we can try to fix it.

 

Bob Schor

Message 15 of 22
(4,104 Views)

Sir, I know the code is working well and there is another vi I have where the acquisition and the processing are in separated loops. Again, I can't run my Lifecam Studio in BOTH (MAX) and (LabVIEW) as it gives me timeout error ALSO IN BOTH. The acquisition process doesn't stand for a couple of seconds > maximum 2-3 minutes and frames are dropped resulting glitch images/freezing then USB device not recognized. The problem is not in the coding. As I tested the camera with other several softwares not related to NI, ex: Skype .. and still freezes then disconnects automatically after a few seconds.

 

0 Kudos
Message 16 of 22
(4,101 Views)

-The iid and Icd files are located in below path: C:\Users\Public\Documents\National Instruments\NI-IMAQdx\Data

-Often I see parameters of the camera are changed Knowingly/Unknowingly and it messes the settings for the camera, hence i suggested deleting those files and trying with new setting files which MAX generates with default parameters.

-Yes I meant by reinstalling the drivers as you mentioned.

--I think you have tried with Different USB Port/Different Software/Different PC also then i believe it is not the problem with NI/Software and it could be with Camera itself.

-Contact Camera Vendor and ask for suggestions and replacement if it is faulty.

Thanks
uday
Message 17 of 22
(4,088 Views)

Another suggestion would be to try switching the camera drivers used by the OS. There are typically several layers of drivers involved for USB web cameras, including the generic UVC video driver from Microsoft as well as vendor-provided filter drivers that sit on top and modify the behavior. This last one typically is the one that has several variations: often there is an inbox-provided one (distributed by Microsoft automatically) in addition to vendor-provided ones (on installation media with the camera or vendor's website). You may want to try switching between these by alternately installing vendor drivers and/or uninstalling them.

 

 

Realistically I'd suggest if you continue having issues to simply switch cameras.

Message 18 of 22
(4,073 Views)

I've just done additional tests with a Logitech C920 Camera on my work PC, an I7 with 32GB memory running Windows 7 x64 and LabVIEW 2015 and 2016, both 32-bit.  Let me summarize my findings:

  • I ran the Camera in Grab mode in both MAX and in a tiny test program consisting of 4 IMAQdx calls + one IMAQ Create function.
  • I ran the Camera after configuring it in MAX for 1280x720 MJPG 30fps.  When I tested the Camera using MAX, the reported Frame Rate varied from 30 to 31 (probably because the Camera and CPU clocks were not synchronized, and CPU timing can vary due to OS "interruptions").
  • I tested with the Camera plugged into both a USB 2.0 port (on the back of the computer, not into a Hub) and a USB 3.0 port (also on the back of the computer).  It made no apparent difference.
  • Similarly, testing with LabVIEW 2015 and LabVIEW 2016 showed no apparent difference.
  • During my testing, I had Task Manager opened to the Performance setting.  All tests showed CPU activity in the 5-8% range (fluctuating).
  • I'm going to run one more test, but it will take a few minutes, so I'll post this in the meantime.  I realized that I gave my impressions above that the Camera was running well, not dropping frames, etc., but that was only looking at it for a few minutes.  So I've modified my little test routine to (a) time how long I run, (b) how many frames the Camera takes (so I can calculate a "true" FPS, and (c) how many frames IMAXdx thinks were "dropped" before being displayed.  I'd like to give this a decent period of time to run (it's running right now as I am writing this Reply in the Forums), so (as Arnold would say), I'll be back ...

Bob Schor

 

P.S. -- I meant to mention that I plugged this Camera into my Win 7 PC as a "new Camera".  It had no problem loading the Drivers, and came right up in MAX as "cam25", which I renamed to C920.

Message 19 of 22
(4,068 Views)

OK, my routine has been running for over an hour (technically for 3850.84 seconds), has acquired 115522 frames, for a calculated frame rate of 29.9992 FPS.  No frames were dropped.

 

Conclusion -- the Logitech C920 can easily acquire 1280x720 32-bit RGB images at 30fps using Windows 7 x64, LabVIEW 2015 32-bit for significant periods of time without dropping any images.  The image acquisition/display takes <10% of the CPU on a USB 2.0 or 3.0 port (did not notice a significant difference).  I didn't run this same extended test on my home Windows 10 system, but I'll try to do that this evening.

 

Bob Schor

 

P.S. -- sorry, I actually thought I posted this 12 hours ago, but something went haywire in my work PC, and I didn't notice it in time.  Fortunately, the unposted copy was saved, so I could finish it now ...

Message 20 of 22
(4,048 Views)