LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

USB DRIVER FOR IMAQ

Dear Alipio:

When I use USB camera to get image I meet a question as your: http://forums.ni.com/attachments/ni/170/156565/1/ErroresWEBCAM.rtf

Could you tell me how to solve this question?

Boone301@126.com

Boone

0 Kudos
Message 51 of 197
(7,358 Views)

Hi Boone
You will need to make sure de Imaq for USB supports your language under XP sp2.

In this thread, there is a dll to check the error and send it to NI to be corrected.


Hope it helps
Alipio

---------------------------------------------------------
"Qod natura non dat, Salmantica non praestat"
---------------------------------------------------------
0 Kudos
Message 52 of 197
(7,347 Views)
Dear Brad:
I can use USB camera after use your ImaqDirectShowDll.dll, Could you tell me how program your dll?
Boone301@126.com
0 Kudos
Message 53 of 197
(7,348 Views)

I haven't updated the USB example page yet, so the latest DLL I posted on this thread has additional OSes that it will support that the USB driver download example page doesn't support.  Use the latest DLL included in this thread to get the most number of operating systems supported.

As for the memory leak, I'm not sure when I'll have a chance to debug that, but I would recommend not doing snaps in a loop or opening/closing a continuous acquisition repeatedly.  If you need to take multiple images, why not just open a session and keep it open until you're done acquiring.  While the session is open, you can use the session to acquire images whenever you want, and you could use that session in subVIs by passing the session in or using a global variable.  Bottom line is to avoid leaking memory, don't open/close repeatedly, just do it once...this is a good programming technique, even if there wasn't a leak I would recommend this approach.  Let me know if there's a good use case where you really do need to open/close alot.

Thanks,

Brad

0 Kudos
Message 54 of 197
(7,317 Views)
I have separate vision test steps in Labview for TestStand engine.
Each step needs to open USB diver and close it at the end.
This situation creates a lot memory leaks when this sequence is repeted for each tested unit. At some point computer with 2GB memory will slow down.

Andrew
0 Kudos
Message 55 of 197
(7,311 Views)

I'm no Test Stand expert, but Test Stand provides a way to have a setup called once at the beginning, and a cleanup called once at the end I think, and then you can call the acquisition in Main part of your code.  It may require having three VIs instead of 1, but it will be much more efficient (and not leak memory).  Here is a discussion forum post about it:

http://forums.ni.com/ni/board/message?board.id=330&message.id=8456&requireLogin=False

I would recommend using this approach for the USB acquisition.

Hope this helps,

Brad

0 Kudos
Message 56 of 197
(7,305 Views)
In the example for TestStand VISA refence is beeing converted to U32 and saved to local TestStand variable.
Than the same local variable is converted back to VISA reference in different VI.
They use Refnum to Sesion.vi that is not compatiblie with USB reference data line but works fine with VISA.
I don't know how to do this conversion with Reference output of IMAQ USB sesion out.
0 Kudos
Message 57 of 197
(7,292 Views)

You can use the Cast VI to convert the USB session to an integer (just like they do with VISA).  Here's an example:

 

Hope this helps,

Brad

 

0 Kudos
Message 58 of 197
(7,293 Views)

I have similar problems for Czech version.

                         Hopes help.

 

                     Michal Lesnak (michal.lesnak@vsb.cz)

0 Kudos
Message 59 of 197
(7,169 Views)
Michal,

Your problem can be solved, but in order to do so you need to download a temporary dll and use that to create a localized error message. Post this message and hopefully the issue will be resolved!

Read this discussion from the top to find out what you have to do!

Ton
Free Code Capture Tool! Version 2.1.3 with comments, web-upload, back-save and snippets!
Nederlandse LabVIEW user groep www.lvug.nl
My LabVIEW Ideas

LabVIEW, programming like it should be!
0 Kudos
Message 60 of 197
(7,164 Views)