6F3B0253

8. Special I/O Functions

Sample program

(H0803)

In this example, 2051 (H0803) is set in SW16. As a result, the quadrature bi-pulse counter is selected.

When R010 comes ON, the data 150000 is set into the comparison value 1 register (SW19SW18), and 200000 is set into the comparison value 2 register (SW21 SW20). While R010 is ON, the soft-gate (S240), the interrupt enable flag 1 (S241) and the interrupt enable flag 2 (S249) are set to ON to enable the counter operation.

The count value is stored in SW23SW22.

When R010 is OFF and R011 comes ON, the count value is preset to the data of D0101D0100.

Basic Hardware and Function 267

Page 269
Image 269
Toshiba 6F3B0253 user manual Sample program