beautypg.com

Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 299

background image

7 Application Instructions API 50-99

D V P - P L C A P P L I C AT I O N M A N U A L

7-15

API Mnemonic

Operands

Function

54

D HSCR

High Speed Counter Reset

Controllers

ES/EX/SS SA/SX/SC EH/SV

Bit Devices

Word Devices

Program Steps

Type

OP

X Y M S K H

KnX KnY KnM KnS T

C

D

E

F

S

1

*

*

*

*

*

*

*

*

*

*

S

2

*

D

*

*

*

*

DHSCR: 13 steps

PULSE 16-bit 32-bit

ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV ES EX SS SA SX SC EH SV

Operands:

S

1

: Comparative value S

2

: No. of high speed counter D: Comparison result

Explanations:

1.

S

2

has to designate the No. of high speed counters C235 ~ C255. See remarks of API 53 DHSCS for more

details.

2.

D

of EH/EH2/SV series MPU can designate the No. of high speed counters C241 ~ C254 that are the same as

the counters designated by S

2

.

3.

D

of SC series MPU can designate the No. of high speed counters C243, C245, C250 and C255 that are the

same as the counters designated by S

2

.

4.

D

of ES/EX/SS/SA/SX series MPU does not support device C.

5.

See the specifications of each model for their range of use.

6.

Flags: M1150 ~ M1333; see remarks of API 53 DHSCS for more details. ES/EX/SS/SA/SX/SC series MPU

does not support M1261 (high speed counter external reset mode designation); see remarks for more details.

7.

The high speed counter inputs counting pulses from the corresponding external input terminals X0 ~ X17 by

inserting an interruption. When the No. of high-speed counter designated in S

2

“+1“ or “-1”, DHSCR will

perform a comparison immediately. When the present value in the high speed counter equals the comparative

value designated in S

1

, the device designated in D will turn Off and even the afterward comparison results are

unequal, the device will still be Off.

8.

If the devices designated in D are Y0 ~ Y17, when the comparative value equals the present value in the high

speed counter, the comparison result will immediately output to the external output terminals Y0 ~ Y17 (and

clear the designated Y output) and the rest of Y devices will be affected by the scan cycle. Devices M and S

act immediately without being affected by the scan cycle.

Program Example 1:

1.

When M0 = On and the present value in the high speed counter C251 changes from 99 to 100 or 101 to 100,

Y10 will be cleared and Off.

2.

When the present value in the high speed counter C251 changes from 199 to 200, the contact of C251 will be

On and make Y0 = On. However, the program scan time will delay the output.

3.

Y10 will immediately reset the status when the counting reaches its target. D is also able to designate high

speed counters of the same No. See Program Example 2.