DVP-ES2/EX2/EC5/SS2/SA2/SX2/SE&TP Operation Manual - Programming
-134
API
Mnemonic Operands Function
SS2
SX2
53 D HSCS
Type
OP
Bit Devices Word devices Program Steps
X Y M S K H KnX
KnY
KnM
KnS
T C D E F
DHSCS: 13 steps
SS2
SX2
SS2
SX2
SS2
SX2
Operands:
S
1
: Comparative value S
2
: No. of high-speed counter D: Compare result
Explanations:
1. Functions related to high-speed counters adopt an interrupt process; therefore, devices
specified in D which indicates comparison results are updated immediately. This instruction
compares the present value of the designated high-speed counter S
2
against a specified
comparative value S
1
. When the current value in counters equals S
1
, device in D will be ON
even when values in S
1
and S
2
are no longer equal.
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 designate I0â–¡0, â–¡=1~8
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. Explanations on software comparators for DHSCS/DHSCR instruction:
 There are 6 software comparators for the high-speed compare Set/Reset.
 There are 6 software comparators available corresponding to associated high speed
counter interrupts. Numbers of the applied interrupts should also be specified correctly in
front of the associated interrupt subroutines in the program.
 When programming DHSCS and DHSCR instructions, the total of Set/Reset comparisons
for both instructions can not be more than 6, otherwise syntax check error will occur.