348
5
5 High-speed Input5.2.3 HSZ Range Comparison
●
The following is an equivalent comparison table:
The initial variable
of [S1] table is D0
Comparison Value (32 Bits)
Y Output Number ON/OFF Table Counter D8130
(High-order, Low-order)
The number of rows
of [S2] table is K4
(D1, D0) D2 D3 0
(D5, D4) D6 D7 1
(D9, D8) D10 D11 2
(D13, D12) D14 D15 3
Parameter example
K100 H10 K1
When the instruction
is executed,
the counter follows
the cycle from 0 to 1
to 2 to 3 to 0.
K150 H11 K1
K200 H10 K0
K300 H11 K0
Description
Operate after receipt of the
set pulse value.
H10 indicates Y10
port. H11 indicates
Y11 port.
K1 indicates ON.
K0 indicates OFF.
●
Notes to actions:
100
150
200
300
Count value of C252
Y10
Y11
M8131
When the present value of a high-speed counter C251 specied by [S] is equal to the set value (D1, D0),
the Y output specied by D2 copies the state of OFF (D3 = K0) or ON (D3 = K1) and remains in that state.
The action of the Y output is processed completely in interrupt mode.
When the present value of C251 is equal to the rst group of set values, D8130 = K1. When it is equal to
the second group of set values, D8130 = K2. When comparison operations are performed successively till
the end of the last comparison action, M8131 = ON. After a scan cycle, D8130 is cleared and compared
with the rst group of set values again.
When the condition contact M10 of the instruction is turned OFF, execution of the instruction is interrupted,
D8130 is cleared, but all output states related to the instruction remain unchanged. When the instruction is
scanned for the rst time and the user program is executed, settings of the comparison table are dened.
Parameter settings of the table should be completed before execution of the instruction.
The table comparison instruction can be used in the user program for only once. The instruction can be
used in combination with the HSCS, HSCR, or HSZ instruction for other purposes, but there should be less
than eight simultaneously active instructions.
c) Frequency control mode
When the instruction parameter [D] is set to special auxiliary relay M8132, the instruction is in frequency
control mode. In combination with the DPLSY instruction, it can control the output frequency of DPLSY by
the present value of high-speed counter. Notes to operands: