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

Chapter 10 High-Precision Timing (Counters/Timers)

Knowing Your Counter Chip

Most National Instruments DAQ devices contain one of four different counter chips: the TIO-ASIC, the DAQ-STC, the Am9513, or the 8253/54 chip. Typically, 660x devices use the TIO-ASIC chip. E Series devices (for example, the PCI-MIO-16E-1) use the DAQ-STC chip. Legacy-type MIO devices (for example the AT-MIO-16) use the Am9513 chip. Low-cost Lab/1200-type devices (for example the PCI-1200) use the 8253/54 chip. If you are not sure which chip your device uses, refer to your hardware documentation.

Rising-Edge Gating

SOURCE

Counter Value

1 2 3 4 5 6 7 8 9 10 count rising SOURCE edge

GATE

Falling-Edge Gating

SOURCE

Counter Value

1 2 3 4 5 6 7 8 count rising SOURCE edge

GATE

High-Level Gating

SOURCE

Counter Value

1

 

2

 

3

 

4

 

5

 

6

count rising SOURCE edge

 

 

 

 

 

GATE

Low-Level Gating

SOURCE

Counter Value

1

 

2

 

3

 

4

 

5

 

6 count rising SOURCE edge

 

 

 

 

 

GATE

Figure 10-1. Counter Gating Modes

© National Instruments Corporation

10-3

LabVIEW Measurements Manual

Chapter 10 High-Precision Timing (Counters/Timers)

TIO-ASIC

You can configure the TIO-ASIC to count either low-to-high or high-to-low transitions of the SOURCE input. The counter has a 32-bit count register with a counting range of 0 to 232–1. It can be configured to increment or decrement for each counted edge. Furthermore, you can use an external digital line to control whether the count register increments or decrements, which is useful for encoder applications. Of the gating modes shown in Figure 10-1, the gating modes the TIO-ASIC supports depends upon the application. This counter chip supports buffered counter measurements. You can set the configuration parameters described above using the Advanced VI, Counter Set Attribute.

DAQ-STC

You can configure the DAQ-STC to count either low-to-high or high-to-low transitions of the SOURCE input. The counter has a 24-bit count register with a counting range of 0 to 224–1. It can be configured to increment or decrement for each counted edge. Furthermore, you can use an external line to control whether the count register increments or decrements, which is useful for encoder applications. Of the gating modes shown in Figure 10-1, the gating modes the DAQ-STC supports depends upon the application. You can set the configuration parameters discussed above using the Advanced VI, Counter Set Attribute.

Am9513

You can configure the Am9513 to count either low-to-high or high-to-low transitions of the SOURCE input. The counter has a 16-bit count register with a counting range of 0 to 65,535, and can be configured to increment or decrement for each counted edge. The Am9513 supports all of the gating modes shown in Figure 10-1. You can set the configuration parameters discussed above using the Advanced VI, CTR Mode Config.

8253/54

The 8253/54 chip counts low-to-high transitions of the CLK input. The counter has a 16-bit count register with a counting range of 65,535 to 0 that decrements for each counted edge. Of the gating modes shown in Figure 10-1, the 8253/54 supports only high-level gating. For single-pulse output, the 8253/54 can create only negative-polarity pulses. For this reason, some applications require the use of a 7404 inverter chip to produce a positive pulse. The 14-pin 7404 is a common chip available from many electronics store, and can be powered with the 5 V available on most DAQ devices. Figure 10-2 shows how to wire a 7404 chip to invert a signal.

LabVIEW Measurements Manual

10-4

www.ni.com

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