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

Chapter 4 Example Measurements

LabVIEW makes it easy to measure Vrms. Figure 4-9 shows the data acquisition system for measuring Vrms.

Figure 4-9. Data Acquisition System for Vrms

Figure 4-10 shows what the actual sinusoid signal might look like.

Figure 4-10. Sinusoidal Voltage

The block diagram in Figure 4-11 shows the software to measure Vrms if you are using DAQ Named Channels.

Figure 4-11. Vrms Using DAQ Named Channels

The DAQ subVI AI Acquire Waveform acquires a waveform. The number of samples and sample rate define the waveform. The Basic Averaged DC-RMS VI takes the waveform and estimates the RMS and DC components. For a sinusoidal waveform centered about zero, this subVI returns Vrms. For a sinusoidal waveform offset from zero, the DC value

© National Instruments Corporation

4-7

LabVIEW Measurements Manual

Chapter 4 Example Measurements

returns the DC shift and the RMS value returns Vrms as if the waveform were centered about zero. One advantage of using the Basic Averaged

DC-RMS VI is that it can make good estimations with the least amount of data. According to the Nyquist Theorem you must acquire at a rate at least twice as fast as the signal being acquired in order to get reliable frequency data. However, Vrms is not concerned with frequency data. It is related to the shape of the waveform. Typically, to get a good idea of a waveform shape, you must acquire at five to ten times the rate of the waveform. The advantage of the Basic Averaged DC-RMS VI is that it makes a good estimation even when acquiring at only three times the frequency of the waveform.

This same AC voltage measurement can be made using an instrument. Figure 4-12 shows the acquisition system for this measurement. In this case, a stand-alone instrument is shown. However, this could also be an instrument board that plugs directly into a PC.

Figure 4-12. Instrument Control System for Vrms

Figure 4-13 shows the block diagram to measure Vrms using the IVI class driver VIs. In this example, the instrument is first initialized using a logical name to create a session. Next the instrument is configured for the desired measurement, in this case AC Volts. After configuration, the measurement reading is taken. Finally the session is closed.

Figure 4-13. Vrms Using an Instrument

LabVIEW Measurements Manual

4-8

www.ni.com

Chapter 4 Example Measurements

How to Measure Current

The 4-20 mA loop has been an industry standard for many years. It is popular because it couples a wide dynamic range with a live zero of 4 mA for open circuit detection in a system that does not produce sparks. Other advantages include a variety of compatible hardware, a long distance up to 2000 feet, and low cost. The 4-20 mA loop has a variety of uses including digital communications, control applications, and reading remote sensors. This section describes how to measure current in order to read a remote sensor.

In this example, you measure current in order to read the fluid level in a tank. Figure 4-14 shows a data acquisition system that could be used to do this.

Figure 4-14. Data Acquisition System for Current

Since MIO-type DAQ devices cannot directly measure current, the voltage is read across a precision resistor used in series with the current loop circuit. Figure 4-15 shows the current loop wiring diagram.

Figure 4-15. Current Loop Wiring

© National Instruments Corporation

4-9

LabVIEW Measurements Manual

Chapter 4 Example Measurements

The purpose of this 4-20 mA current loop is for the sensor to transmit a signal in the form of a current. In the diagram, the Level Sensor and Remote Sensor Electronics are typically built into a single unit. An external 24 VDC supply powers the sensor. The current is regulated by the sensor and represents the value of whatever parameter the sensor might measure, in this case the fluid level in a tank. The DAQ device reads the voltage drop across the 249Ω resistor Rp. Then Ohm’s Law is used to derive the current:

V( Volts)

I( mA) = ---------------------

Rp( Kohms)

Because the current is 4-20 mA, and Rp is 249Ω , V ranges from 0.996 V to 4.98 V. This is within the range that DAQ devices can read. While the above equation is useful for calculating the current, the current typically represents a physical quantity you want to measure. In this example, the level sensor measures 0 to 50 feet. This means 4 mA represents 0 feet and 20 mA represents 50 feet. Assuming this to be a linear relationship, it can be described by the graph and equation shown in Figure 4-16 where L is the tank level and I is the current.

Figure 4-16. Linear Relationship between Tank Level and Current

Using the Ohm’s Law equation and substituting 0.249 for the value of Rp, you can derive L in terms of our measured voltage:

 

25 V

 

25

L =

8--------0.249------------

--2---

LabVIEW Measurements Manual

4-10

www.ni.com

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