beautypg.com

Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 286

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-2

API Mnemonic Operands

Function

51

REFF P

Refresh and Filter Adjust

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

n

* *

REFF, REFFP: 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:

n

: Response time (unit: ms)

Explanation:

1. Range

of

n

: for SA/SX/SC, n = K0 ~ K20; for EH/EH2/SV, n = K0 ~ K60.

2.

To avoid interferences, X0 ~ X17 of EH/EH2/SV series MPU and X0 ~ X7 of SA/SX/SC series MPU are

equipped with digital filters on output terminals. Digital filters adjust the response time by REFF instruction.

This instruction sets up n directly in D1020 (adjusting the response time of X0 ~ X7) and D1021 (adjusting the

response time of X10 ~ X17).

3.

Rules for adjusting the reponse time of the filter at X0 ~ X17:

a) When the power of PLC turns from Off to On or the END instruction is being executed, the response time

will be determined upon the contents in D1020 and D1021.

b) You can use MOV instruction in the program to move the time values to D1020 and D1021 and make

adjustments in the next scan.

c) You can use REFF instruction to change the response time during the execution of the program. The

changed response time will be move to D1020 and D1021 and you can make adjustments in the next scan.

Program Example:

1.

When the power of PLC turns from Off to On, the response

time of X0 ~ X17 will be determined by the contents in D1020

and D1021.

2.

When X20 = On, REFF K5 will be executed and the response

time will be changed to 5ms for the adjustment in the next

scan.

3.

When X20 = Off, the REFF K20 will be executed and the

response time will be changed to 20ms for the adjustment in

the next scan.

X20

REFF

K5

X0

Y1

X20

REFF

K20

X1

Y2

END

Remarks:

When inserting an interruption subroutine in the program or using the high speed counter or API 56 SPD instruction,

the corresponding signals at the input terminals will not delay and has nothing to do with this instruction.