DAQ NI-DAQ™ User Manual for PC Compatibles Version 6.
Worldwide Technical Support and Product Information ni.
Important Information Warranty The media on which you receive National Instruments software are warranted not to fail to execute programming instructions, due to defects in materials and workmanship, for a period of 90 days from date of shipment, as evidenced by receipts or other documentation. National Instruments will, at its option, repair or replace software media that do not execute programming instructions if National Instruments receives notice of such defects during the warranty period.
Contents About This Manual How to Use the NI-DAQ Documentation Set ...............................................................ix Conventions Used in This Manual.................................................................................ix MIO and AI Device Terminology ...................................................................xiii Chapter 1 Introduction to NI-DAQ About the NI-DAQ Software for PC Compatibles ........................................................
Contents Chapter 3 Software Overview Initialization and General-Configuration Functions...................................................... 3-2 Software-Calibration and Device-Specific Functions ................................................... 3-3 Event Message Functions .............................................................................................. 3-5 Event Messaging Application Tips .................................................................
Contents Digital I/O Application Tips............................................................................3-62 Handshaking Versus No-Handshaking Digital I/O...........................3-63 Digital Port I/O Applications ............................................................3-63 Digital Line I/O Applications..........................................................................3-65 Digital Group I/O Applications .......................................................................
Contents Chapter 4 NI-DAQ Double Buffering Overview ....................................................................................................................... 4-1 Single-Buffered Versus Double-Buffered Data ............................................................ 4-1 Double-Buffered Input Operations................................................................................ 4-2 Potential Setbacks ..........................................................................................
About This Manual The NI-DAQ User Manual for PC Compatibles is for users of the NI-DAQ software for PC compatibles version 6.9. NI-DAQ software is a powerful application programming interface (API) between your data acquisition (DAQ) application and the National Instruments DAQ devices. Source code for several example applications is included in this manual. How to Use the NI-DAQ Documentation Set Begin by reading the NI-DAQ release notes and this manual.
About This Manual 1200 and 1200AI device Refers to the DAQCard-1200, DAQPad-1200, Lab-PC-1200, Lab-PC-1200AI, PCI-1200, and SCXI-1200. 1394 Refers to a high-speed external bus that implements the IEEE 1394 serial bus protocol. 16-bit device These MIO and AI devices are listed in Table 1. 44XX device Refers to the NI 4451 for PCI, NI 4452 for PCI, NI 4454 for PCI, and NI 4472 for PXI/CompactPCI. 45XX device Refers to the NI 4551 for PCI and NI 4552 for PCI.
About This Manual DIO device Refers to any DIO-24, DIO-32, DIO-6533, or DIO-96. DIO-24 Refers to the PC-DIO-24, PC-DIO-24PnP, DAQCard-DIO-24, PCI-6503. DIO-32F Refers to the AT-DIO-32F. DIO-96 Refers to the PC-DIO-96, PC-DIO-96PnP, PCI-DIO-96, DAQPad-6507, DAQPad-6508, and PXI-6508. DSA device Refers to the NI 4451 for PCI, NI 4452 for PCI, NI 4454 for PCI, NI 4551 for PCI, NI 4552 for PCI, and NI 4472 for PXI/CompactPCI dynamic signal acquisition devices.
About This Manual monospace italic Italic text in this font denotes text that is a placeholder for a word or value that you must supply. NI-DAQ Refers to the NI-DAQ software for PC compatibles, unless otherwise noted. NI-TIO based device Refers to the NI 4551, NI 4552, DAQCard-6601, PCI-6601, PCI-6602, PXI-6602, PCI-6608, PXI-6608. PC Refers to the IBM PC/XT, IBM PC AT, and compatible computers.
About This Manual track-and-hold module Refers to the SCXI-1140, SCXI-1520, SCXI-1530, and SCXI-1531. VXI-MIO device Refers to the VXI-MIO-64E-1 and VXI-MIO-64XE-10. VXI-SC-1102/B/C Refers to the VXI-SC-1102, VXI-SC-1102B, and VXI-SC-1102C. MIO and AI Device Terminology This manual uses generic terms to describe groups of devices whenever possible. The generic terms for the MIO and AI devices are based on the number of bits, the platform, and the functionality.
About This Manual Table 1.
About This Manual Table 1.
1 Introduction to NI-DAQ This chapter describes how to set up your DAQ system and configure your DAQ devices. About the NI-DAQ Software for PC Compatibles Thank you for buying a National Instruments DAQ device, which includes NI-DAQ software for PC compatibles. NI-DAQ is a set of functions that control all of the National Instruments plug-in DAQ devices for analog I/O, digital I/O, timing I/O, SCXI signal conditioning, and RTSI multiboard synchronization.
Chapter 1 Introduction to NI-DAQ NI-DAQ can send event-driven messages to Windows or Windows NT applications each time a user-specified event occurs. Thus, polling is eliminated and you can develop event-driven DAQ applications.
Chapter 1 Introduction to NI-DAQ Install your software and hardware according to the instructions in the DAQ Quick Start Guide and, if appicable, the SCXI Quick Start Guide. Yes Are you using LabVIEW? Read the LabVIEW Measurements Manual. You no longer need the NI-DAQ document set.
Chapter 1 Introduction to NI-DAQ NI-DAQ Hardware Support National Instruments periodically upgrades NI-DAQ to add support for new DAQ hardware. To ensure that this version of NI-DAQ supports your hardware, consult Tables 1-1 through 1-5. Table 1-1. NI-DAQ Version 6.
Chapter 1 Introduction to NI-DAQ Table 1-3. NI-DAQ Version 6.9 Plug-in Device Support for PXI Buses PXI NI 4472 for PXI/CompactPCI PXI-6035E PXI-6527 NI 6222 for PXI PXI-6040E PXI-6533 PXI-6023E PXI-6052E PXI-6534 PXI-6024E PXI-6070E PXI-6602 PXI-6025E PXI-6071E PXI-6608 PXI-6030E PXI-6115 PXI-6703 PXI-6031E PXI-6120 PXI-6704 PXI-6034E PXI-6508 Table 1-4. NI-DAQ Version 6.
Chapter 1 Introduction to NI-DAQ Table 1-5. NI-DAQ Version 6.
Chapter 1 Introduction to NI-DAQ NI-DAQ Language Support NI-DAQ supplies header files, examples, and instructions on how to use an Integrated Development Environment (IDE) for one of the following languages under Windows 2000/NT/98/95: • Microsoft Visual C++ 4.X, 5.0, or 6.0 • Visual Basic 4.0 (32-bit), 5.0, or 6.0 • Borland C++ 5.X NI-DAQ also provides an NI-DAQ function prototype file for use with Borland Delphi 2 (32-bit), 3, and 4. Most of the files on the release media are compressed.
Fundamentals of Building Windows Applications 2 This chapter describes the fundamentals of creating NI-DAQ applications in Windows 2000/NT/98/95.
Chapter 2 Fundamentals of Building Windows Applications Creating a Windows Application Using Microsoft Visual C++ This section assumes that you will be using the Microsoft Visual C++ Integrated Development Environment (IDE) to manage your code development, and that you are familiar with the IDE. Developing an NI-DAQ Application To develop an NI-DAQ application, follow these general steps: 1. Open an existing or new Visual C++ project to manage your application code. 2. Create files of type .
Chapter 2 Fundamentals of Building Windows Applications Refer to the NI-DAQ Examples Help (Start»Programs»National Instruments DAQ»NI-DAQ Examples Help) for additional information regarding NI-DAQ examples. Special Considerations Buffer Allocation To allocate memory, you can use the Windows API function GlobalAlloc(). After allocation, lock memory with GlobalLock() to use a buffer of memory.
Chapter 2 Fundamentals of Building Windows Applications Creating a Windows Application Using Microsoft Visual Basic This section assumes that you will be using the Microsoft Visual Basic IDE to manage your code development, and that you are familiar with the IDE. Developing an NI-DAQ Application To develop an NI-DAQ application, follow these general steps: 1. Open an existing or new Visual Basic project to manage your application code. 2. Create files of type.
Chapter 2 Fundamentals of Building Windows Applications Example Programs You can find some example programs and project files in .\Examples\VBasic directory under your NI-DAQ directory. To load an example program, use one of the Visual Basic project files with the.vbp extension. These are Visual Basic 4.0 projects, which you can open only with Visual Basic 4.0 or later. To load an example project with Visual Basic 4.0 or later, select the menu option File»Open Project, then select the.
Chapter 2 Fundamentals of Building Windows Applications The following paragraph illustrates declarations of functions. For Visual Basic 4.
Chapter 2 Fundamentals of Building Windows Applications Creating a Windows Application Using Borland C++ This section assumes that you will be using the Borland C++ IDE to manage your code development, and that you are familiar with the IDE. Developing an NI-DAQ Application To develop an NI-DAQ application, follow these general steps: 1. Open an existing or new Borland C++ project to manage your application code. 2. Create files of type.c (C source code) or.
Chapter 2 Fundamentals of Building Windows Applications Change the right hand side of the equal sign to indicate your Borland C++ IDE directory. For help on the usage of the batch file, type /? from a DOS prompt, where is the file name of batch file you want to run (for example, AIonePoint.bat). To create your own example project with Borland C++ 5.0 or later using the provided example files, follow the steps mentioned above in Developing an NI-DAQ Application.
Chapter 2 Fundamentals of Building Windows Applications NI-DAQ Examples The NI-DAQ installer installs a suite of concisely written examples in the following application development environments: • LabWindows/CVI 5.0.x • Microsoft Visual C++ 2.x (32-bit) or later • Microsoft Visual Basic 4.0 (32-bit) or later • Borland C++ 5.0 These examples illustrate how to use NI-DAQ functions to perform a single task.
Chapter 2 Fundamentals of Building Windows Applications The project files have the same file name (not including extension) as the source code files. The following types are installed: • LabWindows/CVI: .prj (project file), .c (source file) • Visual C++: .mak (generic make file), .c (source file) • Visual Basic: .vbp (project file, for Visual Basic 4.0 [32-bit] or later), .frm (form module) • Borland C++: .bat (Batchfile), .
3 Software Overview This chapter describes the function classes in NI-DAQ and briefly describes each function.
Chapter 3 Software Overview • RTSI bus trigger • SCXI • Transducer conversion Initialization and General-Configuration Functions Use these general functions for initializing and configuring your hardware and software. Refer to the NI-DAQ Function Reference Online Help file to determine which functions your device supports. Align_DMA_Buffer Aligns the data in a DMA buffer to avoid crossing a physical page boundary.
Chapter 3 Software Overview Set_DAQ_Device_Info Selects parameters pertaining to the device operation. Timeout_Config Establishes a timeout limit that is used by the synchronous functions to ensure that these functions eventually return control to your application. Examples of synchronous functions are DAQ_Op, DAQ_DB_Transfer, and WFM_from_Disk.
Chapter 3 Software Overview NI-DAQ automatically loads the calibration constants stored in EEPROM user area 5 the first time you call a function pertaining to the device. Calibrate_TIO Use the function to calibrate the crystal oscillator on your timing I/O 660X device. Calibrate_DSA Use this function to calibrate your DSA device. Calibrate_E_Series Use this function to calibrate your E Series device or 671X device and to select a set of calibration constants for NI-DAQ to use.
Chapter 3 Software Overview Event Message Functions NI-DAQ Event Message functions are an efficient way to monitor your background data acquisition processes, without dedicating your foreground process for status checking. The NI-DAQ Event Message dispatcher notifies your application when a user-specified DAQ event occurs. Using event messaging eliminates continuous polling of data acquisition processes. Config_Alarm_Deadband Specify alarm on/off condition for data acquisition event messaging.
Chapter 3 Software Overview After your application receives an event message, it can carry out the appropriate task, such as updating the screen or saving data to disk. To restart your data acquisition process after it completes, you do not need to call the message configuration calls again. They remain defined as long as your application does not explicitly remove them or call Init_DA_Brds. To add or remove a message, first clear your data acquisition process.
Chapter 3 Software Overview These three ActiveX controls actually call the NI-DAQ Config_DAQ_Event_Message, Config_ATrig_Event_Message and Config_Alarm_Deadband functions. Visual Basic applications cannot receive Windows messages, but if you use NI-DAQ ActiveX controls shown previously in this section, your Visual Basic application can receive NI-DAQ messages. Note You can use the OCXs in Visual Basic, version 4.0 (32-bit) or later.
Chapter 3 Software Overview Table 3-1. General DAQ Event Control Properties (Continued) Property Allowed Property Values PreTrigScans Long PostTrigScans Long Index N/A Tag N/A Enabled 0—False (default) 1—True Some General DAQ Events can be implemented only by a select group of National Instruments DAQ devices. Also, some General DAQ Events require that you set the asynchronous data acquisition or generation operation to use interrupts.
Chapter 3 Software Overview 4. Start an asynchronous data acquisition or generation operation. 5. When the selected event occurs, the GeneralDAQEventn_Fire procedure is called. You can perform the necessary event processing within this procedure, such as updating a global count variable, or toggling digital I/O lines.
Chapter 3 Software Overview Table 3-2. Analog Trigger Event Control Properties (Continued) Property Allowed Property Values Index N/A Tag N/A Enabled 0—False (default) 1—True The Analog Trigger Event requires that you set the asynchronous data acquisition operation to use interrupts. For more information on Analog Trigger Events, refer to the descriptions for the Config_ATrig_Event_Message function in the NI-DAQ Function Reference Online Help file.
Chapter 3 Software Overview The AnalogTriggerEventn_Fire procedure is prototyped as follows: Sub AnalogTriggerEventn_Fire (DoneFlag As Integer, Scans As Long) The parameter DoneFlag equals 1 if the acquisition was over when the Analog Trigger Event fired. Otherwise, it is 0. Scans equals the number of the scan that caused the Analog Trigger Event to fire. Analog Alarm Event Use the Analog Alarm Event control to configure and enable an analog trigger.
Chapter 3 Software Overview Each of these properties should be set as follows: AnalogAlarmEventn.property name = property value For instance, to set the ChanStr property to Analog Input channel 0 for Analog Alarm Event 1: AnalogAlarmEvent1.ChanStr = "AI0" Set up your program flow like this: 1. Set the properties of the Analog Alarm Event control. Next configure the acquisition or generation operations using the appropriate NI-DAQ functions. 2.
Chapter 3 Software Overview The parameter DoneFlag equals 1 if the acquisition was over when the Analog Alarm Event fired. Otherwise, it is 0. Scans equals the number of the scan that caused the Analog Alarm Event to fire. Using Multiple Controls In general, a program might contain any number of General DAQ Event, Analog Trigger Event, and Analog Alarm Event controls.
Chapter 3 Software Overview 2. To place the GeneralDAQEvent control into your form, go to the tool box window and select the GeneralDAQEvent tool, labelled DAQ EVENT. 3. Click somewhere on the form, and while holding down the mouse button, drag the mouse to place the control onto the form. You will see a small icon, which does not appear in run time. 4.
Chapter 3 7. Software Overview Go to the code window, pull down on the Object combo box, and select GeneralDAQEvent1. The only Proc for this control object is Fire. Within the subroutine, enter the following code: If (DoneFlag% <> 1) Then Text1.Text = Str$(Scans&)+"scans have been acquired." Else Text1.Text = "Acquisition is complete!" er% = DAQ_Clear(1) End If 8. Make sure that you stop any ongoing acquisition when you stop the program.
Chapter 3 Software Overview One-Shot Analog Input Functions Single-Channel Analog Input Functions Use the single-channel Analog Input functions for analog input on the 516 devices, DAQCard-700, analog input Lab and 1200 devices, MIO and AI devices, and LPM devices. Refer to the NI-DAQ Function Reference Online Help file to determine which functions your device supports. AI_Check Returns the status of the analog input circuitry and an analog input reading if one is available.
Chapter 3 Software Overview AI_Mux_Config Configures the number of multiplexer (AMUX-64T) devices connected to an MIO and AI device and informs NI-DAQ if any AMUX-64T devices are attached to the system. This function applies only to the MIO and AI devices. AI_Read Reads an analog input channel (initiates an A/D conversion on an analog input channel) and returns the unscaled result. AI_Read_Scan Returns readings for all analog input channels selected by Scan_Setup.
Chapter 3 Software Overview detrimental to your applications. Use AI_VScale to convert the binary values to voltages at a later time if you want. See Figure 3-1 for the function flow typical of single-point data acquisition. Also, refer to the NI-DAQ Examples Online Help file (nidaqex.hlp) to find a related example.
Chapter 3 Software Overview When accurate sample timing is important, you can use external conversion pulses with AI_Clear, AI_Setup, and AI_Check to sample your signal on the analog input channels. See Figure 3-2 for the function flow typical of single-point data acquisition using external conversion pulses. However, this method works only if your computer is faster than the rate of conversion pulses.
Chapter 3 Software Overview Data Acquisition Functions High-Level Data Acquisition Functions These high-level data acquisition functions are synchronous calls that acquire data and return when data acquisition is complete. Refer to the NI-DAQ Function Reference Online Help file to determine which functions your device supports. DAQ_Op Performs a synchronous, single-channel data acquisition operation. DAQ_Op does not return until NI-DAQ has acquired all the data or an acquisition error has occurred.
Chapter 3 Software Overview SCAN_Op Performs a synchronous, multiple-channel scanned data acquisition operation. SCAN_Op does not return until NI-DAQ has acquired all the data or an acquisition error has occurred. SCAN_to_Disk Performs a synchronous, multiple-channel scanned data acquisition operation and simultaneously saves the acquired data in a disk file. SCAN_to_Disk does not return until NI-DAQ has acquired all the data and saved it or until an acquisition error has occurred.
Chapter 3 Software Overview DAQ_Rate Converts a data acquisition rate into the timebase and sample-interval values needed to produce the rate you want. DAQ_Set_Clock Sets the scan rate for a group of channels. DAQ_Start Initiates an asynchronous, single-channel data acquisition operation and stores its input in an array.
Chapter 3 Software Overview from each channel is stored in adjacent elements of your buffer. SCAN_Sequence_Retrieve Returns the scan sequence created by NI-DAQ as a result of a previous call to SCAN_Sequence_Setup. SCAN_Sequence_Setup Initializes the device for a multirate scanned data acquisition operation. Initialization includes selecting the channels to be scanned, assigning gains to these channels, and assigning different sampling rates to each channel by dividing down the base scan rate.
Chapter 3 Software Overview DAQ_DB_HalfReady Checks if the next half buffer of data is available during a double-buffered data acquisition. DAQ_DB_Transfer Transfers half of the data from the buffer being used for double-buffered data acquisition to another buffer, which is passed to the function. This function waits until the data to be transferred is available before returning. You can execute DAQ_DB_Transfer repeatedly to return sequential half buffers of the data.
Chapter 3 Software Overview DAQCard-500/700, 516 Device, and LPM Device Counter/Timer Signals For these devices, counter 0 produces the sample interval for data acquisition timing. If data acquisition is not in progress, you can call the ICTR functions to use counter 0 as a general-purpose counter. Because the CLOCK0 input is connected to a 1 MHz oscillator, the timebase for counter 0 is fixed.
Chapter 3 Software Overview When using SCXI analog input modules, use the SCXI functions to set up the SCXI chassis and modules before using the AI, DAQ, SCAN, and Lab_ISCAN functions shown in the following flowcharts. Building Block 1: Configuration Five configuration functions are available for creating the first building block, as shown in Figure 3-4. However, you do not have to call all five functions every time you start a data acquisition.
Chapter 3 Software Overview Building Block 2: Start NI-DAQ has high-level and low-level start functions.
Chapter 3 Software Overview Asynchronous start functions include DAQ_Start, SCAN_Start, and Lab_ISCAN_Start. Figures 3-6 and 3-7 show how the start calls make up building block 2 for different devices. Convert sampling rate to sample timebase and sample interval. DAQ_Rate Yes Select channels and their gain for multiple-channel scanning. Sample multiple channels? SCAN_Setup No Initiate single-channel data acquisition. Initiate multiple-channel data acquisition. DAQ_Start SCAN_Start Figure 3-6.
Chapter 3 Software Overview Convert sampling rate to sample timebase and sample interval. DAQ_Rate Yes Sample multiple channels? Initiate multiple-channel data acquisition. No Initiate single-channel data acquisition. DAQ_Start Lab_ISCAN_Start Figure 3-7.
Chapter 3 Software Overview Building Block 3: Checking DAQ_Check and Lab_ISCAN_Check, shown in Figures 3-8 and 3-9, are simple and quick ways to check the ongoing data acquisition process. This call is often put in a while loop so that the application can periodically monitor the data acquisition process. Check ongoing single or multiple-channel data acquisition status. DAQ_Check No Data Acquisition complete? Yes Figure 3-8.
Chapter 3 Software Overview However, if the information provided by DAQ_Check is not sufficient, DAQ_Monitor or the double-buffered functions might be a better choice. With DAQ_Monitor, not only can you monitor the data acquisition process, but you can also retrieve a portion of the acquired data. With the double-buffered functions, you can retrieve half of the data buffer at a time. Double-buffered functions are very useful when your application has a real-time strip chart displaying the incoming data.
Chapter 3 Software Overview Check for next half buffer availability. DAQ_DB_HalfReady No Next half buffer ready for transfer? Retrieve half of the data in Yes the data acquisition buffer. DAQ_DB_Transfer No Data acquisition complete? Yes Figure 3-10. Double-Buffered Data Acquisition Application Building Block 3, Checking Multirate Scanning Use multirate scanning to scan multiple channels at different scan rates and acquire the minimum amount of data necessary for your application.
Chapter 3 Software Overview NI-DAQ includes three functions for multirate scanning: • SCAN_Sequence_Setup • SCAN_Sequence_Retrieve • SCAN_Sequence_Demux Use SCAN_Sequence_Setup to identify the channels to scan, their gains, and their scan rate divisors. After the data is acquired, use SCAN_Sequence_Retrieve and SCAN_Sequence_Demux to arrange the data into a more convenient format. Figure 3-11 shows how to use the multirate scanning functions in conjunction with other NI-DAQ functions.
Chapter 3 Software Overview Convert sampling rate to sample timebase and sample interval; convert scan rate to scan timebase and scan interval. DAQ_Rate Select channels and their gains and scan rate divisors. SCAN_Sequence_Setup Allocate your buffer using the values returned by SCAN_Sequence_Setup in the scansPerSequence and samplesPerSequence output variables. Retrieve the scan sequence vector for use in the SCAN_Sequence_Demux function.
Chapter 3 Software Overview Analog Output Function Group The Analog Output function group contains two sets of functions—the Analog Output (AO) functions, which perform single D/A conversions, and the Waveform (WFM) functions, which perform buffered D/A conversions. Use the SCXI functions described later in this chapter for the SCXI-1124 analog output module. Note One-Shot Analog Output Functions Use the Analog Output functions to perform single D/A conversions with analog output devices.
Chapter 3 Software Overview AO_VScale Scales a voltage to a binary value that, when written to one of the analog output channels, produces the specified voltage. AO_VWrite Accepts a floating-point voltage value, scales it to the proper binary number, and writes that number to an analog output channel to change the output voltage. AO_Write Writes a binary value to one of the analog output channels, changing the voltage produced at the channel.
Chapter 3 Software Overview Simple Analog Output Application Figure 3-13 illustrates the basic series of calls for a simple analog output application. Account for any changes in the jumper settings. Enable external update pulses? AO_Configure Output voltage to board. AO_VWrite No Done outputting data? Yes Figure 3-13. Simple Analog Output Application The call to AO_Configure in Figure 3-13 must be made only if you have changed the jumper settings of an MIO, AT-AO-6/10, or Lab-PC+ device.
Chapter 3 Software Overview Account for changes in the jumper settings. Enable software voltage update. AO_Configure Output voltage to board. AO_VWrite Wait until you are ready to output voltage. No Update? Yes Output voltage from board. AO_Update No Done outputting data? Yes Figure 3-14. Analog Output with Software Updates The first modification you make is to enable later internal updates when you call AO_Configure.
Chapter 3 Software Overview Waveform Generation Functions Use the Waveform Generation (WFM) functions to perform buffered analog output operations with the MIO devices, 671X devices, AT-AO-6/10 devices, and Lab and 1200 analog output devices. Refer to the NI-DAQ Function Reference Online Help file to determine which functions your device supports.
Chapter 3 Software Overview WFM_DB_Config Enables and disables the double-buffered mode of waveform generation. WFM_DB_HalfReady Checks if the next half buffer for one or more channels is available for new data during a double-buffered waveform generation operation. You can use WFM_DB_HalfReady to avoid the waiting period possible with the double-buffered transfer functions.
Chapter 3 Software Overview WFM_Scale Translates an array of floating-point values that represent voltages into an array of binary values that produce those voltages. The function uses the current analog output configuration settings to perform the conversions. WFM_Set_Clock Sets an update rate for a group of channels. Waveform Generation Application Tips This section outlines a basic explanation of constructing an application with the Waveform Generation functions.
Chapter 3 Software Overview 3. WFM_Rate to convert a data output rate to a timebase and an update interval that generates the rate you want. WFM_Rate only supports some devices. Because it does not have a device number parameter, it cannot return an error if you use it with a non-supported device. See the NI-DAQ Function Reference Online Help file for supported devices. 4.
Chapter 3 Software Overview Convert floating-point voltages to binary values. WFM_Scale Assign channels to the waveform generation group. Load waveform buffer, specify iterations, and start waveform. WFM_Group_Setup WFM_Op Load waveform buffer and specify iterations. If iterations > 0, the waveform generation is complete. WFM_Load Convert output rate to timebase and interval. Iterations > 0 Yes WFM_Rate No Set the update rate. WFM_ClockRate or WFM_Set_Clock Start background waveform generation.
Chapter 3 Software Overview Basic Waveform Generation with Pauses The application skeleton described in this section is nearly identical to the basic waveform generation application skeleton. The difference is that the description in this section includes the pause and resume operations. Figure 3-16 illustrates the ordinary series of calls for a basic waveform application with pauses. The first step of Figure 3-16 calls WFM_Group_Setup.
Chapter 3 Software Overview Resume the waveform generation by calling WFM_Group_Control (operation=RESUME). RESUME restarts the waveform generation at the data point where it was paused. The output rate and the data buffer are unchanged. The final step is to call WFM_Group_Control (operation=CLEAR). CLEAR performs all the necessary cleanup work after a waveform generation. Additionally, CLEAR halts any ongoing waveform generation.
Chapter 3 Software Overview Assign channels to waveform generation group. WFM_Group_Setup Convert floating-point voltages to binary values. WFM_Scale Load waveform buffer and specify iterations. WFM_Load Convert output rate to timebase and interval. WFM_Rate Set the update and delay rates. WFM_ClockRate Start background waveform generation. WFM_Group_Control (operation = START) Should you pause waveform generation? Yes Pause wave? No Start waveform generation where it was paused.
Chapter 3 Software Overview Double-Buffered Waveform Generation Applications You also can configure waveform generation as a double-buffered operation. Double-buffered operations can perform continuous waveform generation with a limited amount of memory. For an explanation of double buffering, refer to Chapter 4, NI-DAQ Double Buffering. Figure 3-17 outlines the basic steps for double-buffered waveform applications.
Chapter 3 Software Overview The final step is to call WFM_Group_Control (operation=CLEAR). The CLEAR operation performs all of the necessary cleanup work after a waveform generation. Additionally, CLEAR halts any ongoing waveform generation. Enable double buffering. WFM_DB_Config Assign channels to waveform generation group. WFM_Group_Setup Load waveform buffer and specify iterations. WFM_Load Set the update rate. WFM_ClockRate or WFM_Set_Clock Start background waveform generation.
Chapter 3 Software Overview Reference Voltages for Analog Output Devices Table 3-4 shows the output voltages produced when you select unipolar output polarity. Table 3-4.
Chapter 3 Software Overview Table 3-5. Output Voltages with Bipolar Output Polarity (Continued) Value in Waveform Buffer Device AT-AO-6/10 Lab and 1200 devices with analog output –2,048 2,047 –32,768 32,767 Negative of the reference voltage (–10 V in default case) Reference voltage (+10 V in default case) — — –5 V +5 V — — NI 4451 for PCI and NI 4551 for PCI devices use signed, 18-bit binary data left-justified in a 32-bit word. Their output voltage range is ±10 V.
Chapter 3 Software Overview operation. In addition, the data acquisition functions DAQ_Start and Lab_ISCAN_Start cannot use counter B0 if the total sample interval for data acquisition is also greater than 65,535 µs, unless the timebase required for data acquisition is the same as the timebase counter B0 produces for waveform generation.
Chapter 3 Software Overview Three functions are affected by the FIFO lag effect—WFM_Chan_Control, WFM_Check, and double-buffered waveform generation. • WFM_Chan_Control—When you execute operation=PAUSE for a group 1 channel, the effective pause does not occur until the FIFO has finished writing all of the data remaining in the FIFO for the specified channel.
Chapter 3 Software Overview section in the NI-DAQ Function Reference Online Help file to find out which digital functions your device supports. The SCXI functions control the SCXI digital and relay modules. These devices contain a number of digital I/O ports of up to eight digital lines in width. The name port refers to a set of digital lines. Digital lines are also referred to as bits in this text.
Chapter 3 Software Overview Table 3-6. Byte Mapping to Digital I/O Lines (Continued) Bit Number Digital I/O Line Number 2 2 1 1 0 0 Least significant bit (LSB) In the cases where a digital I/O port has fewer than eight lines, the most significant bits in the byte format are ignored. You can configure most of the digital I/O ports as either input ports or output ports.
Chapter 3 Software Overview into an input port. The handshaking mode for the PCI 6115 and the PCI-6120 is slightly different and is more appropriately called a clocking mode. In the clocking mode, no two-way handshaking signals are generated. Instead, data is latched in or latched out when a pulse from a clock signal is detected. Note On the 653X, DIO-32F, PCI-6115, and PCI-6120 devices, you must assign ports to a group before you can use handshaking mode.
Chapter 3 Software Overview certain restrictions on which ports can be assigned to which groups. Refer to Table 3-7 for details. Table 3-7.
Chapter 3 Software Overview immediate digital operations. However, both groups cannot be configured for input or output at the same time. Although a group can consist of non-contiguous lines, there is no logical grouping of the lines, and an 8-bit value is still passed from the input function or returned from the output function. For example, if a group is configured for output with lines 0,1,2,4, and the group is to be written with all ones, the hex value of 0x17 is passed to the function instead of 0xF.
Chapter 3 Software Overview DIG_Out_Prt Writes digital output data to the specified digital port. DIG_Prt_Config Configures the specified port for direction (input or output). DIG_Prt_Status Returns a status word indicating the handshake status of the specified port. Group Digital I/O Functions The Group Digital I/O (DIG_Block, DIG_Grp, and DIG_SCAN) functions perform handshaked I/O on groups of ports.
Chapter 3 Software Overview DIG_Out_Grp Writes digital output data to the specified digital group. DIG_SCAN_Setup Configures the specified group for port assignment, direction (input or output), and size. DIG_Trigger_Config Enables or disables the trigger mode of buffered digital I/O to indicate when to start and stop the data acquisition. Double-Buffered Digital I/O Functions The double-buffered digital I/O (DIG_DB) functions perform double-buffered operations during Group Digital I/O operations.
Chapter 3 Software Overview Digital Change Notification Functions The Digital Change Notification functions provide messaging for lines and ports on the 652X devices. For other boards such as the DIO-24, the Config_DAQ_Event_Message function handles event messaging. DIG_Change_Message_Config Configures 652X devices to detect rising or falling edges on input lines and to notify you by generating a message.
Chapter 3 Software Overview Digital Change Detection Applications with 653X Devices For change detection on the 653X, see the DIG_Block_PG_Config function in the function reference. For message generation on the 653X and many other devices, see the Config_DAQ_Event_Message function in the function reference.
Chapter 3 Software Overview F Enable filtering? DIG_Filter_Config (Optional on 652X devices) Configure ports for input Configure lines for input DIG_Prt_Config DIG_Line_Config DIG_In_Prt DIG_In_Line No Done? Yes Figure 3-19. Basic Digital Filtering of Input Data Application The first step is to call DIG_Filter_Config, which enables filtering on the specified lines. Next, you can configure either the ports or the lines.
Chapter 3 Software Overview Handshaking Versus No-Handshaking Digital I/O Digital ports can output or input digital data in two ways. The first is to immediately read or write data to or from the port. This type of digital I/O is called no-handshaking mode. The second method is to coordinate digital data transfers with another digital port. The second method is called digital I/O with handshaking.
Chapter 3 Software Overview Configure ports for input or output. Enable optional handshaking? DIG_Prt_Config Check for port ready if handshaking is enabled. Not Ready DIG_Prt_Status Ready Input data from port. Output data to port. DIG_In_Prt DIG_Out_Prt No Done? Yes Figure 3-20. Basic Port Input or Output Application with Handshaking DIG_Prt_Config Input data from port. Output data to port. DIG_In_Prt DIG_Out_Prt No Done? Yes Figure 3-21.
Chapter 3 Software Overview The first step is to call DIG_Prt_Config, with which you configure the individual digital ports for input or output and enable handshaking. If handshaking is disabled, do not check the port status (step 2 of Figure 3-21). If handshaking is enabled, call DIG_PRT_Status to determine if an output port is ready to output a new data point, or if an input port has latched new data. The third step is to input or output the data point. Call DIG_In_Prt to read data from an input port.
Chapter 3 Software Overview Figure 3-22 is a flowchart outlining the basic line I/O application. TIO, DSA, 62XX, 652X, PCI/PXI–6703/6704, DIO 6533 (DIO-32HS), VXI-AO-48XDC, or E Series device? No Yes Configure lines for input or output. DIG_Prt_Config DIG_Line_Config Input data from line. Output data to line. DIG_In_Line No Configure ports for input or output. DIG_Out_Line Done? Yes Figure 3-22. Basic Line Input or Output Application First, configure the digital lines for input or output.
Chapter 3 Software Overview Digital Group I/O Applications Digital group I/O applications use one or more digital ports as a single group to input or output digital information, except for the PCI-6115 and the PCI-6120, which can create groups smaller than the port size for digital operations. Figure 3-23 is a flowchart for group digital applications that input and output data one point at a time. Only the DIO-32F and 653X devices can execute group input or output one point at a time.
Chapter 3 Software Overview At the start of your application, call DIG_Grp_Config to configure the individual digital ports as a group. After the ports are grouped, call DIG_Grp_Mode (step 2 of Figure 3-23) to alter the handshaking mode of the DIO-32F and 653X devices. The various handshaking modes and the default settings are explained in the DIG_Grp_Mode function description. The next step in your application is to check if the port is ready for a transfer (step 3 of Figure 3-23).
Chapter 3 Software Overview Digital Group Block I/O Applications NI-DAQ also contains group digital I/O functions, which operate on blocks of data. Figure 3-24 outlines the basic steps for applications that use block I/O. Configure DIO-32F, DIO 6533 (DIO-32HS), PCI-6115, and PCI-6120 device groups for input and output. Configure DIO-24, 6025E devices, AT-MIO-16DE-10, DIO-96, Lab-PC+, SCXI-1200, DAQCard-1200, or DAQPad-1200 groups for input or output.
Chapter 3 Software Overview The DIO-32F, 653X, DIO-24, 6025E devices, AT-MIO-16DE-10, DIO-96, and Lab and 1200 devices all can perform group block operations. However, the DIO-24, 6025E devices, AT-MIO-16DE-10, DIO-96, and Lab and 1200 devices have special wiring requirements for groups larger than one port. The wiring for both the input and output cases for these devices is explained in the DIG_SCAN_Setup function description. No additional wiring is necessary for the DIO-32F and 653X devices.
Chapter 3 Software Overview Digital Double-Buffered Group Block I/O Applications You also can configure group block operations as double-buffered operations for DIO-32 devices. With double-buffered operations, you can do continuous input or output with a limited amount of memory. See the Double-Buffered I/O section later in this chapter for an explanation of double buffering. Figure 3-25 outlines the basic steps for digital double-buffered group block I/O applications.
Chapter 3 Software Overview Configure groups for input or output. DIG_Grp_Config Enable double buffering. DIG_DB_Config Start block input. Start block output. DIG_Block_In DIG_Block_Out Is NI-DAQ ready to transfer the next half of the data? No DIG_DB_HalfReady Yes Transfer next half of the data to or from the digital data buffer. DIG_DB_Transfer Do you wish to transfer more data to or from the digital buffer? Yes Transfer? No Any more data to output? (Output operations only).
Chapter 3 Software Overview The first step for an application is to call DIG_Grp_Config to configure individual ports as a group. Although the steps have been left out of the diagram, you can alter the handshaking mode and enable pattern generation as shown in Figure 3-24, and explained in the Digital Group Block I/O Applications section earlier in this chapter. Next, enable double buffering by calling DIG_DB_Config (second step of Figure 3-25).
Chapter 3 Software Overview Pattern Generation I/O with the DIO-32F, 653X, PCI-6115, and PCI-6120 Devices Use pattern generation for clocked digital I/O when you have a group that is written to or read from based on the output of a counter. The DIG_Block_PG_Config function enables the pattern generation mode of digital I/O. When pattern generation is enabled, a subsequent DIG_Block_In or DIG_Block_Out call automatically uses this mode.
Chapter 3 Software Overview Align_DMA_Buffer. To use the Align_DMA_Buffer utility function, follow these steps: 1. Allocate a buffer twice as large as the number of data samples you are generating. 2. If you are using digital output, build your digital pattern in the buffer. 3. Call DIG_Grp_Config for port assignment. 4. Call DIG_Block_PG_Config to enable pattern generation. 5. Call Align_DMA_Buffer, as described in the NI-DAQ Function Reference Online Help file. 6.
Chapter 3 Software Overview buffer. This option imposes the restriction that the double-buffered digital block output is halted when a partial block of data has been output. This means that the data from the first call to DIG_DB_Transfer with a count less than half the circular buffer size is the last data output by the device.
Chapter 3 Software Overview Counter/Timer Functions The Counter/Timer (CTR) functions perform counting timing I/O and timing counter operations on the Am9513-based MIO devices and the PC-TIO-10: CTR_Config Specifies the counting configuration to use for a counter. CTR_EvCount Configures the specified counter for an event-counting operation and starts the counter. CTR_EvRead Reads the current counter total without disturbing the counting process and returns the count and overflow conditions.
Chapter 3 Software Overview CTR_State Returns the OUT logic level of the specified counter. CTR_Stop Suspends operation of the specified counter so that NI-DAQ can restart the counter operation. Counter/Timer Operation for the CTR Functions Figure 3-26 shows the 16-bit counters available on the PC-TIO-10. SOURCE Counter OUT GATE Figure 3-26. Counter Block Diagram Each counter has a SOURCE input, a GATE input, and an output labeled OUT.
Chapter 3 Software Overview You can configure a counter to count either falling or rising edges of the selected internal timebase, SOURCE input, GATE input, or next lower order counter signal. You can use the counter GATE input to gate counting operations. After you software-configure a counter for an operation, a signal at the GATE input can start and stop the counter operation. There are nine gating modes available in the Am9513: • No Gating—Counter is started and stopped by software.
Chapter 3 Software Overview Counter operation starts and stops relative to the selected timebase. When a counter is configured for no gating, the counter starts at the first timebase/source edge (rising or falling, depending on the selection) after the software configures the counter. When a counter is configured for gating modes, gate signals take effect at the next timebase/source edge.
Chapter 3 1 Software Overview units = timebase period Timebase Starting Signal TC Toggle Output TC Pulse Output Positive Negative Positive 1 1 Negative 0 < sync period < 1 Figure 3-27. Counter Timing and Output Types Figure 3-27 represents a counter generating a delayed pulse (see CTR_Pulse in the function reference) and demonstrates the four forms the output pulse can take given the four different types of output signals supported.
Chapter 3 Software Overview Counter/Timer Application Tips All NI-DAQ counter/timer functions can be broken down into two major categories—event-counting functions and pulse generation functions. On top of those functions, NI-DAQ has utility functions. CTR_EvCount and CTR_EvRead are the two functions designed for event-counting. See Figure 3-28 for basic building blocks of event-counter applications. Also, read Event-Counting Applications later in this chapter for details. Configure the EvCount counter.
Chapter 3 Software Overview Another major category of counter functions is pulse generation. With the NI-DAQ counter functions, you can call CTR_Pulse to generate a pulse or CTR_Square to generate a train of pulses (a square wave). To generate a pulse or a square wave, see Figure 3-29 for details on the function flow. When CTR_Square is used with special gating (gateMode = 8), you can achieve gate-controlled pulse generation. When the gate input is high, NI-DAQ uses period1 to generate the pulses.
Chapter 3 Software Overview Another type of gated pulse generation can be called retriggerable one-shot pulse, where a signal pulse is produced in response to a hardware trigger. To do this, call CTR_Config and specify edge gating. Connect your trigger signal to the GATE input. Call CTR_Square to specify your pulse. Subsequently, each edge sent to the GATE input produces one cycle of the square wave. Besides CTR_Square, you also can call CTR_FOUT_Config to generate a square wave.
Chapter 3 Software Overview Call CTR_Config to configure each counter used for simultaneous operations. CTR_Config Select all counters for simultaneous operations. CTR_Simul_Op Call CTR_EvCount for each counter selected through CTR_Simul_Op. CTR_EvCount Simultaneously start all counters. CTR_Simul_Op Simultaneously save all counter values. CTR_Simul_Op Call CTR_EvRead to retrieve each counter value.
Chapter 3 Software Overview Event-Counting Applications CTR_EvCount and CTR_EvRead work with four types of event-counting/timing measurements—event counting, pulse-width measurement, time-lapse measurement, and frequency measurement. CTR_EvCount also supports the concatenation of counters so that you can obtain 32-bit or 48-bit resolution for these measurements.
Chapter 3 Software Overview t1 SOURCE Timebase GATE Pulse CTR_EvRead Count 1 2 3 4 Pulse Width 5 6 7 8 8 8 * t1 Figure 3-32. Pulse-Width Measurement For time-lapse measurement, configure a counter to count from the occurrence of some event. For this application, you can use any timebase, including an external clock connected to the counter SOURCE input. You can use edge-triggered gating modes if a single counter performs the event counting and if cont = 0 in CTR_EvCount.
Chapter 3 Software Overview SOURCE Periodic Signal t1 GATE Known Pulse CTR_EvRead Count 1 2 Frequency 3 4 4 4 / t1 Figure 3-33. Frequency Measurement For 16-bit resolution event counting and pulse width, time-lapse, or frequency measurement, you only need one counter. Select cont = 0 so that you are notified if the counter overflows (see the CTR_EvRead and CTR_EvCount function descriptions in the NI-DAQ Function Reference Online Help file).
Chapter 3 Software Overview For 32-bit counting, use two counters. For 48-bit counting, use three counters, and so on.
Chapter 3 Software Overview (t1 in Figure 3-33) between two rising edges of the gate signal. With falling edge-triggered gating, a counter can measure the time interval between two falling edges of the gate signal. After you call CTR_Config and apply the signal being measured to the appropriate gate, you can call CTR_Period to initiate period measurement.
Chapter 3 Software Overview inactive, the counter value latches to the Hold Register. You then can call CTR_EvRead to retrieve the saved value. Pulse width is then equal to the value returned by CTR_EvRead * timebase. When the counter value is latched to the Hold Register, the counter reloads itself with a zero and waits for the gate to go active to begin a new measurement. For measuring pulse width, you need a rough estimate of the duration of the pulse being measured.
Chapter 3 Software Overview Interval Counter/Timer Operation for the ICTR Functions Figure 3-35 shows the 16-bit counters available on the 516 devices, DAQCard-500/700, Lab and 1200 devices, and LPM devices. CLK Counter OUT GATE Figure 3-35. Interval Counter Block Diagram Each counter has a CLK input, a GATE input, and an OUT output signal. Use a counter to count the falling edges of the signal applied to the CLK input. The counter GATE input gates counting operations.
Chapter 3 Software Overview General-Purpose Counter/Timer Functions Use the General-Purpose Counter/Timer (GPCTR) functions with the E Series, 622X, 660X, 671X, NI-TIO based, and DSA devices. Refer to the GPCTR functions in the NI-DAQ Function Reference Online Help file for a detailed description of how to use the GPCTR functions for a variety of applications. GPCTR_Change_Parameter Customizes the counter operation to fit the requirements of your application by selecting a specific parameter setting.
Chapter 3 Software Overview General-Purpose Counter/Timer Application Tips The General-Purpose Counter/Timer (GPCTR) functions perform a variety of event counting, time measurement, and pulse and pulse-train generation operations, including buffered operations. When using the GPCTR functions, follow the generic program flow as shown in Figure 3-36.
Chapter 3 Software Overview For more about GPCTR functions, refer to the GPCTR_Set_Application function description in NI-DAQ Function Reference Online Help file. Clocks or Time Counters NI-TIO based devices have built-in clocks, which are specialized time counters that retrieve current time and timestamp one or more digital triggers. The number of clocks available depends on the number of NI-TIO chips on your device. Most devices have one clock per NI-TIO chip.
Chapter 3 Software Overview Clock Synchronization Clocks can be synchronized using an external source. Currently, there are two supported types of synchronization—Pulse Per Second (PPS), and IRIG B. Pulse Per Second PPS, the simplest type of synchronization, is a very accurate 1 Hz signal. Depending on your satellite receiver, the accuracy of this signal can vary from 300 to 100 ns.
Chapter 3 Software Overview GPCTR_Change_Parameter(deviceNumber, ND_CLOCK_x, ND_SYNCHRONIZATION_METHOD, ND_PULSE_PER_SECOND) GPCTR_Change_Parameter(deviceNumber, ND_CLOCK_x, ND_SECONDS,lastTime) GPCTR_Control(deviceNumber, ND_CLOCK_x, ND_PROGRAM) Comment: We have programmed the clock. Now we need to Comment: make sure that the Comment: programming was Comment: really successful.
Chapter 3 Software Overview Figure 3-38. IRIG-B Transmission Frame Clock Accuracy Clock accuracy depends on the resolution of the clock source and the accuracy of the synchronization pulse. The source of your IRIG-B stream determines the accuracy of the synchronization pulse. You can calculate the clock accuracy by adding the resolution of the clock source and the accuracy of the synchronization pulse, both in nanoseconds.
Chapter 3 Software Overview PPS GPS Rcvr RS232 Controller 6602 E Series 1407 Trigger 1 Trigger 2 Figure 3-39. Example Clock in a Measurement System Sample Use Cases The following cases are examples of applications that can use clocks. Use Case #1 The user records the time of n events with software timing precision.
Chapter 3 Software Overview Use Case #2 The user records the time of a single event on two physically distributed data acquisition systems with hardware timing precision. A user wants to record how a lightning strike at a power grid in city A travels to a grid station in city B. The lightning sensors in both cities produce a TTL pulse upon receiving the lightning bolt in city A. Another user wants to correlate buffered analog input measurements across distributed data acquisition systems.
Chapter 3 Software Overview Use Case #3 The user generates a single trigger pulse event on two physically distributed data acquisition systems. A user wants to generate a sine wave at location A and make buffered analog input measurements at location B at precisely the same time. The sine wave generated at location A affects the measurements made at location B. The software program flow is as follows: 1. Initialize the clock for this application.
Chapter 3 Software Overview • Configure analog input (analog output) operation to trigger upon receiving a pulse on the counter output. • Counter produces a pulse when the clock value reaches the desired time interval. 3. Poll the armed attribute of the counter until it is disarmed, when the counter has generated the trigger pulse. 4. At the end of the operation, free up any hardware and software resources. After powering up, the clock will run until the power to the TIO ASIC is turned off.
Chapter 3 Software Overview 7-wire trigger bus. Each device that works with a RTSI bus interface contains a number of useful signals that can be driven onto, or received from, the trigger lines. Each device is equipped with a switch with which an onboard signal is connected to any one of the RTSI bus trigger lines through software control. By programming one device to drive a particular trigger line and another device to receive from the same trigger line, you can hardware connect the two devices.
Chapter 3 Software Overview AT-AO-6/10 RTSI Connections The AT-AO-6/10 contains six signals that you can connect to the RTSI bus trigger lines. Table 3-9 shows these signals. Table 3-9.
Chapter 3 Software Overview The signals REQ1 and REQ2 are request signals received from the I/O connector. An external device drives these signals during handshaking. ACK1 and ACK2 are supplied for handshaking with the DIO-32F over the RTSI bus. For more information about the DIO-32F signals, see the AT-DIO-32F User Manual. 653X RTSI Connections The 653X devices (except for the DAQCard-653X) contain eight signals that you can connect to the RTSI bus trigger lines. Table 3-11 shows these signals.
Chapter 3 Software Overview REQ1 and REQ2 are request signals generated internally or received from the I/O connector. ACK1 and ACK2 are acknowledge signals used for handshaking mode; in pattern-generation mode, they can carry start trigger signals instead. PCLK1 and PCLK2 are the peripheral clock lines for burst mode. STOPTRIG1 and STOPTRIG2 are used for data acquisition timing. For more information about the 653X signals, refer to the DIO 653X User Manual.
Chapter 3 Software Overview Call RTSI_Clock/RTSI_Conn to connect the signals. Each completed signal path requires RTSI_Conn calls. The first call specifies the device signal to transmit onto a RTSI bus trigger line. The second call specifies the device signal that receives a RTSI bus trigger line. After the signals are connected, you are ready to do the actual work of your application. After you finish with the RTSI bus, disconnect the device from the bus.
Chapter 3 Software Overview this function calibrates individual channels. However, with the SCXI-1540, calling this function calibrates every channel. You also use this function to update the actual onboard reference voltage value on the SCXI-1125 EEPROM and to copy calibration constants to the module’s default EEPROM load area from another EEPROM area or from NI-DAQ memory.
Chapter 3 Software Overview SCXI_Get_Chassis_Info Returns chassis configuration information. SCXI_Get_Module_Info Returns configuration information for the assigned SCXI chassis slot number. SCXI_Get_State Gets the state of a single channel or an entire port on any digital or relay module. SCXI_Get_Status Reads the data in the status register on the specified module.
Chapter 3 Software Overview SCXI_MuxCtr_Setup Enables or disables a DAQ device counter to be used as a multiplexer counter during SCXI channel scanning to synchronize the scan list with the module scan list that NI-DAQ has downloaded to Slot 0 of the SCXI chassis. SCXI_Reset Resets the specified module to its default state. You can also use SCXI_Reset to reset the Slot 0 scanning circuitry or to reset the entire chassis.
Chapter 3 Software Overview SCXI_Set_Gain Sets the specified channel to the given gain or range setting on any SCXI module that works with programmable gain or range settings. SCXI_Set_Input_Mode Configures the SCXI-1122 for differential mode or 4-wire mode. SCXI_Set_State Sets the state of a single channel or an entire port on any digital or relay module. SCXI_Set_Threshold Used to set the high and low threshold values for the SCXI-1126 frequency-to-voltage module.
Chapter 3 Software Overview SCXI Application Tips There are three categories of SCXI applications—analog input applications, analog output applications, and digital applications. Figure 3-41 shows the basic structure of an SCXI application. Load SCXI configuration that was entered in the Measurement & Automation Explorer and initialize software defaults. SCXI_Load_Config Reset the chassis and modules to their default hardware settings.
Chapter 3 Software Overview applications. The distinction between the two categories is simple— single-channel applications do not involve automatic channel switching by the hardware during an analog input process; channel-scanning applications do. After you have set up the SCXI system, single-channel applications use the AI or the DAQ class of functions described earlier in this chapter to acquire the input data.
Chapter 3 Software Overview Figure 3-42 shows the function call sequence of a single-channel or software-scanning application using an SCXI-1100, SCXI-1101, SCXI-1102/B/C, VXI-SC-1102/B/C, SCXI-1104/C, SCXI-1112, SCXI-1120/D, SCXI-1121, SCXI-1122, SCXI-1125, SCXI-1126, SCXI-1141, SCXI-1142, SCXI-1143, SCXI-1520, SCXI-1530, SCXI-1531, or SCXI-1540 module operating in multiplexed mode. Set up the chassis for a single-channel analog input operation on a specified channel on a specified module.
Chapter 3 Software Overview The SCXI_Set_Gain function changes the gain or range of the SCXI-1100, SCXI-1102/B/C, VXI-SC-1102/B/C, SCXI-1122, SCXI-1125, SCXI-1126, SCXI-1141, SCXI-1142, SCXI-1143, SCXI-1520, SCXI-1530, SCXI-1531, or SCXI-1540 module. The module maintains this gain or range setting until you call the function again to change it. You can also do any other module-specific programming at this point, such as SCXI_Configure_Filter or SCXI_Set_Input_Mode.
Chapter 3 Software Overview Configure the desired module for a single-channel operation. SCXI_Track_Hold_Setup Set up the chassis for a single-channel analog input operation on a specified channel on a specified module. SCXI_Single_Chan_Setup Latch the analog inputs by putting the module into Hold mode. SCXI_Track_Hold_Control Acquire data from the desired channel on the module using the AI functions. Single Analog Input If desired, change the selected channel on the module.
Chapter 3 Software Overview Notice the similarities between Figure 3-43 and Figure 3-44, which shows the corresponding application in parallel mode. The SCXI_Track_Hold_Setup calls and the SCXI_Track_Hold_Control calls are the same. In multiplexed mode, however, an SCXI_Single_Chan_Setup call is required to select the multiplexed channel and appropriately route the output to the DAQ device or SCXI-1200 module.
Chapter 3 Software Overview Configure each SSH Module in the module scan list for interval scanning. SCXI_Track_Hold_Setup Specify the module scan list, the start channel of each module, and the number of channels to scan on each module. SCXI_SCAN_Setup Set the gain and/or filter settings of each SCXI-1100, SCXI-1102/B/C, SCXI-1122, SCXI-1125, SCXI-1141, SCXI-1142, SCXI-1143, or SCXI-1540 module in the module scan list.
Chapter 3 Software Overview If any of the modules to be scanned are SSH modules, you must establish the Track/Hold setup of each one. To synchronize multiple SSH modules, you can configure the module that is receiving the Track/Hold control signal to send the Track/Hold signal on the SCXIbus so that any other SSH module can use it. The Track/Hold signal can be from either the DAQ device counter or an external source.
Chapter 3 Software Overview When you are using the SCXI-1200 to acquire the data, pass channel 0 to the Lab_ISCAN functions; the SCXI Slot 0 takes care of all the channel switching. Building Analog Input Applications in Parallel Mode When you operate the SCXI-1120/D, SCXI-1121, SCXI-1125, SCXI-1126, SCXI-1141, SCXI-1142, and SCXI-1143 modules in parallel mode, you need no further SCXI function calls beyond those shown in Figure 3-43 to set up the modules for analog input operations.
Chapter 3 Software Overview When you use the SCXI-1200 module in parallel mode, you simply use the AI, DAQ, or Lab_ISCAN functions described earlier in this chapter with the logical device number you assigned in Measurement & Automation Explorer. You cannot use the SCXI-1200 to read channels from other analog input modules that are configured for parallel mode. The SCXI-1100, SCXI-1101, SCXI-1102/B/C, VXI-SC-1102/B/C, SCXI-1104/C, SCXI-1112, SCXI-1122, and SCXI-1540 operate in multiplexed mode only.
Chapter 3 Software Overview Configure the desired module for a single-channel operation. SCXI_Track_Hold_Setup Latch the analog inputs by putting the module into Hold mode. SCXI_Track_Hold_Control Acquire data from the desired channel on the module using the AI functions. Single Analog Input Do you wish to take more data while the module is in Hold mode? Maintain Hold mode? No Yes Put the module back into Track mode to sense the new input values.
Chapter 3 Software Overview hold mode, and the second control call, which puts the module into track mode, acquire data that was sampled at the time of the first control call. One or more channels can be read while the module is in hold mode. After you put the module back into track mode, you can repeat the process to acquire new data. Remember that the channel and gain parameters of the AI function calls refer to the DAQ device channels and gains.
Chapter 3 Software Overview The call sequence is much simpler because the scan interval timer automatically controls the Track/Hold state of the module during the interval-scanning operation. Remember that only the MIO and AI devices, Lab-PC+, PCI-1200, SCXI-1200, and DAQCard-1200 devices work with channel-scanning using tan SSH module. SCXI Data Acquisition Rates The settling time of the SCXI modules can affect the maximum data acquisition rates that your DAQ device can achieve.
Chapter 3 Software Overview Table 3-12. Maximum SCXI Module Settling Times Settling Time Using AT-MIO-16E-22 Settling Time Using AT-MIO-16XE-10 (±0.006% Accuracy)3 Settling Time Using AT-MIO-16XE-10 (±0.0015% Accuracy) 3 7 µs 4 µs 10 µs 32 µs 200 10 µs 5.
Chapter 3 Software Overview Table 3-13. SCXI-1200 Module Settling Rates Gain Maximum Acquisition Rate Settling Time 1 83.3 kS/s 12 µs 2 to 50 55 kS/s 18 µs 100 25 kS/s 40 µs The SCXI-1200 module acquisition rate is limited by the rate at which your PC can service interrupts from the parallel port. This is a machine-dependent rate. The filter setting on the SCXI-1100 and the SCXI-1122 dramatically affects settling time.
Chapter 3 Software Overview Digital Applications If you configured your digital or relay modules for multiplexed mode, use the SCXI_Set_State and SCXI_Get_State functions to access your digital or relay channels. If you are using the SCXI-1160 module, you might want to use the SCXI_Get_Status function after calling the SCXI_Set_State function. SCXI_Get_Status tells you when the SCXI-1160 relays have finished switching.
4 NI-DAQ Double Buffering This chapter describes using double-buffered data acquisitions with NI-DAQ. This chapter applies to counter operations. However, you can read samples of any size. Overview Conventional data acquisition software techniques, such as single-buffered data acquisition, work well for most applications. However, more sophisticated applications involving larger amounts of data at higher rates require more advanced techniques for managing the data. One such technique is double buffering.
Chapter 4 NI-DAQ Double Buffering In double-buffered input operations, the data buffer is configured as a circular buffer. For input operations, the DAQ device fills the circular buffer with data. When the end of the buffer is reached, the device returns to the beginning of the buffer and fills it with data again. This process continues indefinitely until it is interrupted by a hardware error or cleared by a function call. Double-buffered output operations also use a circular buffer.
Chapter 4 NI-DAQ Double Buffering Figure 4-1 illustrates a series of sequential data transfers. Incoming Device Data Circular Buffer a. b. Transfer Buffer c. d. Empty Buffer Untransferred Data Transferred Data Figure 4-1. Double-Buffered Input with Sequential Data Transfers The double-buffered input operation begins when the DAQ device starts writing data into the first half of the circular buffer (Figure 4-1a).
Chapter 4 NI-DAQ Double Buffering Potential Setbacks The double-buffered coordination scheme is not flawless. An application might experience two possible problems with double-buffered input. The first is the possibility of the DAQ device overwriting data before NI-DAQ has copied it to the transfer buffer. This situation is illustrated by Figure 4-2. Incoming Device Data Circular Buffer a. b. Transfer Buffer c. d. Overwrite Before Copy Empty Buffer Untransferred Data Transferred Data Figure 4-2.
Chapter 4 NI-DAQ Double Buffering For the previously described situation, NI-DAQ returns an overwrite before copy warning (overWriteError). This warning indicates that the data in the transfer buffer is valid, but some earlier input data has been lost. Subsequent transfers will not return the warning as long as they keep pace with the DAQ device as in Figure 4-1. The second potential problem occurs when an input device overwrites data that NI-DAQ is simultaneously copying to the transfer buffer.
Chapter 4 NI-DAQ Double Buffering Double-Buffered Output Operations Double-buffered output operations are similar to input operations. The circular buffer is again logically divided into two halves. By dividing the buffer into two halves, NI-DAQ can coordinate user access to the data buffer with the DAQ device. The coordination scheme is simple—NI-DAQ copies data from a transfer buffer you create to the circular buffer in sequential halves. The data in the transfer buffer can be updated between transfers.
Chapter 4 NI-DAQ Double Buffering The double-buffered output operation begins when the output device begins outputting data from the first half of the circular buffer (Figure 4-4a). After the device begins retrieving data from the second half of the circular buffer, NI-DAQ can copy the prepared data from the transfer buffer to the first half of the circular buffer (Figure 4-4b). Your application can then update the data in the transfer buffer.
Chapter 4 NI-DAQ Double Buffering Outgoing Device Data Circular Buffer a. b. Transfer Buffer c. d. Overwrite Before Copy Empty Buffer Untransferred Data Transferred Data Figure 4-5. Double-Buffered Output with an Overwrite Before Copy For this situation, NI-DAQ returns an overwrite before a copy warning (overWriteError). This warning indicates that the device has output old data but the data was uncorrupted during output.
Chapter 4 NI-DAQ Double Buffering Outgoing Device Data Circular Buffer a. b. Transfer Buffer c. Overwrite Error Empty Buffer Data Ready for Output Successfully Output Data Corrupted Output Figure 4-6. Double-Buffered Output with an Overwrite In Figure 4-6b, NI-DAQ has started to copy data from the transfer buffer to the first half of the circular buffer. However, NI-DAQ is unable to copy all of the data before the output device begins retrieving data from the first half (Figure 4-6c).
Chapter 4 NI-DAQ Double Buffering Double Buffer Configuration Functions The Double Buffer Configuration functions enable and disable double buffering for input and output operations, and you can select double-buffering options if any are available. The configuration functions are as follows: • DAQ_DB_Config • WFM_DB_Config • DIG_DB_Config • GPCTR_Change_Parameter For analog input operations, call DAQ_DB_Config prior to calling DAQ_Start, or a SCAN_Start to enable or disable double buffering.
Chapter 4 NI-DAQ Double Buffering The DB_Transfer functions for DAQ, WFM, DIG, and GPCTR are synchronous for both input and output operations. In other words, when your application calls these functions, NI-DAQ does not return control to your application until the transfer is complete. As a result, your application might crash if NI-DAQ cannot complete the transfer. To avoid this situation, call the Timeout_Config function for DAQ, WFM, DIG, and GPCTR prior to starting a double-buffered operation.
Chapter 4 NI-DAQ Double Buffering The HalfReady functions are as follows: • DAQ_DB_HalfReady • WFM_DB_HalfReady • DIG_DB_HalfReady • GPCTR_Read_Buffer For analog input operations, call DAQ_DB_HalfReady, after starting a double-buffered analog acquisition but prior to calling DAQ_DB_Transfer, to check the transfer status of the operation.
Transducer Conversion Functions 5 This chapter describes the NI-DAQ Transducer Conversion functions. NI-DAQ includes source code for these functions. The Transducer Conversion functions convert analog input voltages read from thermocouples, RTDs, thermistors, and strain gauges into temperature or strain units: RTD_Convert Supplied single-voltage and voltage-buffer routines convert voltages read from an RTD into resistance and then into temperature in units for Celsius, Fahrenheit, Kelvin, or Rankine.
Chapter 5 Transducer Conversion Functions The conversion routines are included in NI-DAQ as source files rather than driver function calls so that you have complete access to the conversion formulas. You can edit the conversion formulas or replace them with your own to meet your application’s specific accuracy requirements. Comments in the conversion source code simplify the process of making only necessary changes. A header file for each language (convert.h for C/C++, convert.
Chapter 5 Transducer Conversion Functions The RTD_Convert routine has two remaining parameters—RTDVolts is the voltage that NI-DAQ read from the RTD, and RTDTemp is the return temperature value. The RTD_Buf_Convert routine has three remaining parameters—numPts is the number of voltage points to convert, RTDVoltBuf is the array that contains the voltages that NI-DAQ read from the RTD, and RTDTempBuf is the return array that contains the temperatures.
Chapter 5 Transducer Conversion Functions Some RTD documentation contains values for α and ∂, from which you can calculate A and B using the following equations: A = α ( 1 + ∂ ⁄ 100 ) 2 B = – α∂ ⁄ ( 10, 000, 100 ) where α is the temperature coefficient at T = 0 °C. C = –α ß/1,000,000 where ß is a characteristic of your RTD similar to the α and ∂ equation coefficients.
Chapter 5 Transducer Conversion Functions The Strain_Convert routine has two remaining parameters— strainVolts is the voltage that NI-DAQ read from the strain gauge, and strainVal is the return strain value. The Strain_Buf_Convert routine has three remaining parameters—numPts is the number of voltage points to convert, strainVoltBuf is the array that contains the voltages that NI-DAQ read from the strain gauge, and strainValBuf is the return array that contains the strain values.
Chapter 5 Transducer Conversion Functions RL RL R1 + - Vex + VOUT R1 Rg (e) RL + Rg (ε) RL - Vex VOUT + - R2 RL R3 bridgeConfig = 2 (QTR_BRIDGE_II) bridgeConfig = 1 (QTR_BRIDGE_I) -4Vr GF (1 + 2Vr) strain (ε) = • ( ) 1+ RL Rg strain (ε) = -4Vr GF (1 + 2Vr) RL Vex VOUT ( ) 1+ R1 Rg (+ε) RL - • RL Rg RL R1 + Rg (dummy) RL R2 + + Vex - Rg (+ε) RL - VOUT + Rg (-vε) RL R2 bridgeConfig = 4 (HALF_BRIDGE_II) bridgeConfig = 3 (HALF_BRIDGE_I) -4Vr GF [(1 + v)
Chapter 5 Transducer Conversion Functions Thermistor_Convert and Thermistor_Buf_Convert These functions convert a voltage or voltage buffer read from a thermistor into temperature. Some SCXI terminal blocks have onboard thermistors that you can use to do cold-junction compensation. Parameter Discussion Vref is the voltage reference you apply across the thermistor circuit (see Figure 5-2) in volts. The thermistor on the SCXI terminal blocks has a Vref of 2.5 V.
Chapter 5 Transducer Conversion Functions Using This Function The following equation expresses the relationship between Volts and Rt, the thermistor resistance (see Figure 5-2). Volts = Vref ( Rt / (R1 + Rt)) Solving the previous equation for Rt, we have: Rt = R1 ( Volts / (Vref – Volts)) After this function calculates Rt, the function uses the following equation to convert Rt, the thermistor resistance, to temperature in Kelvin.
Chapter 5 Transducer Conversion Functions data sheet), you can edit the thermistor conversion routine to use your own a, b, and c values. a = 1.295361E–3 b = 2.343159E–4 c = 1.018703E–7 Vref R1 Volts Rt Figure 5-2. Circuit Diagram of a Thermistor in a Voltage Divider Thermocouple_Convert and Thermocouple_Buf_Convert These functions convert a voltage or voltage buffer that NI-DAQ read from a thermocouple into temperature.
Chapter 5 Transducer Conversion Functions CJCTemp is the temperature in Celsius that NI-DAQ uses for cold-junction compensation of the thermocouple temperature. If you are using SCXI, most likely this is the temperature that NI-DAQ read from the temperature sensor on the SCXI terminal block. The AMUX-64T also has a temperature sensor that you can use for this purpose. The TempScale integer indicates in which temperature unit you want your return values to be.
Chapter 5 Transducer Conversion Functions Table 5-1 shows the valid temperature ranges and accuracies for the inverse equations used for each thermocouple type. The errors listed in the table refer to the equations only; they do not take into consideration the accuracy of the thermocouple itself, the SCXI modules, or the DAQ device that is used to take the voltage reading. . Table 5-1.
Technical Support Resources A Web Support National Instruments Web support is your first stop for help in solving installation, configuration, and application problems and questions. Online problem-solving and diagnostic resources include frequently asked questions, knowledge bases, product-specific troubleshooting wizards, manuals, drivers, software updates, and more. Web support is available through the Technical Support section of ni.com NI Developer Zone The NI Developer Zone at zone.ni.
Appendix A Technical Support Resources Worldwide Support National Instruments has offices located around the world to help address your support needs. You can access our branch office Web sites from the Worldwide Offices section of ni.com. Branch office web sites provide up-to-date contact information, support phone numbers, e-mail addresses, and current events.
Glossary Prefix Meaning Value µ- micro- 10–6 m- milli- 10–3 k- kilo- 103 M- mega- 106 Symbols ß coefficient ∂ coefficient ° degree – minus Ω ohm % percent + plus ± plus or minus ε strain α temperature coefficient at T = 0 °C A A/D analog-to-digital AC alternating current © National Instruments Corporation G-1 NI-DAQ User Manual for PC Compatibles
Glossary ACK acknowledge ActiveX A programming system and user interface that lets you work with interactive objects. Formerly called OLE. ActiveX control a standard software tool that adds additional functionality to any compatible ActiveX container ADC A/D converter—an electronic device, often an integrated circuit, that converts an analog voltage to a digital number ADC resolution The resolution of the ADC, which is measured in bits.
Glossary base address A memory address that serves as the starting address for programmable registers. All other addresses are located by adding to the base address.
Glossary coupling the manner in which a signal is connected from one location to another CPU central processing unit D D/A digital-to-analog DAC D/A converter—an electronic device, often an integrated circuit, that converts a digital number into a corresponding analog voltage or current DAQ (1) data acquisition—collecting and measuring electrical signals from sensors, transducers, and test probes or fixtures and inputting them to a computer for processing (2) data acquisition—collecting and measur
Glossary DLL Dynamic-link library. A software module in Microsoft Windows containing executable code and data that can be called or used by Windows applications or other DLLs. Functions and data in a DLL are loaded and linked at run time when they are referenced by a Windows application or other DLLs. DMA Direct memory access—a method by which data can be transferred to/from computer memory from/to a device or memory on the bus while the processor does something else.
Glossary F FIFO A first-in first-out memory buffer; the first data stored is the first data sent to the acceptor. FIFOs are often used on DAQ devices to temporarily store incoming or outgoing data until that data can be retrieved or output. For example, an analog input FIFO stores the results of A/D conversions until the data can be retrieved into system memory, a process that requires the servicing of interrupts and often the programming of the DMA controller.
Glossary IEEE Institute of Electrical and Electronics Engineers import library a file that contains information the linker needs to resolve external references to exported dynamic link library (DLL) functions, so the system can locate the specified DLL and exported DLL functions at run time interrupt a computer signal indicating that the CPU should suspend its current task to service a designated activity interrupt latency the delay between the time hardware asserts an interrupt and when the interru
Glossary M master/slave Type of network connection in which a request is transmitted to one or more destination nodes, and those nodes send a response back to the requesting node. In industrial applications, the responding (slave) device is usually a sensor or actuator, and the requesting (master) device is usually a controller.
Glossary PCI Peripheral Component Interconnect port a digital port, consisting of four or eight lines of digital input and/or output posttriggering the technique used on a DAQ board to acquire a programmed number of samples after trigger conditions are met PPS Pulse per second. A signal normally produced by a GPS receiver.
Glossary RTD Resistive Temperature Detector—A metallic probe that measures temperature based upon its coefficient of resistivity RTSI Real-Time System Integration (bus). The National Instruments timing bus that connects DAQ devices directly, by means of connectors on top of the boards, for precise synchronization of functions.
Glossary T TC terminal count throughput rate the data, measured in bytes/s, for a given continuous operation, calculated to include software overhead transfer rate the rate, measured in bytes/s, at which data is moved from source to destination after software initialization and set up operations; the maximum rate at which the hardware can operate TSR Terminate-and-Stay Resident U unipolar a signal range that is always positive (for example, 0 to +10 V) USB universal serial bus V V volt VDC v
Index Numbers AI device terminology (table), xv-xvii AI_Change_Parameter function, 3-16 AI_Check function, 3-16 AI_Clear function, 3-16 AI_Configure function, 3-16 AI_Mux_Config function, 3-17 AI_Read function, 3-17 AI_Read_Scan function, 3-17 AI_Read_VScan function, 3-17 AI_Setup function, 3-17 AI_VRead function, 3-17 AI_VScale function, 3-17 Align_DMA_Buffer function, 3-2 Am9513-based devices gating modes, 3-79 timebases, 3-78 AMUX-64T external multiplexer support, 3-25 Analog Alarm Event control, 3-11 t
Index C AO_VScale, 3-36 AO_VWrite, 3-36 AO_Write, 3-36 Analog Trigger Event control, 3-9 to 3-11 properties (table), 3-9 to 3-10 setting properties, 3-10 to 3-11 AO_Calibrate function, 3-3 AO_Change_Parameter function, 3-35 AO_Configure function, 3-35 AO_Update function, 3-35 AO_VScale function, 3-36 AO_VWrite function, 3-36 AO_Write function, 3-36 applications for Windows. See building Windows applications.
Index event counting flow chart (figure), 3-82 event-counting functions, 3-82 frequency measurement, 3-87 to 3-88 general-purpose counter/timer functions, 3-94 to 3-95 interval counter/timer functions, 3-92 period and continuous pulse-width measurement, 3-89 to 3-91 pulse generation flow chart (figure), 3-83 pulse width measurement, 3-86 to 3-87 pulse-generation functions, 3-83 to 3-84 simultaneous counter operations (figure), 3-85 time-lapse measurement, 3-87 timer event counting (figure), 3-86 utility fu
Index CTR_FOUT_Config function, 3-77 CTR_Period function, 3-77 CTR_Pulse function, 3-77 CTR_Rate function, 3-77 CTR_Reset function, 3-77 CTR_Restart function, 3-77 CTR_Simul_Op function, 3-77 CTR_Square function, 3-77 CTR_State function, 3-78 CTR_Stop function, 3-78 customer education, A-1 GPCTR_Set_Application, 3-93 GPCTR_Watch, 3-93 interval counter/timer functions application tips, 3-92 ICTR_Read, 3-91 ICTR_Reset, 3-91 ICTR_Setup, 3-91 interval counter/timer block diagram, 3-92 counter/timer operation.
Index low-level double-buffered data acquisition functions, 3-23 to 3-24 DAQ_DB_Config, 3-23, 4-10 DAQ_DB_HalfReady, 3-24, 4-12 DAQ_DB_Transfer, 3-24, 4-11 multirate scanning, 3-32 to 3-34 data acquisition rates, SCXI modules, 3-124 to 3-126 device configuration NI-DAQ hardware support (tables), 1-4 to 1-6 using Measurement & Automation Explorer, 1-7 devices. See also specific device, e.g., AT-AO-6/10.
Index DIG_In_Grp, 3-58 DIG_Out_Grp, 3-59 DIG_SCAN_Setup, 3-59 DIG_Trigger_Config, 3-59 groups of ports DIO-24, 6025E, AT-MIO-16DE-10, DIO-96, and Lab and 1200 series, 3-55 DIO-32F and 653X, 3-55 to 3-56 overview, 3-52 to 3-55 DIG_Line_Config function, 3-57 DIG_Out_Grp function, 3-59 DIG_Out_Line function, 3-57 DIG_Out_Prt function, 3-58 DIG_Prt_Config function, 3-58 DIG_Prt_Status function, 3-58 DIG_SCAN_Setup function, 3-59 DIG_Trigger_Config function, 3-59 DIO-24 groups of ports, 3-55 DIO-32F groups of p
Index CTR_EvCount function, 3-77 CTR_EvRead function, 3-77 flow chart, 3-82 frequency measurement, 3-87 to 3-88 overview, 3-86 pulse width measurement, 3-86 to 3-87 time-lapse measurement, 3-87 timer event counting (figure), 3-86 event message functions, 3-5. See also NI-DAQ events in Visual Basic for Windows.
Index event message functions application tips, 3-5 to 3-6 list of functions, 3-5 NI-DAQ events in Visual Basic for Windows, 3-6 to 3-15 initialization and general configuration functions, 3-2 to 3-3 interval counter/timer functions application tips, 3-92 interval counter/timer operation, 3-92 list of functions, 3-91 list of function groups, 3-1 to 3-2 RTSI bus trigger functions 653X RTSI connections, 3-105 to 3-106 application tips, 3-106 to 3-107 AT-AO-6/10 RTSI connections, 3-104 DIO-32F RTSI connection
Index G DIG_In_Grp, 3-58 DIG_Out_Grp, 3-59 DIG_SCAN_Setup, 3-59 DIG_Trigger_Config, 3-59 groups of ports DIO-24, 6025E, AT-MIO-16DE-10, DIO-96, and Lab and 1200 series groups, 3-55 DIO-32F and 653X groups, 3-55 to 3-56 PCI-6115 and PCI-6120 groups, 3-56 to 3-57 GATE2 signal (table), 3-104 gated pulse generation, 3-83 to 3-84 gating modes, Am9513-based devices, 3-79 General DAQ Event controls, 3-7 to 3-9 examples, 3-13 to 3-15 properties (table), 3-7 to 3-8 setting properties, 3-8 to 3-9 general-purpose c
Index libraries, NI-DAQ, 2-1 low-level data acquisition functions, 3-21 to 3-23 application tips. See data acquisition application tips.
Index MIO and AI device terminology (table), xv-xvii reference voltages for waveform generation (table), 3-49 MIO_Config function, 3-4 MIO-E series devices. See E series devices. Multiplexed mode applications, SCXI, 3-113 to 3-120 multiplexer device (AMUX-64T), 3-25 multirate scanning flow chart for, 3-34 functions for, 3-33 purpose and use, 3-32 to 3-33 WFM_Rate, 3-40 WFM_Scale, 3-41 WFM_Set_Clock, 3-41 LPM devices. See PC-LPM-16. LPM16_Calibrate function, 3-4 M manual. See documentation.
Index O PCI-4451 devices counter usage, 3-50 FIFO lag effect, 3-51 to 3-52 PCI-6115 and PCI-6120 devices groups of ports, 3-56 to 3-57 pattern generation, 3-74 to 3-75 PCLK1 signal (table), 3-105 PCLK2 signal (table), 3-105 PC-LPM-16 counter/timer signals, 3-25 interval counter/timer operation, 3-92 LPM16_Calibrate function, 3-4 period and continuous pulse-width measurement applications, 3-89 to 3-91 plug-in device support AT, PC and NEC buses (table), 1-4 PC Card, CardBus, and VXI buses (table), 1-5 PCI
Index digital applications, 3-127 general SCXIbus application flowchart, 3-112 Multiplexed mode, 3-113 to 3-120 Parallel mode, 3-120 to 3-124 SCXI-1200 module settling rates (table), 3-126 settling rates (table), 3-125 settling times (table), 3-125 SCXI functions, 3-107 to 3-111 SCXI_AO_Write, 3-107 SCXI_Cal_Constants, 3-107 SCXI_Calibrate, 3-107 to 3-108 SCXI_Calibrate_Setup, 3-108 SCXI_Change_Chan, 3-108 SCXI_Configure_Connection, 3-108 SCXI_Configure_Filter, 3-108 SCXI_Get_Chassis_Info, 3-109 SCXI_Get_M
Index synchronization of clocks. See clocks or time counters for NI-TIO devices.
Index W Web support from National Instruments, A-1 WFM_Chan_Control function, 3-39, 3-52 WFM_Check function, 3-39, 3-52 WFM_ClockRate function, 3-39 WFM_DB_Config function, 3-40, 4-10 WFM_DB_HalfReady function, 3-40, 4-12 WFM_DB_Transfer function, 3-40, 4-11 WFM_from_Disk function, 3-39 WFM_Group_Control function, 3-40 WFM_Group_Setup function, 3-40 WFM_Load function, 3-40 WFM_Op function, 3-39 WFM_Rate function, 3-40 WFM_Scale function, 3-41 WFM_Set_Clock function, 3-41 Windows applications, building, 2-