Chapter 6 One-Stop Single-Point Acquisition. NI LabVIEW Data Acquisition Basics
Add to My manuals331 Pages
advertisement
![Chapter 6 One-Stop Single-Point Acquisition. NI LabVIEW Data Acquisition Basics | Manualzz Chapter 6 One-Stop Single-Point Acquisition. NI LabVIEW Data Acquisition Basics | Manualzz](http://s3.manualzz.com/store/data/065132953_1-9ba1220ed7526d9a2518d172b38d8d37-360x466.png)
6
One-Stop Single-Point
Acquisition
This chapter shows you how to acquire one data point from a single channel and then one data point from each of several channels using LabVIEW.
Single-Channel, Single-Point Analog Input
A single-channel, single-point analog input is an immediate, nonbuffered operation. In other words, the software reads one value from an input channel and immediately returns the value to you. This operation does not require any buffering or timing. You should use single-channel, single-point analog input when you need one data point from one channel.
An example of this would be if you periodically needed to monitor the fluid level in a tank. You can connect the transducer that produces a voltage representing the fluid level to a single channel on your DAQ device and initiate a single-channel, single-point acquisition whenever you want to know the fluid level.
For most basic operations, use the AI Sample Channel VI, located in the Functions»DAQ»Analog Input palette. The Easy Analog Input VI,
AI Sample Channel, measures the signal attached to the channel you
specify on your DAQ device and returns the scaled value. Figure 6-1 shows
how to wire this VI.
Figure 6-1. AI Sample Channel VI
© National Instruments Corporation 6-1
LabVIEW Data Acquisition Basics Manual
Chapter 6 One-Stop Single-Point Acquisition
Note If you set up your channel in the DAQ Channel Wizard, you do not need to enter the device or input limits. Instead, enter a channel name in the channel input, and the value returned is relative to the physical units you specified for that channel in the DAQ Channel
Wizard. If you specify the input limits, they are treated as being relative to the physical units of the channel. LabVIEW ignores the device input when channel names are used.
This principle applies throughout this manual.
Figure 6-2 shows how you program the Acquire 1 Point from 1 Channel VI,
located in labview\examples\daq\anlogin\anlogin.llb
, using the
AI Sample Channel VI to acquire data.
Figure 6-2. Acquiring Data Using the Acquire 1 Point from 1 Channel VI
The Acquire 1 Point from 1 Channel VI initiates an A/D conversion on the
DAQ device and returns the scaled value as an output. The high limit is the highest expected level of the signals you want to measure. The low limit is the lowest expected level of the signals you want to measure. If you want
to acquire multiple points from a single channel, see Chapter 7, Buffering
Your Way through Waveform Acquisition .
Single-channel acquisition makes acquiring one channel very basic, but what if you need to take more than one channel sample? For example, you might need to monitor the temperature of the fluid as well as the fluid level of the tank. In this case, two transducers must be monitored. You can monitor both transducers using a multiple-channel, single-point acquisition in LabVIEW.
LabVIEW Data Acquisition Basics Manual
6-2 www.natinst.com
Chapter 6 One-Stop Single-Point Acquisition
Multiple-Channel Single-Point Analog Input
With a multiple-channel, single-point read (or scan), LabVIEW returns the value on several channels at once. Use this type of operation when you have multiple transducers to monitor and you want to retrieve data from each transducer at the same time. Your DAQ device executes a scan across each of the specified channels and returns the values when finished. Refer to
Appendix B, Hardware Capabilities, in the LabVIEW Function and VI
Reference Manual, for the number of channels your device can scan at one time. You also can refer to the LabVIEW Online Reference, available by selecting Help»Online Reference.
The Easy I/O VI, AI Sample Channels, acquires single values from multiple channels. The AI Sample Channels VI performs a single A/D conversion on the specified channels and returns the scaled values in a
1-dimensional (1D) array. The expected range for all the signals, specified
by high limit and low limit inputs, applies to all the channels. Figure 6-3
shows how to acquire a signal from multiple channels with this VI.
Note Remember to use commas to delimit individual channels in the channel string. Use a colon to indicate an inclusive list of channels.
Figure 6-3. Acquiring a Voltage from Multiple Channels with the AI Sample Channels VI
You can benefit from using the Easy Analog Input VIs because you only need one icon in your diagram to perform the task, there are only a few basic inputs to the VIs, and the VIs have built-in error checking. However, the lack of programming flexibility with these VIs can be a limitation.
Because Easy VIs have only a few inputs, you cannot implement some of the more detailed features of DAQ devices, such as triggering or interval scanning. In addition, these VIs always reconfigure at start-up. When you need a high-speed or efficiently run program, these configurations can slow down processing time.
© National Instruments Corporation 6-3
LabVIEW Data Acquisition Basics Manual
Chapter 6 One-Stop Single-Point Acquisition
When you need speed and more efficiency, use the Intermediate VIs, which configure an acquisition only once and then continually acquire data without re-configuring. The Intermediate VIs also offer more error handling control, more hardware functionality, and efficiency in developing your application than the Easy VIs. You typically use the Intermediate VIs to perform buffered acquisitions. You can read more about buffered
acquisitions in Chapter 7, Buffering Your Way through Waveform
Acquisition . The Intermediate Analog Input VI, AI Single Scan VI, does
multiple-channel, single-point acquisitions, as shown in Figure 6-4.
Figure 6-4. The AI Single Scan VI Help Diagram
The AI Single Scan VI returns one scan of data. You can also use this VI to read only one point if you specify one channel. Use this VI only in conjunction with the AI Config VI.
Figure 6-5 shows a simplified block diagram for non-buffered applications.
LabVIEW calls the AI Config VI, which configures the channels, selects the input limits (the high limit and low limit inputs in the Easy VIs), and generates a taskID. The program passes the taskID and the error cluster to the AI Single Scan VI, which returns the data in an array (one point for each channel specified).
Figure 6-5. Using the Intermediate VIs for a Basic Non-Buffered Application
LabVIEW Data Acquisition Basics Manual
6-4 www.natinst.com
Chapter 6 One-Stop Single-Point Acquisition
Figure 6-6 shows how you can program the AI Config and AI Single
Scan VIs to perform a series of single scans by using software timing
(a While Loop) and processing each scan. This example shows the
Cont Acquire&Chart (immediate) VI, which you can find in labview\examples\daq\anlogin\anlogin.llb
.
The advantage to using the intermediate-level VIs is that you do not have to configure the channels every time you want to acquire data as you do when using the Easy VIs. To call the AI Config VI only once, put it outside of the While Loop in your program. The AI Config VI configures channels, selects a high/low limit, and generates a taskID. Then, the AI Config VI passes the taskID and error cluster into the While Loop, where LabVIEW calls the AI Single Scan VI to retrieve a scan. The program then passes the returned data to the My Single-Scan Processing VI. With this VI, you can program whatever processing needs your application calls for, such as looking for a limit to be exceeded. The VI then passes the data through the build array function to a waveform chart for display on the front panel.
The Wait Until Next ms Multiple (metronome) function controls the loop timing. You enter a scan rate, the application converts the value into milliseconds and passes the converted value to the Wait Until Next ms
Multiple function. The loop then executes at the rate of scanning. The loop ends when you press the stop button or an when error occurs. Once the loop finishes, the Simple Error Handler VI displays any errors that occurred.
Figure 6-6. The Cont Acq&Chart (Immediate) VI Block Diagram
The previous examples use software-timed acquisition. With this type of acquisition, the CPU system clock controls the rate at which you acquire data. Your system clock can be interrupted by user interaction, so if you do not need a precise acquisition rate, use software-timed analog input.
© National Instruments Corporation 6-5
LabVIEW Data Acquisition Basics Manual
Chapter 6 One-Stop Single-Point Acquisition
Using Analog Input/Output Control Loops
When you want to output analog data after receiving some analog input data, use analog input/output (I/O) control loops. With control loops, this process is repeated over and over again.
The single-point analog input and output VIs support several analog
I/O control loops at once because you can acquire analog inputs from several different channels in one scan, and write all the analog output values with one update. You perform a single analog input call, process the analog output values for each channel and then perform a single analog output call to update all the output channels.
The following sections describe the two different types of analog I/O control loop techniques: software-timed and hardware-timed analog I/O.
Using Software-Timed Analog I/O Control Loops
With software-timed analog control loops the analog acquisition rate and subsequent control loop rate are controlled by a software timer such as the
Wait Until Next ms Multiple timer. The acquisition is performed during each loop iteration when the AI Single Scan VI is called and the control loop is executed once for each time interval. Your loop timing can be interrupted by any user interaction, which means your acquisition rate is not as consistent as that which can be achieved through hardware-timed control loops. Generally, if you do not need a precise acquisition rate for your control loop, software timing is appropriate.
Besides user interaction, a large number or large-sized front panel indicators, like charts and graphs, affect control loop rates. Refreshing the monitor screen interrupts the system clock, which controls loop rates.
Therefore, you should keep the number of charts and graphs to a minimum when you are using software-timed control loops.
An example of software-timed control loops is the Analog IO Control Loop
(immed) VI located in labview\examples\daq\anlog_io\ anlog_io.llb
.
LabVIEW Data Acquisition Basics Manual
6-6 www.natinst.com
Chapter 6 One-Stop Single-Point Acquisition
The following diagram shows how to perform software-timed analog I/O using the AI Read One Scan and AO Write One Update VIs.
Figure 6-7. Software-Timed Analog I/O
The AI Read One Scan VI configures your DAQ device to acquire data from analog input channels 0 and 1. Once your program acquires a data point from channels 0 and 1, it performs calculations on the data and outputs the results through analog output channels 0 and 1. Because the iteration count is connected to the AI Read One Scan and AO Write One
Update VIs, the application configures the DAQ device for analog input and output only on the first iteration of the loop. The loop rate as well as the acquisition rate is specified by loop rate. The reason why the actual
loop period is important is because user interaction affects the loop and acquisition rate. For example, pressing the mouse button interrupts the system clock, which controls the loop rate. If your analog acquisition rate for control loops does not need to be consistent, then use software-timed control loops.
For more control examples, refer to the VIs located in examples\daq\solution\control.llb
.
Using Hardware-Timed Analog I/O Control Loops
For more precise timing of your control loops, and more precise analog input scan rate, use hardware-timed control loops.
An example of hardware-timed, non-buffered control loops is the Analog
IO Control Loop (hw timed) VI located in labview\examples\daq\ anlog_io\anlog_io.llb
.
© National Instruments Corporation 6-7
LabVIEW Data Acquisition Basics Manual
Chapter 6 One-Stop Single-Point Acquisition
With hardware-timed control loops, your acquisition is not interrupted by user interaction. Hardware-timed analog input automatically places the data in your DAQ device FIFO buffer at an interval determined by the analog input scan rate. You can synchronize your control loop diagram to this precise analog input scan rate by repeatedly calling the AI Single
Scan VI to read the oldest data in the FIFO buffer.
The AI Single Scan VI returns as soon as the next scan has been acquired by the DAQ device. If more than one scan is stored in the DAQ device FIFO buffer when the AI Single Scan VI is called, then the LabVIEW diagram was not able to keep up with the acquisition rate. You can detect this by monitoring the data remaining output of the AI Single Scan VI. In other words, you have missed at least one control loop interval. This indicates that your software overhead is preventing you from keeping up with your
hardware-timed loop rate. In Figure 6-8, the loop too slow Boolean
indicator is set to TRUE whenever this occurs.
Figure 6-8. Analog IO Control Loop (HW-Timed) VI Block Diagram
In this diagram, the AI Config VI configures the device to acquire data on channels 0 and 1. The application does not use a buffer created in CPU memory, but instead uses the DAQ device FIFO buffer. input limits (also known as limit settings) affects the expected range of the input signals. For
more information on input limits (limit settings), refer to Chapter 3, Basic
LabVIEW Data Acquisition Concepts . The AI Start VI begins the analog
LabVIEW Data Acquisition Basics Manual
6-8 www.natinst.com
Chapter 6 One-Stop Single-Point Acquisition acquisition at the loop rate (scan rate) parameter. On the first iteration of the loop, the AI Single Scan VI reads the newest data in the FIFO buffer.
Some data may have been acquired between the execution of the AI Start and the AI Single Scan VIs. On the first iteration of the loop, the application reads the latest data acquired between the AI Start and the AI Single Scan
VIs. On every subsequent iteration of the loop, the application reads the oldest data in the FIFO buffer, which is the next acquired point in the FIFO buffer.
If more than one value was stored in the DAQ device FIFO buffer when you read it, your application was not able to keep up with the control loop acquisition and you have not responded with one control loop interval. This eventually leads to an error condition, which makes the loops complete.
After the application completes analog acquisition and generation, then the
AI Clear VI clears the analog input task.
Figure 6-8 also includes a waveform chart in the control loop. This reduces
your maximum loop rate. You can speed up the maximum rate of the control loop by removing this graph indicator.
You easily can add other processing to your analog I/O control loop by putting the analog input, control loop calculations and analog output in the first frame of a sequence inside the loop, and additional processing in subsequent frames of the sequence. Keep in mind that this additional processing must be less than your control loop interval. Otherwise, you will not be able to keep up with your control loop rate.
Improving Control Loop Performance
There are some performance issues you should take into account if you plan to have other VIs or loops execute in parallel with your hardware-timed control loop. When you call the AI Single Scan VI in a hardware-timed control loop, the VI waits until the next scan is acquired before returning, which means that the CPU is waiting inside the NI-DAQ driver until the scan is acquired. Consequently, if you try to run other LabVIEW VIs or while loops in the same diagram in parallel with your hardware-timed control loop, they may run more slowly or intermittently. You can reduce this problem by putting a software delay, with the Wait (ms) VI, at the end of your loop after you write your analog output values. Your other
LabVIEW VIs and loops can then execute during this time.
Another good technique is to poll for your analog input without waiting in the driver. You can set the AI Single Scan VI time limit in sec to 0 . Then, the VI reads the DAQ Device FIFO buffer and returns immediately, regardless of whether the next scan was acquired. The AI Single Scan VI
© National Instruments Corporation 6-9
LabVIEW Data Acquisition Basics Manual
Chapter 6 One-Stop Single-Point Acquisition
scaled data output array is empty if the scan was not yet acquired. Poll for your analog input by using a Wait (ms) or Wait Until Next ms Multiple function together with the AI Single Scan VI in a While Loop within your control loop diagram. Set the wait time smaller than your control loop interval (at least half as small). If the scaled data output array is not empty, exit the polling loop passing out the scaled data array and execute the rest of your control loop diagram. This method does not return data as soon as the scan has been acquired, as in the example described previously, but provides ample time for other VIs and loops to execute. This method is a good technique for balancing the CPU load between several loops and VIs running in parallel.
For more control examples, refer to the VIs located in examples\daq\ solution\control.llb
.
LabVIEW Data Acquisition Basics Manual
6-10 www.natinst.com
advertisement
Related manuals
advertisement
Table of contents
- 1 Data Acquisition BasicsManual
- 2 Support
- 2 Worldwide Technical Support and Product Information
- 2 National Instruments Corporate Headquarters
- 2 Worldwide Offices
- 3 Important Information
- 3 Warranty
- 3 Copyright
- 3 Trademarks
- 3 WARNING REGARDING MEDICAL AND CLINICAL USE OF NATIONAL INSTRUMENTS PRODUCTS
- 4 Contents
- 19 About This Manual
- 19 Conventions Used in This Manual
- 21 LabVIEW Data Types
- 22 Related Documentation
- 23 Part I Before You Get Started
- 24 Chapter 1 How To Use This Book
- 28 Chapter 2 Installing and Configuring Your Data Acquisition Hardware
- 31 LabVIEW Data Acquisition Hardware Support
- 41 Installing and Configuring Your NationalInstrumentsDevice
- 41 Installing and Configuring Your DAQ Device Using NI-DAQ 5.x, 6.x
- 41 Configuring Your DAQ Device Using NI-DAQ 4.8.x on the Macintosh
- 43 Installing and Configuring Your SCXI Chassis
- 43 Hardware Configuration
- 45 NI-DAQ 5.x, 6.x Software Configuration
- 45 NI-DAQ 4.8.x for Macintosh Software Configuration
- 48 Configuring Your Channels in NI-DAQ 5.x, 6.x
- 49 Chapter 3 Basic LabVIEW Data Acquisition Concepts
- 49 Location of Common DAQ Examples
- 51 Locating the Data Acquisition VIs in LabVIEW
- 52 DAQ VI Organization
- 52 Easy VIs
- 53 Intermediate VIs
- 53 Utility VIs
- 53 Advanced VIs
- 53 VI Parameter Conventions
- 54 Default and Current Value Conventions
- 55 Common DAQ VI Parameters
- 56 Error Handling
- 56 Channel, Port, and Counter Addressing
- 57 Channel Name Addressing
- 58 Channel Number Addressing
- 59 Limit Settings
- 62 Data Organization for Analog Applications
- 65 Chapter 4 Where You Should Go Next
- 67 Questions You Should Answer
- 70 Part II Catching the Wave with Analog Input
- 71 Chapter 5 Things You Should Know about Analog Input
- 71 Defining Your Signal
- 72 What Is Your Signal Referenced To?
- 72 Grounded Signal Sources
- 73 Floating Signal Sources
- 74 Choosing Your Measurement System
- 74 Resolution
- 75 Device Range
- 76 Signal Limit Settings
- 77 Considerations for Selecting Analog Input Settings
- 79 Differential Measurement System
- 81 Referenced Single-Ended Measurement System
- 82 Nonreferenced Single-Ended Measurement System
- 83 Channel Addressing with the AMUX-64T
- 84 The AMUX-64T Scanning Order
- 87 Important Terms You Should Know
- 88 Chapter 6 One-Stop Single-Point Acquisition
- 88 Single-Channel, Single-Point Analog Input
- 90 Multiple-Channel Single-Point Analog Input
- 93 Using Analog Input/Output Control Loops
- 93 Using Software-Timed Analog I/O Control Loops
- 94 Using Hardware-Timed Analog I/O Control Loops
- 96 Improving Control Loop Performance
- 98 Chapter 7 Buffering Your Way through Waveform Acquisition
- 98 Can You Wait for Your Data?
- 99 Acquiring a Single Waveform
- 100 Acquiring Multiple Waveforms
- 102 Simple-Buffered Analog Input Examples
- 102 Simple-Buffered Analog Input with Graphing
- 103 Simple-Buffered Analog Input with Multiple Starts
- 105 Simple-Buffered Analog Input with a Write to Spreadsheet File
- 105 Triggered Analog Input
- 105 Do You Need to Access Your Data during Acquisition?
- 107 Continuously Acquiring Data from Multiple Channels
- 108 Asynchronous Continuous Acquisition Using DAQ Occurrences
- 110 CircularBuffered Analog Input Examples
- 110 Basic CircularBuffered Analog Input
- 111 Other CircularBuffered Analog Input Examples
- 111 Simultaneous Buffered Waveform Acquisition andWaveform Generation
- 112 Chapter 8 Controlling Your Acquisition with Triggers
- 112 Hardware Triggering
- 113 Digital Triggering
- 115 Digital Triggering Examples
- 116 Digital Triggering Examples
- 119 Analog Triggering Examples
- 120 Software Triggering
- 123 Conditional Retrieval Examples
- 124 Chapter 9 Letting an Outside Source Control Your Acquisition Rate
- 126 Externally Controlling Your Channel Clock
- 129 Externally Controlling Your Scan Clock
- 132 Externally Controlling the Scan and Channel Clocks
- 133 Part III Making Waves with Analog Output
- 134 Chapter 10 Things You Should Know about Analog Output
- 134 Single-Point Output
- 134 Buffered Analog Output
- 136 Chapter 11 One-Stop Single-Point Generation
- 136 Single-Immediate Updates
- 138 Multiple-Immediate Updates
- 139 Chapter 12 Buffering Your Way through Waveform Generation
- 139 Buffered Analog Output
- 141 Changing the Waveform during Generation—CircularBufferedOutput
- 143 Eliminating Errors from Your CircularBufferedApplication
- 144 Buffered Analog Output Examples
- 145 Chapter 13 Letting an Outside Source Control Your Update Rate
- 145 Externally Controlling Your Update Clock
- 147 Supplying an External Test Clock from Your DAQ Device
- 148 Chapter 14 Simultaneous Buffered Waveform Acquisition and Generation
- 148 Using ESeries MIO Boards
- 148 Software Triggered
- 150 Hardware Triggered
- 151 Using Legacy MIO Boards
- 151 Software Triggered
- 152 Hardware Triggered
- 153 Using Lab/1200 Boards
- 154 Part IV Getting Square with Digital I/O
- 155 Chapter 15 Things You Should Know about Digital I/O
- 156 Types of Digital Acquisition/Generation
- 157 Chapter 16 When You Need It Now— Immediate Digital I/O
- 160 Chapter 17 Shaking Hands with a Digital Partner
- 162 Sending Out Multiple Digital Values
- 164 Nonbuffered Handshaking
- 165 Buffered Handshaking
- 166 Simple Buffered Examples
- 168 Circular-Buffered Examples
- 170 Part V SCXI—Getting Your Signals in Great Condition
- 171 Chapter 18 Things You Should Know about SCXI
- 171 What Is Signal Conditioning?
- 174 Amplification
- 175 Isolation
- 175 Filtering
- 175 Transducer Excitation
- 176 Linearization
- 177 Chapter 19 Hardware and Software Setup for Your SCXI System
- 181 SCXI Operating Modes
- 181 Multiplexed Mode for Analog Input Modules
- 182 Multiplexed Mode for the SCXI1200 (Windows)
- 182 Multiplexed Mode for Analog Output Modules
- 182 Multiplexed Mode for Digital and Relay Modules
- 182 Parallel Mode for Analog Input Modules
- 183 Parallel Mode for the SCXI-1200 (Windows)
- 183 Parallel Mode for Digital Modules
- 184 SCXI Software Installation and Configuration
- 185 Chapter 20 Special Programming Considerations for SCXI
- 185 SCXI Channel Addressing
- 187 SCXI Gains
- 189 SCXI Settling Time
- 190 Chapter 21 Common SCXI Applications
- 191 Analog Input Applications for MeasuringTemperatureand Pressure
- 191 Measuring Temperature with Thermocouples
- 192 Temperature Sensors for Cold-JunctionCompensation
- 194 Amplifier Offset
- 195 VI Examples
- 199 Measuring Temperature with RTDs
- 202 Measuring Pressure with Strain Gauges
- 206 Analog Output Application Example
- 207 Digital Input Application Example
- 208 Digital Output Application Example
- 210 Multi-Chassis Applications
- 212 Chapter 22 SCXI Calibration—Increasing Signal Measurement Precision
- 212 EEPROM—Your System’s Holding Tank for CalibrationConstants
- 214 Calibrating SCXI Modules
- 215 SCXI Calibration Methods for Signal Acquisition
- 216 One-Point Calibration
- 217 Two-Point Calibration
- 218 Calibrating SCXI Modules for Signal Generation
- 220 Part VI Counting Your Way to High-Precision Timing
- 221 Chapter 23 Things You Should Know about Counters
- 222 Knowing the Parts of Your Counter
- 224 Knowing Your Counter Chip
- 225 TIO-ASIC
- 225 DAQ-STC
- 225 Am9513
- 225 8253/54
- 227 Chapter 24 Generating a Square Pulse or Pulse Trains
- 227 Generating a Square Pulse
- 229 TIO-ASIC, DAQ-STC, and Am9513
- 230 8253/54
- 230 Generating a Single Square Pulse
- 231 TIO-ASIC, DAQ-STC, Am9513
- 233 8253/54
- 236 Generating a Pulse Train
- 236 Generating a Continuous Pulse Train
- 237 TIO-ASIC, DAQ-STC, Am9513
- 239 8253/54
- 240 Generating a Finite Pulse Train
- 241 TIO-ASIC, DAQ-STC, Am9513
- 243 DAQ-STC
- 244 8253/54
- 247 Counting Operations When All Your Counters Are Used
- 249 Knowing the Accuracy of Your Counters
- 249 8253/54
- 250 Stopping Counter Generations
- 250 DAQ-STC, Am9513
- 250 8253/54
- 251 Chapter 25 Measuring Pulse Width
- 251 Measuring a Pulse Width
- 252 Determining Pulse Width
- 252 TIO-ASIC, DAQ-STC
- 254 Am9513
- 255 8253/54
- 256 Controlling Your Pulse Width Measurement
- 256 TIO-ASIC, DAQ-STC, or Am9513
- 257 Buffered Pulse and Period Measurement
- 259 Increasing Your Measurable Width Range
- 260 Chapter 26 Measuring Frequency and Period
- 260 Knowing How and When to Measure FrequencyandPeriod
- 261 TIO-ASIC, DAQ-STC, Am9513
- 261 8253/54
- 262 Connecting Counters to Measure Frequency and Period
- 262 TIO-ASIC, DAQ-STC, Am9513
- 263 Measuring the Frequency and Period ofHighFrequencySignals
- 263 TIO-ASIC, DAQ-STC
- 264 Am9513
- 265 TIO-ASIC, DAQ-STC, Am9513
- 266 8253/54
- 267 Measuring the Period and FrequencyofLowFrequencySignals
- 267 TIO-ASIC, DAQ-STC
- 268 Am9513
- 269 TIO-ASIC, DAQ-STC, Am9513
- 269 8253/54
- 270 Chapter 27 Counting Signal Highs and Lows
- 270 Connecting Counters to Count Events and Time
- 271 Am9513
- 272 Counting Events
- 272 TIO-ASIC, DAQ-STC
- 274 Am9513
- 276 8253/54
- 277 Counting Elapsed Time
- 277 TIO-ASIC, DAQ-STC
- 279 Am9513
- 281 8253/54
- 282 Chapter 28 Dividing Frequencies
- 283 TIO-ASIC, DAQ-STC, Am9513
- 284 8253/54
- 285 Part VII Debugging Your Data Acquisition Application
- 286 Chapter 29 Debugging Techniques
- 286 Hardware Connection Errors
- 286 Software Configuration Errors
- 287 VI Construction Errors
- 287 Error Handling
- 288 Single-Stepping through a VI
- 288 Execution Highlighting
- 289 Using the Probe Tool
- 289 Setting Breakpoints and Showing Advanced DAQ VIs
- 290 Appendix A LabVIEW Data Acquisition Common Questions
- 293 Appendix B Technical Support Resources
- 295 Glossary
- 295 Numbers/Symbols
- 295 A
- 296 B
- 297 C
- 298 D
- 300 E-G
- 301 H-I
- 302 K-L
- 303 M
- 304 N-O
- 305 P
- 306 R-S
- 308 T
- 309 U-V
- 310 W
- 311 Index
- 311 Numbers
- 311 A
- 315 B-C
- 318 D
- 320 E
- 321 F
- 322 G-H
- 323 I
- 324 L-M
- 325 N
- 326 O-P
- 327 Q-S
- 330 T
- 331 U-W
- 13 Figures
- 29 Figure 2-1. Installing and Configuring DAQ Devices
- 30 Figure 2-2. How NI-DAQ Relates to Your System and DAQ Devices
- 42 Figure 2-3. NI-DAQ Device Window Listing
- 42 Figure 2-4. Accessing the Device Configuration Window in NI-DAQ
- 43 Figure 2-5. Device Configuration and I/O Connector Windows in NI-DAQ
- 45 Figure 2-6. Accessing the NI DAQ SCXI Configuration Window
- 46 Figure 2-7. SCXI Configuration Window in NI-DAQ
- 51 Figure 3-1. Accessing the Data Acquisition Palette
- 51 Figure 3-2. Data Acquisition VIs Palette
- 52 Figure 3-3. Analog Input VI Palette Organization
- 54 Figure 3-4. LabVIEW Help Window Conventions
- 56 Figure 3-5. LabVIEW Error In Input and Error Out Output Error Clusters
- 57 Figure 3-6. Channel String Controls
- 59 Figure 3-7. Channel String Array Controls
- 60 Figure 3-8. Limit Settings, Case 1
- 61 Figure 3-9. Limit Settings, Case 2
- 62 Figure 3-10. Example of a Basic 2D Array
- 62 Figure 3-11. 2D Array in Row Major Order
- 63 Figure 3-12. 2D Array in Column Major Order
- 63 Figure 3-13. Extracting a Single Channel from a Column Major 2D Array
- 64 Figure 3-14. Analog Output Buffer 2D Array
- 71 Figure 5-1. Types of Analog Signals
- 72 Figure 5-2. Grounded Signal Sources
- 73 Figure 5-3. Floating Signal Sources
- 74 Figure 5-4. The Effects of Resolution on ADC Precision
- 75 Figure 5-5. The Effects of Range on ADC Precision
- 76 Figure 5-6. The Effects of Limit Settings on ADC Precision
- 79 Figure 5-7. 8-Channel Differential Measurement System
- 80 Figure 5-8. Common-Mode Voltage
- 81 Figure 5-9. 16-Channel RSE Measurement System
- 82 Figure 5-10. 16-Channel NRSE Measurement System
- 88 Figure 6-1. AI Sample Channel VI
- 89 Figure 6-2. Acquiring Data Using the Acquire 1 Point from 1 Channel VI
- 90 Figure 6-3. Acquiring a Voltage from Multiple Channels with the AI Sample Channels VI
- 91 Figure 6-4. The AI Single Scan VI Help Diagram
- 91 Figure 6-5. Using the Intermediate VIs for a Basic Non-Buffered Application
- 92 Figure 6-6. The Cont Acq&Chart (Immediate) VI Block Diagram
- 94 Figure 6-7. Software-Timed Analog I/O
- 95 Figure 6-8. Analog IO Control Loop (HW-Timed) VI Block Diagram
- 99 Figure 7-1. How Buffers Work
- 100 Figure 7-2. The AI Acquire Waveform VI
- 100 Figure 7-3. The AI Acquire Waveforms VI
- 101 Figure 7-4. Using the Intermediate VIs to Acquire Multiple Waveforms
- 102 Figure 7-5. Simple Buffered Analog Input Example
- 103 Figure 7-6. Simple Buffered Analog Input with Graphing
- 104 Figure 7-7. Taking a Specified Number of Samples with the Intermediate VIs
- 105 Figure 7-8. Writing to a Spreadsheet File after Acquisition
- 106 Figure 7-9. How a Circular Buffer Works
- 108 Figure 7-10. Continuously Acquiring Data with the Intermediate VIs
- 109 Figure 7-11. Continuous Acq&Chart (Async Occurrence) VI
- 110 Figure 7-12. Basic Circular-Buffered Analog Input Using the Intermediate VIs
- 113 Figure 8-1. Diagram of a Digital Trigger
- 114 Figure 8-2. Digital Triggering with Your DAQ Device
- 115 Figure 8-3. Block Diagram of the Acquire N Scans Digital Trig VI
- 116 Figure 8-4. Block Diagram of a VI Acquiring Data On with Digital Trigger A
- 117 Figure 8-5. Diagram of an Analog Trigger
- 118 Figure 8-6. Analog Triggering with Your DAQ Device
- 119 Figure 8-7. Block Diagram of the Acquire N Scans Analog Hardware Trig VI
- 121 Figure 8-8. Timeline of Conditional Retrieval
- 122 Figure 8-9. The AI Read VI Conditional Retrieval Cluster
- 123 Figure 8-10. Block Diagram of the Acquire N Scans Analog Software Trig VI
- 124 Figure 9-1. Channel and Scan Intervals Using the Channel Clock
- 125 Figure 9-2. Round-Robin Scanning Using the Channel Clock
- 126 Figure 9-3. Example of a TTL Signal
- 127 Figure 9-4. Getting Started Analog Input Example VI
- 128 Figure 9-5. Setting the Clock Source Code for External Conversion Pulses for E Series Devices
- 129 Figure 9-6. Block Diagram of a VI Acquiring Data On with an External Scan Clock
- 131 Figure 9-7. Externally Controlling Your Scan Clock with the Getting Started Analog Input Example VI
- 132 Figure 9-8. Controlling the Scan and Channel Clock Simultaneously
- 136 Figure 11-1. Single Immediate Update Using the AO Update Channels VI
- 137 Figure 11-2. Single Immediate Update Using the AO Update Channel VI
- 137 Figure 11-3. Single Immediate Update Using Intermediate VI
- 138 Figure 11-4. Multiple Immediate Updates Using Intermediate VI
- 139 Figure 12-1. Waveform Generation Using the AO Generate Waveforms VI
- 140 Figure 12-2. Waveform Generation Using the AO Waveform Gen VI
- 141 Figure 12-3. Waveform Generation Using Intermediate VIs
- 142 Figure 12-4. Circular Buffered Waveform Generation Using the AO Continuous Gen VI
- 143 Figure 12-5. Circular Buffered Waveform Generation Using Intermediate VIs
- 144 Figure 12-6. Display and Output Acq’d File (Scaled) VI
- 146 Figure 13-1. Generate N Updates-ExtUpdateClk VI
- 149 Figure 14-1. Simultaneous Input/Output Using the Simul AI/AO Buffered (E-series MIO) VI
- 150 Figure 14-2. Simultaneous Input/Output Using the Simul AI/AO Buffered Trigger (E-series MIO) VI
- 151 Figure 14-3. Simultaneous Input/Output Using the Simul AI/AO Buffered (Legacy MIO) VI
- 152 Figure 14-4. Simultaneous Input/Output Using the Simul AI/AO Buffered Trigger (Legacy MIO) VI
- 155 Figure 15-1. Digital Ports and Lines
- 158 Figure 16-1. The Easy Digital VIs
- 162 Figure 17-1. Connecting Signal Lines for Digital Input
- 163 Figure 17-2. Connecting Digital Signal Lines for Digital Output
- 164 Figure 17-3. Nonbuffered Handshaking Using the DIO Single Read/Write VI
- 165 Figure 17-4. Nonbuffered Handshaking Using the DIO Single Read/Write VI
- 166 Figure 17-5. Buffered Output Using the DIO-32 Devices
- 167 Figure 17-6. Buffered Output Using DAQ Devices (Other Than DIO-32 Series Devices)
- 167 Figure 17-7. Buffered Input Using DIO-32 Devices
- 168 Figure 17-8. Buffered Input Using DAQ Devices (Other than DIO-32 Devices)
- 169 Figure 17-9. Digital Handshaking Using a Circular Buffer
- 173 Figure 18-1. Common Types of Transducers/Signals and Signal Conditioning
- 174 Figure 18-2. Amplifying Signals near the Source to Increase Signal-to-Noise Ratio (SNR)
- 178 Figure 19-1. SCXI System
- 179 Figure 19-2. Components of an SCXI System
- 180 Figure 19-3. SCXI Chassis
- 195 Figure 21-1. Continuous Transducer Measurement VI
- 196 Figure 21-2. Measuring a Single Module with the Acquire and Average VI
- 197 Figure 21-3. Measuring Temperature Sensors Using the Acquire and Average VI
- 198 Figure 21-4. Continuously Acquiring Data Using Intermediate VIs
- 201 Figure 21-5. Measuring Temperature Using Information from the DAQ Channel Wizard
- 202 Figure 21-6. Measuring Temperature Using the Convert RTD Reading VI
- 203 Figure 21-7. Half-Bridge Strain Gauge
- 204 Figure 21-8. Measuring Pressure Using Information from the DAQ Channel Wizard
- 205 Figure 21-9. Convert Strain Gauge Reading VI
- 206 Figure 21-10. SCXI-1124 Update Channels VI
- 207 Figure 21-11. Inputting Digital Signals through an SCXI Chassis Using Easy Digital VIs
- 208 Figure 21-12. Outputting Digital Signals through an SCXI Chassis Using Easy Digital VIs
- 224 Figure 23-1. Counter Gating Modes
- 226 Figure 23-2. Wiring a 7404 Chip to Invert a TTL Signal
- 228 Figure 24-1. Pulse Duty Cycles
- 229 Figure 24-2. Positive and Negative Pulse Polarity
- 229 Figure 24-3. Pulses Created with Positive Polarity and Toggled Output
- 230 Figure 24-4. Phases of a Single Negative Polarity Pulse
- 231 Figure 24-5. Physical Connections for Generating a Square Pulse
- 232 Figure 24-6. Diagram of Delayed Pulse-Easy (DAQ-STC) VI
- 233 Figure 24-7. Diagram of Delayed Pulse-Int (DAQ-STC) VI
- 233 Figure 24-8. External Connections Diagram from the Front Panel of Delayed Pulse (8253) VI
- 234 Figure 24-9. Frame 0 of Delayed Pulse (8253) VI
- 235 Figure 24-10. Frame 1 of Delayed Pulse (8253) VI
- 236 Figure 24-11. Frame 2 of Delayed Pulse (8253) VI
- 237 Figure 24-12. Physical Connections for Generating a Continuous Pulse Train
- 237 Figure 24-13. Diagram of Cont Pulse Train-Easy (DAQ-STC) VI
- 238 Figure 24-14. Diagram of Cont Pulse Train-Int (DAQ-STC) VI
- 239 Figure 24-15. External Connections Diagram from the Front Panel of Cont Pulse Train (8253) VI
- 240 Figure 24-16. Diagram of Cont Pulse Train (8253) VI
- 240 Figure 24-17. Physical Connections for Generating a Finite Pulse Train
- 241 Figure 24-18. Diagram of Finite Pulse Train-Easy (DAQ-STC) VI
- 242 Figure 24-19. Diagram of Finite Pulse Train-Int (DAQ-STC) VI
- 243 Figure 24-20. External Connections Diagram from the Front Panel of Finite Pulse Train Adv (DAQ-ST...
- 244 Figure 24-21. Diagram of Finite Pulse Train-Adv (DAQ-STC) VI
- 244 Figure 24-22. External Connections Diagram from the Front Panel of Finite Pulse Train (8253) VI
- 245 Figure 24-23. Frame 0 of Finite Pulse Train (8253) VI
- 246 Figure 24-24. Frame 1 of Finite Pulse Train (8253) VI
- 247 Figure 24-25. Frame 2 of Finite Pulse Train (8253) VI
- 248 Figure 24-26. CTR Control VI Front Panel and Block Diagram
- 249 Figure 24-27. Uncertainty of One Timebase Period
- 250 Figure 24-28. Using the Generate Delayed Pulse and Stopping the Counting Operation
- 250 Figure 24-29. Stopping a Generated Pulse Train
- 251 Figure 25-1. Counting Input Signals to Determine Pulse Width
- 252 Figure 25-2. Physical Connections for Determining Pulse Width
- 252 Figure 25-3. Diagram of Measure Pulse Width (DAQ-STC) VI
- 253 Figure 25-4. Menu Choices for Type of Measurement for the Measure Pulse Width or Period (DAQ-STC) VI
- 254 Figure 25-5. Diagram of Measure Pulse Width (9513) VI
- 254 Figure 25-6. Menu Choices for Type of Measurement for the Measure Pulse Width or Period (9513) VI
- 255 Figure 25-7. Diagram of Measure Short Pulse Width (8253) VI
- 257 Figure 25-8. Measuring Pulse Width with Intermediate VIs
- 257 Figure 25-9. Diagram of Meas Buffered Pulse-Period (DAQ-STC) VI
- 260 Figure 26-1. Measuring Square Wave Frequency
- 261 Figure 26-2. Measuring a Square Wave Period
- 262 Figure 26-3. External Connections for Frequency Measurement
- 262 Figure 26-4. External Connections for Period Measurement
- 263 Figure 26-5. Diagram of Measure Frequency-Easy (DAQ-STC) VI
- 264 Figure 26-6. Diagram of Measure Frequency-Easy (9513) VI
- 265 Figure 26-7. Frequency Measurement Example Using Intermediate VIs
- 266 Figure 26-8. Diagram of Measure Frequency > 1 kHz (8253) VI
- 267 Figure 26-9. Diagram of Measure Period-Easy (DAQ-STC) VI
- 268 Figure 26-10. Diagram of Measure Period-Easy (9513) VI
- 269 Figure 26-11. Measuring Period Using Intermediate Counter VIs
- 270 Figure 27-1. External Connections for Counting Events
- 270 Figure 27-2. External Connections for Counting Elapsed Time
- 271 Figure 27-3. External Connections to Cascade Counters for Counting Events
- 272 Figure 27-4. External Connections to Cascade Counters for Counting Elapsed Time
- 272 Figure 27-5. Diagram of Count Events-Easy (DAQ-STC) VI
- 273 Figure 27-6. Diagram of Count Events-Int (DAQ-STC) VI
- 274 Figure 27-7. Diagram of Count Events-Easy (9513) VI
- 275 Figure 27-8. Diagram of Count Events-Int (9513) VI
- 276 Figure 27-9. Diagram of Count Events (8253) VI
- 277 Figure 27-10. Diagram of Count Time-Easy (DAQ-STC) VI
- 278 Figure 27-11. Diagram of Count Time-Int (DAQ-STC) VI
- 279 Figure 27-12. Diagram of Count Time-Easy (9315) VI
- 280 Figure 27-13. Diagram of Count Time-Int (9513) VI
- 281 Figure 27-14. Diagram of Count Time (8253) VI
- 282 Figure 28-1. Wiring Your Counters for Frequency Division
- 283 Figure 28-2. Programming a Single Divider for Frequency Division
- 287 Figure 29-1. Error Checking Using the General Error Handler VI
- 288 Figure 29-2. Error Checking Using the Simple Error Handler VI
- 18 Tables
- 31 Table 2-1. LabVIEW DAQ Hardware Support with NI-DAQ
- 78 Table 5-1. Measurement Precision for Various Device Ranges and Limit Settings (12-bit A/D Converter)
- 83 Table 5-2. Analog Input Channel Range
- 85 Table 5-3. Scanning Order for Each DAQ Device Input Channel with One or Two AMUX 64Ts
- 86 Table 5-4. Scanning Order for Each DAQ Device Input Channel with Four AMUX 64Ts
- 130 Table 9-1. External Scan Clock Input Pins
- 146 Table 13-1. External Update Clock Input Pins
- 171 Table 18-1. Phenomena and Transducers
- 188 Table 20-1. SCXI-1100 Channel Arrays, Input Limits Arrays, and Gains
- 259 Table 25-1. Internal Counter Timebases and Their Corresponding Maximum Pulse Width, Period, or Ti...
- 271 Table 27-1. Adjacent Counters for Counter Chips