Gebruiksaanwijzing /service van het product Image Acquisition Software van de fabrikant National Instruments
Ga naar pagina of 68
IMAQ NI-IMAQ ™ User Manual Image Acquisition Software NI-IMAQ User Manual June 1998 Edition Pa r t Nu m be r 3 71443A - 01 ™ UM.book Page 1 Mo nday, July 13, 1998 9:49 AM.
Internet Support E-mail: s upport@natinst.com FTP Site: ftp.natinst.com Web Address: http://www.natinst.com Bulletin Board Support BBS United States: 512 794 5422 BBS United Kingdom: 01635 551422 BBS .
Important Information Warranty The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, du e to d efects in mate rials an d workman sh ip, for a period of 9 0 d ays from d ate o f sh ip m ent, as evidenced by receipts or other documentation.
© National Instruments Corporation v NI-IMAQ User Manual Contents About This Manual How to Use the NI-IMAQ Manual Set ............. ........... ............... .............. .............. ....... ix Organization of This Manual ................. ...
Contents NI-IMAQ User Manual vi © National Instruments Corporation Chapter 3 Programming with NI-IMAQ Introduction ............. ........... .............. ............... .............. .............. .............. ........... ......... 3-1 High-Level Functions .
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 ...................
© National Instruments Corporation ix NI-IMAQ User Manual About This Manual NI-IMA Q softw are is a po werful application programming interface (API) between your image acquisition application and the National In struments image acquisition (IMA Q) de vices.
About This Manual NI-IMAQ User Manu al 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.
About This Manu al © 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. Y ou could ha ve any of se veral types of documents, depending on the hardware and software in your system.
© 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 compatib le with NI.
Chapter 1 Introduction to NI-IMAQ NI-IMAQ User Manu al 1-2 © National Instruments Corporation Application Development Environments This release of NI-IMAQ supports the following Applicatio n Development Environments (ADEs) for Windows 95 and Windows NT: • LabVIEW version 4.
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 included.
Chapter 1 Introduction to NI-IMAQ NI-IMAQ User Manu al 1-4 © National Instruments Corporation Sample Programs Please refer to the readme.txt file located in your target instal latio n directory for the latest details on NI-IMAQ sample programs.
© National Instruments Corporation 2-1 NI-IMAQ User Manual 2 Software Over view This chapter describes the classes of NI-IMAQ functions and briefly describes each function.
Chapter 2 Software Overvie w NI-IMAQ User Manu al 2-2 © National Instruments Corporation Generic Functions Use generic functions in b oth high-level and low-level applications. imgInterfaceOpen Opens by name an interface as specified in the IMAQ Configuration Utility .
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 functi ons start and stop a continuous acqui sitio n of multiple fields or frames.
Chapter 2 Software Overvie w NI-IMAQ User Manu al 2-4 © National Instruments Corporation imgSessionWaitSignalAsync Monitors for a signal to be asserted and in v okes a user -def ined callback when the signal is asser ted. imgPulseCreate Conf igures the attributes of a pulse.
Chapter 2 Software Overview © National Instruments Corporation 2-5 NI-IMAQ User Manual Low-Level Functions Use low-level functions when y ou require more direct hardw are control. Acquisition Functions Use acquisition functions to configure, start, and abort an image acquisition, or examine a buffer during an acquisition.
Chapter 2 Software Overvie w NI-IMAQ User Manu al 2-6 © National Instruments Corporation Attribute Functions Use attribute functions to examine and change NI-IMAQ or camera attributes. imgGetAttribute Returns an attrib ute for an interface or session.
Chapter 2 Software Overview © National Instruments Corporation 2-7 NI-IMAQ User Manual imgGetBufferElement Gets an element of a specif ic type from a buf fer list. imgSessionClearBuffer Clears a session’s image data to the specified pixel value. imgSetArrayPointerValue Constructs an array of 32-bit pointers (a Visual Basic helper function).
© 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 pro gramming flow of NI-IMAQ, and programmin g examples. Flowcharts are included for the following operations: snap, grab, sequence, ring, and StillColor acquisitions.
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manu al 3-2 © National Instruments Corporation Low-Level Functions The low-level function set supports all types of acquisition and can be used to: •.
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. imgInterface Open requires an interface name and returns a handle to this interf ace.
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manu al 3-4 © National Instruments Corporation This example opens an interfac e 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.
Chapter 3 Programming with NI-IMAQ © National Instruments Corporation 3-5 NI-IMAQ User Manual attribute v alue is a numeric value of type inte ger . Float indicates that the attribute v alue is a numeric value of type floating point. The valid inte ger and float values are indicated in Possible Values .
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manu al 3-6 © National Instruments Corporation Figure 3-1 illustrates the values of the signals during a three-b uf fer sequence acquisition. Figure 3-1. NI-IMAQ Status Signals Y ou can use the NI-IMA Q status signals for man y purposes.
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.
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manu al 3-8 © National Instruments Corporation The sample then calls a process function to analyze the image. When the program is finished, it calls i mgClose with the interface handle and sets the freeResources flag to TRUE.
Chapter 3 Programming with NI-IMAQ © National Instruments Corporation 3-9 NI-IMAQ User Manual Figure 3-3. Grab Programming Flowchart The hlgrab.c example demonstrates ho w to perform a grab using imgGrabArea . The example performs multiple grabs until an appropriate condition is met.
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manu al 3-10 © National Instruments Corporation High-Level Sequence Functions Sequence functions include imgSequenceSetup , imgSessionStartAcquisition and imgStopAcquisitio n . A sequence initiates a variable-length and v ariable-delay transfer to multiple buffers.
Chapter 3 Programming with NI-IMAQ © National Instruments Corporation 3-11 NI-IMAQ User Manual The HLSeq.c example demonstrates ho w to perform a sequence acquisition using imgSequenceSetup . The e xample sets up a sequence that uses 10 user-allocated b uf fers.
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manu al 3-12 © National Instruments Corporation Figure 3-5. Ring Programming Flowchart The HLRing.c example demonstrates ho w to perform a ring acquisitio n using imgRingSetup .
Chapter 3 Programming with NI-IMAQ © National Instruments Corporation 3-13 NI-IMAQ User Manual the most recent video image. This process will continue until a designated condition is met and then the acquisition stops.
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manu al 3-14 © National Instruments Corporation Figure 3-6. Signal I/O Function Programming Flowchart Advanced Programming Examples You can use low-lev.
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 mu st perform the alignment yourself if you use window widths not aligned on a 32-bit boundary . After the program sets the R O I, it lock s th e memory and acquires the image.
Chapter 3 Programming with NI-IMAQ NI-IMAQ User Manu al 3-16 © National Instruments Corporation The main processing loop of the code sho ws how to process each b uffer acquired in sequential order . Performing a Ring Acquisition Using Low-Level Functions The LLRing.
Chapter 3 Programming with NI-IMAQ © National Instruments Corporation 3-17 NI-IMAQ User Manual Figure 3-7. Composite StillColor Snap Programming Flowchart The SCSnap.c example demonstrates ho w to perform a single, composite StillColor snap. The ex ample first opens an interface and a session.
© 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 IMA Q PCI/PXI-1 408 and Natio nal Instrument s StillColor technology , explains basic color theories, and describes the different output options supported by StillColor .
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 composite color vi deo camera.
Appendix A StillColor © National Instruments Corporation A-3 NI-IMAQ User Manual All of the traditional ways to separate the two signals result in visu al artifacts on the final picture.
Appendix A StillColor NI-IMAQ User Manual A-4 © National Instruments Corporation Figure A-1. Classical Decoding Figure A-2. StillColor Decoding Note Y ou can find color versions of the illustrations in this appendix in the online version of this document included with your NI-IMA Q software kit.
Appendix A StillColor © National Instruments Corporation A-5 NI-IMAQ User Manual Why StillColor? StillColor is optimized for single-frame acquisition.
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.
Appendix A StillColor © National Instruments Corporation A-7 NI-IMAQ User Manual Figure A-3. White Light and the Visible Spectrum White light is a combination of all colors at once. The spectrum of white light is continuous and goes from ultraviolet to infrared in a smooth transition.
Appendix A StillColor NI-IMAQ User Manual A-8 © National Instruments Corporation Image Representations Color images can be represented in several dif ferent formats. These formats can contain all color information from the image or the y can consist of just one aspect of the color information, such as hue or luminanc e.
Appendix A StillColor © National Instruments Corporation A-9 NI-IMAQ User Manual used if you are performing av eraging on you r image. For example, av eraging an image 16 times requires four ex tra bits (16 = ) to represent the increased dynamic range.
© National Instruments Corporation B-1 NI-IMAQ User Manual B Customer Communication For your con venience, this appendix contains forms to help you gather the information necessary to help us solv e yo ur tech nical problems and a form you can use to comment on the product documentation.
NI-IMAQ User Manual B-2 © National Instruments Corporation Fax-on-Demand Support Fax-on-Demand is a 24-hour information retrie val system containing a library of documents on a wide range of technical information. Y ou can access Fax-on-Demand from a touch-tone telephone at 512 418 1111.
T echnical Support Form Photocopy this form and update it each time you mak e changes to your software or hardware, and use the completed copy of this form as a reference for your current conf iguration.
NI-IMAQ Hardware and Software Configuration Form Record the settings and re visions of your hardware and software on the line to the right of each item. Complete a ne w cop y of this form each time you re vise your software or hardware conf iguration, and use this form as a reference for your current configuration.
Documentation Comment Form National Instruments encourages you to comment on the documentation supplied with our pro ducts. This information helps us provide quality products to meet your needs.
© National Instruments Corporation G-1 NI-IMAQ User Manual Glossar y Pref ix Meanings V alue p- pico 10 –1 2 n- nano- 10 –9 µ- micro- 10 –6 m- milli- 10 –3 k- kilo- 10 3 M- mega- 10 6 G- gig.
Glossary NI-IMAQ User Manu al G-2 © National Instruments Corporation acti v e line region the region of lines activ ely being stored; defined by a line start (relati ve t o VSYNC) and a line count ac.
Glossary © National Instruments Corporation G-3 NI-IMAQ User Manual black reference lev el the lev el that represents the darkest an image can get. See also white reference lev el.
Glossary NI-IMAQ User Manu al G-4 © National Instruments Corporation D D/A digital-to-analog D AC digital-to-analog conv erter; an electronic device, often an inte grated circuit, that con verts a di.
Glossary © National Instruments Corporation G-5 NI-IMAQ User Manual dynamic range the ratio of the largest signal le vel a circuit can handle to the smallest signal lev el it can handle (usually take.
Glossary NI-IMAQ User Manu al G-6 © National Instruments Corporation function a set of software instruction s ex ecuted by a single line of code that may hav e input and/or output parameters and retu.
Glossary © National Instruments Corporation G-7 NI-IMAQ User Manual I IC integrated circuit ID identification IEEE Institute of Electrical and Electronics Engineers in.
Glossary NI-IMAQ User Manu al G-8 © National Instruments Corporation K k kilo—the standard metric prefix for 1,000, or 10 3 , used with units of measure such as volts, hertz, and meters K kilo—th.
Glossary © National Instruments Corporation G-9 NI-IMAQ User Manual memory buf fer See buf fer . memory windo w continuous blocks of memory that can be accessed quickly b y changing addresses on the .
Glossary NI-IMAQ User Manual G-10 © National Instruments Corporation PCLKIN pixel clock in signal PFI programmable function input PGIA programmable gain instrumentation amplifier picture aspect ratio.
Glossary © National Instruments Corporation G-11 NI-IMAQ User Manual resolution the smallest signal increment that can be detected b y a measurement system; resolution can be expressed in bits, in proportions, or in percent of full scale. For e xample, a system has 12-bit resolution, one part in 4,096 resolution, and 0.
Glossary NI-IMAQ User Manual G-12 © National Instruments Corporation syntax the set of rules to which statements must conform in a particular programming language system RAM RAM installed on a person.
Glossary © National Instruments Corporation G-13 NI-IMAQ User Manual VSYNC vertical sync signal—the synchronization pulse generated at the beginning of each video f ield that tells the video monito.
© National Instruments Corporation I-1 NI-IMAQ User Manual Index A acquisition functions, 2-5 application dev elopment, 1-2 to 1-4 creating applications, 1-3 NI-IMA Q librari es, 1- 2 attribute funct.
Index NI-IMAQ User Manual I-2 © National Instruments Corporation F fax and telephone support numbers, B-2 Fax-on-Demand support, B-2 files required for application de v elopment, 1-3 FTP support, B-1.
Index © National Instruments Corporation I-3 NI-IMAQ User Manual sequence functions, 3-15 to 3-16 snap functions, 3-14 to 3-15 attribute functions, 2-6 buf fer management functions, 2-6 to 2-7, 3-4 interface functions, 2-7, 3-2 to 3-3 programming considerations, 3-2 utility functions, 2-7 luminance, A-7 luminance planes, A-8 to A-9 M manual.
Index NI-IMAQ User Manual I-4 © National Instruments Corporation session functions list of functions, 2-4 programming considerations, 3-3 to 3-4 signal I/O functions list of functions, 2-3 to 2-4 pro.
Een belangrijk punt na aankoop van elk apparaat National Instruments Image Acquisition Software (of zelfs voordat je het koopt) is om de handleiding te lezen. Dit moeten wij doen vanwege een paar simpele redenen:
Als u nog geen National Instruments Image Acquisition Software heb gekocht dan nu is een goed moment om kennis te maken met de basisgegevens van het product. Eerst kijk dan naar de eerste pagina\'s van de handleiding, die je hierboven vindt. Je moet daar de belangrijkste technische gegevens National Instruments Image Acquisition Software vinden. Op dit manier kan je controleren of het apparaat aan jouw behoeften voldoet. Op de volgende pagina's van de handleiding National Instruments Image Acquisition Software leer je over alle kenmerken van het product en krijg je informatie over de werking. De informatie die je over National Instruments Image Acquisition Software krijgt, zal je zeker helpen om een besluit over de aankoop te nemen.
In een situatie waarin je al een beziter van National Instruments Image Acquisition Software bent, maar toch heb je de instructies niet gelezen, moet je het doen voor de hierboven beschreven redenen. Je zult dan weten of je goed de alle beschikbare functies heb gebruikt, en of je fouten heb gemaakt die het leven van de National Instruments Image Acquisition Software kunnen verkorten.
Maar de belangrijkste taak van de handleiding is om de gebruiker bij het oplossen van problemen te helpen met National Instruments Image Acquisition Software . Bijna altijd, zal je daar het vinden Troubleshooting met de meest voorkomende storingen en defecten #MANUAl# samen met de instructies over hun opplosinge. Zelfs als je zelf niet kan om het probleem op te lossen, zal de instructie je de weg wijzen naar verdere andere procedure, bijv. door contact met de klantenservice of het dichtstbijzijnde servicecentrum.