5.5 Quadrature Bi-pulse Counter

This function counts up or down the quadrature bi-pulse (2-phase pulses whose phases are shifted 90° each other). Counts up when phase A precedes, and counts down when phase B precedes.

1-edge count:

The current value increments or decrements at the rising or falling edge of the phase B input after the phase A input has turned on.

2-edge Count:

The current value increments or decrements at the rising or falling edge of the phase B input after the phase A input has turned on or off.

4-edge Count:

The current value increments or decrements at the rising or falling edges of the phase A and B inputs.

Both rising and falling edges of each phase are counted.

Consequently, 4 times count value against the pulse frequency is obtained.

When the count value reaches the comparison value 1 (or 2), the I/O interrupt program#1 (or #2) is activated (if the interrupt enable flag for each is ON). This counter operation is enabled while the soft-gate is ON. The count value is reset to 0 when the soft-gate is changed from ON to OFF. The count value is also reset to 0 when the reset input comes ON. When the soft-gate is OFF, the count value can be changed by writing the data into the comparison value 1 (or 2) register and setting the count preset flag 1 (or 2) to ON. The comparison value 1 and 2 can be changed even when the soft-gate is ON. The count value range is 0 to 4294967295 (32-bit data).

Page 92

Page 100
Image 100
Toshiba V200 user manual Quadrature Bi-pulse Counter, Edge count