Manuel d'utilisation / d'entretien du produit 321645c-01 du fabricant National Instruments
Aller à la page of 554
NI-DAQ ™ Function Reference Manual for PC Compatibles Version 6.1 Data Acquisition Softw are for the PC NI-DAQ FRM for PC Compatibles April 1998 Edition Part Number 321645C-01 © Copyright 1991, 1998 National Instruments Corporation. All rights reserved.
Inte rnet Sup port E-mail: support@natinst.com FTP Site : ftp.natinst.com Web Addres s: www.natinst.com Bulletin Board Sup port BBS Unite d St at es : 51 2 79 4 5422 BBS Unite d Kin gd om: 01 63 5 55 .
Important Information Warranty The media on wh ich you receive Na tional Instrume nts software are wa rranted not to fail to ex ecute programming instruc tions, due to defects in materials and workma nship, for a pe riod of 90 days from date of shipme nt, as evid enced by receipt s or other do cumentation.
© Natio nal In strume nts Corp oration v NI-DA Q FRM for PC C omp atibles Cont ents About This M anual How to Use the NI-DAQ Manu al Set ............. ........... ................. ................. ........... ......... xiii Organization of This Manual .
Conten ts NI-DAQ FRM for PC Compatibles vi © Natio nal In strume nts Corp oratio n AI_VScale ....... ................. ................. ........... ................. ................. ........... ................. .... .2 - 2 0 Align_DMA_Buffer ....
Conten ts © Natio nal In strume nts Corp oration vii NI-DA Q FRM for PC C omp atibles DIG_Block_Check............. ................. ............ ................. ................ ............ ................. ... 2-147 DIG_Block_Clear ............
Conten ts NI-DAQ FRM for PC Compatibles viii © Natio nal In strume nts Corp oratio n RTSI_Clock .......... ................. ................. ....................... ................. ................. ........... ..... 2- 287 RTSI_Conn ............
Conten ts © Natio nal In strume nts Corp oration ix NI-DA Q FRM for PC C ompat ibles WFM_DB_Trans fer ................. ............................ ............................ ............................. ... 2-41 5 WFM_from_Disk............... ..
Conten ts NI-DAQ FRM for PC Compatibles x © Natio nal In strume nts Corp oratio n Figure 2-6. ND_INSIDE_REGION................... ................. ........... ................. ........... 2-85 Figure 2-7. ND_HIGH_HYSTERESIS ............. ..........
Conten ts © Natio nal In strume nts Corp oration xi NI-DA Q FRM for PC C omp atibles Table 2-1. Parameter Settings for A I_Configure ................. ................. ................. ... 2-7 Table 2-2. Port 0 Digital I/O Lines R eserved ..... ...
Conten ts NI-DAQ FRM for PC Compatibles xii © Natio nal In strume nts Corp oratio n Table 2-39. Data Ranges for the Buffer Parameter for DAQAr b 5411 Devices........ 2-426 Table 2-40. Mode Values for the Cou nt Parameter for DAQArb 54 11 Devices ....
© Natio nal In strume nts Corp oration xiii N I-DA Q FRM fo r PC Com pat ibles About This Manual The NI-DAQ Funct i on Refe re nce M anu al f or PC Co mpat i ble s is f or users of the NI-D A Q sof tware for PC com patibles version 6.
NI-DAQ FRM for PC Compatibles xiv © Natio nal In strume nts Corp oratio n About This Ma nual •A p p e n d i x B , A nal og Inp ut Ch annel , Gain Se tting s, and Voltage Ca lculat ion , lists the v.
© Natio nal In strume nts Corp oration xv NI-DA Q FRM for PC Co mpat ibles About This Ma nual Am9513- ba sed devic e These dev ice s are the AT- MI O-16 , AT-M IO -16F- 5, A T-MI O-16 X, AT-MIO -16D, and AT-MIO- 64F-5 .
NI-DAQ FRM for PC Compatibles xvi © Natio nal In strume nts Corp oratio n About This Ma nual MIO-F -5 /16X d evi ce Refers to the A T-M IO - 16F- 5, AT- MI O-16 X, a nd the AT -M IO -64F -5 . MIO-16 /1 6D d evic e Refers to the A T-M IO - 16 an d A T -MIO - 16D.
© Natio nal In strume nts Corp oration xvii NI-DA Q FRM for PC C omp atibles About This Ma nual Simultaneous sampling Refers to the PCI-611 0E, PCI-61 11E, PCI-4 451, PCI-445 2, PCI-4551 , device and PC I-4552 . VXI- MIO de vice Refer s to the VXI -MIO-64 E-1 a nd VXI -MIO-6 4XE-10 .
NI-DAQ FRM for PC Compatibles xviii © Natio nal In strume nts Corp oratio n About This Ma nual NEC-AI-1 6XE-50 16 16-b it NEC AI E Series NEC-MIO-16E-4 16 1 2-bit NEC MIO E Seri es NEC-MIO-16XE-50 16.
© Natio nal In strume nts Corp oration xix NI -DAQ FR M fo r PC Comp atib les About This Ma nual About the National Instruments Documenta tion Set The NI-DAQ Func tion Reference Manu al for PC Comp atibles is one piece of the docu mentation set for your D A Q system.
NI-DAQ FRM for PC Compatibles xx © Natio nal In strume nts Corp oratio n About This Ma nual Related Documentation The follo wing documents contai n i nfo rmati on yo u may f ind useful as you read this manual: For detailed hardware information, refer to the user manual included with each board.
© Natio nal In strume nts Corp oration 1-1 NI-DA Q FRM fo r PC Com pat ibles Chapter 1 Using the NI-DAQ Functions This chapter contain s imp ortant information abou t ho w to apply the function descriptions in this manu al to yo ur programm ing lang uage and environment.
Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-2 © Natio nal In strume nts Corp oratio n use the configuratio n utility to verify your device numbers . Y o u can use multiple D A Q devices in one application; to d o so, simply pass the appropriate de vice number to each fun ction.
Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-3 NI-DA Q FRM fo r PC Com pat ibles Arrays When a primary type is inside square brackets (for example, [i16]) an array of the type named is requ ired for that parameter. Multipl e T y pes Some param eters can be in multipl e types .
Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-4 © Natio nal In strume nts Corp oratio n The pre vious example describes a par ameter that can accept an arr ay of signed i nteg ers or an arr ay of float ing-poi nt number s.
Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-5 NI-DA Q FRM fo r PC Com pat ibles NI-DAQ Constants I nclude File The file NIDAQCNS.INC contains definitions for constants required for some of the NI-DAQ fu nctions. You should use the constants symbo ls in your pro grams; do no t use the numer ical values.
Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-6 © Natio nal In strume nts Corp oratio n T able 1-3 shows ho w the Lab W in dows/CVI functio n p anel tree is org anized, and the NI -D A Q function nam e that corresponds to each functi on panel.
Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-7 NI-DA Q FRM fo r PC Com pat ibles Analog I nput Single Point Change Analog Input Param eter AI_Change_Parameter Measu.
Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-8 © Natio nal In strume nts Corp oratio n Start Scan SCAN_Start Check DAQ or Scan DAQ_Check Assign Rate to DAQ Group DAQ_Set_.
Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-9 NI-DA Q FRM fo r PC Com pat ibles Waveform Generation Generate WFM fr om Array WFM_Op Generate WFM fr om Disk WFM _fr.
Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-10 © Natio nal In strume nts Corp oratio n Group Mode Confi gure Group DIG_Grp_Config Read Group DIG_In_Grp Write Group DIG_O.
Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-11 NI -DA Q FRM fo r PC Comp ati bles Set Up Mux C ounter SCXI_MuxCtr_Setup Set Up Track/Hold SCXI_Track_Hold_Setup Con.
Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-12 © Natio nal In strume nts Corp oratio n Count Periods CTR_Period Read Coun ter CTR_EvRead Stop Co unter CTR_Stop Restart C.
Chapter 1 Using th e NI-DAQ Fun ctions © Natio nal In strume nts Corp oration 1-13 NI -DA Q FRM fo r PC Comp ati bles Initializa tion/Utilities is a class of function s used for general bo ard initialization and configuration, for con figuration retrie v al, and for setting NI-D A Q p roperties.
Chapte r 1 U sing th e NI-DA Q Funct ions NI-DAQ FRM for PC Compatibles 1-14 © Natio nal In strume nts Corp oratio n Count er/Ti mer is a class of function p a n els that perform coun ting and timing operations.
© Natio nal In strume nts Corp oration 2-1 NI-DA Q FRM fo r PC Com pat ibles Chapter 2 Function Reference This chapter contains a d etailed explanation o f each NI-D A Q function.
Chapter 2 Function R eference — AI_Change_Pa rameter NI-DAQ FRM for PC Compatibles 2-2 © Natio nal In strume nts Corp oratio n • Pascal pr ogrammers— NIDAQCNS.
Chapter 2 Function R eferenc e — AI_Che ck © Natio nal In strume nts Corp oration 2-3 NI-DA Q FRM fo r PC Com pat ibles AI_Check Format statu s = AI _C hec k (devic e Numbe r , read ing A vailabl e , reading ) Purpose Returns the status of the analog inpu t circuitry and an analog input reading if o ne is available.
Chapter 2 Function R eferenc e — AI_Che ck NI-DAQ FRM for PC Compatibles 2-4 © Natio nal In strume nts Corp oratio n Using This Function AI_Check chec ks the status of the analog input circuitry . If the de vice has p erformed an A/D con v ersion, AI_Check re tur ns read ingAvaila ble = 1 and the A/D con version result.
Chapter 2 Function R eference — AI_ Clear © Natio nal In strume nts Corp oration 2-5 NI-DA Q FRM fo r PC Com pat ibles AI_Clear Format status = AI_Clear (deviceNumber) Purpose Clears the analog inp ut circuitry and empties the FIFO memory .
Chapter 2 Function R eference — AI_ Configure NI-DAQ FRM for PC Compatibles 2-6 © Natio nal In strume nts Corp oratio n AI_Configure Format status = AI_Confi gure (de viceNumber , chan, inputMode, .
Chap ter 2 F unctio n Refere nce — AI_Co nfigure © Natio nal In strume nts Corp oration 2-7 NI-DA Q FRM fo r PC Com pat ibles 1: Referenced Single-Ended (RSE) con figuration (used when the inp ut signal does not have it s own ground reference.
Chapter 2 Function R eference — AI_ Configure NI-DAQ FRM for PC Compatibles 2-8 © Natio nal In strume nts Corp oratio n Not e If a device is software configurable, the inputMode , input Range , and polarity parameters are used to program the device f or the configuration you want.
Chap ter 2 F unctio n Refere nce — AI_Co nfigure © Natio nal In strume nts Corp oration 2-9 NI-DA Q FRM fo r PC Com pat ibles Using This Function When you attach an SC -2040 or S C-2042- R TD to you r D A Q device, you must co nf igure channels 0 through 7 for d if ferential m ode.
Chapter 2 Function R eference — AI_ Mux_Conf ig NI-DAQ FRM for PC Compatibles 2-10 © Natio nal In strume nts Corp oratio n AI_Mux_Confi g Format status = AI _Mux_C onfig (deviceNumber , numM ux Brd.
Chap ter 2 F unctio n Refere nce — AI_Mu x_Conf ig © Natio nal In strume nts Corp oration 2-11 NI -DA Q FRM fo r PC Comp ati bles Fo r the A T-MIO-64F -5, A T-MIO-64E- 3, PCI-6031E (MIO-64XE-10), PCI-6033 (AI-64XE-10 ), and PCI-6071E (MIO-64 E-1), you als o must call M IO_Config if you pl an to u se AMUX -64T channels.
Chapter 2 Function R eference — AI_ Read NI-DAQ FRM for PC Compatibles 2-12 © Natio nal In strume nts Corp oratio n AI_Read Format status = AI_Read (deviceNumber , chan, gain, reading) Purpose Reads an analog input channel (initiates an A/D con v ersion on an analog input channel) and returns the unscaled r esult.
Chapter 2 Function R eference — AI_ Read © Natio nal In strume nts Corp oration 2-13 NI -DA Q FRM fo r PC Comp ati bles Not e NI-DA Q does no t distingu ish between the low-gain and high-gain vers ions of the AT -M I O - 1 6 .
Chapter 2 Function R eference — AI_ Read_Scan NI-DAQ FRM for PC Compatibles 2-14 © Natio nal In strume nts Corp oratio n AI_Read_ Scan Format status = AI _Read_Scan (A I_ Read_Scan (d eviceNumber ,.
Chap ter 2 Funct ion Ref ere nce — AI_S etup © Natio nal In strume nts Corp oration 2-15 NI -DA Q FRM fo r PC Comp ati bles AI_Setup Format status = AI_Setup (de viceNumber , chan, gain) Purpose Selects an analog input channel and gain setting for externally pulsed con version operation s.
Chapter 2 Function R eferenc e — AI_Set up NI-DAQ FRM for PC Compatibles 2-16 © Natio nal In strume nts Corp oratio n Using This Function AI_Setup addresses the specif ied analog input chann el and changes the input gain to the specified ga in setting.
Chapte r 2 Functio n Ref erence — AI_VRe ad © Natio nal In strume nts Corp oration 2-17 NI -DA Q FRM fo r PC Comp ati bles AI_VRead Format statu s = AI _V Read ( devic e Numbe r , chan, gain , volt.
Chapter 2 Function R eferenc e — AI_VRe ad NI-DAQ FRM for PC Compatibles 2-18 © Natio nal In strume nts Corp oratio n volta ge is the floating-point v ariable in which NI-D A Q returns the measured v oltage, scaled to units of volts. Not e C Progr ammers— voltag e is a pass -by-refere nce pa rameter .
Chapter 2 Function R eference — AI_ VRead_Sc an © Natio nal In strume nts Corp oration 2-19 NI -DA Q FRM fo r PC Comp ati bles AI_VRead_Scan Format status = AI _VRead_Scan (deviceNum ber , reading).
Chapter 2 Function R eference — AI_ VScale NI-DAQ FRM for PC Compatibles 2-20 © Natio nal In strume nts Corp oratio n AI_VScale Format statu s = AI _V Scale (devic eNum ber , cha n, ga in , gai nAdj u s t, o ffse t, readi ng, volt age) Purpose Con verts the bin ary result from an AI_Read call to the actual input voltage.
Chapte r 2 Function Refe rence — AI_VSc ale © Natio nal In strume nts Corp oration 2-21 NI -DA Q FRM fo r PC Comp ati bles gainA djust is th e multiplying factor to adjust th e gain . Refer to Appendix B, Analo g Input Channel, Gai n Settings, and Volta ge C al culation , for the procedure for determining gainA djust .
Chapter 2 Function R eference — Align_D MA_Buff er NI-DAQ FRM for PC Compatibles 2-22 © Natio nal In strume nts Corp oratio n Align_D MA_Bu ffer Format status = Align_DMA_Buffer (de viceNumber , resour ce, bu ffer , count, bufferSize, alignIndex) Purpose Aligns the data i n a DMA buf fer to a voi d crossing a physical page boun dary .
Chapter 2 F unction Reference — Align_DMA_Buffer © Natio nal In strume nts Corp oration 2-23 NI -DA Q FRM fo r PC Comp ati bles buffer is the integer array of samples NI-D A Q uses in the waveform or pattern generation. The actual size of bu ffer sh ould be lar ger than th e number of samples to make room for possible align m ent.
Chapter 2 Function R eference — Align_D MA_Buff er NI-DAQ FRM for PC Compatibles 2-24 © Natio nal In strume nts Corp oratio n bufferSize ≥ count + 1.
Chapte r 2 Function Re ference — AO _Calibrate © Natio nal In strume nts Corp oration 2-25 NI -DA Q FRM fo r PC Comp ati bles AO_Calibrate Format status = A O_Calibrate (deviceNumber , operation, E.
Chapter 2 Function Refere nce — AO_Calibrate NI-DAQ FRM for PC Compatibles 2-26 © Natio nal In strume nts Corp oratio n Using This Function When NI-D A Q initializes th e A T- A O-6 /10, the D A C calibration constants s tored in EEPRO Mloc 1 (user calibration area 1) provide the gain and of fset values used to ensure proper de vice operation.
Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-27 NI -DA Q FRM fo r PC Comp ati bles AO_Change_Param eter Format status = A O_Cha ng e_Parameter .
Chapter 2 Function R eference — AO_Cha nge_Para meter NI-DAQ FRM for PC Compatibles 2-28 © Natio nal In strume nts Corp oratio n Legal v alues for para mValue depend on param ID .
Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-29 NI -DA Q FRM fo r PC Comp ati bles For the VXI- A O-48XDC device the para mID of ND_OUTPUT_TYPE is used in conj unction with the channel v alue to select the analog output chan nel to be af fected.
Chapter 2 Function R eference — AO_Cha nge_Para meter NI-DAQ FRM for PC Compatibles 2-30 © Natio nal In strume nts Corp oratio n When using PCI E Series devices with DMA (default data transfer condition), the device has an ef fecti ve FIFO size 32 samples lar g er than the FIFO size specified f or the board.
Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-31 NI -DA Q FRM fo r PC Comp ati bles T o change the FIFO transfer cou nt, set para mID to ND_FIFO_TRAN SFER_COUNT and use paramV alue to pass in a 3 2-bit integer .
Chapter 2 Function R eference — AO_Cha nge_Para meter NI-DAQ FRM for PC Compatibles 2-32 © Natio nal In strume nts Corp oratio n Output Enable On some of the de vices, you can disabl e the outp ut e v en when th e wa v eform generation is in progres s.
Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-33 NI -DA Q FRM fo r PC Comp ati bles Output Attentuation Some de vices have atten u ators after the final amplifier stage.
Chapter 2 Function R eference — AO_Cha nge_Para meter NI-DAQ FRM for PC Compatibles 2-34 © Natio nal In strume nts Corp oratio n T rigger Mode Some de vices can generate the wa veforms stored in the memor y on board in dif ferent ways by setting the trigger mode parameter .
Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-35 NI -DA Q FRM fo r PC Comp ati bles PLL Reference Frequency On some of the d evices, yo u can phase-lock the in ternal timebase to an ex ternal reference clock.
Chapter 2 Function R eference — AO_Cha nge_Para meter NI-DAQ FRM for PC Compatibles 2-36 © Natio nal In strume nts Corp oratio n paramV alue to 0 or 10 0. By s etting it t o 0, the S YNC ou tput go es to 0 V . If you s et it to 100, it goes to +5 V .
Chap ter 2 Funct ion Re fere nce — AO_C hange _Para meter © Natio nal In strume nts Corp oration 2-37 NI -DA Q FRM fo r PC Comp ati bles Memory T ransfer Width When doing w aveform g eneration on PCI E Series boards that use the PCI-MITE f o r DMA transfers, NI-D A Q transfers data from host memory to the D A Q device 16 bits at a time.
Chapter 2 Function R eference — AO_Con figure NI-DAQ FRM for PC Compatibles 2-38 © Natio nal In strume nts Corp oratio n AO_Configure Format status = A O_Configur e (deviceNumber , chan, outputP ol.
Chapte r 2 Function Re ference — AO _Configure © Natio nal In strume nts Corp oration 2-39 NI -DA Q FRM fo r PC Comp ati bles outp utPolar ity indicates whether the analog ou tput channel is conf igured for unipolar or bipol ar oper a tio n.
Chapter 2 Function R eference — AO_Con figure NI-DAQ FRM for PC Compatibles 2-40 © Natio nal In strume nts Corp oratio n If you mak e a reference vo ltage connect ion, you mu st assign ref Voltage the v a lu e o f the external reference v oltag e in a call to AO_Configure for the AO_VWrite and AO_VScale function s to operate properly .
Chapte r 2 Function Re ference — AO _Configure © Natio nal In strume nts Corp oration 2-41 NI -DA Q FRM fo r PC Comp ati bles AO_Configure store s information abou t the analog output channe l on the specified bo ard in the conf iguration table for th e analog channel.
Chapter 2 Function R eference — AO_U pdate NI-DAQ FRM for PC Compatibles 2-42 © Natio nal In strume nts Corp oratio n AO_Update Format status = A O_Update (deviceNumber) Purpose Updates analog output channels on the specified de vice to ne w vo ltage v alues when the later internal update mode is enab led by a pre vious call to AO_Configure .
Chapter 2 Function Reference — AO_VSc ale © Natio nal In strume nts Corp oration 2-43 NI -DA Q FRM fo r PC Comp ati bles AO_VScale Format status = A O_VScale (deviceNumber , chan, voltage, binV al) Purpose Scales a voltage to a binary v alue that, when written to one of the an alog output channels, produces the specif ied voltage.
Chapter 2 Function Refere nce — AO_VScale NI-DAQ FRM for PC Compatibles 2-44 © Natio nal In strume nts Corp oratio n Notice that refVoltage is the v alue you specify in AO_Configure .
Chap ter 2 Funct ion Re fere nce — AO_V Writ e © Natio nal In strume nts Corp oration 2-45 NI -DA Q FRM fo r PC Comp ati bles AO_VWrite Format status = A O_VWrite (deviceNumber , chan, voltage) Pur.
Chapter 2 Function R eference — AO_VWr ite NI-DAQ FRM for PC Compatibles 2-46 © Natio nal In strume nts Corp oratio n If you set the output type to current by calling AO_Change_Param eter , the floating-point v alue indicates the current in am ps. Default rang es (unipolar , internal voltage ref erence): AO-2D C devi ce: 0 t o 0.
Chap ter 2 Funct ion Ref ere nce — AO_Wr ite © Natio nal In strume nts Corp oration 2-47 NI -DA Q FRM fo r PC Comp ati bles AO_Write Format status = A O_Write (deviceNumber , chan, value) Purpose Writes a binary v alue to one of the analog output chan nels, changing the v o ltage pro duced at the channel.
Chapter 2 Function R eference — AO_Wr ite NI-DAQ FRM for PC Compatibles 2-48 © Natio nal In strume nts Corp oratio n Not e Some inaccuracy results when you use AO_Write on th e VXI-A O -48XDC, because this device w orks with a larger analog output resolution than can be represe nted by th e 16-bit value parame te r .
Chapter 2 Function R eference — Calibr ate_1200 © Natio nal In strume nts Corp oration 2-49 NI -DA Q FRM fo r PC Comp ati bles Calibrate_12 00 Format status = Calibrate_1200 (de vice, calOP , sa ve.
Chapter 2 Function R eference — Calibr ate_1200 NI-DAQ FRM for PC Compatibles 2-50 © Natio nal In strume nts Corp oratio n Caution R ead the calibration chapter in your device u ser manual before using Calibrate_1200 . Para meters Input Para meter Discussion calOP determines the operation to b e perform e d.
Chapter 2 Function R eference — Calibr ate_1200 © Natio nal In strume nts Corp oration 2-51 NI -DA Q FRM fo r PC Comp ati bles obtained du ring the pr ocess remain in use by the DACs until the device i s initialized again.
Chapter 2 Function R eference — Calibr ate_1200 NI-DAQ FRM for PC Compatibles 2-52 © Natio nal In strume nts Corp oratio n sav eNewC al is v alid on ly when calOP i s 2 or 3.
Chapter 2 Function R eference — Calibr ate_1200 © Natio nal In strume nts Corp oration 2-53 NI -DA Q FRM fo r PC Comp ati bles DAC1chan is the analog input ch annel connected to D A C1 when calOP is 3. Range: 0 through 7 . calRefVolts is the v alue of the DC calibr ation voltage con nected to calRefChan when calOP = 2.
Chapter 2 Function R eference — Calibr ate_1200 NI-DAQ FRM for PC Compatibles 2-54 © Natio nal In strume nts Corp oratio n Next call this function again; for e xample: status = Calibrate_1200 (device, 5, 0, EEPROMloc, 0, 0, 0, 0, 0, 0) where the device and EEPR OMloc are the same as in the first function call.
Chapter 2 Function Refe rence — Calibrate _DSA © Natio nal In strume nts Corp oration 2-55 NI -DA Q FRM fo r PC Comp ati bles Calibrate_DSA Format status = Calibrate_ DSA (deviceNumbe r , operation, r efV oltage) Purpose Use this function to calibrate your DSA device.
Chapter 2 Fun ction Reference — Calibrate_DSA NI-DAQ FRM for PC Compatibles 2-56 © Natio nal In strume nts Corp oratio n Using This Function Y our de vice contains calibration D/A con verters (calD ACs) that are u sed for f ine-tuning the analog cir cuitry .
Chapter 2 Function Refe rence — Calibrate _DSA © Natio nal In strume nts Corp oration 2-57 NI -DA Q FRM fo r PC Comp ati bles Restoring Factory Calibration T o restore the factory v alue of the internal reference voltage af ter an e xt ernal calibration, set operation to ND_RESTORE_FACTORY_CALIBRATION.
Chapter 2 Function R eference — Calibr ate_E_Series NI-DAQ FRM for PC Compatibles 2-58 © Natio nal In strume nts Corp oratio n Calibrate_E_ Series Format status = Calibrate_E_Series (deviceNumber ,.
Chapter 2 Funct ion Refere nce — Calibrat e_E_Series © Natio nal In strume nts Corp oration 2-59 NI -DA Q FRM fo r PC Comp ati bles setOfCalCons t selects the set of calibration constants to be used by NI- D A Q. These calibration constants reside in the onboard EEPR OM or are maintained by NI-D A Q.
Chapter 2 Function R eference — Calibr ate_E_Series NI-DAQ FRM for PC Compatibles 2-60 © Natio nal In strume nts Corp oratio n the default load area is the area that contains the calibration constants obtained b y calibrating the de vice in the factory .
Chapter 2 Funct ion Refere nce — Calibrat e_E_Series © Natio nal In strume nts Corp oration 2-61 NI -DA Q FRM fo r PC Comp ati bles Exam ple: Y ou w ant to perf orm self-calibrat ion of y our de vice and you w ant to store th e new s et of calibration const ants in the us er area of the EEPROM.
Chapter 2 Function R eference — Calibr ate_E_Series NI-DAQ FRM for PC Compatibles 2-62 © Natio nal In strume nts Corp oratio n Calibration Constant Loading by NI-DAQ NI-D A Q automatically loads calibration constants into calD A Cs whene ver you call functions that depend on them ( AI , AO , DAQ , SCAN , and WFM functions).
Chapter 2 Funct ion Refere nce — Config_Ala rm_Dea dban d © Natio nal In strume nts Corp oration 2-63 NI -DA Q FRM fo r PC Comp ati bles Config_Alarm_De adband Format status = Co nfig_Alarm _Deadba.
Chapter 2 Function R eference — Con fig_Alarm_D eadban d NI-DAQ FRM for PC Compatibles 2-64 © Natio nal In strume nts Corp oratio n The channel s tring has one of the fol lo w ing formats : xn SCn!MDn!CHn AMn!n where x: AI for analog input cha nnel.
Chapter 2 Funct ion Refere nce — Config_Ala rm_Dea dban d © Natio nal In strume nts Corp oration 2-65 NI -DA Q FRM fo r PC Comp ati bles alar mOnM essag e and al armOffMessa ge are messages you define. W hen the alarm-on condition occurs , NI-D A Q p a ss es alarm OnMes sage back to you.
Chapter 2 Function R eference — Con fig_Alarm_D eadban d NI-DAQ FRM for PC Compatibles 2-66 © Natio nal In strume nts Corp oratio n Figu re 2- 2. Low Alar m Dead band Config_Alarm_Deadband is a high-le vel function fo r NI-D A Q event messaging.
Chap ter 2 Funct ion Refer enc e — Config _A T rig_Event _Mess age © Natio nal In strume nts Corp oration 2-67 NI -DA Q FRM fo r PC Comp ati bles Config_A T rig_ Event_Messa ge Format statu s = Con.
Chapter 2 Function R eference — Con fig_A T rig _Event_M essa ge NI-DAQ FRM for PC Compatibles 2-68 © Natio nal In strume nts Corp oratio n chanStr is a string descr iption of the t rigger analog channel or di gital port. The channel s tring has one of the fol lo w ing formats : xn SCn!MDn!CHn AMn!n where x : AI for analog input channel.
Chap ter 2 Funct ion Refer enc e — Config _A T rig_Event _Mess age © Natio nal In strume nts Corp oration 2-69 NI -DA Q FRM fo r PC Comp ati bles windowSize is the nu m ber of volts belo w trigL ev.
Chapter 2 Function R eference — Con fig_A T rig _Event_M essa ge NI-DAQ FRM for PC Compatibles 2-70 © Natio nal In strume nts Corp oratio n Figu re 2-3 . Analog T ri gger Event Config_ATrig_Event_Message is a high-le vel fun ction for NI-D A Q ev ent messaging.
Chapter 2 Funct ion Refere nce — Config_D AQ_Eve nt_Mes sage © Natio nal In strume nts Corp oration 2-71 NI -DA Q FRM fo r PC Comp ati bles Confi g_DAQ _Even t_Mes sage Format statu s = Config_DA Q.
Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-72 © Natio nal In strume nts Corp oratio n Para meter Discussion mode indicates whether to add a new message, remo ve an old message, or clear all messages associated with the gi ven de vice.
Chapter 2 Funct ion Refere nce — Config_D AQ_Eve nt_Mes sage © Natio nal In strume nts Corp oration 2-73 NI -DA Q FRM fo r PC Comp ati bles The follo wi ng string specifies SCXI channel 1 in SCXI m.
Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-74 © Natio nal In strume nts Corp oratio n Table 2 -17.
Chapter 2 Funct ion Refere nce — Config_D AQ_Eve nt_Mes sage © Natio nal In strume nts Corp oration 2-75 NI -DA Q FRM fo r PC Comp ati bles Compl e te d opera tion or stopped b y error 2 Send ex actly one message when an asynchr onous operation completes or is stopped f or an error .
Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-76 © Natio nal In strume nts Corp oratio n Analog positive slope triggering 5 Send a message when dat a .
Chapter 2 Funct ion Refere nce — Config_D AQ_Eve nt_Mes sage © Natio nal In strume nts Corp oration 2-77 NI -DA Q FRM fo r PC Comp ati bles DAQEvent =3 through 8—These DAQEvents are fo r i nterrupt-dr i ven data acqu isition on ly . See Set_DAQ_Device_Info for switching between in t errup t -dr i ven and DMA-dri ven data acquisitio n.
Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-78 © Natio nal In strume nts Corp oratio n using. The PC-TIO-10 can hav e two of these e vent messages conf igured at the same time, therefor e you must s pecify which pin you wan t to use on the PC-TIO-1 0 with the DAQTrigVal0 para meter .
Ch apt er 2 Functio n Reference — Config_DAQ_Event_Message © National Instruments Corporat ion 2-79 NI- DA Q FR M fo r PC C om pa t ib l es Table 2-19 . Usable Para meters for Different DAQ Events Codes Para meter DA QEvent 0 1 2 3 4 5 6 7 8 9 chanSt r (where n and m are numbers) AI n , DI n , DO n , SC n !.
Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-80 © Natio nal In strume nts Corp oratio n For the parameters that are ignored, set them to 0.
Chapter 2 Funct ion Refere nce — Config_D AQ_Eve nt_Mes sage © Natio nal In strume nts Corp oration 2-81 NI -DA Q FRM fo r PC Comp ati bles Event notif ication is d one through the Windo ws AP I function PostMessage an d/or a callback fu nction th at you def ine.
Chapter 2 Function R eferenc e — Config_DAQ _Event _Messa ge NI-DAQ FRM for PC Compatibles 2-82 © Natio nal In strume nts Corp oratio n default: // handle other usual messages.
Chap ter 2 Funct ion Re fere nce — Conf igur e_HW_ Analo g_T rigge r © Natio nal In strume nts Corp oration 2-83 NI -DA Q FRM fo r PC Comp ati bles Configure _HW_Analog_T rig ger Format status = Co.
Chapter 2 Function R eference — Con figure_HW _Analog_T rigg er NI-DAQ FRM for PC Compatibles 2-84 © Natio nal In strume nts Corp oratio n lowVal ue and highValue s pecify the levels yo u want to use for triggering. For E Series de vices, the le gal range for th e two v alues i s 0 to 255 (0–4,095 for 16-bi t boards).
Chap ter 2 Funct ion Re fere nce — Conf igur e_HW_ Analo g_T rigge r © Natio nal In strume nts Corp oration 2-85 NI -DA Q FRM fo r PC Comp ati bles • ND_BELOW_LOW_LEVEL —The trigger is generated when the signal value is less than th e lowValue .
Chapter 2 Function R eference — Con figure_HW _Analog_T rigg er NI-DAQ FRM for PC Compatibles 2-86 © Natio nal In strume nts Corp oratio n • ND_HIGH_HYSTERESIS —The trigger is generated when the signal v alue is greater than the highVa lue , with hys teresis speci fied by lowValue .
Chap ter 2 Funct ion Re fere nce — Conf igur e_HW_ Analo g_T rigge r © Natio nal In strume nts Corp oration 2-87 NI -DA Q FRM fo r PC Comp ati bles If you s et trigSource to ND_THE_AI_CHANNEL , you can use the sign al connected to one of the analog input pins for trig gerin g.
Chapter 2 Function R eference — Con figure_HW _Analog_T rigg er NI-DAQ FRM for PC Compatibles 2-88 © Natio nal In strume nts Corp oratio n For e xample, if you set source to ND_THE_AI_ CHANNEL , th.
Chap ter 2 Funct ion Re fere nce — Conf igur e_HW_ Analo g_T rigge r © Natio nal In strume nts Corp oration 2-89 NI -DA Q FRM fo r PC Comp ati bles If you apply any of the formulas and get a value equ al to 256, use the value 255 instead; if you get 4,0 96 with th e 16-bit b o ards, use 4,095 in stead.
Chapter 2 Function R eference — CTR_Co nfig NI-DAQ FRM for PC Compatibles 2-90 © Natio nal In strume nts Corp oratio n CTR_Config Format status = CTR_Conf ig (deviceNumber , ctr , edgeMode, gateMode, outT ype, outPolarit y) Purpose Specifi es the counting conf iguration to use for a coun ter .
Chapter 2 Func tion Reference — CTR_Config © Natio nal In strume nts Corp oration 2-91 NI -DA Q FRM fo r PC Comp ati bles 6: Active high on gate o f next high er-order coun ter. 7: Active high on gate of nex t lower-order counter. 8: Special gating.
Chapter 2 Function R eference — CTR_E vCount NI-DAQ FRM for PC Compatibles 2-92 © Natio nal In strume nts Corp oratio n CTR_EvCount Format sta tus = CTR _EvC ount (de viceN umbe r , ctr , ti meba se, cont) Purpose Conf igures the specif ied counte r for an e vent-counting operation and starts the coun ter .
Chapte r 2 Functio n Refe rence — CTR_EvCou nt © Natio nal In strume nts Corp oration 2-93 NI -DA Q FRM fo r PC Comp ati bles 10: SOURCE5 used as timebase if 1 ≤ ctr ≤ 5 or SOURCE 10 used as timebase if 6 ≤ ctr ≤ 10. 11: GATE 1 used as timebas e if 1 ≤ ctr ≤ 5 or GATE6 used as timebase if 6 ≤ ctr ≤ 10.
Chapter 2 Function R eference — CTR_E vRead NI-DAQ FRM for PC Compatibles 2-94 © Natio nal In strume nts Corp oratio n CTR_EvRead Format statu s = CTR _EvR ead (d eviceNu mber , c t r , overflow, count) Purpose Reads the current counter tot al without dis turbing the counting process and returns the count and overflo w con ditions.
Chapte r 2 Function R efere nce — CTR_ EvRea d © Natio nal In strume nts Corp oration 2-95 NI -DA Q FRM fo r PC Comp ati bles Using This Function CTR_EvRead reads the current v alue of the counter without distur bing the counting pro cess and returns the v alue in co unt .
Chapter 2 Function R eference — CTR_F OUT_Con fig NI-DAQ FRM for PC Compatibles 2-96 © Natio nal In strume nts Corp oratio n CTR_FOUT_C onfig Format status = CTR_ FOUT_Config (deviceNumber , FOUT_ port, mode, timebase, divis io n) Purpose Disables or enables and sets the frequ ency of the 4-bit program mable fr equency output.
Chap ter 2 F unctio n Refere nce — CTR _FOUT_ Config © Natio nal In strume nts Corp oration 2-97 NI -DA Q FRM fo r PC Comp ati bles 4: Internal 1 kHz clock used as timebase (1 ms resolution ). 5: Internal 100 Hz clock used as timebase ( 10 ms resolution) .
Chapter 2 Function R eference — CTR_Pe riod NI-DAQ FRM for PC Compatibles 2-98 © Natio nal In strume nts Corp oratio n CTR_Period Format status = CTR_Perio d (deviceNumber , ctr , timebase) Purpose Conf igures the specif ied counte r for period or p ulse-width measurement.
Chap ter 2 Funct ion Ref ere nce — CTR_P eri od © Natio nal In strume nts Corp oration 2-99 NI -DA Q FRM fo r PC Comp ati bles 10: SOURCE5 used as timebase if 1 ≤ ctr ≤ 5 or SOURCE 10 used as timebase if 6 ≤ ctr ≤ 10. 11: GATE 1 used as timebas e if 1 ≤ ctr ≤ 5 or GATE6 used as timebase if 6 ≤ ctr ≤ 10.
Chapter 2 Function R eference — CTR_Pu lse NI-DAQ FRM f or PC Compatibles 2-100 © Natio nal In strume nts Corp oratio n CTR_Pulse Format status = CTR_Pulse (deviceNumber , ctr , timebase, delay , pulseWidth) Purpose Causes the specif ied counter to generate a specif ied pulse-programmable delay and pu lse width.
Chap ter 2 Funct ion Re fere nce — CTR_ Puls e © National In strum ents Corp oration 2-101 N I-DA Q FRM fo r PC Compatibles 8: SOURCE3 used as timebase if 1 ≤ ctr ≤ 5 or SOURCE 8 used as timebase if 6 ≤ ctr ≤ 10. 9: SOURCE4 used as timebase if 1 ≤ ctr ≤ 5 or SOURCE 9 used as timebase if 6 ≤ ctr ≤ 10.
Chapter 2 Function R eference — CTR_Pu lse NI-DAQ FRM f or PC Compatibles 2-102 © Natio nal In strume nts Corp oratio n Pulse Generation Timing Considerations Figure 2-9 sho ws pulse generati on timin g for both the TC toggled output and TC pulse output cases.
Chap ter 2 Funct ion Re fere nce — CTR_ Puls e © National In strum ents Corp oration 2-103 N I-DA Q FRM fo r PC Compatibles pulseWidth = 0 generates a special case signal as sho wn in Figure 2 -10.
Chapter 2 Function R eferenc e — CTR_Ra te NI-DAQ FRM f or PC Compatibles 2-104 © Natio nal In strume nts Corp oratio n CTR_Rate Format status = CTR_ Rate (freq, duty , timebase, period1 , perio d2.
Chapte r 2 Function Refe rence — CTR_Rat e © National In strum ents Corp oration 2-105 N I-DA Q FRM fo r PC Compatibles 3: 100 µs. 4: 1 ms. 5: 10 ms. period1 and period2 represent the number of units of time (selected by tim ebase ) that the square wa ve is high and low , respecti vely .
Chapter 2 Function R eferenc e — CTR_Re set NI-DAQ FRM f or PC Compatibles 2-106 © Natio nal In strume nts Corp oratio n CTR_Reset Format status = CTR_Reset (deviceNumber , ctr , output) Purpose T urns of f the specif ied counter operation and places the co unter output dri vers in the selected output st ate.
Chapter 2 Function R eference — CTR_R estart © National In strum ents Corp oration 2-107 N I-DA Q FRM fo r PC Compatibles CTR_Restart Format status = CTR_Restart (deviceNumber , ctr) Purpose Restarts operation of the specified cou nter . Para meters Input Para meter Discussion ctr is the counter numb er .
Chapter 2 Function Refere nce — CTR_Simul_Op NI-DAQ FRM f or PC Compatibles 2-108 © Natio nal In strume nts Corp oratio n CTR_Simul_Op Format status = CT R_ Simul_Op (deviceNumber , nu mCtrs, ctrLis t, mode) Purpose Configures and si multan eously s tarts an d stops m u ltiple counters .
Chapte r 2 Function Re ference — CT R_Simu l_Op © National In strum ents Corp oration 2-109 N I-DA Q FRM fo r PC Compatibles Not e It is not necessary to ca ll CTR_Simul_Op with mode set to 1 before calling CTR_Simul_Op with mode set to 4 .
Chapter 2 Function R eference — CTR_Sq uare NI-DAQ FRM f or PC Compatibles 2-110 © Natio nal In strume nts Corp oratio n CTR_Square Format status = CTR_ Square (deviceNumber , ctr , timebase, perio d1 , perio d2) Purpose Causes the specif ied counter to generate a continuo us square wa ve outp ut of specif i ed duty cycle and frequency .
Chapte r 2 Function R eferenc e — CT R_Square © National In strum ents Corp oration 2-111 N I-DA Q FRM fo r PC Compatibles 8: SOURCE3 used as timebase if 1 ≤ ctr v 5 or SOURCE 8 used as timebase if 6 ≤ ctr ≤ 10. 9: SOURCE4 used as timebase if 1 ≤ ctr ≤ 5 or SOURCE 9 used as timebase if 6 ≤ ctr ≤ 10.
Chapter 2 Function R eference — CTR_Sq uare NI-DAQ FRM f or PC Compatibles 2-112 © Natio nal In strume nts Corp oratio n When you use special g ating ( gateMode = 8), yo u can achiev e gate-controlled pulse generation. When th e gate input is high, NI-D A Q uses period1 to gen erate the pu lses.
Chap ter 2 Funct ion Ref ere nce — CTR_S tate © National In strum ents Corp oration 2-113 N I-DA Q FRM fo r PC Compatibles CTR_State Format status = CTR_State (dev iceNumber , ctr , outState) Purpose Returns the OUT logic le vel of the specif ied counter .
Chapter 2 Function R eference — CTR_St op NI-DAQ FRM f or PC Compatibles 2-114 © Natio nal In strume nts Corp oratio n CTR_Stop Format status = CTR_Stop (deviceNumber , ctr) Purpose Suspends operation o f the specifi ed counter so that you can restart the coun ter operation.
Chapter 2 Function Refer ence — DAQ_ Check © National In strum ents Corp oration 2-115 N I-DA Q FRM fo r PC Compatibles DAQ_Check Format sta tus = D A Q_Che ck ( de viceN umbe r , da qSto pped , r etriev ed) Purpose Checks whether the current D A Q operation is complete and returns the status and the number of samples acquired to th at point.
Chapter 2 Function R eferenc e — DAQ_ Check NI-DAQ FRM f or PC Compatibles 2-116 © Natio nal In strume nts Corp oratio n automatically rearranges the array upon completion of the acquisition so that the oldest data point is at the beginning of the array .
Chapter 2 Function R eference — DA Q_Clear © National In strum ents Corp oration 2-117 N I-DA Q FRM fo r PC Compatibles DAQ_Clear Format status = D AQ_Clear (de viceNu mber) Purpose Cancels the current D A Q operation (both single-channel and multiple-chann el scanned) and reinitializes the D A Q circuitry .
Chapter 2 Function R eference — DA Q_Config NI-DAQ FRM f or PC Compatibles 2-118 © Natio nal In strume nts Corp oratio n DAQ_Config Format status = D AQ _Conf ig (de viceNumber , startT rig, extCon v) Purpose Stores co nfi guratio n inform ation for s ubsequent D A Q operations.
Chapter 2 Function Re ference — DAQ_Conf ig © National In strum ents Corp oration 2-119 N I-DA Q FRM fo r PC Compatibles Using This Function DAQ_Config sav es th e param eters in the configuration table for futu re data acq uisition. DAQ_Start and SCAN_Start use the configuration table to set the D A Q circuitry to the correct timing modes.
Chapter 2 Function R eference — DA Q_Config NI-DAQ FRM f or PC Compatibles 2-120 © Natio nal In strume nts Corp oratio n Not e (PCI -6110E and PCI-611 1E only) The only allo wed val ues for extCon v ar e 0 and 2. The con versions occur simultaneously for all c hannels and are controlled by the scan interval .
Chap ter 2 Function Re ferenc e — DAQ_DB_ Config © National In strum ents Corp oration 2-121 N I-DA Q FRM fo r PC Compatibles DAQ_DB_Config Format status = DA Q_DB_C onfig (dev iceNumber , DBmo de) Purpose Enables or disables double-b uffered D A Q operations.
Chapter 2 Function R eferenc e — DAQ_ DB_HalfR eady NI-DAQ FRM f or PC Compatibles 2-122 © Natio nal In strume nts Corp oratio n DAQ_DB_Hal fReady Format status = DA Q_DB_Ha lfReady (deviceNum ber , ha lf Rea dy , daqSto pped) Purpose Checks whether the next half b uffer of data is a v ailable during a dou ble-bu ffered data acquisition.
Chap ter 2 Functio n Refe rence — DAQ_D B_Ha lfRea dy © National In strum ents Corp oration 2-123 N I-DA Q FRM fo r PC Compatibles Using This Function Double-b uf fered data acquisition cy clically fills a b uffer with acquired d ata.
Chapter 2 Function R eferenc e — DAQ_ DB_T rans fer NI-DAQ FRM f or PC Compatibles 2-124 © Natio nal In strume nts Corp oratio n DAQ_DB_T ra nsfer Format status = D AQ_DB_T ransfer (deviceNumber , .
Chap ter 2 F unctio n Refere nce — DAQ_D B_T ra nsfer © National In strum ents Corp oration 2-125 N I-DA Q FRM fo r PC Compatibles after the acquisitio n has stop ped, the last trans fer of data to halfBuffer contai ns the numbe r of v al id points from the half of the circular b uffer wher e acquisition stopped.
Chapter 2 Function R eferenc e — DAQ_ Monitor NI-DAQ FRM f or PC Compatibles 2-126 © Natio nal In strume nts Corp oratio n DAQ_Monitor Format status = D AQ_Monitor (de viceNumber , channel, sequential, numPts, monitorBuffer , newestPtIndex, daqS topped) Purpose Returns data from an asyn ch ronous data acquisitio n in progress.
Chapter 2 Function R eferenc e — DAQ_Mo nitor © National In strum ents Corp oration 2-127 N I-DA Q FRM fo r PC Compatibles in Lab_ISCAN_Start . If you are using an AMUX-64T , channel can be equal to an y one of the AMUX-64T channels. Range: –1 for data fr om all channel s being sampl ed.
Chapter 2 Function R eferenc e — DAQ_ Monitor NI-DAQ FRM f or PC Compatibles 2-128 © Natio nal In strume nts Corp oratio n Using This Function DAQ_Monitor is i ntended to r eturn small blocks o f data from a back ground acquisition operation.
Chapte r 2 Functio n Refe rence — DAQ_Op © National In strum ents Corp oration 2-129 N I-DA Q FRM fo r PC Compatibles DAQ_Op Format status = D AQ_Op (de vi ceNumb er , chan, gain, buffer , count, sampleRate) Purpose Performs a synchronou s, sing le-channel D A Q operation.
Chapter 2 Function R eferenc e — DAQ_ Op NI-DAQ FRM f or PC Compatibles 2-130 © Natio nal In strume nts Corp oratio n in valid gain, NI-D A Q w ill return an error . NI-D AQ ignores gain for 516 and LPM de vices and the D A QCard-500/7 00. buffer is an integer array .
Chapte r 2 Functio n Refe rence — DAQ_Op © National In strum ents Corp oration 2-131 N I-DA Q FRM fo r PC Compatibles Again, if you do not apply t he stop tr igger , DAQ_Op does not retu rn con tro l to your application. In an y case, you can use Timeout_Config to establish a m aximum length of time for DAQ_Op to ex ecu te.
Chapter 2 Funct ion Refere nce — DA Q_Rate NI-DAQ FRM f or PC Compatibles 2-132 © Natio nal In strume nts Corp oratio n DAQ_Rate Format status = DA Q_Ra te (rate, un its, timeba se, samp leIn terval) Purpose Con ver ts a D A Q rate into the timebase and sample-interv al v alues needed to produce the rate you want.
Chap ter 2 Funct ion Re ferenc e — DAQ_R ate © National In strum ents Corp oration 2-133 N I-DA Q FRM fo r PC Compatibles 1: 1 µs. 2: 10 µs. 3: 100 µs. 4: 1 ms. 5: 10 ms. sampleInt erval is the number of timebase units that elapse between consecuti ve A/D con versions.
Chapter 2 Function R eference — DA Q_Set_Cloc k NI-DAQ FRM f or PC Compatibles 2-134 © Natio nal In strume nts Corp oratio n DAQ_Set_Clock Format D AQ_Set_Clock (deviceNumber , g roup, whichClock, desiredRate, units, actualRat e ) Purpose Sets the scan rate for a group of ch annels (DSA de vices only) .
Chap ter 2 Funct ion Ref ere nce — DAQ_S et_Cl ock © National In strum ents Corp oration 2-135 N I-DA Q FRM fo r PC Compatibles Using This Function DAQ_Set_Clock sets the specif ied clock rate for the nex t acquisition operation. Be sure to call DAQ_Set_Clock be fore DAQ_Start or SCAN_Start .
Chapter 2 Function R eferenc e — DAQ_ Start NI-DAQ FRM f or PC Compatibles 2-136 © Natio nal In strume nts Corp oratio n DAQ_Start Format status = D A Q_Start (deviceNumber , chan, g ain, buffer , count, tim ebase, sampInter val) Purpose Initiates an asynchronous, single-ch annel D A Q operation and stores its input in an array .
Chap ter 2 Funct ion Refer enc e — DAQ_Star t © National In strum ents Corp oration 2-137 N I-DA Q FRM fo r PC Compatibles buffer is an integer array . buffer must have a length equal to or greater th an count . The elements of buffer are the results of each A/D con version in the D A Q op eration.
Chapter 2 Function R eferenc e — DAQ_ Start NI-DAQ FRM f or PC Compatibles 2-138 © Natio nal In strume nts Corp oratio n If you use ex ternal con version pulses, NI-D A Q ignores the timebase parameter and y ou can set it to any v a lu e. Fo r DSA de vices, timebase is ignored.
Chap ter 2 Funct ion Refer enc e — DAQ_Star t © National In strum ents Corp oration 2-139 N I-DA Q FRM fo r PC Compatibles Not e Y ou need to apply a trigger that you select through the Select_Signal or DAQ_Config functions to initiate d ata acquisitio n.
Chapter 2 Function R eference — DA Q_StopT rig ger_Con fig NI-DAQ FRM f or PC Compatibles 2-140 © Natio nal In strume nts Corp oratio n DAQ_StopT rigg er_Config Format status = D AQ _StopT rigger_C.
Chapte r 2 Function R eferenc e — D AQ_StopT rigger_Conf ig © National In strum ents Corp oration 2-141 N I-DA Q FRM fo r PC Compatibles apply a pulse at the ST OPTRIG* input o f the MIO-16/1 6D or.
Chapter 2 Function R eferenc e — DAQ_ to_Disk NI-DAQ FRM f or PC Compatibles 2-142 © Natio nal In strume nts Corp oratio n DAQ_to_Disk Format status = D A Q_to_Disk (devic eNumber , chan, gain, filename, co unt, sampleRate, concat) Purpose Performs a synchron ous, single-ch annel D A Q operation and sa ves t he acquired data in a dis k file.
Chapte r 2 Function Ref erenc e — DAQ_to_Disk © National In strum ents Corp oration 2-143 N I-DA Q FRM fo r PC Compatibles count is th e num ber o f sam p les to b e acqui r e d (that i s, th e num ber o f A/D conv ersions to be performed).
Chapter 2 Function R eferenc e — DAQ_ to_Disk NI-DAQ FRM f or PC Compatibles 2-144 © Natio nal In strume nts Corp oratio n when you enable pretrigger mode . If you do not apply the sto p trigger , DAQ_to_Disk returns control to yo ur application because, y ou e ventually will run out of disk space.
Chapte r 2 Function R eferenc e — D AQ_VScale © National In strum ents Corp oration 2-145 N I-DA Q FRM fo r PC Compatibles DAQ_VScale Format status = D AQ _VScale (deviceNumber , chan, gain, gainAd.
Chapter 2 Function R eferenc e — DAQ_ VScale NI-DAQ FRM f or PC Compatibles 2-146 © Natio nal In strume nts Corp oratio n gainA djust is th e multiplying factor to adjust th e gain . Refer to Appendix B, Analo g Input Channel, Gai n Settings, and Volta ge C alcu la tion , for the procedure for determining gainA djust .
Chapter 2 Function R eference — DIG _Block_Che ck © National In strum ents Corp oration 2-147 N I-DA Q FRM fo r PC Compatibles DIG_Block_Check Format status = DIG_Block_Check (deviceNumber , group, r emaini ng) Purpose Returns the nu mber of item s remaining to be trans ferred after a DIG_Block_In or DIG_Block_Out call.
Chapter 2 Function R eference — DIG _Block_Clea r NI-DAQ FRM f or PC Compatibles 2-148 © Natio nal In strume nts Corp oratio n DIG_Block_Clear Format status = DIG_Block_Clear (deviceNumber , group) Purpose Halts an y ongoing asynchronous transfer , allowin g another tr ansfer to be i nitiated.
Chapte r 2 Function Refere nce — DIG_Blo ck_In © National In strum ents Corp oration 2-149 N I-DA Q FRM fo r PC Compatibles DIG_Block_In Format status = DIG_Block_In (d eviceNum ber , group, buffer , count) Purpose Initiates an asynchrono us transfer of data fro m the specifi ed group to memory .
Chapter 2 Function R eference — DIG _Block_In NI-DAQ FRM f or PC Compatibles 2-150 © Natio nal In strume nts Corp oratio n Using This Function DIG_Block_In initiates an asynchronous transfer of data from a specified group to your buf fer . The ha rdwa r e is re sp onsi ble fo r the ha n dsh aking detai ls.
Chapte r 2 Function Refere nce — DIG_Blo ck_In © National In strum ents Corp oration 2-151 N I-DA Q FRM fo r PC Compatibles you must us e the value of alignI ndex return by Align_DMA_Buffer to access your data. In other w ords, data i n an aligned b uffer begi ns at buffer[alignIndex] .
Chapter 2 Function R eference — DIG _Block_Out NI-DAQ FRM f or PC Compatibles 2-152 © Natio nal In strume nts Corp oratio n DIG_Block_Out Format status = DIG_Block_Out (dev iceNumber , group, b u ffer , count) Purpose Initiates an asynchrono us transfer of data fro m memory to the specif ied group.
Chapte r 2 Function R efere nce — DIG_ Block_O ut © National In strum ents Corp oration 2-153 N I-DA Q FRM fo r PC Compatibles If you u se a DIO-32F o r a DIO 6533 d e vice, NI-D A Q writes all b ytes in you r bu ffer to the group re gardless of the group size.
Chapter 2 Function R eference — DIG _Block_PG_ Config NI-DAQ FRM f or PC Compatibles 2-154 © Natio nal In strume nts Corp oratio n DIG_Block_PG_Config Format statu s = DIG_ Block _PG_ Config (devi .
Chap ter 2 F unctio n Refere nce — DIG_ Block_PG_ Config © National In strum ents Corp oration 2-155 N I-DA Q FRM fo r PC Compatibles 2: Change det ection ( DIO 6533 ( DIO-32HS) in put grou ps only ). The board generates an internal requ est whenever it detects a change on a significant input pin.
Chapter 2 Function R eference — DIG _Block_PG_ Config NI-DAQ FRM f or PC Compatibles 2-156 © Natio nal In strume nts Corp oratio n DIG_Block_PG_Config enabl es or dis abled the patt ern genera tion mode of d igital I/ O.
Chap ter 2 F unctio n Refere nce — DIG_ Block_PG_ Config © National In strum ents Corp oration 2-157 N I-DA Q FRM fo r PC Compatibles On the DIO 6533 (DIO-32HS), o utput is al ways double-b uffered, t hus minimi zing the v ariability in updat e intervals.
Chapter 2 Function R eference — DIG _DB_Config NI-DAQ FRM f or PC Compatibles 2-158 © Natio nal In strume nts Corp oratio n DIG_DB_Con fig Format status = DIG_DB_ Conf ig (de viceNumber , grou p, d.
Chapte r 2 Function Ref erenc e — DIG_DB_Config © National In strum ents Corp oration 2-159 N I-DA Q FRM fo r PC Compatibles partialTransfer is a flag whose value enables or disables the mechanism whereby NI-D A Q can transfer a final partial half buf fer to the di gital outpu t block throug h a DIG_DB_Transfer call.
Chapter 2 Function R eference — DIG _DB_Half Ready NI-DAQ FRM f or PC Compatibles 2-160 © Natio nal In strume nts Corp oratio n DIG_DB_H alfReady Format statu s = DIG_ DB_H a lfRe ad y (dev ic eNum.
Chapte r 2 Function Refere nce — DIG_DB_ HalfRead y © National In strum ents Corp oration 2-161 N I-DA Q FRM fo r PC Compatibles function, when called, waits until NI-DA Q can complete the data trans fer before returning. During slower paced digital block operations this waiting p eriod can be significant.
Chapter 2 Function R eferenc e — DIG_DB _T ransf er NI-DAQ FRM f or PC Compatibles 2-162 © Natio nal In strume nts Corp oratio n DIG_DB_T ransf er Format sta tus = DIG_D B_T ransfe r (de viceNum be.
Chapte r 2 Function Re ference — DIG_DB_ T ransf er © National In strum ents Corp oration 2-163 N I-DA Q FRM fo r PC Compatibles size. NI-D A Q ignores this field for all other cases (input or outp ut without partial transfers enabled) and the transfer count is equal to half th e buf fer size.
Chapter 2 Function R eference — DIG _Grp_Conf ig NI-DAQ FRM f or PC Compatibles 2-164 © Natio nal In strume nts Corp oratio n DIG_Grp_ Config Format status = DI G_Grp_Config (deviceNumber , group, groupSize, port, dir) Purpose Conf igures t he specif ied group f or port ass ignment, dire ction (input or ou tput), and size.
Chapter 2 Functio n Refere nce — DIG _Grp_Conf ig © National In strum ents Corp oration 2-165 N I-DA Q FRM fo r PC Compatibles port = 2 assi gns port 2 (C). port = 3 assi gns port 3 (D). group Size = 2 port = 0 assi gns ports 0 and 1 (A and B). port = 2 assi gns ports 2 and 3 (C and D).
Chapter 2 Function R eferenc e — DIG_Grp_ Mode NI-DAQ FRM f or PC Compatibles 2-166 © Natio nal In strume nts Corp oratio n DIG_Grp_ Mode Format status = DI G_Grp_Mode (deviceNum ber , g roup, protocol , edge, reqPol, ackP ol, delayTime) Purpose Conf igures the specif ied group f or handshak e signal modes.
Chapte r 2 Functio n Refe rence — DIG_Grp _Mode © National In strum ents Corp oration 2-167 N I-DA Q FRM fo r PC Compatibles edge indicates whether the group is to be conf igured for leading- edge or trailing-edge pulsed signals. edge is v alid only if p rotocol = 1 or 2.
Chapter 2 Function R eferenc e — DIG_Grp_ Mode NI-DAQ FRM f or PC Compatibles 2-168 © Natio nal In strume nts Corp oratio n ackP ol = 0: Acknowledge handshake signal is not inverted (active high ). delayTim e = 0: Settling tim e is 0 ns. Y ou need to call DIG_Grp_Mode only i f you need a d if fer ent hands hake mode.
Chap ter 2 F unctio n Refere nce — DIG_ Grp_Status © National In strum ents Corp oration 2-169 N I-DA Q FRM fo r PC Compatibles DIG_Grp_ Status Format status = DI G_Grp_St a tus (deviceNumb er , gr.
Chapter 2 Function R eference — DIG _Grp_Sta tus NI-DAQ FRM f or PC Compatibles 2-170 © Natio nal In strume nts Corp oratio n DIG_In_Grp can fetch th e data an extern al dev ice has latched in.
Chap ter 2 Funct ion Ref ere nce — DIG_ In_Grp © National In strum ents Corp oration 2-171 N I-DA Q FRM fo r PC Compatibles DIG_In _Grp Format status g DIG_ In_Gr p (de viceNumbe r , gr oup, gr oupPa ttern) Purpose Reads digital inpu t data from the specified digital group.
Chapter 2 Function R eference — DIG _In_Grp NI-DAQ FRM f or PC Compatibles 2-172 © Natio nal In strume nts Corp oratio n Using This Function DIG_In_Grp retu rns digital d ata from t he group on t he specif ied de vice.
Chap ter 2 Function R efere nce — DIG_ In_Line © National In strum ents Corp oration 2-173 N I-DA Q FRM fo r PC Compatibles DIG_In _Line Format status = DIG_In_Line (deviceNumber , port, line, state) Purpose Returns the dig ital lo gic state of the specified digital line in the s pecified port.
Chapter 2 Function R eference — DIG _In_Line NI-DAQ FRM f or PC Compatibles 2-174 © Natio nal In strume nts Corp oratio n state returns the digital logic state of th e specified line. 0: The specified digital line is at a digital logic low. 1: The specified digital line is at a digital logic high.
Chapte r 2 Function Re ference — D IG_In_Port © National In strum ents Corp oration 2-175 N I-DA Q FRM fo r PC Compatibles DIG_In _Port Format status = DIG_In_Port (dev iceNumber , port, pattern) Purpose Returns digital input data from the specified digital I/O port.
Chapter 2 Function R eference — DIG _In_Port NI-DAQ FRM f or PC Compatibles 2-176 © Natio nal In strume nts Corp oratio n four bits wide , only bits 0 throu gh 3 of pattern r eflect the digital state of these ports, while NI-D A Q sets all other bits of pattern to 0.
Chapter 2 Function Referenc e — D IG_Line_C onfig © National In strum ents Corp oration 2-177 N I-DA Q FRM fo r PC Compatibles DIG_Li ne_Confi g Format status = DIG_Line_Config (de viceNumber , port, line, dir) Purpose Conf igures a specif ic line on a port for d irection (inpu t or output).
Chapt er 2 Function Re ference — DIG_Ou t_Grp NI-DAQ FRM f or PC Compatibles 2-178 © Natio nal In strume nts Corp oratio n DIG_Out_Grp Format sta tus = D IG_Out _Gr p (de viceNumb er , gr oup, gr oupPa ttern) Purpose Writes digital ou tput data to th e sp ecified digital group.
Chapter 2 Funct ion Ref erence — DI G_O ut_Line © National In strum ents Corp oration 2-179 N I-DA Q FRM fo r PC Compatibles DIG_Out_Li ne Format status = DI G_Out_Lin e (deviceNumber , port, line, st at e) Purpose Sets or clears the specified digital outpu t line in the specified digital port.
Chapter 2 Function R eference — DIG _Out_Line NI-DAQ FRM f or PC Compatibles 2-180 © Natio nal In strume nts Corp oratio n Using This Function DIG_Out_Line sets the digital line in the specif ied port to the specif ied state. The remaining digital output lines m aking up the port are not affected by this call.
Chap ter 2 Functio n Refere nce — DI G_Out_ Port © National In strum ents Corp oration 2-181 N I-DA Q FRM fo r PC Compatibles DIG_Out_Port Format status = DIG_Out_P ort (dev iceNumber , port, pattern) Purpose Writes digital ou tput data to th e sp ecified digital port.
Chapt er 2 Function Re ference — DIG_Ou t_Port NI-DAQ FRM f or PC Compatibles 2-182 © Natio nal In strume nts Corp oratio n Using This Function DIG_Out_Port writes the specif ied digital data to th e port on the specif ied de vice.
Chapter 2 Func tion Reference — DIG_Prt_Config © National In strum ents Corp oration 2-183 N I-DA Q FRM fo r PC Compatibles DIG_Prt_Conf ig Format status = DIG_ Prt_Config (de viceNumber , port, mo de, dir) Purpose Conf i g ures t he s pecif ied port for d ir ect io n ( i nput o r ou t put) .
Chapter 2 Function R eference — DIG _Prt_Config NI-DAQ FRM f or PC Compatibles 2-184 © Natio nal In strume nts Corp oratio n 1: Port is conf igured for hands haking (latch ed) mode.
Chapter 2 Func tion Reference — DIG_Prt_Config © National In strum ents Corp oration 2-185 N I-DA Q FRM fo r PC Compatibles After system startup, the digital I/O ports on all the b oards supported by this function are conf igured as follo ws: dir = 0: Input port.
Chapter 2 Function R eference — DIG _Prt_Status NI-DAQ FRM f or PC Compatibles 2-186 © Natio nal In strume nts Corp oratio n DIG_Prt_Stat us Format status = DI G_Prt_Status ( deviceNum ber , po rt, handshakeSt atus ) Purpose Returns a status w ord indicating the handshak e s tatus of the specif ied port.
Chapte r 2 Function Re feren ce — DIG_Prt_Sta tus © National In strum ents Corp oration 2-187 N I-DA Q FRM fo r PC Compatibles Using This Function DIG_Prt_Status reads the handshak e status of the specified port and returns the port status in ha ndshake Sta tus .
Chapter 2 Fun ction Reference — DIG_SCAN_Setup NI-DAQ FRM f or PC Compatibles 2-188 © Natio nal In strume nts Corp oratio n DIG_SCAN_Setup Format status = DI G_SCAN_S etup (deviceNumber , group, groupSize, port Lis t, dir) Purpose Conf igures t he specif ied group f or port ass ignment, dire ction (input or ou tput), and size.
Chapter 2 F unction Reference — DIG_SCAN_Setup © National In strum ents Corp oration 2-189 N I-DA Q FRM fo r PC Compatibles dir sele cts the direction, input or output, t o which the group is to be confi gur ed. 0: Port is configured as an input port ( default).
Chapter 2 Fun ction Reference — DIG_SCAN_Setup NI-DAQ FRM f or PC Compatibles 2-190 © Natio nal In strume nts Corp oratio n Each output port also h as a dif ferent Ackno wledge Inp ut (A CK*) control si gnal. • PC6 on the I/O conne ctor is for po rt 0.
Chapter 2 F unction Reference — DIG_SCAN_Setup © National In strum ents Corp oration 2-191 N I-DA Q FRM fo r PC Compatibles Figu re 2- 13. Digi tal Scan ning Ou tput Grou p Hand shaking C onnectio ns For DIO-24 users, the correct W1 jumper setting is required to allo w DIG_Block_In and DIG_Block_Out to functio n properly .
Chapter 2 Function R eference — DIG _T r igger_Co nfig NI-DAQ FRM f or PC Compatibles 2-192 © Natio nal In strume nts Corp oratio n DIG_T rigger_Conf ig Format status = DIG_T rigger_Conf ig (dev ic.
Chapter 2 Function R eferen ce — D IG_T rigger_ Config © National In strum ents Corp oration 2-193 N I-DA Q FRM fo r PC Compatibles stopTrig specifies the source of the stop trigger . 0: None. 1: Hardware trigger. 2: Digital p attern tri gger (inpu t group only).
Chapter 2 Function R eference — DIG _T r igger_Co nfig NI-DAQ FRM f or PC Compatibles 2-194 © Natio nal In strume nts Corp oratio n If startTrig or stopTrig is 2, the oper ation s tarts or st ops when the i ncoming dat a match es the pattern on all b its declared signif icant by li neMa sk .
Chapte r 2 Function Refere nce — Get_DAQ_ Device_ Info © National In strum ents Corp oration 2-195 N I-DA Q FRM fo r PC Compatibles Get_DAQ_Device_Info Format status = Get_DA Q_Device_Info (de viceNumber , infoT ype, infoV alue) Purpose Allo ws you to retrie ve parameter s pertaining to the de vice operatio n.
Chapter 2 Funct ion Refere nce — Get _DAQ_ Devic e_Info NI-DAQ FRM f or PC Compatibles 2-196 © Natio nal In strume nts Corp oratio n infoT ype can be one of the foll owing .
Chapter 2 Functio n Refere nce — Get _NI_DAQ_Ver sion © National In strum ents Corp oration 2-197 N I-DA Q FRM fo r PC Compatibles Get_NI_DAQ_Version Format statu s = Get _NI_DA Q _V e rsion (versi on ) Purpose Returns the version n umb er of the NI-D A Q library .
Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-198 © Natio nal In strume nts Corp oratio n GPCTR_Change_Param eter Format status = GPCTR_Change_Para mete.
Chapte r 2 Function Refere nce — GPCTR_Cha nge_Pa rameter © National In strum ents Corp oration 2-199 N I-DA Q FRM fo r PC Compatibles Legal v alues for para mValue depend on param ID .
Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-200 © Natio nal In strume nts Corp oratio n Not e The default source selectio n for all other appl ications is ND_INTERNAL_20_MHZ. Use this function with paramID = ND_SOURCE_POLARITY to select polarity of transitions to use fo r co unt ing.
Chapte r 2 Function Refere nce — GPCTR_Cha nge_Pa rameter © National In strum ents Corp oration 2-201 N I-DA Q FRM fo r PC Compatibles paramID = ND_START_TRIGGER (660 2 and 45 5 X devic e s only) This param ID allows you to ch ange ho w a counter arms itself.
Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-202 © Natio nal In strume nts Corp oratio n Synchro ni zati on on de faul t So ur ce an d Up/Down pins is .
Chapte r 2 Function Refere nce — GPCTR_Cha nge_Pa rameter © National In strum ents Corp oration 2-203 N I-DA Q FRM fo r PC Compatibles Output counterValue } GPCTR_Control (deviceNumber, gpctrNu m, ND_RESET) paramID = ND_GATE This si gnal contro ls the operation o f the gener al-pur pose counter in some applicatio ns.
Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-204 © Natio nal In strume nts Corp oratio n Use this functio n with paramID = ND_GATE_POLARITY to select polarity of the gate si gnal.
Chapte r 2 Function Refere nce — GPCTR_Cha nge_Pa rameter © National In strum ents Corp oration 2-205 N I-DA Q FRM fo r PC Compatibles paramID = ND_SECOND_GATE (6602 and 4 55 X devi c es only ) This si gnal contro ls the operation o f the gener al-pur pose counter in some applicatio ns.
Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-206 © Natio nal In strume nts Corp oratio n paramID = ND_COUNT_1 , ND_COUNT_2 , ND_COUNT_3 , ND_COUNT_4 Th.
Chapte r 2 Function Refere nce — GPCTR_Cha nge_Pa rameter © National In strum ents Corp oration 2-207 N I-DA Q FRM fo r PC Compatibles Soft ware Cont rol This funct ion lets you customize the counter fo r your appl ication.
Chapter 2 Function R eferenc e — GPCTR_Cha nge_P arameter NI-DAQ FRM f or PC Compatibles 2-208 © Natio nal In strume nts Corp oratio n paramID = ND_OUTPUT_MODE This v alue changes the output mode f.
Chapter 2 Function R eference — GPCTR _Config_B uffer © National In strum ents Corp oration 2-209 N I-DA Q FRM fo r PC Compatibles GPCTR_Config_Buf fer Format status = GP CTR_Config_Buffer (d eviceNumber , gpct rNum , reserved, numP oints, buffer) Purpose Assigns a buf fer that NI-D A Q will use for a b u ffered coun ter operation.
Chapter 2 Function R eference — GPCTR _Config_B uffer NI-DAQ FRM f or PC Compatibles 2-210 © Natio nal In strume nts Corp oratio n Using This Function Y ou need t o use this f unction to u se a general-pu rpose counter for b u ffered oper ation. Y ou should call this fun ction after calling the GPCTR_Set_Application funct ion.
Chapter 2 Function Reference — GPCTR_Control © National In strum ents Corp oration 2-211 N I-DA Q FRM fo r PC Compatibles GPCTR_Control Format status = GPCTR_Control (de viceNumber , gpctrNum, action) Purpose Contr ols the op eration of t he general -purpose co unter .
Chapter 2 Function R eference — GPCTR _Control NI-DAQ FRM f or PC Compatibles 2-212 © Natio nal In strume nts Corp oratio n Using This Function Y ou need to use this fun ction with actio n = ND_PRO.
Chapte r 2 Function Refe rence — GPCTR_Re ad_Buff er © National In strum ents Corp oration 2-213 N I-DA Q FRM fo r PC Compatibles GPCTR_Read_Buff er Format status = GPCTR_Read_Buffer (de viceNumber , gpctrNum, r eadMode, numPts, readOffSet, timeOut, b u ffer) Purpose Returns the data fr om a asynchrono us counter input operation .
Chapter 2 Function R eference — GPCTR _Read_B uffer NI-DAQ FRM f or PC Compatibles 2-214 © Natio nal In strume nts Corp oratio n numPts is the number of points to retrie ve from the b uffer be ing us ed. Th is argument is passe d by refere nce. When this f uncti on retu rns, numPts holds the v alue of actual number o f inputs that were read.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-215 N I-DA Q FRM fo r PC Compatibles GPCTR_Set_Applic ation Format status = GP CTR_Set_Application ( deviceNum ber , gp ctrNum, applica t io n) Purpose Selects the application fo r which you use the general- purpose counter .
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-216 © Natio nal In strume nts Corp oratio n applicat ion can be one of the fol lowing .
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-217 N I-DA Q FRM fo r PC Compatibles Using This Function NI-D A Q requires you to select a set of parameters so that it can program the counter hardware.
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-218 © Natio nal In strume nts Corp oratio n The following pseudo-code continuati on of the example giv en earl.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-219 N I-DA Q FRM fo r PC Compatibles Figure 2-15 sho ws one p ossible scenario of a co unter us ed for .
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-220 © Natio nal In strume nts Corp oratio n until (counter_armed = ND_NO) GPCTR_Watch(deviceNumber, gpctrNumbe.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-221 N I-DA Q FRM fo r PC Compatibles measure a t ime inter val between 100 ns and 0. 8 s long.F or the 6602 and 455 X de vices with counter width 32 bits, you can measure a time inte rv al between 1 00 ns and 2 14 s lo ng.
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-222 © Natio nal In strume nts Corp oratio n GPCTR_Watch(deviceNumber, gpctrNumbe r, ND_COUNT_AVAILABLE, count_.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-223 N I-DA Q FRM fo r PC Compatibles actio n = ND_PROGRAM returns gateSignalError . If this happens, you should not rely on values returned by GPCTR_Watch .
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-224 © Natio nal In strume nts Corp oratio n Figu re 2-17. Sin gle T rig gered Pu lse Wi dth Gen eration Me asuremen t Use the GPCTR_Watch function with entityID = ND_COUNT_AVAILABLE to monitor th e progress of the counting process.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-225 N I-DA Q FRM fo r PC Compatibles When the counter reaches terminal count (2 24 – 1 for E Ser ies and 44 5 X de vices, and 2 32 – 1 for 6602 and 455 X d evices), it ro lls over and keeps counting.
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-226 © Natio nal In strume nts Corp oratio n Figure 2- 18 show s one pos sible us e of a counte r for ND_TWO_SI.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-227 N I-DA Q FRM fo r PC Compatibles { GPCTR_Watch (deviceNumber, gpctrNumb er, ND_ARMED, counter_armed.
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-228 © Natio nal In strume nts Corp oratio n Fo r example, as sume that you wa nt to generate a pulse 20 0 ns long af ter 150 ns o f delay . Y ou need to set ND_COUNT_1 t o 150 ns /50 ns = 3 and ND_COUNT_2 to 2 00 ns/50 ns = 4.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-229 N I-DA Q FRM fo r PC Compatibles between 2 0 ns and 11.37 ho urs for 6602 and 455 X de vices. The timing reso lution w ill be lo wer than if you are us ing th e ND_INTERNAL_20_MHZ timebase.
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-230 © Natio nal In strume nts Corp oratio n In Fi gure 2-20, the fo llo w ing beha vior is prese nt: • Gate is the signal present at the counter gate input. • Source is the signal present at the coun ter source input.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-231 N I-DA Q FRM fo r PC Compatibles T o pro vide your timebase, yo u can connect your timebase sour ce to one of the PFI pins on the I/O connector and change ND_SOURCE and ND_SOUR CE_POLARITY to the appr opriate v alues.
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-232 © Natio nal In strume nts Corp oratio n Figur e 2-21. Retr iggerab le Pu lse Gener ation Use the GPCTR_Control funct ion with action = ND_RESET to stop t he pulse gen eration.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-233 N I-DA Q FRM fo r PC Compatibles W ith th e default 20 MHz timebase, combined with the counter width (24 bits), you can generate tra i ns consi sting of pul ses with delay and len gth between 100 n s and 0.
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-234 © Natio nal In strume nts Corp oratio n Y ou can use the GPC TR_Change_Parameter function after calling GPCTR_Set_Application and before calling GPCTR_Control with actio n = ND_PROGRAM or ND_PREPARE .
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-235 N I-DA Q FRM fo r PC Compatibles In Fi gure 2-23, the fo llo w ing beha vior is prese nt: • Gate is the signal present at the counter gate input. • Source is the signal present at the coun ter source input.
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-236 © Natio nal In strume nts Corp oratio n are the lo w-to-high transitions of the sign al on the PFI9/GPCTR0_GA TE I/O conn ector pin for general-p urpose coun ter 0 and the PFI4/ GPCTR1_GA TE I /O connector pin fo r general-purpose cou nter 1.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-237 N I-DA Q FRM fo r PC Compatibles Use the GPCTR_Watch function with entityID = ND_ARMED to moni tor the pr ogress of the counting pr ocess. This measurement completes when entityValue becomes ND_NO .
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-238 © Natio nal In strume nts Corp oratio n 6602 and 45 5 X de vices with counter wi d th 32 bi ts , yo u can gen e rate pu lses with a d el ay an d length b etween 100 n s and 214 s lon g.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-239 N I-DA Q FRM fo r PC Compatibles Figu re 2- 26. Buffered P eriod Measu rement when No Source Edges .
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-240 © Natio nal In strume nts Corp oratio n Caution If g ate edges arrive and no source edges are present between those gate edges, then the previ ously sa ved val ue is sav ed agai n, as s hown by F igure 2-28.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-241 N I-DA Q FRM fo r PC Compatibles Figu re 2-29. Buffered Pul se Width Measu reme nt Not e Y ou must .
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-242 © Natio nal In strume nts Corp oratio n applicat ion = ND_BUFFERED_TWO_SIGNAL_EDGE_SEPARATION_MSR Not e This applicatio n is applicab le o nly to 6602 and 455X devices.
Chapter 2 Fun ction Reference — GPCTR_Set_Application © National In strum ents Corp oration 2-243 N I-DA Q FRM fo r PC Compatibles Figur e 2-31. Buffe red T wo-Signa l Edge Separat ion Measu rement Use the GPCTR_Watch function with entityID = ND_ARMED to monitor the prog ress o f the counting process.
Chapter 2 Fun ction Reference — GPCTR_Set_Application NI-DAQ FRM f or PC Compatibles 2-244 © Natio nal In strume nts Corp oratio n • ND_SECOND_GATE to any legal v alue l isted in the GPCTR_Change_Parameter functi on desc ripti on. • ND_SECOND_GATE_POLARITY to ND_NEGATIVE .
Chapte r 2 Function Re ferenc e — GPCTR _Watch © National In strum ents Corp oration 2-245 N I-DA Q FRM fo r PC Compatibles GPCTR_Watch Format status = GPCTR_W a tch (deviceNumber , gpctrNum, entityID, entityV alue) Purpose Monitors s tate of th e general-purpo se counter and it s operation.
Chapter 2 Function R eference — GPCTR _Watch NI-DAQ FRM f or PC Compatibles 2-246 © Natio nal In strume nts Corp oratio n entityID = ND_COUN T This is the coun ter contents. entityValue can be between 0 and 2 24 – 1 for E Seri es and 445X and between 0 and 2 32 – 1 for 6602 a nd 4 55 X de vices.
Chapte r 2 Function Re ferenc e — GPCTR _Watch © National In strum ents Corp oration 2-247 N I-DA Q FRM fo r PC Compatibles entityID = ND_MAX_PRESCALE (6602 and 4 55 X devic es only ) Indicates the maximum v alue of the prescale factor that can be applied to the source selection of a 6602 or 455 X de vice.
Chapter 2 Function R eferenc e — ICTR_Re ad NI-DAQ FRM f or PC Compatibles 2-248 © Natio nal In strume nts Corp oratio n ICTR_Read Format status = ICTR_Read (deviceNumber , ctr , count) Purpose Reads the current contents of the selected counter without disturbing the counting process and returns the count.
Chapter 2 Functio n Refere nce — ICTR_ Read © National In strum ents Corp oration 2-249 N I-DA Q FRM fo r PC Compatibles Not e B ASIC Pro grammers—NI -DA Q re tur ns count as a 16 -bit unsign ed number . In B ASIC, int eger variables are represent ed by a 16- bit two’ s complement system.
Chapter 2 Function R eferenc e — ICTR_Re set NI-DAQ FRM f or PC Compatibles 2-250 © Natio nal In strume nts Corp oratio n ICTR_Reset Format status = ICTR_Reset (deviceNumber , ctr , state) Purpose Sets the output of the selected counter to the specif ied state.
Chap ter 2 Funct ion Refer enc e — ICTR_Set up © National In strum ents Corp oration 2-251 N I-DA Q FRM fo r PC Compatibles ICTR_Setu p Format status = IC TR_Setup (deviceNumber , ctr , mo de, cou nt, binBcd) Purpose Conf igures the gi ven counter to oper ate in the specif ied mode .
Chapter 2 Function R eferenc e — ICTR_S etup NI-DAQ FRM f or PC Compatibles 2-252 © Natio nal In strume nts Corp oratio n Figu re 2-32. Mo de 0 Timi ng Diagram In mode 1, the outp ut goes low on the count fo llowing the risin g ed ge o f the gate input and goes high on t ermin al count .
Chap ter 2 Funct ion Refer enc e — ICTR_Set up © National In strum ents Corp oration 2-253 N I-DA Q FRM fo r PC Compatibles In mode 3 , the outp ut stays hi gh for on e half of t he count clock pulses and stays low for the other h alf. Figur e 2-35 s ho ws the mod e 3 timin g diagram.
Chapter 2 Function R eferenc e — ICTR_S etup NI-DAQ FRM f or PC Compatibles 2-254 © Natio nal In strume nts Corp oratio n See the 8253 Pr ogrammable In terv al T imer dat a sheet in yo ur D A QCard-500/700 or Lab and 1200 Series user manual for a detailed description of these modes an d the associated timing diagra ms.
Chap ter 2 Funct ion Re fere nce — Init _DA_B rds © National In strum ents Corp oration 2-255 N I-DA Q FRM fo r PC Compatibles Init_DA_Brds Format status = In it_D A_Br ds (deviceNumber , deviceNum.
Chapter 2 Function R eference — In it_DA_Brds NI-DAQ FRM f or PC Compatibles 2-256 © Natio nal In strume nts Corp oratio n 14: PC-TIO-10. 15: AT-AO-6. 19: AT-MIO-16X. 20: AT-MIO-64F -5. 21: AT-MIO-16DL-9 . 22: AT-MIO-16DL-2 5. 23: AT-MIO-16DH-9. 24: AT-MIO-16DH-25 .
Chap ter 2 Funct ion Re fere nce — Init _DA_B rds © National In strum ents Corp oration 2-257 N I-DA Q FRM fo r PC Compatibles 65: PC-DIO-24PnP. 66: PC-DIO-96PnP. 67: AT-DIO-32HS. 68: PXI-653 3. 69: DAQArb AT-5411. 75: DAQPa d-6507/ 6508. 76: DAQPa d-6020E.
Chapter 2 Function R eference — In it_DA_Brds NI-DAQ FRM f or PC Compatibles 2-258 © Natio nal In strume nts Corp oratio n Using This Function Init_DA_Brds initializes the device in the specified slot to the default condition s.
Chap ter 2 Funct ion Re fere nce — Init _DA_B rds © National In strum ents Corp oration 2-259 N I-DA Q FRM fo r PC Compatibles • DIO-24/DIO-3 2F/DIO 6533 ( DIO-32HS)/DIO- 96 – Digital Input and Ou tput defaul ts: Direction = Input. Hands hakin g = Dis a bled.
Chapter 2 Function R eference — In it_DA_Brds NI-DAQ FRM f or PC Compatibles 2-260 © Natio nal In strume nts Corp oratio n Start trigger = Disabled. External con version = Stop trigg er = Disabled. – Analo g Output defaul ts: Mode = Bipolar (–5 to +5 V).
Chap ter 2 Funct ion Re fere nce — Init _DA_B rds © National In strum ents Corp oration 2-261 N I-DA Q FRM fo r PC Compatibles • A O-2DC devices – Analo g Output defaul ts: Mode = Unip olar (0 to 10 V). Lev el = 0 V . – Digital Input and Ou tput defaul ts: Direction = Input.
Chapter 2 Function R eference — In it_DA_Brds NI-DAQ FRM f or PC Compatibles 2-262 © Natio nal In strume nts Corp oratio n Of all these defaults, you can alter only the analo g input and analog output s ettin gs of the non-E Ser ies MIO and AI de vic es, Lab-P C+, and PC-LPM-1 6 de vi ces b y settin g jumpers on the de vice.
Chapter 2 Function Reference — L ab_ISCAN_Check © National In strum ents Corp oration 2-263 N I-DA Q FRM fo r PC Compatibles Lab_ISCAN_Check Format status = Lab_ISCAN_Check (deviceNumber , daqS top.
Chapter 2 Fun ction Reference — Lab_ISCAN_Check NI-DAQ FRM f or PC Compatibles 2-264 © Natio nal In strume nts Corp oratio n Ho we ver , if pretrigger mode is enab led, retrieved returns the of fset of th e position i n your bu f fer where NI-DA Q places the next data point when the function acquires.
Chapter 2 Function Reference — L ab_ISCAN_Check © National In strum ents Corp oration 2-265 N I-DA Q FRM fo r PC Compatibles sample from channel 1, the ol dest da ta point belongs to channel 0. So finalScanOrder retur ns: finalScanOrder [0] = 0. finalScanOrder [1] = 2.
Chapter 2 Fun ction Reference — Lab_ISCAN_Op NI-DAQ FRM f or PC Compatibles 2-266 © Natio nal In strume nts Corp oratio n Lab_ISCAN_Op Format status = La b_ISCAN_Op (deviceNumber , numChans, gain, buffer , count, sa mpleRate, scanRa te, finalScanOrder) Purpose Performs a synchr on ous, multip le-chan nel scanned dat a acquisition operation.
Chapter 2 Function Reference — Lab_ISCAN_Op © National In strum ents Corp oration 2-267 N I-DA Q FRM fo r PC Compatibles Range: 1 through 4 for the 5 16 and La b and 1200 Series devi ces in di fferential mode. 1 through 8 for DAQCard-500 (single- ended mode only).
Chapter 2 Fun ction Reference — Lab_ISCAN_Op NI-DAQ FRM f or PC Compatibles 2-268 © Natio nal In strume nts Corp oratio n finalScanOrder is an array that indicates the scan channel o rder of the data in the buf fer passe d to Lab_ISCAN_Op . The size of finalScanOrder must be at least equal to the number of channels scann ed.
Chapter 2 Function Reference — Lab_ISCAN_Op © National In strum ents Corp oration 2-269 N I-DA Q FRM fo r PC Compatibles Not e If you have selected external s tart trigg ering of the data acquisition op eration, a lo w-to-high edge at the EXTT RIG of the Lab and 1200 Seri es device I/O connector input initiates th e operatio n.
Chapter 2 Fun ction Reference — Lab_ISCAN_Start NI-DAQ FRM f or PC Compatibles 2-270 © Natio nal In strume nts Corp oratio n Lab_ISCAN_Start Format status = Lab_ISCAN_Start (deviceNumber , num Chan.
Chapter 2 Fun ction Reference — Lab_ISCAN_Start © National In strum ents Corp oration 2-271 N I-DA Q FRM fo r PC Compatibles the NI-DAQ User Manu al for PC Compatibles for more information o n SCXI channel assignm ent s. Range: 1 through 4 for the 5 16 and La b and 1200 Series devi ces in di fferential mode.
Chapter 2 Fun ction Reference — Lab_ISCAN_Start NI-DAQ FRM f or PC Compatibles 2-272 © Natio nal In strume nts Corp oratio n where the sample timebas e resolu tio n is equal to on e of the values of s ampTi mebase as specifi ed abov e. Fo r example, if sampInterval = 25 and sampTimeb ase = 2, the actual sample interval is 25 * 10 µs = 250 µs.
Chapter 2 Fun ction Reference — Lab_ISCAN_Start © National In strum ents Corp oration 2-273 N I-DA Q FRM fo r PC Compatibles Fo r the Lab and 12 00 Ser ies de vices, if you en able pretrigger mode .
Chapter 2 Fun ction Reference — Lab_ISCAN_to_Disk NI-DAQ FRM f or PC Compatibles 2-274 © Natio nal In strume nts Corp oratio n Lab_ISCAN_to_Disk Format status = Lab_ISCAN_to_Disk (deviceNumber , nu.
Chapter 2 Fun ction Reference — Lab_ISCAN_to_Disk © National In strum ents Corp oration 2-275 N I-DA Q FRM fo r PC Compatibles 1 through 8 for the DAQCard-700 in differential mode. 1 throug h 8 for t he 516 and L ab and 1200 Series devices in single-ended mode.
Chapter 2 Fun ction Reference — Lab_ISCAN_to_Disk NI-DAQ FRM f or PC Compatibles 2-276 © Natio nal In strume nts Corp oratio n Using This Function Lab_ISCAN_to_Disk initiates a synchronous process of acq uiring A/D co n v ersion s amples and storin g th em in a disk file.
Chap ter 2 Funct ion Ref ere nce — Line _Change_ Attr ibut e © National In strum ents Corp oration 2-277 N I-DA Q FRM fo r PC Compatibles Line_Cha nge_Attri bute Format status = L ine_ Change_Att r.
Chapter 2 Function R eference — Line_Ch ange_ Attribute NI-DAQ FRM f or PC Compatibles 2-278 © Natio nal In strume nts Corp oratio n attribID = ND_LINE _FILTER (valid only fo r lineNum = ND_PFI_0 t.
Chap ter 2 Funct ion Ref ere nce — LPM16 _Cali brat e © National In strum ents Corp oration 2-279 N I-DA Q FRM fo r PC Compatibles LPM16_Calib rate Format status = LPM16_Calibrate (deviceNumber) Purpose Calibrates the LPM devices con verter .
Chapter 2 Function R eference — MIO _Calibrate NI-DAQ FRM f or PC Compatibles 2-280 © Natio nal In strume nts Corp oratio n MIO_Ca libra te Format status = MIO_Calibrate (de viceNumber , calOP , sa.
Chapte r 2 Function Refe rence — MIO_ Calibrate © National In strum ents Corp oration 2-281 N I-DA Q FRM fo r PC Compatibles Para meter Discussion calOP determines the operation to b e perform e d. 1: Load calibrat ion const ants from EEPR OMloc . 2: C alibrate the ADC us in g internal reference volt age calib ration constant s in refLoc .
Chapter 2 Function R eference — MIO _Calibrate NI-DAQ FRM f or PC Compatibles 2-282 © Natio nal In strume nts Corp oratio n Fo r the A T-MIO-64F -5 and A T-MIO-1 6X: 1: User calibration area 1. 2: User calibration area 2. 3: User calibration area 3.
Chapte r 2 Function Refe rence — MIO_ Calibrate © National In strum ents Corp oration 2-283 N I-DA Q FRM fo r PC Compatibles Unless you ha ve pre viously s tored ne w internal v oltage refere nce c.
Chapter 2 Function R eference — MIO _Config NI-DAQ FRM f or PC Compatibles 2-284 © Natio nal In strume nts Corp oratio n MIO_Co nfig Format status = MIO_Conf ig (deviceNumber , dither , useAMUX) Pu.
Chapte r 2 Function Re ference — MIO_Con fig © National In strum ents Corp oration 2-285 N I-DA Q FRM fo r PC Compatibles Using This Function T o use the AMUX-64T with de vices with 64 channels, you must call this function to specify whether to use the AMUX-64T input channels or the onboard channels for these d evices.
Chapter 2 Function R eferenc e — RTSI_Clea r NI-DAQ FRM f or PC Compatibles 2-286 © Natio nal In strume nts Corp oratio n R TSI_Cl ear Format status = R TSI_Clear (deviceNumber) Purpose Disconnects all R TS I bus trigger lines from signals on the specified device.
Chapter 2 Function R eferenc e — RTSI_Clock © National In strum ents Corp oration 2-287 N I-DA Q FRM fo r PC Compatibles R TSI_Clo ck Format status = R TSI_Clock (deviceNumber , connect, dir) Purpose Connects or d isconnects the system clock fr om the R TSI b us if the de vice can be programmed to do so.
Chapter 2 Function R eferenc e — RTSI_Clock NI-DAQ FRM f or PC Compatibles 2-288 © Natio nal In strume nts Corp oratio n RTSI_Clock al ways returns an error if deviceNumber is not an A T-MIO-16X, A T-MIO-64F -5, A T- A O-6/10, or a DIO 6533 ( D IO-32HS).
Chap ter 2 Funct ion Re fere nce — RTS I_Co nn © National In strum ents Corp oration 2-289 N I-DA Q FRM fo r PC Compatibles RTSI_Conn Format status = RTSI_Conn (deviceNumber , sig Co de, trigLine, dir) Purpose Connects a de vice to the specified R T SI bus trigger line.
Chapter 2 Function R eference — RTSI_C onn NI-DAQ FRM f or PC Compatibles 2-290 © Natio nal In strume nts Corp oratio n The second call could access another non-E Series MIO or AI device an d use parameters sigCode = 0, trig Lin e = 3, and dir = 0.
Chap ter 2 Fun ctio n Refe rence — RTS I_D isConn © National In strum ents Corp oration 2-291 N I-DA Q FRM fo r PC Compatibles R TSI_DisConn Format sta tus = R TSI_D isCo nn (de viceNum ber , si gCo de, t rigL ine) Purpose Disconnects a de vice signal from the specified R TSI bus trigger line.
Chapter 2 Function R eference — SC_2 040_Config NI-DAQ FRM f or PC Compatibles 2-292 © Natio nal In strume nts Corp oratio n SC_204 0_Config Format status = SC_20 40_Conf ig (deviceNum ber , channe.
Chapte r 2 F unction Re ferenc e — SC_2040_Conf ig © National In strum ents Corp oration 2-293 N I-DA Q FRM fo r PC Compatibles Example 1 Y ou ha ve selected set the jumper for a gai n of 100 for all y our SC-2040 channels.
Chapter 2 Fun ction Reference — SCAN_Demux NI-DAQ FRM f or PC Compatibles 2-294 © Natio nal In strume nts Corp oratio n SCAN_Demux Format status = SCA N_D emux (buffer , cou nt, numC hans, num Mu x.
Chapter 2 Function Reference — SCAN_Demux © National In strum ents Corp oration 2-295 N I-DA Q FRM fo r PC Compatibles numMu xBrds is the number o f AMUX-64T de vices used during the multip le-chann el acquisition. NI-D A Q igno res this parameter for the DA QCard-50 0/700 and 516, Lab and 1200 Series, and LP M de vices and DSA devices.
Chapter 2 Fun ction Reference — SCAN_Op NI-DAQ FRM f or PC Compatibles 2-296 © Natio nal In strume nts Corp oratio n SCAN_Op Format status = SCA N_Op (deviceNumber , nu mChans, chan s, gains, buffer , count, sa mpleRate, scanRate) Purpose Performs a synchronous, m ultiple-channel scan ned data acqui sition operatio n.
Chapter 2 F unction Reference — SCAN_ Op © National In strum ents Corp oration 2-297 N I-DA Q FRM fo r PC Compatibles chans is an integer array of a length not less than nu mCha ns that co ntains the channel scan sequence to be used.
Chapter 2 Fun ction Reference — SCAN_Op NI-DAQ FRM f or PC Compatibles 2-298 © Natio nal In strume nts Corp oratio n Voltage Ca lculat ion , for v alid gain setting s. If you use an inv alid gain, NI-DA Q returns an error . count is th e num ber o f sam p les to b e acqui r e d (that i s, th e num ber o f A/D conv ersions to be performed) .
Chapter 2 F unction Reference — SCAN_ Op © National In strum ents Corp oration 2-299 N I-DA Q FRM fo r PC Compatibles Not e If you have selected external s tart trigg ering of the data acquisition .
Chapter 2 Fun ction Reference — SCAN_Sequence_Demux NI-DAQ FRM f or PC Compatibles 2-300 © Natio nal In strume nts Corp oratio n SCAN_Seque nce_Demux Format status = SCAN_Sequence_Demux (numChans, .
Chapter 2 Function Reference — SCAN_Sequence_Demux © National In strum ents Corp oration 2-301 N I-DA Q FRM fo r PC Compatibles chanVector contains the chann els sampled in the acquisition that produced the data contained in buffer .
Chapter 2 Fun ction Reference — SCAN_Sequence_Demux NI-DAQ FRM f or PC Compatibles 2-302 © Natio nal In strume nts Corp oratio n samplesPerChannelVector [1]) - 1 (inde x 11).
Chap ter 2 Functio n Refe renc e — SC AN_ Seq uence_R etrie ve © National In strum ents Corp oration 2-303 N I-DA Q FRM fo r PC Compatibles SCAN_Seque nce_Retrieve Format status = SCAN_Sequence_Ret.
Chapter 2 Fun ction Reference — SCAN_Sequence_Setup NI-DAQ FRM f or PC Compatibles 2-304 © Natio nal In strume nts Corp oratio n SCAN_Seque nce_Setup Format status = SCAN_Sequence_Setup (device, nu.
Chapter 2 Func tion Reference — SCAN_Sequence_Setup © National In strum ents Corp oration 2-305 N I-DA Q FRM fo r PC Compatibles gainVector contains the g ain settings to be used for each channel in cha nVector . The channel listed in entry i of chanVector will have the gain listed in entry i of gainVector .
Chapter 2 Fun ction Reference — SCAN_Sequence_Setup NI-DAQ FRM f or PC Compatibles 2-306 © Natio nal In strume nts Corp oratio n The scan sequence created b y NI-D A Q looks like this: scan numbe r.
Chapter 2 Function Reference — SCAN_Setup © National In strum ents Corp oration 2-307 N I-DA Q FRM fo r PC Compatibles SCAN_Setup Format status = SCAN_Setup (deviceNumber , numChans, chanV ector , gainV ector) Purpose Initializes circuitry for a scanned d ata acquisition operatio n.
Chapter 2 Fun ction Reference — SCAN_Setup NI-DAQ FRM f or PC Compatibles 2-308 © Natio nal In strume nts Corp oratio n de vices), or the total number of chan nels scanned equals (4) * ( numChan s ) * (num_mux _brds).
Chapter 2 Fun ction Reference — SCAN_Start © National In strum ents Corp oration 2-309 N I-DA Q FRM fo r PC Compatibles SCAN_Sta rt Format status = SCA N_Start (d eviceNumber , buffer , count , sam.
Chapter 2 Fun ction Reference — SCAN_Start NI-DAQ FRM f or PC Compatibles 2-310 © Natio nal In strume nts Corp oratio n 2 throug h 2 24 * (total numb er of channels scanned) or 2 32 – 1, which ever is les s for E Serie s and DSA devi ces. For PCI -61 1 X d evices, count must be EVEN.
Chapter 2 Fun ction Reference — SCAN_Start © National In strum ents Corp oration 2-311 N I-DA Q FRM fo r PC Compatibles 0: External clock used as timebase (Conn ect your own timebase fr equency to the internal scan-interval counter via the SOURCE5 input for the MIO d evices or, by default, the PFI8 input for the E Series devices).
Chapter 2 Fun ction Reference — SCAN_Start NI-DAQ FRM f or PC Compatibles 2-312 © Natio nal In strume nts Corp oratio n 1: 1 MHz clock used as timebase (1 µs resolution) (no n-E Series only). 2: 100 kHz clock used as timebase ( 10 µs resolution).
Chapter 2 Fun ction Reference — SCAN_Start © National In strum ents Corp oration 2-313 N I-DA Q FRM fo r PC Compatibles you cannot control the scan interval externally . In thi s case, NI-DA Q scans th e channels repeatedly as fa st as you apply the external con version pulses.
Chapter 2 Fun ction Reference — SCAN_Start NI-DAQ FRM f or PC Compatibles 2-314 © Natio nal In strume nts Corp oratio n If you hav e selected external start triggerin g of the data acquisitio n o p.
Chapter 2 Fun ction Reference — SCAN_to_Disk © National In strum ents Corp oration 2-315 N I-DA Q FRM fo r PC Compatibles SCAN_to_Di sk Format status = SCA N_to_D isk ( deviceNumber , numChans , ch.
Chapter 2 Fun ction Reference — SCAN_to_Disk NI-DAQ FRM f or PC Compatibles 2-316 © Natio nal In strume nts Corp oratio n chans is an integer array of a length not less than numCh ans that contains the onboard channel scan sequence to be used. chans can con tain any analog inpu t channel numb er in any order .
Chapter 2 Fun ction Reference — SCAN_to_Disk © National In strum ents Corp oration 2-317 N I-DA Q FRM fo r PC Compatibles count is th e num ber o f sam p les to b e acqui r e d (that i s, th e num ber o f A/D conv ersions to be performed). The length of your data file should be exactly twice the value of co unt .
Chapter 2 Fun ction Reference — SCAN_to_Disk NI-DAQ FRM f or PC Compatibles 2-318 © Natio nal In strume nts Corp oratio n when you en able pret rigger mod e. If you do not apply the stop trig ger , SCAN_to_Disk ev entually returns control to your app lication because you e ventually run out of disk space.
Chapter 2 Func tion Reference — SCXI_AO_Write © National In strum ents Corp oration 2-319 N I-DA Q FRM fo r PC Compatibles SCXI_AO_Write Format status = SCX I_A O _Write (SCXIcha s sisID, moduleS l.
Chapter 2 Fun ction Reference — SCXI_AO_Write NI-DAQ FRM f or PC Compatibles 2-320 © Natio nal In strume nts Corp oratio n 2: Translate a voltage or current v alue to binary, retur n in bi naryWr itt en . rangeCode is the v oltage or curren t range to be used fo r the analog ou tput channel.
Chapter 2 Func tion Reference — SCXI_AO_Write © National In strum ents Corp oration 2-321 N I-DA Q FRM fo r PC Compatibles The SCXI-1 124 is sh ipped with a set of f actory calibrat ion const ants in t he facto ry-set EEPR OM area and a copy of the factory con stants in the EEPR O M load area.
Chapter 2 Fun ction Reference — SCXI_Cal_Constants NI-DAQ FRM f or PC Compatibles 2-322 © Natio nal In strume nts Corp oratio n SCXI_Cal_Consta nts Format status = SCX I_Cal_Co nstants (SC XIchassi.
Chapter 2 Function Reference — SCXI_Cal_Con stants © National In strum ents Corp oration 2-323 N I-DA Q FRM fo r PC Compatibles Output Para meter Discussion channel is the number of th e channel on the mo dule. Range: 0 to n –1, wher e n is the number of chan nels available on the modu le.
Chapter 2 Fun ction Reference — SCXI_Cal_Constants NI-DAQ FRM f or PC Compatibles 2-324 © Natio nal In strume nts Corp oratio n 5: C opy the entire calib ration tab le in calibrationArea to driv er.
Chapter 2 Function Reference — SCXI_Cal_Con stants © National In strum ents Corp oration 2-325 N I-DA Q FRM fo r PC Compatibles range and p olarity setting s for this ch annel. This applies only when op Cod e = 0, 1, 2, or 3 and moduleSlot is an an alog input modu le.
Chapter 2 Fun ction Reference — SCXI_Cal_Constants NI-DAQ FRM f or PC Compatibles 2-326 © Natio nal In strume nts Corp oratio n milliamperes. If opCode = 3, y ou sho uld pa ss your second calibr ation const ant in calConst2 for N I-DA Q to s tore in calib rationArea .
Chapter 2 Function Reference — SCXI_Cal_Con stants © National In strum ents Corp oration 2-327 N I-DA Q FRM fo r PC Compatibles 4. Ground your SC XI input chan nel. If yo u are usin g an SCXI-1100 , SCXI-112 2, or SCXI-11 41, you can use th e SCXI_Calibrate_Setup function to internally ground the module amplifier inputs.
Chapter 2 Fun ction Reference — SCXI_Cal_Constants NI-DAQ FRM f or PC Compatibles 2-328 © Natio nal In strume nts Corp oratio n use the end points of your e xpected inpu t range as sca led1 and sc ale d2 . Then yo u would be specifically calibrating your expected input voltage range.
Chapter 2 Function Reference — SCXI_Cal_Con stants © National In strum ents Corp oration 2-329 N I-DA Q FRM fo r PC Compatibles calibrating, and then call SCXI_Cal_Constants ag ain at the end of your calibration sequence with opCode = 4 to copy the user EEPR O M area to the def ault load area.
Chapter 2 Fun ction Reference — SCXI_Calibrate_Setup NI-DAQ FRM f or PC Compatibles 2-330 © Natio nal In strume nts Corp oratio n SCXI_Calibrate_Set up Format status = SCX I_Calibra te_Setup (SCXIc.
Chapter 2 Function Reference — SCXI_Calibrate_Se tup © National In strum ents Corp oration 2-331 N I-DA Q FRM fo r PC Compatibles 4. Ac quire dat a usi ng the DAQ functions; you sho uld acquire an d av erage ma ny sampl es.
Chapter 2 Fun ction Reference — SCXI_Change_Ch an NI-DAQ FRM f or PC Compatibles 2-332 © Natio nal In strume nts Corp oratio n SCXI_Change_ Chan Format status = SCX I_Change_Ch an (SCXIch assisID, .
Chapter 2 F unction Referenc e — SCXI_ Configure_Filte r © National In strum ents Corp oration 2-333 N I-DA Q FRM fo r PC Compatibles SCXI_Configu re_Filt er Format status = SCXI_Conf igure_Filter .
Chapter 2 Fun ction Reference — SCXI_Configure_Filter NI-DAQ FRM f or PC Compatibles 2-334 © Natio nal In strume nts Corp oratio n 2: Configure the filter to use an external sig nal. The module divides the external signal by cutoffDivDown to deter mine the filter cutof f frequency.
Chapter 2 F unction Referenc e — SCXI_ Configure_Filte r © National In strum ents Corp oration 2-335 N I-DA Q FRM fo r PC Compatibles The SCXI-1126 has eight f ilter settings, one for each channel. These settings only work with f ilterMode = 1. The defau lt frequenc y setting for the S CXI-1126 is 1 Hz.
Chapter 2 Fun ction Reference — SCXI_Get_Chassis_Info NI-DAQ FRM f or PC Compatibles 2-336 © Natio nal In strume nts Corp oratio n SCXI_Get_Cha ssis_Info Format status = SCXI_Get_Chassis_Info ( SCXIchassis ID, chassisT yp e, chassisA ddress, commMode, commPath, numSlo ts) Purpose Return s chass i s conf iguration in formation.
Chapter 2 Func tion Reference — SCXI_Get_Chassis_Info © National In strum ents Corp oration 2-337 N I-DA Q FRM fo r PC Compatibles comm Mode is the Communicatio n mode that will be us ed when the driver co mmunicates with the SCXI chassis and modules.
Chapter 2 Fun ction Reference — SCXI_Get_Module_Info NI-DAQ FRM f or PC Compatibles 2-338 © Natio nal In strume nts Corp oratio n SCXI_Get_M odule_In fo Format status = SCX I_Get_Modu le_Info (SCXI.
Chapter 2 F unction Reference — SCXI_Get_Module_Info © National In strum ents Corp oration 2-339 N I-DA Q FRM fo r PC Compatibles 24: SCXI-1 162HV. 28: SCXI-1 163R. 30: SCXI-1 102. 32: SCXI-1 141. 38: SCXI-1 200. 40: SCXI-2 400. 42: VXI-S C-1102 44: VXI-S C-1150 68: SCXI-1 120D.
Chapter 2 Fun ction Reference — SCXI_Get_State NI-DAQ FRM f or PC Compatibles 2-340 © Natio nal In strume nts Corp oratio n SCXI_Get_Sta te Format sta tus = SCXI _Get_S tate (SC XICh assis ID, mo duleSlo t, por t, c hanne l, da ta) Purpose Gets the state of a single channel or an entire port on a dig ital or relay SCXI module.
Chap ter 2 Functio n Refe renc e — SC XI_G et_ State © National In strum ents Corp oration 2-341 N I-DA Q FRM fo r PC Compatibles When channel = –1, dat a contains the pattern of an entire port.
Chapter 2 Fun ction Reference — SCXI_Get_Status NI-DAQ FRM f or PC Compatibles 2-342 © Natio nal In strume nts Corp oratio n SCXI_Get_Sta tus Format statu s = SCX I_Get_ Statu s (SCXIC hassisID, moduleSlo t, wait, data) Purpose Reads the data in the Status Register on the specif ied module.
Chapter 2 Function Reference — SCXI_Get_Status © National In strum ents Corp oration 2-343 N I-DA Q FRM fo r PC Compatibles Using This Function If wait = 1, the function will wait a maximum o f 100 m s (or 3 s econds for the SCXI-1126) for the module status to be r eady .
Chapter 2 Fun ction Reference — SCXI_Load_Config NI-DAQ FRM f or PC Compatibles 2-344 © Natio nal In strume nts Corp oratio n SCXI_Load_Co nfig Format statu s = SCXI_ Loa d _C onfig (SCX Ichas sisID) Purpose Loads the SCXI chass is configuration inform ation that you established in th e configuration utility .
Chapter 2 Function Reference — SCXI_ModuleID_Read © National In strum ents Corp oration 2-345 N I-DA Q FRM fo r PC Compatibles SCXI_Modu leID_Read Format status = SCX I_ModuleID_ Read (SCXIchas sisID, modu leSlot, ModuleI D) Purpose Reads the Module ID re gister of the SCXI module in the gi ven slot.
Chapter 2 Fun ction Reference — SCXI_ModuleID_Read NI-DAQ FRM f or PC Compatibles 2-346 © Natio nal In strume nts Corp oratio n 30: SCXI-1 102. 32: SCXI-1 141.
Chapter 2 Func tion Reference — SCXI_MuxCtr_Setup © National In strum ents Corp oration 2-347 N I-DA Q FRM fo r PC Compatibles SCXI_MuxCtr_Setup Format status = SCX I_ Mu xCtr_Setup (deviceNumber ,.
Chapter 2 Fun ction Reference — SCXI_MuxCtr_Setup NI-DAQ FRM f or PC Compatibles 2-348 © Natio nal In strume nts Corp oratio n Using This Function Y ou can use this functi on to synchron ize the s .
Chapter 2 F unction Reference — SCXI_Reset © National In strum ents Corp oration 2-349 N I-DA Q FRM fo r PC Compatibles SCXI_Reset Format status = SCX I_Reset (SCXIch assisID, mo du leSlot) Purpose Resets the specified module to its default state. Y ou can also use SCXI_Reset to reset the Slot 0 scanning circuitry or to reset the entire chassis.
Chapter 2 Fun ction Reference — SCXI_Reset NI-DAQ FRM f or PC Compatibles 2-350 © Natio nal In strume nts Corp oratio n • SCXI-11 20, SCXI-11 20D, SC XI-1121, and SCXI-1140: – If the module is op eratin g in Multip lexed mode: Channel 0 is sel ected.
Chapter 2 F unction Reference — SCXI_Reset © National In strum ents Corp oration 2-351 N I-DA Q FRM fo r PC Compatibles • SCXI-11 63: Initializes all of the d igi tal output lines on the m o dule to a logical high state. • SCXI-11 63R: Initializes all of the solid state relays to their open states.
Chapter 2 Fun ction Reference — SCXI_Scale NI-DAQ FRM f or PC Compatibles 2-352 © Natio nal In strume nts Corp oratio n SCXI_Scale Format status = SCX I_Scale (SCXIch assisID, mo dul eSlot, chann e.
Chapter 2 Func tion Reference — SCXI_Scale © National In strum ents Corp oration 2-353 N I-DA Q FRM fo r PC Compatibles Para meter Discussion channel is the number of th e channel on the SCXI modu le. Range: 0 to n –1, wher e n is the number of chan nels available on the modu le.
Chapter 2 Fun ction Reference — SCXI_Scale NI-DAQ FRM f or PC Compatibles 2-354 © Natio nal In strume nts Corp oratio n binArray is th e array of bi na ry data for the given channel. binArray should contain numPoints data samples from the SCXI channel .
Chapter 2 Function Reference — SCXI_SCAN_Setup © National In strum ents Corp oration 2-355 N I-DA Q FRM fo r PC Compatibles SCXI_SCAN_Setup Format status = SCXI_SCAN_Setup (SCXIch assisID, numModu .
Chapter 2 Fun ction Reference — SCXI_SCAN_Setup NI-DAQ FRM f or PC Compatibles 2-356 © Natio nal In strume nts Corp oratio n Any v alue in the modu leList array that is greater than the numb er of slots av ailable in the chassis (such as a v alue of 15 or 16) can act as a dummy entry in the module scan list.
Chapter 2 Function Reference — SCXI_Set_Config © National In strum ents Corp oration 2-357 N I-DA Q FRM fo r PC Compatibles SCXI_Set_C onfig Format status = SCXI_Set_Confi g (SCXIchassisID, chass i.
Chapter 2 Fun ction Reference — SCXI_Set_Config NI-DAQ FRM f or PC Compatibles 2-358 © Natio nal In strume nts Corp oratio n 3: VXI-SC-1000 carrier module. 4: PXI-1010 ch assis. chassisAdd ress is the hardware jump ered address of an SCXI chassis. Range: 0 to 31.
Chapter 2 Function Reference — SCXI_Set_Config © National In strum ents Corp oration 2-359 N I-DA Q FRM fo r PC Compatibles 24: SCXI-1 162HV. 28: SCXI-1 163R.
Chapter 2 Fun ction Reference — SCXI_Set_Gain NI-DAQ FRM f or PC Compatibles 2-360 © Natio nal In strume nts Corp oratio n SCXI_Set_Gai n Format statu s = SCXI_ Set_G ain (S C X Icha ssisID , mod u.
Chapter 2 Function Reference — SCXI_Set_Input_Mode © National In strum ents Corp oration 2-361 N I-DA Q FRM fo r PC Compatibles SCXI_Set_Inp ut_Mode Format status = SCX I_Set_Inpu t_Mode (SC XIchassisI D, moduleSlo t, inp utMode) Purpose Conf igures the SCXI-11 22 channe ls for tw o-wire mode or fou r- wire mode.
Chapter 2 Fun ction Reference — SCXI_Set_State NI-DAQ FRM f or PC Compatibles 2-362 © Natio nal In strume nts Corp oratio n SCXI_Set_St ate Format status = SCX I_Set_Stat e (SCXIChas sisID, modu le, port, cha nnel, data) Purpose Sets th e state of a singl e channel or an entir e port on a digital output o r relay mod ule.
Chapter 2 Function Reference — SCXI_Set_State © National In strum ents Corp oration 2-363 N I-DA Q FRM fo r PC Compatibles When channel = n, the LSB (b it 0) o f data contains the state of chan nel n on the specif ied port .
Chapter 2 Fun ction Reference — SCXI_Set_Threshold NI-DAQ FRM f or PC Compatibles 2-364 © Natio nal In strume nts Corp oratio n SCXI_Set_Thre shold Format status = SCX I_Set_Threshold (SCX IChas sisI D, moduleSlo t, channel, level, hysteresis) Purpose Sets th e high and lo w thresh old v alues for the SC XI-1126 frequ ency-t o-v oltage mo dule.
Chapter 2 Function Reference — SCXI_Set_Th reshold © National In strum ents Corp oration 2-365 N I-DA Q FRM fo r PC Compatibles triggers lo w . The SCXI-1126 module us es the squa re wa ve t o produce a correspond ing voltage that is proportional to the frequency of the original input signal.
Chapter 2 Fun ction Reference — SCXI_Single_Chan_Setup NI-DAQ FRM f or PC Compatibles 2-366 © Natio nal In strume nts Corp oratio n SCXI_Single_ Chan_Setup Format status = SCX I_Single_Cha n_Setup .
Chapter 2 Function Reference — SCXI_T rack_Hold_Co ntrol © National In strum ents Corp oration 2-367 N I-DA Q FRM fo r PC Compatibles SCXI_T ra ck_Hol d_Control Format status = SCXI_T rack_Hold_Con.
Chapter 2 Fun ction Reference — SCXI_T ra ck_Hold_Setup NI-DAQ FRM f or PC Compatibles 2-368 © Natio nal In strume nts Corp oratio n SCXI_T ra ck_Hol d_Setup Format status = SCX I_T ra ck_ Hold_Set.
Chapter 2 Function Reference — SCXI_T rack_Hold_Setup © National In strum ents Corp oration 2-369 N I-DA Q FRM fo r PC Compatibles source indicates what signal contr o ls the track/hold state of the mo dule. If the inputMod e is 0 , NI-D A Q ign ores this param eter .
Chapter 2 Fun ction Reference — SCXI_T ra ck_Hold_Setup NI-DAQ FRM f or PC Compatibles 2-370 © Natio nal In strume nts Corp oratio n DAQdeviceNumber is the de vice number of the D A Q device in the PC that will be used to acquire the data.
Chapter 2 Function Reference — SCXI_T rack_Hold_Setup © National In strum ents Corp oration 2-371 N I-DA Q FRM fo r PC Compatibles recei ve the source signal from the SCXIb us and dri ve the scan i.
Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-372 © Natio nal In strume nts Corp oratio n Select_Sig nal Format status = Select_Signal (deviceNumber , signal, source, sour ceSpec) Purpose Chooses the source and polarity of a signal that the de vice uses (E Series and D A QArb 5411 de vices only).
Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-373 N I-DA Q FRM fo r PC Compatibles • ND_RTSI_CLOCK • ND_RTSI_0 thro ugh ND_RTSI_6 • ND_PLL_REF_SOURCE Not e The ND_OUT_START_TRIGGER , ND_OUT_UPDA TE , and ND_UPDATE_CLOCK_TIMEBASE values do not apply to the AI E Series devices.
Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-374 © Natio nal In strume nts Corp oratio n Tabl e 2-3 5. Poss ible V alues for si gnal Gro up signal Description T i.
Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-375 N I-DA Q FRM fo r PC Compatibles Legal v alues for sour ce and sourceSpec depend on the signal and are sho wn in the fo llowing tables. signal = ND_IN_START_TRIGGER Use ND_IN_START_TRIGGER to initiate a data acq uisition sequ ence.
Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-376 © Natio nal In strume nts Corp oratio n signal = ND_IN_STOP_TRIGGER Use ND_IN_STOP_TRIGGER for d ata acquisition in the pretriggered mode.
Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-377 N I-DA Q FRM fo r PC Compatibles Use this signal for scan timing. Y ou can u se a D AQ- S TC timer for timing the scans, or y ou can use an e xternal signal.
Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-378 © Natio nal In strume nts Corp oratio n signal = ND_IN_SCAN_CLOCK_TIMEBASE Use ND_IN_SCAN_CLOCK_TIMEBASE as an inp ut into the D A Q-STC scan timer .
Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-379 N I-DA Q FRM fo r PC Compatibles Use ND_OUT_START_TRIGGER to initiate a wa vefor m generation sequence. Y ou can use an external sign al or the signal used as the ND_IN_START_TRIGGER , or NI-D A Q can generate it.
Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-380 © Natio nal In strume nts Corp oratio n Use this signal for gatin g the wa veform generation.
Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-381 N I-DA Q FRM fo r PC Compatibles Use ND_NONE to disable o utput on the pin.
Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-382 © Natio nal In strume nts Corp oratio n I/O connector b ecause the pin is used for device-to-SCXI com munication. Currently , there are no SCXI modules that require this.
Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-383 N I-DA Q FRM fo r PC Compatibles Not e Disabling the output on the PFI7 line (by calling S elect_S igna.
Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-384 © Natio nal In strume nts Corp oratio n Use source = ND_NONE to stop the de vice from dr iving the R TSI clock line. When source = ND_BOARD_CLOCK , this dev ice driv es the signal on the R TSI clock line.
Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-385 N I-DA Q FRM fo r PC Compatibles Parameter Discussion for the 6602 Devices Le gal range s for th e sign al , sour ce , and sourceSpec param e ters ar e given in term s of constants that are def ined in a head er file.
Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-386 © Natio nal In strume nts Corp oratio n Example statu s = Select_Signal (1, ND_START_TRIGGER, ND_RTS I_5, ND_LOW_TO_HIGH) ; This e xample would route R TSI lines to be the start tri gger for the counter s on the TIO board.
Chap ter 2 F unctio n Refere nce — Select _Signal © National In strum ents Corp oration 2-387 N I-DA Q FRM fo r PC Compatibles Signal Name Equivalencies Fo r a v ariety of reasons, some timing signals are gi ven dif ferent names in the hardware documentation and the software and its documen tatio n .
Chapter 2 Function R eference — Select _Signal NI-DAQ FRM f or PC Compatibles 2-388 © Natio nal In strume nts Corp oratio n Not e Unpredictable behavior might result if other VXIbus devices simultaneously use the same VXIbus trigger line that the VX I-MI O devices are using to synchron ize their opera tio ns.
Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-389 N I-DA Q FRM fo r PC Compatibles Set_DAQ_Device_Info Format status = Set_D A Q_Device_Inf o (devi.
Chapter 2 Function R eferenc e — Set_DAQ _Device _Info NI-DAQ FRM f or PC Compatibles 2-390 © Natio nal In strume nts Corp oratio n infoT ype can be one of the foll owing : infoT ype Description ND.
Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-391 N I-DA Q FRM fo r PC Compatibles infoV alue can be one of the following : ND_DATA_XFER_MODE_GPCTR.
Chapter 2 Function R eferenc e — Set_DAQ _Device _Info NI-DAQ FRM f or PC Compatibles 2-392 © Natio nal In strume nts Corp oratio n When NI-D A Q uses DMA channels for data transfers, it must hav e an interrupt le vel av ailable for the de vice performing the transfers.
Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-393 N I-DA Q FRM fo r PC Compatibles All possible data transfer m ethods for the de vices supported b y NI-D A Q are listed below . If your de vice is not listed, non e of the data transfer mo des are applicable.
Chapter 2 Function R eferenc e — Set_DAQ _Device _Info NI-DAQ FRM f or PC Compatibles 2-394 © Natio nal In strume nts Corp oratio n DAQ C a r d - 6 5 3 3 ND_DATA_XFER_MO DE_DIO_GR1 ND_INTERRUPTS* N.
Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-395 N I-DA Q FRM fo r PC Compatibles A T-MIO -16 E-2 NEC-MIO-16E-4 A T-MIO-64E-3 ND_DATA_XFER_MODE_AI.
Chapter 2 Function R eferenc e — Set_DAQ _Device _Info NI-DAQ FRM f or PC Compatibles 2-396 © Natio nal In strume nts Corp oratio n A T -A I-1 6XE- 10 NEC-AI-16E-4 NEC-AI-16XE-50 ND_DATA_XFER_MODE_.
Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-397 N I-DA Q FRM fo r PC Compatibles D A QPad-MI O-16XE-50 ND_DATA_XFER_MODE_AI ND_INTERRUPTS* ND_DAT.
Chapter 2 Function R eferenc e — Set_DAQ _Device _Info NI-DAQ FRM f or PC Compatibles 2-398 © Natio nal In strume nts Corp oratio n NI-D A Q uses interrupts and DMA channels for data tran sfers. The DMA data transfers are typically faster , so you might want to take advan tage of them.
Chapter 2 Functio n Refere nce — Set_D AQ_Dev ice_Inf o © National In strum ents Corp oration 2-399 N I-DA Q FRM fo r PC Compatibles (A T-MIO-16F -5, A T-MIO-16X, A T-MIO-64F-5 only) If you want to.
Chapter 2 Function R eference — Timeout_ Config NI-DAQ FRM f or PC Compatibles 2-400 © Natio nal In strume nts Corp oratio n Timeout_ Config Format status = Timeou t_Config (deviceNumber , t imeo u.
Chapter 2 Functio n Refere nce — Timeou t_Config © National In strum ents Corp oration 2-401 N I-DA Q FRM fo r PC Compatibles Lab_ISCAN_to_Disk WFM_from_Disk DAQ_to_Disk SCAN_Op WFM_Op SCAN_to_Disk.
Chapter 2 Function R eference — WFM _Chan_ Control NI-DAQ FRM f or PC Compatibles 2-402 © Natio nal In strume nts Corp oratio n WFM_Chan_Con trol Format status = WFM_Chan _Contr ol (de viceNumber , chan, operat ion) Purpose T emporarily halts or restarts w avefo rm genera tion for a s ingle anal og output channel.
Chap ter 2 F unctio n Refere nce — WFM_ Chan_Co ntrol © National In strum ents Corp oration 2-403 N I-DA Q FRM fo r PC Compatibles A T- A O-6/10, A T-MIO-1 6X, and A T-MIO-64 F-5 only–Y o u can u.
Chapter 2 Function R eference — WFM _Check NI-DAQ FRM f or PC Compatibles 2-404 © Natio nal In strume nts Corp oratio n WFM_Check Format status = WFM_Check (deviceNumber , chan, wfmStopped, itersDone, points Done ) Purpose Returns s tatus info rmation concer ning a wa veform generat ion operat ion.
Chap ter 2 Functio n Refe renc e — W FM_ Check © National In strum ents Corp oration 2-405 N I-DA Q FRM fo r PC Compatibles pointsDone retu rns th e number of point s written to the anal og output channels sp ecified in chan for the current b uffe r iteration.
Chapter 2 Function R eference — WFM _ClockRa te NI-DAQ FRM f or PC Compatibles 2-406 © Natio nal In strume nts Corp oratio n WFM_ClockRat e Format statu s = WFM_C lock Rate ( devic e Numbe r , grou p, whic hcloc k , tim ebase , interval, m ode) Purpose Sets an u pdate rate and a del ay rate for a group of analog output channels.
Chapter 2 Function R eference — WFM _ClockRa te © National In strum ents Corp oration 2-407 N I-DA Q FRM fo r PC Compatibles 0: If whichclock is equal to 0, the ex ternal clock is connected to OUT2.
Chapter 2 Function R eference — WFM _ClockRa te NI-DAQ FRM f or PC Compatibles 2-408 © Natio nal In strume nts Corp oratio n The only intern al timebases av ailable on the E Series de vices are 20 MHz and 100 kHz. If you use a timebase other than – 3 or 2 for these devices, NI- DA Q performs the appropriate translation, if poss ible.
Chapter 2 Function R eference — WFM _ClockRa te © National In strum ents Corp oration 2-409 N I-DA Q FRM fo r PC Compatibles (if it is not b usy in a dat a acqui sition or a count ing operat ion) to produce a clo ck of 100 kHz, which is used b y the count er produci ng the update interv al.
Chapter 2 Function R eference — WFM _ClockRa te NI-DAQ FRM f or PC Compatibles 2-410 © Natio nal In strume nts Corp oratio n • Delay interv al prescalar 2 corresponds to the interv al argume nt you use in this functio n when whichclock = 3. If you do not call th is functio n with whichclo ck = 3, this interv al is 2.
Chap ter 2 Funct ion Ref ere nce — WFM_ DB_Con fig © National In strum ents Corp oration 2-411 N I-DA Q FRM fo r PC Compatibles WFM_ DB_C onfi g Format status = WFM _D B_Config (deviceNumber , numChans , chanV ect , dbMode, oldDataSto p partialT ransferSto p) Purpose Enables and disa bles the do uble-buf fered mode of w avefo rm generatio n.
Chapter 2 Function R eference — WFM _DB_Co nfig NI-DAQ FRM f or PC Compatibles 2-412 © Natio nal In strume nts Corp oratio n oldDat aStop is a flag whose v alue enables or disables the mechanism whereby NI-D A Q stops the wa vef orm generation when NI-D A Q it is about to generat e old data (data that has already been generat ed) a second time.
Chap ter 2 Funct ion Refer enc e — WFM_DB_ HalfRe ady © National In strum ents Corp oration 2-413 N I-DA Q FRM fo r PC Compatibles WFM_DB_HalfRea dy Format status = WFM_DB_HalfReady ( deviceNumber .
Chapter 2 Function R eference — WFM _DB_Half Ready NI-DAQ FRM f or PC Compatibles 2-414 © Natio nal In strume nts Corp oratio n Using This Function Double-b uffered w avefo rm generatio n functions c yclically outp ut data from the wav eform bu ffer (specif ied in WFM_Load ).
Chap ter 2 Funct ion Ref ere nce — WFM_ DB_T ransf er © National In strum ents Corp oration 2-415 N I-DA Q FRM fo r PC Compatibles WFM_DB_T ransfer Format status = WFM_DB_T ransfer (deviceNumber , .
Chapter 2 Function R eferenc e — WFM_D B_T ran sfer NI-DAQ FRM f or PC Compatibles 2-416 © Natio nal In strume nts Corp oratio n buffer is the array of ne w d ata that is to be transferred into th e wa veform buff er(s). WFM_DB_Transfer can tran sf er ne w data to more than one w aveform b uffer , except on PCI E Series de vices.
Chapter 2 Functio n Refere nce — WFM _from_D isk © National In strum ents Corp oration 2-417 N I-DA Q FRM fo r PC Compatibles WFM_fr om_Dis k Format statu s = WFM_f rom_D isk ( device N umber , num.
Chapter 2 Function R eference — WFM _from_D isk NI-DAQ FRM f or PC Compatibles 2-418 © Natio nal In strume nts Corp oratio n fil eNa me is the name of the data f ile containing the w a veform data.
Chapter 2 Functio n Refere nce — WFM _from_D isk © National In strum ents Corp oration 2-419 N I-DA Q FRM fo r PC Compatibles If you h av e changed the an alog output conf iguration fro m the defaults by changi ng the jumpers on the de vice, you must call AO_Configure to set the so ftware copies o f the settings prior to calling WFM_from_Disk .
Chapter 2 Function R eferenc e — WFM_G roup_Con trol NI-DAQ FRM f or PC Compatibles 2-420 © Natio nal In strume nts Corp oratio n WFM_Group_Co ntrol Format sta tus = W FM_Gr oup_Cont ro l (de viceNum ber , gr oup, oper ation) Purpose Control s wa veform generation f or a group of analog o utput channel s.
Chapter 2 Function Refer ence — WFM _Group_Co ntrol © National In strum ents Corp oration 2-421 N I-DA Q FRM fo r PC Compatibles Not e If you in vok e thi s function to clea r continuou s waveform generation tha t was stopped previously because of an underflow error , WFM_Group_Contro l does n ot report the occurrence of the underflo w error .
Chapter 2 Function R eferenc e — WFM_G roup_Con trol NI-DAQ FRM f or PC Compatibles 2-422 © Natio nal In strume nts Corp oratio n generated after NI-D AQ e xecutes RESU ME. RESUME restarts wav eform generation if NI-D A Q has completed the number of iterations specified in WFM_Load .
Chap ter 2 Function Re ference — WFM_G roup_Setu p © National In strum ents Corp oration 2-423 N I-DA Q FRM fo r PC Compatibles WFM_Group_Se tup Format status = WFM _G roup_ Setup (deviceNumber , num Cha ns, chanV ect, group) Purpose Assigns one or more an alog outpu t channels to a wa veform generation group.
Chapter 2 Function R eference — WFM _Group_Se tup NI-DAQ FRM f or PC Compatibles 2-424 © Natio nal In strume nts Corp oratio n Using This Function Fo r the A T- A O-6/10, you can assign analog outpu t channels to one of tw o wav eform generati on group s.
Chapte r 2 Functio n Refer enc e — WFM_Load © National In strum ents Corp oration 2-425 N I-DA Q FRM fo r PC Compatibles WFM_Load Format status = WFM_Load (deviceNumber , numCh ans, chanV ect, buff.
Chapter 2 Function R eferenc e — WFM_Lo ad NI-DAQ FRM f or PC Compatibles 2-426 © Natio nal In strume nts Corp oratio n buffer is an array of inte ger values that ar e con verted to v oltages by D A Cs. If your de vice has 12-bit D A Cs, the dat a ranges fro m 0 to 4, 095 in uni polar mode and from –2 ,048 to 2,04 7 in bipolar mode.
Chapte r 2 Functio n Refer enc e — WFM_Load © National In strum ents Corp oration 2-427 N I-DA Q FRM fo r PC Compatibles Not e The follo wing informat ion ap p lies to DA QAr b 5411 devices on ly: iterations is th e number of ti mes the wa veform gener ation st eps through buffer .
Chapter 2 Function R eferenc e — WFM_Lo ad NI-DAQ FRM f or PC Compatibles 2-428 © Natio nal In strume nts Corp oratio n and th e patter n of wavefor m foll o wed by del ay fo llowed by waveform an d so on, w hic h goes on indef initely (f or de vices other than D A QArb 5411 de vices).
Chapte r 2 Functio n Refer enc e — WFM_Load © National In strum ents Corp oration 2-429 N I-DA Q FRM fo r PC Compatibles When mode is 0, NI-DA Q does not use F IFO mode w av eform generation.
Chapter 2 Function R eferenc e — WFM_Lo ad NI-DAQ FRM f or PC Compatibles 2-430 © Natio nal In strume nts Corp oratio n DAQ Hardware Overview Guide .
Chapte r 2 Functio n Refer enc e — WFM_Load © National In strum ents Corp oration 2-431 N I-DA Q FRM fo r PC Compatibles Assume the following conditi on s: Update rate of the wavef orm is = U Hz , Accumulator size is = n bits, Desired frequ ency is = f Hz Then, the DDS F requenc y wor d [63:0] is= ( f * 2 n ) / U.
Chapter 2 Function R eferenc e — WFM_Lo ad NI-DAQ FRM f or PC Compatibles 2-432 © Natio nal In strume nts Corp oratio n Fo r each stage, Buf fer ID [31:0] specif ies the b uf fer number to be generated. Th is buf fer ID should correspon d to one of the buf fers that was loaded into the m emory earlier by calling WFM_Load with mode = 3.
Chapte r 2 Functio n Refer enc e — WFM_Load © National In strum ents Corp oration 2-433 N I-DA Q FRM fo r PC Compatibles changing the jumper s on the device, you must c all AO_Configure to set the software co pies of the settings prior to calli ng WFM_Group_Control ( operation = ST AR T).
Chapter 2 Function R eferenc e — WFM_O p NI-DAQ FRM f or PC Compatibles 2-434 © Natio nal In strume nts Corp oratio n WFM_Op Format status = WFM_Op (de viceNumber , numChans, chanV ect, buff er , c.
Chap ter 2 Function Re ferenc e — WFM_ Op © National In strum ents Corp oration 2-435 N I-DA Q FRM fo r PC Compatibles The DSA devices ha ve 18-bit D AC s and operate in bipolar mode only . Data will range from –131,07 2 to +131,0 71. F or DSA de vices each b uf f er element is 3 2 bits wide.
Chapter 2 Function R eferenc e — WFM_O p NI-DAQ FRM f or PC Compatibles 2-436 © Natio nal In strume nts Corp oratio n If you h av e changed the an alog output conf iguration fro m the defaults by changi ng the jumpers on the de vice, you must call AO_Configure t o set the so ftware copies of the se ttings prior to calling WFM_Op .
Chap ter 2 Funct ion Ref ere nce — WFM_ Rate © National In strum ents Corp oration 2-437 N I-DA Q FRM fo r PC Compatibles WFM_Rate Format status = WFM_ Rate (rate, units, tim ebase, updateInter val) Purpose Con verts a waveform generation update rate into the ti mebase and update-interval v alues needed to pr oduce the rate you w ant.
Chapter 2 Function R eferenc e — WFM_R ate NI-DAQ FRM f or PC Compatibles 2-438 © Natio nal In strume nts Corp oratio n 2: 100 kHz clock used as timebase (10 µs resolution ). 3: 10 kHz clock u sed as timebase ( 100 µ s resol ution) (Am951 3-based MIO devices only).
Chapte r 2 Functio n Refe rence — WFM_Scal e © National In strum ents Corp oration 2-439 N I-DA Q FRM fo r PC Compatibles WFM_Scale Format status = WFM_Scale (de viceNumber , chan, count, gain, vol.
Chapter 2 Function R eference — WFM _Scale NI-DAQ FRM f or PC Compatibles 2-440 © Natio nal In strume nts Corp oratio n range, NI-D A Q s ets the voltage to the maximu m or minimum v alue and returns an error . NI-D A Q still completes the trans lation, howe ver .
Chapter 2 Function R eference — WFM _Set_C lock © National In strum ents Corp oration 2-441 N I-DA Q FRM fo r PC Compatibles WFM_Set_ Clock Format WFM_Set_Clock ( deviceNumb er , group, whichClock , desiredRate, units, actualRa t e ) Purpose Sets th e update rate for a group of ch annels (DS A de vices onl y).
Chapter 2 Function R eference — WFM _Set_ Clock NI-DAQ FRM f or PC Compatibles 2-442 © Natio nal In strume nts Corp oratio n actualRate i s the rate at which data points are sent to the D A Cs. The capabilities of your device will determine ho w closely actualRate matches desiredRate .
© Natio nal In strume nts Corp oration A-1 NI- DAQ FR M for PC C omp atibl es Appendix A Status Codes This appendix lis ts the status codes returned by NI-D A Q, includin g the name a n d desc r iptio n. Each NI-D A Q function returns a status code that indicates whether the function was performed successfully .
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-2 © Natio nal In strume nts Corp oratio n –10007 badChanError A channel is out of range fo r the board type or input con fig uration; or th e combination of chann els is not all o wed; or the scan ord er must be re versed (0 last ).
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-3 NI- DAQ FR M for PC C omp atibl es –10022 badWriteCountError Y our data array cont ains an incomplete upda te , or you a re tryi .
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-4 © Natio nal In strume nts Corp oratio n –10031 badChassis IDError The specified SCXI chassis does not correspond to a conf igured SCXI chassis. –10032 badModuleSlo tError The SCXI modu le slot that was specified is in v alid or corresponds to an empty s lot.
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-5 NI- DAQ FR M for PC C omp atibl es –10089 badTotalCoun tError The total count is in consisten t with the bu ffer size and pretrigger scan co unt or with the board type.
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-6 © Natio nal In strume nts Corp oratio n –10124 gpctrBadEntityIDError Inva l i d entityID used. –10125 gpctrBadActionError Inva l i d action used. –10200 EEPROMreadError Un able to read data fro m EEPR O M.
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-7 NI- DAQ FR M for PC C omp atibl es –10247 cmosConfigError Th e CMOS conf iguratio n-memory fo r the device is empty or in valid, or the conf iguration s pecif ied does no t agree with the current configuration of the de vice, or the EISA system configuration is in valid.
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-8 © Natio nal In strume nts Corp oratio n –10256 comPortOpenError Th ere was an error in opening the specifi ed COM port. –10257 baseAddressError Bad base address specif ied in the configuration utility .
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-9 NI- DAQ FR M for PC C omp atibl es –10345 chassisMemAllocError The required amount o f memory cannot be allocated on the remote SCXI unit for the specif ied operation. –10346 badPacketError The packet recei ved b y the remote SCXI unit is in vali d.
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-10 © Natio nal In strume nts Corp oratio n –10402 deviceNotFoundError No de vice is located in the specified slot or at the specif ied address.
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-11 NI-DA Q FRM for PC C omp atibles –10440 sysOwnedRsrcError The specif ied resource is owned b y the driv er and cannot be accessed or modif ied b y the user .
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-12 © Natio nal In strume nts Corp oratio n –10448 stackMemError The driv er is unable to continue pars ing a string input due to stack limitatio ns. –10449 cacheMemError A cache-related error occurred, or caching is no t supported in the cu rrent mode.
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-13 NI-DA Q FRM for PC C omp atibles –10460 interfaceInteractionError Y o u hav e mixed VIs fr om the D A Q library and the _DA Q compatibili ty library ( LabVIEW 2.
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-14 © Natio nal In strume nts Corp oratio n –10600 noSetupError No setup op erati on has been perf ormed for the specif i ed resources. Or , some resou rce s requ ire a speci fic ord ering of calls for proper setup.
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-15 NI-DA Q FRM for PC C omp atibles –10611 badDirOnSomeL inesError Some of the lines in the sp ecified channel are no t config ured for the transfer direction specif ied. For a write transfer , some lines are conf igured for input.
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-16 © Natio nal In strume nts Corp oratio n –10624 delayTrigError The delayed trigger mode is not support ed o r is no t av ailab le in the current conf iguration, or no delay source has been assigned.
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-17 NI-DA Q FRM for PC C omp atibles –10634 noContTransferInProgressError No conti nuous ( double-b uffered ) transfer is in prog ress for the specif ied resource.
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-18 © Natio nal In strume nts Corp oratio n –10688 noTr igEn abledE rror The number of total scans and pretri gger scans implies th at a triggered start is intended, but triggerin g is not enabled.
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-19 NI-DA Q FRM for PC C omp atibles –10698 timebaseConflictError Y o u cannot use this combination of scan and sample clock tim ebases for this boar d.
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-20 © Natio nal In strume nts Corp oratio n –10783 calConstPolarityConflictError Calibration co n stants in the load area hav e a differ ent polarity fro m the current con f iguration. Therefore, if y ou recei ve this error , you should load constants from f actory .
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-21 NI-DA Q FRM for PC C omp atibles –10809 gateSign alEr ror Attemp ted to start a pulse w idt h measurement with th e pulse in the phase to be measured (for e xample, high phase for hig h -level gating).
Appendix A Status Codes NI-DAQ FRM for PC Compatibles A-22 © Natio nal In strume nts Corp oratio n –10848 noDMACountAvailError The dr iv er could not obtai n a v alid reading fro m the tr ansfer -count register in the DMA controller . –10849 OpenFileError The con f iguratio n fi le could no t be opened.
Appe ndix A Status Codes © Natio nal In strume nts Corp oration A-23 NI-DA Q FRM for PC C omp atibles –10883 wfmPoll DataLossError Ne w data could not be transferr ed to the wa veform b uff er of the remote SCXI unit to keep up with the wavef orm update r ate.
© Natio nal In strume nts Corp oration B-1 NI- DAQ FR M for PC C omp atibl es Appendix B Analog Input Channel, Gain Settings, and V oltage Calculation This appendix lis ts the valid channel and gain settings for DA Q bo ards, describes ho w NI-D A Q calculates voltage, and describes the measurem ent of of fset and gain adjustment.
Appendix B Analog Input Channel, Gain Se ttings, and Voltage C alculatio n NI-DAQ FRM for PC Compatibles B-2 © Natio nal In strume nts Corp oratio n V alid Internal Analog Input Channels T able B-2 lists the v alid internal chann els for analog input de vices.
Appendix B Ana log Input Channel, Ga in Settings, an d Voltage Calculatio n © Natio nal In strume nts Corp oration B-3 NI- DAQ FR M for PC C omp atibl es PCI-MIO-16XE- 10 PCI-MIO-16XE- 50 PXI-6030E P.
Appendix B Analog Input Channel, Gain Se ttings, and Voltage C alculatio n NI-DAQ FRM for PC Compatibles B-4 © Natio nal In strume nts Corp oratio n Internal Channel constants are defined in the following header f iles: • C progra mmers— NIDAQCNS.
Appendix B Ana log Input Channel, Ga in Settings, an d Voltage Calculatio n © Natio nal In strume nts Corp oration B-5 NI- DAQ FR M for PC C omp atibl es DAQ Devi ce Gain Setti ngs T able B-4 lists the valid gain settings for D A Q devices.
Appendix B Analog Input Channel, Gain Se ttings, and Voltage C alculatio n NI-DAQ FRM for PC Compatibles B-6 © Natio nal In strume nts Corp oratio n T able B-5 lists the values of maxReadi ng and maxVolt for different boar ds. Fo r the PC-LPM-16 and D A QCard-1200, ga in is ignored, and the foll owing form ula is us ed: Tabl e B-5.
Appendix B Ana log Input Channel, Ga in Settings, an d Voltage Calculatio n © Natio nal In strume nts Corp oration B-7 NI- DAQ FR M for PC C omp atibl es Offset and Gain Adjustment Measuremen t of Offset T o determine th e offset parameter used in the AI_VScale and DAQ_VScale functions, follow this procedure: 1.
© Natio nal In strume nts Corp oration C-1 NI- DAQ FR M for PC C omp atibl es Appendix C NI-DAQ Function Support This appendix contains tables that show wh ich D A Q hardware each NI-D A Q function call supp orts. The NI-D A Q functions are listed in alphabetical order .
Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-2 © Natio nal In strume nts Corp oratio n AI_VRead ✓✓✓✓ AI_VRead_Scan ✓✓✓ AI_VScale ✓✓✓✓ Align_DMA_Buffer AO_C.
Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-3 NI- DAQ FR M for PC C omp atibl es CTR_State ✓ CTR_Stop ✓ DAQ_Check ✓✓✓✓ DAQ_Clear ✓✓✓✓ DAQ_Config .
Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-4 © Natio nal In strume nts Corp oratio n DIG_SCAN_Setup * Get_DAQ_Device_Info ✓✓✓✓ Get_NI_DAQ_Version ✓✓✓✓ GPCTR_Ch.
Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-5 NI- DAQ FR M for PC C omp atibl es Timeout_Config ✓✓✓✓ WFM_Chan_Control ✓ WFM_Check ✓ ✓ ✓ WFM_ClockRate .
Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-6 © Natio nal In strume nts Corp oratio n Table C-2. Lab/516/DA QCard-500/ 700 Fu nction s Fun cti on De vice 516 and LPM Devices DA.
Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-7 NI- DAQ FR M for PC C omp atibl es DAQ_to_Disk ✓✓✓✓ DAQ_VScale ✓✓✓✓ DIG_Block_Check ✓ ✓ DIG_Block_Cl.
Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-8 © Natio nal In strume nts Corp oratio n Timeout_Config ✓✓✓✓ WFM_Chan_Control ✓ †† WFM_Check ✓ †† WFM_ClockRate.
Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-9 NI- DAQ FR M for PC C omp atibl es Table C-3. DSA Device Functions Fun cti on De vice PCI-4451 PCI-4551 PCI-4452 PCI-455.
Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-10 © Natio nal In strume nts Corp oratio n GPCTR_Watch ✓✓✓✓ Init_DA_Brds ✓✓✓✓ SCAN_Demux ✓✓✓✓ SCAN_Op ✓✓.
Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-11 NI-DA Q FRM for PC C omp atibles Table C -4. Analo g Output Fa mily Func tions Fun cti on De vice DA QAr b 5411 Devices.
Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-12 © Natio nal In strume nts Corp oratio n WFM_DB_Config ✓ WFM_DB_HalfReady ✓ WFM_DB_Transfer ✓ WFM_from_Disk ✓ WFM_Group_Control ✓ ✓ WFM_Group_Setup ✓ ✓ WFM_Load ✓ ✓ WFM_Op ✓ WFM_Rate ✓ WFM_Scale ✓ Table C -5.
Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-13 NI-DA Q FRM for PC C omp atibles DIG_Block_PG_Config ✓ ✓ DIG_DB_Config ✓ ✓ DIG_DB_HalfReady ✓ ✓ DIG_DB_Tans.
Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-14 © Natio nal In strume nts Corp oratio n RTSI_DisConn ✓ ✓ Set_DAQ_Device_Info ✓ ✓ ✓ Timeout_Config ✓ ✓ Tabl e C-6.
Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-15 NI-DA Q FRM for PC C omp atibles DIG_Line_Config ✓ DIG_Out_Line ✓ DIG_Out_Port ✓ DIG_Prt_Config ✓ Get_DAQ_Devic.
Appendix C NI-DAQ Function Support NI-DAQ FRM for PC Compatibles C-16 © Natio nal In strume nts Corp oratio n Table C -7. SCXI Func tions Function Module Devi ce SCXI-1100 1102 Seri es SCXI-1120, SCX.
Appendix C NI-DAQ Functi on Support © Natio nal In strume nts Corp oration C-17 NI-DA Q FRM for PC C omp atibles SCXI_Single_Chan_Setup ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ ✓ SCXI_Track_Hold_Control ✓ ✓ ✓ ✓ ✓ ✓ SCXI_Track_Hold_Setup ✓ ✓ ✓ ✓ ✓ ✓ Tabl e C-7.
© Natio nal In strume nts Corp oration D-1 NI-DA Q FRM for PC Com pat ibles Appendix D Customer Communication Fo r your con venience, this app endix contains form s to help you gath er the infor mation necessary to help us solve your technical problems and a f orm you can use to comment on the p roduct document ation.
NI-DAQ FRM for PC Compatibles D-2 © Natio nal In strume nts Corp oratio n Fax-on-Demand Support Fax -on-Demand is a 24- hour informat ion retrie v al system cont aining a librar y of documents on a wide range of tech nical information. Y ou can access F ax-on-Demand from a touch -tone telephone at 512 418 1111.
T echnical Suppor t Form Photocopy this form and u pdate it each time you mak e changes to yo ur software or hardw are, and u se the completed cop y of this form as a reference f o r your current conf iguration.
NI-DAQ for PC Compatibles Hardware and Software Configuration Form Record the settings and re visions of your hard ware and softw are on the line to the right of each item. Complete a ne w copy of this form each tim e yo u re vise your softw are or har dware conf iguration, and use this form as a reference for yo ur current con figuration .
Documentation Comment Form Natio n a l Inst ru m ent s enco u rages y o u t o comme n t o n the d o cume n tati o n s u p plied with o ur p ro d ucts .
© Natio nal In strume nts Corp oration G-1 NI-DA Q FRM for PC Com pat ibles Glossary Pref ix M eanings V alue p- pico 10 –1 2 n- nano- 10 –9 µ- micr o- 10 –6 m- m illi- 10 –3 k- kilo- 10 3 M.
NI-DAQ FRM for PC Compatibles) G-2 © Natio nal In strume nts Corp oratio n Gloss ar y A/D analog-to-digital ADC A/D conve rter ADC resolu tion the resolution of the ADC , which is measured in bits. An ADC wi th 16 bits has a hi gher re s olution, and thu s a h igher degree of accu rac y , than a 12- bit ADC.
© Natio nal In strum ents C orpora tion G-3 NI-DAQ FRM for PC Co mpa tible s) Glossary bu ffer temporary storage for acquired or gen erated data (software) burst-mode a high-speed da ta transfer in w.
NI-DAQ FRM for PC Compatibles) G-4 © Natio nal In strume nts Corp oratio n Gloss ar y DA Q data acquisition—(1) collecting and measuring electri cal signals from sensors, t ransducer s, and test pr.
© Natio nal In strum ents C orpora tion G-5 NI-DAQ FRM for PC Co mpa tible s) Glossary dri vers software that controls a specific hardware de vice such as a D A Q board or a GPIB interf ace board DSP.
NI-DAQ FRM for PC Compatibles) G-6 © Natio nal In strume nts Corp oratio n Gloss ar y handle pointer to a point er to a block of memory; h andles refer ence arrays and strings . An ar r ay of s trings is a han dle to a blo c k of m e mory co ntai ni ng handles to string s.
© Natio nal In strum ents C orpora tion G-7 NI-DAQ FRM for PC Co mpa tible s) Glossary K k kilo—the st andard metr ic pref ix for 1,000, or 10 3 , used with units of measure such as v olts, hertz, .
NI-DAQ FRM for PC Compatibles) G-8 © Natio nal In strume nts Corp oratio n Gloss ar y Mbytes/s a unit for data tr ansfer that means 1 million or 10 6 by te s /s MC Micro Chan ne l memo ry buffer S ee buf fer .
© Natio nal In strum ents C orpora tion G-9 NI-DAQ FRM for PC Co mpa tible s) Glossary nonreferen ced signal sources signal sources with v oltage signals that are not con nected to an absolute referenc e or system g round. Als o called floating signal s ources.
NI-DAQ FRM for PC Compatibles) G-10 © Natio nal In strume nts Corp oratio n Gloss ar y PCMCIA an exp ansion bus architecture that has fou nd widespread acceptance as a de facto standard in notebook-size computers. I t originated as a specif ication for add-on memory cards written b y the Personal Computer Memory Card International Asso ciation.
© National In strume nts Corpora tion G-11 NI-DAQ FR M for PC Compatib les) Glossary S s secon ds S samples sample counter the clock th at counts th e output of the channel clo ck, in other words, th e number of samples take n. On boards with sim ultaneous sampling, t his counter counts the output of the scan clock and hence the number of scans.
NI-DAQ FRM for PC Compatibles) G-12 © Natio nal In strume nts Corp oratio n Gloss ar y SS simultaneous sampling—a property of a system in which each inpu t or output channel is di gitized or update.
© National In strume nts Corpora tion G-13 NI-DAQ FR M for PC Compatib les) Glossary V V volts W wa veform m ulti ple voltage readings taken at a specific sampling rate WF waveform wire data path between no des word the standard number of bits that a processor or m emory manipulates at one time.
© Natio nal In strume nts Corp oration I-1 NI -DAQ FR M fo r PC Comp atib les Index Numbers 8253 cou nter (ICTR) f unctions. See counter/ timer function s.
Index NI-DAQ FRM for PC Compatibles I-2 © Natio nal In strume nts Corp oratio n SCAN_Sequence_Demux, 2-300 to 2-3 02 SCAN_Sequence_Retriev e, 2-303 SCAN_Sequence_ Setup, 2-30 4 to 2-306 SCAN_S etup, .
Inde x © Natio nal In strume nts Corp oration I-3 NI -DAQ FR M fo r PC Comp atib les semi-period measurement application, 2-239 to 2-2 40 signals on separate gates ap p lication, 2-242 to 2-2 44 bu l.
Index NI-DAQ FRM for PC Compatibles I-4 © Natio nal In strume nts Corp oratio n DIG_T rigger_Conf ig, 2-192 to 2-194 GPCTR_Conf ig_Buf fer , 2-20 9 to 2-210 ICTR_S etu p, 2-2 51 to 2-254 LabW indo ws.
Inde x © Natio nal In strume nts Corp oration I-5 NI -DAQ FR M fo r PC Comp atib les counting and time measurem ent applications. See also bu f fered counting and t ime measurement.
Index NI-DAQ FRM for PC Compatibles I-6 © Natio nal In strume nts Corp oratio n DIG_Block_Clear , 2-148 DIG_Block _In, 2-149 to 2-151 DIG_Block_Out, 2-15 2 to 2-153 DIG_Block _PG_Conf ig, 2-154 to 2-.
Inde x © Natio nal In strume nts Corp oration I-7 NI -DAQ FR M fo r PC Comp atib les definition , 1-1 4 LabW indows function panel tree, 1-12 F fax and telepho ne support, D-2 Fax -on-Demand su pport.
Index NI-DAQ FRM for PC Compatibles I-8 © Natio nal In strume nts Corp oratio n ND_SIMPLE_EVENT_CNT application, 2-217 to 2-2 18 ND_SINGLE_PERIOD_MSR applicat io n, 2-21 8 to 2-220 ND_SINGLE_PULSE_GN.
Inde x © Natio nal In strume nts Corp oration I-9 NI -DAQ FR M fo r PC Comp atib les conf iguration and calibr ation functions, 1-6 counter /timer fun ctions, 1- 11 to 1-12 D A Q-STC counter s (GPCTR.
Index NI-DAQ FRM for PC Compatibles I-10 © Natio nal In strume nts Corp oratio n N NI-D A Q constants include fil e, Micros oft V isual Basic for W indo ws, 1-5 O offset an d gai n a djus tme nt gain.
Inde x © Natio nal In strume nts Corp oration I-11 NI-DA Q FRM for PC Com pat ibles SCAN_Sequence_Setup function, 2-304 to 2-3 06 SCAN_Setup fu nction, 2-307 to 2-308 SCAN_Start function , 2-309 to 2.
Index NI-DAQ FRM for PC Compatibles I-12 © Natio nal In strume nts Corp oratio n ND_IN_SCAN_ST AR T signal definition (table) , 2-3 74 purpos e and use, 2- 376 to 2-377 ND_IN_ST AR T_TRIGGER signal d.
Inde x © Natio nal In strume nts Corp oration I-13 NI-DA Q FRM for PC Com pat ibles square wa ve generation timing con siderations, 2-112 status codes, 1-1 t o 1-2 for mat , 1- 1 status values (table.
Index NI-DAQ FRM for PC Compatibles I-14 © Natio nal In strume nts Corp oratio n ARB mode, 2-431 to 2-432 data ranges for b uf fer parameter , D A QArb 5411 de vices (ta ble), 2-42 6 DDS m ode, 2-430.
Un point important après l'achat de l'appareil (ou même avant l'achat) est de lire le manuel d'utilisation. Nous devons le faire pour quelques raisons simples:
Si vous n'avez pas encore acheté National Instruments 321645c-01 c'est un bon moment pour vous familiariser avec les données de base sur le produit. Consulter d'abord les pages initiales du manuel d'utilisation, que vous trouverez ci-dessus. Vous devriez y trouver les données techniques les plus importants du National Instruments 321645c-01 - de cette manière, vous pouvez vérifier si l'équipement répond à vos besoins. Explorant les pages suivantes du manuel d'utilisation National Instruments 321645c-01, vous apprendrez toutes les caractéristiques du produit et des informations sur son fonctionnement. Les informations sur le National Instruments 321645c-01 va certainement vous aider à prendre une décision concernant l'achat.
Dans une situation où vous avez déjà le National Instruments 321645c-01, mais vous avez pas encore lu le manuel d'utilisation, vous devez le faire pour les raisons décrites ci-dessus,. Vous saurez alors si vous avez correctement utilisé les fonctions disponibles, et si vous avez commis des erreurs qui peuvent réduire la durée de vie du National Instruments 321645c-01.
Cependant, l'un des rôles les plus importants pour l'utilisateur joués par les manuels d'utilisateur est d'aider à résoudre les problèmes concernant le National Instruments 321645c-01. Presque toujours, vous y trouverez Troubleshooting, soit les pannes et les défaillances les plus fréquentes de l'apparei National Instruments 321645c-01 ainsi que les instructions sur la façon de les résoudre. Même si vous ne parvenez pas à résoudre le problème, le manuel d‘utilisation va vous montrer le chemin d'une nouvelle procédure – le contact avec le centre de service à la clientèle ou le service le plus proche.