3. Instruction Set
3-131
API Mnemonic Operands Function
55
D HSZ High Speed Zone
Compare
Controllers
ES2/EX2 SS2 SA2
SE SX2
Bit Devices Word devices Program Steps Type
OP X Y M S K H KnX KnY KnM KnS T C D E F
S1 * * * * * * * * **
S2 * * * * * * * * **
S *
D * * *
DHSZ: 17 steps
PULSE 16-bit 32-bit
ES2/EX2 SS2 SA2
SE SX2 ES2/EX2 SS2 SA2
SE SX2 ES2/EX2 SS2 SA2
SE SX2
Operands:
S1: Lower bound of the comparison zone S2: Upper bound of the comparison zone S: No. of
high speed counter D: Comparison result (3 consecutive devices)
Explanations:
1. S1 should be equal to or smaller than S2 (S1 S2).
2. If D is specified as Y0~Y3 in this instruction, the compare result will immediately output to the
external outputs Y0~Y3. However, other Y outputs will still be updated till the end of program.
Also, M and S devices, not affected by the program scan cycle, will be immediately updated as
well.
3. High speed counters include software high speed counters and hardware high speed counters.
In addtiion, there are also two types of comparators including software comparators and
hardware comparators. For detailed explanations of high speed counters please refer to
section 2.9 in this manual.
4. Explanations on software comparators for DHSZ instruction
¾ Corresponding table for software counters and comparators:
Counter C232 C233 C234 C235 C236 C237 C238 C239 C240 C241 C242
Hi-speed compare
Set/Reset
Share 6 software comparators
¾ Block diagram of software counters and comparators:
Software
Counter 1
Software
counter 2
Software
counter 8
Count value
Software
comparatorx 6
1
2
6
Set / re set
Set / re set
Set / re set