beautypg.com

3 basic instructions – Delta Electronics Programmable Logic Controller DVP-PLC User Manual

Page 164

background image

3 Basic Instructions

DVP-PLC Application Manual

3-10

(counting up/down) of the high-speed counter, see Chapter 2.7 Numbering and Function of Counter [C] for more

details.

4.

When DCNT is Off, the counting will stop, but the existing present value in the counter will not be cleared. To

clear the present value and the contact, you have to use the instruction RST C2XX. Use externally designated

input points to clear the present values and contacts of high-speed addition/subtraction counters C235 ~ C255.

Program Example:

Ladder diagram:

Instruction code:

Operation:

LD

M0

Loading in contact A of M0

M0

C254

DCNT

K1000

DCNT

C254 K1000

Set value of counter C254 as K1,000

Mnemonic Function Program

steps

MC / MCR

Master control Start/Reset

1

Controllers

ES

EX

SS

SA

SX

SC

EH

SV

Operand

N0 ~ N7

Explanations:

1.

MC is the main-control start instruction. When MC instruction is executed, the execution of instructions between

MC and MCR will not be interrupted. When MC instruction is Off, the actions of the instructions between MC and

MCR are:

Instruction type

Explanation

General purpose timer

Present value = 0
Coil is Off, No action for the contact

Accumulative timer

Coil is Off, present value and contact stay intact

Subroutine timer

Present value = 0
Coil is Off, No action for the contact

Counter

Coil is Off, present value and contact stay intact

Coils driven by OUT
instruction

All Off

Devices driven by SET and
RST instructions

Stay intact

Application instructions

All disabled.
The FOR-NEXT nested loop will still execute back and forth for N times.
Instructions between FOR-NEXT will act as the instructions between MC
and MCR.

2.

MCR is the main-control end instruction that is placed in the end of the main-control program. There should not

be any contact instructions prior to MCR instruction.

3.

MC-MCR main-control program instructions support the nested program structure (max. 8 layers) and please

use the instruction in the order N0 ~ N7.