368
5
5 High-speed Input5.4.4 HSZ Range Comparison
●
Example: The following describes instruction programming.
Execute when the DPLSY instruction
lags behind the DHSZ instruction by
one scan cycle
The program is running
HSZPLSY speed mode
HSZ_PLSY speed and
frequency (lower 16 bits)
The program controls the operation mode of Y0 output frequency based on the present counting value of
C251. The following is the equivalent comparison and output frequency table.
The initial variable
of [S1] table is D0
Comparison Value (32 Bits)
Y0 Output Number Table Counter D8131
(High-order, Low-order)
Number of rows
of [S2] table
indicated by K5
(D1, D0) (D3, D2) 0
(D5, D4) (D7, D6) 1
(D9, D8) (D11, D10) 2
(D13, D12) (D15, D14) 3
(D17, D16) (D19, D18) 4
Parameter
example
K1000 K2000
When the instruction is
executed,
the counter follows the cycle
from 0 to 1 to 2 to 3 to 4 to 0.
K1500 K3000
K2000 K5000
K3000 K9000
K0 K0
Description
After receiving pulses, immediately
carry out comparison. When they
are matched (for example, C251
equal to 1000), Y0 output frequency
will change.
The output frequency of Y0 output
is changed to the set value in the
corresponding column of the table.