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

Chapter 5 Introduction to Data Acquisition in LabVIEW

Figure 5-9. Waveform Graph

The waveform data (Y) is plotted on the graph. The trigger time (t0) is 7:00:00 P.M. and is the first point on the x-axis. The ∆ t of the waveform (dt) is 1.00 millisecond, so the 10,000 scans are distributed over 10 seconds with the last data value plotted at 7:00:10 P.M.

Channel, Port, and Counter Addressing

The Analog Input and Analog Output VIs have a channels parameter where you can specify the channels from which the VIs read or to which they write. The Digital Input and Output VIs have a similar parameter, called digital channel list, and the equivalent value is called counter list for the Counter VIs.

Note To simplify the explanation of channel addressing concepts, the channels, digital channels, and counter list parameters are all referred to as channels in this section.

Each channel you specify in the channels parameter becomes a member of a group. For each group, you can acquire or generate data on the channels listed in the group. VIs scan (during acquisition) or update (during generation) the channels in the same order they are listed. To erase a group, pass an empty channels parameter and the group number to the VI or assign a new channels parameter to the group. You can change groups only at the Advanced VI level.

© National Instruments Corporation

5-11

LabVIEW Measurements Manual

Chapter 5 Introduction to Data Acquisition in LabVIEW

DAQ Channel Name Control

The channels parameter in the Analog and Digital VIs is a DAQ Channel Name control. If you configured your channels in the DAQ Channel Wizard, the controls menu lists the channel names of your configured channels. Select a channel name from the menu or type a channel name or number into the string area of the control.

Channel Name Addressing

If you use the DAQ Channel Wizard to configure your analog and digital channels, you can address your channels by name in the channels parameter in LabVIEW. channels can be an array of strings or, as with the Easy VIs, a scalar string control, as shown in Figure 5-10. If you have a channels array, you can use one channel entry per array element, specify the entire list in a single element, or use any combination of these two methods. If you enter multiple channel names in channels, you must configure all of the channels in the list for the same DAQ device. If you configure channels with names of temperature and pressure, both of which are measured by the same DAQ device, you can specify a list of channels in a single element by separating them by commas—for example, temperature,pressure. If you configure channels with names of temp1, temp2, and temp3, you can specify a range of channels by separating them with a colon, for example, temp1:temp3. In specifying channel names, spelling and spaces are important, but case is not.

Figure 5-10. Channel Controls

When using channel names, you do not need to wire the device, input limits, or input config input parameters. LabVIEW always ignores the device input when using channel names. LabVIEW configures your hardware in terms of your channel configuration.

In addition, LabVIEW orders and pads the channels specified in channels as needed according to any special device requirements.

LabVIEW Measurements Manual

5-12

www.ni.com

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