17.03.2014 Views

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

DVP-ES2-EX2-SS2-SA2-SX2-Operation Manual

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

<strong>DVP</strong>-<strong>ES2</strong>/<strong>EX2</strong>/<strong>SS2</strong>/<strong>SA2</strong>/<strong>SX2</strong>/SE <strong>Operation</strong> <strong>Manual</strong> - Programming<br />

API Mnemonic Operands Function<br />

53 D HSCS<br />

High Speed Counter<br />

Set<br />

Controllers<br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SA2</strong><br />

SE <strong>SX2</strong><br />

Type Bit Devices Word devices Program Steps<br />

OP X Y M S K H KnX KnY KnM KnS T C D E F DHSCS: 13 steps<br />

S 1 * * * * * * * * * *<br />

S 2 *<br />

D * * *<br />

PULSE 16-bit 32-bit<br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>SA2</strong><br />

<strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong> <strong>SX2</strong> <strong>ES2</strong>/<strong>EX2</strong> <strong>SS2</strong><br />

SE<br />

SE<br />

SE<br />

Operands:<br />

S 1 : Comparative value S 2 : No. of high-speed counter D: Compare result<br />

Explanations:<br />

1. Functions related to high-speed counters adopt an interrupt process; therefore, devices<br />

specified in D which indicates comparison results are updated immediately. This instruction<br />

compares the present value of the designated high-speed counter S 2 against a specified<br />

comparative value S 1 . When the current value in counters equals S 1 , device in D will be ON<br />

even when values in S 1 and S 2 are no longer equal.<br />

2. If D is specified as Y0~Y3, when the instruction is executed and the count value equals to S 1 ,<br />

the compare result will immediately output to the external outputs Y0~Y3. However, other Y<br />

outputs will still be updated till the end of program. Also, M and S devices, not affected by the<br />

program scan time, will be immediate updated as the Y devices specified by this instruction.<br />

3. Operand D can designate I0□0, □=1~8<br />

4. High speed counters include software high speed counters and hardware high speed<br />

counters. In addtiion, there are also two types of comparators including software<br />

comparators and hardware comparators. For detailed explanations of high speed counters<br />

please refer to section 2.9 in this manual.<br />

5. Explanations on software comparators for DHSCS/DHSCR instruction:<br />

‣ There are 6 software comparators for the high-speed compare Set/Reset.<br />

‣ There are 6 software comparators available corresponding to associated high speed<br />

counter interrupts. Numbers of the applied interrupts should also be specified correctly<br />

in front of the associated interrupt subroutines in the program.<br />

‣ When programming DHSCS and DHSCR instructions, the total of Set/Reset<br />

comparisons for both instructions can not be more than 6, otherwise syntax check error<br />

will occur.<br />

<strong>SX2</strong><br />

3-124

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!