03-10-2016 09:50 AM
Hi Folks.
I have a USB camera that works fine. I can connect with it in MAX and view the image but when I try and run it in a vi it wont work. Is this the correct way to acquire the image or am I missing something? I have attached a snapshot from MAX and the vi.
Thanks,
Mark.
03-10-2016 10:06 AM
"Close, but no cigar". There are two subtle mistakes in your code. One is that you don't need the Wait -- the Camera will, itself, wait until it has an image, so your images will update at whatever rate the camera runs.
However, the more subtle error is that you used IMAQ functions -- you need to use IMAQdx functions, as it is the IMAQdx Drivers that work with the majority of cameras, including most USB cameras. When I replaced the four IMAQ functions with their IMAQdx counterparts and removed the Wait, the code ran just fine (I seem to be losing some hair from the top of my head, according to the image on my PC's screen ...).
Bob Schor
03-10-2016 10:22 AM
Well I'v been losing some hair trying to get this to work.
I did try using the dx's already but I ran into the following problem. I get this error:
The Vision Acquisition Software library is expired or invalidly licensed. Activate Vision Acquisition Software Vision Acquisition Software on this computer to continue using this product. To purchase this product, contact National Instruments. If you have already purchased this product, select Help >> Activate LabVIEW Components to activate this product.
Then I am informed of the following from the help section:
This computer does not have the license required to access this library. Contact your National Instruments sales representative or refer to the National Instruments Web site for more information on upgrading your license.
I do not wish to upgrade. Is there any way to do this without paying for this add-on?
Mark.
03-10-2016 11:08 AM
That's like asking "Is there any way to (legally) run Microsoft Office, or LabVIEW, or Windows on my PC without paying for a license?" You need to acquire the license. If Image Processing is important to your organization, go to them and make your pitch.
Bob Schor
03-11-2016 03:13 AM
That maybe something we will invest in the future but for the moment I only need to do a quick one image capture. Is this possible to do with the general IMAQ vi's? Is this worth me persueing? Alternatively I may run some basic camera software in the background if its not possible.
What are the differences between IMAQ and IMAQdx?
Mark.
03-11-2016 03:33 AM - edited 03-11-2016 03:35 AM
If you get in touch with your local NI sales office, they may be able to offer you an(other) evaluation license. They're normally pretty good/helpful with things like that.
IMAQ is the old/legacy driver for acquiring images (like the traditional NI-DAQ, now replaced my DAQmx) from a camera - I believe it is no longer supported and only supports a small range of cameras. It's still there for compatibility reasons only. IMAQdx is the new driver which supports a wider range of hardware/protocols.
03-11-2016 03:39 AM
Another evaluation license is only postoning the inevitable really. Would this only be needed for the development maching or would it be needed to target machines to. I know that VISA etc have to be also installed on target machines to.
03-11-2016 05:17 AM - edited 03-11-2016 05:22 AM
Yes, you would need to install the NI Vision Runtime on any deployment PC - you can include it with you installer, just like NI-VISA. However...NI Vision is one of the few NI components (along with DSC and TestStand) that also requires a runtime license (unlike VISA, which is 'free' to install/deploy/distribute). Details are here: http://sine.ni.com/nips/cds/view/p/lang/en/nid/207700
If your camera is supported in the legacy IMAQ driver, then you are OK, as this does not require a runtime license, but IMAQdx does.
Edit: There is more information here: http://digital.ni.com/public.nsf/allkb/F1699570F78FECBB86256B5200665134
03-11-2016 08:22 AM
We encountered the Runtime Licensing issue ourselves. We'd developed some animal monitoring software for our (academic) research using IMAQdx (since it was the only driver that supported modern, non-NI cameras). When one of our colleagues at another University wanted to set up a similar lab, we drove out, installed our code, then discovered it wouldn't run because he did not have a Run-Time License (we'd made an Installer, but we still needed to activate the license). Fortunately, we were able to resolve this (I think he was able to get the license through his University's Academic Agreement with NI) ...
Although they are nowhere near as well documented as many of the other Functions and Toolkits, the VIs in the Vision Acquisition System are quite powerful and useful. If you intend to use LabVIEW as the means of acquiring and processing Images, you should consider the value of doing this and decide if the value is worth the cost of the licenses. While there are certainly other Image Processing routines out there, some of which are low-cost or free, they don't offer the "hooks" into other Data Acquisition and Analysis software quite like that provided by LabVIEW (in my humble opinion). Certainly if you are proficient in LabVIEW and want to add Image Acquisition and Processing to your skill-set, IMAQdx is the way to go.
Bob Schor
03-11-2016 09:27 AM
In the meantime I have been using some other software. One I am using at the moment initialises the camera, takes the snapshot and saves it, which takes about 4-5 seconds. By using IMAQdx would this be quicker. The initialisation on this one happens each time (i think) which is a bit of a pain.