LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

simultaneous capture with usb and gige cameras ?

Highlighted

Hi,

 

I am unable to capture (continuously) simultaneously from a USB and a GigE camera, is there a limitation in Labview ? Both cameras work if I use them one at a time. I am using Labview 2012. Both cameras are IMAQdx devices and I am using IMAQdx VIs.

 

Thanks,

 

Best,

 

Saumil

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

Saumil,

 

This is not a LabVIEW limitation. I just used the Low-Level Grab.vi (NI Example Finder>>Browse>>Hardware Input and Output>>IMAQdx>>Low-Level) and copied the existing code and acquired from both cameras properly at the same time. It is most likely an issue with your code. Try modifying the Low-Level snap and seeing if you’re able to acquire with both cameras and then compare your code to the modified example.

Blake C.
Applications Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 2 of 8
(1,080 Views)
Highlighted

Also look at this KnowledgeBase. It will give you some guidance as to the caveats of multiple acquisitions at once. Your BUS will not be a limitation though, since you are using separate buses.

Blake C.
Applications Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 3 of 8
(1,078 Views)
Highlighted

Thanks, I will look at the code. I am using high level VIs, is that a problem ?

 

Thanks,

 

Best,

 

Saumil

0 Kudos
Message 4 of 8
(1,070 Views)
Highlighted

I don't think using HL VIs should present a problem.

Blake C.
Applications Engineer
National Instruments
www.ni.com/support
0 Kudos
Message 5 of 8
(1,066 Views)
Highlighted

You did not mention if you are using USB 2.0 or 3.0. Since most cameras are 2.0 take a look at your data requirments:

1 mega pixel color camera ->3 MB per frame -> 30 frames per second 90 MB per second -> 720 Mb per second - USB 2.0 Limits you to 480 Mb per second. Note USB also requires CPU intervention for each transfer (not a requirement for USB 3.0).

If you are using giga bit ethernet it limits you to around 800 - 900 Mb per second, no CPU intervention

 

You should do your calculations based on your cameras. I found out using firewire basler camera, 640x480 8 bit mono 400 Mb per second limits me to 30 frames a second (requires no CPU intevention).

 

0 Kudos
Message 6 of 8
(1,059 Views)
Highlighted

I have just converted to low level, just in case. Not tested yet...

 

USB camera: USB 2.0, 10 frames/sec, 1280x1024 -> about 13 MBytes/sec

GigE camera: 300 frames/sec, 640x480 -> about 90 MBytes/sec

 

So both cameras data rates are within their respective interface limits. Although when I started to archive raw frames from the USB camera, everything in labview became super slow. The slowness was reduced dramatically once I started storing to compressed AVI files (rates went from 15 Mbytes to approx. 1.5 Mbytes/sec). I have not tested  archival with the GigE camera yet, I am expecting troubles, just dont know how severe.

 

Thanks for your help,

 

Saumil

0 Kudos
Message 7 of 8
(1,055 Views)
Highlighted

Take a look at your cpu requirements. I bet it is pretty high. Remeber, USB 2.0 is polled and require CPU intervention for data transfer. This seems to be indicated by your video reduction. If you have multiple CPUs, consider one to do the USB Camera transfer. I bet you can get a significant increase in video reduction.

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