Part 4 Getting Square with Digital I/O. NI LabVIEW Data Acquisition Basics
Add to My manuals295 Pages
advertisement
▼
Scroll to page 2
of
295
Part
4
Getting Square with Digital I/O
This section describes basic concepts on how to use digital signals with data acquisition in LabVIEW, including immediate and handshaked digital I/O.
Part 4, Getting Square with Digital I/O , contains the following chapters.
• Chapter 13, Things You Should Know about Digital I/O, basic concepts on digital I/O.
• Chapter 14, When You Need It Now—Immediate Digital I/O, explains how to use digital lines to acquire and generate data immediately.
• Chapter 15, Shaking Hands with a Digital Partner , shows you how you can synchronize digital data transfers between your DAQ devices and instruments.
advertisement
Related manuals
Download
PDF
advertisement
Table of contents
- 1 LabVIEW Data Acquisition Basics Manual
- 2 Support
- 3 Important Information
- 3 Warranty
- 3 Copyright
- 3 Trademarks
- 3 Warning
- 4 Table of Contents
- 16 About This Manual
- 16 Organization of This Manual
- 17 Conventions Used in This Manual
- 20 Related Documentation
- 20 Customer Communication
- 21 Part 1 Before You Get Started
- 22 Chapter 1 How To Use This Book
- 25 Chapter 2 Installing and Configuring Your Data Acquisition Hardware 2
- 28 LabVIEW Data Acquisition Hardware Support
- 29 Installing Your National Instruments Device
- 30 Configuring Your DAQ Device in Windows
- 38 Special Considerations for LabVIEW for Windows NT
- 40 Configuring Your DAQ Device Using NI-DAQ on the Macintosh
- 42 Installing and Configuring Your DAQ Device in Unix
- 44 Installing and Configuring Your SCXI Chassis in Windows or on the Macintosh
- 53 Chapter 3 Basic LabVIEW Data Acquisition Concepts
- 53 Location of Common DAQ Examples
- 54 Locating the Data Acquisition VIs in LabVIEW
- 56 DAQ VI Organization
- 58 VI Parameter Conventions
- 59 Default and Current Value Conventions
- 59 Common DAQ VI Parameters
- 60 Error Handling
- 61 Channel,Port,and Counter Addressing
- 63 Limit Settings
- 66 Data Organization for Analog Applications
- 69 Chapter 4 Where You Should Go Next
- 71 Questions You Should Answer
- 74 Part 2 Catching the Wave with Analog Input 2
- 75 Chapter 5 Things You Should Know about Analog Input
- 75 Defining Your Signal
- 76 To What Is Your Signal Referenced?
- 77 Choosing Your Measurement System
- 77 Resolution
- 78 Device Voltage Range
- 79 Signal Voltage Range (Limit Settings)
- 80 Considerations for Selecting Analog Input Settings
- 83 Differential Measurement System
- 84 Referenced Single-Ended Measurement System
- 85 Nonreferenced Single-Ended Measurement System
- 87 LabVIEW and Analog Input
- 87 Channel Addressing with the AMUX-64T
- 88 The AMUX-64T Scanning Order
- 91 Important Terms You Should Know
- 93 Chapter 6 One-Stop Single-Point Acquisition
- 93 Single-Channel Single-Point Analog Input
- 94 Multiple-Channel Single-Point Analog Input
- 98 Using Analog Input/Output Control Loops
- 98 Using Software-Timed Analog I/O Control Loops
- 99 Using Hardware-Timed Analog I/O Control Loops
- 101 Improving Control Loop Performance
- 103 Chapter 7 Buffering Your Way through Waveform Acquisition
- 103 Can You Wait for Your Data?
- 104 Acquiring a Single Waveform
- 105 Acquiring Multiple Waveforms
- 108 Simple-Buffered Analog Input Examples
- 108 Simple-Buffered Analog Input with Graphing
- 109 Simple-Buffered Analog Input with Multiple Starts
- 111 Simple-Buffered Analog Input with a Write to Spreadsheet File
- 112 Triggered Analog Input
- 112 Do You Need To Access Your Data during Acquisition?
- 113 Continuously Acquiring Data from Multiple Channels
- 115 Circular-Buffered Analog Input Examples
- 116 Basic Circular-Buffered Analog Input
- 116 Other Circular-Buffered Analog Input Examples
- 118 Chapter 8 Controlling Your Acquisition with Triggers
- 118 Hardware Triggering
- 119 Digital Triggering
- 123 Analog Triggering
- 127 Software Triggering
- 132 Chapter 9 Letting an Outside Source Control Your Acquisition Rate
- 134 Externally Controlling your Channel Clock
- 136 Externally Controlling your Scan Clock
- 139 Externally Controlling the Scan and Channel Clocks
- 140 Part 3 Making Waves with Analog Output
- 141 Chapter 10 Things You Should Know about Analog Output
- 141 Single-Point Output
- 141 Buffered Analog Output
- 143 Chapter 11 One-Stop Single-Point Generation
- 143 Single-Immediate Updates
- 144 Multiple-Immediate Updates
- 146 Chapter 12 Buffering Your Way through Waveform Generation
- 146 Buffered Analog Output
- 148 Changing the Waveform during Generation: Circular-Buffered Output
- 150 Eliminating Errors from Your Circular-Buffered Application
- 151 Part 4 Getting Square with Digital I/O
- 152 Chapter 13 Things You Should Know about Digital I/O
- 154 Chapter 14 When You Need It Now — Immediate Digital I/O
- 157 Chapter 15 Shaking Hands with a Digital Partner
- 158 Sending Out Multiple Digital Values
- 161 Non-Buffered Handshaking
- 162 Buffered Handshaking
- 163 Simple Buffered Examples
- 165 Circular-Buffered Examples
- 167 Part 5 SCXI —Getting Your Signals in Great Condition
- 168 Chapter 16 Things You Should Know about SCXI
- 168 What is Signal Conditioning?
- 170 Amplification
- 171 Isolation
- 172 Filtering
- 172 Transducer Excitation
- 172 Linearization
- 173 Chapter 17 Hardware and Software Setup for Your SCXI System
- 175 SCXI Operating Modes
- 176 Multiplexed Mode for Analog Input Modules
- 177 Multiplexed Mode for Digital and Relay Modules
- 177 Parallel Mode for Analog Input Modules
- 178 SCXI Software Installation and Configuration
- 179 Chapter 18 Special Programming Considerations for SCXI
- 179 SCXI Channel Addressing
- 180 SCXI Gains
- 183 SCXI Settling Time
- 184 Chapter 19 Common SCXI Applications
- 185 Analog Input Applications for Measuring Temperature
- 185 Measuring Temperature with Thermocouples
- 188 VI Examples
- 192 Measuring Temperature with RTDs
- 194 Measuring Pressure with Strain Gauges
- 197 Analog Output Application Example
- 198 Digital Input Application Example
- 200 Digital Output Application Example
- 201 Multi-Chassis Applications
- 203 Chapter 20 SCXI Calibration—Increasing Signal Measurement Precision
- 203 EEPROM —Your System ’s Holding Tank for Calibration Constants
- 205 Calibrating SCXI Modules
- 206 SCXI Calibration Methods for Signal Acquisition
- 209 Calibrating SCXI Modules for Signal Generation
- 211 Part 6 Want Precision Timing —Use Counters
- 212 Chapter 21 Things You Should Know about Counters
- 213 Knowing the Parts of Your Counter
- 215 Knowing Your Counter Chip
- 216 Counting Operations When All Your Counters Are Used
- 217 Chapter 22 Generating A Square Pulse or Pulse Trains
- 217 Generating a Square Pulse
- 219 Generating a Single Square Pulse
- 221 Generating a Pulse Train
- 221 Generating a Continuous Pulse Train
- 223 Generating a Finite Pulse Train
- 225 Knowing the Accuracy of Your Counters
- 225 Stopping Counter Generations
- 227 Chapter 23 Measuring Pulse Width
- 227 Measuring a Pulse Width
- 228 Determining Pulse Width
- 229 Controlling Your Pulse Width Measurement
- 230 Increasing Your Measurable Width Range
- 231 Chapter 24 Measuring Frequency and Period
- 231 Knowing How and When to Measure Frequency and Period
- 232 Connecting Counters to Measure Frequency and Period
- 234 Measuring the Frequency and Period of Low Frequency Signals
- 235 Measuring the Frequency and Period of High Frequency Signals
- 238 Chapter 25 Counting Signal Highs and Lows
- 240 Counting Events or Elapsed Time
- 242 Gaining More Control over Your Counting Operations
- 245 Chapter 26 Dividing Frequencies
- 248 Part 7 Debugging Your Data Acquisition Application
- 249 Chapter 27 Debugging Techniques
- 249 Hardware Connection Errors
- 249 Software Configuration Errors
- 250 VI Construction Errors
- 250 Error Handling
- 251 Single-Stepping through a VI
- 251 Execution Highlighting
- 252 Using the Probe Tool
- 252 Setting Breakpoints and Showing Advanced DAQ VIs
- 253 Appendix A LabVIEW Data Acquisition Common Questions
- 258 Appendix B Customer Communication
- 258 Electronic Services
- 259 Telephone and Fax Support
- 260 Technical Support Form
- 261 Documentation Comment Form
- 262 Glossary
- 262 Numbers/Symbols
- 262 A
- 264 B-C
- 265 D
- 267 E-F
- 268 G-H
- 269 I
- 270 K-M
- 271 N
- 272 O-P
- 273 R
- 274 S
- 276 T
- 277 U-V
- 278 W
- 279 Index
- 279 A
- 282 B-C
- 284 D
- 286 E-F
- 287 G-H
- 288 I
- 289 J-M
- 290 N-P
- 291 Q-S
- 293 T
- 294 U-W
- 11 Figures
- 26 Figure 2-1.Installing and Configuring DAQ Devices
- 27 Figure 2-2.How NI-DAQ Relates to Your System and DAQ Devices
- 30 Figure 2-3.Locating WDAQConf in Windows
- 31 Figure 2-4.NI-DAQ Configuration Utility Window
- 32 Figure 2-5.Device Number N Window
- 36 Figure 2-6.Device Configuration Window in WDAQCONF on an ISA Bus Computer
- 37 Figure 2-7.Hardware Configuration Window in WDAQCONF
- 40 Figure 2-8.NI-DAQ Device Window Listing
- 41 Figure 2-9.Accessing the Device Configuration Window in NI-DAQ
- 42 Figure 2-10.Device Configuration and I/O Connector Windows in NI-DAQ
- 46 Figure 2-11.SCXI Configuration Window in WDAQCONF
- 47 Figure 2-12.SCXI Module Configuration Window in WDAQCONF
- 50 Figure 2-13.Accessing the NI-DAQ SCXI Configuration Window on the Macintosh
- 50 Figure 2-14.SCXI Configuration Window in NI-DAQ
- 55 Figure 3-1.Accessing the Data Acquisition Palette
- 56 Figure 3-2.Data Acquisition Palette Description
- 57 Figure 3-3.Analog Input VI Palette Organization
- 59 Figure 3-4.LabVIEW Help Window Conventions for the Al Single VI
- 61 Figure 3-5.The Error In Input and Error Out Output Error Clusters in LabVIEW
- 64 Figure 3-6.Limit Settings,Case 1
- 65 Figure 3-7.Limit Settings,Case 2
- 66 Figure 3-8.Example of a Basic 2D Array
- 67 Figure 3-9.2D Array in Row Major Order
- 67 Figure 3-10.2D Array in Column Major Order
- 68 Figure 3-11.Extracting a Single Channel from a Column Major 2D Array
- 68 Figure 3-12.Analog Output Buffer 2D Array
- 75 Figure 5-1.Types of Analog Signals
- 76 Figure 5-2.Grounded Signal Sources
- 77 Figure 5-3.Floating Signal Sources
- 78 Figure 5-4.The Effects of Resolution on ADC Precision
- 79 Figure 5-5.The Effects of Range on ADC Precision
- 80 Figure 5-6.The Effects of Limit Settings on ADC Precision
- 83 Figure 5-7.8-Channel Differential Measurement System
- 85 Figure 5-9.16-Channel RSE Measurement System
- 86 Figure 5-10.16-Channel NRSE Measurement System
- 93 Figure 6-1.The AI Sample Channel VI Help Window
- 94 Figure 6-2.Acquiring Data Using the AI Sample Channel VI
- 95 Figure 6-3.Acquiring a Voltage from Multiple Channels with the AI Sample Channels VI
- 96 Figure 6-4.The AI Single Scan VI Help Diagram
- 96 Figure 6-5.Using the Intermediate VIs for a Basic Non-Buffered Application
- 97 Figure 6-6.The Cont Acq&Chart (immediate)VI Block Diagram
- 99 Figure 6-7.Software-Timed Analog I/O
- 100 Figure 6-8.Analog IO Control Loop (hw timed)VI Block Diagram
- 104 Figure 7-1.How Buffers Work
- 105 Figure 7-2.The AI Acquire Waveform VI
- 105 Figure 7-3.The AI Acquire Waveforms VI
- 106 Figure 7-4.Using the AI Waveform Scan VI to Acquire Multiple Waveforms
- 107 Figure 7-5.Using the Intermediate VIs to Acquire Multiple Waveforms
- 108 Figure 7-6.Simple Buffered Analog Input Example
- 109 Figure 7-7.Simple Buffered Analog Input with Graphing
- 110 Figure 7-8.Taking a Specified Number of Samples with the AI Waveform Scan VI
- 111 Figure 7-9.Controlling the Sampling Rate in a Simple Buffered Acquisition
- 112 Figure 7-10.Writing to a Spreadsheet File after Acquisition
- 113 Figure 7-11.How a Circular Buffer Works
- 114 Figure 7-12.Continuously Acquiring Data with the AI Continuous Scan VI
- 115 Figure 7-13.Using Intermediate VIs to Continuously Acquire Time-Sampled Data
- 116 Figure 7-14.Basic Circular-Buffered Analog Input Using the Intermediate VIs
- 119 Figure 8-1.Diagram of a Digital Trigger
- 120 Figure 8-2.Digital Triggering with Your DAQ Device
- 121 Figure 8-3.Block Diagram of the Acquire N Scans-DTrig VI
- 123 Figure 8-4.Diagram of an Analog Trigger
- 124 Figure 8-5.Analog Triggering with Your DAQ Device
- 125 Figure 8-6.Block Diagram of the Acquire N Scans-ATrig VI
- 128 Figure 8-7.Timeline of Conditional Retrieval
- 129 Figure 8-8.The AI Read VI Conditional Retrieval Cluster
- 130 Figure 8-9.Block Diagram of the Acquire N Scans-ATrig VI
- 133 Figure 9-1.Channel and Scan Intervals Using the Channel Clock
- 133 Figure 9-2.Round-Robin Scanning Using the Channel Clock
- 134 Figure 9-3.Example of a TTL Signal
- 135 Figure 9-4.Getting Started Analog Input Example VI
- 136 Figure 9-5.Setting the Clock Source Code for External Conversion Pulses for E Series Devices
- 138 Figure 9-6.Externally Controlling Your Scan Clock with the Getting Started Analog Input Example VI
- 139 Figure 9-7.Controlling the Scan and Channel Clock Simultaneously
- 143 Figure 11-1.Single Immediate Update Using the AO Update Channels VI
- 144 Figure 11-2.Single Immediate Update Using Intermediate VI
- 145 Figure 11-3.Multiple Immediate Updates Using Intermediate VI
- 146 Figure 12-1.Waveform Generation Using the AO Generate Waveforms VI
- 147 Figure 12-2.Waveform Generation Using the AO Waveform Gen VI
- 148 Figure 12-3.Waveform Generation Using Intermediate VIs
- 149 Figure 12-4.Circular Buffered Waveform Generation Using the AO Continuous Gen VI
- 150 Figure 12-5.Circular Buffered Waveform Generation Using Intermediate VIs
- 152 Figure 13-1.Digital Ports and Lines
- 155 Figure 14-1.The Easy Digital VIs
- 159 Figure 15-1.Connecting Signal Lines for Digital Input
- 160 Figure 15-2.Connecting Digital Signal Lines for Digital Output
- 161 Figure 15-3.Non-buffered Handshaking Using the DIO Single Read/Write VI
- 162 Figure 15-4.Non-buffered Handshaking Using the DIO Single Read/Write VI
- 163 Figure 15-5.Pattern Generation Using the DIO-32F Devices
- 164 Figure 15-6.Pattern Generation Using DAQ Devices (Other Than DIO-32F Devices)
- 164 Figure 15-7.Reading Data with the Digital VIs Using Digital Handshaking (DIO-32F Devices)
- 165 Figure 15-8.Reading Data with the Digital VIs Using Digital Handshaking
- 166 Figure 15-9.Digital Handshaking Using a Circular Buffer
- 170 Figure 16-1.Common Types of Transducers/Signals and Signal Conditioning
- 171 Figure 16-2.Amplifying Signals Near the Source to Increase Signal-to-Noise Ratio
- 173 Figure 17-1.SCXI System
- 174 Figure 17-2.Components of an SCXI System
- 175 Figure 17-3.SCXI Chassis
- 189 Figure 19-1.Measuring a Single Module with the Acquire and Average VI
- 190 Figure 19-2.Measuring Temperature Sensors Using the Acquire and Average VI
- 191 Figure 19-3.Continuously Acquiring Data Using Intermediate VIs
- 195 Figure 19-4.Half-Bridge Strain Gauge
- 216 Figure 21-1.CTR Control VI Front Panel and Block Diagram
- 218 Figure 22-1.Pulse Created with Positive Polarity and Toggled Output
- 219 Figure 22-2.Pulse Duty Cycles
- 220 Figure 22-3.Physical Connections for Generating a Square Pulse
- 220 Figure 22-4.Using the Generate Delayed Pulse VI
- 222 Figure 22-6.Physical Connections for Generating a Square Pulse
- 222 Figure 22-7.Generating a Continuous Pulse Train with the Generate Pulse Train VI
- 223 Figure 22-8.Generating a Continuous Pulse Train Using Intermediate VIs
- 224 Figure 22-9.Physical Connections for Generating a Finite Pulse Train
- 224 Figure 22-10.Creating a Finite Pulse Train Using the Intermediate VIs
- 225 Figure 22-11.Uncertainty of One Timebase Period
- 226 Figure 22-12.Using the Generate Delayed Pulse and Stopping the Counting Operation
- 226 Figure 22-13.Stopping a Generated Pulse Train
- 227 Figure 23-1.Counting Input Signals to Determine Pulse Width
- 228 Figure 23-2.Physical Connections for Determining Pulse Width
- 228 Figure 23-3.Determining Pulse Width Using the Pulse Width or Period VI
- 229 Figure 23-4.Measuring Pulse Width Using Intermediate VIs
- 231 Figure 24-1.Measuring Square Wave Frequency
- 232 Figure 24-2.Measuring a Square Wave Period
- 233 Figure 24-3.Physical Connections for Period Measurement of Low Frequency Signals
- 233 Figure 24-4.Physical Connections for Period Measurement of High Frequency Signals
- 234 Figure 24-5.Measuring Low-Frequency Signals with Measure Pulse Width or Period VI
- 235 Figure 24-6.Measuring Low-Frequency Signals Using Intermediate VIs
- 236 Figure 24-7.Measure Frequency VI
- 236 Figure 24-8.Measuring High-Frequency Signals Using Intermediate VIs
- 238 Figure 25-1.Connecting Counters to Your Device to Count Events or Time
- 240 Figure 25-2.Using the Count Events or Time VI to Count External Events
- 241 Figure 25-3.Using the Count Events or Time VI to Measure Elapsed Time
- 242 Figure 25-4.Using the Intermediate VIs to Count External Events
- 243 Figure 25-5.Using the Intermediate VIs to Measure Elapsed Time
- 245 Figure 26-1.Wiring Your Counters for Frequency Division
- 246 Figure 26-2.Programming a Single Divider for Frequency Division
- 251 Figure 27-1.Error Checking Using the General Error Handler VI
- 251 Figure 27-2.Error Checking Using the Simple Error Handler VI
- 15 Tables
- 28 Table 2-1.LabVIEW DAQ Hardware Support for Windows
- 29 Table 2-2.LabVIEW DAQ Hardware Support for Macintosh
- 82 Table 5-1.Measurement Precision for Various Device Ranges and Limit Settings
- 87 Table 5-2.Analog Input Channel Range
- 89 Table 5-3.Scanning Order for Each DAQ Device Input Channel
- 90 Table 5-4.Scanning Order for Each DAQ Device Input Channel with Four AMUX-64Ts
- 137 Table 9-1.External Scan Clock Input Pins
- 168 Table 16-1.Phenomena and Transducers
- 182 Table 18-1.SCXI-1100 Channel Arrays,Input Limits Arrays,and Gains
- 239 Table 25-1.Adjacent Counters for Counter Chips