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

Chapter 8

Digital I/O

Types of Digital Acquisition/Generation

There are several types of digital acquisition/generation: unstrobed

(or static) and strobed (or handshaked), which includes pattern I/O. With unstrobed digital I/O, your system updates the digital lines immediately through software calls. With handshaked digital I/O, a device or module accepts or transfers data after a digital pulse has been received. With pattern I/O, data, or patterns, are written or read at fixed rate. The 653X family of boards can perform pattern I/O.

Handshaking can be either nonbuffered or buffered. Not all devices and modules support handshaking.

Knowing Your Digital I/O Chip

The digital I/O chips in most National Instruments DAQ devices belong to one of three families: 653X, E Series, or 8255.

The 653X family includes devices such as the PXI-6533 and PCI-DIO-32HS.

The E Series family typically has one 8-bit digital I/O port as a part of the DAQ-STC.

The 8255 family includes low-cost Lab/1200 devices and 650x type boards (DIO-24 and DIO-96) which use the 8255 DIO chip.

Note Some E Series boards have more than eight digital lines. These boards typically have an additional 8255 chip. This means that with regards to digital I/O, they belong to both the E Series and 8255 families.

653X Family

The 653X family of digital devices uses the National Instruments DAQ-DIO ASIC, a 32-bit general-purpose digital I/O interface specifically designed for high performance. The 653X devices can perform unstrobed I/O, pattern I/O, and high-speed data transfer using a wide range of handshaked protocols. These devices also are equipped with sophisticated trigger circuitry to start or stop the digital data transfer based on several different types of events. These devices also feature the RTSI bus (PCI and AT version) and PXI trigger bus (PXI) to synchronize digital and timing signals with other devices.

LabVIEW Measurements Manual

8-2

www.ni.com

Chapter 8

Digital I/O

E Series Family

E Series boards have one port of eight digital I/O lines. The direction of each line is software programmable on a per-line basis. The digital input circuitry has an 8-bit register that can read back outgoing digital signals and read incoming signals. These boards perform unstrobed I/O. Some E Series boards have an additional 24 digital I/O lines provided through an

8255 PPI. For discussions in this document, these boards can be thought of as belonging to both the E Series and 8255 families.

8255 Family

Many digital I/O boards use the 8255 programmable peripheral interface (PPI). This PPI controls 24 bits of digital I/O and has three 8-bit ports: A, B, and C. Each port can be programmed as input or output. Ports A and B always are used for digital I/O, while port C can be used for I/O or handshaking. Most boards have from 3 to 12 8-bit ports. A port width must be a multiple of 8 bits with a maximum of 32 bits. These boards perform unstrobed or handshaked digital I/O.

Immediate Digital I/O

This section focuses on transferring data across a single port. The most common way to use digital lines is with unstrobed (immediate) digital I/O. All DAQ devices and SCXI modules with digital components support this mode.

When your program calls a function (subVI) in unstrobed digital I/O mode, LabVIEW immediately writes or reads digital data. If the digital direction is set to output, LabVIEW updates the digital line or port output state. If the digital direction is set to input, LabVIEW returns the current digital line or port value. For each function called, LabVIEW inputs or outputs only one value on each digital line in this mode. You can completely configure port (and for some devices, line) direction in software, and you can switch directions repeatedly in a program.

Application examples of unstrobed digital I/O include controlling relays and monitoring alarm states. You also can use multiple ports or groups of ports to perform digital I/O functions. If you want to group digital ports, you must use Intermediate or Advanced I/O VIs in LabVIEW.

© National Instruments Corporation

8-3

LabVIEW Measurements Manual

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