367
5
5 High-speed Input 5.4.4 HSZ Range Comparison
●
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:
[S1] only corresponds to variables of register D and indicates the head address of the comparison table. V
can be used. After the instruction is enabled, [S1] will no longer be affected by V.
[S2] can use the constant K or H only to indicate the number of rows of the table. 1 ≤ (K or H) ≤ 128. V can
be used. After the instruction is enabled, [S1] will no longer be affected by V or Z.
[S] variables must be high-speed counters C252-C254.
[D] is set to M8132 and indicates frequency control mode.
The instruction can be used in the user program for only once. Registers in the table should be preset.