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

Chapter 8

Digital I/O

Using Channel Names

If you have configured channels using the DAQ Channel Wizard, digital channel can consist of a digital channel name. The channel name may refer to either a port or a line in a port. You do not need to specify

device, line, or port width because LabVIEW does not use these inputs if a channel name is specified in digital channel.

As an alternative, digital channel can consist of a port number. The port number specifies the port of digital lines that you will use during your digital operation. In this case, to further define your digital operation, you also must specify device, line, and port width where applicable.

The device input identifies the DAQ device you are using. The line input is an individual port bit or line in the port specified by digital channel. The port width input specifies the number of lines that are in the port you are using.

If you are using an SCXI module for nonlatched digital I/O and you are not using channel names, refer to the SCXI Channel Addressing section in Chapter 9, SCXI—Signal Conditioning, for instructions on how to specify port numbers.

The pattern or line state is the value(s) you want to read from or write to a device. You can display pattern values in decimal (default), hexadecimal, octal, or binary form.

Immediate I/O Using the Easy Digital VIs

You can use the Easy Digital VIs for nonlatched digital I/O. There are four Easy I/O subVIs you can use to immediately read data from or write data to a single digital line or to an entire port. These subVIs are available on the

Functions»Data Acquisition»Digital I/O palette. Use the Easy

Digital VIs for most digital testing purposes. All of the Easy Digital VIs have error reporting. The following sections identify the examples you can access for further information.

653X Family

The examples Read from 1 Dig Line(653X) VI and Write to 1 Dig Line(653X) VI show how to use the Easy Digital I/O VIs to read from or write to one digital line. Refer to the VIs in the examples\daq\

digio.llb for examples of how to use the Easy Digital I/O VIs. You can write similar examples to read from or write to a single port.

LabVIEW Measurements Manual

8-4

www.ni.com

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