National Instruments NI-IMAQ manual

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52

Go to page of

A good user manual

The rules should oblige the seller to give the purchaser an operating instrucion of National Instruments NI-IMAQ, along with an item. The lack of an instruction or false information given to customer shall constitute grounds to apply for a complaint because of nonconformity of goods with the contract. In accordance with the law, a customer can receive an instruction in non-paper form; lately graphic and electronic forms of the manuals, as well as instructional videos have been majorly used. A necessary precondition for this is the unmistakable, legible character of an instruction.

What is an instruction?

The term originates from the Latin word „instructio”, which means organizing. Therefore, in an instruction of National Instruments NI-IMAQ one could find a process description. An instruction's purpose is to teach, to ease the start-up and an item's use or performance of certain activities. An instruction is a compilation of information about an item/a service, it is a clue.

Unfortunately, only a few customers devote their time to read an instruction of National Instruments NI-IMAQ. A good user manual introduces us to a number of additional functionalities of the purchased item, and also helps us to avoid the formation of most of the defects.

What should a perfect user manual contain?

First and foremost, an user manual of National Instruments NI-IMAQ should contain:
- informations concerning technical data of National Instruments NI-IMAQ
- name of the manufacturer and a year of construction of the National Instruments NI-IMAQ item
- rules of operation, control and maintenance of the National Instruments NI-IMAQ item
- safety signs and mark certificates which confirm compatibility with appropriate standards

Why don't we read the manuals?

Usually it results from the lack of time and certainty about functionalities of purchased items. Unfortunately, networking and start-up of National Instruments NI-IMAQ alone are not enough. An instruction contains a number of clues concerning respective functionalities, safety rules, maintenance methods (what means should be used), eventual defects of National Instruments NI-IMAQ, and methods of problem resolution. Eventually, when one still can't find the answer to his problems, he will be directed to the National Instruments service. Lately animated manuals and instructional videos are quite popular among customers. These kinds of user manuals are effective; they assure that a customer will familiarize himself with the whole material, and won't skip complicated, technical information of National Instruments NI-IMAQ.

Why one should read the manuals?

It is mostly in the manuals where we will find the details concerning construction and possibility of the National Instruments NI-IMAQ item, and its use of respective accessory, as well as information concerning all the functions and facilities.

After a successful purchase of an item one should find a moment and get to know with every part of an instruction. Currently the manuals are carefully prearranged and translated, so they could be fully understood by its users. The manuals will serve as an informational aid.

Table of contents for the manual

  • Page 1

    IMAQ ™ NI-IMAQ ™ for IEEE-1394 Cameras User Manual Image Acquisition Software NI-IMAQ for IEEE-1394 Cameras User Manual Mar ch 2001 Edition Part Number 370362 A-01[...]

  • Page 2

    Worldwide Technical Support and Product Information ni.com National Instruments Corporate Headquarters 11500 North Mopac Expressway Austin, Texas 78759-3504 USA Tel: 512 794 0100 Worldwide Offices Australia 03 9879 5166, Austria 0662 45 79 90 0, Belgium 02 757 00 20, Brazil 011 284 5011, Canada (Calgary) 403 274 9391, Canada (Ottawa) 613 233 5949, [...]

  • Page 3

    Important Information Warranty The media on which you receive Nat ional Instruments software are warranted not to fail to execute programming instructions, due t o defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts o r other documentation. National Instruments will, at its option, repair or[...]

  • Page 4

    Conventions The follo wing con ventions are used in this manual: » The » symbol leads you through nested menu items and dialog box options to a final action. The sequence File»Page Setup» Options directs you to pull down the File menu, selec t the Pa ge Setup item, and select Options from the last dialog box. This icon denotes a note, which ale[...]

  • Page 5

    © National Instruments Corporation v NI-IMAQ for IEEE-1394 Cameras User Manual Contents Chapter 1 Introduction to NI-IMAQ for IEEE-1394 Cameras About the NI-IMAQ Software ...... .......................... ......................... ....................... ....... 1-1 Application Development Environments ............ .......................... .....[...]

  • Page 6

    Contents NI-IMAQ for IEEE-1394 Cameras User Manual vi ni.com Introductory Programming Examples .................. .......................... ......................... ...... 3-5 High-Level Snap Functions ..... ......................... ....................... .............. ......... 3-5 High-Level Grab Functions ........ ......................... [...]

  • Page 7

    © National Instruments Corporation 1-1 NI-IMAQ for IEEE-1394 Cameras User Manual 1 Introduction to NI-IMAQ for IEEE-1394 Cameras This chapter describes the NI-IM AQ for IEEE-1394 software and lists th e application development env ironments compatib le with NI-IMAQ, describes the fundamentals of creating N I-IMAQ applications for Windows 2000 and [...]

  • Page 8

    Chapter 1 Introduction to NI-IMAQ for IEEE-1394 Cameras NI-IMAQ for IEEE-1394 Cameras User Manual 1-2 ni.com Application Development Environments This release of NI-IMAQ for 1394 support s the following Application Development Environmen ts (ADEs) for Windows 2000 and Windows Me/98: • LabVIEW version 5.1 and higher • LabW indows/CVI ve r sion 5[...]

  • Page 9

    Chapter 1 Introduction to NI-IMAQ for IEEE-1394 Cameras © National Instruments Corporation 1-3 NI-IMAQ for IEEE-1394 Cameras User Manual Fundamentals of Building Applications with NI-IMAQ for 1394 Architecture A block diagram of the NI-IMAQ for 1394 architecture shown in Figure 1-1 illustrates the low- and mid-level architecture for IMAQ devices. [...]

  • Page 10

    Chapter 1 Introduction to NI-IMAQ for IEEE-1394 Cameras NI-IMAQ for IEEE-1394 Cameras User Manual 1-4 ni.com The NI-IMAQ Libraries The NI-IMAQ for 1394 for Windows 2 000/Me/98 function libraries are dynamic link libraries (DLLs), which means that NI-IMAQ fo r 1394 routines are not linked into the executable fi les of applications. Only the informat[...]

  • Page 11

    Chapter 1 Introduction to NI-IMAQ for IEEE-1394 Cameras © National Instruments Corporation 1-5 NI-IMAQ for IEEE-1394 Cameras User Manual • When compiling, i ndicate where the com piler can find the NI-IMA Q header files and shared libraries. Y ou can f ind most of the files you need for dev elopment u nder the NI-IMA Q target installation direct[...]

  • Page 12

    © National Instruments Corporation 2-1 NI-IMAQ for IEEE-1394 Cameras User Manual 2 Software Over v iew This chapter describes the classes of NI-IMAQ for 1394 functions and briefly describes each function. Introduction NI-IMAQ functions are grouped according to the following classes: • Generic functions • High-le vel funct ions – Snap functio[...]

  • Page 13

    Chapter 2 Software Over view NI-IMAQ for IEEE-1394 Cameras User Manual 2-2 ni.com High-Level Functions Use high-level functions to quickly and easily capture images. If you need more advanced functionalit y, you can mix high-level function s with low-level functions. Snap Functions Snap functions capture all or a portion of a singl e frame or field[...]

  • Page 14

    Chapter 2 Software Over view © National Instruments Corporation 2-3 NI-IMAQ for IEEE-1394 Cameras User Manual Sequence Functions Sequence functions st art and stop a continuous acquisitio n of multiple frames. imaq1394SetupSequenceImage Conf igures and starts a session for acquiring a full sequenc e into the list of buf fers managed by IMA Q V isi[...]

  • Page 15

    Chapter 2 Software Over view NI-IMAQ for IEEE-1394 Cameras User Manual 2-4 ni.com imaq1394StopAcquisition Stops an asynchronous acquisi tion or synchronous continuous acquisition immediat ely. imaq1394GetBuffer Copies a frame buffer to a user-specified buffer. imaq1394GetImage Copies a session ’ s image data to an IMAQ Vision image. imaq1394Insta[...]

  • Page 16

    Chapter 2 Software Over view © National Instruments Corporation 2-5 NI-IMAQ for IEEE-1394 Cameras User Manual Utility Functions Use utility functions to display an im age in a window, save an image to a file, or to get detailed error info rmation. imaq1394Plot Plots a buffer to a window given a handle to a window. imaq1394PlotDC Plots a buffer to [...]

  • Page 17

    © National Instruments Corporation 3-1 NI-IMAQ for IEEE-1394 Cameras User Manual 3 Programming with NI-IMAQ for 1394 This chapter contains an overview of the NI-IMAQ for 1394 library, a description of the programmin g flow of NI-IMAQ for 1394, and programming examples. Flowcharts are incl uded for the following operations: snap, grab, and sequen c[...]

  • Page 18

    Chapter 3 Programming with NI- IMAQ for 1394 NI-IMAQ for IEEE-1394 Cameras User Manual 3-2 ni.com Low-Level Functions The low-level function set supports all types of acquisiti on. You can use low-level functio ns to start a sy nchronous or asynchronous acq uisition. Establishing Interface Connections To acquire images using the high-level or low-l[...]

  • Page 19

    Chapter 3 Programming with NI-IMAQ for 1394 © National Instruments Corporation 3-3 NI-IMAQ for IEEE-1394 Cameras User Manual Before you can acquire image data successfully , you must open a camera with the imaq1394CameraOpen function. imaq1394CameraOpen requires a camera name and returns a handle to this interf ace. NI-IMA Q for 1394 then uses thi[...]

  • Page 20

    Chapter 3 Programming with NI- IMAQ for 1394 NI-IMAQ for IEEE-1394 Cameras User Manual 3-4 ni.com Scalable Image Size IEEE-1394 digital cameras support a predefined set of image sizes which you can select through the Format and Mode attrib utes in MAX. See your camera documentation for a list of supported formats. If you are using IMA Q V ision, th[...]

  • Page 21

    Chapter 3 Programming with NI-IMAQ for 1394 © National Instruments Corporation 3-5 NI-IMAQ for IEEE-1394 Cameras User Manual Introductor y Programming Examples This section introdu ces some examples fo r performing the different types of image acquisition. Note The error codes returned by NI-IMA Q are not included i n the examples. Alw ays check t[...]

  • Page 22

    Chapter 3 Programming with NI- IMAQ for 1394 NI-IMAQ for IEEE-1394 Cameras User Manual 3-6 ni.com When you in voke a snap, it initializes the IMA Q 1394 device and acquires the next incoming video frame to a buf fer . Use a snap for low-speed or single-capture applications where ease of programming is essential. Figure 3-2 illustrates a typical sna[...]

  • Page 23

    Chapter 3 Programming with NI-IMAQ for 1394 © National Instruments Corporation 3-7 NI-IMAQ for IEEE-1394 Cameras User Manual Calling imaq1394SetupGrab initializes a session for a grab acquisitio n. After imaq1394SetupGrab , each successi ve grab copies the last acquired buf fer into a user buf fer where you can perform processing on the im age. Us[...]

  • Page 24

    Chapter 3 Programming with NI- IMAQ for 1394 NI-IMAQ for IEEE-1394 Cameras User Manual 3-8 ni.com High-Level Sequence Functions Sequence functions include imaq1394SetupSequence .A sequence initiates a variable-length and variable-delay transfer to multiple buffers. You can configure the delay between acquisitions with imaq1394SetupSequence and spec[...]

  • Page 25

    Chapter 3 Programming with NI-IMAQ for 1394 © National Instruments Corporation 3-9 NI-IMAQ for IEEE-1394 Cameras User Manual Advanced Programming Examples Use low-level functions or co mbine high-and low -level functions for more advanced programming techniqu es, including snap, grab, and sequence. Performing a Snap Using Low-Level Functions The L[...]

  • Page 26

    Chapter 3 Programming with NI- IMAQ for 1394 NI-IMAQ for IEEE-1394 Cameras User Manual 3-10 ni.com Performing an Asynchronous Snap Using Low-Level Functions The Low-Level Snap1394 Asyn c example demonstrates how to perform an asynchronous acquisition usi ng low-level calls. The example sets up a single-frame acquisition to a buffer. In an asynchron[...]

  • Page 27

    © National Instruments Corporation 4-1 NI-IMAQ for IEEE-1394 Cameras User Manual 4 Programming with NI-IMAQ for 1394 VIs This chapter describes how to use the NI-IMAQ 1394 VIs in LabVIEW. Introduction The NI-IMAQ for IEEE-1394 Cameras VI Library, a series of v irtual instruments (VIs) for using Lab VIEW with your IMAQ 1394 de vice, is included wit[...]

  • Page 28

    Chapter 4 Programming with NI-IMAQ for 1394 VIs NI-IMAQ for IEEE-1394 Cameras User Manual 4-2 ni.com Location of NI-IMAQ for 1394 Examples The NI-IMAQ VI for IEEE-1394 Cameras examples illustrate some common applications. You can find t hese examples in the labviewexamplesimaq directory for LabVIEW. For a brief description of any example, open th[...]

  • Page 29

    Chapter 4 Programming with NI-IMAQ fo r 1394 VIs © National Instruments Corporation 4-3 NI-IMAQ for IEEE-1394 Cameras User Manual The most commonl y used VIs are on the IMAQ for IEEE-1394 palette. Y ou can find VIs for basic acquisition and changing attributes. The Motion and Vision » IMAQ for I EEE-1394 » IMAQ Low Level palette contains VIs for[...]

  • Page 30

    Chapter 4 Programming with NI-IMAQ for 1394 VIs NI-IMAQ for IEEE-1394 Cameras User Manual 4-4 ni.com Buffer Management IMAQ Create and IMAQ Dispose manage image buffers in LabVIEW. IMAQ Create , shown in Figure 4-2, allocates an image buffer. Image Name is a label for the buffer created. Each buffer must have a unique name. Image Type specifies the[...]

  • Page 31

    Chapter 4 Programming with NI-IMAQ fo r 1394 VIs © National Instruments Corporation 4-5 NI-IMAQ for IEEE-1394 Cameras User Manual NI-IMAQ for 1394 Acquisition T ypes Three NI-IMAQ image acquisition types are available in LabV IEW — snap, grab, and sequence. The following sections describe each acquisition type and give examples. Snap A snap acqu[...]

  • Page 32

    Chapter 4 Programming with NI-IMAQ for 1394 VIs NI-IMAQ for IEEE-1394 Cameras User Manual 4-6 ni.com Figure 4-5 shows a simplif ied block diagram for usin g IMA Q1394 Gra b Setup and IMA Q1394 Grab Acquire . Figure 4-5. Acquiring Images Using Grab Sequence A sequence initiates a variable-leng th and variable-delay transfer to multiple buffers. Use [...]

  • Page 33

    Chapter 4 Programming with NI-IMAQ fo r 1394 VIs © National Instruments Corporation 4-7 NI-IMAQ for IEEE-1394 Cameras User Manual Figure 4-6 shows a simplif ied block diagram for using IM A Q1394 Sequence . Place IMA Q Create inside a For Loop to create an array of images for the Image s in input to IMA Q1394 Sequence . T o Decimal and Concatenate[...]

  • Page 34

    Chapter 4 Programming with NI-IMAQ for 1394 VIs NI-IMAQ for IEEE-1394 Cameras User Manual 4-8 ni.com 4. Call IMA Q1394 Get Image . 5. After an acquisition, release the resources associated with the acquisition using IMA Q 1394 Close . IMA Q1394 Close also stops the acquisition if one is in prog ress. If you want to stop the acquisition without rele[...]

  • Page 35

    Chapter 4 Programming with NI-IMAQ fo r 1394 VIs © National Instruments Corporation 4-9 NI-IMAQ for IEEE-1394 Cameras User Manual an image acquired using IMA Q13 94 Snap . Y ou can display images in the same way using any acquisition type. For more information o n the display capabilities of IMA Q V ision, consult the IMAQ Vision for LabVIEW User [...]

  • Page 36

    Chapter 4 Programming with NI-IMAQ for 1394 VIs NI-IMAQ for IEEE-1394 Cameras User Manual 4-10 ni.com Y our intensi ty graph no w sh ould appear similar to the image shown in Figure 4-9. For more information on the Intensity G raph, consult your LabVIEW documentation Figure 4-9. Intensity Graph for Ima ge Display Use the IMA Q ImageT oArray VI to c[...]

  • Page 37

    Chapter 4 Programming with NI-IMAQ fo r 1394 VIs © National Instruments Corporation 4-11 NI-IMAQ for IEEE-1394 Cameras User Manual . Figure 4-11. Using a Picture Control to Display an RGB Image Camera Attributes Camera attributes allow you to control camera-specific features such as brightness and shutter speed directly from NI-IMAQ for 1394. You [...]

  • Page 38

    Chapter 4 Programming with NI-IMAQ for 1394 VIs NI-IMAQ for IEEE-1394 Cameras User Manual 4-12 ni.com Error Handling Every NI-IMAQ for 13 94 VI contains an error in input cluster and an error out output cluster, as show n in Figure 4-12. The clusters con tain a Boolean value that indicates whether an error occurred, the code for the error, and the [...]

  • Page 39

    Chapter 4 Programming with NI-IMAQ fo r 1394 VIs © National Instruments Corporation 4-13 NI-IMAQ for IEEE-1394 Cameras User Manual Error Code Format Error format for all NI-IMAQ for 1394 VIs is the same, as follows: error in (no err or) is a cluster that describes the error status before this V I ex ecutes. If error in indicates that an error occu[...]

  • Page 40

    Chapter 4 Programming with NI-IMAQ for 1394 VIs NI-IMAQ for IEEE-1394 Cameras User Manual 4-14 ni.com code is the number identifyin g an error or warning. If status is TR UE, code is a non-zero error code. If status is F ALSE, code can be zero or a warning code. Use the error handler VIs to look up the meaning of this code and to display the corres[...]

  • Page 41

    © National Instruments Corporation A- 1 NI-IMAQ for IEEE-1394 Cameras User Manual A T echnical Support Resources W eb Support National Instruments W eb support is your first stop for help in solving installation, configuration, and application pro blems and questions. Onlin e problem-solving and di agnostic resources include frequ ently asked ques[...]

  • Page 42

    Appendix A T echnical Support Resources NI-IMAQ for IEEE-1394 Cameras User Manual A-2 ni.com W orldwide Support National Instruments has of fices located around the world to help address your support needs. Y ou can access our branch of fice W eb sites from the W orldwide Off ices section of ni.com . Branch of fice W eb sites provide up-to-date con[...]

  • Page 43

    © National Instruments Corporation G-1 NI-IMAQ for IEEE-1394 Cameras User Manual Glossar y A acquisition window The image size specific to a video standard or camera resolution. acti ve pixel region The region of pixels acti vely being stored. Def ined by a pix el start [ relati ve to the horizontal synchronizat ion signal(HSYNC)] and a pixel coun[...]

  • Page 44

    Glossary NI-IMAQ for IEEE-1394 Cameras User Manual G- 2 ni.com chrominance See chroma . compiler A software utility that con verts a source program in a high-level programming language, such as Basic, C, or Pascal, into an object or compiled program in machine language. Compiled programs run 10 to 1,000 times faster than interpreted programs .S e e[...]

  • Page 45

    Glossary © National Instruments Corporation G-3 NI-IMAQ for IEEE-1394 Cameras User Manual dri ver Software that controls a specific hardw are device, such as an IMA Q or D A Q device. E external trigger A voltage pulse from an external source that triggers an ev ent such as A/D con version. F field For an interlaced video signal, a f ield is half [...]

  • Page 46

    Glossary NI-IMAQ for IEEE-1394 Cameras User Manual G- 4 ni.com I I/O Input/output. The transfer of data to/from a co mputer system in volving communications channels, operator interface de vices, and/or data acquisition and control interfaces. IEEE Institute of Electrical and Electronics Engineers. instrument dri ver A set of high-lev el software f[...]

  • Page 47

    Glossary © National Instruments Corporation G-5 NI-IMAQ for IEEE-1394 Cameras User Manual luma The brightness i nformation in the vi deo picture. The luma sign al amplitude v aries in propo rtion to the brightness of th e video signal and corresponds exactly to the monochrome pictur e. luminance See luma . LUT Lookup table. T able containing value[...]

  • Page 48

    Glossary NI-IMAQ for IEEE-1394 Cameras User Manual G- 6 ni.com O operating system Base-lev el software that controls a computer , runs programs, interacts with users, and communicates with installed hardware or peripheral de vices. P PCI Peripheral Component Interconnect. A hi gh-performance expansion b us architecture originally de veloped by Inte[...]

  • Page 49

    Glossary © National Instruments Corporation G-7 NI-IMAQ for IEEE-1394 Cameras User Manual resolution (1) The number of rows and columns of pixels. An image composed of m rows and n columns has a resolution of . This image has n pixels along its horizontal axis and m pixels along its v ertical axis. (2) The smallest signal increment that can be det[...]

  • Page 50

    Glossary NI-IMAQ for IEEE-1394 Cameras User Manual G- 8 ni.com V V V olts. VI V irtual Instrument. (1) A com bination of hardware and/or software elements, typically used with a PC, that has the functionality of a classic stand-alone instrument (2) A LabVIEW software module (VI), whi ch consists of a front panel user interface and a block diagram p[...]

  • Page 51

    © National Instruments Corporation I-1 N I-IMAQ for IEEE-1394 Cameras User Manual Index A acquisition fun ctions, 2-3 adv anced programming examples, 3-9 to 3-10 asynchronous grab using low-le vel functions, 3-10 asynchronous snap using low-le vel functions, 3-10 grab using low-le vel functions, 3-9 sequence acquisition using low-le vel functions,[...]

  • Page 52

    Index NI-IMAQ for IEEE-1394 Cameras User Manual I-2 ni.com L low-le vel functions acquisition fun ctions, 2-3 attribute functions, 2-4 utility functions , 2-5 M miscellaneous functions, 2-3 N National Instruments W eb s upport, B-1 NI Dev eloper Zone , B-1 NI-IMA Q for 1394 acquisition types, 4-5 grab, 4-5 sequence, 4-6 snap, 4-5 acquisition VIs, 4[...]