Добавил:
Upload Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
LabVIEW-Measurements.pdf
Скачиваний:
61
Добавлен:
29.05.2015
Размер:
3.37 Mб
Скачать

Chapter 5 Introduction to Data Acquisition in LabVIEW

major 2D array. Then use the Transpose 2D Array function to convert the array to a column major array.

The finished array is ready for the AO Write VI, as shown in Figure 5-19.

Figure 5-19. Analog Output Buffer 2D Array

Where You Should Go Next

This section directs you to the chapter in this manual best suited to answer questions about your data acquisition application. You answer

a series of questions that help determine the purpose of your application. At first, the questions are general and then become more focused until you reach a reference to a specific section in the manual dealing with your type of application. The questions will guide you to the relevant sections in the manual for your particular application.

1.What kind of Measuring Device do I use—DAQ Device or SCXI Module?

Are you working in an environment with a lot of EMI? If you are, you may have SCXI modules connected to your DAQ device or the parallel port of your computer. SCXI modules can filter and isolate noise from signals. They also can amplify low signals. SCXI modules expand the number of channels to acquire or generate data.

DAQ devices are primarily used alone when extra signal conditioning is not necessary.

If you are using a DAQ device, read question 2. If you are using SCXI, go to Chapter 9, SCXI—Signal Conditioning.

2.Analog or Digital Signal Analysis?

Does your signal have two discrete values that are TTL signals? If so, you have a digital signal. Otherwise, you have an analog signal. The type of information you would need to know from an analog signal is the level (discrete value), shape, and frequency content.

© National Instruments Corporation

5-19

LabVIEW Measurements Manual

Chapter 5 Introduction to Data Acquisition in LabVIEW

3.Analog or Digital Signal Acquisition or Generation?

If you want to measure and analyze signals from a source outside the computer, you want to acquire signals. If you want to send signals to an outside instrument to control its operation, you want to generate signals.

If you want to acquire analog signals, go to question 5. If you want to generate analog signals, refer to question 6. If you want to acquire and generate analog signals, refer to theSingle-Point Acquisition section in Chapter 6, Analog Input.

If you want to acquire or generate digital signals, read question 4.

4.Digital or Counter Interfacing?

Digital I/O interfaces primarily with binary operations, such as turning external equipment on or off, or sense logic states, such as the on/off position of the switch. Counters generate individual digital pulses or waves or count digital events, like how many times a digital signal rises or falls in value.

If you are performing digital I/O, refer to question 9. If you need to use counters, read question 10.

5.Single-Point or Multiple-Point Acquisition?

Do you want to acquire a signal value(s) at one time or over a period of time at a certain rate? If you measure a signal at a given instant of time, you are performing single-point acquisition. If you measure signals over a period of time at a certain rate, you are performing multiple-point or waveform acquisition.

If you want single-point acquisition, refer to theSingle-Point Acquisition section in Chapter 6, Analog Input. If you want multiple-point acquisition, read question 7.

6.Single-Point or Multiple-Point Generation?

Are you outputting a steady (DC) signal or are you generating a changing signal at a certain rate? A constant or slowly changing signal output is called single-point generation. The output of a changing signal at a certain rate is called multiple-point or waveform generation.

If you want to perform single-point generation, refer to the

Single-Point Generation section in Chapter 7, Analog Output. If you want multiple-point generation, refer to the Waveform Generation (Buffered Analog Output) section in Chapter 7, Analog Output.

LabVIEW Measurements Manual

5-20

www.ni.com

Chapter 5 Introduction to Data Acquisition in LabVIEW

7.Triggering a Signal or Using a Clock?

You can start an analog acquisition when a certain analog or digital value occurs by triggering the acquisition.

If you want to trigger an analog acquisition, refer to the Controlling Your Acquisition with Triggers section in Chapter 6, Analog Input.

8.Multiple-Point Acquisition with an Internal or External Clock?

Multiple-point or waveform acquisition can be done at a rate set by an internal DAQ device clock or an external clock. The external clock is a TTL signal produced at a certain rate.

If you want to acquire a waveform at the rate of an external signal, refer to the Letting an Outside Source Control Your Acquisition Rate section in Chapter 6, Analog Input. If not, read the Buffered Waveform Acquisition section in Chapter 6, Analog Input.

9.Immediate, Handshaked, or Timed Digital I/O?

If you want your program to read the latest digital input or immediately write a new digital output value, use non-latched (immediate) digital I/O. When a DAQ device accepts or transfers data after a digital pulse is received, it is called latched (handshaked) digital I/O. With latched digital I/O, you can store the values you want to transfer in a buffer.

Only one value is transferred after each handshaked pulse. If you want to read or write digital data (patterns) at a fixed rate using a clock source, use timed digital I/O.

If you want to use non-latched (immediate) digital I/O, refer to the Immediate Digital I/O section in Chapter 8, Digital I/O. If you want to perform latched (handshaked) digital I/O, refer to the Handshaking section in Chapter 8, Digital I/O. If you want to perform timed digital I/O, refer to the Immediate Digital I/O section in Chapter 8, Digital I/O.

10.Counters—Counting or Generating Digital Pulses?

If you want to generate digital pulses from a counter at a certain rate, read the Generating a Square Pulse or Pulse Trains section in Chapter 10, High-Precision Timing (Counters/Timers). If you want to measure the width of a digital pulse, refer to the Measuring Pulse Width section in Chapter 10, High-Precision Timing (Counters/Timers). If you want to measure the frequency or period of a digital signal, refer to the Measuring Frequency and Period section in Chapter 10, High-Precision Timing (Counters/Timers). If you just

© National Instruments Corporation

5-21

LabVIEW Measurements Manual

Chapter 5 Introduction to Data Acquisition in LabVIEW

want to count how many times a digital signal rises or falls, refer to the

Counting Signal Highs and Lows section in Chapter 10, High-Precision Timing (Counters/Timers). To learn how to slow the frequency of a digital signal, refer to the Dividing Frequencies section in Chapter 10, High-Precision Timing (Counters/Timers).

LabVIEW Measurements Manual

5-22

www.ni.com

Соседние файлы в предмете [НЕСОРТИРОВАННОЕ]