beautypg.com

Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 483

background image

9 Application Instructions API 150-199

DVP-PLC Application Manual

9-11

API Mnemonic

Operands

Function

152

RTMU

Start of the Measurement of Execution Time
of I Interruption

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

D

*

*

*

n

*

*

*

RTMU: 5 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:

D: Device for storing the measuring time (unit: 1us) n: Measurement time base. Parameter range: K10 ~ K500

(time unit: 1us)

Explanations:

1. Range

of

D: K0 ~ K9

2. Range

of

n: K10 ~ K500

3.

The designated special D registers (D1156 ~ D1165) can measure up to 10 interruption subroutines. For

example, when D = K5, the designated D register will be D1161.

4.

When RTMU is executed, if the D and n entered by the user are legal, interruption of the timer will be enabled

and the counting starts and the special D designated by D is cleared as 0. When RTMD is executed,

interruption of the timer is disabled and the calculated time will be assigned to special D designated by RTMD.

5.

With API 153 RTMD, RTMU can measure the execution time of “I” interruption service subroutine, which can

be reference for dealing with the high-speed response when the user is at the initial stage of developing the

program.

API Mnemonic

Operands

Function

153

RTMD

End of the Measurement of the Execution
Time of I Interruption

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

D

*

*

*

RTMD: 3 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:

D: Device to store the measuring time (unit: 1us).

Explanations:

1. Range

of

D: K0 ~ K9. The No. of D has to be the same as that designated by D in API 152 RTMU; otherwise the

result of the measurement may be unexpectable.

Program Example:

When X0 goes from Off to On, the program will enter I001 interruption subroutine. RTMU will activate an 8-bit timer

(unit: 10us) and RTMD (when D = K0) will shut down the timer and store the time in the timer in special D registers

(D1156 ~ D1165, designated by K0 ~ K9).