Sie sind auf Seite 1von 18

3 Basic Instructions

3.1 Basic Instructions and Step Ladder Instructions

ES includes ES/EX/SS; SA includes SA/SX/SC; EH includes EH2/SV/EH3/SV2.


For EH series MPU, the execution speed in the brackets ( ) refers to the execution speed of designated operand
M1536 ~ M4095.

 Basic Instructions

Instruction Execution speed (us)


Function Operands STEP
Code ES SA EH
LD Loading in A contact X, Y, M, S, T, C 3.8 3.8 0.24 (0.56) 1~3
LDI Loading in B contact X, Y, M, S, T, C 3.88 3.88 0.24 (0.56) 1~3
AND Series connection- A contact X, Y, M, S, T, C 2.32 2.32 0.24 (0.56) 1~3
ANI Series connection- B contact X, Y, M, S, T, C 2.4 2.4 0.24 (0.56) 1~3
OR Parallel connection- A contact X, Y, M, S, T, C 2.32 2.32 0.24 (0.56) 1~3
ORI Parallel connection- B contact X, Y, M, S, T, C 2.4 2.4 0.24 (0.56) 1~3
ANB Series connection- loop blocks N/A 1.76 1.76 0.24 1~3
ORB Parallel connection- loop blocks N/A 1.76 1.76 0.24 1~3
Store the current result of the internal
MPS N/A 1.68 1.68 0.24 1~3
PLC operations
Reads the current result of the
MRD N/A 1.6 1.6 0.24 1
internal PLC operations
Pops (recalls and removes) the
MPP N/A 1.6 1.6 0.24 1
currently stored result

 Output instructions

Instruction Execution speed (us)


Function Operands STEP
Code ES SA EH
OUT Output coil Y, M, S 5.04 5.04 0.24 (0.56) 1~3
SET Latched(On) Y, M, S 3.8 3.8 0.24 (0.56) 1~3
RST Clear the contacts or the registers Y, M, S, T, C, D, E, F 7.8 7.8 0.24 (0.56) 3

 Timers, Counters

Instruction Execution speed (us)


API Function Operands STEP
Code ES SA EH
96 TMR 16-bit timer T-K or T-D 10.6 10.6 9.6 4
97 CNT 16-bit counter C-K or C-D (16 bits) 9.7 9.7 12.8 4
97 DCNT 32-bit counter C-K or C-D (32 bits) 10.3 10.3 14.3 6

DVP-PLC Application Manual 3-1


3 Basic Instructions

 Main control instructions

Instruction Execution speed (us)


Function Operands STEP
Code ES SA EH
MC Master control start N0 ~ N7 5.6 5.6 5.6 3
MCR Master control reset N0 ~ N7 5.7 5.7 5.7 3

 Instructions for detecting the contacts of rising-/falling-edge

Instruction Execution speed (us)


API Function Operands STEP
Code ES SA EH
90 LDP Rising-edge detection operation X, Y, M, S, T, C 5.1 5.1 0.56 (0.88) 3
91 LDF Falling-edge detection operation X, Y, M, S, T, C 5.1 5.1 0.56 (0.88) 3
92 ANDP Rising-edge series connection X, Y, M, S, T, C 4.9 4.9 0.56 (0.88) 3
93 ANDF Falling-edge series connection X, Y, M, S, T, C 4.9 4.9 0.56 (0.88) 3
94 ORP Rising-edge parallel connection X, Y, M, S, T, C 4.9 4.9 0.56 (0.88) 3
95 ORF Falling-edge parallel connection X, Y, M, S, T, C 4.9 4.9 0.56 (0.88) 3

 Rising-/falling-edge output instructions

Instruction Execution speed (us)


API Function Operands STEP
Code ES SA EH
89 PLS Rising-edge output Y, M 7.8 7.8 9.92 3
99 PLF Falling-edge output Y, M 7.8 7.8 10.16 3

 End instruction

Instruction Execution speed (us)


Function Operands STEP
Code ES SA EH
END Program ends N/A 5 5 0.24 1

 Other instructions

Instruction Execution speed (us)


API Function Operands STEP
Code ES SA EH
NOP No operation N/A 0.88 0.88 0.16 1
98 INV Inverting operation N/A 1.6 1.6 0.24 1
P Pointer P0 ~ P255 0.88 0.88 - 1
I Interruption program marker I□□□ 0.88 0.88 - 1

3-2 DVP-PLC Application Manual


3 Basic Instructions

 Step ladder instructions

Instruction Execution speed (us)


Function Operands STEP
Code ES SA EH
STL Step transition ladder start instruction S 11.6 10.6 0.56 1
RET Step transition ladder return instruction N/A 7.04 6.04 0.24 1
Note 1: ES includes ES/EX/SS; SA includes SA/SX/SC; EH includes EH/EH2/SV.
Note 2: For EH series MPU, the execution speed in the brackets ( ) refers to the execution speed of designated
operand M1536 ~ M4095.

3.2 Explanations on Basic Instructions

Mnemonic Function Program steps


Controllers
LD Loading in A contact 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
      -

Explanations:
The LD instruction is used on the A contact that has its start from the left BUS or the A contact that is the start of a
contact circuit. The functions are to save the present contents and store the acquired contact status into the
accumulative register.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 X1 LD X0 Loading in contact A of X0
Y1 AND X1 Connecting to contact A of X1 in series
OUT Y1 Driving Y1 coil
Note: DVP-EH3 series PLCs whose version is 1.40 and DVP-SV2 series PLCs whose version is 1.20 support the
operands X, Y, M, and S. These operands can be qualified by E or F, e.g. LD X0E1.

Mnemonic Function Program steps


Controllers
LDI Loading in B contact 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
      -

Explanations:
The LDI instruction is used on the B contact that has its start from the left BUS or the B contact that is the start of a
contact circuit. The functions are to save the present contents and store the acquired contact status into the
accumulative register.

DVP-PLC Application Manual 3-3


3 Basic Instructions

Program Example:
Ladder diagram: Instruction code: Operation:
X0 X1 LDI X0 Loading in contact B of X0
Y1 AND X1 Connecting to contact A of X1 in series
OUT Y1 Driving Y1 coil
Note: DVP-EH3 series PLCs whose version is 1.40 and DVP-SV2 series PLCs whose version is 1.20 support the
operands X, Y, M, and S. These operands can be qualified by E or F, e.g. LDI X0E1.

Mnemonic Function Program steps


Controllers
AND Series connection- A contact 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
      -

Explanations:
The AND instruction is used in the series connection of A contact. The functions are to read out the status of present d
series connection contacts and perform the “AND” operation with the logical operation result obtained. The final result
will be store in the accumulative register.

Program Example:
Ladder diagram: Instruction code: Operation:
X1 X0 LDI X1 Loading in contact B of X1
Y1 AND X0 Connecting to contact A of X0 in series
OUT Y1 Driving Y1 coil
Note: DVP-EH3 series PLCs whose version is 1.40 and DVP-SV2 series PLCs whose version is 1.20 support the
operands X, Y, M, and S. These operands can be qualified by E or F, e.g. AND X0E1.

Mnemonic Function Program steps


Controllers
ANI Series connection- B contact 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
      -

Explanations:
The ANI instruction is used in the series connection of B contact. The functions are to read out the status of present
designated series connection contacts and perform the “AND” operation with the logical operation result obtained.
The final result will be store in the accumulative register.

3-4 DVP-PLC Application Manual


3 Basic Instructions

Program Example:
Ladder diagram: Instruction code: Operation:
X1 X0 LD X1 Loading in contact A of X1
Y1 ANI X0 Connecting to contact B of X0 in series
OUT Y1 Driving Y1 coil
Note: DVP-EH3 series PLCs whose version is 1.40 and DVP-SV2 series PLCs whose version is 1.20 support the
operands X, Y, M, and S. These operands can be qualified by E or F, e.g. ANI X0E1.

Mnemonic Function Program steps


Controllers
OR Parallel connection- A contact 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
      -

Explanations:
The OR instruction is used in the parallel connection of A contact. The functions are to read out the status of present
designated parallel connection contacts and perform the “OR” operation with the logical operation result obtained.
The final result will be store in the accumulative register.

Program Example:
Ladder diagram: Instruction code: Operation:

X0 LD X0 Loading in contact A of X0
Y1 OR X1 Connecting to contact A of X1 in parallel
X1 OUT Y1 Driving Y1 coil

Note: DVP-EH3 series PLCs whose version is 1.40 and DVP-SV2 series PLCs whose version is 1.20 support the
operands X, Y, M, and S. These operands can be qualified by E or F, e.g. OR X1E1.

Mnemonic Function Program steps


Controllers
ORI Parallel connection- B contact 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
      -

Explanations:
The OR instruction is used in the parallel connection of B contact. The functions are to read out the status of present
designated parallel connection contacts and perform the “OR” operation with the logical operation result obtained.
The final result will be store in the accumulative register.

DVP-PLC Application Manual 3-5


3 Basic Instructions

Program Example:
Ladder diagram: Instruction code: Operation:

X0 LD X0 Loading in contact A of X0
Y1 ORI X1 Connecting to contact B of X1 in parallel
X1 OUT Y1 Driving Y1 coil

Note: DVP-EH3 series PLCs whose version is 1.40 and DVP-SV2 series PLCs whose version is 1.20 support the
operands X, Y, M, and S. These operands can be qualified by E or F, e.g. ORI X1E1.

Mnemonic Function Program steps


Controllers
ANB Series connection- loop blocks 1 ES EX SS SA SX SC EH2 SV EH3 SV2

Operand N/A

Explanations:
To perform the “AND” operation of the preserved logic results and content in the accumulative register.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 ANB X1 LD X0 Loading in contact A of X0
Y1
ORI X2 Connecting to contact B of X2 in parallel
X2 X3 LDI X1 Loading in contact B of X1
OR X3 Connecting to contact A of X3 in parallel
Block A Block B
ANB Connecting circuit block in series
OUT Y1 Driving Y1 coil

Mnemonic Function Program steps


Controllers
Parallel connection- loop ES EX SS SA SX SC EH2 SV EH3 SV2
ORB 1
blocks

Operand N/A

Explanations:
To perform the “OR” operation of the preserved logic results and content in the accumulative register.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 X1 Block A LD X0 Loading in contact A of X0
Y1 ANI X1 Connecting to contact B of X1 in series
X2 X3 LDI X2 Loading in contact B of X2
ORB AND X3 Connecting to contact A of X3 in series
Block B
ORB Connecting circuit block in parallel
OUT Y1 Driving Y1 coil

3-6 DVP-PLC Application Manual


3 Basic Instructions

Mnemonic Function Program steps


Controllers
Store the current result of ES EX SS SA SX SC EH2 SV EH3 SV2
MPS 1
the internal PLC operations

Operand N/A

Explanations:
To save the content in the accumulative register into the operational result (the pointer of operational result will plus
1).

Mnemonic Function Program steps


Controllers
Reads the current result of ES EX SS SA SX SC EH2 SV EH3 SV2
MRD 1
the internal PLC operations

Operand N/A

Explanations:
To read the operational result and store it into the accumulative register (the pointer of operational result stays intact).

Mnemonic Function Program steps


Controllers
Pops (recalls and removes) ES EX SS SA SX SC EH2 SV EH3 SV2
MPP 1
the currently stored result

Operand N/A

Explanations:
To retrieve the previous preserved logical operation result and store it into the accumulative register (the pointer of
operational result will minus 1).

Program Example:
Ladder diagram: Instruction code: Operation:

MPS LD X0 Loading in contact A of X0


X0 X1
MPS Saving into stack
Y1
X2 AND X1 Connecting to contact A of X1 in series
MRD M0 OUT Y1 Driving Y1 coil

Y2 MRD Reading from stack


MPP AND X2 Connecting to contact A of X2 in series
END
OUT M0 Driving M0 coil
MPP Reading from stack and pop pointer
OUT Y2 Driving Y2 coil
END Program ends

DVP-PLC Application Manual 3-7


3 Basic Instructions

Mnemonic Function Program steps


Controllers
OUT Output coil 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
-    - - -

Explanations:
1. To output the logical operation result before OUT instruction into a designated device.
2. Actions of coil contact:
OUT instruction
Operational result Contact
Coil
A contact (normally open) B contact (normally closed)
FALSE Off Off On
TRUE On On Off

Program Example:
Ladder diagram: Instruction code: Operation:
X0 X1 LDI X0 Loading in contact B of X0
Y1 AND X1 Connecting to contact A of X1 in series
OUT Y1 Driving Y1 coil
Note: DVP-EH3 series PLCs whose version is 1.40 and DVP-SV2 series PLCs whose version is 1.20 support the
operands Y, M, and S. These operands can be qualified by E or F, e.g. OUT Y1E2.

Mnemonic Function Program Steps


Controllers
SET Latched (On) 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
-    - - -

Explanations:
When the SET instruction is driven, its designated device will be “On” and keep being On both when SET instruction
is still being driven or not driven. Use RST instruction to set “Off” the device.

Program Example:
Ladder diagram: Instruction code: Operation:
LD X0 Loading in contact A of X0
X0 Y0 ANI Y0 Connecting to contact B of Y0 in series
SET Y1
SET Y1 Y1 latched (On)
Note: DVP-EH3 series PLCs whose version is 1.40 and DVP-SV2 series PLCs whose version is 1.20 support the
operands Y, M, and S. These operands can be qualified by E or F, e.g. SET Y1E2.

3-8 DVP-PLC Application Manual


3 Basic Instructions

Mnemonic Function Program steps


Controllers
Clear the contacts or ES EX SS SA SX SC EH2 SV EH3 SV2
RST 1
the registers
M0 ~ D0 ~ E0 ~ E7
X0 ~ X377 Y0 ~ Y377 S0 ~ S1023 T0 ~ T255 C0 ~ C255
Operand M4095 D9999 F0 ~ F7
-       

Explanations:
1. When the RST instruction is driven, the actions of the designated devices are:
Device Status
Y, M, S, Coil and contact will be set to “Off”
Present values of the timer or counter will be set to “0”, and the coil and contact will be set to
T, C
“Off”
D, E, F The content will be set to “0”.
2. If RST instruction is not being executed, the status of the designated device will stay intact.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 LD X0 Loading in contact A of X0
RST Y5 RST Y5 Resetting contact Y5
Note: DVP-EH3 series PLCs whose version is 1.40 and DVP-SV2 series PLCs whose version is 1.20 support the
operands Y, M, and S. These operands can be qualified by E or F, e.g. RST Y5E2.

Mnemonic Function Program steps


Controllers
TMR 16-bit timer 4 ES EX SS SA SX SC EH2 SV EH3 SV2

T-K T0 ~ T255, K0 ~ K32,767


Operand
T-D T0 ~ T255, D0 ~ D9999

Explanations:
When TMR instruction is executed, the designated coil of the timer will be On and the timer will start to time. When the
set value in the timer is reached (present ≥ set value), the contact will be:
NO (Normally Open) contact Open collector
NC (Normally Closed) contact Close collector

Program Example:
Ladder diagram: Instruction code: Operation:
X0 LD X0 Loading in contact A of X0 T5 timer
TMR T5 K1000 TMR T5 K1000 Set value in timer T5 as K1,000

Remarks:
See the specification of each model for the range of operand T.

DVP-PLC Application Manual 3-9


3 Basic Instructions

Mnemonic Function Program steps


Controllers
16-bit contact type ES EX SS SA SX SC EH2 SV EH3 SV2
ATMR 5
timer counter

T-K T0 ~ T255,K0 ~ K32,767


Operand
T-D T0 ~ T255, D0 ~ D11999

Explanations:
1. The instruction ATMR corresponds to the combination of AND and TMR. If the contact preceding ATMR is ON,
the timer specified will begin to count. When the count value is greater than or equal to the setting value, the
AND contact is ON. If the contact preceding ATMR is not ON, ATMR will automatically clear the count value.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 LD X0 Loading in contact A of X0
ATMR T5 K1000 Y0
ATMR T5 K100 The setting value of T5 is K100.
OUT Y0 When the count value is greater than or equal
to the setting value, Y0 is ON.

Remarks:
1. Please refer to specifications for the model used for more information about the timers which can be used.
2. EH3 series PLCs whose version is 1.40 and SV2 series PLCs whose version is 1.20 support ATMR.

Mnemonic Function Program steps


Controllers
CNT 16-bit counter 1 ES EX SS SA SX SC EH2 SV EH3 SV2

C-K C0 ~ C199, K0~K32,767


Operand
C-D C0 ~ C199, D0 ~ D9999

Explanations:
3. When the CNT instruction goes from Off to On, the designated counter coil will be driven, and the present value
in the counter will plus 1. When the counting reaches the set value (present value = set value), the contact will
be:
NO (Normally Open) contact Open collector
NC (Normally Closed) contact Close collector
4. If there are other counting pulse inputs after the counting reaches its target, the contact and present value will
stay intact. Use RST instruction to restart or reset the counting.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 LD X0 Loading in contact A of X0
CNT C20 K100 CNT C20 K100 Set value in counter C20 as K100

3-10 DVP-PLC Application Manual


3 Basic Instructions

Mnemonic Function Program steps


Controllers
DCNT 32-bit counter 1 ES EX SS SA SX SC EH2 SV EH3 SV2

C-K C200 ~ C255, K-2,147,483,648 ~ K2,147,483,647


Operand
C-D C200 ~ C255, D0 ~ D9999

Explanations:
1. DCNT is the instruction for enabling the 32-bit high-speed counters C200 ~ C255.
2. For general purpose addition/subtraction counters C200 ~ C234, when DCNT goes from Off to On, the present
value in the counter will pulse 1 (counting up) or minus 1 (counting down) according to the modes set in special
M1200 ~ M1235.
3. For high-speed addition/subtraction counters C235 ~ C255, when the high-speed counting pulse input goes
from Off to On, the counting will start its execution. For the input terminals (X0 ~ X17) and counting methods
(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:
M0 LD M0 Loading in contact A of M0
DCNT C254 K1000 DCNT C254 K1000 Set value of counter C254 as K1,000

Mnemonic Function Program steps


Controllers
Master control ES EX SS SA SX SC EH2 SV EH3 SV2
MC / MCR 1
Start/Reset

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
Present value = 0
General purpose timer
Coil is Off, No action for the contact
Accumulative timer Coil is Off, present value and contact stay intact
Present value = 0
Subroutine timer
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

DVP-PLC Application Manual 3-11


3 Basic Instructions

Instruction type Explanation


Devices driven by SET and RST
Stay intact
instructions
All disabled.
The FOR-NEXT nested loop will still execute back and forth for N times.
Application instructions
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.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 LD X0 Loading in A contact of X0
MC N0 MC N0 Enabling N0 common series connection contact
X1 LD X1 Loading in A contact of X1
Y0 OUT Y0 Driving Y0 coil
X2 :
MC N1 LD X2 Loading in A contact of X2
X3 MC N1 Enabling N1 common series connection contact
Y1 LD X3 Loading in A contact of X3
OUT Y1 Driving Y1 coil
MCR N1 :
MCR N1 Disabling N1 common series connection contact
:
MCR N0
MCR N0 Disabling N0 common series connection contact
X10 :
MC N0
LD X10 Loading in A contact of X10
X11 MC N0 Enabling N0 common series connection contact
Y10 LD X11 Loading in A contact of X11
OUT Y10 Driving Y10 coil
MCR N0 :
MCR N0 Disabling N0 common series connection contact

Mnemonic Function Program steps


Controllers
Rising-edge detection ES EX SS SA SX SC EH2 SV EH3 SV2
LDP 1
operation

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
      -

Explanations:
The method of using LDP is the same as using LD, but the actions of the two instructions differ. LDP saves the current
content and store the detected status of rising-edge to the accumulative register.

3-12 DVP-PLC Application Manual


3 Basic Instructions

Program Example:
Ladder diagram: Instruction code: Operation:
X0 X1 LDP X0 Starting X0 rising-edge detection
Y1 AND X1 Series connecting A contact of X1
OUT Y1 Driving Y1 coil

Remarks:
1. See the specification of each model for the range of operands.
2. If the status of a designated rising-edge is On before the PLC is powered, the contact of the rising-edge will be
TRUE after PLC is powered.

Mnemonic Function Program steps


Controllers
Falling-edge detection ES EX SS SA SX SC EH2 SV EH3 SV2
LDF 1
operation

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
      -

Explanations:
The method of using LDF is the same as using LD, but the actions of the two instructions differ. LDF saves the current
content and store the detected status of falling-edge to the accumulative register.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 X1 LDF X0 Starting X0 falling-edge detection
Y1 AND X1 Series connecting A contact of X1
OUT Y1 Driving Y1 coil

Mnemonic Function Program steps


Controllers
Rising-edge series ES EX SS SA SX SC EH2 SV EH3 SV2
ANDP 1
connection
M0 ~
X0 ~ X377 Y0 ~ Y377 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999
Operand M4095
      -

Explanations:
ANDP instruction is used in the series connection of the contacts’ rising-edge detection.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 X1 LD X0 Loading in A contact of X0
Y1 ANDP X1 X1 rising-edge detection in series connection
OUT Y1 Driving Y1 coil

DVP-PLC Application Manual 3-13


3 Basic Instructions

Mnemonic Function Program steps


Controllers
Falling-edge series ES EX SS SA SX SC EH2 SV EH3 SV2
ANDF 1
connection
M0 ~
X0 ~ X377 Y0 ~ Y377 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999
Operand M4095
      -

Explanations:
ANDF instruction is used in the series connection of the contacts’ falling-edge detection.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 X1 LD X0 Loading in A contact of X0
Y1 ANDF X1 X1 falling-edge detection in series connection
OUT Y1 Drive Y1 coil

Mnemonic Function Program steps


Controllers
Rising-edge parallel ES EX SS SA SX SC EH2 SV EH3 SV2
ORP 1
connection
M0 ~ S0 ~
X0 ~ X377 Y0 ~ Y377 T0 ~ T255 C0 ~ C255 D0 ~ D9999
Operand M4095 S1023
      -

Explanations:
The ORP instructions are used in the parallel connection of the contact’s rising-edge detection.

Program Example:
Ladder diagram: Instruction code: Operation:

X0 LD X0 Loading in A contact of X0
Y1 ORP X1 X1 rising-edge detection in parallel connection
X1 OUT Y1 Driving Y1 coil

Mnemonic Function Program steps


Controllers
ORF Falling-edge parallel connection 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
      -

Explanations:
The ORP instructions are used in the parallel connection of the contact’s falling-edge detection.

3-14 DVP-PLC Application Manual


3 Basic Instructions

Program Example:
Ladder diagram: Instruction code: Operation:

X0 LD X0 Loading in A contact of X0
Y1 ORF X1 X1 falling-edge detection in parallel connection
X1 OUT Y1 Driving Y1 coil

Mnemonic Function Program steps


Controllers
PLS Rising-edge output 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
-   - - - -

Explanations:
When X0 goes from Off to On (rising-edge trigger), PLS instruction will be executed and S will send out pulses for
once of 1 scan time.

Program Example:
Ladder diagram: Instruction code: Operation:
LD X0 Loading in A contact of X0
X0
PLS M0 PLS M0 M0 rising-edge output
M0 LD M0 Loading in contact A of M0
SET Y0
SET Y0 Y0 latched (On)
Timing Diagram:

X0

M0 1 scan time

Y0

Mnemonic Function Program steps


Controllers
PLF Falling-edge output 1 ES EX SS SA SX SC EH2 SV EH3 SV2

X0 ~ X377 Y0 ~ Y377 M0 ~ M4095 S0 ~ S1023 T0 ~ T255 C0 ~ C255 D0 ~ D9999


Operand
-   - - - -

Explanations:
When X0 goes from On to Off (falling-edge trigger), PLF instruction will be executed and S will send out pulses for
once of 1 scan time.

DVP-PLC Application Manual 3-15


3 Basic Instructions

Program Example:
Ladder diagram: Instruction code: Operation:

X0 LD X0 Loading in A contact of X0
PLF M0 PLF M0 M0 falling-edge output
M0 LD M0 Loading in contact A of M0
SET Y0
SET Y0 Y0 latched (On)

Timing Diagram:

X0
1 scan time
M0

Y0

Mnemonic Function Program steps


Controllers
END Program End 1 ES EX SS SA SX SC EH2 SV EH3 SV2

Operand N/A

Explanations:
END instruction has to be placed in the end of a ladder diagram or instruction program. PLC will start to scan from
address 0 to END instruction and return to address 0 to restart the scan.

Mnemonic Function Program steps


Controllers
NOP No operation 1 ES EX SS SA SX SC EH2 SV EH3 SV2

Operand N/A

Explanations:
NOP instruction does not conduct any operations in the program; therefore, after the execution of NOP, the existing
logical operation result will be kept. If you want to delete a certain instruction without altering the length of the program,
you can use NOP instruction.

Program Example:
Ladder diagram: Instruction code: Operation:
NOP instruction will be LD X0 Loading in B contact of X0
omitted in the ladder diagram
NOP No operation
X0 OUT Y1 Driving Y1 coil
NOP Y1

3-16 DVP-PLC Application Manual


3 Basic Instructions

Mnemonic Function Program steps


Controllers
INV Inverting Operation 1 ES EX SS SA SX SC EH2 SV EH3 SV2

Operand N/A

Explanations:
The logical operation result before INV instruction will be inverted and stored in the accumulative register.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 LD X0 Loading in A contact of X0
Y1 INV Inverting the operation result
OUT Y1 Driving Y1 coil

Mnemonic Function Program steps


Controllers
P Pointer 1 ES EX SS SA SX SC EH2 SV EH3 SV2

Operand P0 ~ P255

Explanations:
Pointer P is used in API 00 CJ and API 01 CALL instructions. The use of P does not need to start from No. 0, and the
No. of P cannot be repeated; otherwise, unexpected errors may occur.

Program Example:
Ladder diagram: Instruction code: Operation:
X0 LD X0 Loading in A contact of X0
CJ P10 CJ P10 From instruction CJ to P10
X1 :
P10 Y1 P10 Pointer P10
LD X1 Loading in A contact of X1
OUT Y1 Driving Y1 coil

Mnemonic Function Program steps


Controllers
I Interruption program marker (I) 1 ES EX SS SA SX SC EH2 SV EH3 SV2

I00□, I10□, I20□, I30□, I40□, I50□, I6□□, I7□□, I8□□


Operand
I010, I020, I030, I040, I050, I060, I110, I120, I130, I140, I150, I160, I170, I180

Explanations:
A interruption program has to start with a interruption pointer (I□□□) and ends with API 03 IRET. I instruction has to
be used with API 03 IRET, API 04 EI, and API 05 DI. See Chapter 2.9 for pointers of all DVP series PLCs.

DVP-PLC Application Manual 3-17


3 Basic Instructions

Program Example:
Ladder diagram: Instruction code: Operation:
EI Enabling interruption
EI
Allowable range LD X1 Loading A contact of X1
X1 for interruption
Y1 OUT Y1 Driving Y1 coil
:
DI DI Disabling interruption
Pointer of
:
interruption
program FEND FEND Main program ends
X2 I001 Interruption pointer
I 001 Y2
Interruption LD X2 Loading in A contact of X2
subroutine OUT Y2 Driving Y2 coil
IRET
:
IRET Interruption return

3-18 DVP-PLC Application Manual

Das könnte Ihnen auch gefallen