3. Instruction Set
API
Mnemonic Operands Function
54 D
HSCR
Type
OP
Bit Devices Word devices Program Steps
X Y M S K H KnX
KnY
KnM
KnS
T C D E F
DHSCR: 13 steps
SS2
SX2
SS2
SX2
SS2
SX2
Operands:
S
1
: Comparative value S
2
: No. of high speed counter D: Comparison result
Explanations:
1. DHSCR compares the current value of the counter S
2
against a compare value S
1
. When the
counters current value changes to a value equal to S
1
, then device D is reset to OFF. Once
reset, even if the compare result is no longer unequal, D will still be OFF.
2. If D is specified as Y0~Y3, Y4 and Y6, when the instruction is executed and the count value
equals to S
1
, the compare result will immediately output to the external outputs Y0~Y3, Y4 and
Y6. However, other Y outputs will still be updated till the end of program. Also, M and S
devices, not affected by the program scan time, will be immediate updated as the Y devices
specified by this instruction. For EC5, the available Y outputs are Y0, Y2, Y4 and Y6.
3. Operand D can be specified with high speed counters C232~C254 (SS2/SA2/SX2/SE does
not support C232) the same as S
2. .
4. 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.12 in this manual.
5. For explanations on software counters and hardware counters, please refer to API53 DHSCS.
6. For program examples, please refer to Program Example1 and 2 in API53 DHSCS.