Page 3 - Important Information
Important Information Warranty The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. Nati...
Page 4 - Contents; About This Manual
© National Instruments Corporation v NI-IMAQ User Manual Contents About This Manual How to Use the NI-IMAQ Manual Set .......................................................................... ixOrganization of This Manual ................................................................................
Page 5 - Glossary
Contents NI-IMAQ User Manual vi © National Instruments Corporation Chapter 3Programming with NI-IMAQ Introduction ................................................................................................................... 3-1 High-Level Functions ................................................
Page 6 - Figures
Contents © National Instruments Corporation vii NI-IMAQ User Manual Figures Figure 3-1. NI-IMAQ Status Signals ....................................................................... 3-6 Figure 3-2. Snap Programming Flowchart ............................................................... 3-7 Figure...
Page 7 - How to Use the NI-IMAQ Manual Set
© National Instruments Corporation ix NI-IMAQ User Manual About This Manual NI-IMAQ software is a powerful application programming interface (API) between your image acquisition application and the National Instruments image acquisition (IMAQ) devices. This manual explains how to use your NI-IMAQ so...
Page 8 - Conventions Used in This Manual
About This Manual NI-IMAQ User Manual x © National Instruments Corporation • Appendix B, Customer Communication , contains forms you can use to request help from National Instruments or to comment on our products and manuals. • The Glossary contains an alphabetical list and description of terms used...
Page 9 - National Instruments Documentation; Related Documentation
About This Manual © National Instruments Corporation xi NI-IMAQ User Manual National Instruments Documentation The NI-IMAQ User Manual is one piece of the documentation set for your system. You could have any of several types of documents, depending on the hardware and software in your system. Use t...
Page 10 - Introduction to NI-IMAQ; About the NI-IMAQ Software
© National Instruments Corporation 1-1 NI-IMAQ User Manual 1 Introduction to NI-IMAQ This chapter describes the NI-IMAQ software and lists the application development environments compatible with NI-IMAQ, describes the fundamentals of creating NI-IMAQ applications for Windows 95 and Windows NT, desc...
Page 11 - Application Development Environments; Fundamentals of Building Applications with NI-IMAQ; The NI-IMAQ Libraries
Chapter 1 Introduction to NI-IMAQ NI-IMAQ User Manual 1-2 © National Instruments Corporation Application Development Environments This release of NI-IMAQ supports the following Application Development Environments (ADEs) for Windows 95 and Windows NT: • LabVIEW version 4.x and higher • LabWindows/CV...
Page 12 - Creating an Application
Chapter 1 Introduction to NI-IMAQ © National Instruments Corporation 1-3 NI-IMAQ User Manual Creating an Application This section outlines the process for developing NI-IMAQ applications using C for Windows 95 and Windows NT. Detailed instructions on creating project and source files are not include...
Page 13 - Sample Programs
Chapter 1 Introduction to NI-IMAQ NI-IMAQ User Manual 1-4 © National Instruments Corporation Sample Programs Please refer to the readme.txt file located in your target installation directory for the latest details on NI-IMAQ sample programs. These programs are installed in the sample subdirectory un...
Page 14 - Software Overview; Introduction
© National Instruments Corporation 2-1 NI-IMAQ User Manual 2 Software Overview This chapter describes the classes of NI-IMAQ functions and briefly describes each function. Introduction NI-IMAQ functions are grouped according to the following classes: • Generic functions • High-level functions – Snap...
Page 15 - Generic Functions; Snap Functions
Chapter 2 Software Overview NI-IMAQ User Manual 2-2 © National Instruments Corporation Generic Functions Use generic functions in both high-level and low-level applications. imgInterfaceOpen Opens by name an interface as specified in the IMAQ Configuration Utility. imgSessionOpen Opens a session of ...
Page 16 - Ring and Sequence Functions
Chapter 2 Software Overview © National Instruments Corporation 2-3 NI-IMAQ User Manual imgGrabArea Performs a transfer from a continuous acquisition. Call this function only after calling imgGrabSetup . Ring and Sequence Functions Ring and sequence functions start and stop a continuous acquisition o...
Page 17 - Miscellaneous Functions
Chapter 2 Software Overview NI-IMAQ User Manual 2-4 © National Instruments Corporation imgSessionWaitSignalAsync Monitors for a signal to be asserted and invokes a user-defined callback when the signal is asserted. imgPulseCreate Configures the attributes of a pulse. A single pulse consists of a del...
Page 18 - Acquisition Functions
Chapter 2 Software Overview © National Instruments Corporation 2-5 NI-IMAQ User Manual Low-Level Functions Use low-level functions when you require more direct hardware control. Acquisition Functions Use acquisition functions to configure, start, and abort an image acquisition, or examine a buffer d...
Page 19 - Attribute Functions; Buffer Management Functions
Chapter 2 Software Overview NI-IMAQ User Manual 2-6 © National Instruments Corporation Attribute Functions Use attribute functions to examine and change NI-IMAQ or camera attributes. imgGetAttribute Returns an attribute for an interface or session. imgGetCameraAttributeNumeric Gets the value of nume...
Page 20 - Interface Functions
Chapter 2 Software Overview © National Instruments Corporation 2-7 NI-IMAQ User Manual imgGetBufferElement Gets an element of a specific type from a buffer list. imgSessionClearBuffer Clears a session’s image data to the specified pixel value. imgSetArrayPointerValue Constructs an array of 32-bit po...
Page 21 - Programming with NI-IMAQ
© National Instruments Corporation 3-1 NI-IMAQ User Manual 3 Programming with NI-IMAQ This chapter contains an overview of the NI-IMAQ library, a description of the programming flow of NI-IMAQ, and programming examples. Flowcharts are included for the following operations: snap, grab, sequence, ring...
Page 22 - Establishing Interface Connections and Sessions
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manual 3-2 © National Instruments Corporation Low-Level Functions The low-level function set supports all types of acquisition and can be used to: • Create a custom acquisition sequence or ring • Create and manage your own buffers • Set session and int...
Page 23 - Session Functions
Chapter 3 Programming with NI-IMAQ © National Instruments Corporation 3-3 NI-IMAQ User Manual Before you can acquire image data successfully, you must open an interface by using the imgInterfaceOpen function. imgInterfaceOpen requires an interface name and returns a handle to this interface. NI-IMAQ...
Page 24 - Managing Buffers
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manual 3-4 © National Instruments Corporation This example opens an interface to img0 and then creates a session to acquire images. When the program is finished with the interface and session, it then closes both handles using the imgClose function. Fo...
Page 25 - NI-IMAQ Status Signals
Chapter 3 Programming with NI-IMAQ © National Instruments Corporation 3-5 NI-IMAQ User Manual attribute value is a numeric value of type integer. Float indicates that the attribute value is a numeric value of type floating point. The valid integer and float values are indicated in Possible Values. U...
Page 26 - Introductory Programming Examples
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manual 3-6 © National Instruments Corporation Figure 3-1 illustrates the values of the signals during a three-buffer sequence acquisition. Figure 3-1. NI-IMAQ Status Signals You can use the NI-IMAQ status signals for many purposes. Pulses can be genera...
Page 27 - High-Level Snap Functions
Chapter 3 Programming with NI-IMAQ © National Instruments Corporation 3-7 NI-IMAQ User Manual High-Level Snap Functions A snap acquires a single image into a memory buffer. Snap functions include imgSnap and imgSnapArea . Use these functions to acquire a single frame or field to a buffer. To use the...
Page 28 - High-Level Grab Functions
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manual 3-8 © National Instruments Corporation The sample then calls a process function to analyze the image. When the program is finished, it calls imgClose with the interface handle and sets the freeResources flag to TRUE. This instructs NI-IMAQ to fr...
Page 30 - High-Level Sequence Functions
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manual 3-10 © National Instruments Corporation High-Level Sequence Functions Sequence functions include imgSequenceSetup , imgSessionStartAcquisition and imgStopAcquisition . A sequence initiates a variable-length and variable-delay transfer to multipl...
Page 31 - High-Level Ring Functions
Chapter 3 Programming with NI-IMAQ © National Instruments Corporation 3-11 NI-IMAQ User Manual The HLSeq.c example demonstrates how to perform a sequence acquisition using imgSequenceSetup . The example sets up a sequence that uses 10 user-allocated buffers. Unlike the ring example, each buffer in t...
Page 34 - Advanced Programming Examples; Performing a Snap Using Low-Level Functions
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manual 3-14 © National Instruments Corporation Figure 3-6. Signal I/O Function Programming Flowchart Advanced Programming Examples You can use low-level functions or combine high-and low-level functions for more advanced programming techniques, includi...
Page 35 - Performing a Grab Using Low-Level Functions; Performing a Sequence Acquisition Using Low-Level Functions
Chapter 3 Programming with NI-IMAQ © National Instruments Corporation 3-15 NI-IMAQ User Manual for you when you acquire an image with it, you must perform the alignment yourself if you use window widths not aligned on a 32-bit boundary. After the program sets the ROI, it locks the memory and acquire...
Page 36 - Performing a Ring Acquisition Using Low-Level Functions; StillColor Snap Programming
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manual 3-16 © National Instruments Corporation The main processing loop of the code shows how to process each buffer acquired in sequential order. Performing a Ring Acquisition Using Low-Level Functions The LLRing.c example demonstrates how to perform ...
Page 38 - StillColor
© National Instruments Corporation A-1 NI-IMAQ User Manual A StillColor This appendix describes the different methods you can use to acquire a color image using the IMAQ PCI/PXI-1408 and National Instruments StillColor technology, explains basic color theories, and describes the different output opt...
Page 39 - StillColor Composite
Appendix A StillColor NI-IMAQ User Manual A-2 © National Instruments Corporation StillColor StillColor is a technique you can use to acquire color images from composite color video or RGB cameras using the PCI/PXI-1408 monochrome device. Use StillColor Composite mode to acquire color images from a c...
Page 42 - Composite Color Acquisition
Appendix A StillColor © National Instruments Corporation A-5 NI-IMAQ User Manual Why StillColor? StillColor is optimized for single-frame acquisition. A StillColor Composite acquisition acquires multiple consecutive frames. Assuming that all frames represent the same scene of still objects, the algo...
Page 43 - StillColor RGB
Appendix A StillColor NI-IMAQ User Manual A-6 © National Instruments Corporation StillColor RGB RGB cameras output a color image using three lines. StillColor RGB will acquire the three signals and construct a color image. The three lines are connected to three channels on the PCI/PXI-1408. One fram...
Page 45 - Image Representations; Color Planes
Appendix A StillColor NI-IMAQ User Manual A-8 © National Instruments Corporation Image Representations Color images can be represented in several different formats. These formats can contain all color information from the image or they can consist of just one aspect of the color information, such as...
Page 47 - Electronic Services; Bulletin Board Support
© National Instruments Corporation B-1 NI-IMAQ User Manual B Customer Communication For your convenience, this appendix contains forms to help you gather the information necessary to help us solve your technical problems and a form you can use to comment on the product documentation. When you contac...
Page 48 - Telephone and Fax Support; Country
NI-IMAQ User Manual B-2 © National Instruments Corporation Fax-on-Demand Support Fax-on-Demand is a 24-hour information retrieval system containing a library of documents on a wide range of technical information. You can access Fax-on-Demand from a touch-tone telephone at 512 418 1111. E-Mail Suppor...
Page 49 - Technical Support Form
Technical Support Form Photocopy this form and update it each time you make changes to your software or hardware, and use the completed copy of this form as a reference for your current configuration. Completing this form accurately before contacting National Instruments for technical support helps ...
Page 50 - NI-IMAQ Hardware and Software Configuration Form; National Instruments Products
NI-IMAQ Hardware and Software Configuration Form Record the settings and revisions of your hardware and software on the line to the right of each item. Complete a new copy of this form each time you revise your software or hardware configuration, and use this form as a reference for your current con...
Page 51 - Documentation Comment Form
Documentation Comment Form National Instruments encourages you to comment on the documentation supplied with our products. This information helps us provide quality products to meet your needs. Title: NI-IMAQ User Manual Edition Date: June 1998 Part Number: 371443A-01 Please comment on the completen...
Page 65 - Index
© National Instruments Corporation I-1 NI-IMAQ User Manual Index A acquisition functions, 2-5application development, 1-2 to 1-4 creating applications, 1-3NI-IMAQ libraries, 1-2 attribute functions, 2-6 B buffer management functions list of functions, 2-6 to 2-7programming considerations, 3-4 bullet...