Neil Pate Posted April 16, 2018 Report Share Posted April 16, 2018 I am using USB cameras (several different vendors on different projects) and have noticed that sometimes my image acquisition fails as the camera has just disconnected (or failed in some manner). My camera is configured for Continuous Acquisition and I am using IMAQdx Get Image 2.vi. When the camera has failed (or is physically disconnected) I do not get any error out of that VI, just the last image is returned. I have tried various other techniques like looking at the buffer number etc but cannot seem to get anything to work reliably. Any ideas on what I am doing wrong or a strategy I can employ for figuring out if the camera has failed? Thanks n Quote Link to comment
Bobillier Posted April 16, 2018 Report Share Posted April 16, 2018 (edited) Hi Neil Your cameras are powered by USB or other power supply ? USB is very delicate when there is different power sources for devices. Few time ago i have encounter lot of problem with this , and solve lot of it with one galvanic converter added on USB Link. Something like that https://electronics-shop.dk/usb-isolator It's a bit difficult to know if USB link are fall because with this kind of problem is low level protection who are activated and only windows can detect and restart it. Sometime on old PC you need to shutdown PC' power-supply to restart USB Link. The only wait i show to see if it fall, is to cyclically request something to camera, and detect when there isn't reply. Eric Edited April 16, 2018 by Bobillier Quote Link to comment
Neil Pate Posted April 16, 2018 Author Report Share Posted April 16, 2018 Thanks Eric, The problems I have with cameras are so strange. Also sometimes the cameras get assigned new names in MAX for apparently no reason. I will try one of these converters if I can get my hands on one. Quote Link to comment
shoneill Posted April 16, 2018 Report Share Posted April 16, 2018 If a USB device does not implement a Device Serial Number correctly, Windows cannot distinguish between a second instance of the same camera being attached and the reconnection of the same camera. This leads to numerous "instances" of devices being installed in the system. If done correctly, the OS should be able to assign a driver to an instance of a specific device (taking serial number into account). The serial number of a device is normally defined in the device configuration package which an OS needs to read before it can even assign a device class. A lot of devices simply don't implement this. Also see HERE for info on where this data SHOULD be stored. Quote Link to comment
Neil Pate Posted April 16, 2018 Author Report Share Posted April 16, 2018 shoneill, the issue I have is so random though. The system will work fine for weeks on end and then the camera will rename itself in MAX twice in one day or just fall over and require a full power cycle. Quote Link to comment
shoneill Posted April 16, 2018 Report Share Posted April 16, 2018 My post seeks only to explain why the renaming takes place. If there's a rapid power off and on, not supporting a proper Serial Number can lead Windows to whink a new camera has been attached. I think the base problem you have is a power supply issue, and there USB is flaky at best. The issues you see with MAX are understandable from an unstable power point of view. Sorry that I didn't portray that information more clearly. Filtering of power over USB is nororiously crappy for most motherboards, for possible fixes, Bobillier's suggestions above soumd perfectly reasonable. Quote Link to comment
Neil Pate Posted April 16, 2018 Author Report Share Posted April 16, 2018 Sorry, I did not mean to come across as hostile at all. I was just typing a quick reply before dashing out. I massively appreciate all the insight that is shared with me here. 1 Quote Link to comment
shoneill Posted April 17, 2018 Report Share Posted April 17, 2018 No problem, no hostility detected. Honestly. Also none implied at all. I just noticed that the focus of my answer wasn't explained properly. Your "oops" while acknowledged, is not neccessary at all. Nothing whatsoever to apologise for. Although I knew my post was only focussing on the "multiple devices" issue, I simply didn't convey that properly. My bad. I only realised it after your post. 1 Quote Link to comment
Neil Pate Posted April 17, 2018 Author Report Share Posted April 17, 2018 I am actually trying to move away from USB cameras to GigE as I have just had so much hassle with the USB ports. I have tried pretty much everything except that galvanic isolator mentioned earlier. Quote Link to comment
Bobillier Posted April 17, 2018 Report Share Posted April 17, 2018 Just for info Neil. Low-cost NI USB DAQ card (USB6008) don't have galvanic isolation and crash frequently, but more expensive NI USB DAQ card like USB-6216 have it' (look page 13 of data-sheet) Quote Link to comment
Neil Pate Posted April 18, 2018 Author Report Share Posted April 18, 2018 Eric that is very interesting indeed! I am going to see if I can get hold of some of these isolators. Quote Link to comment
Phillip Brooks Posted April 20, 2018 Report Share Posted April 20, 2018 Isolation? I've always wanted a reason to check this out: optical USB cable... https://www.corning.com/optical-cables-by-corning/worldwide/en/products/usb-optical-cables.html You would need to provide your own power to the camera at the far end. Quote Link to comment
Benoit Posted April 23, 2018 Report Share Posted April 23, 2018 Be sure as well to never use hub. I have many issues with USB hub. If you want to get the list of USB device connected, you can use this VI. note that if your web cam do now have embedded serial number, the device path is reported according to the USB port connected. if you connect the same model of webcam at the same port, Windows will use the same friendly name. I use Spinnel USB cam 2M. they do have a embedded serial number programmed upon request... 50$ per unit. quite decent for this usb camera with a low distortion lenses. USB Scanner.vi 1 Quote Link to comment
Bobillier Posted April 23, 2018 Report Share Posted April 23, 2018 Hi Benoit Thanks for your vi. But do you know if there is property to get serial port associate to USB in the case of the device are used like USB-Serial Bridge ? Eric Quote Link to comment
Benoit Posted April 23, 2018 Report Share Posted April 23, 2018 Try it by yourself. it's depend of your adapter. This VI use the friendly name that is usually a copy of what is seen in the DEVICE MANAGER. Quote Link to comment
shoneill Posted April 23, 2018 Report Share Posted April 23, 2018 5 hours ago, Benoit said: if you connect the same model of webcam at the same port, Windows will use the same friendly name. Ah yes, I remember this now, I "abused" this when doing some USB programming of my own to install LibUSB drivers for a given device on one port, and standard NI-USB drivers on another port for testing. In order to change driver, all I had to do was switch USB port instead of constantly uninstalling and re-installing. It was a nice trick (in XP at the time), I don't know if it still works with Windows 10. Quote Link to comment
donquestz Posted November 13, 2021 Report Share Posted November 13, 2021 Have being using on a system 2 usb 3.0 cameras with Continuous Acquisition and I am using IMAQdx. The system can work for days without any problem. Eventually at some point int time only the last image of both cameras is returned. In order to see if the cameras are still working, I exit the program and check to see if the cameras are still active and yes, they are still active. l start the program again and it works correctly for some more hours, of sometimes for a few minutes. They are connected to a 3.0 HUB. What can it be? I am thinking to trigger the cameras instead of Continuos Acquisition. Quote Link to comment
hooovahh Posted November 15, 2021 Report Share Posted November 15, 2021 If the snap does work, but returns the exact same image, you might be able to detect a locked up camera by comparing the last two images and seeing that they are exactly the same. At that point I don't know if closing all references, and re-initing would help or not. I've had some success with this, depending on what caused the lock up. I've had other cameras that really seem defective and the only fix was to power off and on the camera. For that something like a relay could be used to kill the power and turn it back on. But in general I suggest using high quality ethernet based cameras because of some of these issues that I've seen in the past. Still ethernet cameras aren't without issues. I've seen firewall or antivirus software cause camera images to not acquire properly. Quote Link to comment
Neil Pate Posted November 15, 2021 Author Report Share Posted November 15, 2021 After getting burned by the system with the USB cameras I switched over to GigE and never looked back. Multiple USB cameras running at full frame-rate is a recipe for disaster! Quote Link to comment
Jordan Kuehn Posted November 15, 2021 Report Share Posted November 15, 2021 13 minutes ago, Neil Pate said: After getting burned by the system with the USB cameras I switched over to GigE and never looked back. Multiple USB cameras running at full frame-rate is a recipe for disaster! When using GigE make sure your network adapter supports jumbo frames. Or at least be aware that this is necessary at times. https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019Lj9SAE&l=en-US Quote Link to comment
Rolf Kalbermatter Posted November 16, 2021 Report Share Posted November 16, 2021 14 hours ago, Jordan Kuehn said: When using GigE make sure your network adapter supports jumbo frames. Or at least be aware that this is necessary at times. https://knowledge.ni.com/KnowledgeArticleDetails?id=kA00Z0000019Lj9SAE&l=en-US It's not entirely without its own pitfalls. Different network controller chips support different support for jumbo frame, some older do not support it at all, and all your routers, hubs and whatever in between needs to support it too. It's definitely helpful for full HD and higher resolution cameras and/or when you need to use multiple GigE cameras in parallel, but it makes your setup more sensible to quickly switching to a different ethernet port or replacing intermediate network infrastructure suddenly causing issues. Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.