LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Sample code to aquire images from video using IMAQ PCI-1408 and Labview 8.0

Anyone has a sample Labview 8.0 code for acquiring images using IMAQ PCI 1408 card and saving images to bmp files?

Message Edited by BHP on 03-26-2007 01:20 PM

0 Kudos
Message 1 of 10
(4,383 Views)

I got a sampe VI, but there are error message saying these sub-VIs are missing:

"IMAQ ImageToArray"

"IMAQ Init.vi"

"IMAQ Creat"

"IMAQ Sequence.vi"

 

How to get them?

 

 

Message Edited by BHP on 03-26-2007 02:00 PM

0 Kudos
Message 2 of 10
(4,368 Views)
Have you installed the NI-IMAQ software? It should show up in Measurement and Automation Explorer under the software tab.
~~~~~~~~~~~~~~~~~~~~~~~~~~
"It’s the questions that drive us.”
~~~~~~~~~~~~~~~~~~~~~~~~~~
0 Kudos
Message 3 of 10
(4,363 Views)
Yes. I have installed IMAQ2.6. I can also see the device PCI-1408.
0 Kudos
Message 4 of 10
(4,357 Views)
Hello BHP,

Thank you for using National Instruments Discussion Forums.  Did you download this example VI or did you get it from the example finder in LabVIEW?  If you go to the "Help" menu in LabVIEW and choose "Find Examples" it will open up the "Example Finder".  In here you can choose to browse according to "Directory Structure" and then find the folder called "IMAQ".  In here will be all the IMAQ examples that are installed when you install the driver.  Under the "File I/O" folder you should save an example called "Snap and Save to File".  A simple modification to this example will allow you to save the image as a BMP.  I have included a screenshot of how to modify this example.  Let me know if you are unable to find this example.  Thanks and have a great day.

Regards,
Mark T
Applications Engineer
National Instruments
0 Kudos
Message 5 of 10
(4,343 Views)

Hi, Mark:

Thanks for the reply. When I chose  to browse according to "Directory Structure", there is an error message:"The NI ServiceLocator is not running. You will not be able to browse by Directory Structure."

Another thing is that I can not find the PCI-1408 device at the hardware part at"Example Finder" page, although I can find the device using the "measurement & automation expolore".

The attachment is the sample VI that I downloaded from internet. Is that possiable to get a self-contained package with the sample VI and the missing sub-VIs?

 

Best Regards,

BHP

 

 

 

 

0 Kudos
Message 6 of 10
(4,328 Views)

Hello BHP,

When you receive the "NI Service Locator is not running" error it is typically because the service for some reason has been stopped or because a personal firewall is blocking the service from starting.  The Knowledge Base below describes what you can do to fix the issue.  Also another thing I would suggest is to go ahead and upgrade to the most current IMAQ driver.  This way you can be certain that all the VIs are installed as well as the examples.  The link below will take you to the download page for the "Vision Acquisition Software".  This is just an installer that contains 3 drivers: NI IMAQ, NI IMAQdx (1394 cameras) and NI IMAQ I/O.  The second two require a license or they will stop working after 30 days but the NI IMAQ driver does not need a license so you can leave these other drivers on your machine or choose not to install them.  I hope this helps.  Thanks and have a great day.

Error: NI Service Locator is Not Running

Vision Acquisition Software 8.2.2 

Regards,
Mark T
Applications Engineer
National Instruments

 
Message 7 of 10
(4,320 Views)

Hi, Mark:

Thanks a lot for your information.

It works quite good!

BHP

 

0 Kudos
Message 8 of 10
(4,313 Views)
For number of images smaller than 50, it works good.
When I try to set the number of images more than 50, there is an error message:" 1074397172 occurred at IMAQ Sequence.vi, possiable reasons: NI-IMAQ two many buffers already allocted"
 
 
0 Kudos
Message 9 of 10
(4,307 Views)
Hello BHP,

There is actually a default max number of buffers that is set in Measurement and Automation Explorer.  So if you exceed this max then you will receive the error.  To change this go to Measurement & Automation Explorer (MAX), highlight your IMAQ device and go to Tools » IMAQ » Max. Number of Buffers and change the default of 50 to a number larger than what you will need to use. You will need to reboot for the change to take effect.  I hope this helps.  Thanks and have a great day.

Regards,
Mark T
Applications Engineer
National Instruments
0 Kudos
Message 10 of 10
(4,277 Views)