02-02-2015 03:48 PM
The TwoCameras.VI was created to simulate the use case of the two USB3 cameras I am using in my application. After anywhere from 500 to 5000 cycles I receive the following error for either one of my cameras:
-1074360304: Unable to set attribute.
Upon restarting my application in hopes to restore the camera session, I receive an error when trying to connect to the camera that previously faulted.
-1074360261: Unknown USB3 Vision error.
To restore use of the camera I cycle power to the faulted camera and the camera then can communicate with the IMAQdx drivers again.
Adding wait time between the IMAQdx steps did not affect this outcome.
For testing purposes, I modified the TwoCameras.VI to run only one camera. This program ran for 10,000 cycles with no error for each camera. Possibly not enough cycles to prove that one camera works, but still pretty convincing since it worked for 10,000 cycles on each camera.
I again modified TwoCameras.VI to only acquire images and not write settings as well as vise-versa (write settings, but not acquiring) for both cameras. This did not produce any errors after 10,000 cycles for each test.
Am I overlooking something about the IMAQdx VAS library?
Hardware
Basler Monochrome Camera (acA2500-14um)
Basler Color Camera (acA2500-14uc)
WIndows 8.1 PC, 64 bit
3 meter USB3 compliant cables away from High Voltage AC/DC power
Software
VAS - Aug 2013
LV 2013 13.0f2
Considerations
1. I have not updated the firmware of the Basler camera nor have I contacted Basler
02-03-2015 08:56 AM
I'm a little confused by your VI. I'm guessing this is the "One Camera" version, as I don't see how you switch between cameras. I do notice that the first and third frames appear to switch the Session wires (for example, the first frame uses the first Session for the Color Camera, but the third frame uses the second Session for the same Color Camera).
Some questions -- Why are you using Frames (what is the purpose of the time delays)? Do you really want to start and stop the camera over and over again, or start it once, take multiple images, then stop it?
Are you trying to operate the two camera simultaneously? If so, your loops need to run in parallel. Note that this is certainly doable -- we have a monitoring application with 24 simultaneous Ethernet cameras running at 30 fps and saving 5-10 second AVI videos when "events" occur. I should note that we tried doing the same thing with USB(2) cameras, but the band-width of USB (not to mention the port count) limited us to maybe 5-6 cameras ...
Bob Schor
02-03-2015 12:28 PM
Bob_Schor,
I recreated that VI from memory, apologies as there were 2 issues with it (the second case structure had the session wires switched and I did not toggle between cameras).
I am using frames to simulate what my application does. There is some processing time between writing settings and acquisition.
I need to configure exposure time each acquisition, so yes.
The cameras are not simultaneously needed. Remember this VI is a simplification of what my actual application does and, when run, has the same error.
02-04-2015 09:26 AM
Hi there,
I wanted to share a couple resources that comment on the implementation for USB camera acquisitions using IMAQdx:
1. Can I Acquire From Multiple USB Cameras Simultaneously Using IMAQdx?
2. Toggle between Multiple USB Camera
3. Using National Instruments (NI ) LabVIEW software with Point Grey cameras
I would recommend using the example code to test if you get the same error after extended run periods.
I hope this helps
02-04-2015 04:31 PM
Alejandro,
Thanks for the response.
1. I am curious what the article means by, "IMAQdx driver goes through the camera driver". I have selected in MAX to use the 'NI-IMAQdx USB3 Vision Device' Driver. This is the only option as I have not installed a Basler driver. So how does the IMAQdx driver use an underlying Basler driver?
2. This is good example for my use case. It does not write settings while the acquisition is stopped, which is the core difference, as well as only one camera session being open at a time (hence the non-simultaneity). I am able to grab over 500 images before error which suggests to me that the driver does support simultaneity; however, the issue may occur infrequently and may be caused by the simultaneity. Once I have the hardware again, i will try the following:
a. Remove the WriteSettings.VI. This will isolate whether it is the writing of the settings or the starting/stopping of the camera session.
b. Remove simultaneity. I will make sure I only have one camera session open at a time. I am curious if this will cause any other issues since I am repeating this many times at a fast rate...opening and closing camera sessions that is.
3. Again good examples. The most applicable is probably the IMAQdx - Four Cameras. Again though, I have tried running just acquisitions and I do not get errors. One difference I spotted is that the buffer size is 10. So the other test I will run would be to:
a. Increase buffer size to 10
Any other info is appreciated.
02-05-2015 10:08 AM - edited 02-05-2015 10:24 AM
In order to access from MAX/LabVIEW the attributes of any camera, the IMAQdx driver needs to access common and also vendor-specific features so it has to go through the camera specific driver to get this information.
Having this in mind, it would be a good idea to upgrade the driver/firmware of the camera to avoid any issues with the background communication.
02-05-2015 10:15 AM
All,
I believe I know how to solve the problem after some help through my NI support request (thanks to Kaleb). The most recent release of VAS (2015 Feb) has an update line item that describes exactly what my problem was. Here is the readme (it is the first item):
I will try using this new release and post back the results.
Alejandro,
I do not have sufficient priviledges to view that link.
I will try what you suggested once I get the hardware.