Sei sulla pagina 1di 465

DVP-PLC Application Manual

Programming
Table of Contents
Chapter 1 Working Principles of PLC Ladder Diagram
Preface-The Background and Functions of PLC ...................................................... 1-1
1.1 The Working Principles of Ladder Diagram........................................................ 1-1
1.2 The Difference between Traditional Ladder Diagram and PLC Ladder Diagram... 1-2
1.3 Edition Explanation of Ladder Diagram ............................................................. 1-4
1.4 The Edition of PLC Ladder Diagram.................................................................. 1-8
1.5 The Conversion of PLC Command and Each Diagram Structure ......................... 1-11
1.6 The Simplification of Ladder Diagram ............................................................... 1-14
1.7 The Example for Designing Basic Program........................................................ 1-16
Chapter 2 DVP-PLC Function
2.1 Summary of DVP-PLC Device Number .............................................................. 2-1
2.2 Value, constant [K] / [H] ................................................................................... 2-7
2.3 The Numbering and Function of External Input/Output Contact [X] / [Y] .............. 2-9
2.4 The Numbering and Function of Auxiliary Relay [M] ........................................... 2-11
2.5 The Numbering and Function of Step Relay [S] ................................................. 2-12
2.6 The Numbering and Function of Timer [T] ......................................................... 2-13
2.7 The Numbering and Function of Counter [C]...................................................... 2-16
2.8 Register Number and Function [D], [E], [F] ........................................................ 2-28
2.8.1 Data register [D] ........................................................................................ 2-28
2.8.2 Index Register [E], [F] ................................................................................ 2-29
2.8.3 File Register Function and Characteristics .................................................. 2-30
2.9 Nest Level Pointer[N], Pointer[P], Interrupt Pointer [I] ........................................ 2-30
2.10 Special Auxiliary Relay and Special Register ................................................... 2-33
2.11 Special Auxiliary Relay and Special Register Functions.................................... 2-53
2.12 Fault Code Information................................................................................... 2-84
Chapter 3 Basic Commands
3.1 Summary of Basic Command and Step Ladder Command .................................. 3-1
3.2 Basic Commands Explanations......................................................................... 3-3
Chapter 4 Step Ladder Commands
4.1 Step Ladder Command [STL], [RET] ................................................................. 4-1
4.2 Sequential Function Chart (SFC) ...................................................................... 4-1
4.3 Step Ladder Command Explanation .................................................................. 4-2
4.4 Reminder of Design on the Step Ladder Program .............................................. 4-7
4.5 Categories of Procedures................................................................................. 4-8
4.6 IST command .................................................................................................. 4-18
Chapter 5 Application Commands
5.1 Summary of Parameters ................................................................................... 5-1
5.2 Application Command Structure ........................................................................ 5-7
5.3 Handling of Numeric Values ............................................................................. 5-12
5.4 Index register E, F ........................................................................................... 5-15
5.5 Index for Commands ........................................................................................ 5-17

Chapter 6 Application Commands API 00-49........................................... 6-1
Chapter 7 Application Commands API 50-99........................................... 7-1
Chapter 8 Application Commands API 100-149 ....................................... 8-1
Chapter 9 Application Commands API 150-199 ....................................... 9-1
Chapter 10 Application Commands API 215-246 ..................................... 10-1
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-1
Preface----The Background and Functions of PLC
PLC (Programmable Logic Controller) is one of electronic equipments. It was called Sequence Controller
before. It was named Programmable Logic Controller (PLC) by NEMA (National Electrical Manufacture Association)
in 1978 and defined as electronic equipment. The operation of PLC is in the following:
Step 1. Read the external input signal, such as the status of keypad, sensor, switch and pulse.
Step 2. Using microprocessor to execute the calculations of logic, sequence, timer, counter and formula according to
the status and the value of the input signal read in the step 1 and pre-write programs saved inner to get the
corresponding output signal, such as open or close of relay, operation of controlled machine or procedure to control
automatic machine or procedure of manufacture. PLC also can be used to maintain and adjust of production program
by editing or modifying the peripheral equipments (personal computer/handheld programming panel). The common
program language of PLC is ladder diagram.
There are stronger functions in PLC with the development and application requirements of electronic technology,
such as position control, network and etc. Output/Input signals are DI (Digital Input), AI (Analog Input), PI (Pulse
Input), DO (Digital Output), AO (Analog Output) and PO (Pulse Output). Thus PLC plays an important role in the
feature industry.
1.1 The Working Principles of Ladder Diagram
Ladder diagram is an automatic control diagram language that developed during World War II. At first, it just has
basic components, such as A contact (normally open), B contact (normally close), output coil, timer counter and etc.
(The power panel is made up of these basic components) It has more functions, differential contact, latched coil and
the application commands, add, minus, multiply and divide calculation, that traditional power panel cant make since
PLC is developed.
The working principles of the traditional Ladder Diagram and the PLC Ladder Diagram are similar to each other;
the only difference is that the symbols for the traditional ladder diagram are expressed in the format that are close to
its original substance, while those for the PLC ladder diagram employ the symbols that are more explicit when being
used in computers or data sheets. In the Ladder Diagram Logics, it could be divided into the Combination Logics
and the Sequential Logics, and is described as follows:
1. Combination Logics:
The following example is the combination logics that show in traditional diagram and PLC ladder diagram
separately.
Traditional Ladder Diagram PLC Ladder Diagram
X4
X0
X2
X3
X1
Y0
Y2
Y1

X0
Y0
X1
Y1
Y2
X2
X3
X4


1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-2
Example 1: Circuit 1 utilizes one X0 (NO: Normally Open) switch, which is normally known as the A switch or
contact, and its characteristic is that the contact is in the OFF condition at regular time (not pressed); the
output point Y0 is thus in OFF condition. However, once the switch motion (the button is pressed) is
conducted, the contact will be ON, and the output point Y0 will be in ON condition.
Example 2: Similarly, Circuit 2 utilizes the X1 (NC: Normally Close) switch, which is normally known as the B switch
or contact, and its characteristic is that the contact is in the ON condition at regular time; the output point
Y0 is thus in ON condition. While the switch motion is conducted (which is in the OFF condition), the
output point Y0 is in OFF condition.
Example 3: This is an example of combination logics output, which has more than one input equipment. The output
point Y2 will be in ON condition when X2 is in OFF condition or X3 and X4 are in ON condition.
2. Sequential logics:
The sequential logics are a type of circuit that possesses the Draw-Back structure, which is to draw back the
circuits output result and has it serve as the input condition. Thus, under the same input condition, different
output results will be generated in accordance with previous conditions and motions with different orders.
The following example is the sequential logics that show in traditional diagram and PLC ladder diagram
separately.
Traditional Ladder Diagram PLC Ladder Diagram
X5 X6
Y3
Y3

Y3
X5
Y3
X6

When the above circuit is just supplied with power, although the X6 switch is ON, the X5 switch is still OFF, thus,
the output relay Y3 will be in OFF condition; output of the relay will only be ON after X5 is ON. Once the output relay
Y3 is in ON condition, there will be a feedback signal containing the ON condition from Y3 to connect in parallel with
the A contact of X5; this circuit is thus also known as the self-latched circuit. The circuit motion is showed in the
following chart:
Device status
Step
X5 X6 Y3
1 N N OFF
2 Y N ON
3 N N ON
4 N Y OFF
5 N N OFF
N: is in OFF condition Y: is in ON condition
From above chart, you can find that the same input may get different result. For example, in the step 1 and 3, the
status of X5 and X6 are in OFF condition but Y3 is in OFF condition in step 1 and in ON condition in step3. That is due
to the self-latched circuit feedback input. In this example, it explains with contact A, contact B and output coil. The
usage of other equipments is the same with this. Please refer to the chapter 3 for the detail.
1.2 The Difference between Traditional Ladder Diagram and PLC Ladder Diagram
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-3
Although the working principles are in accordance with each other for the traditional ladder diagram and the PLC
ladder diagram, PLC is indeed utilizing the microcomputer chip (MCU) to simulate the motion of the traditional ladder
diagram, which is to use the scan method to look over one by one the conditions of all input devices and output coils,
and afterwards, with the conditions in consideration, to calculate and generate the same output result as that of the
traditional ladder diagram based on the logics of the combination status of the ladder diagram. However, since that
there is only one MCU, the only way to examine the circuits is to look it over one after another within the ladder
diagram program, then calculate the output result in compliance with the program and the input/output status, and
finally, output the results to the external interface; thereafter, start over with the readout of the input status, the
calculation, output, and repeatedly go over the above-mentioned motions again; the time needed to complete the
whole set of cyclic motion is called one Scan Time. The scan time will become longer in accordance with the
increment of the program. With this scan time, it will incur repeated input detections, and thus, result in delay in the
output responses; and the longer the delay time, the greater the error towards the control, and whats worse, is that
the condition might be unqualified for the control requests. By then, PLC (with faster Scan Time) would be chosen to
do the job; the scan speed is thus an essential specification to PLC. Thanks to the advanced technique of ASIC (IC
with specific functions) within the microcomputer, PLC of the present has made greater progress in the scan speed,
and what follows is the scanning chart of the PLC Ladder Diagram Program.
Calculate the result by ladder
diagram algorithm (it doesnt sent
to the outer output point but the
inner equipment will output
immediately.)
Y0
X0 X1
Y0 Start
M100 X3
Y1
X10
:
:
X100 M505
Y126
End
Send the result to the output point
Read input state from outside

Execute in cycles
In addition to the difference of scan time, PLC ladder diagram and traditional ladder diagram also has difference
in reverse current. In the following chart of traditional ladder diagram, if X0, X1, X4 and X6 are in ON condition and
the others are in OFF condition, output point Y0 will be in ON condition as shown as dotted line in the following
diagram. But in the PLC ladder diagram will have error in the peripheral equipmentWPLSoft due to scan method of
MCU is from up to down and from left to right.
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-4
Reverse current of traditional ladder diagram
X6
X0 X1 X2
X3 X4 X5
a
b
Y0


Reverse current of PLC ladder diagram
X6
X0
Y0
X1 X2 Y0
X3 X4 X5
a
b

There is a fault in the 3rd row of ladder diagram.

1.3 Edition Explanation of Ladder Diagram
Ladder diagram is a diagram language that applied on the automatic control and it is also a diagram that made
up of the symbols of electric control circuit. PLC procedures are finished after ladder diagram editor edits the ladder
diagram. It is easy to understand the control flow that indicated with diagram and also accept by technical staff of
electric control circuit. Many basic symbols and motions of ladder diagram are the same as mechanical and electrical
equipments of traditional automatic power panel, such as button, switch, relay, timer, counter and etc.
The kinds and amounts of PLC internal equipment will be different with brands. Although internal equipment has
the name of traditional electric control circuit, such as relay, coil and contact. It doesnt have the real components in it.
In PLC, it just has a basic unit of internal memory. If this bit is 1, it means the coil is ON and if this bit is 0, it means the
coil is OFF. You should read the corresponding value of that bit when using contact (Normally Open, NO or contact a).
Otherwise, you should read the opposite sate of corresponding value of that bit when using contact (Normally Close,
NC or contact b). Many relays will need many bits, 8-bits makes up a byte. 2 bytes can make up a word. 2 words
makes up double word. When using many relays to do calculation, such as add/ subtraction or shift, you could use
byte, word or double word. Furthermore, the two equipments, timer and counter, in PLC not only have coil but also
value of counting time and times.
In conclusion, each internal storage unit occupies fixed storage unit. When using these equipments, the
corresponding content will be read by bit, byte or word.
Basic introduction of the inner equipment of PLC: (Refer to Chapter 2 for detail)

Input relay
Input relay is the basic storage unit of internal memory that corresponds to external input
point (it is the terminal that used to connect to external input switch and receive external input
signal). Input signal from external will decide it to display 0 or 1. You couldnt change the state of
input relay by program design or forced ON/OFF via HPP. The contacts (contact a, b) can be
used unlimitedly. If there is no input signal, the corresponding input relay could be empty and
cant be used with other functions.
Equipment indication method: X0, X1,X7, X10, X11,. The symbol of equipment is X
and the number uses octal. There are numeric indications of input point on MPU and
expansion unit.
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-5

Output relay
Output relay is the basic storage unit of internal memory that corresponds to external output
point (it is used to connect to external load). It can be driven by input relay contact, the contact of
other internal equipment and itself contact. It uses a normally open contact to connect to external
load and other contacts can be used unlimitedly as input contacts. It doesnt have the
corresponding output relay, if need, it can be used as internal relay.
Equipment indication: Y0, Y1,Y7, Y10, Y11,. . The symbol of equipment is Y and the
number uses octal. There are numeric indications of output point on MPU and expansion
unit.
Internal relay
The internal relay doesnt connect directly to outside. It is an auxiliary relay in PLC. Its
function is the same as the auxiliary relay in electric control circuit. Each auxiliary relay has the
corresponding basic unit. It can be driven by the contact of input relay, output relay or other
internal equipment. Its contacts can be used unlimitedly. Internal auxiliary relay cant output
directly, it should output with output point.
Equipment indication: M0, M1,, M4, M5. The symbol of equipment is M and the number
uses decimal number system.
STEP
DVP PLC provides input method for controlling program of step actions. It is very easy to
write control program by using the conversion of control step S of command STL. If there is no
step program in the program, step point S could be used as internal relay M or alarm point.
Equipment indication: S0, S1,S1023. The symbol of equipment is S and the number
uses decimal.
Timer
Timer is used to control time. There are coil, contact and timer storage. When coil is ON, its
contact will act (contact a is close, contact b is open) when attaining desired time. The time value
of timer is set by settings and each timer has its regular period. User sets the timer value and
each timer has its timing period. Once the coil is OFF, the contact wont act (contact a is open
and contact b is close) and the timer will be set to zero.
Equipment indication: T0, T1,,T255. The symbol of equipment is T and the number uses
decimal system. The different number range corresponds with the different timing period.
Counter
Counter is used to count. It needs to set counter before using counter (i.e. the pulse of
counter). There are coil, contacts and storage unit of counter in counter. When coil is form OFF
to ON, that means input a pulse in counter and the counter should add 1. There are 16-bit, 32-bit
and high-speed counter for user to use.
Equipment indication: C0, C1,,C255. The symbol of equipment is C and the number
uses decimal.
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-6
Data register
PLC needs to handle data and operation when controlling each order, timer value and
counter value. The data register is used to store data or parameters. It stores 16-bit binary
number, i.e. a word, in each register. It uses two continuous number of data register to store
double words.
Equipment indication: D0, D1,,D9,999. The symbol of equipment is D and the number
uses decimal.
File register
The file register can be used to store data or parameter when the register that PLC needs is
not enough during handling data and parameter. It can store 16-bit binary number, i.e. a word, in
each file register. It uses two continuous number of file register to handle double word. There are
1600 file registers for EP series and 10000 file registers for EH series. There is not the real
equipment number for file register, thus it needs to execute READ/WRITE of file register via
commands API147 MEMR, API148 MEMW or the peripheral equipment HPP and WPLSoft.
Equipment indication: K0~K9,999. There is no equipment symbol and uses decimal
number for number.
Index register
Index register E and F are 16-bit data register just the same as general data register. It can
be wrote and read freely and has the function of index indication to use for character device, bit
device and constants.
Equipment indication: E0~E7, F0~F7. The symbols of equipment are E, F and the number
uses decimal.
The structure and explanation of ladder diagram:
Ladder Diagram
Structure
Explanation Command Equipment

Normally open, contact a LD X, Y, M, S, T, C

Normally close, contact b LDI X, Y, M, S, T, C

Serial normally open AND X, Y, M, S, T, C

Parallel normally open OR X, Y, M, S, T, C

Parallel normally close ORI X, Y, M, S, T, C

Rising-edge trigger switch LDP X, Y, M, S, T, C

Falling-edge trigger
switch
LDF X, Y, M, S, T, C

Rising-edge trigger in
serial
ANDP X, Y, M, S, T, C

Falling-edge trigger in
serial
ANDF X, Y, M, S, T, C
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-7
Ladder Diagram
Structure
Explanation Command Equipment

Rising-edge trigger in
parallel
ORP X, Y, M, S, T, C

Falling-edge trigger in
parallel
ORF X, Y, M, S, T, C

Block in serial ANB none

Block in parallel ORB none

Multiple output
MPS
MRD
MPP
none

Output command of coil
drive
OUT Y, M, S
S

Step ladder STL S

Basic command,
Application command
Application
command
Please refer chapter 3 basic command and
chapter 5 application command

Inverse logic INV none
Block: The block is the ladder diagram that made up of the serial or parallel calculation of two or above equipments. It
will get the result of parallel block or serial block according to operation character.
Serial block


Parallel block


Divergent line and combinative line: the vertical line is usually a separation for devices. This line is combination line
for the left device (it means that there are at least two columns or above circuit at
the left connect to this vertical line) this line is the divergent line for the right
device (it means that there are at least two rows or above circuit connect to this
line.
1 2
combinative line of block 1
di vergent l ine of bl ock 2
combinative line of block 2

1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-8
Network: this is the complete network that made up of devices and blocks. The vertical line or continuous line and the
block or device that line can connect to is the same network.
Independent network:
Network1
Network2

Incomplete network:

1.4 The Edition of PLC Ladder Diagram
The program edited method is from left power line to right power line. (the right power line will be omitted during
the edited of DPLSoft and WPLSoft.) After editing a row, go to editing the next row. The maximum contacts in a row
are 11 contacts. If you need more than 11 contacts, you could have the new row and start with continuous line to
continue more input devices. The continuous number will be produced automatically and the same input point can be
used repeatedly. The drawing is shown as follows.
Y1
00000
00000
X0 X1 X2 X3 X4 X5 X6 X7 X10 C0 C1
X11 X12 X13

The operation of ladder diagram is to scan from left upper corner to right lower corner. The output handling,
including the operation frame of coil and application command, at the most right side in ladder diagram.
Take the following diagram for example; we analyze the process step by step. The number at the right corner is
the explanation order.
TMR T0 K10
Y1
X0 X1 Y1 X4
M3 T0 M0
X3 M1
1
22
3
4
55
56
7
8

1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-9
The explanation of command order:
1 LD X0
2 OR M0
3 AND X1
4 LD X3
AND M1
ORB
5 LD Y1
AND X4
6 LD T0
AND M3
ORB
7 ANB
8 OUT Y1
TMR T0 K10
The detail explanation of basic structure of ladder diagram
1. LD (LDI) command: give the command LD or LDI in the start of a block.
LD command
AND Block

LD command
OR Block

The structures of command LDP and LDF are similar to the command LD. The difference is that command LDP
and LDF will act in the rising-edge or falling-edge when contact is ON as shown in the following.

X0
OFF
ON OFF
Time
Risi ng-edge

X0
OFF
ON OFF
Time
Falling-edge

2. AND (ANI) command: single device connects to a device or a block in series.
AND
command
AND
command

The structures of ANDP and ANDF are the same but the action is in rising-edge or falling-edge.
3. OR (ORI) command: single device connects to a device or a block.
OR
command
OR
command
OR
command

1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-10
The structures of ORP and ORF are the same but the action is in rising-edge or falling-edge.
4. ANB command: a block connects to a device or a block in series.

ANB command

5. ORB command: a block connects to a device or a block in parallel.
ORB
command

If there are several blocks when operate ANB or ORB, they should be combined to blocks or network from up to
down or from left to right.

6. MPS, MRD, MPP commands: Divergent memory of multi-output. It can produce many various outputs.
The command MPS is the start of divergent point. The divergent point means the connection place between
horizontal line and vertical line. We should determine to have contact memory command or not according to the
contacts status in the same vertical line. Basically, each contact could have memory command but in some places of
ladder diagram conversion will be omitted due to the PLC operation convenience and capacity limit. MPS command
can be used for 8 continuous times and you can recognize this command by the symbol .
MRD command is used to read memory of divergent point. Because the logical status is the same in the same
horizontal line, it needs to read the status of original contact to keep on analyzing other ladder diagram. You can
recognize the command MRD by the symbol .
MPP command is used to read the start status of the top level and pop it out from stack. Because it is the last
item of the horizontal line, it means the status of this horizontal line is ending.

1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-11
You can recognize this command by the symbol .
Basically, that is all right to use the above method to
analyze but sometimes compiler will omit the same
outputs as shown at the right.
MPS
MRD
MPP
MPP
MPS

7. STL command: this command is used in the syntax design for the Sequential Function Chart (SFC). This
command helps the programmer to have clearer ideas on the program procedure, and thus the procedure will
be more readable. As shown in the following diagrams, we can get clear procedure, and original step point will
have the action of power loss after each step point S transfer to the next step point. In this way, we could
transfer to our procedure diagram from the left diagram to the PLC structure diagram below.
e
S0
S21
S22
M1002
initial
pulse
M1002
SET S0
SET S21
S
S0
SET S22
S
S21
S
S22
S0
RET

8. RET command: you should add RET command after finishing step ladder program and RET command should
add after STL command as shown in the following.
e
S
S20
RET
e
S
S20
RET

Refer to chapter 4 for the structure of step ladder [ STL ] , [ RET ].
1.5 The Conversion of PLC Command and Each Diagram Structure
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-12
Ladder Diagram
X0 X2 X1
X1
M1
C0
Y0
SET S0
M2 Y0
M0
X10
Y10
SET S10
S0
S
X11
Y11
SET S11
S10
S
SET S12
SET S13
X12
Y12
SET S20
S11
S
X13
S0
RET
S20
S
S12
S
S13
S
X0
CNT C0 K10
X1
M0
C0
X1
M2
RST C0
M1
M2
END

LD X0
OR
X1
LD
OR
X2
M0
ORI
M1
ANB
LD
AND
M2
Y0
5
1
OR
block
2
OR
block
Serial
block
3
AND
block
Serial block
4
ANI
ORB
ANI
OUT
AND
SET
STL
LD
X1
Y0
C0
S0
S0
X10
Multiple
outputs
Step ladder Start
State working item and
step point transfer
Output state will keep on
handling according to
program scan state
7
8
8
9
10
12
13
11
14
Y10
S10
S10
OUT
SET
STL
LD X11
OUT
SET
SET
SET
STL
LD
OUT
Y11
S11
S12
S13
S11
X12
Y12
S10 state take out
Take out X11 state
State working item and
step point transfer
S11 state take out
Take out X12 state
State working item and
step point transfer
SET
STL
STL
STL
LD
OUT
RET
S20
S20
S12
S13
X13
S0
15
LD S0
CNT
LD C0
C0K10
17
18
Simultaneous
divergence
State working item
and step point transfer
End of step ladder
Return
Read C0
Multiple
outputs
MPS
AND X1
OUT M0
MRD
ANI X1
OUT M1
MPP
ANI
OUT
END
M2
M2
Program End

Syntax Fuzzy Structure
The analytic process of correct ladder diagram should be from left to right or from up to down. But there are some
exceptions as shown in the following.
Example 1: there are two methods to use command to show the following ladder diagram but the result is the same.
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-13
Good method Bad method
LD X0 LD X0
OR X1 OR X1
LD X2 LD X2
OR X3 OR X3
ANB LD X4
LD X4 OR X5
OR X5 ANB
X0 X2 X4
X5 X3 X1

ANB ANB
The results for the above two programs to convert to ladder diagram are the same. Why one is better than the
other? That is due to operation of MPU. The operation of the program in the left side is one block merges to another
one. Although the length of the program at the right side is the same as the left one, the operation of the program in
the right side is merged at the last. (command ANB is used to merge, it cant use more than 8 continuous times). In
this program, it just needs to use continuous two times of command ANB and MPU allows that. But when the program
needs to use more than continuous 8 times of command ANB, MPU wont allow. So the best method is to merge once
the block is established and in this way the logic of programmer will be in order.
Example 2: there are two methods to use command to show the following ladder diagram but the result is the same.
Good method Bad method
LD X0 LD X0
OR X1 LD X1
OR X2 LD X2
OR X3 LD X3
ORB
ORB
X0
X1
X2
X3

ORB
The difference is very clear in these two programs. In the bad method, the more program code it needs and the
operation memory of MPU also needs to increase. So that is better to decode in the order of the definition.
The error figures of ladder diagram
When editing ladder diagram, you can use all ladder symbols to make up all kinds of figures. When drawing
ladder diagram, you should start from left power line and end with the right power line (the right power line will be
omitted when using DPLSoft ladder diagram) due to the principle for PLC to handle figure program is from up to down
and from left to right (it is drew from left to right and draw the next new row after finishing drawing a row). They are the
common error figure in the following.


It cant do OR operation upward.

1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-14
reverse flow power

There is reverse power flow during the circuit that
is from input to output signal.

The correct is output from right upper corner.

If you want to merge or edit, the order should be
from left upper corner to right lower corner. The
block of dot line should move up.

It cant do parallel operation with empty device.

Empty device cant do operation with other device.

There is no device in the middle block.
.
The device in series should be arranged in parallel
with the block that it connects in series.

The position of Label P should be in the first row of
the complete network.

The block that is connected in series should be
arranged in parallel with the upper horizontal line.
1.6 The Simplification of Ladder Diagram
To put the block in the front of ladder diagram can omit command ANB when series block and parallel block
connect in series.


1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-15
Command
LD X0
LD X1
OR X2
X0 X1
X2


ANB
Command
LD X1
OR X2
X0 X1
X2
AND X0
To put the block in the front of ladder diagram can omit command ORB when single equipment and block are
connected in parallel.
Command
LD T0
LD X1
AND X2
T0
X1 X2


ORB
Command
LD X1
AND X2
T0
X1 X2

OR T0
In figure a of ladder diagram, it does not illegal due to the reverse power flow. In figure a, the upper block is
shorter than lower block, you could make it legal by switching them.
command
LD X0
OR X1
AND X2
LD X3
AND X4
X0
X1 X2
X3 X4
Fig. a
ORB

command
LD X3
AND X4
LD X1
OR X0
AND X2
X0
X1 X2
X3 X4
Fig. b
ORB
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-16
You can omit commands MPS, MPP when the multiple outputs in the same horizontal line dont need to operate
with other input device.
command
MPS
AND X0
OUT Y1
MPP
X0
Y1
Y0

OUT Y0

command
OUT Y0
AND X0
Y0
Y1
X0

OUT Y1
Correct the circuit of reverse flow power
In the following examples, the figure at the left is the ladder diagram that is draw by our definition but there is
reverse flow power in it. Therefore, we correct it and show it at the right side.
Example 1:
X0
X3
X6
X1
X4
X7
X2
X5
X10
LOOP1
reverse flow power


X0 X1 X2
X3 X4 X5
X10
X6 X7 X5
X10
LOOP1

Example 2:
X0
X3
X6
X1
X4
X7
X2
X5
X10
LOOP1
reverse flow power

X0
X3
X6
X1
X4
X7
X2
X5
X10
reverse flow power


LOOP1
X0 X1 X2
X3 X4 X5
X6
X3 X7 X10
X6
X0 X1 X7 X10
LOOP2
X4

1.7 The Example for Designing Basic Program
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-17
Start, Stop and Latching
In the same occasions, it needs transient close button and transient open button to be start and stop switch.
Therefore, if you want to keep the action, you should design latching circuit. There are several latching circuits in the
following:
Example 1: the latching circuit for priority of stop
When start normally open contact X1=On, stop normally
contact X2Off, and Y1=On are set at the same time, if
X2=On, the coil Y1 will stop acting. Therefore, it calls priority of
stop.
X2
Y1
X1
Y1

Example 2: the latching circuit for priority of start
When start normally open contact X1=On, stop normally
contact X2Off and Y1=On (coil Y1 will be active and
latching) are valid at the same time, if X2=On, coil Y1 will be
active due to latched contact. Therefore, it calls priority of start.
X2
Y1
X1
Y1

Example 3: the latching circuit of SET and RST commands
SET Y1
RST Y1
X1
X2
Top priority of stop

The figure at the right side is latching circuit that made up
of RST and SET command.
It is top priority of stop when RST command is set behind
SET command. When executing PLC from up to down, The
coil Y1 is ON and coil Y1 will be OFF when X1 and X2 act at
the same time, therefore it calls priority of stop.
It is top priority of start when SET command is set after
RST command. When X1 and X2 act at the same time, Y1 is
ON so it calls top priority of start.
SET
Y1 RST
Y1
X2
X1
Top priority of start

Example 4: latched
Auxiliary relay M512 is latched at the right side. (refer to
PLC user manual) the circuit at the right side will be latched
when power is on and it will be also latched once the power
loss and power on again. Therefore the latched is continuous.
X2
M512
X1
SET
RST M512
Y1
M512

The common control circuit
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-18
Example 5: condition control
X3
Y1
X1
Y1
X4
Y2
X2
Y2
Y1

X1
X3
X2
X4
Y1
Y2

X1 and X3 can start/stop Y1 separately, X2 and X4 can start/stop Y2 separately and they are all self latched
circuit. Y1 is an element for Y2 to do AND function due to the normally open contact connects to Y2 in series.
Therefore, Y1 is the input of Y2 and Y2 is also the input of Y1.
Example 6: Interlock control
X3
Y1
X1
Y1
X4
Y2
X2
Y2
Y1
Y2

X1
X3
X2
X4
Y1
Y2

The figure above is the circuit of interlock control. Y1 and Y2 will act according to the start contact X1 and X2.
Y1 and Y2 will act not at the same time, once one of them acts and the other wont act. (This is called interlock.)
Even if X1 and X2 are valid at the same time, Y1 and Y2 wont act at the same time due to up-to-down scan of
ladder diagram. For this ladder diagram, Y1 has higher priority than Y2.
Example 7: Sequential Control
X3
Y1
X1
Y1
X4
Y2
X2
Y2
Y1
Y2

If add normally close contact Y2 into Y1 circuit to be
an input for Y1 to do AND function. (as shown in the left
side) Y1 is an input of Y2 and Y2 can stop Y1 after
acting. In this way, Y1 and Y2 can execute in sequential.
Example 8: Oscillating Circuit
The period of oscillating circuit is T+T
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-19
Y1
Y1

Y1
T T
The figure above is a very simple ladder step diagram. When starting to scan Y1 normally close contact, Y1
normally close contact is close due to the coil Y1 is OFF. Then it will scan Y1 and the coil Y1 will be ON and output 1.
In the next scan period to scan normally close contact Y1, Y1 normally close contact will be open due to Y1 is ON.
Finally, coil Y1 will be OFF and output 0. Scan repeatedly, the period of oscillating circuit is nT+T.
T0
X0
TMR
Y1
Y1
T0
Kn

Y1
T T n
X0

The figure above uses timer T0 to control coil Y1 to be ON. After Y1 is ON, timer T0 will be closed at the next
scan period and output Y1. The oscillating circuit will be shown as above. (n is the setting of timer and it is decimal
number. T is the base of timer. (clock period))
Example 9: Blinking Circuit
T2 TMR Kn2
T1
X0
TMR
Y1
T2
T1
Kn1
X0 T1

Y1
T n1
X0
T n2

The figure above is common used oscillating circuit for indication light blinks or buzzer alarms. It uses two
timers to control On/OFF time of Y1 coil. If figure, n1 and n2 are timer setting of T1 and T2. T is the base of timer
(clock period)
Example 10: Triggered Circuit
Y1
M0
X0
Y1
Y1
M0
M0

X0
M0
Y1
T
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-20
In figure above, the rising-edge differential command of X0 will make coil M0 to have a single pulse of T (a
scan time). Y1 will be ON during this scan time. In the next scan time, coil M0 will be OFF and normally close M0
and normally close Y1 are all closed. However, coil Y1 will keep on being ON and it will make coil Y1 to be OFF once
a rising-edge comes after input X0 and coil M0 is ON for a scan time. The timing chart is as shown above. This
circuit usually executes alternate two actions with an input. From above timing: when input X0 is a square wave of a
period T, output coil Y1 is square wave of a period 2T.
Example 11: Delay Circuit
T10
X0
TMR
Y1
T10
K1000

TB = 0.1 sec
X0
Y1
100 seconds

When input X0 is ON, output coil Y1 will be ON at the same time due to the corresponding normally close
contact OFF makes timer T10 to be OFF. Output coil Y1 will be OFF after delay 100 seconds once input X0 is OFF
and T10 is ON. Please refer to timing chart above.
Example 12: Output delay circuit, in the following example, the circuit is made up of two timers. No matter input X0 is
ON or OFF, output Y4 will be delay.
T5
T5
TMR
Y4
T6
X0
K50
Y4
T6
Y4
TMR
X0
K30

X0
T5
Y0
T6
5
seconds
3
seconds

Example13: Extend Timer Circuit
T12 TMR Kn2
T11
X0
TMR
Y1
T11
Kn1
T12

In this circuit, the total delay time from input X0 is
close and output Y1 is ON= (n1+n2)* T. where T is
clock period.
Example 14: The method of enlarge counter range
1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-21
C6 CNT Kn2
C5
X13
CNT
RST
C5
Kn1
X14
C5 RST
Y1
C6
C6

The range of 16-bit counter is 0~32,767. If using
two counters as figure in left side, the counter range
can be enlarge to n1*n2. When counter C5 attains n1,
counter C6 will counts one time and reset itself. Then
counter C6 will count the pulse of X13. When counter
C6 attains n2, the pulse of X13 will be n1*n2.
Example 15: Traffic light control (by using step ladder command)
Vertical
Light
Horizontal
Light

Traffic light control
Red light
Yellow
light
Green
light
Green
blink light
Vertical
light
Y0 Y1 Y2 Y2
Horizontal
light
Y10 Y11 Y12 Y12
Light Time 35 Sec 5 Sec 25 Sec 5 Sec

Timing chart:
25 Sec
5 Sec 5 Sec
5 Sec 5 Sec
25 Sec
Y0
Y1
Y2
Y10
Y11
Y12
Vertical
Light
Red
Yellow
Green
Horizontal
Light
Red
Yellow
Green

1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-22
SFC Figure:
S0
S20
S21
S22
S0
M1002
T0
T1
T13
Y0
S23
T2
TMR T0 K350
Y2
TMR T1 K250
Y2
TMR T2 K50
M1013
Y1
S30
S31
S32
T10
T11
S33
T12
Y12
TMR T10 K250
Y11
TMR T12 K50
Y12
TMR T11 K50
M1013
Y10
TMR T13 K350
Ladder Diagram:
M1002
ZRST S0 S127
SET S0
SET S20
Y2
END
S0
S
S21
S
Y1
S23
S
Y12
S30
S
T13 S23
S
S33
S
SET S30
S20
S
TMR T0
SET S21
T0
Y0
K350
TMR T1
SET S22
T1
K250
Y2
S22
S TMR T2
SET S23
T2
K50
M1013
TMR T10
SET S31
T10
K250
Y12
S31
S TMR T11
SET S32
T11
K50
M1013
Y11
S32
S
TMR T12
SET S33
T12
K50
Y10
S33
S
TMR T13 K350
S0
RET


1 Working Principles of PLC Ladder Diagram
DVP-PLC Application Manual 1-23
Drawing by SFC Editor (WPLSoft )
Drawing by SFC Internal Ladder Diagram View
LAD-0
S0 ZRST S127
M1002
S0 SET

Transferred condition 1
TRANS*
T0

S22
Y2
T2 TMR K50
M1013

Transferred condition 4
TRANS*
T13
TRANS*
T13
TRANS*
T13
TRANS*
T13
TRANS*
T13
TRANS*
T13
TRANS*
T13

0
2
3
4
5
6
7
1
LAD-0
S0
S20
S21
S22
S23
S30
S31
S32
S33
S0

Transferred condition 7
TRANS*
T12
TRANS*
T12
TRANS*
T12
TRANS*
T12
TRANS*
T12
TRANS*
T12
TRANS*
T12




2 DVP-PLC Function
DVP-PLC Application Manual 2-1
2.1 Summary of DVP-PLC Device Number
ES, EX, SS Models:
Type
Device
Item Usage Range Function
X External input relay
X0~X177, 128 points, octal
number system
Correspond to
external input point
Y External output relay
Y0~Y177, 128 points, octal
number system
Total is
256
points
Correspond to
external output point
For general
M0~M511, M768~M999,
744 points
For latched * M512~M767, 256 points M Auxiliary
For special
M1000~M1279, 280 points
(some are latched)
Total is
1280
points
Contacts can switch to
On/Off in program
(some is latched)
100ms timer T0~T63, 64 points
10ms counter
T64~T126, 63 points (when
M1028=On, it is 10ms,
M1028=Off, it is 100ms)
T Timer
1ms timer T127, 1 points
Total is
128
points
When the timer
indicated by TMR
command attains the
setting, the T contact
with the same number
will be ON.
16-bit count up for general C0~C111, 112 points
16-bit count up for latched * C112~C127, 16 points
Total is
128
points
1-phase input
C235~C238, C241, C242,
C244, 7 points
1-phase 2 inputs C246, C247, C249, 3 points
C Counter
32-bit count
up/down
high-speed
counter for
latched*
2-phase 2 inputs C251, C252, C254, 3 points
Total is
13
points
When the counter
indicated by CNT
(DCNT) command
attains the setting, the
C contact with the
same number will be
ON.
Initial step point latched * S0~S9, 10 points
Zero point return latched *
S10~S19, 10 points (use
with IST command)
R
e
l
a
y

b
i
t

m
o
d
e

S
Step
point
latched * S20~S127, 108 points
Total is
128
points
Usage device of step
ladder diagram (SFC)
T Present value of timer T0~T127, 128 points
When timer attains,
the contact of timer
will be ON.
C Present value of counter
C0~C127, 16-bit counter, 128
C235~C254, 32-bit counter, 13 points
When timer attains,
the contact of timer
will be ON.
For general D0~D407, 408 points
For latched * D408~D599, 192 points
Total is
600 points
For special
D1000~D1311, 312 points
(for V4.9 and above)
D1000~D1143, 144 points
(for V4.8 and below)
R
e
g
i
s
t
e
r

W
O
R
D

d
a
t
a

D
Data
register
For index indication
E(=D1028), F(=D1029), 2
points
Total is
312 points
(144
points)
It can be memory
area for storing data.
E and F can be used
as the special
purpose of index
indication
N For master control nested loop N0~N7, 8 points
Control point of
master control nested
loop
P For CJ, CALL commands P0~P63, 64 points
Location pointer of
CJ, CALL
Time interrupt
I6, 1 point (10~99ms)
(for Version 5.7)
External interrupt I001, I101, I201, I301, 4 points
P
o
i
n
t
e
r

I Interrupt
Communication interrupt I150
Location pointer of
interrupt subroutine
K Decimal
K-32,768 ~ K32,767 (16-bit operation)
K-2,147,483,648 ~ K2,147,483,647 (32-bit operation)
C
o
n
s
t
a
n
t

H Hexadecimal
H0000 ~ HFFFF (16-bit operation)
H00000000 ~ HFFFFFFFF (32-bit operation)
* latched area is fixed, it cant be changed.
2 DVP-PLC Function
DVP-PLC Application Manual 2-2
EP/SA models:
Type
Device
Item Range Function
X External input relay
X0~X177, 128 points, octal number
system
Correspond to
external input point
Y External output relay
Y0~Y177, 128 points, octal number
system
Total
is
256
points
Correspond to
external output point
For general M0~M511, 512 points (*1)
For latched *
M512~M999, 488 points (*3)
M2000~M4095, 2096 points (*3) M
Auxiliary
Relay
For special
M1000~M1999, 1000 points (some
are latched)
Total
is
4096
points
Contacts can be
switched during
ON/OFF in the
program (some is
latched)
100ms
T0~T199, 200 points (*1)
T192~T199 for subroutine
T250~T255, 6 points (accumulative
type) (*4)
10ms
T200~T239, 40 points (*1)
T240~T245, 6 points (accumulative
type) (*4)
T Timer
1ms
T246~T249, 4 points (accumulative
type) (*4)
Total
is
256
points
When the timer that
TMR command
indicates attains the
setting, the T contact
with the same
number will be On.
C0~C95, 96 points (*1)
16-bit count up
C96~C199, 104 points (*3)
C200~C215, 16 points (*1)
32-bit count up/down
C216~C234, 19 points (*3)
C235~C244, 1-phase 1 input, 9
points (*3)
C246, C247, C249, 1-phase 2
inputs, 3 points (*3)
C Counter
32-bit high-speed
counter
C251, C252, C254, 2-phase 2
inputs, 3 points (*3)
Total
is
250
points
When the timer that
CNT(DCNT)
command indicates
attains, the contact C
with the same
number will be On.
Initial step point S0~S9, 10 points (*1)
Zero point return
S10~S19, 10 points (use with IST
command) (*1)
For general S20~S512, 492 points (*1)
For latched * S512~S895, 384 points (*3)
R
e
l
a
y

b
i
t

m
o
d
e

S
Step
point
For alarm S896~S1023, 128 points (*3)
Total
is
1024
points
Usage device of step
ladder diagram



2 DVP-PLC Function
DVP-PLC Application Manual 2-3
Type
Device
Item Range Function
T
Present value of timer T0~T255, 256 points
When timer attains,
the contact will be
On.
C
Present value of counter

C0~C199, 16-bit counter, 200 points
C200~C254, 16-bit counter, 50 points
When timer attains,
the contact will be On.
For general D0~D199, 200 points (*1)
For latched*
D200~D999, 800 points (*3)
D2000~D4999, 3000 points
(*3)
For special D1000~D1999, 1000 points
D
Data
register
For index indication E0~E3, F0~F3, 8 points (*1)
Total is
5000 points
It is the memory area
for storing data. E and
F can be used as
special purpose of
index indication
R
e
g
i
s
t
e
r

W
O
R
D

d
a
t
a

None File register * K0~K1599 (1600 points) (*4)
It is expansion
register for storing
data
N
Master control nested N0~N7, 8 points
The control point of
master control nested
P
For CJ, CALL commands P0~P255, 256 points
The location point of
CJ, CALL
External interrupt
I001, I101, I201, I301, I401, I501, total is 6
points
Time interrupt
I6, I7, 2 points (1~99ms,
time base=0.1ms)
High-speed counter
reaches interrupt
I010, I020, I030, I040, I050, I060, 6 points
P
o
i
n
t
e
r

I
For
interrupt
Communication interrupt I150
The location point of
interrupt subroutine.
K Decimal number system
K-32,768 ~ K32,767 (16-bit operation)
K-2,147,483,648 ~ K2,147,483,647 (32-bit operation)
C
o
n
s
t
a
n
t

H Hexadecimal number system
H0000 ~ HFFFF (16-bit operation)
H00000000 ~ HFFFFFFFF (32-bit operation)
*1: non-latched area is fixed, it cant be changed.
*2: non-latched area can be changed to latched area by parameter setting.
*3: latched area can be changed to non-latched area by parameter setting.
*4: latched area is fixed, it cant be modified. (the area marked withcant be changed)

2 DVP-PLC Function
DVP-PLC Application Manual 2-4
Latched setting for each EP/SA model:
For general For latched Special auxiliary relay Latched
M0~M511 M512~M999 M1000~M1999 M2000~M4095
Factory setting is
latched
Factory setting is latched
M
Auxiliary relay
It is fixed to be
non-latched Start: D1200(K512)
End: D1201(K999)
Some are latched and
cant be changed Start: D1202(K2000)
End: D1203(K4095)
100 ms 10 ms 10ms 1 ms 100 ms
T0 ~T199 T200~T239 T240~T245 T246~T249 T250~T255
T
Timer
It is fixed to be
non-latched
It is fixed to be
non-latched
Accumulative type
It is fixed to be latched
16 bits count up 32 bits count up/down
32 bits count up/down high
speed counter
C0~C95 C96~C199 C200~C215 C216~C234 C235~C255
It is fixed to be
latched
It is fixed to be
latched
Factory setting is latched C
Counter
It is fixed to be
non-latched
Start: D1208
K96
End: D1209
K199
It is fixed to
be
non-latched
Start: D1210
K216
End: D1211
K234
Start: D1212K235
End: D1213K255
For
general
Latched
Special
register
Latched For general
S0~S9 S10~S19 S20~S511 S512~S895 S896~S1023
Factory setting is latched
S
Step relay
It is fixed to be non-latched
Start: D1214K512
End: D1215K895
It is fixed to be latched
For general Latched Special register Latched
D0~D199 D200~D999 D1000~D1999 D2000~D9999
Factory setting is
latched
Factory setting is latched
D
Register It is fixed to be
non-latched Start: D1216 (K200)
End: D1217 (K999)
Some are latched and
cant be changed Start: D1218 (K2000)
End: D1219 (K4999)
K0~K1599
Data Register
It is fixed to be latched
EH model:
Type
Device
Item Range Function
X External input relay X0~X377, 256 points, octal number system
Corresponds to
external input point
Y External output relay Y0~Y377, 256 points, octal number system
Total
is
512
points
Corresponds to
external output point
For general M0~M499, 500 points (*2)
For latched
M500~M999, 500 points (*3)
M2000~M4095, 2096 points (*3) M
Auxiliary
relay
For special
M1000~M1999, 1000 points (some are
latched)
Total
is
4096
points
Contacts can be
switched between
On/Off in the program
(some is latched)
100ms
T0~T199, 200 points (*2)
T192~T199 is for subroutine
T250~T255, 6-point Accumulative type (*4)
10ms
T200~T239, 40 points (*2)
T240~T245, 6-point Accumulative type (*4)
R
e
l
a
y

b
i
t

m
o
d
e

T Timer
1ms T246~T249, 4-point Accumulative type (*4)
Total
is
256
points
When the timer that
set by TMR
command attains, the
T contact with the
same number will be
On.
2 DVP-PLC Function
DVP-PLC Application Manual 2-5
Type
Device
Item Range Function
16-bit count up
C0~C99, 100 points (*2)
C100~C199, 100 points (*3)
32-bit count
up/down
C200~C219, 20 points (*2)
C220~C234, 15 points (*3) C Counter
High-speed
counter
C235~C244, 1-phase 1 input, 10 points (*3)
C246~C249, 1-phase 2 inputs, 4 points(*3)
C251~C254, 2-phases 2 inputs, 4 points (*3)
Total
is
253
points
When the timer that
set by CNT(DCNT)
command attains, the
contact C will be On.
Initial step
point
S0~S9, 10 points (*2)
For zero point
return
S10~S19, 10 points (use with IST command)
(*2)
For general S20~S499, 480 points (*2)
For latched S500~S899, 400 points (*3)

S
Step
points
For alarm S900~S1023, 124 points (*3)
Total
is
1024
points
Usage device of step
ladder diagram (SFC)
T Present value of timer T0~T255, 256 points
When timer attains,
the contact of timer
will be On.
C Present value of counter
C0~C199, 16-bit counter, 200 points
C200~C254, 132-bit counter, 53 points
When timer attains,
the contact of timer
will be On.
For general D0~D199, 200 points, (*2)
For latched
D200~D999, 800 points (*3)
D2000~D9999, 8000 points (*3)
For special D1000~D1999, 1000 points
D
Data
register
For index E0~E7, F0~F7, 16 points (*1)
Total is
10000
points
It is the memory area
for storing data. E
and F can be used as
special purpose of
index indication
R
e
g
i
s
t
e
r

W
O
R
D

d
a
t
a

None File register K0~K9999(10000 points) (*4)
Expansion register for
storing data
N Master control nested N0~N7, 8 points
Master control nested
control point
P For CJ, CALL commands P0~P255, 256 points
The location pointer of
CJ, CALL
External interrupt
I00(X0), I10(X1), I20(X2), I30(X3), I40
(X4), I50(X5), 6 points
(=1, rising-edge trigger , =0, falling-edge
trigger )
Time interrupt
I6, I7, I8, 3 points(1~99ms) time
base=1ms
I8, 1 point (1~99, time base=0.1ms)
High-speed counter
attained interrupt
I010, I020, I030, I040, I050, I060, 6 points
Pulse interrupt I110, I120, I130, I140, 4 points
P
o
i
n
t
e
r

I
I
n
t
e
r
r
u
p
t

Communication
interrrupt
I150
The location pointer of
interrupt subroutine
K Decimal system
K-32,768 ~ K32,767 (16-bit operation)
K-2,147,483,648 ~ K2,147,483,647 (32-bit
operation)

C
o
n
s
t
a
n
t

H Hexadecimal system
H0000 ~ HFFFF (16-bit operation)
H00000000 ~ HFFFFFFFF (32-bit operation)

2 DVP-PLC Function
DVP-PLC Application Manual 2-6
*1: the area of non-latched is fixed, it cant be changed.
*2: the area of non-latched, it can be changed to latched area by parameter setting.
*3: latched area can be changed to non-latched area by parameter setting.
*4: latched area is fixed, it cant be modified. (the area marked withcant be changed)
Latched setting for each EH model:
* 1: HFFFF means factory setting is non-latched.
When switching between power On/Off or MPU RUN/STOP mode, the memory type of version 5.5 and higher of ES,
ES/EX/SS series will be as following:
Memory type
Power
Off=>On
STOP=>RUN RUN=>STOP
Clear all M1031
Non-latched
area
Clear all M1032
latched area
Factory
setting
When M1033=Off, clear
Non-latched Clear
When M1033=On, unchanged
Clear Unchanged 0
Latched Unchanged Unchanged Clear Unchanged
Special M,
Special D,
index register
Initial Unchanged Unchanged
Initial
setting

For general For latched Special auxiliary relay Latched
M0~M499 M500~M999 M1000~M1999 M2000~M4095 M
Auxiliary relay
Start: D1200(K500)
End: D1201(K999)
Some are latched and
they cant be changed.
Start: D1202(K2000)
End: D1203(K4095)
100 ms 10 ms 10ms 1 ms 100 ms
T0 ~T199 T200~T239 T240~T245 T246~T249 T250~T255
Factory setting is
non-latched
Factory setting is
non-latched
T
Timer
Start: D1204 (HFFFF)*1
End: D1205 (HFFFF)*1
Start: D1206 (HFFFF)*1
End: D1207 (HFFFF)*1
Accumulative type
Fixed latched
16-bit count up 32-bit count up/down 32-bit high-speed count up/down
C0~C99 C100~C199 C200~C219 C220~C234 C235~C245 C246~C255
Non-latched
(default)
Latched (default)
Non-latched
(default)
Latched
(default)
Latched (default)
C
Counter
Start: D1208 (K100)
End: D1209 (K199)
Start: D1210 (K220)
End: D1211 (K234)
Start: D1212 (K235)
End: D1213 (K255)
Initial
Zero point
return
For general Latched Step point for alarm
S0~S9 S10~S19 S20~S499 S500~S899 S900~S1023
Non-latched (default) Latched (default)
S
Step relay
Start: D1214 (K500)
End: D1215 (K899)
Always is latched
For general Latched Special register Latched
D0~D199 D200~D999 D1000~D1999 D2000~D9999
Non-latched (default) Latched (default) Latched (default)
D
Register
Start: D1216 (K200)
End: D1217 (K999)
Some is latched, it cant
be changed
Start: D1218 (K2000)
End: D1219 (K9999)
2 DVP-PLC Function
DVP-PLC Application Manual 2-7
The memory type of EP/SA/EH models will be as following:
Memory type
Power
Off=>On
STOP=>RUN RUN=>STOP
Clear all M1031
Non-latched
area
Clear all M1032
latched area
Factory
setting
When M1033=Off, clear
Non-latched Clear
When M1033=On, No change
Clear Unchanged 0
Latched Unchanged Unchanged Clear 0
Special M,
Special D,
index register
Initial Unchanged Unchanged
Initial
setting
File Register Unchanged 0
2.2 Value, constant [K] / [H]
K Decimal
K-32,768 ~ K32,767 (16-bit operation)
K-2,147,483,648 ~ K2,147,483,647 (32-bit operation)
Constant
H Hexadecimal
H0 ~ HFFFF (16-bit operation)
H0 ~ HFFFFFFFF (32-bit operation)
There are five value types for DVP-PLC to use by the different control destination. The following is the
explanation of value types.
1. Binary Number (BIN)
It uses binary system for the PLC internal operation or storage. The relative information of binary system is in the
following.
Bit : Bit is the basic unit of binary system, the status are 1 or 0.
Nibble : It is made up of continuous 4 bits, such as b3~b0. It can be used to represent
number 0~9 of decimal or 0~F of hexadecimal.
Byte : It is made up of continuous 2 nibbles, i.e. 8 bits, b7~b0). It can used to
represent 00~FF of hexadecimal system.
Word : It is made up of continuous 2 bytes, i.e. 16 bits, b15~b0. It can used to
represent 0000~FFFF of hexadecimal system.
Double Word : It is made up of continuous 2 words, i.e. 32 bits, b31~b0. It can used to
represent 00000000~FFFFFFFF of hexadecimal.
The relations among bit, nibble, byte, word, and double word of binary number are shown as follows.
NB0 NB1 NB2 NB3 NB4 NB5 NB6 NB7
BY3 BY2 BY1 BY0
W1
DW
W0
Double Word
Word
Byte
Ni bble
Bi t

2. Octal Number (OCT)
The numbers of external input and output terminal of DVP-PLC use octal number.
Example:
External input: X0~X7, X10~X17(device number)
2 DVP-PLC Function
DVP-PLC Application Manual 2-8
External output: Y0~Y7, Y10~Y17(device number)
3. Decimal Number (DEC)
The suitable time for decimal number to use in DVP-PLC system.
To be the setting value of timer T or counter C, such as TMR C0 K50. (K constant)
To be the device number of S, M, T, C, D, E, F, P, I. For example: M10, T30. (device number)
To be operand in application command, such as MOV K123 D0. (K constant)
4. BCD (Binary Code Decimal, BCD)
It shows a decimal number by a unit number or four bits so continuous 16 bits can use to represent the
four numbers of decimal number. BCD code is usually used to read the input value of DIP switch or output
value to 7-segment display to be display.
5. Hexadecimal Number (HEX)
The suitable time for hexadecimal number to use in DVP-PLC system.
To be operand in application command. For example: MOV H1A2B D0. (constant H)
Constant K:
In PLC, it is usually have K before constant to mean decimal number. For example, K100 means 100 in
decimal number.
Exception:
The value that is made up of K and bit equipment X, Y, M, S will be bit, byte, word or double word. For
example, K2Y10, K4M100. K1 means a 4-bit data and K2~K4 can be 8, 12 and 16-bit data separately.
Constant H:
In PLC, it is usually have H before constant to mean hexadecimal number. For example, H100 means 100 in
hexadecimal number.
Reference Chart:
Binary
(BIN)
Octal
(OCT)
Decimal
(DEC)
BCD
(Binary Code Decimal)
Hexadecimal
(HEX)
For PLC internal operation
Equipment
X, Y number
Constant K,
equipment M, S, T, C,
D, E, F, P, I number
For DIP Switch and 7-segment
display
Constant H
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 0 1 1
0 0 0 0 0 0 1 0 2 2 0 0 0 0 0 0 1 0 2
0 0 0 0 0 0 1 1 3 3 0 0 0 0 0 0 1 1 3
0 0 0 0 0 1 0 0 4 4 0 0 0 0 0 1 0 0 4
0 0 0 0 0 1 0 1 5 5 0 0 0 0 0 1 0 1 5
0 0 0 0 0 1 1 0 6 6 0 0 0 0 0 1 1 0 6
0 0 0 0 0 1 1 1 7 7 0 0 0 0 0 1 1 1 7
0 0 0 0 1 0 0 0 10 8 0 0 0 0 1 0 0 0 8
0 0 0 0 1 0 0 1 11 9 0 0 0 0 1 0 0 1 9
0 0 0 0 1 0 1 0 12 10 0 0 0 1 0 0 0 0 A
0 0 0 0 1 0 1 1 13 11 0 0 0 1 0 0 0 1 B
0 0 0 0 1 1 0 0 14 12 0 0 0 1 0 0 1 0 C
0 0 0 0 1 1 0 1 15 13 0 0 0 1 0 0 1 1 D
2 DVP-PLC Function
DVP-PLC Application Manual 2-9
Binary
(BIN)
Octal
(OCT)
Decimal
(DEC)
BCD
(Binary Code Decimal)
Hexadecimal
(HEX)
For PLC internal operation
Equipment
X, Y number
Constant K,
equipment M, S, T, C,
D, E, F, P, I number
For DIP Switch and 7-segment
display
Constant H
0 0 0 0 1 1 1 0 16 14 0 0 0 1 0 1 0 0 E
0 0 0 0 1 1 1 1 17 15 0 0 0 1 0 1 0 1 F
0 0 0 1 0 0 0 0 20 16 0 0 0 1 0 1 1 0 10
0 0 0 1 0 0 0 1 21 17 0 0 0 1 0 1 1 1 11
:
:
:
:
:
:
:
:
:
:
:
:
:
:
:
0 1 1 0 0 0 1 1 143 99 1 0 0 1 1 0 0 1 63
2.3 The Numbering and Function of External Input/Output Contact [X] / [Y]
Input/output contact number:(octal number)
For MPU, the number of input and output contact will be counted from X0 and Y0. The number will be changed
with points of MPU. For I/O expansion unit, the number of input / output terminal is counted with the connection
sequence of MPU.
For ES, EX, SS Models:
Model no DVP-14ES DVP-14SS DVP-20EX DVP-24ES DVP-32ES DVP-60ES Expansion I/O
Input X
X0~X7
(8 Points)
X0~X7
(8 Points)
X0~X7
(8 Points)
X0~X17
(16 Points)
X0~X17
(16 Points)
X0~X43
(36 Points)
X20(X50)~X177
(Note)
Output Y
Y0~Y5
(6 Points)
Y0~Y5
(6 Points)
Y0~Y5
(6 Points)
Y0~Y7
(8 Points)
Y0~Y17
(16 Points)
Y0~Y27
(24 Points)
Y20(Y30)~Y177
(Note)
Note: Besides DVP-60ES, the started input number of expansion unit is from X20 and the started output
number of expansion unit from Y20. The started input number of DVP-60ES is X50 and the started
output number of DVP-60ES is Y30. The number of expansion I/O is increased by 8 times and if it is
less than 8 points, it will count with 8 points.
EP/SA model:
Model no DVP-12SA (Note1) DVP-14EP DVP-32EP Expansion I/O
Input X X0~X7 (8 points) X0~X7 (8 points) X0~X17 (16 points) X20~X177 (note 2)
Output Y Y0~Y3 (4 points) Y0~Y7 (8 points) Y0~Y17 (16 points) Y20~Y177 (note 2)
Note 1: All SA functions are the same as EP except function expansion card. All SA expansion units share
with SS series.
Note 2: The started input number of expansion unit is from X20 and the started output number of
expansion unit from Y20. The number of expansion I/O is increased by 8 times and if it is less than
8 points, it will count with 8 points.
2 DVP-PLC Function
DVP-PLC Application Manual 2-10
EH model:
Model no DVP-16EH DVP-20EH DVP-32EH DVP-48EH DVP-64EH DVP-80EH Expansion I/O
Input X
X0~X7
(8 points)
X0~X13(12
points)
X0~X17
(16 points)
X0~X27
(24 points)
X0~X37
(32 points)
X0~X47
(40 points)
X20~X377
(note)
Output Y
Y0~Y7
(8 points)
Y0~Y7(8
points)
Y0~Y17
(16 points)
Y0~Y27
(24 points)
Y0~Y37
(32 points)
Y0~Y47
(40 points)
Y20~Y377
(note)
Note: Besides DVP-16EH and DVP-20EH, the started input/output number of expansion unit starts with
the last number of MPU. The started input number of DVP-60EH is X20 and the started output
number of DVP-60EH is Y20. The numbers of expansion I/O are sequential numbers. The input
number can be up to X377 and output number can be up to Y377.
Input relay: X0~X377
The number of input relay (or called input terminal) uses octal number. The points of EH model can be up
to 256 points, the range as follows: X0~X7, X10~X17, , X370~X377.
Output relay: Y0~Y377
The number of output relay (or called output terminal) uses octal number. The points of EH model can be
up to 256 points, the range as follows: Y0~Y7, Y10~Y17, , Y370~Y377.
Input/output contact Function:
The function of input contact X: input contact X reads input signal and enter PLC by connecting with input
equipment. It is unlimited usage times for A contact or B contact of each input contact X in program. The
On/Off of input contact X can be changed with the On/Off of input equipment but cant be changed by using
peripheral equipment (HPP or WPLSoft).
( There is a special relay M1304 in EH model to force input contact X On/Off by peripheral equipment
HPP or WPLSoft, but PLC wont receive any external input signal at this time.)
Output contact Y Function:
The mission of output contact Y is to drive the load that connects to output contact Y by sending On/Off
signal. There are two kinds of output contact: one is relay and the other is transistor. It is unlimited usage
times for A or B contact of each output contact Y in program. But there is number for output coil Y and it is
recommended to use one time in program. Otherwise, the output result will be decided by the circuit of last
output Y with PLC program scan method.
2 DVP-PLC Function
DVP-PLC Application Manual 2-11
X0
X10
Y0
Y0
1
2
Y0 is repeated
The output of Y0 will be decided by circuit
2
, i.e.
decided by On/Off of X10.
The Handling Process of PLC Program (Batch I/O)
X0
Y0
Y0
M0
input X
input terminal
read in memory
Input signal memory
D
e
v
i
c
e
M
e
m
o
r
y
read X0 state from memory
Write Y0 state into
read Y0 state from memory
Write M0 state into
Output
Program
Input signal
output
Y output
output terminal
output latched memory

Input signal:
1. PLC will read the On/Off of input signal into the
memory of input signal before executing
program.
2. The input signal state in memory wont change
if On/Off of the input signal changes during
executing. The new On/Off state will be read
into memory in the next scan.
3. The delay time from the changes of external
signal OnOff or OffOn to the contact will be
10ms.
Program:
PLC executes each command in program from
address 0 after reading On/Off state of input
signal in input signal memory and save each
On/Off of output coil into each equipment
memory.
Output:
1. When executing END command, send On/Off
state of Y in memory to output latched memory.
In fact, this memory is the coil of output relay.
2. The delay time from the change of OnOff or
OffOn of relay coil to contact On/Off.
2.4 The Numbering and Function of Auxiliary Relay [M]
The number of auxiliary relay:(decimal number)
ES, EX, SS models:
For general M0~M511, M768~M999, 744 points. It is fixed to be non-latched area.
For latched M512~M767, 256 points. It is fixed to be latched area.
Auxiliary relay
M
For special M1000~M1279, 280 points. Some are latched.
Total is
1280
points
2 DVP-PLC Function
DVP-PLC Application Manual 2-12
EP/SA models:
For general M0~M511, 512 points. It is fixed to be non-latched area.
For latched
M512~M999, M2000~M4095, 2584 points. It can be changed to
non-latched area by parameters.
Auxiliary relay
M
For special M1000~M1999, 1000 points.
Total is
4096
points
EH models:
For general
M0~M499, 500 points. It can be changed to latched area by setting
parameters.
For latched
M500~M999, M2000~M4095, 2596 points. It can be changed to
non-latched area by setting parameters.
Auxiliary relay
M
For special M1000~M1999, 1000 points. Some are latched.
Total is
4096
points
Auxiliary Relay Function
There are output coil and A, B contacts in auxiliary relay M and output relay Y. It is unlimited usage times in
program. User can control loop by using auxiliary relay, but cant drive external load directly. There are three types
divided by its characteristics.
1. Auxiliary relay for general : It will reset to OFF when power loss during running. Its state will be OFF when
power on after power loss.
2. Auxiliary relay for latched : The state will be saved when power loss during running and the state when
power on after power loss will be the same as the state before power loss.
3. Auxiliary relay for special : Each special auxiliary relay has its special function. Please dont use undefined
auxiliary relay. Please refer to 2.10 Special relay and special register for each
special auxiliary relay and 2.11 Functions of special auxiliary relay and special
registers.
2.5 The Numbering and Function of Step Relay [S]
The numbering of auxiliary relay (by decimal number):
ES, EX, SS models:
Initial latched S0~S9, 10 points. It is fixed to be latched area.
Zero point
return latched
S10~S19, 10 points. (use with IST command) It is fixed to be
latched area.
Step relay S
Latched S20~S127, 108 points. It is fixed to be latched area.
Total is
128
points
EP/SA Models:
For initial S0~S9, 10 points. It is fixed to be non-latched area.
For zero point
return
S10~S19, 10 points. (use with IST command) It is fixed to be
non-latched area.
For general S20~S511, 492 points. It is fixed to be non-latched area.
For latched
S512~S895, 384 points. It can be changed to be non-latched area
by parameters.
Step relay S
For alarm S896~S1023, 128 points. It is fixed to be latched area.
Total is
1024
points
2 DVP-PLC Function
DVP-PLC Application Manual 2-13
EH Models:
For initial S0~S9, 10 points. It can be latched area by setting parameters.
For zero point
return
S10~S19, 10 points. (use with IST command). It can be latched
area by setting parameters.
For general S20~S499, 480 points. It can be latched area by setting parameters.
For latched
S500~S899, 400 points. It can be non-latched area by setting
parameters.
Step relay S
For alarm
S900~S1023, 124 points. It can be latched area by setting
parameters.
Total is
1024
points
The function of step relay:
Step relay S is the basic equipment of step ladder diagram and it can set process easily in PLC. In step ladder
diagram (or call Sequential Function Chart, SFC), it should be used with command STL, REL and etc.
There are 1024 points, S0~S1023, in step relay S. Like output relay Y, there are output coil and A, B contacts in
each step relay S and unlimited usage times in program. But it cant drive external load directly. Step relay (S) can be
used as general auxiliary relay when not use with step command. There are four types divided by its characteristics.
1. Initial step relay : S0~S9, 10 points.
In Sequential Function Chart (SFC), it is the step point for initiating.
2. Zero point return step
relay
: S10~S19, 10 points.
S10 S19 are for zero point return when using API 60 IST in program. If it cant
use IST command, they will be used as general step relay.
3. General step relay : EP/SA model: S20~S511, 492 points. EH mode: S20~S499, 480 points.
Those step points that are used as general in sequential function chart (SFC).
They will be cleared when power loss after running.
4. Latched step relay : ES, EX, SS models: S20~S127, 108 points. EP models: S512~S895,
384points. EH models: S500~S899, 400 points.
In sequential function chart (SFC), latched step relay will be saved when power
loss after running. The state of power on after power loss will be the same as
the sate before power loss.
5. Step relay for alarm : EP/SA models: S896~S1023, 128 points. EH models: S900~S1023, 124
points.
The step relay for alarm uses with alarm drive command API 46 ANS to be the
contact for alarm. It is used to record warning and eliminate external
malfunction.
2.6 The Numbering and Function of Timer [T]
The numbering of timer (by decimal number):
ES, EX, SS models:
100ms for general T0~T63, 64 points
10ms for general
T64~T126, 63 points (when M1028=On, it is 10ms. when M1028=Off, it
is 100ms)
Timer T
1ms for general T127, 1 points
Total is
128
points

2 DVP-PLC Function
DVP-PLC Application Manual 2-14
EP/SA model:
100ms for general T0~T199, 200 points. (T192~T199 are the timers for subroutine.)
100ms for
accumulative
T250~T255, 6 points. It is fixed to be latched area.
10ms for general T200~T239, 40 points.
10ms for
accumulative
T240~T245, 6 points. It is fixed to be latched area.
Timer T
1ms for
accumulative
T246~T249, 4 points. It is fixed to be latched area.
Total is
256
points
EH model:
100ms for general
T0~T199, 200 points. It can be latched area by setting parameters.
(T192~T199 are the timers for subroutine.)
100ms for
accumulative
T250~T255, 6 points. It is fixed to be latched area.
10ms for general T200~T239, 40 points. It can be latched area by setting parameters.
10ms for
accumulative
T240~T245, 6 points. It is fixed to be latched area.
Timer T
1ms for
accumulative
T246~T249, 4 points. It is fixed to be latched area.
Total is
256
points
Timer function:
The unit of timer is 1ms, 10ms and 100ms. The count method is count up. The output coil will be ON when the
present value of timer equals to the settings. The setting is K in decimal number. Data register D can be also used as
settings.
The real setting time of timer = unit of timer * settings
There are three types divided by these characteristics as follows.
1. General timer:
ES/EP/SA Series
Models
:
General timer will count once when executing command END. Output coil will be On if
timer attains when executing command TMR.
EH Series Models :
General timer will count once when executing command TMR. Output coil will be On if
timer attains when executing command TMR.

T0
Y0
X0
TMR T0 K100
X0
T0
Y0
K100
10 sec
present
value

When X0=On, timer T0 is counted up with
100ms. The output coil T0=On, when the present
value of timer equals to setting (K100).
When X0=Off or power off, timer T0 will be
cleared to 0 and output coil T0 will be OFF.
2. Accumulative timer:

2 DVP-PLC Function
DVP-PLC Application Manual 2-15
ES/EP Series Models :
General timer will count once when executing command END. Output coil will be On if
timer attains when executing command TMR.
EH Series Models :
General timer will count once when executing command TMR. Output coil will be On if
timer attains when executing command TMR.
T250
Y0
X0
TMR T250 K100
X0
T2
Y0
K100
T1+T2=10sec
T250
T1
present
value

When X0=On, timer T250 is counted up with
100ms. The output coil T0=On, when the present
value of timer equals to settings (K100).
If X0=Off or power off during counting, timer
T250 pauses and keep on counting after X0=On. The
present value counts up till the present value of timer
equals to settings (K100), output coil T0=On.
3. Timer for subroutine
If timer is used in subroutine or have interrupt in subroutine, use timer T192~T194 for it.
ES/EP Series Models :
General timer will count once when executing command END. Output coil will be On if
timer attains when executing command TMR.
EH Series Models :
General timer will count once when executing command TMR. Output coil will be On if
timer attains when executing command TMR.
If general timer is used in subroutine or interrupt to insert in subroutine and the subroutine wont be executed,
timer cant count correctly.
Designate method of settings: actual setting time of timer = unit * settings.
1. Designate constant K: Settings designates constant K directly
2. Designate indirectly D: Settings use data register D to be indirect designation
The detail of timer:
Beside timer used for subroutine, the flow chart of general timer is in the following:
T0
Y0
X0
T0 K100 TMR
input reflash

When X0=On,
it starts to count.
1st scan 2nd scan
Nth scan (N+1)th scan
contact Y0=On
contact T0 is On
T0 counts to
10sec now,
but contact
isn On.
Timer will start when executing TMR command.
If scan time is longer, same scan will count with
plural timing pulse automatically.
From action above, the action since the coil is started to be ON in detail are in the following:
+T0
T
-
: 1ms timer is 0.001 second, 10ms timer is 0.01 second, 100ms timer is 0.1 second
T : Setting time of timer (second)
T0 : Scan time (second)

2 DVP-PLC Function
DVP-PLC Application Manual 2-16
If contact is wrote prior to TMR command in program, it needs to add 2*T0 (two times scan time) in the worst
situation.
If timer setting is 0, output contact will be ON when TMR command is executed in the next time.
2.7 The Numbering and Function of Counter [C]
The numbering of counter (by decimal number):
ES, EX, SS model:
16 bits count up for
general
C0~C111, 112 points
Counter C
16 bits count up for
latched
C112~C127, 16 points. it is always latched area
1-phase input
C235~C238, C241, C242, C244, 7 points. It is always
latched area
1-phase 2 inputs C246, C247, C249, 3 points. It is always latched area
32 bits count up/down
High speed counters C
2-phase inputs C251, C252, C254, 3 points. It is always latched area
Total is
141
points
EP/SA models:
16 bits count up for
general
C0~C95, 96 points. It is fixed to be non-latched area.
16 bits count up for
latched
C96~C199, 104 points. It can be non-latched area by setting
parameters.
32 bits count
up/down for
general
C200~C215, 15 points. It is fixed to be non-latched area.
Counter C
32 bits count
up/down for
latched
C216~C234, 19 points. It can be changed to be non-latched
area by setting parameters.
1-phase input for
latched
C235~C242, C244, 9 points. It can be changed to be
non-latched area by setting parameters.
1-phase 2 inputs
for latched
C246, C247, C249, 3 points. It can be changed to be
non-latched area by setting parameters.
32 bits count up/down
High speed counters C
2-phase 2 inputs
for latched
C251, C252, C254, 3 points. It can be changed to be
non-latched area by setting parameters.
Total is
250
points
EH models:
16-bit count up for
general
C0~C99, 100 points. It can be changed to be latched area
by parameters.
16-bit count up for
latched
C100~C199, 100 points. It can be changed to be
non-latched area by parameters.
32-bit count up/down
for general
C200~C219, 20 points. It can be changed to be latched area
by parameters.
Counter C
32-bit count up/down
for latched
C220~C234, 15 points. It can be changed to be non-latched
area by parameters.
Software 1-phase 1
input
C235~C240, 6 points. It can be changed to be non-latched
area by parameters.
Hardware 1-phase 1
input
C241~C244, 4 points. It can be changed to be non-latched
area by parameters.
Hardware 1-phase 2
inputs
C246~C249, 4 points. It can be changed to be non-latched
area by parameters.
32 bits count up/down
High-speed counters C
Hardware 1-phase 2
inputs
C251~C254, 4 points. It can be changed to be non-latched
area by parameters.
Total is
253
points
Features:

2 DVP-PLC Function
DVP-PLC Application Manual 2-17
Item 16 bits counters 32 bits counters
Type General General High speed
Count
direction
Count up Count up/down
Settings 0~32,767 -2,147,483,648~+2,147,483,647
Designate for
constant
Constant K or data register D Constant K or data register D (2 for designated)
Present
value change
Counter will stop when attaining
settings
Counter will keep on counting when attaining settings
Output
contact
When count attains settings,
contact will be ON and latched.
When count up attains settings, contact will be ON and latched.
When count down attains settings, contact will reset to OFF.
Reset action The present value will reset to 0 when RST command is executed and contact will reset to OFF.
Present
register
16 bits 32 bits
Contact
action
After scanning, act together. After scanning, act
together.
Act immediately when count attains. It
has no relation with scan period.
Functions:
When pulse input signal of counter is from OFF to ON, the present value of counter equals to settings and output
coil is ON. Settings are decimal system and data register D can also be used as settings.
16-bit counters C0~C199:
1. Setting range of 16-bit counter is K0~K32,767. (K0 is the same as K1. output contact will be ON
immediately at the first count.
2. General counter will be clear when PLC is power loss. If counter is latched, it will remember the value
before power loss and keep on counting when power on after power loss.
3. If using MOV command, WPLSoft or HPP to send a value, which is large than setting to C0, register, at
the next time that X1 is from Off to On, C0 counter contact will be On and present value will be set to the
same as settings.
4. The setting of counter can use constant K or register D (not includes special data register D1000~D1999)
to be indirect setting.
5. If using constant K to be setting, it can only be positive number but if setting is data register D, it can be
positive/negative number. The next number that counter counts up from 32,767 is -32,768.
Example:
LD X0
RST C0
LD X1
CNT C0 K5
LD C0
OUT Y0
C0
Y0
X1
C0 K5 CNT
X0
C0 RST

2 DVP-PLC Function
DVP-PLC Application Manual 2-18
1. When X0=On, RST command is executed,
C0 reset to 0 and output contact reset to
OFF.
2. When X1 is from Off to On, counter will
count up (add 1).
3. When counter C0 attains settings K5, C0
contact is ON and C0 = setting =K5. C0
wont accept X1 trigger signal and C0
remains K5.
X0
X1
0
1
2
3
4
5
0
Contacts Y0, C0
C0
present
value
settings

32-bit general addition/subtraction counters C200~C234:
1. The setting range of general 32-bit counter is K-2,147,483,648~K2,147,483,647. (not for DVP ES, EX and SS
MPU)
2. Special auxiliary relay used to switch count up/down of general 32-bit addition/subtraction counters decided by
M1200~M123. For example: When M1200=Off, C200 is for addition. When M1200=On, C200 is for
subtraction.
3. Settings can be constant K or data register D (special data register D1000~D1999 is not included) and also can
be positive/negative number. If using data register D, it will occupy two continuous data register.
4. General counter will be clear when PLC is power loss. If it is latched counter, counter will save the present
value and the contacts state and keep on counting when power is on after power loss.
5. The next number will be -2,147,483,648 for counter to count up after 2,147,483,647. By the same way, once
counter counts down to -2,147,483,648 the next value will be 2,147,483,647.
Example:
LD X10
OUT M1200
LD X11
RST C200
LD X12
CNT C200 K-5
LD C200
OUT Y0
C200
Y0
X12
C200 K-5 DCNT
X11
C200 RST
X10
M1200


2 DVP-PLC Function
DVP-PLC Application Manual 2-19
1. X10 drives M1200 to decide C200 is
addition or subtraction.
2. When X11 is from Off to ON and RST
command is executed, C200 will be clear
to 0 and contact will be off.
3. When X12 is from Off to On, counter
will add one (count up) or subtract 1 (count
down).
4. When counter C200 is from K-6 to K-5,
the contact of C200 is from Off to On.
When counter C200 is from K-5 to K-6, the
contact of C200 will be from On to Off.
X10
X11
X12
0
1
2
3
4
5
4
3
2
1
0
-1
-2
-3
-4
-5
-6
-7
-8
0
-7
-6
-5
-4
-3
contacts
Y0, C0
C200
present
value
output contact
is On before.
gradual
increase
gradual
increase
gradual decrease
5. If using MOV command, WPLSoft or HPP to send a value, which is large than setting to C0, register, at the
next time that X1 is from Off to On, C0 counter contact will be On and present value will be set to the same
as settings.
32-bit high-speed addition/subtraction counter C235~C254:
1. Setting range of 32-bit high-speed addition/subtraction counter is : K-2,147,483,648~K2,147,483,647.
2. The operation of 32-bit high-speed addition/subtraction counter C235~C244 is decided by the On/Off of
special auxiliary relay M1235~M1244. For example: if M1235=Off, C235 is addition and if M1235=On,
C235 is subtraction.
3. The operation of 32-bit high-speed addition/subtraction counter C246~C254 is decided by the On/Off of
special auxiliary relay M1246~M1254. For example: if M1246=Off, C246 is addition and if M1246=On,
C246 is subtraction.
4. The settings can be positive / negative numbers by using constant K or data register D (special data
register D1000~D1999 is not included). If using data register D, the setting will occupy two continuous data
register.
5. If using DMOV command, WPLSoft or HPP to send a value which is large than setting to any high-speed
counter, at the next time that input point X of counter is from Off to On, this contact doesnt have any
change and it will do addition and subtraction with present value.
6. The next number will be -2,147,483,648 for counter to count up after 2,147,483,647. By the same way,
once counter counts down to -2,147,483,648, the next value will be 2,147,483,647.
2 DVP-PLC Function
DVP-PLC Application Manual 2-20
High-speed counter for ES / EX / SS series, 1-phase high-speed counter: 5KHz, total frequency: 40KHz.
1-phase input 1-phase 2 inputs 2-phase inputs Type
Input C235 C236 C237 C238 C241 C242 C244 C246 C247 C249 C251 C252 C254
X0 U/D U/D U/D U U U A A A
X1 U/D R R D D D B B B
X2 U/D U/D R R R R
X3 U/D R S S S

U: Increasing A: A phase input S: Start input
D: Decreasing B: B phase input R: Clear input
Input points X0 and X1 can be used as high-speed counter and 1-phase can be up to 40KHz.
High-speed counter for EP/SA series, 1-phase high-speed counter: 10KHz, total frequency: 40KHz.
1-phase input 1-phase 2 inputs 2-phase inputs Type
Input C235 C236 C237 C238 C239 C240 C241 C242 C244 C246 C247 C249 C251 C252 C254
X0 U/D U/D U/D U U U A A A
X1 U/D R R D D D B B B
X2 U/D U/D R R R R
X3 U/D R S S S
X4 U/D
X5 U/D

U: Increasing A: A phase input S: Start input
D: Decreasing B: B phase input R: Clear input
1. Input point X0, X1 can be used as high-speed counter and 1-phase can be up to 20KHz
2. There are two functions for input points X5
When M1260=Off, C240 is general U/D high-speed counter.
When M1260=On, it is Global reset for C235~C239.
C235~C240 are high-speed counters for EH series and they are program interrupted 1-phase high-speed
counter (10KHz) and total frequency is 20KHz. C241~ C254 are Hardware High Speed Counter, is called HHSC.
pulse input frequency of HHSC0 and HHSC 1 can up to 100 KHz; HHSC2 and HHSC3 can up to 30KHz (both of
single phase and AB phase).
C241, C246, C251 share HHSC0
C242, C247, C252 share HHSC1
C243, C248, C253 share HHSC2
C244, C249, C254 share HHSC3
1. Each HHSC can be used for a number one time and it uses command DCNT to designate.
2. There are three modes for each HHSC:
A. 1-phase input, it is called Pulse/Direction mode
B. 1-phase 2 inputs, it is called CW/CCW mode
C. 2-phase inputs, it is called AB phase mode
2 DVP-PLC Function
DVP-PLC Application Manual 2-21

Type Program-interrupted 1-phase
High-speed Counter
Hardware High-speed Counter
1-phase input 1-phase input 1-phase 2 inputs 2-phase inputs Type
Input
C235 C236 C237 C238 C239 C240 C241 C242 C243 C244 C246 C247 C248 C249 C251 C252 C253 C254
X0 U/D U/D U A
X1 U/D D B
X2 U/D R R R
X3 U/D S S S
X4 U/D U/D U A
X5 U/D D B
X6 R R R
X7 S S S
X10 U/D U A
X11 D B
X12 R R R
X13 S S S
X14 U/D U A
X15 D B
X16 R R R
X17 S S S

U: Increasing A: A phase input S: Start input
D: Decreasing B: B phase input R: Clear input
3. System structure of hardware high-speed counter:
A. There are Reset signal and Start signal of external inputs in HHSC0~3. It also can be Reset signal
by setting special M, M1272 (HHSC0), M1274 (HHSC1), M1276 (HHSC2) and M1278 (HHSC3).
And it can be Start signal by setting special M, M1273 (HHSC0), M1275 (HHSC1), M1277
(HHSC2) and M1279 (HHSC3).
B. If input external control signals of R and S arent used when using high-speed counter, the
function of input signal can be closed by setting M1264/ M1266/ M1268/ M1270 and M1265 /
M1267/ M1269/ M1271 to True. The corresponding external input can be used as general inputs.
Please refer following for using.
C. When using special M to be high-speed counter, control input with START and TRSET and the
action will be affected with scan time.
2 DVP-PLC Function
DVP-PLC Application Manual 2-22
HHSC0
HHSC1
HHSC2
HHSC3
M1265
M1273
M1267
M1275
M1269
M1277
M1271
M1279
X3 X7 X17 X13
M1272 M1274 M1276 M1278
M1264 M1266 M1268 M1270
X2 X6 X12 X16
M1241 M1242 M1243 M1244
C241 C242 C243 C244
D1225 D1226 D1227 D1228
X1 X5 X11 X15
X14 X10 X4 X0
HHSC0 HHSC1 HHSC2 HHSC3
HHSC0 HHSC1 HHSC2 HHSC3
HHSC0 HHSC1 HHSC2 HHSC3
HHSC0 HHSC1 HHSC2 HHSC3
HHSC0 HHSC1 HHSC2 HHSC3
HHSC0 HHSC1 HHSC2 HHSC3
M1246
M1247
M1248
M1249 M1254
M1253
M1252
M1251
DHSCS
DHSCR
DHSCZ
SET/RESET
I 060 i nterr upt
counti ng val ue reset
010 ~ I
I 010
I 020
I 030
I 040
I 050
I 060
M1289
M1290
M1291
M1292
M1293
M1294 M1294
HHSC0
HHSC1
HHSC2
HHSC3
DHSCS occupies one group setting val ue
DHSCR occupies one group setting value
DHSCZ occupies two groups setting value
AND
OR
Reset si gnal R
AND
OR
U/D mode setting flag
Counting mode
selection
U/D
U
A
B
D
Counting
up/down flag
Setti ng value:0~3 respecti vel y
represent Mode 1~4
(1~4 ) frequency mode
Counting pulse
Counting pulse
Comparator
Current value
of counter
Start si gnal S
Interrupt inhibi t flag
High speed
compar ison
command
Compari son value
reached operati on
Comparison value
reached output
Comparison value
reached setting

4. Counting mode selection
ES/EX/SS/EP high-speed counter uses special D1022 in 2-phase inputs counting mode to select
double frequency mode. D1022 content will be loaded in at the first scan time when PLC switches
from STOP to RUN. (ES/EX/SS series MPU (V5.5 and higher) supports this function.
Device No. Functions
D1022 Double frequency setting of counter counting method
D1022=K1 Normal frequency mode
D1022=K2 Double frequency mode (factory setting)
D1022=K4 Four times frequency mode
Double frequency mode (, means the action of counting)
Counting
mode
Wave for counting mode
2-phase
inputs
1
(
n
o
r
m
a
l

f
r
e
q
u
e
n
c
y
)

A-phase
B-phase
counting up
counting down
2 DVP-PLC Function
DVP-PLC Application Manual 2-23
Counting
mode
Wave for counting mode
2

(
d
o
u
b
l
e

f
r
e
q
u
e
n
c
y
)

B-phase
counting up
counting down
A-phase
4

(
f
o
u
r

t
i
m
e
s

f
r
e
q
u
e
n
c
y
)

A-phase
B-phase
counting up
counting down
There are 1 to 4 times frequency for EH hardware high-speed counter (HHSC0~3) and set by Special D1225~D1228.
Facotry setting is double frequency.
Type Special
D(settings)
Count up (+1) Count down (-1)
1(normal
frequency)
U/D
U/D FLAG

1-phase input
2(double
frequency)
U/D
U/D FLAG

1(normal
frequency)
U
D
1-phase 2
inputs
2(double
frequency)
U
D

1(normal
frequency)
A
B

2(double
frequency)
A
B

3(three times
frequency)
A
B

2-phase 2
inputs
4(four times
frequency)
A
B

5. Device number and special registers for high-speed counter
Device number Functions
M1150 Declare DHSZ command to be used for multi-group setting comparison mode
M1151 Multi-group setting comparison finishes to execute a cycle
M1152 Declare DHSZ command to be used in frequency control mode
2 DVP-PLC Function
DVP-PLC Application Manual 2-24
Device number Functions
M1153 Frequency control finishes executing.
M1235 ~ M1244
C235 ~ C244 are count direction of high-speed counters.
When M12=Off, C2 is count up. When M12=On, C2 is count
down.
M1246 ~ M1249
M1251 ~ M1254
C246 ~ C249, C251 ~ C254 are monitor count direction of high-speed
counters.
When C2 counts up, M12=Off. When C2 count down, M12
=On.
M1264 Disable external control input contact of Reset signal of HHSC0
M1265 Disable external control input contact of Start signal of HHSC0
M1266 Disable external control input contact of Reset signal of HHSC1
M1267 Disable external control input contact of Start signal of HHSC1
M1268 Disable external control input contact of Reset signal of HHSC2
M1269 Disable external control input contact of Start signal of HHSC2
M1270 Disable external control input contact of Reset signal of HHSC3
M1271 Disable external control input contact of Start signal of HHSC3
M1272 External control input contact of Start signal of HHSC0
M1273 External control input contact of Start signal of HHSC0
M1274 External control input contact of Reset signal of HHSC1
M1275 External control input contact of Start signal of HHSC1
M1276 External control input contact of Reset signal of HHSC2
M1277 External control input contact of Start signal of HHSC2
M1278 External control input contact of Reset signal of HHSC3
M1279 External control input contact of Start signal of HHSC3
M1289 Disable high-speed counter interrupt insert I010~I060
M1290 Disable EH series high-speed counter interrupt insert I010
M1291 Disable EH series high-speed counter interrupt insert I020
M1292 Disable EH series high-speed counter interrupt insert I030
M1293 Disable EH series high-speed counter interrupt insert I040
M1294 Disable EH series high-speed counter interrupt insert I050
M1312 C235 Start input point control
M1313 C236 Start input point control
M1314 C237 Start input point control
M1315 C238 Start input point control
M1316 C239 Start input point control
M1317 C240 Start input point control
M1320 C235 Reset input point control
M1321 C236 Reset input point control
M1322 C237 Reset input point control
M1323 C238 Reset input point control
M1324 C239 Reset input point control
M1325 C240 Reset input point control
M1326 C235 Start/Reset enable control
M1327 C236 Start/Reset enable control
M1328 C237 Start/Reset enable control
M1329 C235 Start input point control
M1330 C236 Start input point control
M1331 C238 Start/Reset enable control
2 DVP-PLC Function
DVP-PLC Application Manual 2-25
Device number Functions
M1332 C239 Start/Reset enable control
M1333 C240 Start/Reset enable control
D1022 ES/EX/SS/EP/SA models double frequency selection of AB phase counter
D1150
The register to record the comparison item of settings comparison mode of
multi-group
D1151 The register to record the comparison item of frequency control mode
D1152
Executing DHSZ command in frequency control mode, the high word of pulse
output frequency.
D1153
Executing DHSZ command in frequency control mode, the low word of pulse
output frequency.
D1225 First group counter setting, C241, C246 and C251 counting mode
D1226 Second group counter setting, C242, C247 and C252 counting mode
D1227 Third group counter setting, C243, C248 and C253 counting mode
D1228 4th group counter setting, C244, C249 and C254 counting mode
D1225 ~ D1228
HHSC0~ HHSC3 counting mode of EH hardware high-speed counter
When setting to 1, it is normal frequency. Setting to 2 is double
frequency.(Factory setting)
Setting to 3 is three times frequency and setting to 4 is four times frequency.
1-phase inputs high-speed counter:
Example:
LD X10
RST C241
LD X11
OUT M1241
LD X12
DCNT C241 K5
LD C241
OUT Y0
C241
Y0
X12
C241 K5 DCNT
X11
C241 RST
X10
M1241


1. X11 drives M1241 to decide C241 is
addition or subtraction.
2. When X10=On and RST command is
executed, clear C241 to 0 and reset
output contact to off.
3. When X12=On, C241 receives count
signal from X0 and counter will count up
(+1) or count down (-1).
4. When counter C241 attains settings
K5, C241 will be ON. If there is still
signal input for X0, it will keep on
counting.
X12
X0
0
1
2
3
4
5
0
X10
X11,M1241 contact
6
7
6
5
4
3
counting up
counting down
C241
present
value
Y0, C241 contact


2 DVP-PLC Function
DVP-PLC Application Manual 2-26
5. C241 for ES, EX, SS, EP series has external input Reset X1 signal.
6. C241 for EH series has external input Reset signal (X2), Start signal (X3).
7. EH series external input contact of clear signal of C241 (HHSC0) is disabled by M1264. External input contact
of start signal is disabled by M1265.
8. EH series internal input contact of clear signal of C241 (HHSC0) is disabled by M1272. Internal input contact of
start signal is disabled by M1273.
9. Counting mode (normal frequency or double frequency) of C246 (HHSC0) of EH series can be set by D1225.
Factory setting is double frequency.
1-phase 2 inputs high-speed counters:
Example:
LD X10
RST C246
LD X11
DCNT C246 K5
LD C246
OUT Y0
C246
Y0
X11
C246 K5 DCNT
C246 RST
X10

1. When X10=On and RST command is executed,
clear C246 to 0 and reset output contact to off.
2. When X11=On, C246 receives count signal
from X0 input terminal and counter will count up
(+1) or receive count signal from X1 input
terminal and counter will count down (-1).
3. When C246 attains settings K5, C246 will be
on. After C246 is ON, if there is counter pulse
input, C246 will keep on counting.
X11
0
1
2
3
4
5
0
X10
6
7
6
5
4
3
X1
count up
X0
count down
C246
present
value
Y0, C246 contact
4. C246 for EH series has external input Reset signal X2 or Start signal X3.
5. C246 (HHSC0) of EH series can be normal frequency or double frequency by setting D1225. Factory setting
is double frequency.
6. EH series external input contact of clear signal ( R ) of C246 (HHSC0) is disabled by M1264. External input
contact of start signal ( S ) is disabled by M1265.
7. EH series internal input contact of clear signal ( R ) of C246 (HHSC0) is disabled by M1272. Internal input
contact of start signal ( S ) is disabled by M1273.
2 DVP-PLC Function
DVP-PLC Application Manual 2-27
2-phase AB input high-speed counter:
Example:
LD X10
RST C251
LD X11
DCNT C251 K5
LD C251
OUT Y0
C251
Y0
X11
C251 K5 DCNT
C251 RST
X10

1. When X11=On, RST command is executed and reset C251 to 0, output contact is reset to off.
2. C251 receives A phase counting signal of X0 input terminal and B phase counting signal of X1 input
terminal to execute add 1 (count up) or subtract 1 (count down) when X12=on. EH series can set different
frequency for counting mode.
3. When counter C251 attains settings K5, C251 contact will be ON. After C251 is On, if there is counter
pulse input, C251 will keep on counting.
4. For ES/EP/SA series, it can be set to normal frequency, double frequency or four times frequency by
D1022 (counting mode setting). Factory setting is double frequency.
5. EH series C251 has external input reset signal X2 and start signal X3.
6. The counting mode (normal frequency, double frequency, third times frequency, four times frequency) of
EH series C251 (HHSC0) can be set by D1225. Factory setting is double frequency.
7. EH series external input contact of clear signal of C246 (HHSC0) is disabled by M1264. External input
contact of start signal is disabled by M1265.
8. EH series internal input contact of clear signal of C246 (HHSC0) is disabled by M1272. Internal input
contact of start signal is disabled by M1273.
ES/EX/SS, EP/SA series:
0
1
2
3
4
5
X11
X10
6
3
0
1
2
3
4
5
A-phase X0
B-phase X1
C251 present value
Y0, C251 contact
Counting up Counting down

2 DVP-PLC Function
DVP-PLC Application Manual 2-28
EH series:(double frequency)
0
1
2
3
4
5
X11
X10
6
2
0
1
2
3
4
5
A-phase
X0
B-phase
X1
C251
present
value
Y0. C251 contact
counting up
counting down

2.8 Register Number and Function [D], [E], [F]
2.8.1 Data register [D]
It is used to store numerical data and data length is 16-bit (-32,768~+32,767). The left-most bit is sign bit. Two
16-bit registers also can be combined to a 32-bit register (The number for each 32-bit register will be (D0, D1), (D2,
D3) ..and the number for upper bit will be greater than low bit.) The left-most bit sign bit and the store range is
-2,147,483,648~+2,147,483,647.
ES, EX, SS model:
For general D0~D407, 408 points
For latched * D408~D599, 192 points. (It is fixed to be latched area)
Special D1000~D1143, 144 points. (Some are latched area)
Data register D
Index register E, F E(=D1028), F(=D1029), 2 points
Total is
744
points
EP/SA model:
For general D0~D199, 200 points. (It is fixed to be unlatched area)
For latched
D200~D999, D2000~D4999, 3800 points. (It can be used to
be unlatched area by setting parameter.)
Special D1000~D1999, 1000 points. (Some are latched area)
Data register D
Index register E, F E0~E3, F0~F3, 8 points
Total is
5000
points
File register K0~K1599, MPU 1600 points. (It is fixed to be latched area)

2 DVP-PLC Function
DVP-PLC Application Manual 2-29
EH model:
For general
D0~D199, 200 points. It can be latched area by setting
parameter
For latched
D200~D999, D2000~D9999, 8800points. It can be
non-latched area by setting parameter
For special D1000~D1999, 1000 pints. Some are latched.
Data register D
Index register E, F E0~E7, F0~F7, 16 points.
Total is
10000
points
File register K0~K9999, MPU is 1000 points. (It is fixed to be latched area)
There are five types of register which sorts by characters in the following:
1. General register : The data in register will be cleared to 0 when PLC switches from RUN to STOP or
power is off. If M1033=On when PLC switches from Run to STOP, data wont be
cleared but the data will be cleared to 0 when power is off.
2. Latched register : The data is the latched register wont be cleared when PLC is power off. If you want
to clear the data in this register, you should use RST or ZRST command.
3. Special register : Each special register has the special definition and purpose. It is used to save system
status, error messages, monitor state. Please refer to chapter 2.11 for detail.
4. Index register [E], [F] : Index registers are 16-bit registers. There are 2 points, E and F, for ES/EX/SS
models. There are 8 points, E0~E3 and F0~F3, for EP models. There are 16 points,
E0~E7 and F0~F7, for EH models. If you want to use index register to be 32-bit
register, you should indicate E and at this moment F cant be used.
5. File register : There are 1600 file registers (K0~K1599) for EP/SA MPU and 10000 file registers
(K0~K9,999) for EH MPU. There is no real device number for file register, you should
execute read/write of file register by command API 147 MEMR, API 148 MEMW,
peripheral device HPP or WPLSoft.
2.8.2 Index Register [E], [F]
E0 F0
F0 E0
16-bit 16-bit
32-bit
upper 16-bit lower 16-bit

Index registers E, F are 16-bit data register, just the same as general
data register. It can be wrote/read.
It can be used as 32-bit register. But at this time, this register should
be indicated to E and F cant be used. Otherwise, the data will be
error. (It is recommend to use command DMOVP K0 E and clear E
and F to 0 when power on.
The combination of E and F when using as 32-bit register are:
(E0, F0) , (E1, F1) (E2, F2) .(E7, F7)
2 DVP-PLC Function
DVP-PLC Application Manual 2-30
K14 F0
X0
K8 E0 MOV
D5E0 D10F0
MOV
MOV

When X0=On and E0=8, F0=14, D5E0=D(5+8)=D13, D10F0
=D(10+14) = D24, the content in D13 will be moved to D24.
The function of Index register is the same as general operand. It can be used to move or compare and used to
be index for byte device (KnX, KnY, KnM, KnS, T, C, D) and bit device (X, Y, M, S). For ES/EP/SA series, it cant be
used for constant (K, H). But for EH series, it can be used for constant (K, H).
ES/EX/SS models: E0, F0 2 points
EP model: E0~E3, F0~F3, total is 8 points
EH model: E0~E7, F0~F7, total is 16 points
some commands dont support index function, please refer to chapter 5.4 for using index register E and F.
When using command mode of WPLSoft to use constant (K,H) to be index register, it needs to use symbol @:
Example: MOV K10@E0 D0F0
2.8.3 File Register Function and Characteristics
EP/SA/EH series will check following when PLC is power on or change from STOPRUN.
1. M1101 (if it starts file register function)
2. D1101 (the start number of file register of EP/SA series (K0~K1599), for EH series is K0~K9999)
3. D1102 (item number for reading, EP/SA series is K0~K1600 and EH series is K0~K10000)
4. D1103 (the address to save the reading data, the start address of designated file register D
(K2000~K9999). It is used to decide if transferring file to designated register automatically.
Note:
The action which read from file register to data register D wont be executed when D1101 for EP/SA model
is greater than 1600, D1101 for EH model is greater than 8,000 or the value of D1103 is less than 2,000 or
greater than 9,999.
When starting executing the action to read data from file register to data register, PLC will stop reading
once the address of file register or data register D exceeds usage range.
There are 1600 file registers for EP/SA models and 10000 file registers for EH models. There is no actual
number for file register, therefore it should use command API 147 MEMR, API 148 MEMW or peripheral
HPP02 and WPLSoft to execute the read/write of file register. If the address of file register for reading
exceeds useful range, the data for reading will be 0.
2.9 Nest Level Pointer[N], Pointer[P], Interrupt Pointer [I]
2 DVP-PLC Function
DVP-PLC Application Manual 2-31
ES, EX, SS models:
N For master control nested N0~N7, 8 points
Control point of master
control nested
P For CJ, CALL commands P0~P63, 64 points
Location pointer of CJ,
CALL
Insert timer interrupt
I6, 1 point (10~99ms, time
base=1ms) (for Version 5.7)
Insert external
interrupt
I001, I101, I201, I301, 4 points
Pointer
I Interrupt
Insert communication
interrupt
I150
Location pointer of
interrupt subroutine
EP/SA models:
N Master control nested N0~N7, 8 points
The control point of
master control nested
P For CJ, CALL commands P0~P255, 256 points
The location point of
CJ, CALL
Insert external
interrupt
I001, I101, I201, I301, I401, I501, total is 6
points
Insert time interrupt
I6, I7, 2 points (10~99ms, time
base=1ms)
Insert high-speed
counter attained
interrupt
I010, I020, I030, I040, I050, I060, 6 points
Pointer
I
For
interrupt
Insert
communication
interrupt
I150
The location point of
interrupt subroutine.
EH models:
N Master control nested N0~N7, 8 points
Master control nested
control point
P For CJ, CALL commands P0~P255, 256 points
The location pointer of
CJ, CALL
Insert external
interrupt
I00(X0), I10(X1), I20(X2), I30(X3),
I40(X4), I50(X5), 6 points
(=1, rising-edge trigger , =0,
falling-edge trigger )
Insert time interrupt
I6, I7, I8, 2 points (
1~99ms, time base=1ms)
I8, 1 points ( 0.1~9.9ms, time
base=0.1ms)
Insert high-speed
counter attained
interrupt
I010, I020, I030, I040, I050, I060, 6 points
Insert pulse
interrupt
I110, I120, I130, I140, 4 points
Pointer
I Interrupt
Insert
communication
interrupt
I150
The location pointer of
interrupt subroutine
Nest Level Pointer N: used with command MC and MCR. MC is master start command. When MC command is
executed, the commands between MC and MCR will be executed normally. MC-MCR master
command supports nested program structure and the maximum is 8 levels, which is
numbered from N0 to N7. Refer to chapter3.7 for detail information.
2 DVP-PLC Function
DVP-PLC Application Manual 2-32
Pointer P: use with application commands API 00 CJ, API 01 CALL, API 02 SRET. Refer to chapter 5.5 commands CJ,
CALL, SRET usage method for more information.
CJ condition jump:
X2
Y2
X1
P1 CJ
X0
Y1
P**
0
P1 N

When X0=On, program will jump from 0 to N
(designated label P1) and keep on executing
without executing the address between 0 and
N.
When X0=Off, program will execute from 0 and
keep on executing the followings. CJ command
wont be executed at this time.
CALL subroutine, SRET subroutine END:
Y0
X1
P2 CALL
X0
Y1
P**
20
P2
FEND
Y0
SRET
24
(subroutine
P2)
subroutine
Call subroutine P**
subroutine return
When X0 is On, it will jump
to P2 to execute the
designated subroutine as
executing CALL
command. When
executing SRET
command, return to
address 24 to go on
executing.
Interrupt pointer I:
It is used with application command API 04 EI, API 05DI, API 03 IRET. Refer to chapter 5.5 for more information.
There are five functions below. Interrupt insert should be used with EI, interrupt insert enable, interrupt insert disable
and IRET interrupt insert return, etc.

1. External interrupt insert : When input signal of input terminal X0~X5 is triggered on rising-edge or
falling-edge, it will interrupt present program and jump to the designated
interrupt insert subroutine pointer I00(X0), I10(X1), I20(X2), I30(X3),
I40(X4), I50(X5) to execute and return to previous address to execute
when executing IRET command. That is due to special hardware circuit
design of PLC MPU and is not affected by scan period.
2. Timer interrupt insert : It is special hardware circuit design in PLC MPU. It will stop present program
and jump to the designated interrupt insert subroutine to execute
automatically every a period time (can be set to 10ms~99ms).
3. Counter attained interrupt insert : The comparison command API 53 DHSCS of high-speed counter can
designate to interrupt present program and jump to the designated interrupt
insert subroutine to execute interrupt pointer I010, I020, I030, I040, I050,
I060 when comparison attained.

2 DVP-PLC Function
DVP-PLC Application Manual 2-33
4. Pulse interrupt insert : Using pulse output command API 57 PLSY to send interrupt vector
I130(corresponds to M1342) and I140(corresponds to M1343) at the same
time when pulse output the first pulse. But it should start flag M1342 and
M1343 first. And it also can set to send interrupt vector I110 (corresponds to
M1340) and I120(corresponds to M1341) once pulse finishes to output the
last pulse.
5. Communication interrupt insert : When using communication command RS, it can be set to have interrupt
request when receiving specific charcters. Interrupt number is I150 and
specific characters is set to low byte of D1168.
When PLC connects to communication device and received data length is
not the same, setting end character to D1168 and interrupt subroutine to
I150. When PLC receives this end character, it will execute interrupt
subroutine I150.
2.10 Special Auxiliary Relay and Special Register
The kinds and functions of special auxiliary relay (Special M) and special registers (special D) are as shown in
the following. Please notice that some equipment with the same number will be different to the different model. In the
following chart, the meaning of column Attribute are: R means can only read. R/W means can read/write.
- means can do nothing. # means system setting, user can read the detail explanation of the setting in the manual.
* means can refer following for explanation.
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
M1000*
Normally open contact (a contact). This contact
is ON when running and it is ON when the
status is set to RUN.
Off On Off R NO Off
M1001*
Normally OFF contact (b contact). This contact
is OFF in running and it is OFF when the status
is set to RUN.
On Off On R NO On
M1002*
ON only for 1 scan after RUN. Initial pulse is
contact a. It will get positive pulse in the RUN
moment. Pulse width=scan period.
Off On Off R NO Off
M1003*
OFF only for 1 scan after RUN. Initial pulse is
contact a. It will get negative pulse in the RUN
moment. Pulse width=scan period.
On Off On R NO On
M1004* On when error occurs Off Off - R NO Off
M1005
Password of data backup memory card and
MPU password dont match

Off Off
-
R NO Off
M1006 Data backup memory card isnt initial Off Off - R NO Off
M1008* Monitor timer flag (ON: PLC WDT time out) Off Off - R NO Off
M1009 System used - - - - - - - - -
M1010
ES/EX/SS and EP/SA: PLSY Y0 mode
selection. It is continuous output when it is ON.
EHPULSE will be output at the END.
Off Off Off R/W NO Off
M1011* 10ms clock pulse, 5ms On/5ms Off
Off - - R NO Off
M1012* 100ms clock pulse, 50ms On / 50ms Off
Off - - R NO Off
M1013* 1s clock pulse, 0.5s On / 0.5s Off
Off - - R NO Off
M1014* 1min clock pulse, 30s On / 30s Off
Off - - R NO Off
M1015* High-speed timer activates
Off Off Off R/W NO Off
M1016*
When it is Off, it will display two right-most bits.
When it is On, it will display (two right-most bits
+ 2000).
Off - - R/W NO Off
M1017* 30 seconds adjustment Off - - R/W NO Off
M1018 Flag for Radian/Degree, On for degree
Off - - R/W NO Off
M1019
*
Cancle X0~X17 input delay Off - - R/W NO Off
2 DVP-PLC Function
DVP-PLC Application Manual 2-34
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
M1020 Zero flag Off Off Off R NO Off
M1021 Borrow flag Off Off Off R NO Off
M1022 Carry flag Off Off Off R NO Off
M1023
PLSY Y1 mode selection, it is continuous
output when it is ON.
Off Off Off R/W NO Off
M1024 System used flag - - - - - - - - -
M1025
If PLC receive illegal communication request
when HPP, PC or HMI connects to PLC, M1025
will be set and save the error code in D1025.
Off - - R NO Off
M1026 EP/EH: Startup flag of RAMP module Off Off Off R/W NO Off
M1027 PR output flag Off Off Off R/W NO Off
M1028
10ms/100ms time switch flag. The base setting
flag of T64~T126 is 100ms, when timer is OFF
and the base setting flag is 10ms when it is
ON.
Off - - R/W NO Off
M1029*
ES/EX/SS and EP/SA: Pulse output Y0 of
PLSY and PLSR command execution
completed or other relative command execution
completed
EH: The first group pulse CH0 (Y0, Y1) output
complete executing or other relative command
execution completed
Off Off Off R NO Off
M1030*
ES/EX/SS and EP/SA: Pulse output Y1 of
PLSY and PLSR command execution
completed
EH: The second group pulse CH1 (Y2, Y3)
output complete executing
Off Off Off R NO Off
M1031* Clear all non-latched memory Off - - R/W NO Off
M1032* Clear all latched memory Off - - R/W NO Off
M1033* Memory latched at STOP Off - - R/W NO Off
M1034* All Y outputs disable Off - - R/W NO Off
M1035*
Start X input point to be RUN/STOP switch and
correspond to D1035 (for EP/SA models, only
X7 can be used)
- - - R/W YES Off
M1039* Constant scan mode Off - - R/W NO Off
M1040 Step transition inhibits Off Off Off R/W NO Off
M1041 Step transition starts Off Off Off R/W NO Off
M1042 Start pulse Off Off Off R/W NO Off
M1043 Zero point return completed Off Off Off R/W NO Off
M1044 Zero point condition Off Off Off R/W NO Off
M1045 All outputs clear inhibit Off Off Off R/W NO Off
M1046 STL state setting (On) Off - - R NO Off
M1047 STL monitor enable Off Off Off R/W NO Off
M1048 Flag for alarm point state Off - - R NO Off
M1049 Monitor flag for alarm point Off - - R/W NO Off
M1050 I001 masked Off Off Off R/W NO Off
M1051 I101 masked Off Off Off R/W NO Off
M1052 I201 masked Off Off Off R/W NO Off
M1053 I301 masked Off Off Off R/W NO Off
M1054 I401 masked Off Off Off R/W NO Off
M1055 I501 masked Off Off Off R/W NO Off
M1056 I6 masked Off Off Off R/W NO Off
M1057 I7 masked Off Off Off R/W NO Off
2 DVP-PLC Function
DVP-PLC Application Manual 2-35
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
M1059 I010~I060 masked Off Off Off R/W NO Off
M1060 System error message 1 Off - - R NO Off
M1061 System error message 2 Off - - R NO Off
M1062 System error message 3 Off - - R NO Off
M1063 System error message 4 Off - - R NO Off
M1064 Operator error Off Off - R NO Off
M1065 Syntax error Off Off - R NO Off
M1066 Program error Off Off - R NO Off
M1067* Program execution error Off Off - R NO Off
M1068* Execution error locked (D1068) Off Off - R NO Off
M1070
ES/EX/SS and EP/SA: time pulse unit switch of
PWM command Y1. When it is ON, the time
pulse unit is 100us and when it is OFF, the time
pulse unit is 1ms.
EH: Unit setting for PWM command of the 1
st

pulse CH0 (Y0, Y1). On is 100us and Off is
1ms.
Off Off Off R/W NO Off
M1071
Unit setting for PWM command of the 2nd pulse
CH1 (Y2, Y3). On is 100us and Off is 1ms.
Off Off Off R/W NO Off
M1072 Execute PLC RUN command Off - - R/W NO Off
M1073 System used - - - - - - - - -
M1074 System used - - - - - - - - -
M1075* FLASH write error Off - - R NO Off
M1076* Real time clock error Off - - R NO Off
M1077 Battery voltage is too low or malfunction Off - - R NO Off
M1078
PLSY command Y0 pulse output stop
immediately flag
Off - - R/W NO Off
M1079
PLSY command Y1 pulse output stop
immediately flag
Off - - R/W NO Off
M1080 System used - - - - - - - - -
M1081 FLT command change direction flag Off Off Off R/W NO Off
M1083
Enable/Disable execute interrupt program in
FROM/TO mode
Off - - R/W NO Off
M1088
Matrix compared flag. If the result is the same,
M1088 = 1. If the result is different, M1088 = 0.
Off Off - R/W NO Off
M1089
Matrix search start flag. Compare from the first
bit and M1090=1.
Off Off - R NO Off
M1090
Matrix search start flag. Compare from the first
bit and M1090=1.
Off Off - R NO Off
M1091
Matrix finding bit flag. When find it, it will stop
comparing and M1091=1.
Off Off - R NO Off
M1092
Matrix pointer error flag. When pointer Pr
exceeds this range, M1092=1.
Off
Off
- R NO Off
M1093
Matrix pointer increases flag. It will add 1 to
present pointer.
Off
Off
- R/W NO Off
M1094
Matrix pointer clears flag. It will clear present
pointer to 0.
Off
Off
- R/W NO Off
M1095 Carry flag for matrix rotate/shift output Off
Off
- R NO Off
M1096 Complement flag for matric shift input Off
Off
- R/W NO Off
M1097 Direction flag for matrix rotate/shift Off
Off
- R/W NO Off
M1098 Matrix count bit 0 or 1 flag Off
Off
- R/W NO Off
M1099 It is On when matrix count result 0 Off
Off
- R/W NO Off
2 DVP-PLC Function
DVP-PLC Application Manual 2-36
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
M1100 A sampling flag of SPD command Off Off Off R/W NO Off
M1101* To decide whether start file register or not - - - R/W Yes Off
M1104* DIP switch function card SW1 state Off Off - R NO Off
M1105*
DIP switch function card SW2 state
Off
Off
-
R
NO Off
M1106*
DIP switch function card SW3 state
Off
Off
-
R
NO Off
M1107*
DIP switch function card SW4 state
Off
Off
-
R
NO Off
M1108*
DIP switch function card SW5 state
Off
Off
-
R
NO Off
M1109*
DIP switch function card SW6 state
Off
Off
-
R
NO Off
M1110*
DIP switch function card SW7 state
Off
Off
-
R
NO Off
M1111*
DIP switch function card SW8 state
Off
Off
-
R
NO Off
M1112*
TR1 transistor output
Off
Off
-
R
NO Off
M1113* TR2 transistor output Off
Off
-
R
NO Off
M1115* Start switch for accel/decel pulse output Off
Off Off
R/W
NO Off
M1116* Acceleration flag for accel/decel pulse output Off
Off Off
R/W
NO Off
M1117* Target attained frequency flag Off
Off Off
R/W
NO Off
M1118* Deceleration flag for accel/decel pulse output Off
Off Off
R/W
NO Off
M1119* Completed function flag Off
Off Off
R/W
NO Off
M1120 Communication protocol holding Off - - R/W NO Off
M1121 Transmission ready Off Off Off R NO Off
M1122 Sending request Off Off Off R/W NO Off
M1123 Receiving completed Off Off Off R/W NO Off
M1124 Receiving wait Off Off Off R/W NO Off
M1125 Communication reset Off Off Off R/W NO Off
M1126 STX/ETX user/system selection Off - - R/W NO Off
M1127
MODRD/RDST/MODRW commands. Data
receivingcompleted.
Off Off Off R/W NO Off
M1128 Transmit/Receive Indication Off - - R/W NO Off
M1129 Receiving time out Off Off Off R/W NO Off
M1130 STX/ETX selection Off - - R/W NO Off
M1131
MODRD/RDST/MODRW, M1131=On when
data convert to HEX
Off Off Off R NO Off
M1133*
Special high-speed pulse (50KHz) output
switch (On is start)
Off Off Off R/W NO Off
M1134*
Special high-speed pulse (50KHz) output. On
is continuous output switch
Off Off - R/W NO Off
M1135* Output pulse numbers attained flag Off Off Off R/W NO Off
M1140 MODRD/MODWR/MODRW data received error Off Off Off R NO Off
M1141 MODRD/MODWR/MODRW command error Off Off Off R NO Off
M1142 VFD-A command data received error Off Off Off R NO Off
M1143
ASCII/RTU mode selections (use with MODRD
/ MODWR / MODRW) (it is Off when in ASCII
mode and it is On when in RTU)
Off Off Off R/W NO Off
M1144*
Ouput start switch of accel/decel pulse output
function of adjustable slope
Off Off Off R/W NO Off
M1145*
Acceleration flag of accel/decel pulse output
function of adjustable slope
Off Off - R NO Off
M1146*
Target attained frequency flag of accel/decel
pulse output function of adjustable slope
Off Off - R NO Off
M1147* Deceleration flag of accel/decel pulse output Off Off - R NO Off
2 DVP-PLC Function
DVP-PLC Application Manual 2-37
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
function of adjustable slope
M1148*
Complete function flag of accel/decel pulse
output function of adjustable slope
Off Off Off R/W NO Off
M1149*
Stop counting temporality flag of accel/decel
pulse output function of adjustable slope
Off Off - R/W NO Off
M1150
Declare DHSZ command used for multi-group
settings comparison mode
Off - - R/W NO Off
M1151
Finish executing multi-group settings
comparison mode
Off Off Off R NO Off
M1152
Declare DHSZ command used to be frequency
control mode
Off - - R/W NO Off
M1153 Finish executing frequency control mode Off Off Off R NO Off
M1154*
Start designated deceleration function flag of
accel/decel pulse output function of adjustable
slope
Off - - R/W NO Off
M1161 8/16 bits mode (it is On when in 8 bits mode) Off Off Off R/W NO Off
M1167 HKY input is 16 bits mode Off Off Off R/W NO Off
M1168 SMOV working mode indication Off Off Off R/W NO Off
M1170* Start executing single step Off - - R/W NO Off
M1171* Execute single step Off - - R/W NO Off
M1172* 2-phase pulse output switch (on is start)


Off
Off Off R/W NO
Off
M1173* On is continuous output switch


Off
- - R/W NO
Off
M1174* Output pulse number attained flag


Off
Off Off R/W NO
Off
M1178* VR0 potentiometer starts Off - - R/W NO Off
M1179* VR1 potentiometer starts Off - - R/W NO Off
M1196 System used - - - - - - - - -
M1197
System used
- - - - - - - - -
M1198
System used
- - - - - - - - -
M1199
System used
- - - - - - - - -
M1200 C200 counting mode (on: count down) Off - - R/W NO Off
M1201 C201 counting mode (on: count down) Off - - R/W NO Off
M1202 C202 counting mode (on: count down) Off - - R/W NO Off
M1203 C203 counting mode (on: count down) Off - - R/W NO Off
M1204 C204 counting mode (on: count down) Off - - R/W NO Off
M1205 C205 counting mode (on: count down) Off - - R/W NO Off
M1206 C206 counting mode (on: count down) Off - - R/W NO Off
M1207 C207 counting mode (on: count down) Off - - R/W NO Off
M1208 C208 counting mode (on: count down) Off - - R/W NO Off
M1209 C209 counting mode (on: count down) Off - - R/W NO Off
M1210 C210 counting mode (on: count down) Off - - R/W NO Off
M1211 C211 counting mode (on: count down) Off - - R/W NO Off
M1212 C212 counting mode (on: count down) Off - - R/W NO Off
M1213 C213 counting mode (on: count down) Off - - R/W NO Off
2 DVP-PLC Function
DVP-PLC Application Manual 2-38
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
M1214 C214 counting mode (on: count down) Off - - R/W NO Off
M1215 C215 counting mode (on: count down) Off - - R/W NO Off
M1216 C216 counting mode (on: count down) Off - - R/W NO Off
M1217 C217 counting mode (on: count down) Off - - R/W NO Off
M1218 C218 counting mode (on: count down) Off - - R/W NO Off
M1219 C219 counting mode (on: count down) Off - - R/W NO Off
M1220 C220 counting mode (on: count down) Off - - R/W NO Off
M1221 C221 counting mode (on: count down) Off - - R/W NO Off
M1222 C222 counting mode (on: count down) Off - - R/W NO Off
M1223 C223 counting mode (on: count down) Off - - R/W NO Off
M1224 C224 counting mode (on: count down) Off - - R/W NO Off
M1225 C225 counting mode (on: count down) Off - - R/W NO Off
M1226 C226 counting mode (on: count down) Off - - R/W NO Off
M1227 C227 counting mode (on: count down) Off - - R/W NO Off
M1228 C228 counting mode (on: count down) Off - - R/W NO Off
M1229 C229 counting mode (on: count down) Off - - R/W NO Off
M1230 C230 counting mode (on: count down) Off - - R/W NO Off
M1231 C231 counting mode (on: count down) Off - - R/W NO Off
M1232 C232 counting mode (on: count down) Off - - R/W NO Off
M1233 C233 counting mode (on: count down) Off - - R/W NO Off
M1234 C234 counting mode (on: count down) Off - - R/W NO Off
M1235 C235 counting mode (on: count down) Off - - R/W NO Off
M1236 C236 counting mode (on: count down) Off - - R/W NO Off
M1237 C237 counting mode (on: count down) Off - - R/W NO Off
M1238 C238 counting mode (on: count down) Off - - R/W NO Off
M1239 C239 counter mode setting (on: count down) Off - - R/W NO Off
M1240 C240 counter mode setting (on: count down) Off - - R/W NO Off
M1241 C241 counter mode setting (on: count down) Off - - R/W NO Off
M1242 C242 counter mode setting (on: count down) Off - - R/W NO Off
M1243 C243 counter mode setting (on: count down) Off - - R/W NO Off
M1244 C244 counter mode setting (on: count down) Off - - R/W NO Off
M1246 C246 counter monitor (on: count down) Off - - R NO Off
M1247 C247 counter monitor (on: count down) Off - - R NO Off
M1248 C247 counter monitor (on: count down) Off - - R NO Off
M1249 C249 counter monitor (on: count down) Off - - R NO Off
M1251 C251 counter monitor (on: count down) Off - - R NO Off
M1252 C252 counter monitor (on: count down) Off - - R NO Off
M1253 C254 counter monitor (on: count down) Off - - R NO Off
2 DVP-PLC Function
DVP-PLC Application Manual 2-39
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
M1254 C254 counter monitor (on: count down) Off - - R NO Off
M1256 System used - - - - - - - - -
M1258 Swap Y0 and Y1 pulse output signal Off Off Off R/W NO Off
M1259 Swap Y2 and Y3 pulse output signal Off Off Off R/W NO Off
M1260
Let X5 be the reset input signal of all
high-speed counter
Off - - R/W NO Off
M1261
DHSCR command High-speed comparison
flag
Off Off Off R/W NO Off
M1264 HHSC0 Start function enable Off Off Off R/W NO Off
M1265 HHSC0 Reset function enable Off Off Off R/W NO Off
M1266 HHSC1 Start function enable Off Off Off R/W NO Off
M1267 HHSC1 Reset function enable Off Off Off R/W NO Off
M1268 HHSC2 Start function enable Off Off Off R/W NO Off
M1269 HHSC2 Reset function enable Off Off Off R/W NO Off
M1270 HHSC3 Start function enable Off Off Off R/W NO Off
M1271 HHSC3 Reset function enable Off Off Off R/W NO Off
M1272 HHSC0 Start control Off Off Off R/W NO Off
M1273 HHSC0 Reset control Off Off Off R/W NO Off
M1274 HHSC1 Start control Off Off Off R/W NO Off
M1275 HHSC1 Reset control Off Off Off R/W NO Off
M1276 HHSC2 Start control Off Off Off R/W NO Off
M1277 HHSC2 Reset control Off Off Off R/W NO Off
M1278 HHSC3 Start control Off Off Off R/W NO Off
M1279 HHSC3 Reset control Off Off Off R/W NO Off
M1280 I00 flag disable Off Off Off R/W NO Off
M1281 I10 flag disable Off Off Off R/W NO Off
M1282 I20 flag disable Off Off Off R/W NO Off
M1283 I30 flag disable Off Off Off R/W NO Off
M1284 I40 flag disable Off Off Off R/W NO Off
M1285 I50 flag disable Off Off Off R/W NO Off
M1286 I6 flag disable Off Off Off R/W NO Off
M1287 I7 flag disable Off Off Off R/W NO Off
M1288 I8 flag disable Off Off Off R/W NO Off
M1289 I010 flag disable Off Off Off R/W NO Off
M1290 I020 flag disable Off Off Off R/W NO Off
M1291 I030 flag disable Off Off Off R/W NO Off
M1292 I040 flag disable Off Off Off R/W NO Off
M1293 I050 flag disable Off Off Off R/W NO Off
M1294 I060 flag disable Off Off Off R/W NO Off
2 DVP-PLC Function
DVP-PLC Application Manual 2-40
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
M1303 Swap high and low byte Off Off Off R/W NO Off
M1304* X input point can decide to be On-Off Off Off Off R/W NO Off
M1305 Factory setting Off Off Off R/W NO Off
M1312 C235 Start input point control Off Off Off R/W NO Off
M1313 C236 Start input point control Off Off Off R/W NO Off
M1314 C237 Start input point control Off Off Off R/W NO Off
M1315 C238 Start input point control Off Off Off R/W NO Off
M1316 C239 Start input point control Off Off Off R/W NO Off
M1317 C240 Start input point control Off Off Off R/W NO Off
M1320 C235 Reset input point control Off Off Off R/W NO Off
M1321 C236 Reset input point control Off Off Off R/W NO Off
M1322 C237 Reset input point control Off Off Off R/W NO Off
M1323 C238 Reset input point control Off Off Off R/W NO Off
M1324 C239 Reset input point control Off Off Off R/W NO Off
M1325 C240 Reset input point control Off Off Off R/W NO Off
M1328 C235 Start/Reset function enable Off Off Off R/W NO Off
M1329 C236 Start/Reset function enable Off Off Off R/W NO Off
M1330 C237 Start/Reset function enable Off Off Off R/W NO Off
M1331 C238 Start/Reset function enable Off Off Off R/W NO Off
M1332 C239 Start/Reset function enable Off Off Off R/W NO Off
M1333 C240 Start/Reset function enable Off Off Off R/W NO Off
M1334 Stop CH0 (Y0, Y1) pulse output temporarily Off Off Off R/W NO Off
M1335 Stop CH1 (Y2, Y3) pulse output temporarily Off Off Off R/W NO Off
M1336 CH0 (Y0, Y1) pulse send flag Off Off Off R NO Off
M1337 CH1 (Y2, Y3) pulse send flag Off Off Off R NO Off
M1338 Start CH0 (Y0, Y1) offset pulse flag Off Off Off R/W NO Off
M1339 Start CH1 (Y2, Y3) offset pulse flag Off Off Off R/W NO Off
M1340
To have interrupt (I110) after finishing sending
CH0 (Y0, Y1) pulse
Off Off Off R/W NO Off
M1341
To have interrupt (I120) after finishing sending
CH1 (Y2, Y3) pulse
Off Off Off R/W NO Off
M1342
To have interrupt (I130) at the same time that
sending CH0 (Y0, Y1) pulse
Off Off Off R/W NO Off
M1343
To have interrupt (I140) at the same time that
sending CH1 (Y2,Y3) pulse
Off Off Off R/W NO Off
M1344 Start CH0 (Y0, Y1) compensation pulse flag Off Off Off R/W NO Off
M1345 Start CH1 (Y2, Y3) compensation pulse flag Off Off Off R/W NO Off
M1350* PLC LINK start flag
Off - - R/W NO Off
M1351* Start PLC LINK automatically or by manual
Off - - R/W NO Off
M1360* PLC LINK ID 1 exists
Off - - R NO Off
M1361* PLC LINK ID 2 exists
Off - - R NO Off
2 DVP-PLC Function
DVP-PLC Application Manual 2-41
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
M1362* PLC LINK ID 3 exists
Off - - R NO Off
M1363* PLC LINK ID 4 exists
Off - - R NO Off
M1364* PLC LINK ID 5 exists
Off - - R NO Off
M1365* PLC LINK ID 6 exists
Off - - R NO Off
M1366* PLC LINK ID 7 exists
Off - - R NO Off
M1367* PLC LINK ID 8 exists
Off - - R NO Off
M1368* PLC LINK ID 9 exists
Off - - R NO Off
M1369* PLC LINK ID 10 exists
Off - - R NO Off
M1370* PLC LINK ID 11 exists
Off - - R NO Off
M1371* PLC LINK ID 12 exists
Off - - R NO Off
M1372* PLC LINK ID 13 exists
Off - - R NO Off
M1373* PLC LINK ID 14 exists
Off - - R NO Off
M1374* PLC LINK ID 15 exists
Off - - R NO Off
M1375* PLC LINK ID 16 exists
Off - - R NO Off
M1376* PLC LINK ID 1 acts
Off - - R NO Off
M1377* PLC LINK ID 2 acts
Off - - R NO Off
M1378* PLC LINK ID 3 acts
Off - - R NO Off
M1379* PLC LINK ID 4 acts
Off - - R NO Off
M1380* PLC LINK ID 5 acts
Off - - R NO Off
M1381* PLC LINK ID 6 acts
Off - - R NO Off
M1382* PLC LINK ID 7 acts
Off - - R NO Off
M1383* PLC LINK ID 8 acts
Off - - R NO Off
M1384* PLC LINK ID 9 acts
Off - - R NO Off
M1385* PLC LINK ID 10 acts
Off - - R NO Off
M1386* PLC LINK ID 11 acts
Off - - R NO Off
M1387* PLC LINK ID 12 acts
Off - - R NO Off
M1388* PLC LINK ID 13 acts
Off - - R NO Off
M1389* PLC LINK ID 14 acts
Off - - R NO Off
M1390* PLC LINK ID 15 acts
Off - - R NO Off
M1391* PLC LINK ID 16 acts
Off - - R NO Off
M1392* PLC LINK ID 1 ERROR
Off - - R NO Off
M1393* PLC LINK ID 2 ERROR
Off - - R NO Off
M1394* PLC LINK ID 3 ERROR
Off - - R NO Off
M1395* PLC LINK ID 4 ERROR
Off - - R NO Off
M1396* PLC LINK ID 5 ERROR
Off - - R NO Off
M1397* PLC LINK ID 6 ERROR
Off - - R NO Off
M1398* PLC LINK ID 7 ERROR
Off - - R NO Off
M1399* PLC LINK ID 8 ERROR
Off - - R NO Off
2 DVP-PLC Function
DVP-PLC Application Manual 2-42
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
M1400* PLC LINK ID 9 ERROR
Off - - R NO Off
M1401* PLC LINK ID 10 ERROR
Off - - R NO Off
M1402* PLC LINK ID 11 ERROR
Off - - R NO Off
M1403* PLC LINK ID 12 ERROR
Off - - R NO Off
M1404* PLC LINK ID 13 ERROR
Off - - R NO Off
M1405* PLC LINK ID 14 ERROR
Off - - R NO Off
M1406* PLC LINK ID 15 ERROR
Off - - R NO Off
M1407* PLC LINK ID 16 ERROR
Off - - R NO Off
M1408* PLC LINK ID 1 read completed
Off - - R NO Off
M1409* PLC LINK ID 2 read completed
Off - - R NO Off
M1410* PLC LINK ID 3 read completed
Off - - R NO Off
M1411* PLC LINK ID 4 read completed
Off - - R NO Off
M1412* PLC LINK ID 5 read completed
Off - - R NO Off
M1413* PLC LINK ID 6 read completed
Off - - R NO Off
M1414* PLC LINK ID 7 read completed
Off - - R NO Off
M1415* PLC LINK ID 8 read completed
Off - - R NO Off
M1416* PLC LINK ID 9 read completed
Off - - R NO Off
M1417*
PLC LINK ID 10 read completed Off - - R NO Off
M1418*
PLC LINK ID 11 read completed Off - - R NO Off
M1419*
PLC LINK ID 12 read completed Off - - R NO Off
M1420*
PLC LINK ID 13 read completed Off - - R NO Off
M1421*
PLC LINK ID 14 read completed Off - - R NO Off
M1422*
PLC LINK ID 15 read completed Off - - R NO Off
M1423*
PLC LINK ID 16 read completed Off - - R NO Off
M1424* PLC LINK ID 1 write completed
Off - - R NO Off
M1425* PLC LINK ID 2 write completed
Off - - R NO Off
M1426* PLC LINK ID 3 write completed
Off - - R NO Off
M1427* PLC LINK ID 4 write completed
Off - - R NO Off
M1428* PLC LINK ID 5 write completed
Off - - R NO Off
M1429* PLC LINK ID 6 write completed
Off - - R NO Off
M1430* PLC LINK ID 7 write completed
Off - - R NO Off
M1431* PLC LINK ID 8 write completed
Off - - R NO Off
M1432* PLC LINK ID 9 write completed Off - - R NO Off
M1433* PLC LINK ID 10 write completed Off - - R NO Off
M1434* PLC LINK ID 11 write completed Off - - R NO Off
M1435* PLC LINK ID 12 write completed Off - - R NO Off
M1436* PLC LINK ID 13 write completed Off - - R NO Off
M1437* PLC LINK ID 14 write completed Off - - R NO Off
2 DVP-PLC Function
DVP-PLC Application Manual 2-43
Special
M
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
M1438* PLC LINK ID 15 write completed Off - - R NO Off
M1439* PLC LINK ID 16 write completed Off - - R NO Off

Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
D1000* Watchdog timer (WDT) value (Unit: 1ms) 200 - - R/W NO 200
D1001
DVP model number+memory capacity / type (user
can read PLC program version from this register.
For example, D1001 = H XX27 means version
2.7. When reading from HPP it will display
Knnnnn and you can convert it to hexadecimal
number by pressing <H> key.
- - - R NO #
D1002* Program capacity - - - R NO #
D1003
Sum of program memory (sum of the PLC internal
program memory. User can identify the content of
PLC control program by this register)
- - - R NO #
D1004* Check code for grammar 0 0 - R NO 0
D1005 System used - - - - - - - - -
D1008* STEP address when WDT timer is ON 0 - - R NO 0
D1010* Present scan time (Unit: 0.1ms) 0 0 0 R NO 0
D1011* Minimum scan time (Unit: 0.1ms) 0 0 0 R NO 0
D1012* Maximum scan time (Unit: 0.1ms) 0 0 0 R NO 0
D1015*
0~32,767(unit: 0.1ms) addition type of high-speed
connection timer
0 - - R/W NO 0
D1018* PI (Low byte) H0FDB H0FDB H0FDB
R/W NO H0FDB
D1019* PI(High byte) H4049` H4049` H4049`
R/W NO H4049`
D1020*
ES/EX/SS and EP/SA: X0~X7 input filter (unit: ms)
EH: X0~X17 input filter (unit: ms)
10 - - R/W NO 10
D1021*
ES/EX/SS and EP/SA: X10~X17 input delay
setting (unit: ms)
EH: X20~X377 input filter (unit: ms)
10 - - R/W NO 10
D1022
Double frequency selection for AB phase counter
of ES/EX/SS and EP/SA models
0 - - R/W NO 0
D1024 System used flag - - - - - - - - -
D1025* Communication error code 0 - - R NO 0
D1028 Index register E0 0 0 0 R/W NO 0
D1029 Index register F0 0 0 0 R/W NO 0
D1030 Output numbers of Y0 pulse (Low word) 0 - - R NO 0
D1031 Output numbers of Y0 pulse (High word) 0 - - R NO 0
D1032 Output numbers of Y1 pulse (Low word) 0 - - R NO 0
D1033 Output numbers of Y1 pulse (High word) 0 - - R NO 0
D1035* Set the number of X input point of RUN/STOP 0 - - R/W NO 0
D1037 HKY command scan time setting, unit: 1ms - - - R/W YES 500
D1038*
When PLC MPU is slave, the setting of data
response delay time. Time unit is 0.1ms.
0 - - R/W NO 0
2 DVP-PLC Function
DVP-PLC Application Manual 2-44
Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
D1039* Constant scan time (ms) 0 - - R/W NO 0
D1040 On state number 1 of STEP point S 0 - - R NO 0
D1041 On state number 2 of STEP point S 0 - - R NO 0
D1042 On state number 3 of STEP point S 0 - - R NO 0
D1043 On state number 4 of STEP point S 0 - - R NO 0
D1044 On state number 5 of STEP point S 0 - - R NO 0
D1045 On state number 6 of STEP point S 0 - - R NO 0
D1046 On state number 7 of STEP point S 0 - - R NO 0
D1047 On state number 8 of STEP point S 0 - - R NO 0
D1049 On number of alarm point 0 - - R NO 0
D1050

D1055
PLC will automatically convert the ASCII data
saved in D1070~D1085 to HEX.
0 - - R NO 0
D1056*
Present value of EX MPU analog input channel 0
(CH0) and EP/EH MPU AD card channel 0 (CH0)
0 - - R NO 0
D1057*
Present value of EX MPU analog input channel 1
(CH1) and EP/EH MPU AD card channel 1(CH1)
0 - - R NO 0
D1058*
Present value of EX MPU analog input channel 2
(CH2)
0 - - R NO 0
D1059*
Present value of EX MPU analog input channel 3
(CH3)
0 - - R NO 0
D1061 System used flag - - - - - - - - -
D1065 System used flag - - - - - - - - -
D1066 System used flag - - - - - - - - -
D1067* Algorithm error code 0 - - R NO 0
D1068* Lock the algorithm error address 0 - - R NO 0
D1069
Step number of errors associated with flags
M1065~M1067
0 - - R NO 0
D1070

D1085
When the PLC built-in RS-485 communication
command receives feedback signals from
receiver. The signals will be saved in the registers
D1070~D1085. User can use the contents saved
in the registers to check the feedback data.
0 - - R NO 0
D1089

D1099
When the PLC built-in RS-485 communication
command is executed, the transmitting signals will
be stored in the registers D1089~D1099. User
can use the contents saved in registers to check
the feedback data.
0 - - R NO 0
D1101* Start address of file register 0 - - R/W Yes 0
D1102* Copy numbers of file register 1600 - - R/W Yes 1600
D1103*
Set start D number for file register to store (the
number should be large than 2000)
2000 - - R/W Yes 2000
D1104*
Parameter index for Accel/Decel pulse output Y0
(corresponds to device D)
0 0 - R/W NO 0
D1110*
Average of EX series analog input channel 0 (CH
0) and EP/EH series DA card channel 0 (CH0)
0 - - R NO 0
D1111*
Average of EX series analog input channel 1 (CH
1) and EP/EH series DA card channel 1 (CH1)
0 - - R NO 0
2 DVP-PLC Function
DVP-PLC Application Manual 2-45
Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
D1112*
Average of EX series analog input channel 2 (CH
2)
0 - - R NO 0
D1113*
Average of EX series analog input channel 3 (CH
3)
0 - - R NO 0
D1116*
EX series analog output channel 0 (CH 0) and
EP/EH series DA card channel 0 (CH0)
0 - - R/W NO 0
D1117*
EX series analog output channel 1 (CH 1) and
EP/EH series DA card channel 0 (CH0)
0 - - R/W NO 0
D1118*
For EX model only. It is the filter wave time setting
between the A/D conversions, and with the default
setting as 0 and the unit as 1ms, all will be
regarded as 5ms if D1118<=5.
5 - - R/W NO 5
D1119 System used - - - - - - - - -
D1120 RS-485 communication protocol H86 - - R/W NO H86
D1121
PLC communication address (the address that
save PLC communication address, it is latched)
- - - R/W Yes 1
D1122 Residual words of transmitting data 0 0 0 R NO 0
D1123 Residual words of receiving data 0 0 0 R NO 0
D1124 Start character definition (STX) H3A - - R/W NO H3A
D1125 First ending character definition (EXT1) H0D - - R/W NO H0D
D1126 Second ending character definition (EXT2) H0A - - R/W NO H0A
D1129 RS-485 time-out setting (ms) 0 - - R/W NO 0
D1130 MODBUS return error code record 0 - - R NO 0
D1133* Special high-speed pulse output register (D) index 0 - - R/W NO 0
D1137* Address of operator error occurs 0 0 - R NO 0
D1139*
Connection number of BCD module expansion
unit (the maximum is two units)
0 - - R NO 0
D1140*
Special expansion module number, maximum is 8
units
0 - - R NO 0
D1141 System used - - - - - - - - -
D1142 Input points (X) of expansion unit 0 - - R NO 0
D1143 Output points (Y) of expansion unit 0 - - R NO 0
D1144*
Parameter index for Accel/Decel pulse output of
adjustable slope (corresponds to component D)
0 - - R/W NO 0
D1145* Connection number of KEY module expansion unit 0 - - R NO 0
D1146*
Connection number of DISP module expansion
unit
0 - - R NO 0
D1148 System used - - - - - - - - -
D1149
Memory card type:
0: no card, 1: RS-232, TS-01, RS-422, 4:
potentiometer switch, 5: DIP switch, 6: transitor
output card, 7: high-speed pulse output card, 8:
2AD card, 9: 2DA card
- - - R NO 0
D1150
Table count register in multi-group setting
comparison mode
0 0 0 R NO 0
D1151 Table count register in frequency control mode 0 0 0 R NO 0
D1152 The change value of high word of DHSZ D 0 0 0 R NO 0
D1153 The change value of low word of DHSZ D 0 0 0 R NO 0
2 DVP-PLC Function
DVP-PLC Application Manual 2-46
Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
D1154*
Recommended Interval of accelerated time
(10~32767 ms) of Accel/Decel pulse output of
adjustable slope
200 - - R/W NO 200
D1155*
Recommended Interval of decelerated time (-1~
-32700 ms) of Accel/Decel pulse output of
adjustable slope
-1000 - - R/W NO -1000
D1156

D1165
Special D that indicated by RTMU command
(K0~K9)
0 - - R/W NO 0
D1170* PC value when executing single step 0 0 0 R NO 0
D1172* 2-phase pulse output frequency (12Hz~20KHz) 0 - - R/W NO 0
D1173* 2-phase pulse output mode selection (K1and K2) 0 - - R/W NO 0
D1174*
Target number for 2-phase pulse outputs (low
16-bit)
0 - - R/W NO 0
D1175*
Target number for 2-phase pulse outputs (high
16-bit)
0 - - R/W NO 0
D1176*
Present output number of 2-phase pulse (low
16-bit)
0 - - R/W NO 0
D1177*
Present output number of 2-phase pulse (high
16-bit)
0 - - R/W NO 0
D1178* VR0 value 0 - - R NO 0
D1179* VR1 value 0 - - R NO 0
D1182 Pointer register E1 0 0 0 R/W NO 0
D1183 Pointer register F1 0 0 0 R/W NO 0
D1184 Pointer register E2 0 0 0 R/W NO 0
D1185 Pointer register F2 0 0 0 R/W NO 0
D1186 Pointer register E3 0 0 0 R/W NO 0
D1187 Pointer register F3 0 0 0 R/W NO 0
D1188 Pointer register E4 0 0 0 R/W NO 0
D1189 Pointer register F4 0 0 0 R/W NO 0
D1190 Pointer register E5 0 0 0 R/W NO 0
D1191 Pointer register F5 0 0 0 R/W NO 0
D1192 Pointer register E6 0 0 0 R/W NO 0
D1193 Pointer register F6 0 0 0 R/W NO 0
D1194 Pointer register E7 0 0 0 R/W NO 0
D1195 Pointer register F7 0 0 0 R/W NO 0
D1196 System used - - - - - - - - -
D1197
System used
- - - - - - - - -
D1198
System used
- - - - - - - - -
D1199
System used
- - - - - - - - -
D1200* Start address of M0~M999 auxiliary relay latched - - - R/W Yes #
D1201* End address of M0~M999 auxiliary relay latched - - - R/W Yes 999
D1202*
Start address of M2000~M4095 auxiliary relay
latched
- - - R/W Yes 2000
2 DVP-PLC Function
DVP-PLC Application Manual 2-47
Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
D1203*
End address of M2000~M4095 auxiliary relay
latched
- - - R/W Yes 4095
D1204* Start latched address of 100ms timer T0~T199 - - - R/W Yes HFFFF
D1205* End latched address of 100ms timer T0~T199 - - - R/W Yes HFFFF
D1206* Start latched address of 10ms timer T200~T239 - - - R/W Yes HFFFF
D1207* End latched address of 10ms timer T200~T239 - - - R/W Yes HFFFF
D1208* Start latched address of 16-bit counter C0~C199 - - - R/W Yes #
D1209* End latched address of 16-bit counter C0~C199 - - - R/W Yes 199
D1210*
Start latched address of 32-bit counter
C200~C234
- - - R/W Yes #
D1211*
End latched address of 32-bit counter
C200~C234
- - - R/W Yes 234
D1212*
Start latched address of 32-bit high-speed counter
C235~C255
- - - R/W Yes 235
D1213*
End latched address of 32-bit high-speed counter
C235~C255
- - - R/W Yes 255
D1214* Start latched address of step point (S0~S1023) - - - R/W Yes #
D1215* End latched address of step point (S0~S1023) - - - R/W Yes #
D1216* Start latched address of register D0~D999 - - - R/W Yes 200
D1217* End latched address of register D0~D999 - - - R/W Yes 999
D1218* Start latched address of register D2000~D9999 - - - R/W Yes 2000
D1219* End latched address of register D2000~D9999 - - - R/W Yes #
D1220
The first group of pulse output phase 00: 1-phase
(Y0 output) 01:A Phase 02:B Phase
0 - - R/W NO 0
D1221
The second group of pulse output phase 00:1-
phase (Y2 output) 01:A Phase 02:B Phase
0 - - R/W NO 0
D1225
The first group of the count setting of counter
(HHSC0). It is the count mode of C241, C246,
C251.
0 - - R/W NO 0
D1226
The second group of the count setting of counter
(HHSC1).. It is the count mode of C242, C247,
C252.
0 - - R/W NO 0
D1227
The third group of the count setting of counter
(HHSC2).. It is the count mode of C243, C248,
C253.
0 - - R/W NO 0
D1228
The forth group of the count setting of counter
(HHSC3).. It is the count mode of C244, C249,
C254.
0 - - R/W NO 0
D1256

D1295
MODRW command of RS-485 is built-in. The
characters that sent during executing is saved in
D1256~D1295. User can check according to the
content of these registers.
0 - - R NO 0
D1296

D1311
MODRW command of RS-485 is built-in. PLC
system will convert ASCII in the content of the
register that user indicates to HEX and save it in
D1296 D1311.
0 - - R NO 0
D1313* Real time clock (RTC) second 00~59 0 - - R/W NO 0
D1314* Real time clock (RTC) minute 00~59 0 - - R/W NO 0
D1315* Real time clock (RTC) hour 00~23 0 - - R/W NO 0
D1316* Real time clock (RTC) day 01~31 0 - - R/W NO 1
2 DVP-PLC Function
DVP-PLC Application Manual 2-48
Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
D1317* Real time clock (RTC) month 01~12 0 - - R/W NO 1
D1318* Real time clock (RTC) week 1~7 0 - - R/W NO 6
D1319* Real time clock (RTC) year 0099 0 - - R/W NO 0
D1320* The 1st special expansion module ID 0 - - R NO 0
D1321* The 2nd special expansion module ID 0 - - R NO 0
D1322* The 3rd special expansion module ID 0 - - R NO 0
D1323* The 4th special expansion module ID 0 - - R NO 0
D1324* The 5th special expansion module ID 0 - - R NO 0
D1325* The 6th special expansion module ID 0 - - R NO 0
D1326* The 7th special expansion module ID 0 - - R NO 0
D1327* The 8th special expansion module ID 0 - - R NO 0
D1328 CH0 (Y0,Y1) offset pulse number (Low word) 0 - - R/W NO 0
D1329 CH0 (Y0,Y1) offset pulse number (High word) 0 - - R/W NO 0
D1330 CH1 (Y2,Y3) offset pulse number (Low word) 0 - - R/W NO 0
D1331 CH1 (Y2,Y3) offset pulse number (High word) 0 - - R/W NO 0
D1332 CH0 (Y0,Y1) residual pulse number (Low word) 0 - - R NO 0
D1333 CH0 (Y0,Y1) residual pulse number (High word) 0 - - R NO 0
D1334 CH1 (Y2,Y3) residual pulse number (Low word) 0 - - R NO 0
D1335 CH1 (Y2,Y3) residual pulse number (High word) 0 - - R NO 0
D1336 Present value of CH0 pulse (Low word) Y0, Y1 0 0 0 R NO 0
D1337 Present value of CH0 pulse (High word) Y0, Y1 0 0 0 R NO 0
D1338 Present value of CH1 pulse (Low word) Y2, Y3 0 0 0 R NO 0
D1339 Present value of CH1 pulse (High word) Y2, Y3 0 0 0 R NO 0
D1340 The 1
st
step acceleration frequency 200 - - R/W Yes 200
D1341
Maximum output frequency (Low word) (it is fixed
to 200KHz)
H04D0 - - R Yes H04D0
D1342
Maximum output frequency (High word) (it is fixed
to 200KHz)
3 - - R Yes 3
D1343 Acceleration /Deceleration time 100 - - R/W Yes 100
D1344
CH0 (Y0,Y1) complement pulse number (Low
word)
- - - R/W NO 0
D1345
CH0 (Y0,Y1) complement pulse number (High
word)
- - - R/W NO 0
D1346
CH1 (Y2,Y3) complement pulse number (Low
word)
- - - R/W NO 0
D1347
CH1 (Y2,Y3) complement pulse number (High
word)
- - - R/W NO 0
D1355*
Communication address that read by PLC LINK
ID 1
H1064 - - R/W NO H1064
D1356*
Communication address that read by PLC LINK
ID 2
H1064 - - R/W NO H1064
D1357* Communication address that read by PLC LINK
ID 3
H1064 - - R/W NO H1064
2 DVP-PLC Function
DVP-PLC Application Manual 2-49
Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
ID 3
D1358*
Communication address that read by PLC LINK
ID 4
H1064 - - R/W NO H1064
D1359*
Communication address that read by PLC LINK
ID 5
H1064 - - R/W NO H1064
D1360*
Communication address that read by PLC LINK
ID 6
H1064 - - R/W NO H1064
D1361*
Communication address that read by PLC LINK
ID 7
H1064 - - R/W NO H1064
D1362*
Communication address that read by PLC LINK
ID 8
H1064 - - R/W NO H1064
D1363*
Communication address that read by PLC LINK
ID 9
H1064 - - R/W NO H1064
D1364*
Communication address that read by PLC LINK
ID 10
H1064 - - R/W NO H1064
D1365*
Communication address that read by PLC LINK
ID 11
H1064 - - R/W NO H1064
D1366*
Communication address that read by PLC LINK
ID 12
H1064 - - R/W NO H1064
D1367*
Communication address that read by PLC LINK
ID 13
H1064 - - R/W NO H1064
D1368*
Communication address that read by PLC LINK
ID 14
H1064 - - R/W NO H1064
D1369*
Communication address that read by PLC LINK
ID 15
H1064 - - R/W NO H1064
D1370*
Communication address that read by PLC LINK
ID 16
H1064 - - R/W NO H1064
D1375* The first KEY module X coordinate 0 - - R NO 0
D1376* The first KEY module Y coordinate 0 - - R NO 0
D1377* The first KEY module button number 0 - - R NO 0
D1378* The second KEY module X coordinate 0 - - R NO 0
D1379* The second KEY module Y coordinate 0 - - R NO 0
D1380* The second KEY module button number 0 - - R NO 0
D1381* The first BCD module (Low byte) 0 - - R NO 0
D1382* The first BCD module (High byte) 0 - - R NO 0
D1383* The second BCD module (Low byte) 0 - - R NO 0
D1384* The second BCD module (High byte) 0 - - R NO 0
D1385* The first DISP module (Low byte) 0 HFFFF - R/W NO 0
D1386* The first DISP module (High byte) 0 HFFFF - R/W NO 0
D1387* The decimal setting of first DISP module 0 0 - R/W NO 0
D1388* The second DISP module (High byte) 0 HFFFF - R/W NO 0
D1389* The second DISP module (Low byte) 0 HFFFF - R/W NO 0
D1390* The decimal setting of second DISP module 0 0 - R/W NO 0
D1391* The third DISP module (High byte) 0 HFFFF - R/W NO 0
D1392* The third DISP module (Low byte) 0 HFFFF - R/W NO 0
D1393* The decimal setting of third DISP module 0 0 - R/W NO 0

2 DVP-PLC Function
DVP-PLC Application Manual 2-50
Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
D1415*
Communication address that wrote by PLC LINK
ID 1
H10C8 - - R/W NO H10C8
D1416*
Communication address that wrote by PLC LINK
ID 2
H10C8 - - R/W NO H10C8
D1417*
Communication address that wrote by PLC LINK
ID 3
H10C8 - - R/W NO H10C8
D1418*
Communication address that wrote by PLC LINK
ID 4
H10C8 - - R/W NO H10C8
D1419*
Communication address that wrote by PLC LINK
ID 5
H10C8 - - R/W NO H10C8
D1420*
Communication address that wrote by PLC LINK
ID 6
H10C8 - - R/W NO H10C8
D1421*
Communication address that wrote by PLC LINK
ID 7
H10C8 - - R/W NO H10C8
D1422*
Communication address that wrote by PLC LINK
ID 8
H10C8 - - R/W NO H10C8
D1423*
Communication address that wrote by PLC LINK
ID 9
H10C8 - - R/W NO H10C8
D1424*
Communication address that wrote by PLC LINK
ID 10
H10C8 - - R/W NO H10C8
D1425*
Communication address that wrote by PLC LINK
ID 11
H10C8 - - R/W NO H10C8
D1426*
Communication address that wrote by PLC LINK
ID 12
H10C8 - - R/W NO H10C8
D1427*
Communication address that wrote by PLC LINK
ID 13
H10C8 - - R/W NO H10C8
D1428*
Communication address that wrote by PLC LINK
ID 14
H10C8 - - R/W NO H10C8
D1429*
Communication address that wrote by PLC LINK
ID 15
H10C8 - - R/W NO H10C8
D1430*
Communication address that wrote by PLC LINK
ID 16
H10C8 - - R/W NO H10C8
D1431* PLC LINK times 0 - - R/W NO 0
D1432* PLC LINK counts 0 - - R/W NO 0
D1433* PLC LINK units 0 - - R/W NO 0
D1434* Read items of PLC LINK ID 1 16 - - R/W NO 16
D1435* Read items of PLC LINK ID 2 16 - - R/W NO 16
D1436* Read items of PLC LINK ID 3 16 - - R/W NO 16
D1437* Read items of PLC LINK ID 4 16 - - R/W NO 16
D1438* Read items of PLC LINK ID 5 16 - - R/W NO 16
D1439* Read items of PLC LINK ID 6 16 - - R/W NO 16
D1440* Read items of PLC LINK ID 7 16 - - R/W NO 16
D1441* Read items of PLC LINK ID 8 16 - - R/W NO 16
D1442* Read items of PLC LINK ID 9 16 - - R/W NO 16
D1443* Read items of PLC LINK ID 10 16 - - R/W NO 16
D1444* Read items of PLC LINK ID 11 16 - - R/W NO 16
D1445* Read items of PLC LINK ID 12 16 - - R/W NO 16
D1446* Read items of PLC LINK ID 13 16 - - R/W NO 16

2 DVP-PLC Function
DVP-PLC Application Manual 2-51
Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
D1447* Read items of PLC LINK ID 14 16 - - R/W NO 16
D1448* Read items of PLC LINK ID 15 16 - - R/W NO 16
D1449* Read items of PLC LINK ID 16 16 - - R/W NO 16
D1450* Wrote items of PLC LINK ID 1 16 - - R/W NO 16
D1451* Wrote items of PLC LINK ID 2 16 - - R/W NO 16
D1452* Wrote items of PLC LINK ID 3 16 - - R/W NO 16
D1453* Wrote items of PLC LINK ID 4 16 - - R/W NO 16
D1454* Wrote items of PLC LINK ID 5 16 - - R/W NO 16
D1455* Wrote items of PLC LINK ID 6 16 - - R/W NO 16
D1456* Wrote items of PLC LINK ID 7 16 - - R/W NO 16
D1457* Wrote items of PLC LINK ID 8 16 - - R/W NO 16
D1458* Wrote items of PLC LINK ID 9 16 - - R/W NO 16
D1459* Wrote items of PLC LINK ID 10 16 - - R/W NO 16
D1460* Wrote items of PLC LINK ID 11 16 - - R/W NO 16
D1461* Wrote items of PLC LINK ID 12 16 - - R/W NO 16
D1462* Wrote items of PLC LINK ID 13 16 - - R/W NO 16
D1463* Wrote items of PLC LINK ID 14 16 - - R/W NO 16
D1464* Wrote items of PLC LINK ID 15 16 - - R/W NO 16
D1465* Wrote items of PLC LINK ID 16 16 - - R/W NO 16
D1480*

D1495*
ID 1 LINK PLC reads. Communication address for
ID 1 reads is in D1355. The range is D100-D115
of ID 1 PLC.
0 - - R NO 0
D1496*

D1511*
ID 1 LINK PLC writes. Communication address for
ID 1 writes is in D1415. The range is D200-D215
of ID 1 PLC.
0 - - R/W NO 0
D1512*

D1527*
ID 2 LINK PLC reads. Communication address for
ID 2 reads is in D1356. The range is D100-D115
of ID 2 PLC.
0 - - R NO 0
D1528*

D1543*
ID 2 LINK PLC writes. Communication address for
ID 2 writes is in D1416. The range is D200-D215
of ID 2 PLC.
0 - - R/W NO 0
D1544*

D1559*
ID 3 LINK PLC reads. Communication address for
ID 3 reads is in D1357. The range is D100-D115
of ID 3 PLC.
0 - - R NO 0
D1560*

D1575*
ID 3 LINK PLC writes. Communication address for
ID 3 writes is in D1417. The range is D200-D215
of ID 3 PLC.
0 - - R/W NO 0
D1576*

D1591*
ID 4 LINK PLC reads. Communication address for
ID 4 reads is in D1358. The range is D100-D115
of ID 4 PLC.
0 - - R NO 0
D1592*

D1607*
ID 4 LINK PLC writes. Communication address for
ID 4 writes is in D1418. The range is D200-D215
of ID 4 PLC.
0 - - R/W NO 0
D1608*

D1623*
ID 5 LINK PLC reads. Communication address for
ID 5 reads is in D1359. The range is D100-D115
of ID 5 PLC.
0 - - R NO 0
2 DVP-PLC Function
DVP-PLC Application Manual 2-52
Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting
D1624*

D1639*
ID 5 LINK PLC writes. Communication address for
ID 5 writes is in D1419. The range is D200-D215
of ID 5 PLC.
0 - - R/W NO 0
D1640*

D1655*
ID 6 LINK PLC reads. Communication address for
ID 6 reads is in D1360. The range is D100-D115
of ID 6 PLC.
0 - - R NO 0
D1656*

D1671*
ID 6 LINK PLC writes. Communication address for
ID 6 writes is in D1420. The range is D200-D215
of ID 6 PLC.
0 - - R/W NO 0
D1672*

D1687*
ID 7 LINK PLC reads. Communication address for
ID 7 reads is in D1361. The range is D100-D115
of ID 7 PLC.
0 - - R NO 0
D1688*

D1703*
ID 7 LINK PLC writes. Communication address for
ID 7 writes is in D1421. The range is D200-D215
of ID 7 PLC.
0 - - R/W NO 0
D1704*

D1719*
ID 8 LINK PLC reads. Communication address for
ID 8 reads is in D1362. The range is D100-D115
of ID 8 PLC.
0 - - R NO 0
D1720*

D1735*
ID 8 LINK PLC writes. Communication address for
ID 8 writes is in D1422. The range is D200-D215
of ID 8 PLC.
0 - - R/W NO 0
D1736*

D1751*
ID 9 LINK PLC reads. Communication address for
ID 9 reads is in D1363. The range is D100-D115
of ID 9 PLC.
0 - - R NO 0
D1752*

D1767*
ID 9 LINK PLC writes. Communication address for
ID 9 writes is in D1423. The range is D200-D215
of ID 9 PLC.
0 - - R/W NO 0
D1768*

D1783*
ID 10 LINK PLC reads. Communication address
for ID 10 reads is in D1364. The range is
D100-D115 of ID 10 PLC.
0 - - R NO 0
D1784*

D1799*
ID 10 LINK PLC writes. Communication address
for ID 10 writes is in D1424. The range is
D200-D215 of ID 10 PLC.
0 - - R/W NO 0
D1800*

D1815*
ID 11 LINK PLC reads. Communication address
for ID 11 reads is in D1365. The range is
D100-D115 of ID 11 PLC.
0 - - R NO 0
D1816*

D1831*
ID 11 LINK PLC writes. Communication address
for ID 11 writes is in D1425. The range is
D200-D215 of ID 11 PLC.
0 - - R/W NO 0
D1832*

D1847*
ID 12 LINK PLC reads. Communication address
for ID 12 reads is in D1366. The range is
D100-D115 of ID 12 PLC.
0 - - R NO 0
D1848*

D1863*
ID 12 LINK PLC writes. Communication address
for ID 12 writes is in D1426. The range is
D200-D215 of ID 12 PLC.
0 - - R/W NO 0
D1864*

D1879*
ID 13 LINK PLC reads. Communication address
for ID 13 reads is in D1367. The range is
D100-D115 of ID 13 PLC.
0 - - R NO 0
D1880*

D1895*
ID 13 LINK PLC writes. Communication address
for ID 13 writes is in D1427. The range is
D200-D215 of ID 13 PLC.
0 - - R/W NO 0
D1896*

D1911*
ID 14 LINK PLC reads. Communication address
for ID 14 reads is in D1368. The range is
D100-D115 of ID 14 PLC.
0 - - R NO 0
D1912*
ID 14 LINK PLC writes. Communication address
for ID 14 writes is in D1428. The range is
0 - - R/W NO 0
2 DVP-PLC Function
DVP-PLC Application Manual 2-53
Special
D
Function
ES
EX
SS
EP
SA
EH
Off

On
STOP

RUN
RUN

STOP
Attribute Latched
Factory
setting

D1927*
D200-D215 of ID 14 PLC.
D1928*

D1943*
ID 15 LINK PLC reads. Communication address
for ID 15 reads is in D1369. The range is
D100-D115 of ID 15 PLC.
0 - - R NO 0
D1944*

D1959*
ID 15 LINK PLC writes. Communication address
for ID 15 writes is in D1429. The range is
D200-D215 of ID 15 PLC.
0 - - R/W NO 0
D1960*

D1975*
ID 16 LINK PLC reads. Communication address
for ID 16 reads is in D1370. The range is
D100-D115 of ID 16 PLC.
0 - - R NO 0
D1976*

D1991*
ID 16 LINK PLC writes. Communication address
for ID 16 writes is in D1430. The range is
D200-D215 of ID 16 PLC.
0 - - R/W NO 0
2.11 Special Auxiliary Relay and Special Register Functions
PLC
Operation
Flag

M1000~M1003
1. M1000: M1000 is On contact during runing, i.e. a normally open contact a. Using M1000 to
drive indicated lamp during running, you can know that PLC is in RUN state. M1000
is always on when PLC is RUN.
M1000
Y0
PLC is running
always ON
M1000 is On contact
during operation

2. M1001: M1001 is Off contact during running, i.e. a normally close contact b. M1001 is
always Off when PLC is RUN.
3. M1002: M1002 will be ON at the first scan when PLC starts RUN and then is Off. M1002 can
be regarded as scan initial pulse and pulse width is a scan time. It can be used to
initial, i.e. start positive pulse (it is ON once it is RUN).
4. M1003: It is Off at the first scan when PLC is RUN and then is ON later, i.e. start negative
pulse (it is Off once it is RUN).
PLC RUN
M1000
M1001
M1002
M1003
scan time

2 DVP-PLC Function
DVP-PLC Application Manual 2-54
Monitor
Timer

D1000

1. Monitor timer is used to moitor PLC scan time. When scan time exceeds the setting time of
moitor timer, RED ERROR LED will be light and all outputs will be Off.
2. The initial value of monitor timer is 200ms. You can use command MOV to change the
setting of monitor timer in the program when program is long or calculation is complicated.
Following example is set moinitor timer to 300ms.
M1002
0 MOV K300 D1000
Primary pulse



3. The maximum setting for monitor timer is 32,767ms. But please notice that if monitor timer
settings is too large, the detected time of calculation abnormal will be delay. Therefore, if it is
not the complicated calculateion makes scan time exceeds 200ms, it is better to set monitor
timer around 200ms.
4. Please monitor D1010~D1012 to check if scan time exceeds D1000 setting when
calculation is complicated or PLC MPU connects too many special module to cause scan
time too long. In this situation, besides modify D1000 setting, you can also use WDT
command (API 07) in PLC program. When CPU excutes WDT command, internal monitor
timer will be clear to 0 to make scan time not exceed monitor timer setting.
Program
Capacity

D1002
It is different program capacity for different series:
1. ES, EX, SS series: 3792 Steps
2. EP, SA series: 7920 Steps
3. EH series: 15872 Steps
Grammar
Check

M1004
D1004, D1137
1. If there is grammar error, PLC ERROR LED will blinking and special relay M1004=On.
2. Time to check PLC grammar: When power is from OffOn. Other time:
Writing program into PLC by WPLSoft or HPP
Using On-line Programming function by EH series and WPLSoft
3. It will happen with illegal operand (device) or grammar error. You can get the fault by
checking special register D1004 with fault code information. Fault address is saved in data
register D1137 (if it is general circuit error, D1137 will be invalid).
4. Refer to chapter 2.1 Summary of DVP-PLC device number for each device usage range.
5. Refer to chapter 2.12 Troubleshooting and Fault Information for checking grammar.
Scan Time-out
Timer

M1008, D1008
1. When scan time-out during executing, PLC ERROR LED will light and M1008=On.
2. Using WPLSoft or HPP to monitor D1008 which saves timeout STEP address as WDT timer
is ON.

2 DVP-PLC Function
DVP-PLC Application Manual 2-55
Scan Time
Monitor

D1010~D1012
The present value, minimum value and maximum value of scan time are saved in
D1010~D1012.
1. D1010: the present scan time.
2. D1011: the minimum scan time.
3. D1012: the maximum scan time.
Internal Clock
Pulse

M1011~M1014
1. There are four following clock pulses in PLC. Once PLC is power on, these four clock pulse
will act automatically.
M1011 (10 ms)
M1012 (100 ms)
M1013 (1 sec)
M1014 (60 sec)
100 Hz
10 Hz
1 Hz
10 ms
100 ms
1 sec
1 min

2. When PLC is STOP, clock pulse will also act. The start timing of clock pulse and RUN are
not synchronized.
High-speed
Timer

M1015, D1015
1. The steps for using special M and special D directly:
Only valid when PLC is RUN.
When M1015=On, it will start high-speed timer D1015 once PLC finish executing END
command of that scan period. The minimum unit of D1015 is 100us.
The range of D1015 is 0~32,767. When it counts to 32,767, it will start from 0.
When M1015=Off, D1015 will stop counting immediately.
2. There is high-speed timer command HST for EH series, refer command API 196 HST for
detail.
3. Example:
When X10 is On, set M1015=On to start high-speed timer and record in D1015.
When X10=Off, set M1015=Off to close high-speed timer.
X10
M1015

2 DVP-PLC Function
DVP-PLC Application Manual 2-56
Real
Time
Clock

M1016, M1017
M1076
D1313~D1319
1. The relative command special M and special D.
Device name Fuunction
M1016
Year display of real
time clock
Off: show the 2 right most bits
On: show the (2 right most bits + 2000)
M1017
30 seconds
adjustment
When OffOn, it is triggered to adjust
When it is during 0~29 seconds, minute wont change
and second will be reset to 0.
When it is during 30~59 seconds, it will add 1 to
minute and reset second to 0.
M1076
Real time clock
malfunction
It will be ON when setting exceeds range or battery
has run down.
D1313 Second 0~59
D1314 Minute 0~59
D1315 Hour 0~23
D1316 Day 1~31
D1317 Month 1~12
D1318 Week 1~7
D1319 Year 0~99(2 right-most bit)
2. If real time clock setting is error, time will reset to Jan. 1, 2000. 00:00 Saturday when PLC is
power on again.
3. Adjust method of perpetual clock:
It can use specific command TWR to adjust for EP/EH mode built-in real time clock.
Refer to API 167 TWR for detail.
Using peripherial WPLSoft and digital setting display DU-01 to set.
(PI)
D1018, D1019
1. It uses 32-bit data register which is combined with D1019 and D1018 to save floating point
value (PI),
2. Floating point value = H 40490FDB
2 DVP-PLC Function
DVP-PLC Application Manual 2-57
Response time
adjustment of
input terminal

M1019
D1020, D1021
1. Digital filter circuit is built-in input terminals X0~X17 can set response time of receive pulse
from input terminal by the content of D1020 and D1021. Unit is ms.
2. When PLC is from Off On, the content of D1020 and D1021 will become to 10
automatically.
X0
X17
0ms
1ms
10ms
15ms
0
1
10
15
Terminal
response time
state
memory
input reflash
setting by D1020
(default is 10)

3. When setting X0~X17 response time to 0ms to execute following program, the faster
response time in input terminla will be 50s due to input terminal connects to RC filter circuit
in series.
M1000
MOV K0 D1020
normally ON contact

4. It is not necessary to adjust response time when using high-speed counter, interrupt insert
or fast pulse catch (M1056~M1059) in program.
5. It is the same to use command REFF (API 51) or change the content of D1020 and D1021.
Execution
Completed
Flag

M1029, M1030
Execution Completed Flag:
1. API 52 MTR, API 71 HKY, API 72 DSW, API 74 SEGL, API 77 PR:
M1029=On for a scan period once the command finish executing.
2. API 57 PLSY, API 59 PLSR:
For EP/SA/ES/EX/SS MPU, M1029 will be On after Y0 pulse finishes output and
M1030 will be On after Y1 pulse completes output. When commands PLSY and PLSR
are Off, M1029 and M1030 will be Off.
For EH MPU, M1029 will be On after Y0 and Y1 pulses complete output and M1030
will be On after Y2 and Y3 pulse complete output. When commands PLSY, PLSR are
Off, M1029 or M1030 will be Off.
It is needed to clear by user after executing M1029 and M1030.
3. API 63 INCD: M1029 will be On for a scan period when designated group finish comparison.


2 DVP-PLC Function
DVP-PLC Application Manual 2-58
4. API 67 RAMP, API 69 SORT:
M1029= On after completing execution, M1029 is needed to clear by user.
If this command is Off, M1029 will be Off.
5. API 155 DABSR, API 156 ZRN, API 158 DRVI, API 158 DRVA:
M1029=On when the first output group Y0 and Y1 pulses complete sending and
M1030=On when the second output group Y2 and Y3 pulses complete sending.
M1029 or M1030 will be Off when execute this command in the next time and it will be
On after completing execution.
Communication
Error Code

D1025
Error code when communication error:
01: illegal command.
02: illegal equipment address.
03: request data exceeds range.
07: checksum error
Clear
Command

M1031, M1032
1. M1031 (clear unlatched area) , M1032 (clear latched area)
Device The component that will be cleared
M1031
Clear unlatched
area
The contact state of Y, general M, general S
T contact for general and time coil
C contact for general, time coil reset coil
D present register for general
T present register for general
C present register for general
M1032
Clear latched area
The contact state of M and S for latched
Accumulative timer T contact and time coil
Latched C and hig-speed counter C contact, count coil
Present register D for latched
Present register of accumulative timer T
Latched C and present register of high-speed counter C

Output Latched
in STOP mode

M1033
When M1003 is On, the On/Off state of output will be held once PLC is from RUN to STOP. If
output contact load of PLC is heater, heaters state will be held as PLC is from RUN to STOP
and RUN after program modification.
2 DVP-PLC Function
DVP-PLC Application Manual 2-59
All Output Y
are inhibited

M1034
When M1034 is drove to be On, all output Y will be Off.
M1034 all outputs inhibited

RUN/STOP
Switch

M1035, D1035
1. For EH series, when M1035 is drove to be On to start input point X0~X17 to be RUN/STOP
switch by the content of D1035 (0~17).
2. For EP/SA series, When M1035 is drove to be On to start input point X7 to be RUN/STOP
switch.
Communication
Response Delay

D1038
For ES/EX/SS/EP/SA series, data response delay time can be set when PLC MPU is to be
Slave in RS-485 communication. Unit is 0.1ms.
Constant Scan
Time

M1039, D1039
1. When M1039 is On, program scan time is determined by D1039. When program finishes
executing, it will execute the next scan as constant scan time attained. If D1039 is less than
program scan time, it will scan by program scan time.
M1000
normally ON
contact
MOV P K20 D1039
M1039 Constant scan time
Scan time is fixed to 20ms

2. The relative commands of scan time are RAMP(API 67), HKY(API 71), SEGL(API 74),
ARWS(API 75) and PR(API 77). They should be used with constant scan time or constant
time insert interrupt.
3. Especial for command HKY(API 71), scan time should be set to 20ms and above when it is
used 44 matrix to be 16 keys to operate.
4. Scan time D1010~D1012 display also include constant scan time.
2 DVP-PLC Function
DVP-PLC Application Manual 2-60
Analog
Function

D1056~D1059
D1110~D1113
D1116~D1118
1. For EX MPU, analog input channel resolution 10 bits (10V or 20mA)
2. For EX MPU, analog output channel resolution 8 bits (0~10V or 0~20mA)
3. It is analog digital converter filter time setting for EX series. The factory setting is 0 and unit
is 1ms. If D1118 5, it will be regarded as 5ms.
4. Resolution of EP/EH analog input AD card: 12 bits (10V or 20mA)
5. Resolution of EP/EH analog input DA card: 12 bits (0~10Vor 0~20mA)
Device Function
D1056
Present value of EX MPU analog input channel 0 (CH0)
and EP/EH MPU AD card channel 0 (CH0)
D1057
Present value of EX MPU analog input channel 1 (CH 1)
and EP/EH MPU AD card channel 1 (CH1)
D1058 Present value of EX MPU analog input channel 2 (CH 2)
D1059 Present value of EX MPU analog input channel 3 (CH 3)
D1110
Average value of EX MPU analog input channel 0 (CH 0)
and EP/EH MPU AD card channel 0 (CH0)
D1111
Average value of EX MPU analog input channel 1 (CH 1)
and EP/EH MPU AD card channel 1 (CH1)
D1112 Average value of EX MPU analog input channel 2 (CH 2)
D1113 Average value of EX MPU analog input channel 3 (CH 3)
D1116
EX MPU analog output channel 0 (CH 0), EP/EH MPU DA
card channel 0 (CH0)
D1117
EX MPU analog output channel 1 (CH 1), EP/EH MPU DA
card channel 1 (CH1)
D1118 EX series analog input filter setting (ms)
Algorithm
Error Flag

M1067~M1068
D1067~D1068
1. Algorithm error flag:
Component Explanation Latched STOPRUN RUNSTOP
M1067 Algorithm error flag none clear latched
M1068 Algorithm error lock flag none unchanged latched
D1067 Algorithm error code none clear latched
D1068 STEP value of algorithm error none unchanged latched
2. Error code explanation:
D1067 error code Function
0E18 BCD conversion error
0E19 Divisor is 0
0E1A Usage exceeds limit (include E and F)
0E1B It is negative number after doing radical
0E1C FROM/TO communication error
2 DVP-PLC Function
DVP-PLC Application Manual 2-61
File
Register

M1101
D1101~D1103
1. For EP/EH series, When PLC is power on or from STOP to RUN, it will check start file
register function from M1101, the start number of file register from D1101 (file registers for
EP/SA series: K0~K1,599; for EH series: K0~K9,999), read item number of file register from
D1102(read items of file registers for EP/SA series: K0~K1,600; for EH series: K0~K8,000),
D1103(file registers for save and read, start number of designated data register D (for
EP/SA series: K2,000~K4,999, for EH series: K2,000~K9,999) to determine to send file
register to designated data register automatically or not).
2. Please refer to commands API 148 MEMR and API 149 MEMW explantion.
DIP Switch
Function Card

M1104~M1111
1. When PLC is RUN with DIP switch card, 8 DIP switches correspond to M1104~M1111
separately.
2. Please refer to command API 109 SWRD for detail.
Transistor
Output Card

M1112, M1113
When PLC is RUN with transistor output card, M1112 and M1113 correspond to 2 points
transistors output TR1 and TR2 separately.
Pulse Output
with
Acceleration/
Deceleration

M1115~M1119
D1104
1. The definition of special D and special M which are used by pulse output with acceleration/
deceleration:
Device Function
M1115 Start switch for accel/decel pulse output
M1116 Flag that is used in acceleration
M1117 Target frequency attained flag
M1118 Flag that is used in deceleration
M1119 Complete function flag
D1104 Using parameter index (correspond to D component)
2. Corresponding table for parameter (frequency range is 25Hz~10KHz)
index Function
+0 Start frequency (SF)
+1 Gap frequency (GF)
+2 Target frequency (TF)
+3 Total number of pulse output number (lower 16-bit of 32-bit)
+4 Total number of pulse output number (upper 16-bit of 32-bit)
(TP)
+5 Output pulse number in acceleration area (lower 16-bit of 32-bit)
+6 Output pulse number in deceleration area (upper 16-bit of 32-bit)
(AP)
3. It doesnt need to use command, it just need to fill parameter chart and set M1115 to start.
This function can use Y0 output only, the timing is as following.
2 DVP-PLC Function
DVP-PLC Application Manual 2-62

GF
GP
TF
SF
AP AP
Frequency
Pulse number
Acceleration/Deceleration step number
= (TF-SF)/GF
Output pulse number for each step
AP/(Acceleration or Deceleration step number)
GP=
AP is pulse number of
acceleration/deceleration

4. Note:
This function should be executed under the following conditions all exist. Once a condition
doesnt exist, this function cant execute.
Start frequency must be less than target frequency.
Gap frequency must be less than (target frequency start frequency)
Total number of pulse number must be greater than (accel/decel pulse number *2)
Start frequency and target frequency: the minimum is 25Hz and the maximum is
10KHz.
Accel/decel pulse number must be more than accel/decel step number
When M1115 is from On to Off, M1119 will be cleared and M1116, M1117 and M1118 aren
unchanged. When PLC is from STOPRUN or from RUNSTOP, M1115~M1119 will be
cleared to Off. And D1104 will be cleared to 0 only when it is from OffOn.
If the function acceleration/deceleration pulse output and command PLSY Y0 output
exist at the same time, it will execute one action which starts Y0 output first.
5. How to calculate action time of each section
If start frequency is set to 1KHz, gap frequency is set to 1KHz, target frequency is set to
5KHz, total pulse number is 100 and accel/decel pulse number is 40, timing chart of
accel/decel area is in the following.
2 DVP-PLC Function
DVP-PLC Application Manual 2-63
5000
4000
3000
2000
1000
t t t t
1 2 3 4
Frequency (Hz)
Time (sec)

You can get accel/decel step = (5K 1K) / 1K = 4 and output number of each pulse is
40 / 4 = 10. Therefore, you can get t1 = (1 / 1K) * 10 = 10ms, t2 = (1 / 2K) * 10 = 5ms, t3
= (1 / 3K) * 10 = 3.33ms and t4 = (1 / 4K) * 10 = 2.5ms from the following figure.
Example: Forward/Reverse accel/decel step motor control
K500 MOV
M1002
D1104
K1000 MOV D500
K100 MOV D501
MOV D502
K80000 DMOV D503
K10000 DMOV D505
K10000
M1115 SET
Using D500-D506 to be parameter address
1KHz start frequency
100Hz gap frequency
10KHz target frequency
80000 pulses output
10000 pulses in acceleration/deceleration section
When PLC is RUN, it will save each parameter setting into the register that designated
by D1104.
When M1115=On, acceleration/deceleration pulse starts to output.
M1116=On during acceleration, M1117=On when speed attained, M1118=On in
deceleration and M1119=On after finishing executing.
M1115 wont be reset automatically and it needs to be cleared by user.
Actual pulse output curve is in the following:
2 DVP-PLC Function
DVP-PLC Application Manual 2-64

10K
1K
10000 90000 100000
Frequency (Hz)
Pulse
number

Special
High-speed
pulse output

M1133~M1135
D1133
1. For EP series, the definition of special D and special M for special high-speed pulse (50KHz)
output function:
Device Function
M1133 Special high-speed pulse (50KHz) output switch (On is start executing)
M1134 On is continuous output switch
M1135 Output pulse number attained flag
D1133 Index for special high-speed pulse output register (D)
2. Corresponding table for D1133 parameter
Index Function
+0 Special high-speed pulse output frequency (lower 16-bit of 32 bits)
+1 Special high-speed pulse output frequency (upper 16-bit of 32 bits)
+2 Special high-speed pulse output number (lower 16-bit of 32 bits)
+3 Special high-speed pulse output number (upper 16-bit of 32 bits)
+4
Display present special high-speed pulse output number (lower
16-bit of 32 bits)
+5
Display present special high-speed pulse output number (upper
16-bit of 32 bits)
3. Function explanation:
Output frequency and output numbers above can be modified when M1133=On and
M1135=Off. It wont affect present output pulse once output frequency or output target number
is changed. Present output pulse number will be displayed once a scan time update. It will be
cleared to 0 when M1133 is from OffOn and it will keep that last output number when M1133
is from OnOff.
2 DVP-PLC Function
DVP-PLC Application Manual 2-65
4. Note:
This special high-speed pulse output function can use special Y1 output point in RUN. It
can exist with PLSY Y1 at the same time and PLSY (Y0) wont be affected. If command PLSY
(Y1) is executed prior to this function, this function cant be used and vice versa. When
executing this function, general Y1 output will be invalid and outputs point of Y0 and Y2~Y7
can be used.
The difference between this function and command PLSY is higher than output frequency.
The maximum output can up to 50KHz.
Extension
Connected
Detection

D1139, D1140
D1142, D1143
D1145, D1146
1. D1139: connection number of BCD expansion module, the maximum is 2 connections to use
with KEY expansion module.
2. D1140: special expansion module (AD, DA, XA, PT, TC, RT, HC, PU) numbers, the
maximum is 8.
3. D1142: Digital expansion input X point number.
4. D1143: Digital expansion input Y point number.
5. D1145: connection number of KEY expansion module, the maximum is 2connects to use
with BCD expansion module.
6. D1146: connection number indication of DISP expansion module, the maximum is 3
connections.
BCD Module

D1139
D1381~D1384
1. For EH series, special D and special M definition of BCD module:
Device Function
D1139
connection number indication of BCD expansion module, the
maximum is 2 connections to use with KEY expansion module
D1381 Low byte of first BCD module
D1382 High byte of first BCD module
D1383 Low byte of second BCD module
D1384 High byte of second BCD module
2. Explanation:
PLC will update BCD module to read out BCD module value by each scan.
Special D above will be updated automatically when PLC is RUN.
The maximum number for a MPU is 2 connections, such as 2 KEY modules, a KEY
module and a BCD expansion unit or 2 BCD expansion units.
2 DVP-PLC Function
DVP-PLC Application Manual 2-66


3. BCD module external wiring terminal:


DIP Switch
W1
W2
W4
W8
D7 D6 D5 D4 D3 D2 D1 D0
4. BCD module wiring example:
D7 D6 D5 D0
W8
W4
W2
W1
DIP switch group
it needs to connect a diode in
series (1N4148 is recommended)
KEY Module

D1145
D1375~D1380
1. For EH series, the definition of special D and special M of KEY module:
Device Function
D1145
Connection number indication of KEY expansion module, the
maximum is 2 connections to use with BCD expansion module
D1375 X coordinate of the first KEY module (1~8)
D1376 Y coordinate of the first KEY module (1~8)
D1377 Button number of the first KEY module (1~64)
D1378 X coordinate of the second KEY module (1~8)
D1379 Y coordinate of the second KEY module (1~8)
D1380 Button number of the second KEY module (1~64)
2 DVP-PLC Function
DVP-PLC Application Manual 2-67

2. Explanation:
KEY module uses scan method to read data to PLC, it will just care the first button once
there are two more keys are pressed at the same time.
The maximum number for a MPU to connect is 2 connections, such as 2 KEY
modules, a KEY module and a BCD expansion unit or 2 BCD expansion units.
KEY module will be updated in each scan when PLC is RUN.
Calculated method of button number is: H+(V-1)*8. For coordinate (5,1) button, its
number is 5.
3. KEY module external wiring terminal:

H1H2
V
1
V
2
Matrix Keypad

4. KEY module wiring example:
1 2 3 4 5 6 7 8
9 10 11 12 13 14 15 16
17 18 19 20 21 22 23 24
25 26 27 28 29 30 31 32
33 34 35 36 37 38 39 40
41 42 43 44 45 46 47 48
49 50 51 52 53 54 55 56
57 58 59 60 61 62 63 64
1
(1,1) (2,1) (3,1) (4,1) (5,1) (6,1) (7,1) (8,1)
(1,1)
V
1
H
1
V
2
V
3
V
4
V
5
V
6
V
7
V
8
H
1
V
1
H
2
H
3
H
4
H
5
H
6
H
7
H
8
(1,2) (2,2) (3,2) (4,2) (5,2) (6,2) (7,2) (8,2)
(1,3) (2,3) (3,3) (4,3) (5,3) (6,3) (7,3) (8,3)
(1,4) (2,4) (3,4) (4,4) (5,4) (6,4) (7,4) (8,4)
(1,5) (2,5) (3,5) (4,5) (5,5) (6,5) (7,5) (8,5)
(1,6) (2,6) (3,6) (4,6) (5,6) (6,6) (7,6) (8,6)
(1,7) (2,7) (3,7) (4,7) (5,7) (6,7) (7,7) (8,7)
(1,8) (2,8) (3,8) (4,8) (5,8) (6,8) (7,8) (8,8)
Button number
D1377(D1380)
Button coordinate(x,y)
(D1375, D1376)
(D1378, D1379)

2 DVP-PLC Function
DVP-PLC Application Manual 2-68
DISP Module

D1146
D1385~D1393
1. For EH series, the definition of special D and special M definition of DISP module (7-segment
display):
Device Function
D1146
Connection number indication of DISP expansion module, the
maximum is 3 connections.
D1385 Low byte of first DISP module
D1386 High byte of first DISP module
D1387 The floating point and Pre-zero setting of the first DISP module
D1388 Low byte of the second DISP module
D1389 High byte of the second DISP module
D1390 The floating point and Pre-zero setting of the second DISP module
D1391 Low byte of the third DISP module
D1392 High byte of the third DISP module
D1393 The floating point and Pre-zero setting of the third DISP module
2. Explanation:
It needs to use common cathode 7-segment display.
The maximum DISP module expansion units that a PLC can connect are 3 DISP
module expansion units and each DISP module expansion unit has 8 7-segment
displays.
Each 7-segment display uses 4-BITS to display.
Dot setting: there are 8 7-segment displays on a 7-segment display expansion unit.
There is a dot in each 7-segment display and each dot setting can be filled in 1~8 to
display the dot of DISP1~DISP8. If the setting is out of range, no dot of 7-segment
display will light.
Pre-zero: this function is used to decide if it needs to display 0. It will check from the
left-most bit and display 0 after non-zero bit. For example: if the values of
DISP8~DISP1 are 0, 1, 2, 3, 4, 5, 6, 7, and the 0 of DISP8 wont be displayed.
First DISP D1385 D1386 D1387
BIT b12~b15 b8~b11 b4~b7 b0~b3 b12~b15 b8~b11 b4~b7 b0~b3 b15~b8 b7~b0
DISP number DISP4 DISP3 DISP2 DISP1 DISP8 DISP7 DISP6 DISP5
Pre-
zero
dot
The value of
STOP->RUN
F F F F F F F F 0 0

2 DVP-PLC Function
DVP-PLC Application Manual 2-69
3. DISP module external wiring terminal:

a
b
c
d
e
f
g
dot
D7
D
6
D
5
D
4
D
3
D
2
D
1
D
0
cathode 7-segment display (8-bit)
4. Example of DISP module wiring:
Common cathode 7-segment display circuit: the device from BCD to Common cathode
7-segment display.
Power Input
1. using external +24VDC to be driven
power of display module.
2. Using internal +24VDC to be driven
power of display module.
P
24VDC
OV
Short
circuit

P
24VDC
OV
24V
additional DC

Common cathode 7-segment display connection:
a
b
c
d
e
f
g
dot
7 D
6 D
5 D
4
D
3 D
2 D
1 D
0 D

2 DVP-PLC Function
DVP-PLC Application Manual 2-70
Adjustable Acceleration/
Deceleration Pulse
Output Function
Explanation

M1144~M1149,
M1154
D1032, D1033
D1144, D1154
D1155
1. For EP/SA series, the definition of special D and special M of adjustable accel/decel pulse
output function:
Device Function
M1144 Start switch of accel/decel pulse output
M1145 Flag that is used in acceleration
M1146 Target frequency attained flag
M1147 Flag that is used in deceleration
M1148 Completed function flag
M1149 stop counting temporarily flag
M1154 Start designated deceleration gap time flag and frequency flag
D1032 Lower 16-bit of 32-bit of Y1 pulse accumulative output numbers
D1033 Upper 16-bit of 32-bit of Y1 pulse accumulative output numbers
D1144 Using parameter index (correspond to D component)
D1154 Recommended value of designated deceleration gap time (10~32767 ms)
D1155 Recommended value of designated acceleration gap frequency (-1~ - 32700 Hz)
2. Corresponding table of parameter D1144
Index Function
+0 Total segment number (n) (the maximum number is 10)
+1 Present execution segment (read only)
+2 Start frequency of first segment (SF1)
+3 Interval time of first segment (GT1)
+4 Interval frequency of first segment (GF1)
+5 Target frequency of first segment (TF1)
+6 Lower 16-bit of 32-bit of target number of first segment output pulse
+7 Upper 16-bit of 32-bit of target number of first segment output pulse
+8 Start frequency of second segment (SF2)
+9 Interval time of second segment (GT2)
+10 Interval frequency of second segment (GF2)
+11 Target frequency of second segment (TF2)
+12 Lower 16-bit of 32-bit of target number of second segment output pulse
+13 Upper 16-bit of 32-bit of target number of second segment output pulse
: :
+n*6+2 Start frequency of nth segment (SFn)
+n*6+3 Interval time of nth segment (GTn)
+n*6+4 Interval frequency of nth segment (GFn)
+n*6+5 Target frequency of nth segment (TFn)
+n*6+6 Lower 16-bit of 32-bit of target number of nth segment output pulse
+n*6+7 Upper 16-bit of 32-bit of target number of nth segment output pulse
2 DVP-PLC Function
DVP-PLC Application Manual 2-71
3. Function Explanation:
This function can only be used for Y1 output point and the timing will be as follows. After
filling parameter table, set M1144 to start (it should be used in RUN mode)
SF2
TF2
SF3
TF3
TF4
SF4 TF1
SF1
GF
GT
GT
GF
Frequency(Hz)
Time(ms)
1st section
pulse number
(SE1)
2nd section
pulse number
(SE2)
3rd section
pulse number
(SE3)
4th section
pulse number
(SE4)

4. Usage rule and restriction:
The minimum frequency of start frequency and target frequency should be equal to or
greater than 200Hz. If it is less than 200Hz, it means finish executing or not to execute.
The maximum frequency of start frequency of target frequency is 32700Hz. It will
execute in 32700Hz as it is greater than 32700Hz.
The interval time range is 1~32767ms and its unit is ms.
The interval frequency range in acceleration segment is 1Hz~32700Hz and in
deceleration segment is -1~-32700Hz. If it is set to 0Hz, the executed segment cant be
up to target frequency, but it will tansfer to execute next segment after reaching target
number.
Target number of segment pulse output should be greater than ((GF*GT/1000)*
((TF-SF)/GF). Refer to example 1 for detail. Once Target number of segment pulse
output isnt greater than ((GF*GT/1000)* ((TF-SF)/GF), this function cant be used. The
improve method is to add interval time or add target number of pulse output.
If there is Y1 output designated by high-speed command in RUN mode, Y1 output
command will be started as high priority.



2 DVP-PLC Function
DVP-PLC Application Manual 2-72
After starting to execute M1144, if M1148 outputs without attaining completed function
flag and M1144 is closed, this function will start deceleration function. If designated
acceleration function flag M1154 is Off, it will reduce 200Hz per 200ms and stop output
pulse till output frequency is less than 200Hz and set M1147 to deceleration flag. But if
designated deceleration flag M1154 is On, it will be executed by interval time and
frequency that defined by user. And interval time cant be less than or equal to 0 (if it is
less than or equal to 0, factory setting will be set to 200ms). Interval frequency cant be
greater than or equal to 0 (factory setting will be set to -1KHz when it is equal to 0 and
factory setting will be added negative sign automatically when it is greater than 0.)
When M1148 attains completed function flag and M1144 is closed, this function wont
start deceleration function and it will clear M1148 flag. Once M1144 is closed, it will
clear M1149 flag.
The execution segment of this function will execute by total segment number. The
maximum segment is 10 segments.
The acceleration/deceleration of this function will execute by start frequency of the
next segment, i.e. when target frequency of execution segment is less than start
frequency of the next segment, the next segment is acceleration and the target
frequency of the next segment must be greater than start frequency of the next
segment. When target frequency of execution segment is greater than the next
segment frequency, the next segment is deceleration, therefore, target frequency of
the next segment must be less than start frequency of the next segment. If user cant
set it by this way, we cant ensure that you can get correct output pulse.
When STOPRUN, M1144~M1149 will be cleared to Off. When RUNSTOP, M1144
will be cleared and M1145~M1149 wont be cleared. D1144 will be cleared to 0 when it
is from OffOn and unchanged in other case.
The usage parameter range of EP/SA series is D0~D999 and D2000~D4999. It wont
execute this command and close M1144 if parameter is out of range (includes all
usage segment parameter).
5. Example 1: calculate output number of acceleration/deceleration of each segment and
target frequency
If setting start frequency of segment to 200Hz, segment interval time to 100ms, segment
gap frequency to 100Hz, segment target frequency to 500Hz and target number of segment
pulse is 1000 pulses. The calculation will be in the following:
Output pulse number at start acceleration/deceleration is 200*100/1000 = 20 pulses
Output pulse number of the first acceleration interval is 300*100/1000 = 30 pulses
Output pulse number of the second acceleration interval is 400*100/1000 = 40 pulses
Output pulse number of target frequency is 1000 (40+30+20) = 910 pulses
(NOTE: it is recommended to set this number to be greater than 10)
2 DVP-PLC Function
DVP-PLC Application Manual 2-73
Output time of target frequency is 1 / 500 * 910 = 1820 ms
Total time of this segment is 1820 + 3*100 = 2120 ms
6. Example 2: simple acceleration/deceleration pulse output program of a segment
acceleration and a segment deceleration
M1002
MOV K2 D200
MOV K200
MOV K250 D202
MOV K500 D203
MOV K250 D204
MOV D205
D206
MOV K750 D208
MOV K500 D209
MOV K-250 D210
MOV K250 D211
K200 D212
END
M0



7. Example 3: pulse output program of a segment acceleration/deceleration with direction
2 DVP-PLC Function
DVP-PLC Application Manual 2-74
TF1
TF2
TF2
TF1
SF2
SF2
SF1
SF1
X0=ON
Y7=OFF
Position
Zero point
Y7=On

Explanation:
Acceleration/deceleration setting is as example 2.
Figure above is the example of position movement. When X0 contact is On, it will start
to move and it will stop when X0 contact is Off. (Y7 is for direction setting)
Program is shown in the following.
M1002
RST M0
SET
END
RST M1
SET M0
ALT M1
Y7
RST
RST
X0
X0
M0
M1
M1
M1
M1148
M0
X0

8. Example 4: apply acceleration and deceleration of a segment to zero point return program.
Relative flag timing chart is shown in the following.
2 DVP-PLC Function
DVP-PLC Application Manual 2-75
M1149
M1148
M1144
X0
Stop returning to zero point
Stop pulse output
Acceleration for
returning to zero point
Deceleration for
returning to zero point

The relation between frequency and position are shown in the following.
Frequency(Hz)
Acceleration for
returning to zero point
Deceleration for
returning to zero point
zero point
Position

Number setting of acceleration/deceleration, frequency and pulse are shown in the
following. (correspond to component D)
Started number of D
+ index
Settings
+0 2
+2 250(Hz)
+3 100(ms)
+4 500(Hz)
+5 10000(Hz)
+6, +7 10(pulse)
+8 9750(Hz)
+9 50(ms)
+10 -500(Hz)
+11 250(Hz)
+12, +13 30000(pulse)
Program is shown in the following: (it assumes contact X7 to be start reset trigger switch)
2 DVP-PLC Function
DVP-PLC Application Manual 2-76
X7
SET
END
SET
X0
RST
X0
SET
RST

Explanation:
After contact X7 is triggered, M1144 will set to start acceleration and set M1149 not to
count pulse number. And it will send 10 pulses once deceleration switch X0 is
triggered and then enter deceleration segment.
To set M1148 to end pulse output by manual and close this function once X0 is closed.
Note: This example is just an application method that user should adjust parameters settings
used in acceleration/deceleration segment according to actual machine characteristics
and limitation.
Single Step
Execution
Function

M1170, M1171
D1170
1. The definition of special D and special M of EH series single step execution function
Device Function explanation
M1170 Start flag of single step function
M1171 Single step execution flag
D1170 STEP number of present PLC execution command
2. Function Explanation:
Execution time: this flag is valid when PLC is at RUN mode.
Action Steps:
A. Start M1170 to enter single step execution mode. PLC will stay at specific
command which the STEP is saved in D1170 and execute that command one
time.
B. When Forcing M1171 to be On, PLC will execute the next command and stop at
the next command, at the same time, PLC will force M1171 to be Off. D1170 will
display present STEP value.

2 DVP-PLC Function
DVP-PLC Application Manual 2-77

3. Note:
Those commands that will be affected by scan time will be incorrect due to single STEP
execution. Example: when HKY command is executed, it needs 8 scan time to get a valid input
value of a button. Thus, single step execution will have faults.
Some commands like Pulse input/output, high-speed comparison command, wont be
affected by single STEP due to hardware start.
2-phase Pulse
Output Function

M1172~M1174
D1172~D1177


1. For EP/SA series, the definition of special D and special M of 2-phase output function:
Device Function Explanation
M1172 2-phase pulse output switch
M1173 On is continuous output switch
M1174 Output pulse number attained flag
D1172 2-phase output frequency (12Hz~20KHz)
D1173 2-phase output mode selection (k1and k2)
D1174 Lower bit of 32-bit of 2-phase output pulse target number
D1175 Upper bit of 32-bit of 2-phase output pulse target number
D1176 Lower bit of 32-bit of 2-phase present output pulse number
D1177 Upper bit of 32-bit of 2-phase present output pulse number
2. Function Explanation:
Output frequency = 1/T as shown in the figure below. There are two output modes, k1 and
k2, k1 means A phase gets ahead of B phase and k2 means B phase gets ahead of A phase.
Output number calculation adds 1 once there is a phase difference, such as figure below, there
are 8 output pulses. When output numbers attains, M1174 will be On and if you want to clear
M1174, you should close M1172.
1 2 7 8
Y0(A)
Y1(B)
T





2 DVP-PLC Function
DVP-PLC Application Manual 2-78
Output frequency, output target number and mode selection can be modified when
M1172=On and M1174=Off. The modification of output frequency and output target number
wont affect present output pulse number but mode selection modification will clear present
output pulse number to 0. Present output pulse number will be updated once scan time
updates and it will clear to 0 when M1172 is from StopRun, and keep that last output number
when M1172 is from RunStop.
3. Note:
This function just can be used at RUN mode and can exist in program with PLSY
command. But if command PLSY is executed first, this function cant be used, and vice versa.
VR
Potentiometer

M1178~M1179
D1178~D1179
1. For EH/EP/SA series, the definition of special D and special M of built-in 2 points VR
potentiometer function:
Device Function
M1178 Start potentiometer VR0
M1179 Start potentiometer VR1
D1178 VR0 value
D1179 VR1 value
2. Function explanation:
This function only can be used at RUN mode. When M1178=On, the variational value of
VR 0 will be converted to digit 0~255 to save in D1178. When M1179=On, the variational value
of VR 1 will be converted to digit 0~255 to save in D1179.
3. Please refer to command API 85 VRRD for detail.
MODEM
Connection
Function

M1184~M1188
1. System connection
PC
WPLSoft is executing
DVP-EP/EH series MPU
DVP-F232 interface
MODEM
MODEM
telecommunication
network
2. EP/EH series special M definition for MODEM connection:
Device Function Explanation Remark
M1184 Start-up MODEM
When M1184=On, following actions
are valid.
M1185
Start-up MODEM
initialization
This flag will be Off after finishing
initialization.
M1186 Fail to initial MODEM When M1185=On, M1186=Off.
M1187 Succeed to initial MODEM When M1185=On, M1187=Off.
M1188
Display if MODEM is
connected or not
On means in connection
NOTE: special M is always valid no matter PLC is RUN or STOP.
2 DVP-PLC Function
DVP-PLC Application Manual 2-79
3. Operation: (Please operate by following steps)
(a) Setting M1184=On on PLC side (start-up MODEM)
(b) STEP 2: Setting M1185=On (start-up PLCs MODEM initialization)
(c) STEP 3: Check the result of MODEM initialization: M1186=On means succeed to
initial. M1187=On means fail to initial.
(d) STEP 4: After initialing successful, WPL software can be ready for connection on
remote PC side. WPL connection method: setting -> modem connection (you need to
install modems driver first) -> to get dial connection dialog box and then fill in dial
information as following.
4. Caution:
(a) It must use with RS-232 card when connecting MODEM on PLC side. If not, above
special M are invalid.
(b) You must set M1185=On to initial MODEM after MODEM start-up (M1184=On). If not,
it cant start-up MODEM auto dial function on PLC side.
(c) MODEM will enter auto dial mode after initialization.
(d) MODEM will enter to ready for dial mode on PLC side after remote PC stops
connection. If user turn MODEM power off now, it should need to initial at the next time
when turning on MODEM.
(e) MODEM connection baud rate on PLC side is fixed to 9600bps and cant be modified.
Besides, MODEM speed must be 9600bps and faster.
(f) The initial format that used to MODEM on PLC side are ATZ and ATS0=1.
Power Loss
Latched Range
Setting

D1200~D1219
1. For EH/EP/SA series to set latched range. The latched range will be from start address
number to end address number.
2. Please refer to chapter 2.1 for detail.
Input Point X
can force to be
ON/OFF

M1304
1. For EP/SA series, When M1304=On, input point X (X0-X17) of MPU can force to be On-Off
by using peripheral WPLSoft and HPP.
2. For EH series, When M1304=On, input point X of MPU can force to be On-Off by using
peripheral WPLSoft and HPP.
2 DVP-PLC Function
DVP-PLC Application Manual 2-80
Special
Extension
Module ID

D1320~D1327
For EH series, it will display expansion module ID in D1320~ D1327 by order when
connecting to special expansion module.
Special expansion module ID of EH series:
Expansion Module
Name
Expansion Module ID
Expansion Module
Name
Expansion Module ID
DVPEH04AD H0400 DVPEH01PU H0110
DVP04DA-H H0401 DVPEH01HC H0120
DVPEH04PT H0402 DVPEH02HC H0220
DVPEH04TC H0403 DVPEH01DT H0130
DVPEH06XA H0604 DVPEH02DT H0230
DVPEH06RT H0405
Easy PLC
Link

M1350-M1352
M1360-M1439
D1355-D1370
D1415-D1465
D1480-D1991
1. Explanation of Special D and special M explanation of EH series EASY PLC LINK ID1ID8:
MASTER PLC
SLAVE ID
1
SLAVE ID
2
SLAVE ID
3
SLAVE ID
4
SLAVE ID
5
SLAVE ID
6
SLAVE ID
7
SLAVE ID
8
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
D1480

D1495
D1496

D1511
D1512

D1527
D1528

D1543
D1544

D1559
D1560

D1575
D1576

D1591
D1592

D1607
D1608

D1623
D1624

D1639
D1640

D1655
D1656

D1671
D1672

D1687
D1688

D1703
D1704

D1719
D1720

D1735
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
D1434 D1450 D1435 D1451 D1436 D1452D1437 D1453 D1438 D1454 D1439 D1455 D1440 D1456 D1441 D1457
Device Communication Address
D1355 D1415 D1356 D1416 D1357 D1417 D1358 D1418 D1359 D1419 D1360 D1420 D1361 D1421 D1362 D1422
If there is LINK in SLAVE PLC
M1360 M1361 M1362 M1363 M1364 M1365 M1366 M1367
Action indication flag for master PLC do to slave PLC
M1376 M1377 M1378 M1379 M1380 M1381 M1382 M1383
Read/write error flag
M1392 M1393 M1394 M1395 M1396 M1397 M1398 M1399
Read completed flag (Whenever finishing a PLC read/write, this flag will be Off automatically)
M1408 M1409 M1410 M1411 M1412 M1413 M1414 M1415
Write completed flag (whenever finishing a PLC read/write, this flag will be Off automatically)
M1424 M1425 M1426 M1427 M1428 M1429 M1430 M1431

SLAVE ID
1
SLAVE ID
2
SLAVE ID
3
SLAVE ID
4
SLAVE ID
5
SLAVE ID
6
SLAVE ID
7
SLAVE ID
8
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
Factory setting of Communication address for reading is H1064 (D100).
Factory setting of Communication address for writing is H10C8 (D200).
2 DVP-PLC Function
DVP-PLC Application Manual 2-81
2. Explanation of Special D and special M explanation of EH series EASY PLC LINK ID9ID16:
MASTER PLC
SLAVE ID
9
SLAVE ID
10
SLAVE ID
11
SLAVE ID
12
SLAVE ID
13
SLAVE ID
14
SLAVE ID
15
SLAVE ID
16
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
D1736

D1751
D1752

D1767
D1768

D1783
D1784

D1799
D1800

D1815
D1816

D1831
D1832

D1847
D1848

D1863
D1864

D1879
D1880

D1895
D1896

D1911
D1912

D1927
D1928

D1943
D1944

D1959
D1960

D1975
D1976

D1991
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
Item
number
D1442 D1458 D1443 D1459 D1444 D1460 D1445 D1461 D1446 D1462 D1447 D1463 D1448 D1464 D1449 D1465
Device Communication Address
D1363 D1423 D1364 D1424 D1365 D1425 D1366 D1426 D1367 D1427 D1368 D1428 D1369 D1429 D1370 D1430
If there is LINK in SLAVE PLC
M1368 M1369 M1370 M1371 M1372 M1373 M1374 M1375
Action indication flag for master PLC do to slave PLC
M1384 M1385 M1386 M1387 M1388 M1389 M1390 M1391
Read/write error flag
M1400 M1401 M1402 M1403 M1404 M1405 M1406 M1407
Read completed flag (Whenever finishing a PLC read/write, this flag will be Off automatically)
M1416 M1417 M1418 M1419 M1420 M1421 M1422 M1423
Write completed flag (whenever finishing a PLC read/write, this flag will be Off automatically)
M1432 M1433 M1434 M1435 M1436 M1437 M1438 M1439

SLAVE ID
9
SLAVE ID
10
SLAVE ID
11
SLAVE ID
12
SLAVE ID
13
SLAVE ID
14
SLAVE ID
15
SLAVE ID
16
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
read
out
Write
in
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
D100

D115
D200

D215
Factory setting of Communication address for reading is H1064 (D100).
Factory setting of Communication address for writing is H10C8 (D200).
3. Explanation:
The basic communication protocol for EASY PLC LINK is MODBUS
When connecting to RS-485, the baud rate for all slave peripheral and communication
format should be the same as master PLC, such as set D1120 for PLC. When EP MPU
is used to be slave, only ASCII mode can be used. When EH MPU is used to be slave,
ASCII mode and RTU mode can be used.
All communication format used to connect to PLC should be the same (set D1120 for
PLC) and it supports ASCII and RTU mode.
2 DVP-PLC Function
DVP-PLC Application Manual 2-82
The maximum slave PLCs for a master PLC to connect is 16 slave PLCs.
The ID of slave PLC should be fixed to 1~16 and each slave ID cant be repeated.
RS-232, RS-485 and RS-422 can be used in one-to-one connection. When slave PLC
uses RS-232, only ASCII mode can be used and communicatioin format is (7, E, 1).
One to multiple connection can connect to RS-485 in series
4. Operation:
Setting Master PLC ID by D1121 and slave ID first. ID cant be repeated.
Setting read/write items of slave (the maximum is 16 items). (refer to special D for
detail)
Setting device communication address to read/write to slave. (refer to Special D
explanation above for special D setting. Factory setting of communication address for
reading is H1064 (D100) and writing is H10C8 (D200).
Setting PLC LINK automatically (M1351)
Setting PLC LINK manually (M1352)
Start MASTER PLC LINK (M1350)
5. Master PLC action explanation:
Slave ID detection: When M1350=On, Master PLC is started and then detect slave
number to record number in D1433.
You can see if there is slave PLC by M1360-M1375 which save slave ID 1-16
separately. On means exist.
If detection of slave PLC number is 0, M1350 will be Off and stop Link at the same
time. PLC will only detect slave PLC number only at start that M1350=On.
Read/write of master and slave PLC: After finishing detecting slave, master PLC will
read/write to each slave. The slave that master can do read/write is slave ID got after
detecting slave ID. Once slave PLC is added after detecting, master cant do read/write
to it till the next detection.
Master PLC will read first and the maximum range is 16 slave PLCs start from D100.
After reading, PLC will write and the maximum range is 16 slave PLCs start from D200.
Master PLC will read/write to slave PLC in order, i.e. it will read/write to the next slave
after finishing a slave.
6. Automatic/ Manual model explanation:
Automatic mode: it should set M1351 to Off. Master PLC will read/write to slave till
M1350 is Off.
2 DVP-PLC Function
DVP-PLC Application Manual 2-83
Manual mode: It needs to set times of read to D1431. One time means finish all Slave
read/write. When PLC starts Link, D1432 will start to count times of
Link. When D1431 = D1432, PLC will stop Link and force M1351 to be
Off at the same time. If M1351 is forced to be On, PLC will start to link
according to D1431 value automatically.

Caution:
1. Automation mode M1351 and manual mode M1352 cant be On at the same
time.
2. For EH modes, it need to clear M1350 first befor switching auto/manual
mode. For EP modes, it is unnecessary.
3. Please clear M1350 first before switching automation/manual mode.
4. Communication time-out can be set by D1129. The setting range is from 300
to 3000. When it is out of range, it will be regarded as 300 when it is less
than 300 and regarded as 3000 when it is larger than 3000. Besides, this
setting is valid when it is set before linking.
5. PLC LINK function is only valid when baud rate is larger than 1200 bps.
When baud rate is less than 9600 bps, please set communication time-out to
more than 1 second.
6. It wont communicate when write/read item is 0.
7. It doesnt allow 32-bit counter read/write in.

2 DVP-PLC Function
DVP-PLC Application Manual 2-84
2.12 Fault Code Information
If the PLC ERROR LED is flashing or special relay M1004=On after writing program in PLC, the problem may be
an invalid operand or error grammar. You can get fault code saved in special register D1004 to check in following
table to get error message and error address is saved in D1137. (D1137 will be invalid if it is general loop error)
Please refer to chapter 2.1 for each model usage range.
Fault Code Description Fault Code Description
0001
Operand bit device S exceeds the usage
range
0F06 SFTR misuse operand
0002
Label P exceeds the usage range or
duplicated
0F07 SFTL misuse operand
0003 Operand KnSm exceeds the usage range 0F08 REF misuse operand
0102
Interrupt pointer I exceeds the usage
range or duplicated
1000 ZRST misuse operand
0202 Command MC exceeds the usage range C400
An unrecognized command code is being
used
0302 Command MCR exceeds the usage range C401 Loop error
0401
Operand bit device X exceeds the usage
range
C402
LD / LDI continuously use more than 9
times
0403 Operand KnXm exceeds the usage range C403 MPS continuously use more than 9 times
0501
Operand bit device Y exceeds the usage
range
C404 FOR-NEXT exceeds 6 levels
0503 Operand KnYm exceeds the usage range C405
STL/RET used between FOR-NEXT
SRET/IRET used between FOR-NEXT
0601
Operand bit device T exceeds the usage
range

MC/MCR used between FOR-NEXT
END / FEND used between FOR-NEXT
0604
Operand word device T register usage
exceeds limit
C407 STL continuously use more than 9 times
0801
Operand bit device M exceeds the usage
range
C408
Use command MC/MCR in STL
Use I/P in STL
0803 Operand KnMm exceeds the usage range C409
Use STL/RET in subroutine
Use STL/RET in interrupt program
0D01 DECO misuse operand
0D02 ENCO misuse operand
C40A
Use MC/MCR in subroutine
Use MC/MCR in interrupt program
0D03 DHSCS misuse operand
0D04 DHSCR misuse operand
C40B
MC/MCR doesnt start from N0 or
discontinuously
0D05 PLSY misuse operand
0D06 PWM misuse operand
C40C
MC/MCR corresponding value N is
different
0D07 FROM/TO misuse operand C40D Use I/P incorrectly
0D08 PID misuse operand
0E01
Operand bit device C exceeds the usage
range
C40E
IRET doesnt follow by the last FEND
command
SRET doesnt follow by the last FEND
command
0E04
Operand word device C register usage
exceeds limit
0E05 DCNT misuse operand CXXX
C41C
The number of input/output points of I/O
expansion unit exceeds usage range
0E18 BCD conversion error
0E19 Division error (divisor=0)
C41D
Special expansion module exceeds usage
range
0E1A
Component exceeds usage range (include
E and F error)
C41E
Hardware setting of special expansion
module error
0E1B
It is negative number after radical
expression
C41F Data write in memory failure
0E1C FROM/TO communication error C4FF Invalid command (no this command)
0F04
Operand word device D register usage
exceeds limit
C4EE No END command in program
0F05 DCNT misuse operand DXXX

3 Basic Commands
DVP-PLC Application Manual 3-1
3.1 Summary of Basic Command and Step Ladder Command
Basic Commands
Execution speed (us)
Command
Code
Function Operands
ES/EX/SS/EP/SA EH
STEP Page
LD Load contact A X, Y, M, S, T, C 5.6 0.24(0.56) 1~3 3-3
LDI Load contact B X, Y, M, S, T, C 5.68 0.24(0.56) 1~3 3-3
AND Series connection with A contact X, Y, M, S, T, C 4.8 0.24(0.56) 1~3 3-3
ANI Series connection with B contact X, Y, M, S, T, C 4.88 0.24(0.56) 1~3 3-4
OR Parallel connection with A contact X, Y, M, S, T, C 4.8 0.24(0.56) 1~3 3-4
ORI Parallel connection with B contact X, Y, M, S, T, C 4.88 0.24(0.56) 1~3 3-5
ANB Series connects the circuit block None 4.4 0.24 1~3 3-5
ORB Parallel connects the circuit block None 4.4 0.24 1~3 3-5
MPS Save the operation result None 4.64 0.24 1~3 3-6
MRD
Read the operation result (the
pointer not moving)
None 4 0.24 1 3-6
MPP Read the result None 4.4 0.24 1 3-6
Output commands
Execution speed (us)
Command
Code
Function Operands
ES/EX/SS/EP/SA EH
STEP Page
OUT Drive coil Y, S, M 6.4 0.24(0.56) 1~3 3-7
SET Action latched (ON) Y, S, M 5.04 0.24(0.56) 1~3 3-7
RST Clear the contacts or the registers
Y, M, S, T, C, D,
E, F
7.6 0.24(0.56) 3 3-7
Timers, Counters
Execution speed (us)
API
Command
Code
Function Operands
ES/EX/SS/EP/SA EH
STEP Page
96 TMR 16-bit timer T-K or T-D 9.6 25 4 3-8
97 CNT 16-bit counter C-K or C-D16 bits 12.8 30 4 3-8
97 DCNT 32-bit counter C-K or C-D32 bits 14.32 50 6 3-9
Main control commands
Execution speed (us)
Command
Code
Function Operands
ES/EX/SS/EP/SA EH
STEP Page
MC Connect the common series connection contacts N0~N7 5.6 20 3 3-10
MCR
Disconnect the common series connection
contacts
N0~N7 5.76 15 3 3-10
3 Basic Commands
DVP-PLC Application Manual 3-2
Rising-edge/falling-edge detection commands of contact
Execution speed (us)
API
Command
Code
Function Operands
ES/EX/SS/EP/SA EH
STEP Page
90 LDP Rising-edge detection operation starts S, X, Y, M, T, C 8.16 0.56(0.88) 3 3-11
91 LDF Falling-edge detection operation starts S, X, Y, M, T, C 8.32 0.56(0.88) 3 3-11
92 ANDP Rising-edge detection series connection S, X, Y, M, T, C 7.68 0.56(0.88) 3 3-11
93 ANDF Falling-edge detection series connection S, X, Y, M, T, C 7.76 0.56(0.88) 3 3-12
94 ORP Rising-edge detection parallel connection S, X, Y, M, T, C 7.68 0.56(0.88) 3 3-12
95 ORF Falling-edge detection parallel connection S, X, Y, M, T, C 7.76 0.56(0.88) 3 3-13
Rising-edge/falling-edge output commands
Execution speed (us)
API
Command
Code
Function Operands
ES/EX/SS/EP/SA EH
STEP Page
89 PLS Rising-edge output Y, M 9.92 0.56(0.88) 3 3-13
99 PLF Falling-edge output Y, M 10.16 0.56(0.88) 3 3-13
End command
Execution speed (us)
Command Code Function Operands
ES/EX/SS/EP/SA EH
STEP Pa g e
END Program end none 7.44 0.24 1 3-14
Other commands
Execution speed (us)
API
Command
Code
Function Operands
ES/EX/SS/EP/SA EH
STEP Pa g e
NOP No function
none
3.52 0.16 1 3-14
98 INV Inverting operation none 3.92 0.24 1 3-15
P Pointer P0~P255 1 3-15
I Interrupt pointer
I
1 3-15
Step ladder commands
Command
Code
Function Operands STEP P a g e
STL Step transition ladder start command S 1 4-1
RET Step transition ladder return command none 1 4-1
Note: The value wrote in () in the column of execution speed of EH series is the execution speed of specific
operand M1536~M4095.
3 Basic Commands
DVP-PLC Application Manual 3-3
3.2 Basic Commands Explanations
Command Functions Adaptive model
ES/EX/SS EP/SA EH
LD Load A contact


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

The LD command 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. Function of the command is to save present
contents, and at the same time, save the acquired contact status into the accumulative
register.
Program
Example

Ladder Diagram:
X0 X1
Y1

Command Code:
LD X0
AND X1
OUT Y1
Command code explanation:
Load contact A of X0
Connect to contact A of X1 in
series
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
LDI Load B contact


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

The LDI command 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. Function of the command is to save present
contents, and at the same time, save the acquired contact status into the accumulative
register.
Program
Example

Ladder Diagram:
X0 X1
Y1
Command Code:
LDI X0
AND X1
OUT Y1
Command code explanation:
Load contact B of X0
Connect to contact A of X1 in series
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
AND Series connection-a contact


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


3 Basic Commands
DVP-PLC Application Manual 3-4
Command
Explanation

The AND command is used in the series connection of A contact. The function of the
command is to readout the status of present specific series connection contacts first,
and then to perform the AND calculation with the logic calculation result before the
contacts, thereafter, saving the result into the accumulative register.
Program
Example

Ladder Diagram:
X0 X1
Y1
Command Code:
LDI X1
AND X0
OUT Y1
Command code explanation:
Load contact B of X1
Connect to contact A of X0 in series
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
ANI Series connection-b contact


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

The ANI command is used in the series connection of B contact. The function of the
command is to readout the status of present specific series connection contacts first,
and then to perform the AND calculation with the logic calculation result before the
contacts, thereafter, saving the result into the accumulative register.
Program
Example

Ladder Diagram:
X0 X1
Y1

Command Code:
LD X1
ANI X0
OUT Y1
Command code explanation:
Load contact A of X1
Connect to contact B of X0 in
series
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
OR Parallel connection-a contact


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

The OR command is used in the parallel connection of A contact. The function of the
command is to readout the status of present specific series connection contacts, and
then to perform the OR calculation with the logic calculation result before the contacts,
thereafter, saving the result into the accumulative register.
Program
Example

Ladder Diagram:
X0
X1
Y1
Command Code:
LD X0
OR X1
OUT Y1
Command code explanation:
Load contact A of X0
Connect to contact A of X1 in
parallel
Drive Y1 coil

3 Basic Commands
DVP-PLC Application Manual 3-5
Command Functions Adaptive model
ES/EX/SS EP/SA EH
ORI Parallel connection-b contact


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

The ORI command is used in the parallel connection of B contact. The function of the
command is to readout the status of present specific series connection contacts, and
then to perform the OR calculation with the logic calculation result before the contacts,
thereafter, saving the result into the accumulative register.
Program
Example

Ladder Diagram:
X0
X1
Y1

Command Code:
LD X0
ORI X1
OUT Y1
Command code explanation:
Load contact A of X0
Connect to contact B of X1 in
parallel
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
ANB Series connection (Multiple Circuits)


Operand none

Command
Explanation

To perform the AND calculation between the previous reserved logic results and
contents of the accumulative register.
Program
Example

Ladder Diagram:
X0
X2
Y1
X1
X3
ANB
Block A Block B
Command Code:
LD X0
ORI X2
LDI X1
OR X3
ANB
OUT Y1
Command code explanation:
Load contact A of X0
Connect to contact B of X2 in
parallel
Load contact B of X1
Connect to contact A of X3 in
parallel
Connect circuit block in series
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
ORB Parallel connection (Multiple circuits)


Operand None

Command
Explanation

To perform the OR calculation between the previous reserved logic results and
contents of the accumulative register.
3 Basic Commands
DVP-PLC Application Manual 3-6
Program
Example

Ladder Diagram:
X0
X2
Y1
X1
X3
ORB
Block A
Block B
Command Code:
LD X0
ANI X1
LDI X2
AND X3
ORB
OUT Y1
Command code explanation:
Load contact A of X0
Connect to contact B of X1 in
series
Load contact B of X2
Connect to contact A of X3 in
series
Connect circuit block in parallel
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
MPS Store the operation result


Operand None

Command
Explanation

To save contents of the accumulative register into the operation result. (the result
operation pointer pulses 1)

Command Functions Adaptive model
ES/EX/SS EP EH
MRD Reads the operation result


Operand None

Command
Explanation

Reading content of the operation result to the accumulative register. (the pointer of
operation result doesnt move)

Command Functions Adaptive model
ES/EX/SS EP/SA EH
MPP Reads, then clears the operation result


Operand None

Command
Explanation

To retrieve the previous reserved logic calculation result from the operation result and
save it into the accumulative register. (the pointer of result operation minus 1)
Program
Example

Ladder Diagram:
X0
Y1
X1
M0
X2
Y2
END
MPP
MRD
MPS
Command Code:
LD X0
MPS
AND X1
OUT Y1
MRD
AND X2
OUT M0
MPP
OUT Y2
END
Command code explanation:
Load contact A of X0
Save to stack
Connect to contact A of X1 in
series
Drive M0 coil
Read from stack
Drive Y2 coil
Program end
3 Basic Commands
DVP-PLC Application Manual 3-7

Command Functions Adaptive model
ES/EX/SS EP/SA EH
OUT Output coil


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

Output the logic calculation result before the OUT command to specific device.
Motion of coil contact:
OUT command
Contact
Operation
result
Coil
A contact (normally open)
B contact (normally
close)
FALSE OFF Non-continuity Continuity
TRUE ON Continuity Non-continuity
Program
Example

Ladder Diagram:
X0 X1
Y1

Command Code:
LDI X0
AND X1
OUT Y1
Command code explanation:
Load contact B of X0
Connect to contact A of X1 in
series
Drive Y1 coil


Command Functions Adaptive model
ES/EX/SS EP/SA EH
SET
LatchON


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

When the SET command is driven, its specific device is set to be ON, which will keep
ON whether the SET command is still driven. You can use the RST command to set
the device to OFF.
Program
Example

Ladder Diagram:
X0 Y0
Y1 SET

Command Code:
LD X0
ANI Y0
SET Y1
Command code
explanation:
Load contact A of X0
Connect to contact B
of Y0 in series
Y1 latch (ON)

Command Functions Adaptive model
ES/EX/SS EP/SA EH
RST Clear the contact or the register


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999 E, F
Operand


3 Basic Commands
DVP-PLC Application Manual 3-8
Command
Explanation

When the RST command is driven, motion of its specific device is as follows:
Device Status
S, Y, M Coil and contact will be set to OFF.
T, C
Present values of the timer or counter will be set to 0, and the coil and
contact will be set to OFF.
D, E, F The content value will be set to 0.
If the RST command is not executed, status of specific device will not be changed.
Program
Example

Ladder Diagram:
X0
Y5 RST

Command Code:
LD X0
RST Y5
Command code
explanation:
Load contact A of X0
Clear contact Y5

Command Functions Adaptive model
ES/EX/SS EP/SA EH
TMR 16-bit timer


T-K T0~T255, K0~K32,767
Operand
T-D T0~T255, D0~D9,999

Command
Explanation

When TMR command is executed, the specific coil of timer is ON and timer will start to
count. When the setting value of timer is attained (counting value >= setting value), the
contact will be as following:
NO(Normally Open) contact Open collector
NC(Normally Closed) contact Close collector
Program
Example

Ladder Diagram:
X0
T5 TMR K1000

Command Code:
LD X0
TMR T5 K1000
Command code
explanation:
Load contact A of X0
T5 timer
Setting is K1000
Footnote

Please refer to the specification of every model for the operand T usage.

Command Functions Adaptive model
ES/EX/SS EP/SA EH
CNT 16-bit counter


C-K C0~C199, K0~K32,767
Operand
C-D C0~C199, D0~D9,999

3 Basic Commands
DVP-PLC Application Manual 3-9
Command
Explanation

When the CNT command is executed from OFFON, which means that the counter
coil is driven, and 1 should thus be added to the counters value; when the counter
achieved specific set value (value of counter = the setting value), motion of the contact
is as follows:
NO(Normally Open) contact Continuity
NC(Normally Closed) contact Non-continuity
If there is counting pulse input after counting is attained, the conatcts and the counting
values will be un unchanged. To re-count or to conduct the CLEAR motion, please use
the RST command.
Program
Example

Ladder Diagram:
X0
C20 CNT K100

Command Code:
LD X0
CNT C20 K100
Command code
explanation:
Load contact A of X0
C20 counter
Setting is K100

Command Functions Adaptive model
ES/EX/SS EP/SA EH
DCNT 32-bit counter


C-K C200~C254K-2,147,483,648~K2,147,483,647
Operand
C-D C200~C254, D0~D9,999

Command
Explanation

DCNT is the startup command for the 32-bit high-speed counter that is utilized
especially in counters C232 to C255.
For general addition/subtraction counter C200~C234, the present value will count up
(add 1) or count down (subtract 1) when command DCNT is from OffOn.
When specific high-speed counter pulse input of high-speed addition/subtraction
counters C235~C254 is from OffOn, it will execute counting. If counter trigger input
keeps being On or Off, the counter value will be unchanged. See chapter 2.7 timer
number and function for high-speed pulse input terminals (X0~X17) and counting
(count up (add 1) and count down (subtract 1)).
When DCNT command is OFF, the counter will stop counting, but the counting values
will not be cleared. Users can use RST C2XX command to remove the counting values
and the contacts. High-speed addition/subtraction counters C235~C254 can use
external specific input point to remove the counting values and the contacts.
Program
Example

LadderDiagram:
M0
C254 DCNT K1000
Command Code:
LD M0
DCNT C254 K1000

LD M0
DCNT C254 K1000
Command code
explanation:
Load contact A of
M0 and C254
counter
Setting is K1000


3 Basic Commands
DVP-PLC Application Manual 3-10
Command Functions Adaptive model
ES/EX/SS EP/SA EH
MC / MCR Master control Start/Reset command


Operand N0~N7

Command
Explanation

MC is the main-control start command. When the MC command is executed, the
execution of commands between MC and MCR will not be interrupted. When MC
command is OFF, the motion of the commands that between MC and MCR is described
as follows:
Timer
The counting value is set back to zero, the coil
and the contact are both turned OFF
Accumulative timer
The coil is OFF, and the timer value and the
contact stay at their present condition
Counter
The coil is OFF, and the counting value and the
contact stay at their present condition
Coils driven up by the OUT
command
All turned OFF
Devices driven up by the SET
and RST commands
Stay at present condition
Application commands All of them are not acted
MCR is the main-control ending command that is placed at the end of the main-control
program and there should not be any contact commands prior to the MCR command.
Commands of the MC-MCR main-control program supports the nest program structure,
with 8 layers as its greatest. Please use the commands in order from N0~ N7, and refer
to the following:
Program
Example

Ladder Diagram:
X0
Y0
MC N0
X1
X2
Y1
MC N1
X3
MCR N1
MCR N0
X10
MC N0
Y10
X11
MCR N0

Command Code Explanation
LD X0 Load A contact of X0
MC N0 Enable N0 common series
connection contact
LD X1 Load A contact of X1
OUT Y0 Drive Y0 coil
:
LD X2 Load A contact of X2
MC N1 Enable N1 common series
connection contact
LD X3 Load A contact of X3
OUT Y1 Drive Y1 coil
:
MCR N1 Disable N1 common series
connection contact
:
MCR N0 Disable N0 common series
connection contact
:
LD X10 Load A contact of X10
MC N0 Enable N0 common series
connection contact
LD X11 Load A contact of X11
OUT Y10 Drive Y10 coil
:
MCR N0 Disable N0 common series
connection contact
3 Basic Commands
DVP-PLC Application Manual 3-11

Command Functions Adaptive model
ES/EX/SS EP/SA EH
LDP Rising-edge detection operation


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

Usage of the LDP command is the same as the LD command, but the motion is
different. It is used to reserve present contents and at the same time, saving the
detection status of the acquired contact rising-edge into the accumulative register.
Program
Example

Ladder Diagram:
X0 X1
Y1

Command code:
LDP X0
AND X1
OUT Y1
Command code explanation:
Start X0 rising-edge
detection
Series connection A contact
of X1
Drive Y1 coil
Footnote

Please refer to the specification of every model for the operand usage.
If specific rising-edge contact state is On before PLC is power on, rising-dedge contact
will be True after PLC is power on.


Command Functions Adaptive model
ES/EX/SS EP/SA EH
LDF Falling-edge detection operation


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

Usage of the LDF command is the same as the LD command, but the motion is
different. It is used to reserve present contents and at the same time, saving the
detection status of the acquired contact falling-edge into the accumulative register.
Program
Example

Ladder Diagram:
X0 X1
Y1

Command code:
LDF X0
AND X1
OUT Y1
Command code
explanation:
Start X0 falling-edge
detection
Series connection A
contact of X1
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
ANDP Series connection command for the riding-edge detection operation


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


3 Basic Commands
DVP-PLC Application Manual 3-12
Command
Explanation

ANDP command is used in the series connection of the contacts rising-edge detection.
Program
Example

Ladder Diagram:
X1 X0
Y1

Command Code:
LD X0
ANDP X1
OUT Y1
Command code
explanation:
Load A contact of X0
X1 rising-edge detection in
series connection
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
ANDF Series connection command for the falling-edge detection operation


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

ANDF command is used in the series connection of the contacts falling-edge detection.
Program
Example

Ladder Diagram:
X1 X0
Y1

Command Code:
LD X0
ANDF X1
OUT Y1
Command code explanation:
Load A contact of X0
X1 falling-edge detection in
series connection
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
ORP Parallel connection command for the rising-edge detection operation


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

The ORP commands are used in the parallel connection of the contacts rising-edge
detection.
Program
Example

Ladder Diagram:
X0
X1
Y1

Command Code:
LD X0
ORP X1
OUT Y1
Command code
explanation:
Load A contact of X0
X1 rising-edge detection in
parallel connection
Drive Y1 coil







3 Basic Commands
DVP-PLC Application Manual 3-13
Command Functions Adaptive model
ES/EX/SS EP/SA EH
ORF Parallel connection command for the falling-edge detection operation


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

The ORP commands are used in the parallel connection of the contacts falling-edge
detection.
Program
Example

Ladder Diagram:
X0
X1
Y1

Command Code:
LD X0
ORF X1
OUT Y1
Command code
explanation:
Load A contact of X0
X1 falling-edge detection in
parallel connection
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
PLS Rising-edge output


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


Command
Explanation

When X0=OFFON (rising-edge trigger), PLS command will be executed and M0 will
send the pulse of one time which the length is a scan time.
Program
Example

Ladder Diagram:
X0
M0 PLS
M0
Y0 SET

Timing Diagram:
X0
M0
Y0
a scan time

Command Code:
LD X0
PLS M0
LD M0
SET Y0
Command code
explanation:
Load A contact of X0
M0 rising-edge output
Load the contact A of
M0
Y0 latched (ON)


Command Functions Adaptive model
ES/EX/SS EP/SA EH
PLF Falling-edge output


X0~X377 Y0~Y377 M0~M4,095 S0~S1,023 T0~T255 C0~C255 D0~D9,999
Operand


3 Basic Commands
DVP-PLC Application Manual 3-14
Command
Explanation

When X0= ONOFF (falling-edge trigger), PLF command will be executed and M0 will
send the pulse of one time which the length is the time for scan one time.
Program
Example

Ladder Diagram:
X0
M0 PLF
M0
Y0 SET

Timing Diagram:
a scan time
X0
M0
Y0

Command Code:
LD X0
PLF M0
LD M0
SET Y0
Command code
explanation:
Load A contact of X0
M0 falling-edge output
Load the contact A of
M0
Y0 latched (ON)


Command Functions Adaptive model
ES/EX/SS EP/SA EH
END Program End


Operand None

Command
Explanation

It needs to add the END command at the end of ladder diagram program or command
program. PLC will scan from address o to END command, after executing it will return
to address 0 to scan again.

Command Functions Adaptive model
ES/EX/SS EP/SA EH
NOP No operation


Operand none

Command
Explanation

This is a no-operation command and has no effect on the previous operation. NOP is
used in the following cases: To delete a command without changing the number of
steps. (Overwrite with NOP)
Program
Example

Ladder Diagram:
X0
Y1 NOP
Command NOP will be omitted
when ladder diagram displays.

Command Code:
LD X0
NOP
OUT Y1
Command code
explanation:
Load B contact of X0
No operation
Drive Y1 coil





3 Basic Commands
DVP-PLC Application Manual 3-15
Command Functions Adaptive model
ES/EX/SS EP/SA EH
INV Inverting Operation


Operand None

Command
Explanation

Inverting the operation result and use the new data as an operation result.
Program
Example

Ladder Diagram:
X0
Y1

Command Code:
LD X0
INV
OUT Y1
Command code
explanation:
Load A contact of X0
Inverting the operation
result
Drive Y1 coil

Command Functions Adaptive model
ES/EX/SS EP/SA EH
P Pointer


Operand P0~P255

Command
Explanation

Pointers are used with the jump commands (CJ, CALL) in two different ways as follows.
But a number cannot be used repeatedly.
Program
Example

Ladder Diagram:
X0
Y1
CJ P10
X1
P10

Command Code:
LD X0
CJ P10
:
P10
LD X1
OUT Y1
Command code
explanation:
Load A contact of X0
Jump from command CJ
to P10
Pointer P10
Load a contact of X1
Drive Y1 coil


Command Functions Adaptive model
ES/EX/SS EP/SA EH
I Interrupt Pointers (I)


Operand
I00, I10, I20, I30, I40, I50, I6, I7, I8
I010, I020, I030, I040, I050, I060, I110, I120, I130, I140

Command
Explanation

Interrupt programs should begin with interrupt pointer Iand ends with
application command to be as interrupt end and return. It must use with application
commands API 03 IRET, API 04 EI, API 05 DI.
3 Basic Commands
DVP-PLC Application Manual 3-16
Program
Example

Ladder Diagram:
Y1
EI
X1
I 001
DI
FEND
Y2
X2
IRET
range for inserting
program interrupt
program interrupt insert
into subroutine
interrupt
Service
program
pointer
Command Code: Command
code explanation:
EI Interrupt Enable
LD X1 Load A contact of X1
OUT Y1 Drive Y1 coil
:
DI Interrupt Disable
:
FEND Program end
I001 Insert point
LD X2 Load A contact of X2
OUT Y2 Drive Y2 coil
:
IRET Interrupt and return
Footnote

The number of interrupt pointer I of ES / EX / SS series:
There are four external interrupts (I001, X0), (I101, X1), (I201, X2) and (I301, X3).
The number of interrupt pointer I of EP series:
1. There are 6 external interrupt points: (I001, X0), (I101, X1), (I201, X2), (I301, X3),
(I401, X4) and (I501, X5). (1 means interrupt in rising-edge, 0 means interrupt
in falling-edge)
2. There are two time interrupt points: I6, I7. (10~99ms)
3. There are six high-speed counter attained interrupt points: I010 (use with C235,
C241, C244, C246, C247, C249, C251, C252, C254), I020(use with C236), I030 (use
with C237, C242), I040(use with C238), I050(use with C239), I060 (use with C240).
(use with command API 53 DHSCS to produce interrupt signal)
The number of interrupt pointer I of EH series:
1. There are six interrupt points of external interrupt: (I00, X0), (I10, X1), (I20,
X2), (I30, X3), (I40, X4), (I50, X5). (1 means interrupt in rising-edge, 0
means interrupt in falling-edge)
2. There are three time interrupt points: I6, I7, I8. (10~99ms)
3. There are six points of high-speed counter attained interrupt: I010, I020, I030, I040,
I050, I060. (use with API 53 DHSCS command to produce interrupt signal)
4. Pulse wave output interrupts I110, I120 (they are triggered at the end of pulse wave.
I130, I140 (they are triggered at the beginning of first pulse wave).


4 Step Ladder Commands
DVP-PLC Application Manual 4-1
4.1 Step Ladder Command [STL], [RET]
Common Function Operand Adaptive model
ES/EX/SS EP/SA EH
STL Step Transition Ladder Start Command S0~S1023


Command
Explanation

The step ladder command, STL Sn, has constituted the stepping point, and when the
STL command showed up in the program, it implies that the program is now at the step
ladder diagram condition that is controlled by the step procedure. The step ladder
command RET represents the end of the step ladder diagram (from S0~S9) that is to
return to the BUS command. The SFC diagram is represented through the step ladder
diagram composed of STL/RET. The number of step point S cant be repeated.

Common Function Operand Adaptive model
ES/EX/SS EP/SA EH
RET Step Transition Ladder Return Command None


Command
Explanation

At the end of the step procedure, be sure to write in the RET command; the RET
command indicates the end of the step procedure. Maximum is 10 step procedures
(S0~S9) for a PLC program and it should have RET command at the end of each step
procedure.
Program
Example

Ladder Diagram:
M1002
ZRST S0 S127
SET S0
SET S20
Y0
SET S30
Y1
SET S40
Y2
S0
RET
END
X0 S0
S
S20
S
X1
S30
S
X2
S40
S
X3

SFC:
S0
S20
S30
S40
S0
M1002
X0
X1
X2
X3
Y0
Y1
Y2

4.2 Sequential Function Chart (SFC)
In automatic control field, it often needs to cooperate with electric control and mechanical control to reach the
goal. SFC can be divided into several serial STEP (i.e. several phases). Each STEP should finish its actions. It
usually has transition to transfer from each step to the next step. That is the design concept of Sequential Function
Chart to have transition to end the action of the previous step and start the action of the next step (the previous step
will be clear at this time).
4 Step Ladder Commands
DVP-PLC Application Manual 4-2
Features:
1. You dont need to do SFC design for constant state step. PLC will execute the
action of interlock and double output between each state. It is only needed do
simple SFC design for each state and make machine works.
2. The action is easy to understand and easy to adjust initial PLC start-up, detect
and maintain.
3. SFC edition theory is made by IEC1131-3. It is figure edition mode and the
structure looks like flow chart. Each PLC internal step relay S is used to be step
point and also equal to each step of flow chart. After finishing present step, it
will transfer to the next step, i.e. next step point S, by setting condition. By
repeating this way, it can reach the result that user needs.
4. Explanation of right side SFC figure: each step has its own transition condition
to move from one step to the next step. In this figure, primary step point S0 will
move to step point S21 once this transition condition X0 is established, and
S21 can move to S22 or S24 by transition condition X1 or X2 and S25 will
move to S0 to finish a whole procedure once transition condition X6 is
established. By this way, it can circulate control with repeat again and again.
SFC:
S0
S21
S24
S25
S0
X0
X1
X5
X6
X2
S22
X4
X3
S24


It is used for ladder step mode. This figure means internal edition program is a general step
ladder diagram not step ladder program.

It is for primary step point. This double-frame is used for SFC primary step point and the usage
devices are S0~S9.

It is used for general step point and the usage devices are S10~S1023.

It is JUMP step point that used to move from step point to another which is not next to it. (it can
be used to disconnected jump up or jump down in the same program procedure, return to
primary step point or jump between different program procedure.

It is the transition condition of step point that used to move between each step point.

It is alternative divergence that used for a step point to move to different corresponding step
point by different transition condition.

It is alternative convergence that used for two step points and above to move to the same step
point according to transition condition.

It is simultaneous divergence that used for a step point move to two step points and above by the
same transition condition.

It is simultaneous convergence that used for two step points and above to move to the same step
point with the same transition condition when the condition is established at the same time.
4.3 Step Ladder Command Explanation
STL command: this command is used in the syntax design for the Sequential Function Chart (SFC). This
command helps the program designer to have clearer ideas on the program procedure, and thus the procedure will
be more readable. As shown in the following diagrams, we could switch our procedure diagram from the left
diagram to the right PLC structure diagram.

4 Step Ladder Commands
DVP-PLC Application Manual 4-3
At the end of the step procedure, be sure to write in the RET command; the RET command indicates the end of
the step procedure. Several step procedures could be written in to the same program, just make sure to write in the
RET command at the end of the step procedure. There is no limitation to the usage of the RET command, and this
command should match up with the usage of the step points (S0~S9).
If the RET command is not written in at the end of the step procedure, this error will be detected by the editing
device.
S0
S21
S22
S23
M1002
S0
SET
SET S22
S0
RET
S21
S
S22
S
SET
S21
S0
S
S23
S
SET S23
M1002
primary pulse

1. Step Ladder Action:
The step ladder is made up of numerous step points; each step point represents one control procedure action,
and each step point needs to execute following three missions:
A. drive output coil
B. specific transition condition
C. designate what step point is to be appointed to take over the control power of the present step point
Example:
SET Y1
Y0
SET S20
Y10
SET S30
S10
S
X0
S20
S
X1
SET Y1
Y0
SET S20
Y10
SET S30
S10
S
X0
S20
S
X1
When X0=ON,
S20=On,
S10=Off.

Explanation:
When S10=ON, Y0 and Y1 are ON. When X0=ON, S20=ON and Y10 is ON, too.
And when S10 is OFF, Y0 will be OFF, but Y1 is ON. (Since Y1 uses the SET command, it will keep in ON status)
2. Step ladder timing: when state contact Sn is On, circuit will be activated and circuit wont be activated when
state contact Sn is Off. (Above action will be executed after delaying a scan time)
3. The repeated usage of the output coil:
4 Step Ladder Commands
DVP-PLC Application Manual 4-4
1. Output coils of the same number could be used in different
step points.
2. Such as right diagram, there is the same output device
Y0 in the different state. No matter S10 or S20 is On, Y0
will be On.
3. Y0 will be close during the transition from S10 to S20 and
output Y0 after S20 is On. Thus in this case, Y0 will be
On no matter S10 or S20 is On.
4. For general ladder diagrams, repeated usages of the
output coils should be avoided. Output coil number used
in step point should be avoided to use after returning to
general ladder diagram.
SET Y1
Y0
SET S20
SET S30
S10
S
X0
S20
S
X1
Y0

4. Repeated usage of the timer:
Same as general output points, the timer could be used
repeatedly for different step points. (this is one feature of step
ladder diagram, but for general ladder diagrams, repeated
usages of the output coils should be avoided. Output coil
number used in step point should be avoided to use after
returning to general ladder diagram.)
Note: as right diagram, ES/EX/SS/EP/SA series timer only
used repeatedly in disconnected step point.
S20
S30
S40
X1
X2
TMR T1 K10
TMR T2 K20
TMR T1 K30

5. Transfer of the step point:
SET Sn and OUT Sn commands are both used to start (or to transfer to) another step point, and the occasions to
use these commands could be different: when the controlling power is transferred to another step point, the status of
the original step point S and the action of the output point would all be erased. Due to that numerous step control
procedures could exist at the same program simultaneously (take S0~S9 as the starting and ending points to lead the
step ladder diagram), the transfer of steps could thus be on the same step procedure or could be transferred to
different step procedures. And thus, the transfer commands, SET Sn and OUT Sn, of the step point might vary
somewhat in usage; please refer to the following explanations:
SET Sn
Within the same procedure,
it is used to drive up the next
status step point, and after
the status is transferred,
outputs of previous action
status points will be clear.
Y10
SET S12
SET S14
S10
S
X0
S12
S
X1
Y11
When executing ET S12?
status step point moves from
S12 to S10 and clear S10 and
all outputs (Y10).

OUT Sn
Within the same procedure, transfer of the simultaneous convergence point and different procedures
are used to drive up separate step points, and after the status is transferred, outputs of previous action
status points will be clear.
4 Step Ladder Commands
DVP-PLC Application Manual 4-5

Within the same
procedure, it is used to
return to primary step
point.
Within the same
procedure, it is used for
the step points to jump
up or down between
disconnected step point.
SFC diagram: Ladder diagram:
S0
S21
S24
S25
X7
X2
OUT
OUT
S24
S21
S
S0
S
S23
S
X2
S24
S
S25
S
S0
X7
RET
Drive jump step point
return to primary step point
S25 uses OUT to return
to primary step point S0
Using OUT S24
Using OUT S0

At different procedures, it
is used to drive up
separate step points.
SFC figure: ladder diagram:
S0
S21
S23
X2
OUT
OUT
S1
S41
S43
OUT
S42
S42
S21
S
S0
S
S1
S
X2
S42
S
S43
S
RET
S23
S
RET
Drive separate
step point
step procedure
inducted by S0
step procedure
inducted by S1
Using OUT S42
S0 and S1 two different step procedures
S23 return to primary step point
S0 by using OUT
S43 return to primary step point
S1 by using OUT
6. Notice of Driving Output Points:
As in the following left diagram, after the LD or LDI command is written in the second line of BUS beyond the step
point, output coil cant be connected from BUS directly. There will be error when compiling. It is needed to modify to
following middle and left diagram to correct diagram.
Y0
S
S
Y1
Y2
M0
n
Y0
S
S
Y2
Y1
n
M0
Y0
S
S
Y1
Y2
M0
n
M1000
BUS
modify position
or
normally open contact
in RUN mode
7. Usage restrictions for partial commands:
Program of every step point is identical to the general ladder diagram, and every kind of series and parallel
connection circuits or application commands could all be utilized, however, part of the commands are under certain
restrictions, please refer to the following descriptions:
4 Step Ladder Commands
DVP-PLC Application Manual 4-6
Basic commands that are to be used within the step point
Basic command


Step point
LD/LDI/LDP/LDF
AND/ANI/ANDP/ANDF
OR/ORI/ORP/ORF
INV/OUT/SET/RST
ANB/ORB
MPS/MRD/MPP
MC/MCR
Primary step point/ General step point Yes Yes No
General output Yes Yes No Diverging step point/
Converging step point Step point transfer Yes No No
MC/MCR commands are not to be used within the step point.
The STL command could not be used in general sub-programs and the interruption service sub-program.
Use of the CJ command is not prohibited within the STL command, however, it will complicate the action and
should thus be avoided.
MPS/MRD/MPP command position:
Step Ladder Diagram:
Y1
S
S
M0
Y2
X2
n
X3
X1 X0
MPP
MRD
MPS
BUS
LD X0

Command code:
STL Sn
LD X0
MPS
AND X1
OUT Y1
MRD
AND X2
OUT M0
MPP
AND X3
OUT Y2
Explanation:
The BUS of step point cant use
commands MPS / MRD / MPP
directly. It needs to use command
LD or LDI before using
commands MPS / MRD / MPP.
8. Other Notice:
For general, commands (SET S or OUT S) that used to transfer to next state are better to use after finishing
all relative outputs and actions.
In the following figure, they are the same after executing by PLC. If there are many conditions or actions in S10, it
is recommended to execute SET S20 after modifying from left figure to right figure and finishing all relative outputs
and actions. In this way, the procedure is clear and easy to maintain.
SET
Y0
S10
S
S20
S
Y2
S20
Y1 SET
Y0
S10
S
S20
S
Y2
S20
Y1


4 Step Ladder Commands
DVP-PLC Application Manual 4-7
It is needed to add RET command after finishing step
ladder program and RET command is also needed to add
after STL as shown in right figure.
S0
S20
S
RET
X1
S0
S20
S
RET
X1

4.4 Reminder of Design on the Step Ladder Program
1. The step point up front in SFC is called the primary step point, S0~S9. Utilize the primary step point to be the start
of the procedure, and use the RET command as the end to construct a complete procedure.
2. If the STL command is not in use, S could be served as general auxiliary relay.
3. The number for the step point, S, could not be used repeatedly.
4. Categories of procedures:
Single procedure: there is only a procedure in a program (the alternative diverge and converge, the simultaneous
diverge and converge arent included)
Complicated single procedure: there is only a procedure in a program and it includes alternative diverge,
alternative converge procedures, Simultaneous diverge and simultaneous converge procedures.
Combination procedure: there are numerous single procedures in a program and maximum is 10 (S0~S9)
procedures.
5. Procedure separation: it is allowed to write in numerous procedures within one step ladder diagram
There are two single procedures S0 and S1 at the right
diagram; procedure of the program is to write in S0 ~S30 first,
and then S1~S43.
Either one step point on the procedure could jump to any one
specified step point on other procedures.
Once the condition below S21 at the right diagram is held, it
could jump to the specified S42 step point on the S1 procedure;
this motion is called the separate step point.
S0
S21
S30
OUT
OUT
S1
S41
S43
OUT
S42

6. Restrictions on the diverging procedure: (See following examples)
A. Up to 8 diverging step points could be used within a diverging procedure.
B. Up to 16 loops could be used in the combination of plural diverging or simultaneous converging procedures.
C. Either one step point on the procedure could jump to any one specified step point on other procedures.
7. Reset of the step point and the output prohibition:
A. Use the ZRST command to Reset a section f step points to be OFF.
4 Step Ladder Commands
DVP-PLC Application Manual 4-8
B. Use the output Y prohibition of PLC (M1034=ON).
8. Retaining step point:
When PLC encountered power failure, the retaining step point will memorize the ON/OFF status, and go on
with the execution before the power failure after the power is turned back on. S0~S127 are currently the retaining
step points.
9. Special auxiliary relay and special register: refer to chapter 4.6 IST command for detail.
Device Description
M1040 Step transition inhibits. When M1040 is On, all movement of step point are inhibited.
M1041 Step transition start. Flag for IST command.
M1042 Start pulse. Flag for IST command.
M1043 Origin reset completed. Flag for IST command.
M1044 Origin condition. Flag for IST command.
M1045 All outputs clear inhibit. Flag for IST command.
M1046 STL state setting. Once there is a step point On, M1046 is On.
M1047 STL monitor enable
D1040 ON state number 1 of step point S
D1041 ON state number 2 of step point S
D1042 ON state number 3 of step point S
D1043 ON state number 4 of step point S
D1044 ON state number 5 of step point S
D1045 ON state number 6 of step point S
D1046 ON state number 7 of step point S
D1047 ON state number 8 of step point S
4.5 Categories of Procedures
A. Single procedure: the basic step action is single procedure control action.
The first step point of step ladder diagram is called primary step point and the number is S0~S9. Those step points
after primary step point are called general step point and the number are S10~S1023. S10~S19 will be used as origin
reset step points once use command IST.
A-1 Single Procedure without Divergence and Convergence
After finishing a procedure, transferring control power of step point to primary step point.
4 Step Ladder Commands
DVP-PLC Application Manual 4-9
M1002
ZRST S0 S127
SET S0
SET S20
Y0
SET S30
Y1
SET S40
Y4
S0
RET
END
X0 S0
S
S20
S
X1
S30
S
X2
S60
S
X5
Y2
SET S50
S40
S
X3
Y3
SET S60
S50
S
X4
Step Ladder Diagram

S0
S20
S30
S40
S0
M1002
X0
X1
X2
X5
Y0
Y1
Y2
SFC diagram
S50
X3
Y3
S60
X4
Y4


4 Step Ladder Commands
DVP-PLC Application Manual 4-10
A-2 JUMP Procedure
1. Transfer control power of step
point to upper certain step
point.
2. Transfer control power of step
point to step point of other
procedure.
S0
S21
S42
S43
OUT
OUT

S0
S21
S41
OUT
OUT
S1
S41
S43
OUT
S42

A-3 Reset Procedure
At the right diagram, S50 will Reset itself and end the
procedure when condition is held.
S0
S21
S50
RST

B. Complicated single procedure: it includes alternative diverge, alternative converge procedures,
Simultaneous diverge and simultaneous converge procedures.
B-1 Structure of simultaneous divergence
The situation that transfers to many states when present condition is held is called structure of simultaneous
divergence as shown in following. When X0=On, S20 will transfer to S21, S22, S23 and S24 at the same time.
Ladder diagram of simultaneous divergence:
4 Step Ladder Commands
DVP-PLC Application Manual 4-11
X0
SET
SET S22
S21
S
SET S23
S20
SET S24

SFC diagram of simultaneous divergence:
S20
S21 S22 S23 S24

B-2 Structure of the alternative divergence
The situation that transfers to individual state when individual condition of present state is held is called structure of
alternative divergence as shown in following. S20 will transfer to S30 when X0=On, S20 will transfer to S31 when
X1=On and S20 will transfer to S32 when X2=On.
Ladder diagram of alternative divergence:

X0
SET
SET S31
S30
S
SET S32
S20
X1
X2

SFC diagram of alternative divergence:
S20
S30 S31 S32
X0 X1 X2

B-3 Structure of the simultaneous convergence
The situation that transfers to next state when continuous states are held at the same time is called simultaneous
convergence.
4 Step Ladder Commands
DVP-PLC Application Manual 4-12
Ladder diagram of simultaneous convergence:
X2
SET S50
S
S40
S
S41
S
S42

SFC diagram of simultaneous convergence:
S40
S50
S41 S42
X2

B-4 Structure of the alternative convergence
The following ladder diagram is alternative convergence. That means it will transfer to S60 once one of S30, S40 and
S50 is held.
Ladder diagram of alternative convergence:
X0
SET
SET S60
S60
S
SET S60
S30
X1
X2
S
S40
S
S50


SFC diagram of alternative convergence:
S30
S60
S40 S50
X0 X1 X2

4 Step Ladder Commands
DVP-PLC Application Manual 4-13
Example of the alternative divergence and alternative convergence procedures
M1002
ZRST S0 S127
SET S1
SET S20
Y0
SET S30
Y1
SET S40
Y2
END
X0 S1
S
S20
S
X1
S30
S
X2
S40
S
X3
SET S31
X4
SET S32
X7
SET S50
Y3
S31
S
X5
SET S41
Y4
S41
S
X6
SET S50
Y5
S32
S
X10
SET S42
Y6
S42
S
X11
SET S50
S50
S
T1
SET S60
TMR T1 K10
Y7
S60
S
X12
RET
S1

S1
S20
S30
S40
S1
M1002
X0
X1
X2
X12
Y0
Y1
Y2
S50
X3
S60
T1
Y7
S31
S41
X4
X5
Y3
Y4
X6
TMR T1 K10
S32
S42
X7
X10
Y5
Y6
X11

4 Step Ladder Commands
DVP-PLC Application Manual 4-14
Example of the simultaneous divergence and simultaneous convergence procedures
M1002
ZRST S0 S127
SET S3
SET S20
Y0
SET S30
Y1
SET S40
Y2
END
X0 S3
S
S20
S
X1
S30
S
X2
S40
S
SET S31
SET S32
Y3
S31
S
X3
SET S41
Y4
S41
S
Y5
S32
S
X4
SET S42
Y6
S42
S
X5
SET S50
S50
S
T1
SET S60
TMR T1 K10
Y7
S60
S
X6
RET
S3
S40
S
S41
S
S42
S
S3
S20
S30
S40
S3
M1002
X0
X1
X2
X6
Y0
Y1
Y2
S50
X5
S60
T1
Y7
S31
S41
X3
Y3
Y4
TMR T1 K10
S32
S42
X4
Y5
Y6

4 Step Ladder Commands
DVP-PLC Application Manual 4-15
Example of the simultaneous divergence and alternative convergence procedures
S127
K10
M1002
ZRST S0
SET S4
SET S20
Y0
SET S30
Y1
SET S40
Y2
END
X0 S4
S
S20
S
X1
S30
S
X2
S40
S
X3
SET S31
SET S32
SET S50
Y3
S31
S
X4
SET S41
Y4
S41
S
X5
SET S50
Y5
S32
S
X6
SET S42
Y6
S42
S
X7
SET S50
S50
S
T1
SET S60
TMR T1
Y7
S60
S
X6
RET
S4

S4
S20
S30
S40
S4
M1002
X0
X1
X2
Y0
Y1
Y2
S50
X3
S60
T1
Y7
S31
S41
X4
Y3
Y4
TMR T1 K10
S32
S42
X6
Y5
Y6
X5 X7
4 Step Ladder Commands
DVP-PLC Application Manual 4-16
Combination example 1: (includes the alternative divergence and convergence, the simultaneous divergence
and convergence)
S127
M1002
ZRST S0
SET S0
Y1
SET S30
Y2
SET S40
Y3
S
X1
S30
S
X4
S31
S
X5
SET S31
SET S32
SET S40
Y5
S40
S
X7
SET S50
Y7
S50
S
X11
SET S60
Y13
S60
S
SET S51
X2
X3
S20
Y0
SET S20
S
X0
S0
END
Y10
S51
S
X12
SET S61
S61
S
X15
SET S70
Y14
Y17
S70
S
X17
RET
S0
S60
S
S61
S
Y4
S32
S
X6
SET S41
Y6
S41
S
X10
SET S52
SET S53
Y12
S63
S
X14
SET S63
Y15
S62
S
Y16
S63
S
X16
S0
S62
S
S63
S
Y11
S52
S
X13
SET S62


S0
S20
S30
S40
S0
M1002
X0
X1
X4
X17
Y1
Y2
Y5
S50
X7
S70 Y17
S51
S61
X12
Y10
Y14
S52
S62
X13
Y11
Y15
X11
X15
S60 Y13
Y0
Y7
S31 Y3
X5
X2
S32 Y4
X6
X3
S41 Y6
X10
X16
S53
S63
Y12
Y16
X14
S0

4 Step Ladder Commands
DVP-PLC Application Manual 4-17
Combination example 2: (includes the alternative divergence and convergence, the simultaneous divergence
and convergence)
S127
M1002
ZRST S0
SET S0
SET S30
Y0
SET S31
Y1
SET S33
Y2
END
X0 S0
S
S30
S
X1
S31
S
X2
S32
S
X3
SET S32
SET S33
Y3
S33
S
X4
SET S34
Y4
S34
S
X5
SET S35
Y6
S36
S
X6
SET S37
Y7
S37
S
S0
S35
S
RET
X1
SET S36
Y5
S35
S
X7 S37
S

S0
S30
S31
S33
M1002
X0
X1
X2
Y0
Y1
Y3
S34
X4
S36
S37
X6
Y6
Y7
X5
S35 Y5
Y4
S32 Y2
X3
X1
S0
X7

Restrictions on the divergence procedure:
1. Up to 8 divergence step points could be used in a divergence procedure. In following diagram, maximum
divergence step points after step point S20 are 8 (S30 - S37).
2. Up to 16 loops could be used in the combination of plural divergence or simultaneous convergence procedures. In
following diagram, 4 step points after step point S40, 7 step points after step point S41 and 5 step points after step
point S42. In this procedure, maximum is 16 loops.
3. Either one step point on the procedure could jump to any one specified step point on other procedures.
Y26 S60
X26
X41
S0
S20
S30
S40
S0
M1002
X0
X1
X11
X51
Y0
Y1
Y11
S50
X20
S80 Y41
S51
S71
X33
Y15
Y33
S53
S73
X35
Y17
Y35
X32
X44
S70 Y32
Y14
S31 Y2
X12
X2
S32 Y4
X15
X4
S41 Y12
X21
X52
S54 Y20
S0
SET
S32 Y3
X14
X3
S52
S72
X34
Y16
Y34
S0
SET
X13
S20
OUT
S20
OUT
S81
X45
Y42
SET
S34 Y5
X15
X5
S35
X15
X6
S55
S74
X36
X22
X46
Y27 S61
X27
X42
Y30 S62
X30
Y31 S63
X31
Y40 S76
X43
X50
Y6 S36
X16
X7
Y7
Y21
Y36
S56 Y22 S57 Y23 S20
X23
OUT
RST
S36
Y10
Y13
Y25
Y37
S58
X37
X24
Y24
RST
S58
S37
S42
S59
S75
X40
X47
X10
X17
X25
SET
S0 OUT
S42

4 Step Ladder Commands
DVP-PLC Application Manual 4-18
4.6 IST command
API

Applicable models
ES/EX/SS EP/SA EH
60


I ST


Manual/Auto Control


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
1

D
2

Note: Operand S will occupy 8 continuous devices.
The usage range of operand D
1
and

D
2
is S20~S899 and
D
2
D
1.

IST command only can be used one time in program.
Refer to each model specification for usage range.

16-bit command (7 STEPS)
IST
Continuous
execution


32-bit command

Flag: M1040~M1047.
Refer to following for detail.

Command
Explanation

: The starting input number of specific operation mode. : The smallest
number for the specific status step point under the auto mode. : The greatest
number for the specific status step point under the auto mode.
The IST is a convenient command made specifically for the initial state of the step
ladder control procedure to accommodate the special auxiliary relay to the convenient
auto control command.
M1000
IST X10 S20 S60


X10: Individual operation (Manual operation)
X11: Zero point return
X12: Step operation
X13: One cycle operation
X14: Continuous operation
X15: Zero point return start switch
X16: Start switch
X17: Stop switch
When the IST command is executed, the following special auxiliary relay will switch
automatically.
M1040: Movement inhibited
M1041: Movement start
M1042: Status pulse
M1047: STL monitor enable
S0: Manual operation/initial state step point
S1: Zero point return/initial state step point
S2: Auto operation/initial state step point
Program
Example
1


When IST command is used, S10~S19 are for zero point return operation and the step
point of this state cant be used as general step point. However, when using S0~S9 step
points, S0 initiates manual operation, S1 initiates zero point return operation and S2
initiates auto operation. Thus, there should be three circuits of these three initial state
step points first written in program.
When switching to S1 (zero point return mode), zero point return wont have any actions
once one of S10~S19 is On.
When switching to S2 (auto operation mode), auto operation wont have any actions
once one of between to is On or M1043=On
4 Step Ladder Commands
DVP-PLC Application Manual 4-19
Program
Example
2

Example: the Robot arm control (use IST command):
Motion request: In the example, two kinds of balls (big and small) are separated and
moved to different boxes. Distribute the control panel for the control.
Motion of the Robot arm: lower robot arm, collect balls, raise robot arm, shift to right,
lower robot arm, release balls, raise robot arm, shift to left to finish motion in order.
I/O Device:
Y0
Y1
Y2 Y3
Left-limit X1
Upper-li mi t X4
Upper-li mi t X5
Right-li mi t X2
(bi g bal ls)
Right-li mi t X3
(small bal ls)
Big Small Big/smal l
sensor X0


Control panel
X15
X16
X17
X20
X21
X22
X23
X24
X25
Step X12
One cycle
operation X13
Continuous
operation X14
Manual
operation X10
Zero return X11
Power start
Power stop
Zero return Auto start
Auto stop
Shi ft
to right
Shi ft
to left
Rel ease
balls
Col lect
balls
Lower
robot arm
Rai se
robot arm

Big/small sensor X0.
The left-limit of the robot arm X1, the right-limit X2 (big balls), the right-limit X3
(small balls), the upper-limit X4, and the lower-limit X5.
Raise robot arm Y0, lower robot arm Y1, shift to right Y2, shift to left Y3, and
collect balls Y4.
START circuit:
M1000
IST X10 S20 S80
X0
M1044
X1 Y4

4 Step Ladder Commands
DVP-PLC Application Manual 4-20

Manual operation mode:
X20
SET
RST Y4
Y4
S
S0
X21
X22 Y1
Y0
X23 Y0
Y1
X24 X4
Y2
Y3
X25 X4
Y3
Y2
Collect balls
Release balls
Lower robot arm
Raise robot arm
Condition interlock
Shift to right
Shift to left
Condition interlock
Raise robot arm to the
upper-limit (X4 is ON)

Zero point return mode:
SFC figure:
S1
S10
X15
S11
X4
S12
X1
RST Y4
RST Y1
Y0
RST Y2
Y3
SET M1043
RST S12
Release balls
Stop lowering robot arm
Raise robot arm to the
upper-limit (X4 is ON)
Stop shifting to right
Shift to left and shift to
the left-limit (X1 is On)
Start zero return completed flag
Zero return operation completed

4 Step Ladder Commands
DVP-PLC Application Manual 4-21

Ladder Diagram:
X15
SET S10
S
S1
RST Y4
S
S10
RST Y1
Y0
X4
SET S11
RST Y2
S
S11
Y3
X1
SET S12
SET M1043
S
S12
RST S12
Enter zero return operation mode
Release balls
Stop lowering robot arm
Raise robot arm to the
upper-limit (X4 is ON)
Stop shifting to right
Shift to left and shift to
the left-limit (X1 is On)
Start zero return completed flag
Zero return operation completed

Auto operation (step/one-cycle/continuous operation modes):
SFC figure:
S2
S20
S30
S31
M1044
X5
T0
Y1
SET
Y0
S32
X4
X2
S50 Y1
Y2
S2
X1
M1041
X0
Y4
TMR T0 K30
S60 RST
X5
Y4
TMR T2 K30
S70
T2
Y0
S80
X4
Y3
X1
S40
S41
X5
T1
SET
Y0
S42
X4
X3
Y2
X0
Y4
TMR T1 K30
X3 X2

4 Step Ladder Commands
DVP-PLC Application Manual 4-22

Ladder Diagram:
SET S20
SET S30
SET Y4
Y0
END
X5
S31
S
X4
TMR T0
SET S32
S2
S
M1041 M1044
S20
S
S30
S
Y1
X0
SET S40
X5 X0
SET S31
T0
K30
Y2
S32
S
X2
SET S50
X2
SET Y4
TMR T1
S40
S
SET S41
T1
K30
Y0
S41
S
X4
SET S42
Y2
S42
S
X3
SET S50
X3
Y1
S50
S
X5
SET S60
RST Y4
TMR T2
S60
S
SET S70
T2
K30
Y0
S70
S
X4
SET S80
Y3
S80
S
X1
X1
RET
S2
Enter auto operation mode
Collect balls
Release balls
Lower robot arm
Shift to right
Raise robot arm to the
upper-limit (X4 is ON)
Shift to left and shift to
the left-limit (X1 is On)
Collect balls
Raise robot arm to the
upper-limit (X4 is ON)
Shift to right
Lower robot arm
Raise robot arm to the
upper-limit (X4 is ON)


5 Application Commands
DVP-PLC Application Manual 5-1
5.1 Summary of Parameters
Mnemonic Codes Applicable models STEPS
Classification
API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
00 CJ Conditional jump 3 6-1
01 CALL Call subroutine 3 6-5
02 SRET Subroutine return 1 6-5
03 IRET Interrupt return 1 6-7
04 EI Enable interrupts 1 6-7
05 DI Disable interrupts 1 6-7
06 FEND First end 1 6-11
07 WDT Watchdog timer refresh 1 6-12
08 FOR Start of FOR-NEXT loop 3 6-14
L
o
o
p

C
o
n
t
r
o
l

09 NEXT End of FOR-NEXT loop 1 6-14
10 CMP DCMP Compare 7 13 6-17
11 ZCP DZCP Zone compare 9 17 6-18
12 MOV DMOV Data Move 5 9 6-19
13 SMOV Shift move 11 6-20
14 CML DCML Compliment 5 9 6-22
15 BMOV Block move 7 6-23
16 FMOV DFMOV Fill move 7 13 6-24
17 XCH DXCH Data exchange 5 9 6-25
18 BCD DBCD Convert BIN data into BCD 5 9 6-26
T
r
a
n
s
m
i
s
s
i
o
n

C
o
m
p
a
r
i
s
o
n


19 BIN DBIN Convert BCD data into BIN 5 9 6-27
20 ADD DADD Perform the addition of BIN data 7 13 6-29
21 SUB DSUB
Perform the subtraction of BIN
data
7 13 6-30
22 MUL DMUL
Perform the multiplication of BIN
data
7 13 6-31
23 DIV DDIV Perform the division of BIN data 7 13 6-32
24 INC DINC Perform the addition of 1 3 5 6-34
25 DEC DDEC Perform the subtraction of 1 3 5 6-34
26 WAND DAND
Perform the logical product
(AND) operation
7 13 6-35
27 WOR DOR
Perform the logical sum (OR)
operation
7 13 6-36
28 WXOR DXOR
Perform the exclusive logical add
(XOR) operation
7 13 6-37
F
o
u
r

F
u
n
d
a
m
e
n
t
a
l

O
p
e
r
a
t
i
o
n
s

o
f

A
r
i
t
h
m
e
t
i
c

29 NEG DNEG Negation 3 5 6-38
30 ROR DROR Rotate to the right 5 9 6-41
31 ROL DROL Rotate to the left 5 9 6-42
32 RCR DRCR
Rotate to the right with the carry
flag attached
5 9 6-43
33 RCL DRCL
Rotate to the left with the carry
flag attached
5 9 6-44
34 SFTR
Shift the data of device specified
to the right
9 6-45
35 SFTL
Shift the data of device specified
to the left
9 6-46
36 WSFR Shift the register to the right 9 6-47
37 WSFL Shift the register to the left 9 6-48
38 SFWR Shift register write 7 6-49
R
o
t
a
t
i
o
n

a
n
d

D
i
s
p
l
a
c
e
m
e
n
t

39 SFRD Shift register read 7 6-50
40 ZRST
Resets a range of device
specified
5 6-51

41 DECO 8 256 bits decoder 7 6-53
5 Application Commands
DVP-PLC Application Manual 5-2
Mnemonic Codes Applicable models STEPS
Classification
API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
42 ENCO 256 8 bits encoder 7 6-54
43 SUM DSUM Sum of ON bits 5 9 6-56
44 BON DBON Check specified bit status 7 13 6-56
45 MEAN DMEAN Mean value 7 13 6-57
46 ANS Alarm device output 7 6-58
47 ANR Alarm device reset 1 6-58
48 SQR DSQR Square root of BIN 5 9 6-60
D
a
t
a

O
p
e
r
a
t
i
o
n

49 FLT DFLT
Convert BIN integer to binary
floating point
5 9 6-61
50 REF I/O refresh 5 7-1
51 REFF
Refresh and adjust the response
time of input filter
3 7-2
52 MTR Input matrix 9 7-3
53 DHSCS
High speed counter comparison
SET
13 7-6
54 DHSCR
High speed counter comparison
RESET
13 7-15
55 DHSZ
Zone comparison (High-speed
counter)
17 7-17
56 SPD Speed detection 7 7-24
57 PLSY DPLSY Pulse output 7 13 7-25
58 PWM Pulse width modulation output 7 7-30
H
i
g
h

S
p
e
e
d

P
r
o
c
e
s
s
i
n
g

59 PLSR DPLSR
Pulse wave output with
acceleration/deceleration speed
9 17 7-31
60 IST Manual/Auto control 7 7-36
61 SER DSER Search a data stack 9 17 7-42
62 ABSD DABSD Absolute drum sequencer 9 17 7-43
63 INCD Increment drum sequencer 9 7-44
64 TTMR Teaching timer 5 7-46
65 STMR Special timer 7 7-48
66 ALT On/Off alternate command 3 7-49
67 RAMP Ramp signal 9 7-50
C
o
n
v
e
n
i
e
n
c
e

C
o
m
m
a
n
d


69 SORT Data sort 11 7-52
70 TKY DTKY 10-key keypad input 7 13 7-54
71 HKY DHKY 16-key keypad input 9 17 7-56
72 DSW Digital Switch input 9 7-58
73 SEGD Decode the 7-step display panel 5 7-60
74 SEGL 7-step display scan output 7 7-61
75 ARWS Arrow keypad input 9 7-65
76 ASC ASCII code conversion 11 7-66
77 PR Print 5 7-67
78 FROM DFROM Read special module CR data 9 17 7-69
E
x
t
e
r
n
a
l

I
/
O

D
i
s
p
l
a
y

79 TO DTO Special module CR data write in 9 17 7-69
80 RS Serial data communication 9 7-74
81 PRUN DPRUN
Octal number system
transmission
5 9 7-87
82 ASCII Convert HEX to ASCII 7 7-88
83 HEX Convert ASCII to HEX 7 7-92
84 CCD Check code 7 7-95
85 VRRD Potentiometer read 5 7-97
S
e
r
i
a
l

I
/
O

86 VRSC Potentiometer scale 5 7-99
87 ABS DABS Absolute value 3 5 7-100

88 PID DPID PID calculation 9 7-100
5 Application Commands
DVP-PLC Application Manual 5-3
Mnemonic Codes Applicable models STEPS
Classification
API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
89 PLS Rising-edge output 3 3-13
90 LDP Rising-edge detection operation 3 3-11
91 LDF Falling-edge detection operation 3 3-11
92 ANDP
Series connection command for
the rising-edge detection
operation
3 3-11
93 ANDF
Series connection command for
the falling-edge detection
operation
3 3-12
94 ORP
Parallel connection command for
the rising-edge detection
operation
3 3-12
95 ORF
Parallel connection command for
the falling-edge detection
operation
3 3-13
96 TMR Timer 4 3-8
97 CNT DCNT Counter 4 6 3-8
98 INV Inverting operation 1 3-15
B
a
s
i
c

C
o
m
m
a
n
d

99 PLF Falling-edge output 3 3-13
100 MODRD MODBUS data Read 7 8-1
101 MODWR MODBUS data write in 7 8-5
102 FWD
VFD-A series drive forward
command
7 8-8
103 REV
VFD-A series drive reverse
command
7 8-9
104 STOP
VFD-A series drive stop
command
7 8-9
105 RDST VFD-A series drive status read 5 8-11
106 RSTEF
VFD-A series drive abnormal
reset
5 8-13
107 LRC LRC error check 7 8-13 C
o
m
m
u
n
i
c
a
t
i
o
n

c
o
m
m
a
n
d

o
f

D
e
l
t
a

A
C

M
o
t
o
r

D
r
i
v
e
s

108 CRC CRC error check 7 8-15

109 SWRD Digital switch read 3 8-18
110 DECMP Binary floating point comparison 13 8-19
111 DEZCP
Binary floating point zone
comparison
17 8-20
116 DRAD Degree Radian 9 8-21
117 DDEG Radian Degree 9 8-21
118 DEBCD
Convert binary floating point to
decimal floating point
9 8-23
119 DEBIN
Convert decimal floating point to
binary floating point
9 8-23
120 DEADD Binary floating point addition 13 8-24
121 DESUB Binary floating point subtraction 13 8-25
122 DEMUL
Binary floating point
multiplication
13 8-26
123 DEDIV Binary floating point division 13 8-27
124 DEXP
Perform exponent operation of
binary floating point
9 8-28
F
l
o
a
t
i
n
g

O
p
e
r
a
t
i
o
n

125 DLN
Perform natural logarithm
operation of binary floating point
9 8-29
126 DLOG
Perform logarithm operation of
binary floating point
13 8-30

127 DESQR
Square root of binary floating
point
9 8-31
5 Application Commands
DVP-PLC Application Manual 5-4
Mnemonic Codes Applicable models STEPS
Classification
API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
128 DPOW
Perform power operation of
binary floating point
13 8-32
129 INT DINT
Convert binary floating point to
BIN integer
5 9 8-33
130 DSIN
Sine operation of binary floating
point
9 8-34
131 DCOS
Cosine operation of binary
floating point
9 8-36
132 DTAN
Tangent operation of binary
floating point
9 8-37
133 DASIN
Arcsine operation of binary
floating point
9 8-39
134 DACOS
Arccosine operation of binary
floating point
9 8-40
135 DATAN
Arctangent operation of binary
floating point
9 8-41
136 DSINH
Hyperbolic sine operation of
binary floating point
9 8-42
137 DCOSH
Hyperbolic cosine operation of
binary floating point
9 8-42
F
l
o
a
t
i
n
g

O
p
e
r
a
t
i
o
n

138 DTANH
Hyperbolic tangent operation of
binary floating point
9 8-43
144 GPWM
General pulse width modulation
output
7 8-44
145 FTC Fuzzy temperature control 9 8-45
147 SWAP DSWAP Swap high/low byte 3 5 8-48
148 MEMR DMEMR Data backup MEMORY read 7 13 8-49
149 MEMW DMEMW Data backup MEMORY write in 7 13 8-50
150 MODRW MODBUS data read/write in 11 9-1
151 PWD Input pulse width detection 5 9-11
152 RTMU
Start to measure the execution
time of I interrupt
5 9-11 A
d
d
i
t
i
o
n
a
l

C
o
m
m
a
n
d

153 RTMD
End to measure the execution
time of I interrupt
3 9-12
154 RAND Random value 9 9-13
155 ABSR DABSR ABS current value read 7 13 9-14
156 ZRN DZRN Zero point return 9 17 9-18
157 PLSV DPLSV Variable speed pulse output 7 13 9-21
158 DRVI DDRVI Drive to increment 9 17 9-22 P
o
s
i
t
i
o
n
i
n
g

C
o
n
t
r
o
l

159 DRVA DDRVA Drive to absolute 9 17 9-26
160 TCMP Time compare 11 9-35
161 TZCP Time zone compare 9 9-36
162 TADD Time addition 7 9-37
163 TSUB Time subtraction 7 9-38
166 TRD Time data read 3 9-40
167 TWR Time data write in 3 9-42
P
e
r
p
e
t
u
a
l

C
a
l
e
n
d
a
r

169 HOUR DHOUR Hour meter 7 13 9-44
170 GRY DGRY Convert BIN to Gray code 5 9 9-44
G
r
a
y

C
o
d
e

171 GBIN DGBIN Convert Gray code to BIN 5 9 9-45
180 MAND Matrix AND 9 9-47
181 MOR Matrix OR 9 9-49
182 MXOR Matrix XOR 9 9-50
183 MNOR Matrix NOR 9 9-51

184 MINV Matrix inverse 7 9-52
5 Application Commands
DVP-PLC Application Manual 5-5
Mnemonic Codes Applicable models STEPS
Classification
API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
185 MCMP Matrix compare 9 9-52
186 MBRD Matrix bit read 7 9-54
187 MBWR Matrix bit write 7 9-55
188 MBS Matrix bit shift 7 9-56
189 MBR Matrix bit rotate 7 9-58
M
a
t
r
i
x

H
a
n
d
l
i
n
g

190 MBC Matrix bit state count 7 9-59
196 HST DHST High speed counter 3 9-60
197 PLST DPLST
Multi-frequency variable pulse
output
9 9 6-8
198 PLSK DPLSK
Multi-frequency fixed pulse
output
9 9 6-9
H
i
g
h
-
l
e
v
e
l

C
o
m
m
a
n
d


199 PLSA DPLSA Multi-step pulse slope output 11 11 6-10
215 LD& DLD&
Comparison contact is ON when
S1 & S2 is true
5 9 10-1
216 LD| DLD|
Comparison contact is ON when
S1 | S2 is true
5 9 10-1
217 LD^ DLD^
Comparison contact is ON when
S1 ^ S2 is true
5 9 10-1
218 AND& DAND&
Comparison contact is ON when
S1 & S2 is true
5 9 10-2
219 AND| DAND|
Comparison contact is ON when
S1 | S2 is true
5 9 10-2
220 AND^ DAND^
Comparison contact is ON when
S1 ^ S2 is true
5 9 10-2
221 OR& DOR&
Comparison contact is ON when
S1 & S2 is true
5 9 10-3
222 OR| DOR|
Comparison contact is ON when
S1 | S2 is true
5 9 10-3
C
o
n
t
a
c
t

T
y
p
e

L
o
g
i
c

O
p
e
r
a
t
i
o
n

223 OR^ DOR^
Comparison contact is ON when
S1 ^ S2 is true
5 9 10-3
224 LD= DLD=
Comparison contact is ON when
S1 = S2 is true
5 9 10-4
225 LD> DLD>
Comparison contact is ON when
S1 > S2 is true
5 9 10-4
226 LD< DLD<
Comparison contact is ON when
S1 < S2 is true
5 9 10-4
228 LD<> DLD<>
Comparison contact is ON when
S1 S2 is true
5 9 10-4
229 LD<= DLD<=
Comparison contact is ON when
S1 S2 is true
5 9 10-4
230 LD>= DLD>=
Comparison contact is ON when
S1 S2 is true
5 9 10-4
232 AND= DAND=
Comparison contact is ON when
S1 = S2 is true
5 9 10-5
233 AND> DAND>
Comparison contact is ON when
S1 > S2 is true
5 9 10-5
234 AND< DAND<
Comparison contact is ON when
S1 < S2 is true
5 9 10-5
236 AND<> DAND<>
Comparison contact is ON when
S1 S2 is true
5 9 10-5
237 AND<= DAND<=
Comparison contact is ON when
S1 S2 is true
5 9 10-5
238 AND>= DAND>=
Comparison contact is ON when
S1 S2 is true
5 9 10-5
C
o
n
t
a
c
t

T
y
p
e

C
o
m
p
a
r
e

C
o
m
m
a
n
d


240 OR= DOR=
Comparison contact is ON when
S1 = S2 is true
5 9 10-6
5 Application Commands
DVP-PLC Application Manual 5-6
Mnemonic Codes Applicable models STEPS
Classification
API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
241 OR> DOR>
Comparison contact is ON when
S1 > S2 is true
5 9 10-6
242 OR< DOR<
Comparison contact is ON when
S1 < S2 is true
5 9 10-6
244 OR<> DOR<>
Comparison contact is ON when
S1 S2 is true
5 9 10-6
245 OR<= DOR<=
Comparison contact is ON when
S1 S2 is true
5 9 10-6

246 OR>= DOR>=
Comparison contact is ON when
S1 S2 is true
5 9 10-6
Note 1: Applicable models ES series above includes EX and SS series; EP includes SA series.
Note 2: Above commands for ES/EX/SS models dont possess pulse execution command (P command).
5 Application Commands
DVP-PLC Application Manual 5-7
5.2 Application Command Structure
Many commands may be divided into an command and a operand as follows:
Command : Indicates the executive functions of the command
Operand : Indicates the device that calculates the operand

A command usually allows one step to be used and an operand usually allows two or four steps to be used
based on the command is a 16-bit or 32-bit command.
Explanation of the format of application command:
41 P
DECO
8 to 256 bit Encoder
API
ES/EX/SS EP EH
S
D
n
X Y M S K H T C D E F
1
9
11
S D n
15
14
13
12
2 3 4 5 6 7
8
10
Applicable models
Bit device Word device
16-bit command (7 STEPS)
DECO
Continuous
execution
DECOP
Pulse
execution
32-bit command
Flag: None
Note: When D is a bit device, n=1~8
When D is a word device, n=1~4

Please refer the general specifications of each series
models to see the usage range of each device.

API number for application command

Upper row indicates 16-bit command. If the border of the row is dotted line, it means it is not available
in 16-bit command.
Lower row indicates 32-bit command. If the border of the row is dotted line, it means it is not available
in 32-bit command. A D is added to the head of the mnemonic code to indicate 32-bit command. (For
example: API 12 DMOV)

The mnemonic code of application command

A symbol in the upper row indicates the command is generally applied by using pulse
execution command.
A P in the lower row indicates the command is used with the pulse execution command. (For
example: API 12 MOVP)

The operand format of application command

The description of application command function

Applicable models of DVP series PLC

The step numbers occupied by the command in 16-bit operation, the name of continuous execution
command and pulse executive command

The step numbers occupied by the command in 32-bit operation, the name of continuous execution
command and pulse execution command

The related flag of the application command

A symbol is the device can use index register.

Note

A symbol is given to device which can be used for this operand

Device name

Device type
5 Application Commands
DVP-PLC Application Manual 5-8
Application Commands Input
Some application commands are only combined by command codes API, but most of them are combined by
command codes API and several operands.
The application commands of DVP-Series PLC are controlled by command codes API 00 to API 246. Each
command code has its own meaning, for example, API 12 stands for MOV (move data). When using ladder
diagram editor to input programs, you will need to type in the command MOV. If using the HPP to input the
program, we will have to enter the API command codes. Each application command has its unique operand.
X0
MOV K10 D10
command operand

This command is to move the value of operand to the appointed operand.
Source operand: if there is more than 1 source operand, then we use , to display.
Destination operand: if there is more than one operand, then we use , . to display.
If the operand may only be represented as a constant K, H or register then we will use , , ,
, , to display.
The Length of Operand (16-bit or 32-bit command)
The length of operand can be divided into two groups: 16-bit and 32-bit to process different length data.
A D before a command separates 32-bit from 16-bit commands.
16-bit MOV command
X0
MOV K10 D10

When X0=On, K10 has been sent to D10.
32-bit DMOV command
X1
D10 D20
When X1=On, Data of (D11, D10) have been
sent to (D21, D20)
Continuous execution command and Pulse execution command
The execution type of command can be divided into two types: continuous execution command and pulse
execution command. Due to the execution time is shorter when the commands have not been executived,
please use the pulse execution command as far as possible to reduce the scan cycle of programming. A P to
be added directly after the command, which is pulse execution commands. Most used commands usually
5 Application Commands
DVP-PLC Application Manual 5-9
use pulse execution commands for application, for example, INC, DEC and MOV etc. related commands.
Therefore, pulse execution commands are identified by the symbol on the right top of the command.
Pulse execution command
X0
D10 D12

When X0 goes from OFFON, the MOVP command
will be executed one time and command cannot be
re-executed again in the scan of program scan. This
is called pulse execution command.
Continuous execution command
X1
MOV D10 D12

When X1=ON, the MOV command can be
re-executed again in every scan of program. This is
called continuous execution command.
The above figures show that when X0, X1=OFF, the command will not be executed and the contents of
the destination operand D will retmain unchanged.
The Assigned Devices of Operands
1. Bit device such as X, Y, M, S can be combined together and are defined as the WORD device. In
application commands, the bit device can serve as the word device (KnX, KnY, KnM, KnS) to store the
numeric values to operate.
2. Data register D, Timer T, Counter C and Index Register E, F are all assigned devices of operands.
3. A data register is usually a 16-bit register and it is also a register D. Hence, assigning a 32-bit register also
means assigning two register D with continuous numbers.
4. If the operand of 32-bit command assign D0, the 32-bit data register which is combined by D1 and D0 will
be occupied. D1 is the upper 16-bit and D0 is the lower 16-bit. The using rule of timer T and 16-bit
Counter(C0~C199) is the same.
5. When the 32-bit counter(C200~C255) is used as Data register, one point indicates 32-bit length. Only the
operand of 32-bit command can be assigned, the operand of 16-bit command can not be assigned.
Operand Data format
1. X, Y, M, S are only be single point ON/OFF, these are defined as a bit device.
2. However, 16-bit (or 32-bit) device T, C, D, E, F are data registers and are defined as Word device.
3. We also can add Kn in front of X, Y, M and S to be defined as word device, whereas n=1 means 4-bit. So
16-bit can be described from K1 to K4, and 32-bit can be described from K1 to K8. For example, K2M0
means there are 8-bit from M0 to M7.

5 Application Commands
DVP-PLC Application Manual 5-10
X0
MOV K2M0 D10

When X0=On, move the contents of M0 to M7 to D10
segments 0 to 7, and segments 8 to 15 are set to 0.
Specified Number of Digits
16-bit command 32-bit command
Specified Number of Digits (16-bit command):
K-32,768~K+32,767


Specified Number of Digits (32-bit command):
K-2,147,483,648~K+2,147,483,647
16-bit command: (K1~K4) 32-bit command: (K1~K8)
K1 (4 points) 0~15 K1 (4 points) 0~15
K2 (8 points) 0~255 K2 (8 points) 0~255
K3 (12 points) 0~4,095 K3 (12 points) 0~4,095
K4 (16 points) -32,768~+32,767 K4 (16 points) 0~65,535
K5 (20 points) 0~1,048,575
K6 (24 points) 0~167,772,165
K7 (28 points) 0~268,435,455

K8 (32 points) -2,147,483,648~+2,147,483,647

Flags
1. General Flags
For the operation result of application commands, there are following flags of DVP series PLC:
Example : M1020 : Zero flag M1022 : Carry flag M1021 : Borrow flag
M1029 : Command execution completed flag
When executing the command, all flags will be turned to ON or OFF by the operation result of
application commands. However, when the command has not been executed, the ON/OFF state of
the flags will remain. Therefore, please notice that the above flags may not only be in connection with
specified commands but also many commands.
The program example of command execution completed flag , i.e. M1029
When the conditional contact is ON, the digital switch input command (DSW) will specify 4 output
points with 0.1 second frequency and circulate in order automatically to read the values of DSW.
During the intermediate period of operation, if the conditional contact is OFF, the DSW command is
suspended and the above-mentioned command will be re-executed from the beginning of the
program cycle.When the conditional contact is ON again, please refer the circuit below if you desire
to stop the interrupt.
5 Application Commands
DVP-PLC Application Manual 5-11
X0
SET M0
M0
DSW X10 Y10 D0 K0
RST M0
M1029
When X0=ON, DSW command is activated.
When X0=OFF, wait for the program cycle of
DSW command being completed, after
M1029=ON, then M0 will be OFF.
2. Error Operation Flags
If the combination of the application command is error and/or the assigned devices of operands are out of
range, errors will occur and the error flags and numbers in the following table will be shown during the
excution of the application commands.
M1067
D1067
D1069
When error operations occur, M1067=On, D1067 will show the error number and D1069 will
show the error address.
If other errors occur, the contents of D1067 and D1069 will be refreshed. (when the error is
resetd, M1067=Off)
M1068
D1068
When error operations occur, M1068=On, D1068 will show the error address.
If other errors occur, the contents of D1068 will not be refreshed, M1068 must use RST
command to reset to OFF, otherwise the error will remain.
3. Flags for Extending Functions
Some application commands can extend the functions by using some special flags.
Example: command RS can switch transmission mode 8-bit and 16-bit by using M1161.
The Limited Using Times for Executing Commands:
Some commands can be used several times in the program, but some of them only can be used twice or even
once in the program. However, these commands can be modified by index register to extend more functions of
the commands in the operands.
1. Only can be used once in the program:
API 58 (PWM) (ES/EX/SS models) API 60 (IST) (ES/EX/SS/EP/SA/EH models)
API 74 (SEGL) (ES/EX/SS models) API 88 (PID) (ES/EX/SS/EP/SA models)
2. Only can be used twice in the program:
API 57 (PLSY) (ES/EX/SS models) API 59 (PLSR) (ES/EX/SS models)
API 74 (SEGL) (EH models) API 77 (PR) (EP/SA/EH models)
3. Only can be used four times in the program:
API 169 (HOUR) (EP/SA models)
4. Only can be used eight times in the program:
API 64 (TTMR) (EP/SA models)
5 Application Commands
DVP-PLC Application Manual 5-12
5. API 53 (DHSCS) and API 54 (DHSCR), these commands only can be executed simultaneously less than four
times in the program of DVP-ES/EX/SS models.
6. API 53 (DHSCS), API 54 (DHSCR), API 55(DHSZ) these commands only can be executed simultaneously
less than six times in the program of DVP-EP/SA models.
The Limited Using Times for Executing Commands Simultaneously:
There is no limited using time for executing the same command in the program. However, there are limited
using times for executing the commands simultaneously.

1. API 52 (MTR), API 56 (SPD), API 62 (ABSD), API 63 (INCD), API 69 (SORT), API 70 (TKY), API 71
(HKY), API 72 (DSW) (EP models), API 74 (SEGL)(EP models), API 75 (ARWS), API 80 (RS), API 100
(MODRD), API 101 (MODWR), API 102 (FWD), API 103 (REV), API 104 (STOP), API 105 (RDST), API
106 (RSTEF), API 150 (MODRW), API 151 (PWD), these commands only can be executed simultaneously
once in the program.
2. API 57 (PLSY), API 58 (PWM), API 59 (PLSR), API 72 (DSW) (EH models), these commands only can be
executed simultaneously twice in the program.
3. API 169 (HOUR) (EH models) only can be executed four times in the program.
4. API 64 (TTMR) (EH models) only can be executed eight times in the program.
5. In the program of DVP EH models, there is no limited using time for hardware high speed counter related
commands, like DHSCS, DHSCR and DHSZ. However, there are limited using times for executing the
commands simultaneously. DHSCS, DHSCR command will use one memory unit and DHSZ command will
use two memory units. When these commands are executed simultaneously, the total used memory units
can not exceed eight memory units. If exceeding eight memory units, system will totalize the used memory
units of the commands which have been scanned and executed first, the others will be ignored.
5.3 Handling of Numeric Values
Device such as X, Y, M, S are bit devices and there are only two state, ON and OFF. However, T, C, D, E,
F are data registers and are defined as word devices. Although bit device can only be single point
ON/OFF but it can be used as numeric value in the operands of application commands if adding the
specified bit device in front. The specified bit device is the specified number of digit and it would look
like Kn where n can be a number from the range of 0 to 8.
16-bit can be described from K1 to K4, and 32-bit can be described from K1 to K8. For example, K2M0
means there are 8-bit from M0 to M7.
5 Application Commands
DVP-PLC Application Manual 5-13
M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M0 M1
transmit
equal to
clear to 0
0 0 0 0 0 0 0 0
0 0 0 0 1 1 1 1
1 1 1 1 1 1 1 1
D1
low byte
low byte
D1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b0 b1
0 0 0 0 0 0 0 0
valid data

Transmit K1M0, K2M0, K3M0 to 16-bit registers and insufficient upper bit data have not been transmitted.
Its the same as sending K1M0, K2M0, K3M0, K4M0, K5M0, K6M0, K7M0 to 32-bit registers and the
insufficient upper bit data have not been transmitted also.
The insufficient upper bit will be defined as 0 if the content of the operand assign K1 to K3 in 16-bit
operation or assign K4 to K7 in 32-bit operation. Therefore, it means the operation result is positive.
M0
BIN K2X4 D0
The BCD value combined by X4 to X13 will be converted to
D0 as BIN value.
The numbers of Bit device can specify freely. However, it is recommended to use 0 in the lowest digit
decimal place of X and Y devices (X0, X10, X20Y0, Y10, Y20). For M and S Series, it is recommended
to use the multiple 8 but the use of 0 is the most device efficient, like M0, M10, M20etc.
Assign Continuous Numbers
For example , like D date register, the continuous numbers of D are D0, D1, D2, D3, D4etc.
For the bit device, the continuous numbers are shown as follows:
K1X0 K1X4 K1X10 K1X14
K2Y0 K2Y10 K2Y20 Y2X30
K3M0 K3M12 K3M24 K3M36.
K4S0 K4S16 K4S32 K4S48.
The bit device numbers are all of the above. To avoiding errors, please do not skip over the continuous
numbers. Furthermore, if K4Y0 is used in 32-bit operation, the upper 16bit is defined as 0. Therefore, it is
recommended to use K8Y0 in 32bit operation.
Floating Point Operation
The internal operation of DVP series PLC usually is operated by BIN integer format. When performing integer
division operation, the decimal point will be discarded. For example: 40 3 = 13, remainder is 1 and the
decimal point will be discarded. But if use floating point operation, the decimal point can be given.

5 Application Commands
DVP-PLC Application Manual 5-14
The application commands related to floating point operation are shown in the following table.
API 49 (FLT), API 110 (D ECMP), API 111 (D EZCP), API 116 (D RAD),
API 117 (D DEG), API 118 (D EBCD), API 119 (D EBIN), API 120 (D EADD),
API 121 (D ESUB), API 122 (D EMUL), API 123 (D EDIV), API 124 (D EXP),
API 125 (D LN), API 126 (D LOG), API 127 (D ESQR), API 128 (D POW)
API 129 (INT) API 130 (D SIN) API 131 (D COS) API 132 (D TAN)
API 133 (D ASIN) API 134 (D ACOS) API 135 (D ATAN) API 136 (D SINH)
API 137 (D COSH) API 138 (D TANH)
Binary Floating Point
DVP PLC represents floating point number with 32-bit number by IEEE754 and the format is in the following:
S
exponent mantissa
8-bit 23-bit
b
31
b
0
Sign bit
0: positive
1: negative

Equation ( ) 127 ; . 1 2 1 =

B M
B E S

Therefore, the range of 32-bit floating is from 2
-126
to

2
+128
, i.e. from 1.175510
-38
to

3.402810
+38
.
Example 1: using 32-bit floating point to represent decimal number 23
Step 1: convert 23 to binary number: 23.0=10111
Step 2: Normalizing the binary: 10111=1.0111 2
4
,

0111 is mantissa and 4 is an exponent.
Step 3: get exponent: E -B=4 E-127=4 E=131=10000011
2

Step 4: We can now combine the sign, exponent, and normalized mantissa into the binary IEEE short real
representation.
0 10000011 01110000000000000000000
2
=41B80000
16
Example 2: using 32-bit floating point to represent decimal number 23
The conversion steps are the same as decimal number 23. Only need to modify sign bit from 0 to 1 to get value
1 10000011 01110000000000000000000
2
=C1B80000
16


DVP PLC also uses two registers with continuous number to store binary floating point. The following is the example
that uses register (D1, D0) to store binary floating point.
S E7 E6 E5 E1 E0 A22 A21 A20 A6 A5 A4 A3 A2 A1 A0
b0 b1 b2 b3 b4 b5 b6 b20 b21 b22 b23 b24 b28 b29 b30 b31
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
7 6 5 1 0 -1 -2 -3 -17 -18 -19 -20 -21 -22 -23
D1(b15~b0) D0(b15~b0)
E0~E7=0 or 1 A0~A22=0 or 1
8 bits of exponent 23 bits of constant
sign bit (0: positive 1:negative)
When b0~b31 is 0, the content is 0.

5 Application Commands
DVP-PLC Application Manual 5-15
Decimal Floating Point
The binary floating point is not accepted by most people. Therefore, binary floating point format can be converted
to decimal floating point format for people to perform the operation of decimal numbers. However, the DVP series
PLC use binary floating point to perform the operation of decimal numbers.
Decimal floating point is stored in the register with 2 continuous numbers. The register with small number stores
constant and the register with larger number stores exponent.
For example, using register (D1, D0) to store a decimal floating point.
Decimal floating point = [constant D0] X 10
[exponent D1 ]
constant D0 = 1,000~9,999
exponent D1 = - 41~+35
the most significant bit of (D1, D0) is symbol bit.
Besides, constant 100 doesnt exist in D0 due to 100 will be shown with 1,00010
-1
.
The range of decimal number is from 117510
-41
to 340210
+38
.
Decimal floating point can be used in the following commands.
The conversion command for Binary floating point Decimal floating point (D EBCD)
The conversion command for Decimal floating point Binary floating point (D EBIN)
Zero flag (M1020), Borrow flag (M1021) and carry flag (M1022)
The flags that corresponds to the floating command are:
Zero flag: when the result is 0, M1020=On.
Borrow flag: when the result is least than the minimum unit, M1021=On
Carry flag: when the absolute value of result exceeds usage range, M1022=On
5.4 Index register E, F
The index register is 16-bit register. There are 2 devices for ES/EX/SS models (E and F), 8 devices for EP
models (E0~E3, F0~F3) and 16 devices for EH models (E0~E7, F0~F7).
E0 F0
F0 E0
16-bit 16-bit
32-bit
lower bit upper bit

E and F are also 16-bit register just the same as general
register. It can be wrote/read freely.
If using a 32-bit register, you should specify E. In this
condition, F will be covered by E and cannot be used
anymore; otherwise the contents of E will become incorrect.
(When PLC start-up, it is commended to use MOVP
command to clear the contents of F and reset it to 0)
When using 32-bit index register, the combination of E, F are
as follows. (E0, F0), (E1, F1), (E2, F2)(E7, F7).

5 Application Commands
DVP-PLC Application Manual 5-16
MOV K20E0 D10F0
E0=8 F0=14
20+8=28 10+14=24
K28 D24 transmit
As the left figure shown, the contents of operand will change
according to the contents of E, F. and we name this kind of
modification as Index.
For example, E0=8 and K20E0 all represent constant
K28(20+8). If the contact is ON, constant K28 will be
transmitted to register D24.

Devices can use Index register to modify in ES/EX/SS Series are: P, X, Y, M, S, KnX, KnY, KnM, KnS, T, C, D.
Devices can use Index register to modify in EP Series are: P, X, Y, M, S, KnX, KnY, KnM, KnS, T, C, D
Devices can use Index register to modify in EH Series are: P, I, X, Y, M, S, K, H, KnX, KnY, KnM, KnS, T, C, D
The above device can use index register E, F to modify. However, index register E, F cannot modify itself,
either Kn. (K4M0E0 is available, K0E0M0 is not available). In each application command, if the symbol is
added in the table of operand, it means the device can use index register E, F to modify.
Index register E, F can be used to modify P, I, X, Y, M, S, KnX, KnY, KnM, KnS, T, C, D these devices under
certain condition. Two devices, E or F can be specified when using 16-bit register. If using index register E, F to
modify constant K, H in 32-bit command, only one device, E can be specified.
When constant (K,H) is used to be index function in WPLSoft command mode, it needs to use symbol
@.
Example: MOV K10@E0 D0F0
The program example of index:
DVP - PLC
The digit switch input X3~X0,
which be selected by Timer T
The 7-step display output Y17~Y0, which be
used to display the present value of Timer T
5

T0 can use index register F0 to shorten the program and
display the 7 present value of T0~T9 on the external 7-step
display panel.
M1000
BIN K1X0
BCD T0F0 K4Y0
F0
(X3~X0)BCD (F0)BIN
(T0F0)BIN (Y17~Y0)BCD

When F0=0~9, T0F0=T0~T9.
There are limited using times of some commands. If using the index register E, F to modify, the final result can
be the same as the operation result of using the same command repeatedly.

5 Application Commands
DVP-PLC Application Manual 5-17
5.5 Index for Commands
Sort by Characters
Mnemonic Codes Applicable models STEPS
Classification API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
87 ABS DABS Absolute value 3 5 7-100
62 ABSD DABSD Absolute drum sequencer 9 17 7-43
155 ABSR DABSR ABS current value read 7 13 9-14
20 ADD DADD Perform the addition of BIN data 7 13 6-29
66 ALT On/Off alternate command 3 7-49
218 AND& DAND&
Comparison contact is ON when
S1 & S2 is true
5 9 10-2
220 AND^ DAND^
Comparison contact is ON when
S1 ^ S2 is true
5 9 10-2
219 AND| DAND|
Comparison contact is ON when
S1 | S2 is true
5 9 10-2
234 AND< DAND<
Comparison contact is ON when
S1 < S2 is true
5 9 10-5
237 AND<= DAND<=
Comparison contact is ON when
S1 S2 is true
5 9 10-5
236 AND<> DAND<>
Comparison contact is ON when
S1 S2 is true
5 9 10-5
232 AND= DAND=
Comparison contact is ON when
S1 = S2 is true
5 9 10-5
233 AND> DAND>
Comparison contact is ON when
S1 > S2 is true
5 9 10-5
238 AND>= DAND>=
Comparison contact is ON when
S1 S2 is true
5 9 10-5
93 ANDF
Series connection command for
the falling-edge detection
operation
3 3-12
92 ANDP
Series connection command for
the rising-edge detection
operation
3 3-11
47 ANR Alarm device reset 1 6-58
46 ANS Alarm device output 7 6-58
75 ARWS Arrow keyboard input 9 7-65
76 ASC ASCII code conversion 11 7-66
82 ASCII Convert HEX to ASCII 7 7-88
133 DASIN
Arcsine operation of binary
floating point
9 8-39
134 DACOS
Arccosine operation of binary
floating point
9 8-40
A
135 DATAN
Arctangent operation of binary
floating point
9 8-41
18 BCD DBCD Convert BIN data into BCD 5 9 6-26
19 BIN DBIN Convert BCD data into BIN 5 9 6-27
15 BMOV Block move 7 6-23
B
44 BON DBON Determine the ON bits 7 13 6-56
01 CALL Call subroutine 3 6-5
84 CCD Check code 7 7-95
00 CJ Conditional jump 3 6-1
C
14 CML DCML Compliment 5 9 6-22
5 Application Commands
DVP-PLC Application Manual 5-18
Mnemonic Codes Applicable models STEPS
Classification API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
10 CMP DCMP Compare 7 13 6-17
97 CNT DCNT Counter 4 6 3-8
131 DCOS
Cosine operation of binary
floating point
9 8-36
137 DCOSH
Hyperbolic cosine operation of
binary floating point
9 8-42
C
108 CRC CRC error check 7 8-15
25 DEC DDEC Perform the subtraction of 1 3 5 6-34
41 DECO 8 256 bits decode 7 6-53
117 DDEG Radian Degree 9 8-21
05 DI Disable interrupts 1 6-7
23 DIV DDIV Perform the division of BIN data 7 13 6-32
159 DRVA DDRVA Data backup MEMORY write in 9 17 9-26
158 DRVI DDRVI Drive to increment 9 17 9-22
D
72 DSW Digital Switch input 9 7-58
120 DEADD Binary floating point addition 13 8-24
118 DEBCD
Convert binary floating point to
decimal floating point
9 8-23
119 DEBIN
Convert decimal floating point to
binary floating point
9 8-23
110 DECMP Binary floating point comparison 13 8-19
123 DEDIV Binary floating point division 13 8-27
04 EI Enable interrupts 1 6-7
122 DEMUL
Binary floating point
multiplication
13 8-26
42 ENCO 256 8 bits encode 7 6-54
127 DESQR
Square root of binary floating
point
9 8-31
121 DESUB Binary floating point subtraction 13 8-25
124 DEXP
Convert binary floating point to
perform exponent operation
9 8-28
E
111 DEZCP
Binary floating point zone
comparison
17 8-20
06 FEND First end 1 6-11
49 FLT DFLT
Convert BIN integer to binary
floating point
5 9 6-61
16 FMOV DFMOV Multiple devices movement 7 13 6-24
08 FOR Start of FOR-NEXT loop 3 6-14
78 FROM DFROM Read special module CR data 9 17 7-69
102 FWD
VFD-A series drive forward
command
7 8-8
F
145 FTC Fuzzy temperature control 9 8-45
144 GPWM
General pulse width modulation
output
7 8-44
171 GBIN DGBIN Convert Gray code to BIN P P 5 9 9-45
G
170 GRY DGRY Convert BIN to Gray code P P 5 9 9-44
83 HEX Convert ASCII to HEX P P 7 7-92
H
71 HKY DHKY 16-key keyboard input P P 9 17 7-56
5 Application Commands
DVP-PLC Application Manual 5-19
Mnemonic Codes Applicable models STEPS
Classification API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
169 HOUR DHOUR Hour meter P P 7 13 9-44
54 DHSCR
High speed counter comparison
RESET
P P 13 7-15
53 DHSCS
High speed counter comparison
SET
13 7-6
196 HST DHST High speed counter 3 9-60
H
55 DHSZ
Zone comparison (High-speed
counter)
17 7-17
24 INC DINC Perform the addition of 1 3 5 6-34
63 INCD Increment drum sequencer 9 7-44
129 INT DINT
Convert binary floating point to
BIN integer
5 9 8-33
98 INV Inverting operation 1 3-15
03 IRET Interrupt return 1 6-7
I
60 IST Manual/Auto control 7 7-36
215 LD& DLD&
Comparison contact is ON when
S1 & S2 is true
5 9 10-1
217 LD^ DLD^
Comparison contact is ON when
S1 ^ S2 is true
5 9 10-1
216 LD| DLD|
Comparison contact is ON when
S1 | S2 is true
5 9 10-1
226 LD< DLD<
Comparison contact is ON when
S1 < S2 is true
5 9 10-4
229 LD<= DLD<=
Comparison contact is ON when
S1 S2 is true
5 9 10-4
228 LD<> DLD<>
Comparison contact is ON when
S1 S2 is true
5 9 10-4
224 LD= DLD=
Comparison contact is ON when
S1 = S2 is true
5 9 10-4
225 LD> DLD>
Comparison contact is ON when
S1 > S2 is true
5 9 10-4
230 LD>= DLD>=
Comparison contact is ON when
S1 S2 is true
5 9 10-4
91 LDF Falling-edge detection operation 3 3-11
90 LDP Rising-edge detection operation 3 3-11
125 DLN
Convert binary floating point to
perform natural logarithm
operation
9 8-29
126 DLOG
Convert binary floating point to
perform logarithm operation
13 8-30
L
107 LRC LRC error check 7 8-13
180 MAND Matrix AND 9 9-47
190 MBC Matrix bit state count 7 9-59
189 MBR Matrix bit rotate 7 9-58
186 MBRD Matrix bit read 7 9-54
188 MBS Matrix bit shift 7 9-56
187 MBWR Matrix bit write 7 9-55
185 MCMP Matrix compare 9 9-52
45 MEAN DMEAN Mean value 7 13 6-57
M
148 MEMR DMEMR Data backup MEMORY read 7 13 8-49
5 Application Commands
DVP-PLC Application Manual 5-20
Mnemonic Codes Applicable models STEPS
Classification API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
149 MEMW DMEMW MEMORY write in 7 13 8-50
184 MINV Matrix inverse 7 9-52
183 MNOR Matrix NOR 9 9-51
100 MODRD MODBUS data Read 7 8-1
150 MODRW MODBUS data read/write in 11 9-1
101 MODWR MODBUS data write in 7 8-5
181 MOR Matrix OR 9 9-49
12 MOV DMOV Data Move 5 9 6-19
52 MTR Input matrix 9 7-3
22 MUL DMUL
Perform the multiplication of BIN
data
7 13 6-31
M
182 MXOR Matrix XOR 9 9-50
29 NEG DNEG Negation 3 5 6-38
N
09 NEXT End of FOR-NEXT loop 1 6-14
221 OR& DOR&
Comparison contact is ON when
S1 & S2 is true
5 9 10-3
O
223 OR^ DOR^
Comparison contact is ON when
S1 ^ S2 is true
5 9 10-3
222 OR| DOR|
Comparison contact is ON when
S1 | S2 is true
5 9 10-3
242 OR< DOR<
Comparison contact is ON when
S1 < S2 is true
5 9 10-6
245 OR<= DOR<=
Comparison contact is ON when
S1 S2 is true
5 9 10-6
244 OR<> DOR<>
Comparison contact is ON when
S1 S2 is true
5 9 10-6
240 OR= DOR=
Comparison contact is ON when
S1 = S2 is true
5 9 10-6
241 OR> DOR>
Comparison contact is ON when
S1 > S2 is true
5 9 10-6
246 OR>= DOR>=
Comparison contact is ON when
S1 S2 is true
5 9 10-6
95 ORF
Parallel connection command for
the falling-edge detection
operation
3 3-13
O
94 ORP
Parallel connection command for
the rising-edge detection
operation
3 3-12
88 PID PID calculation 9 7-100
99 PLF Falling-edge output 3 3-13
89 PLS Rising-edge output 3 3-13
59 PLSR DPLSR
Pulse wave output with
acceleration/deceleration speed
9 17 7-31
157 PLSV DPLSV Variable speed pulse output 7 13 9-21
57 PLSY DPLSY Pulse output 7 13 7-25
128 DPOW
Convert binary floating point to
perform power operation
13 8-32
77 PR Print 5 7-67
P
81 PRUN DPRUN
Octal number system
transmission
5 9 7-87
5 Application Commands
DVP-PLC Application Manual 5-21
Mnemonic Codes Applicable models STEPS
Classification API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
151 PWD Input pulse width detection 5 9-11
P
58 PWM Pulse width modulation output 7 7-30
116 DRAD Degree Radian 9 8-21
67 RAMP Ramp signal 9 7-50
154 RAND Random value 9 9-13
33 RCL DRCL
Rotate to the left with the carry
flag attached
5 9 6-44
32 RCR DRCR
Rotate to the right with the carry
flag attached
5 9 6-43
105 RDST VFD-A series drive status read 5 8-11
R
50 REF I/O refresh 5 7-1
51 REFF
Refresh and adjust the response
time of input filter
3 7-2
103 REV
VFD-A series drive reverse
command
7 8-9
31 ROL DROL Rotate to the left 5 9 6-42
30 ROR DROR Rotate to the right 5 9 6-41
80 RS Serial data communication 9 7-74
106 RSTEF
VFD-A series drive abnormal
reset
5 8-13
153 RTMD
End to measure the execution
time of I interrupt
3 9-12
R
152 RTMU
Start to measure the execution
time of I interrupt
5 9-11
73 SEGD Decode the 7-step display panel 5 7-60
74 SEGL 7-step display scan output 7 7-61
61 SER DSER Search a data stack 9 17 7-42
39 SFRD Shift register read 7 6-50
35 SFTL
Shift the data of device specified
to the left
9 6-46
34 SFTR
Shift the data of device specified
to the right
9 6-45
38 SFWR Shift register write 7 6-49
130 DSIN
Sine operation of binary floating
point
9 8-34
136 DSINH
Hyperbolic sine operation of
binary floating point
9 8-42
13 SMOV Shift move 11 6-20
69 SORT Data sort 11 7-52
56 SPD Speed detection 7 7-24
48 SQR DSQR Square root of BIN 5 9 6-60
02 SRET Subroutine return 1 6-5
65 STMR Special timer 7 7-48
104 STOP
VFD-A series drive stop
command
7 8-9
21 SUB DSUB
Perform the subtraction of BIN
data
7 13 6-30
S
43 SUM DSUM Sum of ON bits 5 9 6-56
5 Application Commands
DVP-PLC Application Manual 5-22
Mnemonic Codes Applicable models STEPS
Classification API
16 bits 32 bits
P
Command
Function
ES EP EH 16-bit 32-bit
Page
147 SWAP DSWAP Swap high/low byte 3 5 8-48
S
109 SWRD Digital switch read 3 8-18
162 TADD Real time clock data addition 7 9-37
132 DTAN
Tangent operation of binary
floating point
9 8-37
138 DTANH
Hyperbolic tangent operation of
binary floating point
9 8-43
160 TCMP Time compare 11 9-35
70 TKY DTKY 10-key keyboard input 7 13 7-54
96 TMR Timer 4 3-8
79 TO DTO Special module CR data write in 9 17 7-69
166 TRD Time data read 3 9-40
163 TSUB Time subtraction 7 9-38
64 TTMR Teaching timer 5 7-46
167 TWR Time data write in 3 9-42
T
161 TZCP Time zone compare 9 9-36
85 VRRD Potentiometer read 5 7-97
V
86 VRSC Potentiometer scale 5 7-99
26 WAND DAND
Perform the logical product
(AND) operation
7 13 6-35
07 WDT Watchdog timer refresh 1 6-12
27 WOR DOR
Perform the logical sum (OR)
operation
7 13 6-36
37 WSFL Shift the register to the left 9 6-48
36 WSFR Shift the register to the right 9 6-47
W
28 WXOR DXOR
Perform the exclusive logical add
(XOR) operation
7 13 6-37
X 17 XCH DXCH Data exchange 5 9 6-25
11 ZCP DZCP Zone compare 9 17 6-18
156 ZRN DZRN Zero point return 9 17 9-18
Z
40 ZRST
Resets a range of device
specified
5 6-51

Note 1: Applicable models ES series above includes EX and SS series; EP includes SA series.
Note 2: Above commands for ES/EX/SS models dont possess pulse execution command (P command).





6 Application Commands API 00-49
DVP-PLC Application Manual 6-1
API Applicable models
ES EP EH
00


CJ
P

Conditional Jump
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
Note: Operand S can assign P
P can be modified by Index register E, F
ES Series models: Operand S can assign P0~P63
EP / EH Series models: Operand S can assign P0~P255
ES series models do not support the pulse execution
command (CJP)

16-bit command (3 STEPS)
CJ
Continuous
execution
CJP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : The destination pointer of conditional jump
4 CJ command can be used in the following conditions:
1. In order to shorten the program scan time when user do not want to execute some
unnecessary parts of PLC program.
2. In double or dual coils designation.
4 When the program that pointer P indicats is before CJ command, please note that the
error of WDT exceeding time. If PLC stop running, please use carefully.
4 CJ command can assign the same pointer P repeatedly. However, CJ command and
CALL command cannot assign the same pointer P, otherwise the error will occur.
4 The explanation of each device when executing the CJ command:
1. Y, M, S remains its previous state before the condition jump occurs.
2. The timer 10ms, 100ms that execute the counting will stop.
3. The timer T192~T199 that execute the subroutine program will continue and the
output contact will execute normally.
4. The high-speed counter that executes the counting will continue and the output
contact will execute normally.
5. The general counter will stop.
6. If the reset command of the accumulative type timer is activated before the condition
jump is activated, the device will be still in the reset state when condition jump is
executing.
7. The general application commands will not be executed.
8. The executing application commands, i.e. API 53 DHSCS, API 54 DHSCR, API 55
DHSZ, API 56 SPD, API 57 PLSY, API 58 PWM, API 59 PLSR, API 157 PLSV, API
158 DRVI, API 159 DRVA, will continue executing.
6 Application Commands API 00-49
DVP-PLC Application Manual 6-2
Program
Example
1

4 When X0=On, the program will skip from address 0 to N (label P1) automatically and
keep on executing. But the area between address 0 and N will be skipped and will not
be executed.
4 When X0=Off, as usual, the program will keep on executing from address 0. CJ
command will not be executed.
X0
X1
X2
CJ P1
Y1
Y2
0
N P1
P***
(CJ command)

Program
Example
2

4 There are five situations that the CJ command can be executed between the
commands MC and MCR.
1. Out of MC~MCR.
2. Valid in the loop P1 in the following chart.
3. In the same level N, inside of MC~MC .
4. Inside of MC, out of MCR.
5. Jump from this MC~MCR to another MC~MCR. (1)
(1) This function is only provided in V4.9 (included) or higher version of ES series
models and EP/EH series models.
4 The execution explanations of V4.7(included) or lower version of ES series models:
CJ command is used between MC and MCR command but It is only used in the range
out of MC~MCR or in the same level N inside the MC~MCR. CJ command can not be used to
jump from this range of MC~MCR to another range of MC~MCR, otherwise the error will
occur. CJ command can execute correctly in the above-mentioned condition 1 and 3 but the
error will occur if it is not used in other conditions.

X0
MC N0
X2
X3
X1
M1000
M1000
P1
P0
CJ
CJ
MC N1
N1
N0
P1
P0
Y1
Y0
MCR
MCR

6 Application Commands API 00-49
DVP-PLC Application Manual 6-3
Program
Example
3

4 The states of each device are shown in the following:
Device
The contact
state before CJ
execution
The contact state
during CJ
execution
The output coil state during CJ
execution
M1, M2, M3
Off
M1, M2, M3
OffOn
Y1 (note1), M20, S1 Off
Y, M, S
M1, M2, M3
On
M1, M2, M3
OnOff
Y1 (note1), M20, S1 On
M4 Off M4 OffOn Timer is not activated
10ms, 100ms
Timer
(ES/EP/EH)
M4 On M4 OnOff
The interrupt of timer latched.
Keep on counting after M0 is off.
M6 Off M6 OffOn Timer (T240) is not activated
1ms, 10ms,
100ms Timer (for
accumulative)
EP/EH
M6 On M6 OnOff
All accumulative timers will stop
but latched once executing
command CJ. When M0 is from
OnOff, T240 will be
unchanged.
M7, X10 Off
M10 On/Off
trigger
Timer does not count
C0~C234
M7 Off, X10
On/Off trigger
M10 On/Off
trigger
The interrupt of counter latched.
Keep on counting after M0 is off.
M11 Off M11 OffOn
Application commands wont be
executed.
Application
command
M11 On M11 OnOff
Do not execute the skipped
application command but API
53~59, API 157~159 keep
executing.
Note 1: Y1 is dual output. When M0 is Off, it is controlled by M1. when M0 is On, it is
controlled by M12.
Note 2: When timer that subroutine used (T192~T199, for EP/EH) executes CJ command, it
will keep counting. After timer attains, output contact of timer will be On.
Note 3: When high-speed counters (C235~C255) execute CJ command, it will kekep counting
and output point will also continue act.

6 Application Commands API 00-49
DVP-PLC Application Manual 6-4


4 Y1 is double or dual coil designation. When M0=Off, it is controlled by M1. When M0=On,
it is controlled by M12.
CJ P0
M0
M1
M2
M17
M3
M4
M5
M6
M7
M1
M11
M0
M12
M13
END
RST
RST
RST T127
C0
D0
Y1
CJ P0
CJ P63
S1
TMR T0
K10
TMR
RST
RST
CNT
MOV
T127
T127
C0
C0
D0 K3
K20
Y1
M20
K1000
P0
P63









6 Application Commands API 00-49
DVP-PLC Application Manual 6-5
API

Applicable models
ES EP EH
01


CALL
P

Call Subroutine
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
Note: Operand S can assign P.
P can be modified by Index register E, F.
ES Series models: operand S can assign P0~P63.
EP / EH Series models: operand S can assign P0~P255.
ES Series models do not support the pulse execution
command (CALLP).

16-bit command (3 STEPS)
CALL
Continuous
execution
CALLP
Pulse
execution

32-bit command


Flag: None

Command
Explanation

4 : The desinition pointer of call subrountine.
4 Program continues in the subroutine after the FEND command.
4 Subroutine pointers of CALL command and the pointers of CJ command are not
allowed to coincide.
4 If only using CALL command, it can call subrountine of the same pointer number with
no limit of times.
4 Subroutine can be nested for 5 levels including the initial CALL command. (If entering
the six level, the subroutine wont be executed.)

API

Applicable models
ES EP EH
02


SRET

Subroutine Return
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
Note: No operand
The command driven by contact is not necessary.


16-bit command (1 STEPS)
SRET
Continuous
execution


32-bit command

Flag: None

Command
Explanation

4 Indicates the end of subroutine program.
4 The subroutine will return to main program by SRET after the termination of subroutine
and execute the sequence program located at the next step to the CALL command.
Program
Example
1

4 When X0 = ON, then start CALL command, jump to P2 and run subroutine. When run
SRET command, it will jump back to address 24 and keep running.
6 Application Commands API 00-49
DVP-PLC Application Manual 6-6
X0
X1
CALL P2
Y1
20
P***
24
FEND
SRET
P2
Y0
Y0
Subroutine P2
subroutine
subroutine return
call subroutine P***

Program
Example
2

4 When X10 is the rising-edge triggered CALL P10 command that goes from Off to On,
jump to P10 and run subroutine.
4 When X11 is On, execute CALL P11, jump to P11 and run subroutine.
4 When X12 is On, execute CALL P12, jump to P12 and run subroutine.
4 When X13 is On, execute CALL P13, jump to P13 and run subroutine.
4 When X14 is On, execute CALL P14, jump to P14 and run subroutine. When run SRET
command, it will jump back to the last P*** subroutine and keep running.
4 Run SRET command in the P10 subroutine and return to the main program.
X0
X10
INC D0
Y0
CALL P10
X0
INC D1
Y1
FEND
INC D10
X2
P10
Y4
X2
X11
CALL P11
INC D11
Y5
SRET
INC D20
X2
P11
Y6
X12
CALL P12
X2
INC D21
Y7
SRET
X2
X13
X2
X2
X2
X14
X2
P13
P14
P12 INC D30
Y10
CALL P13
INC D31
Y11
SRET
INC D40
Y12
CALL P14
INC D41
Y13
SRET
INC D50
Y14
SRET
END
Main
Program
Main
Program
subroutine
subroutine
subroutine
subroutine
subroutine


6 Application Commands API 00-49
DVP-PLC Application Manual 6-7
API

Applicable models
ES EP EH
03


I RET

Interrupt Return
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
Note: No operand
The command driven by contact is not necessary.


16-bit command (1 STEPS)
IRET
Continuous
execution


32-bit command

Flag: None

Command
Explanation

4 IRET denotes the interrupt of subroutine program.
4 Terminate the processing of interrupt program and return to the main program by IRET
command. Execute the original program to produce the next interrupt command.

API

Applicable models
ES EP EH
04


EI

Enable Interrupts
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
Note: No operand
The command driven by contact is not necessary.
The pulse width of interrupt signal should be higher than 200us.
Please refer to the footnote of DI command to see the range of
numbers of each model.

16-bit command (1 STEPS)
EI
Continuous
execution


32-bit command

Flag: M1050~M1059, M1280~M1294
(Please refer to the footnote of DI
command)

API

Applicable models
ES EP EH
05


DI

Disable Interrupts
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
Note: No operand
The command driven by contact is not necessary.


16-bit command (1 STEPS)
DI
Continuous
execution


32-bit command

Flag: None

Command
Explanation

4 EI command enables interrupt subroutine to be processed in the program, e.g. External
interrupt, Time interrupt, High-speed counter interrupt.
4 In the program, using interrupt subroutine between EI and DI command is allowed.
However, it is not allowed to use DI command if there is no disable interrupt period
during the program.


6 Application Commands API 00-49
DVP-PLC Application Manual 6-8
4 Even in the interrupt allowed range when interrupting special the auxiliary relay M1050
to M1059 in ES / EP series models and M1280 to M1294 in EH series models, the
corresponding interrupting request will not be activated.

4 Interrupting cursor ( I ) must be used after the FEND command.
4 Other interrupts are not allowed to occur during executing the interrupt routine
program.
4 When most interrupts occur, priority is given to the interrupt occuring first. If the
interrupts occur simultaneously, the interrupt with the lower pointer number will be
given the higher priority.
4 Any interrupt request occuring between DI and EI commands cannot be executed
immediately. The request will be memorized and execute the subroutine in the enabling
range of the interrupt.
4 When using the interrupt pointer, please do not repeatly use the high-speed counter
driven by the same X input contact.
4 When the interrupt routine program is running and the I/O is immediately activated, the
state of I/O can be refreshed by writing REF command in the program.
Program
Example

4 During the PLC operation, the program scans the commands between EI and DI, if X1
or X2 are ON, the subroutine A or B will be interruptted. When IRET is reached, the
main program will resume.

I 101
I 201
Y1
EI
FEND
X0
DI
IRET
IRET
Y0
Y0
EI
Disabled interrupt
Enabled interrupt
Enabled interrupt
Interrupt subroutine A
Interrupt subroutine B

6 Application Commands API 00-49
DVP-PLC Application Manual 6-9
Footnote

4 Interrupt pointer I numbers of ES series models:
1. External interrupts: (I001, X0), (I101, X1), (I201, X2), (I301, X3) 4 points.
2. Time interrupts: I6, 1 point (10~99, time base=1ms) (support for
V5.7)
3. Communication interrupt for specific characters received (I150) (support for
V5.7)
4 Interrupt pointer I numbers of EP series models:
1. External interrupts: (I001, X0), (I101, X1), (I201, X2), (I301, X3), (I401, X4),
(I501, X5) 6 points.
2. Time interrupts: I6, I7 2 points. (1~99ms, time base=1ms)
3. High-speed counter interrupts: I010, I020, I030, I040 4 points. (used with API 53
DHSCS command and interrupt signal occurs)
4. Communication interrupt for specific characters received (I150)
5. The order of interrupt point I: high-speed counter interrupt, external interrupt,
time interrupt and communication interrupt for specific characters received.

4 Interrupt pointer I Number of EH series models:
1. External interrupts: (I00, X0), (I10, X1), (I20, X2), (I30, X3), (I40, X4),
(I50, X5) 6 points. (0 indicates the interrupt of falling-edge, 1 indicates
the interrupt of rising-edge)
2. Time interrupts: I6, I7, 2 points. (1~99ms, time base=1ms) I8
1 point. (1~99ms, time base=0.1ms)
3. High-speed counter interrupts: I010, I020, I030, I040 4 points. (used with API 53
DHSCS command and interrupt signal occurs)
4. The interrupt, start and end of pulse output interrupt should be used with API 57
PLSY command. I130, I140 are triggered at the beginning of the pulse output by
the start-arranged flag of pulse output command M1342, M1343. Then, M1340,
M1341 will trigger I110, I120 at the end of pulse output command to interrupt the
executing program and jump to the assigned interrupt subroutine to execute .
5. Communication interrupt for specific characters received (I150)
6. The order of the interrupt pointer I : External interrupts, time interrupts, high-speed
counter interrupts, and pulse output interrupts.
4 Interrupt Inhibit Flag of ES series models:
Flag Function
M1050 External interrupt, I 001 masked
M1051 External interrupt, I 101 masked
M1052 External interrupt, I 201 masked
M1053 External interrupt, I 301 masked
6 Application Commands API 00-49
DVP-PLC Application Manual 6-10
4 Interrupt Inhibit Flag of EP series models:
Flag Function
M1050 External interrupt, I 001 masked
M1051 External interrupt, I 101 masked
M1052 External interrupt, I 201 masked
M1053 External interrupt, I 301 masked
M1054 External interrupt, I 401 masked
M1055 External interrupt, I 501 masked
M1056 Time interrupt, I6 masked
M1057 Time interrupt, I7 masked
M1059 High-speed counter interrupt, I010~I040 masked
4 Interrupt Inhibit Flag of EH series models:
Flag Function
M1280 External interrupt, I00masked
M1281 External interrupt, I10masked
M1282 External interrupt, I20masked
M1283 External interrupt, I30masked
M1284 External interrupt, I40masked
M1285 External interrupt, I50masked
M1286 Time interrupt, I60masked
M1287 Time interrupt, I70masked
M1288 Time interrupt, I80masked
M1289 High-speed counter interrupt, I010 masked
M1290 High-speed counter interrupt, I020 masked
M1291 High-speed counter interrupt, I030 masked
M1292 High-speed counter interrupt, I040 masked
M1293 High-speed counter interrupt, I050 masked
M1294 High-speed counter interrupt, I060 masked
M1295 Pulse output interrupt insert I110 masked
M1296 Pulse output interrupt insert I120 masked
M1297 Pulse output interrupt insert I130 masked
M1298 Pulse output interrupt insert I140 masked
M1299 Pulse output interrupt insert I150 masked
M1340 After CH0 pulse is transmitted, I110 interrupt occur
M1341 After CH1 pulse is transmitted, I120 interrupt occur
M1342 CH0 pulse is transmitted; meanwhile, I130 interrupt occur simultaneously
M1343 CH1 pulse is transmitted; meanwhile, I140 interrupt occur simultaneously



6 Application Commands API 00-49
DVP-PLC Application Manual 6-11
API

Applicable models
ES EP EH
06


FEND

First End
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
Note: No operand
The command driven by contact is not necessary.


16-bit command (1 STEPS)
FEND
Continuous
execution


32-bit command

Flag: None

Command
Explanation

4 This command denotes the end of the main routine program. It has the same function
as END command during PLC operation.
4 CALL must follow right after FEND command and add SRET command at the end of
the subroutine. Interrupt commands also have to follow after FEND command and add
IRET command at the end of the service program.
4 If using several FEND commands, please place the subroutine and interrupt service
programs between the last FEND and END command.
4 After CALL command is executed, the program error will occur when execute the FEND
command before SRET command is executed.
4 After FOR command is executed, the program error will occur when execute the FEND
command before NEXT command is executed.
CJ Command
ProgramFlow

X1
CALL P63
P0
P63
CJ P0
I301
X0
0
The program flow
when X0=off,
X1=off
main
program
main
program
main
program
interrupt
subroutine
command CALL
subroutine
The program flow when X0=On
program jumps to P0

6 Application Commands API 00-49
DVP-PLC Application Manual 6-12
CALL Command
ProgramFlow

X1
CALL P63
P0
P63
CJ P0
I301
X0
0
The program flow
when X0=off,
X1=off
main
program
main
program
main
program
interrupt
subroutine
command CALL
subroutine
The program flow
when X0=Off,
X1=On.


API

Applicable models
ES EP EH
07


WDT
P
Watchdog Timer Refresh
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
Note: No operand
ES series models do not support the pulse execution
command (WDTP).

16-bit command (1 STEPS)
WDT
Continuous
execution
WDTP
Pulse
execution

32-bit command


Flag: None

6 Application Commands API 00-49
DVP-PLC Application Manual 6-13
Command
Explanation

4 WDT (Watch Dog Timer) is used to monitor the PLC operation in the DVP series PLC
system.
4 The WDT command can be used to reset the Watch Dog Timer. If the PLC scanning
time (from step 0 to END or FEND command) is more than 200ms, the ERROR LED will
flash. The user will have to turn the PLC off and then back ON to clear the fault. PLC will
determine the status of RUN/STOP according to RUN/STOP switch. If there is no
RUN/STOP switch, PLC will return to STOP automatically.

4 When to use WDT:
When error occur in PLC system.
When the executing time of the program is too long to cause the scanning time to
exceed the content value of D1000. It can be modified by using the following two
methods.
Use WDT command
T1 t2
STEP0 END(FEND)
WDT

Use the set value of D1000 (default is 200ms) to change the watchdog time.
Program
Example

4 If the program scanning time is over 300ms, users can divide the program into 2 parts.
Insert the Watchdog Timer in between, so both programs scanning time will be less
than 200ms.
X0
END
END
WDT
300ms program
150ms program
150ms program
Dividing the program to two parts
so that both parts?scan time are
less than 200ms.
Watchdog timer reset










6 Application Commands API 00-49
DVP-PLC Application Manual 6-14
API

Applicable models
ES EP EH
08


FOR


Start of FOR-NEXT Loop
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
Note: The contact execution command is not necessary
Refer to each model specification for usage range.

16-bit command (3 STEPS)
FOR
Continuous
execution


32-bit command

Flag: None

Command
Explanation

: The number of repeats for the nested loop

API

Applicable models
ES EP EH
09


NEXT

End of FOR-NEXT loop
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
Note: No operand
The command driven by contact is not necessary.

16-bit command (1 STEPS)
NEXT
Continuous
execution


32-bit command

Flag: None

Command
Explanation

4 FOR and NEXT commands are used when n nested loops are needed.
4 N may be within the range of K1 to K32767. If the range NK1, N will always be K1.
4 When it is not desired to execute the FOR to NEXT commands, use the CJ command.
4 Error will occur in the following conditions:
NEXT command is before FOR command.
With FOR command, without NEXT command.
There is a NEXT command after the FEND or END command.
The numbers of FOR to NEXT commands are different.
4 The FOR to NEXT loop can be nested for five levels but please notice that if there are
too many loops, the PLC scanning time will increase and it may cause the watchdog
timer to be activated and result in error. User can use WDT command to modify.
6 Application Commands API 00-49
DVP-PLC Application Manual 6-15
Program
Example
1

4 After loop A operate 3 times, the program after the NEXT command will resume. For
every completed cycle of loop A, loop B will completely executed for 4 times, therefore,
the total number of times that loop B operate will be 3 412 times.
FOR K3
FOR K4
NEXT
NEXT
A B

Program
Example
2

4 Program which executes the FOR to NEXT commands when X7 is off. It does not
execute the FOR to NEXT commands when X7 is on and CJ command jump to P6.

X7
M0
M0
P6
MOV
FOR
MOV D0
D0
K3
K0
Y10
INC
MEXT
X10
D0
D1
CJ
P6

6 Application Commands API 00-49
DVP-PLC Application Manual 6-16
Program
Example
3

4 When the FOR to NEXT command are not executed, CJ command can be used to
jump. When the most internal loop of FOR to NEXT, X1 will be ON and CJ command
will jump to P0 and not be executed.
X0
TMR T0
K10
P0
FOR K4X100
X0
INC
D0
K2
X0
D1
K3
X0
D2
K4
X0
WDT
D3
X1
CJ P0
FOR K5
X0 X0
INC
D4
NEXT
NEXT
NEXT
NEXT
NEXT
END
FOR
INC
FOR
INC
FOR
INC



6 Application Commands API 00-49
DVP-PLC Application Manual 6-17
API

Applicable models
ES EP EH
10

D
CMP
P

Compare
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: If operand S
1
, S
2
use with device F, it is only available in 16-bit
command.
Operand D occupies 3 continuous devices.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
command (CMPP, DCMPP).

16-bit command (7 STEPS)
CMP
Continuous
execution
CMPP
Pulse
execution

32-bit command (13 STEPS)
DCMP
Continuous
execution
DCMPP
Pulse
execution
Flag: None

Command
Explanation

4 : First comparison value : Second comparison value :
Comparison result.
4 The contents of the comparison source and are compared and
denotes the compare result.
4 Two comparison values are compared algebraically and this function compares the two
values that are considered binary values. If b15=1 in 16-bit command or b31=1 in 32-bit
command, the comparison will regard the value as the negative of the binary value.
4 If is set to Y0, then Y0, Y1, Y2 will work as the program example as below.
4 When X10=On, CMP command is driven and one of Y0, Y1, Y2 is On. When X10=Off,
CMP command is not driven and Y0, Y1, Y2 remain in the previous status.
4 The comparison result of , , commands can be got by the parallel connection of
Y0~Y2.

X10
Y0
Y1
Y2
CMP K10 D10 Y0
If K10>D10, Y0 = On
If K10=D10, Y1 = On
If K10<D10, Y2= On

4 Please use RST or ZRST command to reset the comparison result.
Program
Example

X10
RST
M0
RST
RST
M1
M2
X10
ZRST
M0 M2


6 Application Commands API 00-49
DVP-PLC Application Manual 6-18
API

Applicable models
ES EP EH
11

D
ZCP
P

Zone Compare
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

S
D
Note: If operand S
1
, S
2
, S use with device F, it is only available in
16-bit command.
Operand S
1
should be less than Operand S
2
.
Operand D occupies 3 continuous devices.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
command (ZCPP, DZCPP).

16-bit command (9 STEPS)
ZCP
Continuous
execution
ZCPP
Pulse
execution

32-bit command (17 STEPS)
DZCP
Continuous
execution
DZCPP
Pulse
execution
Flag: None


Command
Explanation

4 : First comparison value (Minimum) : Second comparison value
(Maximum) : Comparison value : Comparison result.
4 is compared with its limits and and denotes the compare
result.
4 When , set as the limit to compare.
4 Two comparison values are compared algebraically and this function compares the two
values that are considered binary values. If b15=1 in 16-bit command or b31=1 in 32-bit
command, the comparison will regard the value as the negative of the binary value.
Program
Example

4 If is set to M0, then M0, M1, M2 will work as the program example as below.
4 When X0=On, ZCP command is driven and one of M0, M1, M2 is On. When X0=Off,
ZCP command is not driven and M0, M1, M2 remain in the previous status.
X0
M0
M1
M2
ZCP
If C10 < K10, M0 = On
If K10 < C10 < K100, M1 = On
If C10 > K100, M2 = On
X0
K10 C10 M0 K100
= =

4 Please use RST or ZRST command to reset the comparison result.

X0
RST
M0
RST
RST
M1
M2
X0
ZRST
M0 M2




6 Application Commands API 00-49
DVP-PLC Application Manual 6-19
API

Applicable models
ES EP EH
12 D
MOV
P

Data Move
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: If operand S, D use with device F, it is only available in 16-bit
command.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
command (MOVP, DMOVP)

16-bit command (5 STEPS)
MOV
Continuous
execution
MOVP
Pulse
execution

32-bit command (9 STEPS)
DMOV
Continuous
execution
DMOVP
Pulse
execution
Flag: None

Command
Explanation

4
S
: Data source : Data move destination
4 When the MOV command is driven, the data of is moved to without any
change. If the MOV command is not driven, the content of remain unchanged.
4 If the calculation result is a 32-bit output, (i.e. the application MUL) and the data of a
32-bit high-speed counter, users will have to use DMOV command.
Program
Example

4 MOV command is used in 16-bit command to move data.
When X0=Off, the content of D10 remain unchanged. If X0=On, the data of K10 is
moved to D10 data register.
When X1=Off, the content of D10 remain unchanged. If X1=On, the data of T0 is
moved to D10 data register.
4 DMOV command is used in 32-bit command to move data
When X2=Off, the content of (D31, D30) and (D41, D40) remain unchanged. If X2=On,
the data of (D21, D20) is moved to (D31, D30) data register. Meanwhile, the data of C235
is moved to (D41, D40) data register.
X0
X1
X2
MOV K10 D0
MOV T0 D10
DMOV D20 D30
DMOV C235 D40











6 Application Commands API 00-49
DVP-PLC Application Manual 6-20
API

Applicable models
ES EP EH
13


SMOV
P

Shift Move
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
m
1

m
2

D
n
Note: The usage range of operand m
1
: m
1
=1~ 4
The usage range of operand m
2
: m
2
=1~ m1
The usage range of operand n: n=m
2
~ 4
Refer to each model specification for usage range.

16-bit command (11 STEPS)
SMOV
Continuous
execution
SMOVP
Pulse
execution

32-bit command

Flag: M1168 (mode setting operation
of SMOV)
When M1168=On, BIN mode.
When M1168=Off, BCD mode.

Command
Explanation

4 : Data movementsource : Source position of the first digit to be moved
: Number of source digits to be moved : Data destination of movement
: Destination position for the first digit
4 This command can arrange or combine the data.
Program
Example
1

4 When M1168=Off, X0=On, assign the content of the two digits from the 4
th
digit
(thousands place digital) of D10 (decimal number) and move the assigned data to the
two digits from the 2
nd
digit (hundreds' place digits) of D20 (decimal number). Then, the
content of 10
3
and 10
0
of D20 remain unchaged after SMOV command is executed.
4 When BCD number is higher than 9,999 or be negative (outside range of 0 to 9,999), an
operation error will occur in PLC. Then, the command will not be executed and M1067,
M1068 will be On, D1067 record error code 0E18 (hexidecimal number).
SMOV
M1168
D10 K2 D20 K3 K4
10
3
10
2
10
1
10
0
10
3
10
2
10
1
10
0
No variation
No variation
D10(BIN 16bit)
D10(BCD 4 digits)
D20(BIN 16bit)
D20(BCD 4 digits)
Shift move
Auto conversion
Auto conversion
M1001
X0

If D10=H1234D20=H5678 before executing, D10 wont change and D20=H5128 after
finishing execution.
Program
Example
2

4 When M1168=On, if use SMOV command, the D10 and D20 do not move data in BCD
format. However the data is moved as a 4 digit BIN number.
6 Application Commands API 00-49
DVP-PLC Application Manual 6-21

SMOV
M1168
D10 K2 D20 K3 K4
No variation No variation
D10(BIN 16bit)
D20(BIN 16bit)
Shift move
M1000
X0
Digit 4 Digit 3 Digit 2 Digit 1
Digit 4 Digit 3 Digit 2 Digit 1

Program
Example
3

4 Digit switch connected to the interrupted number inputs can use SMOV command to
combine.
4 Move the right second digit switch to the right second digit of D2 and move the left first
digit switch to the right first digit of D1.
4 Use SMOV command to move the first digit to the third digit of D2 and combine these
two digit switches into one group.
10
1
10
0
10
2
6 4 2
PLC
X13~X10 X27~X20
8 8
8
M1000
BIN
K2X20 D2
D1
SMOV D1 K1 D2 K3 K1
K1X10 BIN
(X20~X27)BCD
(X10~X13)BCD
2 digits D2(BIN)
1 digit D1(BIN)
M1001
M1168










6 Application Commands API 00-49
DVP-PLC Application Manual 6-22
API

Applicable models
ES EP EH
14

D
CML
P

Compliment
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: If operand S, D use with device F, it is only available in 16-bit
command.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
command (CMLP, DCMLP)

16-bit command (5 STEPS)
CML
Continuous
execution
CMLVP
Pulse
execution

32-bit command (9 STEPS)
DCML
Continuous
execution
DCMLP
Pulse
execution
Flag: None

Command
Explanation

4 : Transfer data source : Transfer destination device
4 Counter phase the contents of (01, 10) and have the contents transferred to
. If the content is Constant K, this Constant K will be converted to the BIN value
automatically.
Program
Example
1

4 This command can be used during the counter-phase output.
4 When X10=ON, contents of D1, b0~b3, will be counter transferred to K1Y0.
X10
CML K1Y0
D1

b
0
b
1
b
2
b
3
b
15
D1 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
Symbol bit (0=positive, 1=negative)
0 1 0 1
No variation
Transfer the
counter-phase data
Program
Example
2

4 The left loop shown below can be displayed as the right program example by using CML
command.
X000
M0
X001
M1
X002
M2
X003
M3
X000
M0
X001
M1
X002
M2
X003
M3
M1000
CML
K1M0 K1X0
Normal on contact


6 Application Commands API 00-49
DVP-PLC Application Manual 6-23

API

Applicable models
ES EP EH
15


BMOV
P

Block Move
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: The usage range of operand n=1~ 512
Refer to each model specification for usage range.
ES series models do not support the pulse execution command
(BMOVP).

16-bit command (7 STEPS)
BMOV
Continuous
execution
BMOVP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Head source device : Head destination device : Block of multiple
data
4 This command is used to move an assigned block of multiple data to a new destination.
Move the contents of the register, with this register obtained from counting
the registers within the -assigned numbers, to the register within the
-assigned number. If the -assigned points exceed the usage range of this
device, only those that are within the enabled range will be moved.
Program
Example
1

4 When X10=On, move the contents of the four registers D0~D3 to their corresponding
registers D20~D23.
X10
D20 K4
D0
D1
D2
D3
D20
D21
D22
D23
n=4
Program
Example
2

4 If move the specified bit device, KnX, KnY, KnM, KnS, the digit numbers of and
should be the same and this also means the number of n should be the same.
4 ES series models do not support KnX, KnY, KnM, KnS devices.
M1000
D0 D20 K4
M0
M1
M2
M3
M4
M5
M6
M7
M8
M9
M10
n=3
M11
Y10
Y11
Y12
Y13

6 Application Commands API 00-49
DVP-PLC Application Manual 6-24
Program
Example
3

4 The BMOV command has built the automatic movement as the program example below
to prevent overwriting errors from occurring when the specified numbers of and
coincide.
When > , the BMOV command is processed in the order as 123
When < , the BMOV command is processed in the order as 321.
But, be sure to avoid the specified number being continuous when < in
ES series models. Otherwise, the execution result will be the same value. For
example, when the BMOV command is processed in the order as 321, the
content value of D11 to D13 will all be the content value of D10.
X10
BMOV D20 D19 K3
D19
D20
D21
D11
D13
X11
BMOV D10 D11 K3
D20
D21
D22
D10
D11
D12
1
2
3
1
2
3


API

Applicable models
ES EP EH
16

D
FMOV
P

Fill Move
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: If operand S, D use with device F, it is only available in 16-bit
command.
The usage range of operand n:
n=1~ 512(16-bit command), n=1~ 256 (32-bit command)
Refer to each model specification for usage range.
ES series models do not support the pulse execution
command (FMOVP, DFMOVP)

16-bit command (7 STEPS)
FMOV
Continuous
execution
FMOVP
Pulse
execution

32-bit command (13 STEPS)
DFMOV
Continuous
execution
DFMOVP
Pulse
execution
Flag: None

Command
Explanation

4 : Source device : Head destination device : A quantity of multiple
devices
4 The data stored in the source device is moved to every device within the range of
destination device. Move the contents of to the register, with this
register obtained from counting the registers within the -assigned numbers. If the
-assigned devices exceed the usage range, only those that are within the enabled
range will be moved.
4 ES series models do not support KnX, KnY, KnM, KnS devices.
6 Application Commands API 00-49
DVP-PLC Application Manual 6-25
Program
Example

4 When X0=ON, move Constant K10 to the continuous five registers (D10~D14) starting
from D10.
X10
D10 K5 FMOV K10
K10
K10
K10
K10
K10
K10 D10
D11
D12
D13
D14
n=5


API

Applicable models
ES EP EH
17

D
XCH
P

Data Exchange
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D
1

D
2

Note: If operand D
1
, D
2
use with device F, it is only available in 16-bit
command.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
command (XCHP, DXCHP).


16-bit command (5 STEPS)
XCH
Continuous
execution
XCHP
Pulse
execution

32-bit command (9 STEPS)
DXCH
Continuous
execution
DXCHP
Pulse
execution
Flag: None

Command
Explanation

4 : First exchange data : Second exchange data
4 Exchange the contents of and with each other.
4 This command is usually pulse execution (XCHP).
Program
Example
1

4 When X0=OffOn, the contents of D20 and D40 exchange with each other.
X0
D40 XCHP D20
Before
execution
After
execution
120
120 40
40
D20
D40
D20
D40

6 Application Commands API 00-49
DVP-PLC Application Manual 6-26
Program
Example
2

4 When X0=OffOn, the contents of D20 and D40 exchange with each other.
Before
execution
After
execution
40 20
D100
D101
D100
D101
X0
D200 D100
20 40
D200
D201
D200
D201

Footnote

4 In 16-bit command, when the devices specified by and are the same and
M1303=On, the upper and lower 8-bit contents of that specified devices will exchange.
4 In 32-bit command, when the devices specified by and are the same and
M1303=On, the upper and lower 8-bit contents of that 32-bit devices will exchange.
4 When X0=On and M1303=On, the upper and lower 8-bit contents of D100, D0101 will
exchange.
X0
M1303
9
20
8
40
D100L
D100H
8
40
9
20
D101L
D101H
D100L
D100H
D101L
D101H
DXCHP D100 D100
Before
execution
After
execution


API

Applicable models
ES EP EH
18

D
BCD
P

Converts BIN Data into BCD
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D


Note: If operand S, D use with device F, it is only available in 16-bit
command.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
command (BCDP, DBCDP)


16-bit command (5 STEPS)
BCD
Continuous
execution
BCDP
Pulse
execution

32-bit command (9 STEPS)
DBCD
Continuous
execution
DBCDP
Pulse
execution
Flag: M1067 (operation error)
M1068 (operation error)
D1067 (error code)

Command
Explanation

4 Converts BIN data (0 to 9999) of the source device into BCD and transfers the
result to the device .
4 If the BCD conversion result is outside the range of 0 to 9999, an operation error occurs,
the error flag M1067, M1068 will be On and D1067 record error code 0E18
(hexadecimal number).
6 Application Commands API 00-49
DVP-PLC Application Manual 6-27
4 If the DBCD conversion result is outside the range of 0 to 99,999,999, an operation error
occurs, the error flag M1067, M1068 will be On and D1067 record error code 0E18
(hexadecimal number).
4 The operation value of four fundamental operations (+, , , ), INC and DEC command
in PLC are executed in BIN format. This command can be used to output BIN format
data in BCD format value directly to a seven segment display.
Program
Example

4 When X0=ON, the binary data D10 is converted into BCD number, and stored at K4Y0
(Y0~Y3).
X0
BCD D10 K1Y0

When D10=001E (Hex)=0030 (decimal number), the execution result will be
Y0~Y3=0000(BIN).

API

Applicable models
ES EP EH
19

D
BI N
P

Converts BCD Data into BIN
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D


Note: If operand S, D use with device F, it is only available in 16-bit
command.
Refer to each model specification for usage range.
ES series models do not support pulse execution
command (BINP, DBINP)

16-bit command (5 STEPS)
BIN
Continuous
execution
BINP
Pulse
execution

32-bit command (9 STEPS)
DBIN
Continuous
execution
DBINP
Pulse
execution
Flag: M1067 (operation error)
M1068 (operation error)
D1067 (error code)

Command
Explanation

4 : Data source : Converted result
4 Converts BCD data (0 to 9,999) of the source device into BIN and transfers the
result to the device .
4 The enabled range of source device : BCD (0 to 9,999), DBCD (0 to 99,999,999)
4 If the content of source device is not BCD value (each digit of which is
indicated as HEX being outside the range of 0 to 9), an operation error will occur, the
error flag M1067, M1068 will be On and D1067 records error code 0E18.
4 Constant K and H is automatically converted into the BIN data. There is no necessity for
constant to use this command.
Program
Example

4 When X0=ON, the BCD data K1X0 is converted to BIN data, and stored the result at
D10.
X0
BIN D10 K1X0


6 Application Commands API 00-49
DVP-PLC Application Manual 6-28
Footnote

4 The application explanation of BCD and BIN command:
The BIN command is used to covert the source data into BIN data and store in the
PLC when PLC read a BCD format digit switch from external equipment.
The BCD command is used to convert the stored data into BCD data and transmit it
to the 7-segment display when PLC display the stored data on a BCD format
7-segment display from external equipment.
When X0=On, convert K4X0(BCD data) into BIN data and transmit it to D100. Then,
convert BIN data of D100 into BCD data and transmit it to K4Y20.
X0
BIN D100 K4X0
BCD D100 K4Y20

10
1
10
0
10
2
6 4 2
X17 X0
8 8 8
10
3
6
8
4 digit BCD format switch
4 digit BCD format
7-segment display
Y37 Y20
4 digit BCD value
use the BIN command to
store BIN value into D100
use the BCD command to
convert the BIN value in D100
convert to be 4 digit BCD value













6 Application Commands API 00-49
DVP-PLC Application Manual 6-29
API

Applicable models
ES EP EH
20

D
ADD
P

Perform the Addition of BIN Data
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D


Note: If operand S
1
, S
2
, D use with device F, it is only available in
16-bit command.
Refer to each model specification for usage range.
ES series models do not support the pulse execution command
(ADDP, DADDP).

16-bit command (7 STEPS)
ADD
Continuous
execution
ADDP
Pulse
execution

32-bit command (13 STEPS)
DADD
Continuous
execution
DADDP
Pulse
execution
Flag: M1020 (Zero flag)
M1021 (Borrow flag)
M1022 (Carry flag)
Refer to following for detail.

Command
Explanation

4 : Augend : Addend : Addition result
4 + = . Performs the addition on BIN data and the BIN data
, and stores the addition result into the device .
4 The most significant bit are the symbolic bit 0 and 1. 0 indicates positive and 1 indicates
negative. All calculation are algebraically processed, i.e. 3 + (-9) = -6.
4 Flag changes of binary addition
16-bit command:
If the operation result is 0, then the Zero flag, M1020 is set to ON.
If the operation result exceeds -32,768, the borrow flag, M1021 is set to ON.
If the operation result exceeds 32,767, the carry flag, M1022 is set to ON.
32-bit command:
1. If the operation result is 0, then the Zero flag, M1020 is set to ON.
2. If the operation result exceeds -2,147,483,648, the borrow flag, M1021 is set to ON.
3. If the operation result exceeds 2,147,483,647, the carry flag, M1022 is set to ON.
Program
Example
1

4 16-bit command:
When X0 is ON, the data contained within the augend D0 and addend D10 is combined
and the total is stored in the result device D20.
X0
ADD D0 D10 D20

(D0) + (D10) = (D20)
Program
Example
2

4 32-bit command:
When X0 is ON, the data contained within the augend (D31, D30) and addend (D41, D40)
is combined and the total is stored in the result device (D51, D50). (D30, D40, D50 is the
lower 16-bit data, and D31, D41, D51 is the higher 16-bit data)


X10
DADD D30 D40 D50

(D31, D30) + (D41, D40) = (D51, D50)
6 Application Commands API 00-49
DVP-PLC Application Manual 6-30
Footnote

4 Flag operations:
-2 -1 0 -32,768 B B B B B -1 0 1 32,767 0 1 2 B B B
-2 -1 0 -2,147,483,648 B B B B B -1 0 1 2,147,483,647 0 1 2 B B B
16-bit command: Zero flag Zero flag Zero flag
Borrow flag
the most significant bit
becomes ? ?(negative)
32-bit command: Zero flag
Zero flag Zero flag
the most significant bit
becomes ? ?(positive)
Carry flag
Borrow flag
the most significant bit
becomes ? ?(negative)
the most significant bit
becomes ? ?(positive)
Carry flag


API

Applicable models
ES EP EH
21

D
SUB
P

Perform the Subtraction of BIN
Data
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D


Note: If operand S1, S2, D use with device F, it is only available in
16-bit command.
Refer to each model specification for usage range.
ES series models do not support the pulse execution command
(SUBP, DSUBP).

16-bit command (7 STEPS)
SUB
Continuous
execution
SUBP
Pulse
execution

32-bit command (13 STEPS)
DSUB
Continuous
execution
DSUBP
Pulse
execution
Flag: M1020 (Zero flag)
M1021 (Borrow flag)
M1022 (Carry flag)
Please refer to the command
explanation of ADD command

Command
Explanation

4 : Minuend : Subtrahend : Subtraction result
4 = . Performs the subtraction of BIN data and the BIN data
, and stores the subtraction result into the device .
4 The most significant bit are the symbolic bit 0 and 1. 0 indicates positive and 1 indicates
negative. All calculation are algebraically processed.
4 Flag changes of binary subtraction
16-bit command:
If the operation result is 0, then the Zero flag, M1020 is set to ON.
If the operation result exceeds 32,768, the borrow flag, M1021 is set to ON.
If the operation result exceeds 32,767, the carry flag, M1022 is set to ON.
32-bit command:
. If the operation result is 0, then the Zero flag, M1020 is set to ON.
. If the operation result exceeds 2,147,483,648, the borrow flag, M1021 is set to ON.
. If the operation result exceeds 2,147,483,647, the carry flag, M1022 is set to ON.

6 Application Commands API 00-49
DVP-PLC Application Manual 6-31
4 The flag operations of SUB command please refer to the flag operations of ADD
command on the previous page.

Program
Example
1

4 16-bit command:
When X0 is ON, the data contained within the subtrahend D10 is subtracted from the data
contained within the minuend D0 and the result of this calculation is stored in the result
device D20.
X0
SUB D0 D10 D20

(D0) (D10) = (D20)
Program
Example
2

4 32-bit command:
When X0 is ON, the data contained within the subtrahend (D41, D40) is subtracted from
the data contained within the minuend (D31, D30) and the result of this calculation is
stored in the result device (D51, D50). (D30, D40, D50 is the lower 16-bit data, and D31,
D41, D51 is the higher 16-bit data)
X10
DSUB D30 D40 D50

(D31, D30) (D41, D40) = (D51, D50)

API

Applicable models
ES EP EH
22

D
MUL
P

Perform the Multiplication of BIN
Data
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D


Note: If operand S1, S2 use with device F, it is only available in
16-bit command.
If operand D use with device E, it is only available in 16-bit
command.
In 16-bit command, operand D occupies 2 continuous devices.
In 32-bit command, operand D occupies 4 continuous devices.
Refer to each model specification for usage range.
ES series models do not support the pulse execution Command
(MULP, DMULP).

16-bit command (7 STEPS)
MUL
Continuous
execution
MULP
Pulse
execution

32-bit command (13 STEPS)
DMUL
Continuous
execution
DMULP
Pulse
execution
Flag: None

Command
Explanation

4 : Multiplicand : Multiplier : Multiplication result
4 = . Performs the Multiplication of BIN data and the BIN data
, and stores the multiplication result into the device . Please pay careful
attention to the polarity display of the operation result of , and in the
16-bit and 32-bit command.
4 16-bit command:
6 Application Commands API 00-49
DVP-PLC Application Manual 6-32
b15................ b00
X =
b15................ b00 b31............ b16 b15............. b00
+1
b15 is a symbol bit b15 is a symbol bit b31 is a symbol bit D+1) (b15 of
b15=0,S i s a positive val ue 1
b15=1,S i s a negative value 1
b15=0,S i s a positive val ue 2
b15=1,S i s a negative value 2
b31=0,S is a positive val ue 2
b31=1,S is a negative value 2

When is bit device, it can specify K1~K4 and produce a 16-bit result. Then, the flag
M1067, M1068 will be On and D1067 record error code 0E19.
4 32-bit command:
b31.. b16
X
=
+1
b31 is a symbol bit b31 is a symbol bit b63 is a symbol bit ) (b15 of D+1
b31=0,S (S +1) are positive val ue 1 1
b31=1,S (S +1) are negative val ue 1 1
b31=0,S (S +1) are positive val ue 2 2
b31=1,S (S +1) 2 2 are negative value
b63=0, D1(D1+1) (D1+2) (D1+3) are positive value
b63=1, D1(D1+1) (D1+2) (D1+3) are negative value
b15.. b00 b31.. b16 b15.. b00
+1
b63. b48 b47. b32 b31. b16 b15. b00
+3 +2 +1

4 When is bit device, it can specify K1~K8 and produce a 32-bit result. The
destination device is used to store low 32-bit data only.
Program
Example

4 16-bit command:
A 16-bit data source, D10 is multiplied by another 16-bit data source, D0 and the total is a
32-bit result, D20. The upper 16-bit data is stored in D21 and the lower one is stored in
D20. The polarity of the result is indicated by the OFF/ON of the most significant bit. OFF
indicates the value of positive 0 and ON indicates the value of negative 1.
X0
MUL D0 D10 D20
MUL D0 D10 K8M0

(D0) (D10) = (D21, D20)
16-bit 16-bit = 32-bit

API

Applicable models
ES EP EH
23

D
DI V
P

Perform the Division of BIN Data
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D


Note: If operand S1, S2 use with device F, it is only available in
16-bit command.
If operand D use with device E, it is only available in 16-bit
command.
In 16-bit command, operand D occupies 2 continuous
devices.
In 32-bit command, operand D occupies 4 continuous
devices.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
Command (ADDP, DADDP).

16-bit command (7 STEPS)
DIV
Continuous
execution
DIVP
Pulse
execution

32-bit command (13 STEPS)
DDIV
Continuous
execution
DDIVP
Pulse
execution
Flag: None

6 Application Commands API 00-49
DVP-PLC Application Manual 6-33
Command
Explanation

4 : Dividend : Divisor : Quotient and Remainder
4 = . Performs the division of BIN data and the BIN data
, and stores the result into the device . Please pay careful attention to the
polarity display of the operation result of , and in the 16-bit and 32-bit
command.
4 This command is not executed when the divisor is 0. Then, the flag M1067, M1068 will
be On and D1067 record error code 0E19.
4 16-bit command:
+1
= /
Quotient
Remainder

When
D
is bit device, it can specify K1~K4 to produce a 16-bit result and occupies 2
continuous groups. In regards to the operation result, the quotient and remainder are
stored.
4 32-bit command:
+1
/ =
+1 +1 +3 +2
Quotient
Remainder

When
D
is bit device, it can specify K1~K8 and produce a 32-bit result. In regards to
the operation result, only the quotient is stored.
Program
Example

4 When X0 is ON, the primary source D0 (divisor) is divided by the second source D10
(dividend). The quotient is specified to be stored in D20 and the remainder is specified to
be stored in D21. The polarity of the result is indicated by the OFF/ON of the most
significant bit. OFF indicates the value of positive and ON indicates the value of
negative.

X0
DIV D0 D10 D20
D0 D10 K4Y0 DIV









6 Application Commands API 00-49
DVP-PLC Application Manual 6-34
API

Applicable models
ES EP EH
24

D
I NC
P

Perform the Addition of 1
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D


Note: If operand D use with device F, it is only available 16-bit
command.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
(INCP, DINCP).

16-bit command (3 STEPS)
INC
Continuous
execution
INCP
Pulse
execution

32-bit command (5 STEPS)
DINC
Continuous
execution
DINCP
Pulse
execution
Flag: None

Command
Explanation

4 : Destination device
4 If the command is not the pulse execution command, 1 is added to the value of
destination device on every execution of the command.
4 This command is usually pulse execution (INCP, DINCP).
4 In 16-bit command, when +32,767 is reached, 1 is added and it will write a value
of 32,768 to the destination device. In 32-bit command, when +2,147,483,647 is
reached, 1 is added and it will write a value of -2,147,483,648 to the destination device.
4 Flag M1020~M1022 wont be influenced by the operation result of this command.
Program
Example

4 When X0 is ON, the content of D0 will perform the addition of 1.
X0
INCP D0


API

Applicable models
ES EP EH
25

D
DEC
P

Perform the Subtraction of 1
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D


Note: If operand D use with device F, it is only available in 16-bit
command.
Refer to each model specification for usage range.
ES series models do not support pulse the execution
(DECP, DDECP).

16-bit command (3 STEPS)
DEC
Continuous
execution
DECP
Pulse
execution

32-bit command (5 STEPS)
DDEC
Continuous
execution
DDECP
Pulse
execution
Flag: None

Command
Explanation

4 : Destination device
4 If the command is not the pulse execution command, 1 is subtracted to the value of
destination device on every execution of the command.
4 This command is usually pulse execution (INCP, DINCP).
4 In 16-bit command, when 32,768 is reached, 1 is subtracted and it will write a value of
+32,767 to the destination device. In 32-bit command, when -2,147,483,648 is reached,
1 is subtracted and it will write a value of +2,147,483,647 to the destination device.
6 Application Commands API 00-49
DVP-PLC Application Manual 6-35
4 Flag M1020~M1022 wont be influenced by the operation result of this command.
Program
Example

4 When X0 is ON, the content of D0 will perform the subtraction of 1.
X0
DECP D0


API

W Applicable models
ES EP EH
26

D
AND
P

Perform the Logical Product
(AND) Operation
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D


Note: If operand S
1,
S
2,
D use with device F, it is only available in
16-bit command.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
(WANDP, DANDP)

16-bit command (7 STEPS)
WAND
Continuous
execution
WANDP
Pulse
execution

32-bit command (13 STEPS)
DAND
Continuous
execution
DANDP
Pulse
execution
Flag: None

Command
Explanation

4 : First data source device : Second data source device
4 : Operation result
4 Performs the logical product of the data source device and , and stores the
operation result into the device .
4 General operation rule: If one of the bit contained within the data source devices is 0,
then the operation result is also 0.
Program
Example
1

4 When X0 is ON, the 16-bit data source device D0 and D2 are analyzed and the
operation result of the logical WAND command is stored in the device D4.

WAND D0 D2 D4
X0

0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
WAND
b15 b00
Before
execution
After
execution
D0
D2
D4

6 Application Commands API 00-49
DVP-PLC Application Manual 6-36
Program
Example
2

4 When X1 is ON, the 32-bit data source device (D11, D10) and (D21, D20) are analyzed
and the operation result of the logical DAND command is stored in the device (D41,
D40).
X1
DAND D10 D20 D40

0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
DAND
b31
Before
execution
After
execution
0 0 0 0 1 1 1 1 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1
b15 b0
D11 D10
D21 D20
D41 D40

API

W Applicable models
ES EP EH
27

D
OR
P

Perform the Logical Sum (OR)
Operation
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D


Note: If operand S
1,
S
2,
D use with device F, it is only available in
16-bit command.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
(WORP, DORP)

16-bit command (7 STEPS)
WOR
Continuous
execution
WORP
Pulse
execution

32-bit command (13 STEPS)
DOR
Continuous
execution
DORP
Pulse
execution
Flag: None

Command
Explanation

4 : First data source device : Second data source device
4 : Operation result
4 Performs the logical sum of the data source device and , and stores the
operation result into the device .
4 General operation rule: If one of the bit contained within the data source devices is 1,
then the operation result is also 1.
Program
Example
1

4 When X0 is ON, the 16-bit data source device D0 and D2 are analyzed and the
operation result of the logical WOR command is stored in the device D4.
WOR D0 D2 D4
X0
WOR D0 D2 D4
X0

0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1
0 0 0 0 1 1 1
WOR
b15 b00
0 0 0 0 0 0 1 1
0 1 1 1 0 1
1 1 1 1 1 1 1 1 1
Before
execution
After
execution
D0
D2
D4
0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1
0 0 0 0 1 1 1
b15 b00
0 0 0 0 0 0 1 1
0 1 1 1 0 1
1 1 1 1 1 1 1 1 1
0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1
0 0 0 0 1 1 1
WOR
b15 b00
0 0 0 0 0 0 1 1
0 1 1 1 0 1
1 1 1 1 1 1 1 1 1
Before
execution
After
execution
D0
D2
D4
0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1
0 0 0 0 1 1 1
b15 b00
0 0 0 0 0 0 1 1
0 1 1 1 0 1
1 1 1 1 1 1 1 1 1

6 Application Commands API 00-49
DVP-PLC Application Manual 6-37
Program
Example
2

4 When X1 is ON, the 32-bit data source device (D11, D10) and (D21, D20) are analyzed
and the operation result of the logical DOR command is stored in the device (D41, D40).
X1
DOR D10 D20 D40

0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1
0 0 0 0 1 1 1
b31
0 0 0 0 0 0 1 1
0 1 1 1 0 1
1 1 1 1 1 1 1 1 1
Before
execution
After
execution
D11 D10
0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1
0 0 0 0 1 1 1
DOR
b
0 0 0 0 0 0 1 1
0 1 1 1 0 1
1 1 1 1 1 1 1 1 1
0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1
0 0 0 0 1 1 1
b15 b0
0 0 0 0 0 0 1 1
0 1 1 1 0 1
1 1 1 1 1 1 1 1 1
D21 D20
D41 D40


API

W Applicable models
ES EP EH
28

D
XOR
P

Perform the Exclusive Logical
Add (XOR) Operation
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D


Note: If operand S
1,
S
2,
D use with device F, it is only available in
16-bit command.
Refer to each model specification for usage range.
ES series models do not support the pulse execution
(WXORP, DXORP).

16-bit command (7 STEPS)
WXOR
Continuous
execution
WXORP
Pulse
execution

32-bit command (13 STEPS)
DXOR
Continuous
execution
DXORP
Pulse
execution
Flag: None

Command
Explanation

4 : First data source device : Second data source device :
Operation result
4 Performs the exclusive logical add of the data source device and , and
stores the operation result into the device .
4 General operation rule: If both of the bit contained within the two data source devices are
the same, then the operation result is 0. But if both of the bit contained within the two
data source devices are different, then the operation result is 1.
Program
Example
1

4 When X0 is ON, the 16-bit data source device D0 and D2 are analyzed and the
operation result of the logical WXOR command is stored in the device D4.
0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1
0 0 0 0 1 1 0
WOR
b15 b00
0 0 0 0 0 0 1 1
0 1 1 1 0 1
1 1 0 0 1 1 1 1 0
WXOR D0 D2 D4
X0
Before
execution
After
execution
D0
D2
D4
0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1
0 0 0 1 1
b15 b00
0 0 0 0 0 0 1 1
0 1 1 1 0 1
1 1 1 1 1 1

6 Application Commands API 00-49
DVP-PLC Application Manual 6-38
Program
Example
2

4 When X1 is ON, the 32-bit data source device (D11, D10) and (D21, D20) are analyzed
and the operation result of the logical DXOR command is stored in the device (D41,
D40).
X1
DXOR D10 D20 D40

0 0 1 1 1 1 1 1
0 0 0 0 0 0 0 1 1 1
1 1 1 1 0 0 0
b31
1 1 1 1 1 1 0 0
1 0 0 0 0
1 1 1 1 0 0 1 1 1
Before
execution
After
execution
D11 D10
0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1
DXOR
b
1
1 1 1 1 1 1 1
D21 D20
D41 D40
0 0 1 1 1 1 1 1
0 0 0 0 0 0 0 1 1 1
1 1 1 1 0 0 0
b15
1 1 1 1 1 1 0 0
1 0 0 0 0
1 1 1 1 0 0 1 1 1
0 0 1 1 1 1 1 1
0 0 0 0 0 0 1 1 1 1
1 1 1 1 1 1 1
b0


API

Applicable models
ES EP EH
29

D
NEG
P

Negation
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D
Note: If operand D uses with device F, it is only available in 16-bit
command.
Refer to each model specification for usage range.
ES series models do not support pulse execution (NEGP,
DNEGP).

16-bit command (3 STEPS)
NEG
Continuous
execution
NEGP
Pulse
execution

32-bit command (5 STEPS)
DNEG
Continuous
execution
DNEGP
Pulse
execution
Flag: None

Command
Explanation

4 : Once the command is executed, the specified device, , will be served as
the complement of 2.
4 This command can convert the negative BIN value to the positive number, and that is, to
get its absolute value.
4 This command is usually pulse execution (NEGP, DNEGP).
Program
Example
1

4 When X goes from OFF ON, every bit of the D10 contents will be countered (01,
10) and be added with 1, and will then be saved in the original register, D10.
X0
NEGP D10

Program
Example
2

4 Obtaining the absolute value of a negative value:
1. When the 15
th
bit of D0 is 1, M0 is ON. (D0 is a negative value).
2. When M0 is ON, the absolute value of D0 can be obtained using the NEG command.
M1000
BON D0 K15 M0
M0
NEGP D0
Normal ON contact

6 Application Commands API 00-49
DVP-PLC Application Manual 6-39
Program
Example
3

4 Obtaining the absolute value by the result of the subtraction
1. When D0>D2, M0=ON.
2. When D0=D2, M1=ON.
3. When D0<D2, M2=ON.
4. Then D4 can be obtained and it will be a positive value.
X0
CMP D0 D2 M0
M0
SUB D0 D2 D4
M2
SUB D2 D0 D4
M1

6 Application Commands API 00-49
DVP-PLC Application Manual 6-40
Footnote

4 Indication of the negative value and absolute value
The content of the most significant bit of the register indicates the positive and
negative value. It is a positive value when the content is 0 and it is a negative
value when the content is 1.
If it is a negative value, the absolute value can be obtained by using the NEG
command (API 29).
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(D0=2)
(D0=1)
(D0=0)
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
(D0=-1)
0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0
(D0)+1=1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
(D0=-2)
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
(D0)+1=2
1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 1
(D0=-3)
0 0 0 1 0 0 0 0 0 0 0 0 0 1 0 0
(D0)+1=3
1 1 1 1 1 0 1 1 1 1 1 1 1 1 1 0
(D0=-4)
0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
(D0)+1=4
1 1 1 1 1 1 1 1 1 0 1 1 1 1 1 1
(D0=-5)
0 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0
(D0)+1=5
1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1
(D0=-32,765)
1 1 1 1 1 1 1 1 0 1 1 1 1 0 1 1
(D0)+1=32,765
1 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0
(D0=-32,766)
1 1 1 0 1 1 1 1 0 1 1 1 1 1 1 1
(D0)+1=32,766
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
(D0=-32,767)
1 1 1 1 1 1 1 1 0 1 1 1 1 1 1 1
(D0)+1=32,767
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(D0=-32,768)
(D0)+1=32,768
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Max. absolute value is 32,767



6 Application Commands API 00-49
DVP-PLC Application Manual 6-41
API

Applicable models
ES EP EH
30

D
ROR
P

Rotate to the Right
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D
n
Note: If operand D uses with device F, it is only available in 16-bit
command.
If operand D is specified as KnY, KnM, KnS, only K4
(16-bit) and K8 (32-bit) is valid.
Essential condition: 1n16 (16-bit), 1n32 (32-bit)
Refer to each model specification for usage range.
ES series models do not support pulse execution (RORP,
DRORP).

16-bit command (5 STEPS)
ROR
Continuous
execution
RORP
Pulse
execution

32-bit command (9 STEPS)
DROR
Continuous
execution
DRORP
Pulse
execution
Flag: M1022 (Carry flag)

Command
Explanation

4 : Rotation device (destination device) : Bit places of one time rotation
4 The bit pattern of device is rotated bit places to the right on every
operation of the command.
4 This command is usually pulse execution (RORP, DRORP).
Program
Example

4 When X0 goes from OFF to ON, the 16 bit data of D10 will rotate 4 bits to the right, as
shown in the diagram, and b3 that located at D10 originally will then be moved to the
carry flag (CY) M1022.

0 1 1 1 0 1 0 1 0 0 1 1 1 0 0 1
0 1 0 1 1 1 0 0 1 1 1 1 0 0 1 0 0
upper bit lower bit
upper bit lower bit
*
X0
RORP D10 K4
Rotate to the right
16 bits
Carry
flag
Carry
flag
After one rotation
to the right
D10
D10










6 Application Commands API 00-49
DVP-PLC Application Manual 6-42
API

Applicable models
ES EP EH
31

D
ROL
P

Rotate to the Left
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D
n
Note: If operand D uses with device F, it is only available in 16-bit
command.
If operand D is specified as KnY, KnM, KnS, only K4
(16-bit) and K8 (32-bit) is valid.
Essential condition: 1n16 (16-bit), 1n32 (32-bit)
Refer to each model specification for usage range.
ES series models do not support pulse execution (ROLP,
DROLP).

16-bit command (5 STEPS)
ROL
Continuous
execution
ROLP
Pulse
execution

32-bit command (9 STEPS)
DROL
Continuous
execution
DROLP
Pulse
execution
Flag: M1022 (Carry flag)

Command
Explanation

4 : Rotation device (destination device) : Bit places of one time rotation
4 The bit pattern of device is rotated bit places to the left on every
operation of the command.
4 This command is usually pulse execution (ROLP, DROLP).
Program
Example

4 When X0 goes from OFF ON, the 16 bit data of D10 will rotate 4 bits to the left, as
shown in the diagram, and b12 that located at D10 originally will then be moved to the
carry flag (CY) M1022.
X0
D10 K4
1 1 1 1 1 1 0 0 0 0 0 1 1 0 0 0
1 1 0 0 0 0 0 1 1 0 0 1 1 0 1 1 1
16 bits
Rotate to the left
After one rotation
to the left
Carry
flag
Carry
flag
D10
D10
upper bit
upper bit
lower bit
lower bit










6 Application Commands API 00-49
DVP-PLC Application Manual 6-43
API

Applicable models
ES EP EH
32

D
RCR
P

Rotate to the Right with the Carry
flag
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D
n
Note: If operand D uses with device F, it is only available in 16-bit
command.
If operand D is specified as KnY, KnM, KnS, only K4 (16-bit)
and K8 (32-bit) are valid.
Essential condition: 1n16 (16-bit), 1n32 (32-bit)
Refer to each model specification for usage range.
ES series models do not support pulse execution (RCRP,
DRCRP).

16-bit command (5 STEPS)
RCR
Continuous
execution
RCRP
Pulse
execution

32-bit command (9 STEPS)
DRCR
Continuous
execution
DRCRP
Pulse
execution
Flag: M1022 (Carry flag)

Command
Explanation

4 : Rotation device (destination device) : Bit places after one time rotation
4 The bit pattern of device with the attached carry flag (M1022) is rotated
bit places to the right on every operation of the command.
4 This command is usually pulse execution (RCRP, DRCRP).
Program
Example

4 When X0 goes from OFF to ON, the 16 bit data of D10, including the attached carry
flag (M1022), will rotate 4 bits to the right, as shown in the diagram, and b3 that
located at D10 originally will then be moved to the carry flag M1022, and that the
original contents of the carry flag M1022 will be moved to the bit of b12.
0 0 0 1 1 1 0 0 0 1 0 0 1 0 0 1
1 0 0 0 1 1 0 0 1 1 1 0 0 0 0 0 1
X0
D10 K4
Rotate to the right
16 bits
Carry
flag
Carry
flag
After one rotation
to the right
lower bit
lower bit upper bit
upper bit
1 D10
D10








6 Application Commands API 00-49
DVP-PLC Application Manual 6-44
API

Applicable models
ES EP EH
33

D
RCL
P

Rotate to the Left with the Carry
flag Attached
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D
n
Note: If operand D uses with device F, it is only available in 16-bit
command.
If operand D is specified as KnY, KnM, KnS, only K4
(16-bit) and K8 (32-bit) is valid.
Essential condition: 1n16 (16-bit), 1n32 (32-bit)
Refer to each model specification for usage range.
ES series models do not support pulse execution (RCLP,
DRCLP).

16-bit command (5 STEPS)
RCL
Continuous
execution
RCLP
Pulse
execution

32-bit command (9 STEPS)
DRCL
Continuous
execution
DRCLP
Pulse
execution
FlagM1022 (Carry flag)

Command
Explanation

4 : Rotation device (destination device) : Bit places after one time rotation
4 The bit pattern of device with the attached carry flag (M1022) is rotated
bit places to the left on every operation of the command.
4 This command is usually pulse execution (RCLP, DRCLP).
Program
Example

4 When X0 goes from OFF to ON, the 16 bit data of D10, including the attached carry
flag (M1022), will rotate 4 bits to the left, as shown in the diagram, and b12 that
located at D10 originally will then be moved to the carry flag M1022, and that the
original contents of the carry flag M1022 will be moved to the bit of b3.
X0
RCLP D10 K4
1 1 1 1 1 1 0 0 0 0 0 1 1 0 0 0
1 1 0 0 0 0 0 1 0 0 0 0 1 1 1 1
16 bits
Rotate to the left
After one rotation
to the left
Carry
flag
Carry
flag
upper bit lower bit
upper bit
lower bit
D10
D10









6 Application Commands API 00-49
DVP-PLC Application Manual 6-45
API

Applicable models
ES EP EH
34


SFTR
P

Shifts the Data of Device
Specified to the Right
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D


n
1

n
2

Note: Essential condition: 1n
1
1024, 1 n
2
n1
In ES series models: 1n
2
n
1
512
Refer to each model specification for usage range.
ES series models do not support pulse execution (SFTRP).

16-bit command (9 STEPS)
SFTR
Continuous
execution
SFTRP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Starting number of shift device (source device) : Starting number of
specified shift device (destination device) : Specified bit stack of data length
: Bit places after one time shift
4 Shifts data bits of device to the right by bits. bits, which
begin with , are shifted to the right.
4 This command is usually pulse execution (SFTRP).
Program
Example


4 When X0 is in the rising-edge, the 16 bit data of M0~M15 will shift 4 bits to the right.
4 Please refer to the following O~O steps to perform SFTR command of one time scan.
O M3~M0 carry
O M7~M4 M3~M0
O M11~M8 M7~M4
O M15~M12 M11~M8
O X3~X0 M15~M12 complete
X0
SFTR X0 M0 K16 K4
X3 X2 X1 X0
M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M1 M0
1 2 3 4
5
4 bits in a group shift to the right
carry







6 Application Commands API 00-49
DVP-PLC Application Manual 6-46
API

Applicable models
ES EP EH
35


SFTL
P

Shifts the Data of Device
Specified to the Left
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D


n
1

n
2

Note: Essential condition: 1n
1
1024, 1 n
2
n1
In ES series models: 1n
2
n
1
512
Refer to each model specification for usage range.
ES series models do not support pulse execution (SFTLP).

16-bit command (9 STEPS)
SFTL
Continuous
execution
SFTLP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Starting number of shift device (source device) : Starting number of
specified shift device (destination device) : Specified bit stack of data length
: Bits after one time shift
4 Shifts data bits of device to the left by bits. bits, which
begin with , are shifted to the left.
4 This command is usually pulse execution (SFTLP).
Program
Example

4 When X0 is in the rising-edge, the 16 bit data of M0~M15 will rotate 4 bits to the left.
4 Please refer to the following O~O steps to perform SFTL command of one time scan.
O M15~M12 carry
O M11~M8 M15~M12
O M7~M4 M11~M8
O M3~M0 M7~M4
O X3~X0 M3~M0 complete
X0
SFTR X0 M0 K16 K4
X3 X2 X1 X0
M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M1 M0
1 2 3 4
5
4 bits in a group shift to the left
carry






6 Application Commands API 00-49
DVP-PLC Application Manual 6-47
API

Applicable models
ES EP EH
36


WSFR
P

Shift the Register to the Right
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n1
n2
Note: When using bit devices as operand S (source) and D
(destination) the specified device must be equal, for
example, one kind is the K
n
X, K
n
Y, K
n
M, K
n
S and the other
kind is T, C, D.
When using bit devices as operand S (source) and D
(destination) the Kn value must be equal.
Essential condition: 1n
1
512, 1 n
2
n1
Refer to each model specification for usage range.
ES series models do not support pulse execution (WSFR,
WSFRP).

16-bit command (11 STEPS)
WSFR
Continuous
execution
WSFRP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Starting number of shift device (source device) : Starting number of
specified shift device (destination device) : Specified bit stack of data length
: Words after one time shift
4 Shifts data words of device to the right by words. words,
which begin with , are shifted to the right.
4 This command is usually pulse execution (WSFRP).
Program
Example
1

4 When X0 goes from OFF to ON, the 16 register data of D20~D35 are paralleled a shift
area and shift 4 register to the right.
4 Please refer to the following O~O steps to perform WSFR command of one times.
O D23~D20 carry
O D27~D24 D23~D20
O D31~D28 D27~D24
O D35~D32 D31~D28
O D13 ~D10 D35~D32 complete
X0
WSFRP D10 K16 D20 K4
D13 D12 D11 D10
D35 D34 D33 D32 D31 D30 D29 D28 D27 D26 D25 D24 D23 D22 D21 D20
1 2 3 4
5
4 registers in one group shift to the right
Carry


6 Application Commands API 00-49
DVP-PLC Application Manual 6-48
Program
Example
2

4 When X0 goes from OFF to ON, the word register data of Y10~Y27 are paralleled a
shift area and shift 2 digits to the right.
4 Please refer to the following O~O steps to perform WSFR command of one time shift.
O Y17~Y10 carry
O Y27~Y20 Y17~Y10
O X27~X20 Y27~Y20 complete
X0
WSFRP K1X20 K4 K2
X27 X26 X25 X24
Y27 Y26 Y25 Y24 Y23 Y22 Y21 Y20 Y17 Y16 Y15 Y14 Y13 Y12 Y11 Y10
1
2
3
2 digits shift to the right
Carry
K1Y10
When using Kn device, the specified value must be equal
X23 X22 X21 X20

API

Applicable models
ES EP EH
37


WSFL
P

Shift the Register to the Left
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n1
n2
Note: When using bit devices as operand S (source) and D
(destination) the specified device must be equal, for
example, one kind is the K
n
X, K
n
Y, K
n
M, K
n
S and the other
kind is T, C, D.
When using bit devices as operand S (source) and D
(destination) the Kn value must be equal.
Essential condition: 1n
1
512, 1 n
2
n1
Refer to each model specification for usage range.
ES series models do not support pulse execution (WSFL,
WSFLP)

16-bit command (11 STEPS)
WSFL
Continuous
execution
WSFLP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Starting number of shift device (source device) : Starting number of specified
shift device (destination device) : Specified bit stack of data length : Words after
one time shift
4 Shifts data words of device to the left by words. words, which
begin with , are shifted to the left.
4 This command is usually pulse execution (WSFLP).
6 Application Commands API 00-49
DVP-PLC Application Manual 6-49
Program
Example

4 When X0 goes from OFF to ON, the 16 register data of D20~D35 are paralleled a shift area
and shift 4 register to the right.
4 Please refer to the following O~O steps to perform WSFL command of one time shift.
O D35~D32 carry
O D31~D28 D35~D32
O D27~D24 D31~D28
O D23~D20 D27~D24
O D13~D10 D23~D20 complete
1 3 4
5
2
4 registers in one group shift to the left
Carry
X0
WSFLP D10 K16 D20 K4
D13 D12 D11 D10
D35 D34 D33 D32 D31 D30 D29 D28 D27 D26 D25 D24 D23 D22 D21 D20

API

Applicable models
ES EP EH
38


SFWR
P

Shift Register Write
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: Essential condition: 2n512
Refer to each model specification for usage range.
ES series models do not support pulse execution (SFWR,
SFWRP).

16-bit command (7 STEPS)
SFWR
Continuous
execution
SFWRP
Pulse
execution

32-bit command

Flag: M1022 (Carry flag)

Command
Explanation

4 : Source device which the data is written in : Head address device :
Data length
4 is the length of the First-in/First-OUT stack and the destination device is
the head address device of the First-in/First-OUT stack. Use the first number device
as the pointer and add 1 to the content value of the pointer when executing this
command. The contents of the devices specified by are written into the position
specified by the pointer of the First-in/First-OUT stack. If the contents of the
pointer exceed the value n-1, the insertion into the First-in/First-OUT stack will
stop and the carry flag M1022 will be turned ON.
4 This command is usually pulse execution (SFWRP).
Program
Example

4 First, reset the content of D0 to 0. When X0 goes from OFF to ON, the content of D0
becomes 1 when the content of D20 is created and built in D1. After changing the
content of D20, X0 is executed to goes from OFF to ON again, then the content of D0
becomes 2 when the content of D20 is created and built in D2.
6 Application Commands API 00-49
DVP-PLC Application Manual 6-50
4 Please refer to the following O~Osteps to perform SFWR command.
O The content of D20 is created and built in D1.
O The content of D0 becomes 1.
X10
RST D0
D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
D20
X0
SFWRP D20 -K10 D0
reset the content of D0 to 0 (zero) previously
pointer
n = 10 points
D0 = 3 2 1

Footnote

4 This API 38 SFWR command can be used with the API 39 SFRD command to execute
the Write-in/Read Control of the First-in/First-OUT stack.

API

Applicable models
ES EP EH
39


SFRD
P

Shift Register Read
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: Essential condition: 2n512
Refer to each model specification for usage range.
ES series models do not support pulse execution (SFRD,
SFRDP).

16-bit command (7 STEPS)
SFRD
Continuous
execution
SFRDP
Pulse
execution

32-bit command

Flag: M1020 (Zero flag)

Command
Explanation

4 : Head address device : destination device : Data length
4 is the length of the First-in/First-OUT stack and the source device is the
head address device of the First-in/First-OUT stack. Use the first number device
as the pointer and subtract 1 to the content value of the pointer when executing this
command. The contents of the devices specified by are written into the position
specified by the pointer of the First-in/First-OUT stack. If the contents of the pointer
are equal to 0 (zero), the First-in/First-OUT stack will be empty and the carry flag
M1022 will be turned ON.
4 This command is usually pulse execution (SFRDP).
6 Application Commands API 00-49
DVP-PLC Application Manual 6-51
Program
Example

4 When X1 goes from OFF to ON, D9~D2 are all shifted one register to the right and the
content of D0 is substracted by 1 when the content of D1 is read and moved to D21.
4 Please refer to the following O~O steps to perform SFRD command.
O The content of D1 is read and moved to D21.
O D9~D2 are all shifted one register to the right.
O The content of D0 is substracted by 1.
D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 D21
X0
SFRDP D0 K10 D21
n = 10 points
data read
pointer

Footnote

4 This API 38 SFWR command can be used with the API 39 SFRD command to execute
the Write-in/Read Control of the First-in/First-OUT stack.

API

Applicable models
ES EP EH
40


ZRST
P

Resets a Range of Device Specified
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D
1

D
2

Note: Essential condition: D
1
must be less than or equal to () D
2
.
Operand D
1
and D
2
must be in the same category.
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(ZRSTP).

16-bit command (5 STEPS)
ZRST
Continuous
execution
ZRSTP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : First destination device : Second destination device
4 For ES series models, standard and High speed counters cannot be mixed.
4 For EH/EP series models, standard and High speed counters can be mixed use.
4 When > , then only device is reset.
4 This command is usually pulse execution (ZRSTP).
6 Application Commands API 00-49
DVP-PLC Application Manual 6-52
Program
Example


4 When X0 is ON, M300 to M399 (auxiliary relays) will be reset to OFF.
4 When X1 is ON, C0 to C127 (16-bit counter) will all be reset. (0 is written in and
contact and coil will be reset to OFF)
4 When X10 is ON, T0 to T127 (timer) will all be reset. (0 is written in and contact and
coil will be reset to OFF)
4 When X2 is ON, the status of S0 to S127 will be reset to OFF.
4 When X3 is ON, the data of D0 to D100 (data register) will be reset to 0.
4 When X4 is ON, C235 to C254 (32-bit counter) will all be reset. (0 is written in and
contact and coil will be reset to OFF)
ZRST M300 M399
ZRST C0 C127
ZRST T0 T127
ZRST S0 S127
ZRST D0 D100
ZRST C235 C254
X0
X1
X10
X2
X3
X4

Footnote

4 The RST command can be independently used in the bit device, i.e. Y, M, S and in
word device, i.e. T, C, D.
4 API 16 FMOV command can also be used to transmit the data of K0 to word device,
i.e. T, C, D or to bit register, i.e. KnY, KnM, KnS, just as RST command.
RST M0
X0
RST T0
RST Y0
FMOV K0 D10 K5









6 Application Commands API 00-49
DVP-PLC Application Manual 6-53
API

Applicable models
ES EP EH
41


DECO
P

8 256 Bits Decoder
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D


n


Note: When operand D is bit device, n=1~8
When operand D is word device, n=1~4
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(DECOP).

16-bit command (7 STEPS)
DECO
Continuous
execution
DECOP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Decode source device : Destination device for storing the encode result
: Decode data length
4 Decodes the data of lower n bit of source device and stores the result of 2 n
bit at device .
4 This command is usually pulse execution (DECOP).
Program
Example
1


4 is used in case of a bit device, 0<n8. But if n=0 or n>8, the calculation error
will occur.
4 When n=8, the maxium decoded data is 2 8, equal 256 points. (Must notice the range
of the stored device after decoding. Please do not use repeatly.)
4 When X10 goes from Off On, the data of X0~X2 will be decoded to M100~M107.
4 If data source is 1+2=3, M103 at the third position from M100 turns ON and is set to 1.
4 After the execution is completed, X10 is changed to OFF. The device which have been
decoded is still action.
DECOP X0 K3 M100
X10


X2 X1 X0
M107 M106 M105 M104 M103 M102 M101 M100
0 1 1
1 0 0 0 0 0 0 0
3 7 6 5 4 2 1 0
4 1 2
3

6 Application Commands API 00-49
DVP-PLC Application Manual 6-54
Program
Example
2

4 is used in case of a bit device, 0<n4, but if n=0 or n>4, the calculation error will
occur.
4 When n=4, the maxium decoded data is 2 4, equal 16 points.
4 When X10 goes from Off On, the data in D10 (b2 to b0) will be decoded and stored
at D20 (b7 to b0). The unused bits in D20 (b15 to b8) will be all set to 0.
4 Decodes three lower bits in D10 and stores at eight lower bits in D20 (one bit will be 1)
and the content of eight upper bits are all 0.
4 After the execution is completed, X10 is changed to OFF. The device which have been
decoded is still action.

X10
DECOP D10 D20 K3

0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
0 1 2 3 4 5 6 7
1 2 4
b15
b15 b0
b0
D10
D20
all be 0 (zero)
When 3 is specified
at b2 to b0 of D10
result after decoding
When 3 is specified as effective
bits, 8 points are occupied.
b3 at the third position from
b0 turns ON and is set to 1

API

Applicable models
ES EP EH
42


ENCO
P

256 8 Bits Encoder
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D


n


Note: When operand S is bit device, n=1~8
When operand S is word device, n=1~4
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(ENCOP).

16-bit command (7 STEPS)
ENCO
Continuous
execution
ENCOP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Encode source device : Destination device for storing encode data
: Encode data length
4 Encodes the data of lower 2 n bit in source device and stores the result at
device .
4 If the source device is a multiple bit and its value is 1, processing is performed
for the last bit position.
4 This command is usually pulse execution (ENCOP).
6 Application Commands API 00-49
DVP-PLC Application Manual 6-55
Program
Example
1


4 is used in case of a bit device, 0<n8. But if n=0 or n>8, the calculation error
will occur.
4 When n=8, the maxium decoded data is 2 8, equal 256 points.
4 When X0 goes from Off On, the data of 2 3 (M0 to M7) will be decoded and stored
at three lower bits of D0 (b2 to b0). The unused bits in D0 (b15 to b3) will be all set to
0.
4 After the execution is completed, X10 is changed to OFF and the data in
remain unchanged.
ENCOP M0 K3 D0
X0

0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
1 2 4
b15 b0
D0
1
0 0 0 0 1 0 0 0
7 6 5 4 3 2 1 0
M07 M06 M05 M04 M03 M02 M01 M00
all be 0 (zero)
When 3 is specified as effective bits, 8 points are occupied.
result after encoding
Which point, counting from M0, is ON and stored in BIN.

Program
Example
2

4 is used in case of a word device, 0<n4. But if n=0 or n>4, the calculation error
will occur.
4 When n=4, the maxium decoded data is 2 4, equal 16 points.
4 When X0 goes from Off On, the data of 2 3 (b0 to b7) in D10 will be decoded and
stored at three lower bits (b2 to b0) at D20. The unused bits in D20 (b15 to b3) will be
all set to 0. (b8 to b15 in D10 is not available)
4 After the execution is completed, X10 is changed to OFF and the data in
remain unchanged.

ENCOP D10
K3 D20
X0

0 0 0 0 0 0 0 0 0 0 0 0 1 0 0
b15 b0
D20
1
6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 1 0 1 0 0 1 1 1
b15
b0
7
D10
all be 0 (zero)
Data inactivated
result after encoding
When 3 is specified as effective bits, 8 points are occupied.

6 Application Commands API 00-49
DVP-PLC Application Manual 6-56
API

Applicable models
ES EP EH
43

D
SUM
P

Sum of ON Bits
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: If operand S, D use with device F, it is only available in
16-bit command.
Refer to each model specification for usage range.
ES series models do not support pulse execution
command (SUMP, DSUMP).

16-bit command (5 STEPS)
SUM
Continuous
execution
SUMP
Pulse
execution

32-bit command (9 STEPS)
DSUM
Continuous
execution
DSUMP
Pulse
execution
Flag: M1020 (Zero flag)


Command
Explanation

4 : Source device : Destination device for storing counted number
4 If the contents of these 16 bits are all 0, the Zero flag, M1020=ON.
4 will occupy two registers when using in 32-bit command.
Program
Example

4 When X10 is ON, all the bits that with 1 as its content within D0 will be counted and
have this counted number stored in D2.
X10
SUM D0 D2

0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0 3
D2 D0


API

Applicable models
ES EP EH
44

D
BON
P

Check Specified Bit Status
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: If operand S uses with device F, it is only available in 16-bit
command.
Essential condition: n=0~15 (16-bit), n=0~31 (32-bit)
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(BONP, DBONP).

16-bit command (7 STEP)
BON
Continuous
execution
BONP
Pulse
execution

32-bit command (13 STEPS)
DBON
Continuous
execution
DBONP
Pulse
execution
Flag: None

Command
Explanation

4 : Source device : Result device for storing determined bit :
Specified determined bit
Program
Example

4 When X0 is ON, and if the 15th bit of D0 is 1, M0 is ON. But if the 15th bit of D0 is 0,
M0 is OFF.
4 Once X0 is switched to OFF, M0 will stay at its previous ON/OFF status.
6 Application Commands API 00-49
DVP-PLC Application Manual 6-57
.
X0
BON D0 M0
0 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0
D0
K15
b0
M0=Off
b15
1 0 0 0 0 0 0 1 1 1 0 0 0 0 0 0
D0
b0
M0=On
b15


API

Applicable models
ES EP EH
45

D
MEAN
P

Mean Value
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: If operand D uses with device F, it is only available in
16-bit command.
Essential condition: n=1~64
Refer to each model specification for usage range.
ES series models do not support pulse execution
command (MEANP, DMEANP).

16-bit command (7 STEPS)
MEAN
Continuous
execution
MEANP
Pulse
execution

32-bit command (13 STEPS)
DMEAN
Continuous
execution
DMEANP
Pulse
execution
Flag: None

Command
Explanation

4 : Starting device for taking mean value : Destination device for storing
the mean value : Device number for taking mean value
4 Add the contents of registers specified by , and have the sum divided by
to take a mean value. To save this mean value in the designated .
4 If there is remainder in this calculation, ignore the remainder.
4 If the specified device number exceeds the normal usable range, only those that within
the range could be processed.
4 If the value of is out of the stated range (1~64), an operation error will be
generated.
Program
Example

4 When X10 is ON, add up the contents of the three registers starting from D0 (specified
by this command), and divide the sum by three to take the mean vlaue. Then store this
mean value in the specified device D10 and ignore the remainder.
MEAN D0 K3 D10
X10
(D0+D1+D2)/D3 D10
D0
D1
D2
K100
K113
K125
K112
D10
reminder = 3, be ignored

6 Application Commands API 00-49
DVP-PLC Application Manual 6-58
API

Applicable models
ES EP EH
46


ANS


Alarm Device Output
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
m
D
Note: Operand S available range: for EP series: T0~T191
for EH series: T0~T199.
Operand m available range: K0~K32,767, in units of 100 ms
Operand D available range: S900~S1023
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(ANS).

16-bit command (7 STEPS)
ANS
Continuous
execution


32-bit command

Flag: M1048 (Alarm point is activated)
M1049 (Monitor is valid)
Refer to following for detail.

Command
Explanation

4 : A timer which detect alarm : Time setting : Alarm device
4 ANS command is used to drive the output alarm device.
4 If alarm device S999=On when X3 is On for more than 5 seconds, S999 will keep
being On afterward even X3=Off later. (but T10 will be reset to Off, present value=0)
Program
Example

X3
ANS T10 K50 S999


API

Applicable models
ES EP EH
47


ANR
P
Alarm Device Reset
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
Note: No operand
ES series models do not support pulse execution
command (ANR, ANRP).

16-bit command (1 STEP)
ANR
Continuous
execution
ANRP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 ANR command is used to reset alarm device.
4 When several alarm devices are ON, the lower number of alarm device will be reset.
4 This command is usually pulse execution (ANRP).
Program
Example

4 When X10 and X11 are simultaneously ON more than 2 seconds, the alarm device
S910 is ON. Then even if X10 and X11 are changed to OFF, the alarm device S910
will still remain ON. (But T10 will reset to OFF, present value is 0.)
4 When X10 and X11 are simultaneously ON less than 2 seconds, the present value of
T10 is reset to 0.
6 Application Commands API 00-49
DVP-PLC Application Manual 6-59
4 When X3 goes from Off On,
for EP series, the activated alarm device S896~S1023 will be reset.
for EH series, the activated alarm device S899~S1023 will be reset.
4 When X3 goes from Off On again, the second lower alarm device will be reset.
X10
ANS T10 K20 S910
X11
X3
ANRP

Footnote

4 Flag:
1. M1048 (Alarm device is activated): When M1049 is driven to be ON, if any one alarm
device of S899~S1023 (in EP series)/ S899~S1023 (in EH series) outputs, M1048 is
ON.
2. M1049(Monitor is valid): When M1049 is driven to be ON, D1049 will automatically
display the lowest number during the execution of this command.
4 Application of alarm device:
I/O devices arrangement:
X0: forward switch, X1: backward switch, X2: front location switch, X3: back location
switch, X4: alarm device reset button, Y0: forward, Y1: forward, Y2: alarm indicator,
S910: forward alarm device, S920: backward alarm
Y0
ANS T0 K100 S910
X2
X4
ANRP
M1000
M1049
Y1
ANS T1 K200 S920
X3
X0
Y0
X2
M1048
Y2
Y0
X1
Y1
X3
Y1


6 Application Commands API 00-49
DVP-PLC Application Manual 6-60

1. When M1049=On, M1048, D1049 is valid.
2. If Y0=ON more than 10 seconds and not reach the front location X2, S910=ON.
3. If Y1=ON more than 20 seconds and not reach the back location X3, S920=ON.
4. When backward switch X1=ON, backward device Y1=ON and the signal reach
the back location switch X3, Y1 is switched to be OFF.
5. If there is a driven alarm device, alarm indicator Y2=ON.
6. The alarm device which have been activated will be reset one by one, each time
the reset button X4 of alarm device is ON during the execution of this command.
The lower activated alarm device is reset on every execution of this command.

API

Applicable models
ES EP EH
48

D
SQR
P

Square Root of BIN
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: If operand S, D use with device F, it is only available in
16-bit command.
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(SQR, SQRP, DSQR, DSQRP).

16-bit command (5 STEPS)
SQR
Continuous
execution
DSQR
Pulse
execution

32-bit command (9 STEPS)
SQRP
Continuous
execution
DSQRP
Pulse
execution
Flag: M1020 (Zero flag)
M1021 (Borrow flag)
M1067 (Operation error)

Command
Explanation

4 : Source device : Destination device which store the result
4 This command performs a square root operation on source device and stores
the result at the destination device .
4 only can be a positive value. Performing any square root operation on a
negative value will result in an operation error this command will not be
executed.The error flag M1067 and M1068 will be On and D1067 records error code
0E1B (hexadecimal).
4 The operation result of is calculated as the integer only, decimal is ignored. If
there is decimal ignored, the Borrow flag M1021=ON.
4 When operation result of is 0, the Zero flag M1020=On.
Program
Example

4 When X10=On, the content of D0 will be stored in D12 after the operation of square
root.
X10
SQR D0 D12
D0 D12









6 Application Commands API 00-49
DVP-PLC Application Manual 6-61
API

Applicable models
ES EP EH
49

D
FLT
P

Convert BIN Integer to Binary
Floating Point
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Refer to each model specification for usage range.
ES series models do not support pulse execution
command (FLT, FLTP, DFLT, DFLTP).

16-bit command (5 STEPS)
FLT
Continuous
execution
DFLT
Pulse
execution

32-bit command (9 STEPS)
FLTP
Continuous
execution
DFLTP
Pulse
execution
Flag: M1081 (FLT command function
exchange)

Command
Explanation

4 : Source device : Destination device which store the converted result
4 When M1081 is OFF, the source data is converted from BIN integer to binary floating
point. At this time, source device of 16-bit command FLT occupies 1 register
and Destination device occupies 2 registers.
If absoluted value of conversion result is larger than max. floating value, carry flag
M1022=On.
If absoluted value of conversion result is less than min. floating value, carry flag
M1021=On.
If conversion result is 0, zero flag M1020=On.
4 When M1081 is ON, the source data is converted from binary floating point to BIN
integer. (ignore the decimal) At this time, source device of 16-bit command FLT
occupies 2 registers and Destination device occupies 1 register. The action is
the same as command INT.
If conversion result exceeds BIN integer range of (16-bit is -32,768~32,767 and
32-bit is -2,147,483,648~2,147,483,647), it wil be represented with max. value or min.
value. Then carry flag will be set to M1022=On.
If the decimal of conversion result is ignored, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
After conversion, is saved by 16 bits.
Program
Example
1

4 When M1081 is OFF, the source data is converted from BIN integer to binary floating
point.
4 When X10 is ON, D0 (BIN integer) is converted to D13, D12 (binary floating point).
4 When X11 is ON, D1, D0 (BIN integer) are converted to D21, D20 (binary floating
point).
4 If D0=K10, X10 will be On. 32-bit of floating point after conversioin will be H41200000
and it will be saved in 32-bit register D12(D13).
4 If 32-bit register D0(D1)=K100,000, X11 will be On. 32-bit of floating point after
conversioin will be H4735000 and it will be saved in 32-bit register D20(D21).
6 Application Commands API 00-49
DVP-PLC Application Manual 6-62
M1002
RST M1081
X10
FLT D0 D12
X11
DFLT D0 D20

Program
Example
2

4 When M1081 is On, the source data is converted from binary floating point to BIN
integer. (ignore the decimal)
4 When X10 is ON, D0 and D1(binary floating point) are converted to D12 (BIN integer).
If D0(D1)=H47C35000, the floating point is 100,000. The execution result will be
D12=K32,767, M1022=On due to the value exceeds max. value of 16-bit register D12.
4 When X11 is ON, D1, D0 (binary floating point) are converted to D21, D20 (BIN
integer). If D0(D1)=H47C35000, the floating point is 100,000. The result will be saved
in 32-bit register D20(D21).
M1002
SET M1081
X10
FLT D0 D12
X11
DFLT D0 D20

Program
Example
3

4 Please use this application command to complete the following operation.
(D10) (X7~X0)
K61.5
16 BIN bit 2 bit BCD
(D21,D20)
(D101,D100) (D200) BIN
(D203,D202)
(D301,D300)
(D401,D400)
(D31,D30)
(D41,D40)
1 2
3
4 5
6
7
8
binary floating point
binary floating point binary floating point
binary floating point
binary floating point
decimal floating point (for monitor)
32 integer bit

6 Application Commands API 00-49
DVP-PLC Application Manual 6-63

M1000
FLT D10 D100
BIN K2X0 D200
FLT D200 D202
DEDIV K615 K10
DEDIV D100 D202
DEMUL D400 D300
DEBCD D20 D30
DINT D20 D40
D300
D400
D20
1
2
3
4
5
6
7
8

1. Covert D10 (BIN integer) to D101, D100 (binary floating point).
2. Covert the value of X7~X0 (BCD value) to D200 (BIN value).
3. Covert D200 (BIN integer) to D203, D202 (binary floating point).
4. Save the result of K615 K10 to D301, D300 (binary floating point).
5. The division of binary floating point:
Save the result of of (D101, D100) (D203, D202) to D401, D400 (binary floating
point).
6. The multiplication of binary floating point:
Save the result of (D401, D400) (D301, D300) to D21, D20 (binary floating point).
7. Covert binary floating point (D21, D20) to decimal floating point (D31, D30).
8. Covert binary floating point (D21, D20) to BIN integer (D41, D40).



7 Application Commands API 50-99

DVP-PLC Application Manual

7-1
API

Applicable models
ES EP EH
50


REF
P

I/O Refresh Immediately
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D


n
Note: Operand D should be a multiple of 10, i.e. 00, 10, 20, 30
etc., so it should be X0, X10, Y0, Y10 etc., please refer to
the command explanation.
Essential condition: n=8~256, and should be a multiple of 8,
i.e. 8, 16, 24, 32etc.
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(REFP).

16-bit command (5 STEPS)
REF
Continuous
execution
REFP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Starting device of I/O refresh : Refreshed I/O number
4 The state of all PLC inputs and outputs will be refreshed after scanning to END. The
state of inputs is read from external inputs to save in inputs memory. The output
terminals send outputs memory to output device after END command. Therefore, this
command can be used during algorithm process when need to input/output the newest
data.
4 The state of all inputs and outputs may change immediately after they are scanned.
If the user does not want to wait for the next scan time, the REF command may be
used.
4 should always be a multiple of 10, i.e. 00, 10, 20, 30 etc., so it should be X0,
X10, Y0, Y10 etc. should always be a multiple of 8, i.e. 8, 16, 24, 32etc.
and its available range is 8~256. If the value of is out of the stated range
(8~256) or not a multiple of 8, an operation error will be generated. The usage range
may be different by various models, please refer to the footnote for detail.
Program
Example
1

4 When X0 = ON, PLC will read the state of X0~X7 input points immediately and
refreshed. There is no input delay occurs.
X0
REF X0 K16




7 Application Commands API 50-99

DVP-PLC Application Manual

7-2
Program
Example
2

4 When X0 = ON, the output signal Y0~Y7 (8 points) are sent to output terminal
immediately and refreshed. It desnt need to output till END command.
X0
REF Y0 K8

Footnote

4 For ES and EP series models, the input and output points processed by this command
are the I/O points of MPU: X0~X17, Y0~Y17 and n=K8 or K16.

API

Applicable models
ES EP EH
51


REFF
P

Refresh and Adjust the Response
Time of Input Filter
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
n


Note: None

16-bit command (3 STEPS)
REFF
Continuous
execution
REFFP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Response time setting, in units of ms.
4 PLC is provided with the input filter to prevent the noises or interferences. The input
filters of X0~X17 inputs of DVP series PLC are digital filters and using REFF
command can adjust the response time of the input filters. Command will set in
D1020 and D1021 directly and adjust reaction time of X0~X7 and X10~X17
separately.
4 The operation rules when the input filters of X0~X17 inputs of DVP series PLC adjust
the response time:
When the power of PLC turns from Off to On or execute to END command,
response time is decided by the content value of D1020 and D1021.
During the program, the setting value can be moved to D1020 and D1021by using
MOV command.
The response time can be changed by using REFF command in the execution of
the program. At this time, the response time specified by REFF command will be
moved into D1020, D1021and it will be adjusted again in the next scan.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-3
Program
Example

4 When the power of PLC turns from Off to On, the
response time of X0~X17 inputs is decided by the
content value of D1020 and D1021.
4 When X20=On, REFF K5 command is executed,
respone time is changed to 5 ms and and it will
be adjusted again in the next scan.
4 When X20=Off, the REFF command will not be
executed, the response time is changed to 20ms
and it will be adjusted again in the next scan.
X20
REFF K5
X0
Y1
X20
REFF K20
X1
Y2
END
Footnote

4 When using the interrupt parameters, or high-speed counter, or SPD command (API
56), the response time of corresponding input terminals wont delay and its action has
no ralation with this command.

API

Applicable models
ES EP EH
52


MTR


Input Matrix
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
1

D
2

n
Note: Operand S should be a multiple of 10, i.e. 00, 10, 20, 30
etc., so it should be X0, X10 etc. and occupies 8
continuous devices.
Operand D
1
should be a multiple of 10, i.e. 00, 10, 20, 30
etc., so it should be Y0, Y10 etc. and occupies n
continuous devices
Operand D
2
should be a multiple of 10, i.e. 00, 10, 20, 30
etc., so it should be Y0, M0, S0 etc.
Essential condition: n=2~8
Refer to each model specification for usage range.

16-bit command (9 STEPS)
MTR
Continuous
execution


32-bit command

Flag: M1029 Execution completed
flag

Command
Explanation

4 : Head address of input matrix : Head address of output matrix :
Corresponding head address of matrix scan : Number of banks for the matrix
4 is the head address that specify all inputs of the matrix. Once the input is
specified, a selection of 8 continuous input devices is called as input matrix.
4 is the head address of transister output Y of the matrix.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-4

4 This command allows a selection of 8 continuous input devices (head address )
to be used multiple ( ) times. Each input has more than one and different
signal being processed. Each set of 8 input signals are grouped into a bank and
there are number of banks. Each bank is selected by the quantity of outputs
from , used to achieve the matrix are equal to the number of banks . The
result is stored in a matrix-table which starts at corresponding head address .
4 The maximum inputs can achieve 64 inputs (8 inputs 8 banks).
4 When this command is used on an interrupt format, processing each bank of inputs
every 25msec. This would result in an 8 bank matrix, i.e. 64 inputs (8 inputs 8 banks)
being read in 200msec. Hence, this command is not available for the input signal
which its On/Off speed is over than 200ms.
4 It is recommended to use special auxiliary relay M1000, normally open contact.
4 After the completion of performing MTR command, the command execution completed
flag M1029 is turned ON and this flag is automatically reset when the MTR command
is turned OFF.
4 This command can only be used ONCE.
Program
Example

4 When X0=On, MTR command starts to execute. The external 2 banks, total 16
devices are read by order and the result are stored in the internal relay M10~M17,
M20~M27.
M1000
MTR X40 Y40 M10 K2

4 The figure below is an example wiring diagram for the operation of MTR command.
The external 2 banks consist of X40~47 and Y40~41 and total 16 devices correspond
to the internal relay M10~M17, M20~M27 are used with MTR command. For a general
precaution to aid successful operation, diodes should be placed after each input
devices. These diodes should have a rating of 0.1A, 50V.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-5
COM X40 X41 X42 X43 X44 X45 X47 X46
COM Y40 Y41 Y42 Y43 Y44 Y45 Y47 Y46
M10
X41
M20
M11 M12 M13 M14 M15 M16 M17
X42 X43 X44 X45 X46 X47
M21 M22 M23 M24 M25 M26 M27
Diode
0.1A/50V
Input devices


4 When output Y40 is ON, only those inputs in the first bank are read. These result are
stored in auxiliary coils M10~M17. The second step involves Y40 going OFF and Y41
coming ON and this time only inputs in the second bank are read. These results are
stored in M20~M27.
2 4 Y41
Y40
25ms
1 3
Read input signal in the first bank
Read input signal in the second bank
Processing time of each bank is about 25ms











7 Application Commands API 50-99

DVP-PLC Application Manual

7-6
API

Applicable models
ES EP EH
53

D
HSCS


High-speed Counter Comparison
SET
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Operand S
2
should be C235~C240, C241~C244,
C246~C249, C251~C254 or available high-speed
counters, please refer to the footnote for details.
The usage range of operand D: I010 to I060 can be set,
also can use index register E, F to modify.
There is no 16-bit command for API 53, only 32-bit
command DHSCS is available.
Refer to each model specification for usage range.
In ES and EP series models, operand S
2
and D cannot use
index register E, F to modify.

16-bit command


32-bit command (13 STEPS)
DHSCS
Continuous
execution

Flag: M1150~M1333. Refer to the
footnote for details.
M1289~M1294. High-speed
counter interrupt disabled
flags in EH series models.
Refer to the program example
3 below.

Command
Explanation

4 : Compare value : Numver of high-speed counter : Compare
result
4 All high-speed counters use an interrupt process, therefore, all compare result devices
are updated immediately.
4 HSCS command compares the current value of the selected high-speed counter
against a selected comapre value . When the counters currrent value
changes to a value equal to , the device specified as is set ON. Even if
the compare result is unequal, the status of device will still be ON.
4 If the devices specified as the device are Y0~Y17, when the compare value
and the present value of high-speed counter are equal, the compare result will
immediately output to the external inputs Y0~Y17, and other Y devices will be affected
by the scan cycle. However, M, S devices are immediate output, not being affected by
the scan cycle.
Program
Example
1

4 After PLC perform the RUN command, if M0=On, DHSCS command starts to operate.
Y10 will ON immediately when C235s present value stepped from 99100 or 101
100 and be ON constantly.
M1000
DCNT C235 K1000
M0
DHSCS K100 C235 Y10 On immediately

7 Application Commands API 50-99

DVP-PLC Application Manual

7-7
Program
Example
2

4 Difference between Y output of DHSCS command and general Y output:
When C249s value stepped from 99100 and 101100, Y10 output of DHSCS
command immediately output to the external output by using interrupt process so it
is irrelevant to the program scan time. However, there will still be a delay due to the
output of module relay (10ms) or transistor (10us).
When the present value of high-speed timer C249 changes from 99 to 100, C249
will be activated, and Y17 will be ON after END command due to the program scan
time.
M1000
DCNT C249 K100
SET Y17
C249
DHSCS K100 C249 Y10 ON immediately

Program
Example
3

4 High-speed counter interrupt:
ES series models do not support high-speed counter interrupt function.
The limit when EP series models using high-speed counter interrupt
When using DHSCS command to specify I interrupt, the specified high-speed
counter can not be use in other DHSCS, DHSCR, DHSZ command. If using it, it
will result in error.
The interrupt pointers I010 to I060 can be used as D operand of DHSCS command
and this enables the interrupt routine to be executed when the value of the
specified high-speed counter reaches the value in DHSCS command.
In EP series models, there are six high-speed counter interrupts: I010, I020, I030,
I040, I050, I060 6 points can be used. I010 is used with C235, C241, C244, C246,
C247, C249, C251, C252, C254. I020 is used with C236; I030 is used with C237,
C242; I040 is used with C238; I050 is used with C239 and I060 is used with C240.
When the present value of C251 changes from 99100and 101100, the
program will jump to the interrupt pointer I010 to execute the interrupt routine.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-8


M1000
DCNT C251 K1000
FEND
DHSCS K100 C251 I010
M1000
Y1
IRET
END
I010

4 In EP series models, M1059 is high-speed counter interrupt inhibit flag.
4 In EH series models, M1289~M1294 are high-speed counter interrupt inhibit flag, I010
to I060 masked. For example, when M1294 is On, Interrupt pointer I060 masked.
Interrupt pointer
I Number
interrupt inhibit
flag
Interrupt pointer
I Number
interrupt inhibit flag
I010 M1289 I040 M1292
I020 M1290 I050 M1293
I030 M1291

I060 M1294
Footnote

4 The ouput contact of high-speed counter and the compare output of DHSCS (API 53)
command, DHSCR (API 54) command and DHSZ(API 55) command are all activated
when there are counted inputs. If using data operation command, such as DADD,
DMOVetc. commands to change the present value of high-speed counter equal to
the setting value, there is comparsion will be set or output because there is no counted
inputs.
4 High-speed counter provided in ES series models: total counting frequency is 30 KHz.
1-phase 1 input 1-phase 2 inputs 2-phase inputs Type

Input
C235 C236 C237 C238 C241 C242 C244 C246 C247 C249 C251 C252 C254
X0 U/D U/D U/D U U U A A A
X1 U/D R R D D D B B B
X2 U/D U/D R R R R
X3 U/D R S S S

U: Increasing input A: A phase input S: Start input
D: Decreasing input B: B phase input R: Reset input
1. Input point X0 and X1 can plan to be higher speed counter and 1-phase can be up
to 30KHz. But total counting frequency of these input points should be less than or
equal to total frequency 30KHz. If counting input is A/B phase signal, frequency will
be four times of counting frequency. Therefore, counting frequency of A/B phase is
almost 7KHz.
2. In ES series models, DHSCS and DHSCR command can not be used more than 4
times.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-9

4 High-speed counter provided in EP series models:
1-phase high-speed counter: total counting frequency is 30 KHz.
1-phase 1 input
1-phase 2
inputs
2-phase inputs
Type

Input
C235 C236 C237 C238 C239 C240 C241 C242 C244 C246 C247 C249 C251 C252 C254
X0 U/D U/D U/D U U U A A A
X1 U/D R R D D D B B B
X2 U/D U/D R R R R
X3 U/D R S S S
X4 U/D
X5 U/D

U: Increasing input A: A phase input S: Start input
D: Decreasing input B: B phase input R: Reset input
1. Input point X0 and X1 can plan to be higher speed counter and 1-phase can be up
to 30KHz. But total counting frequency of these input points should be less than or
equal to total frequency 30KHz. If counting input is A/B phase signal, frequency will
be four times of counting frequency. Therefore, counting frequency of A/B phase is
almost 7KHz.
2. Input X5 has two functions.
When M1260=Off, C240 is general U/D high-speed counter.
When M1260=On, X5 is the global reset of C235~C239.
3. In EP series models, DHSCS, DHSCR and DHSZ command can not be used more
than 6 times.
4 High-speed counter provided in EH series models:
1. Program interrupt type 1-phase high-speed counter, C235~C240: general counting
frequency is up to 10KHz, maximum total counting frequency is 20 KHz.
2. DVP-EH series has four Hardware high-speed counter (hereinafter referred to as
HHSC), HHSC0~3 and available device number for HHSC0~3 are C241~ C254.
Pulse output frequency of each group can reach 250 KHz.
Available device number for HHSC0: C241, C246, C251
Available device number for HHSC1: C242, C247, C252
Available device number for HHSC2: C243, C248, C253
Available device number for HHSC3: C244, C249, C254
Each HHSC can only be specified one time for one device number. Use
DCNT command to specify the HHSC.
Available counter modes of each HHSC:
1). 1-phase 1 input, also called as Pulse/Direction mode
2). 1-phase 2 inputs, also called as CW/CCW mode.
3). 2-phase 2 inputs, also called as AB phase mode.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-10

3. Please refer to the following table for the available high-speed counters:
Counter
Type
Program interrupt type
1-phase high-speed counter
Hardware high-speed counter
1-phase 1 input 1-phase 1 input 1-phase 2 inputs 2-phase input
Type
Input
C235 C236 C237 C238 C239 C240 C241 C242 C243 C244 C246 C247 C248 C249 C251 C252 C253 C254
X0 U/D U/D U A
X1 U/D D B
X2 U/D R R R
X3 U/D S S S
X4 U/D U/D U A
X5 U/D D B
X6 R R R
X7 S S S
X10 U/D U A
X11 D B
X12 R R R
X13 S S S
X14 U/D U A
X15 D B
X16 R R R
X17 S S S

U: Increasing input A: A phase input S: Start input
D: Decreasing input B: B phase input R: Reset input
4. In the program of DVP EH series models, there is no limited using time for
hardware high-speed counter related commands, like DHSCS, DHSCR and
DHSZ. However, there are limited using times for executing the commands
simultaneously. DHSCS, DHSCR command will use one group setting and DHSZ
command will use two groups settings. When these commands are executed
simultaneously, the total used groups settings can not exceed eight groups
settings. If exceeding eight groups settings, system will totalize the used memory
units of the commands which have been scanned and executed first, the others will
be ignored.
5. System structure of hardware high-speed counter:
7 Application Commands API 50-99

DVP-PLC Application Manual

7-11
HHSC0
HHSC1
HHSC2
HHSC3
M1265
M1273
M1267
M1275
M1269
M1277
M1271
M1279
X3 X7 X17 X13
M1272 M1274 M1276 M1278
M1264 M1266 M1268 M1270
X2 X6 X12 X16
M1241 M1242 M1243 M1244
C241 C242 C243 C244
D1225 D1226 D1227 D1228
X1 X5 X11 X15
X14 X10 X4 X0
HHSC0 HHSC1 HHSC2 HHSC3
HHSC0 HHSC1 HHSC2 HHSC3
HHSC0 HHSC1 HHSC2 HHSC3
HHSC0 HHSC1 HHSC2 HHSC3
HHSC0 HHSC1 HHSC2 HHSC3
HHSC0 HHSC1 HHSC2 HHSC3
M1246
M1247
M1248
M1249 M1254
M1253
M1252
M1251
DHSCS
DHSCR
DHSCZ
SET/RESET
I 060 i nterr upt
counti ng val ue reset
010 ~ I
I 010
I 020
I 030
I 040
I 050
I 060
M1289
M1290
M1291
M1292
M1293
M1294 M1294
HHSC0
HHSC1
HHSC2
HHSC3
DHSCS occupies one group setting val ue
DHSCR occupies one group setting value
DHSCZ occupies two groups setting value
AND
OR
Reset si gnal R
AND
OR
U/D mode setting flag
Counting mode
selection
U/D
U
A
B
D
Counting
up/down flag
Setti ng value:0~3 respecti vel y
represent Mode 1~4
(1~4 ) frequency mode
Counting pulse
Counting pulse
Comparator
Current value
of counter
Start si gnal S
Interrupt inhibi t flag
High speed
compar ison
command
Compari son value
reached operati on
Comparison value
reached output
Comparison value
reached setting
6. HHSC0~3 all have reset and start signal of external input. Reset signal (R) can be
set by M1272/M1274/M1276/M1278 (belong to HHSC0 ~3) and start signal can be
set by M1273/M1275/M1277/M1279 (belong to HHSC0 ~3). When using
high-speed counter, if do not use the external signal input of R and S, you can set
M1264/M1266/M1268/M1270 and M1265/M1267/M1269 /M1271 as TRUE. Close
the operation of the input signal and the corresponding external inputs can be used
as general inputs. Please refer to the above example figure for usage.


7. Select counter modes
High-speed conter of ES / EP series is 2-phase 2 inputs counter mode and set by
special device D1022 with four double frequency modes. The content value of
register D1022 is loaded at the first scan time when PLC controller switch from
Stop to Run status. (Only V5.5 and above of DVP-ES series MPU support this
function)
Device No. Function Explanation
D1022
Use counting method of counter to set
double frequency
D1022=K1 Select (normal frequency) mode
D1022=K2 Select (double frequency) mode
D1022=K4 Select (4 times frequency) mode
7 Application Commands API 50-99

DVP-PLC Application Manual

7-12

Double frequency mode:
Counter
mode
Signal Diagram
1
(
n
o
r
m
a
l

f
r
e
q
u
e
n
c
y
)

A-phase
B-phase
Counting up
Counting down
2
(
d
o
u
b
l
e

f
r
e
q
u
e
n
c
y
)

A-phase
B-phase
Counting up
Counting down
2
-
p
h
a
s
e

2

i
n
p
u
t
s

4
(
f
o
u
r

t
i
m
e
s

f
r
e
q
u
e
n
c
y
)

A-phase
B-phase
Counting up
Counting down
According to the different type of counter modes, HHSC 0~3 of EH series models can set
normal, double, thriple and four times these four frequency modes by using special
device D1225 to D1228:
Counter mode Signal Diagram
Type
Setting value
of special D
Counting up(+1) Counting down(-1)
0
(normal
frequency)
U/D
U/D FLAG

1-phase
1 input
1
(double
frequency)
U/D
U/D FLAG

0
(normal
frequency)
U
D

1-phase
2 inputs
1
(double
frequency)
U
D

7 Application Commands API 50-99

DVP-PLC Application Manual

7-13

Counter mode Signal Diagram
Type
Setting value
of special D
Counting up(+1) Counting down(-1)
0
(normal
frequency)
A
B

1
(double
frequency)
A
B

2
(triple
frequency)
A
B

2-phase
2 inputs
3
(four times
frequency)
A
B

U/D FLAG are special M device, M1241~M1244 and each indicates the setting flag of
C241~C244 counting up and down.
4 Related flags and special register of high-speed counter:
Flag Function Explanation
M1150
Announce that DHSZ command is used as multi groups setting
value compare mode
M1151
DHSZ command multi groups setting value compare mode
execution completed
M1152
Announce that DHSZ command is used as frequency control
mode
M1153 Frequency control mode execution completed
M1235 ~ M1244
Specify counting direction of C235 ~ C244 high-speed counter
When M12=Off, C2 counting up
When M12=On, C2 counting down
M1246 ~ M1249
M1251 ~ M1254
Monitor counting direction of C246~C249, C251~C254
high-speed counter
When C2 counting up, M12=Off.
C2 counting down, M12=On.
M1260 X5 is the reset input signal of all high-speed counters
M1261 High-speed compare flag of DHSCR command
M1264
HHSC0 reset signal end (R) external control signal input contact
disable
7 Application Commands API 50-99

DVP-PLC Application Manual

7-14


Flag Function Explanation
M1265 HHSC0 start signal end (S) external control signal input contact disable
M1266 HHSC1 reset signal end (R) external control signal input contact disable
M1267 HHSC1 start signal end (S) external control signal input contact disable
M1268 HHSC2 reset signal end (R) external control signal input contact disable
M1269 HHSC2 start signal end (S) external control signal input contact disable
M1270 HHSC3 reset signal end (R) external control signal input contact disable
M1271 HHSC3 start signal end (S) external control signal input contact disable
M1272 HHSC0 reset signal end (R) internal control signal input contact
M1273 HHSC0 start signal end (S) internal control signal input contact
M1274 HHSC1 reset signal end (R) internal control signal input contact
M1275 HHSC1 start signal end (S) internal control signal input contact
M1276 HHSC2 reset signal end (R) internal control signal input contact
M1277 HHSC2 start signal end (S) internal control signal input contact
M1278 HHSC3 reset signal end (R) internal control signal input contact
M1279 HHSC3 start signal end (S) internal control signal input contact
M1289 High-speed counter interrupt, I010 masked
M1290 High-speed counter interrupt, I020 masked
M1291 High-speed counter interrupt, I030 masked
M1292 High-speed counter interrupt, I040 masked
M1293 High-speed counter interrupt, I050 masked
M1294 High-speed counter interrupt, I060 masked
M1312 C235 Start input control
M1313 C236 Start input control
M1314 C237 Start input control
M1315 C238 Start input control
M1316 C239 Start input control
M1317 C240 Start input control
M1320 C235 Reset input control
M1321 C236 Reset input control
M1322 C237 Reset input control
M1323 C238 Reset input control
M1324 C239 Reset input control
M1325 C240 Reset input control
M1328 C235 Start/Reset enable control
M1329 C236 Start/Reset enable control
M1330 C237 Start/Reset enable control
M1331 C238 Start/Reset enable control
M1332 C239 Start/Reset enable control
M1333 C240 Start/Reset enable control

7 Application Commands API 50-99

DVP-PLC Application Manual

7-15

Special
register
Function Explanation
D1022 Double frequency selection of AB phase counter in ES/EP series models
D1150
DHSZ command for table counting register of multi-group setting
comparison mode
D1151 DHSZ command for table counting register of frequency control mode
D1152
(lower-bit)
D1153
(upper-bit)
DHSZ command saves table counting register value that read in sequence
from pulse output frequency of each group in D1153 and D1152.
D1225 First counter counting method setting, C241, C246, C251 counter mode
D1226 Second counter counting method setting, C242, C247, C252 counter mode
D1227 Third counter counting method setting, C243, C248, C253 counter mode
D1228 Forth counter counting method setting, C244, C249, C254 counter mode
D1225 ~
D1228
Counter mode of Hardware high-speed counter, HHSC0~HHSC3 of EH
series model
When setting value is 0, it is normal frequency counter mode.
When setting value is 1, it is double frequency counter mode.
When setting value is 2, it is triple frequency counter mode.
When setting value is 3, it is four times frequency counter mode.


API

Applicable models
ES EP EH
54

D
HSCR


32-bit High-speed Counter
Comparison Reset
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Operand S
2
should be C235~C240, C241~C244,
C246~C249, C251~C254. Please refer to the footnote of
API 53 DHSCS command for details.
Operand D uses the same counter as S
2
operand.
There is no 16-bit command for API 54, only 32-bit
command DHSCR is available.
Refer to each model specification for usage range.
In ES and EP series models, D operand cannot use C
device.
In ES and EP series models, S
2
, D operand cannot use
index register E, F to modify.

16-bit command


32-bit command (13STEPS)
DHSCR
Continuous
execution

Flag: M1150~M1333. Refer to the
footnote of API 53 DHSCS
command for details.
M1261. High-speed counter
external reset mode selection.
ES and EP series models
doesnt support. Refer to the
footnote for details.

Command
Explanation

4 : Compare value : Numver of high-speed counter : Compare
result
4 HSCR command compares the current value of the selected high-speed counter
against a selected comapre value . When the counters currrent value
changes to a value equal to , the device specified as is set Off. Even if the
compare result is unequal, the status of device will still be Off.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-16

4 If the devices specified as the device are Y0~Y17, when the compare value
and the present value of high-speed counter are equal, the compare result will
immediately output to the external inputs Y0~Y17 (specified Y output will be reset),
and other Y devices will be affected by the scan cycle. However, M, S devices are
immediate output, not being affected by the scan cycle.
Program
Example
1

4 When M0=On and C251s present value stepped from 99100 or 101100, Y10 will
be set Off.
4 When C251s present value change from 199 to 200, the contact C251 will be On and
force Y0=On, but there will still be a program scan time delay output.
4 Y10 is status immediately reset device when specified counter reach. It also can be
used to specify the same number high-speed counter. Please refer to the program
example 2.
M1000
DCNT C251 K200
M0
DHSCR K100 C251 Y10
C251
SET Y0

Program
Example
2

4 When specifing the same number high-speed counter, the current value of high-speed
counter C251 will change from 9991000 or 10011000 and C251 contact will be
reset to Off.
M1000
DCNT C251 K200
DHSCR K1000 C251 C251

1000
200
C251
output
contact
affect by scan time
it doesn affect by scan time

Footnote

4 Please refer to the footnote of API 53 DHSCS command for the high-speed counters
and their usage range provided in each series models.
4 For EH series, M1261 is used to specify the external reset mode of high-speed
counter. Some high-speed counters provide input points for external reset. When
these input points being On, the corresponding current value of high-speed counter
will all be reset to 0 and the output contacts will turn Off. Therefore, user must use flag
M1261 to specify the external reset mode of high-speed counter and force the external
output being executed.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-17
4 The function limit of M1261: Only can be used in hardware high-speed counters
C241~C254.
4 The followings are the using example:
The input point of external reset of C251 is X2.
If Y10=On.
When M1261=Off, X2=On, the current value of C251 is reset to 0 and its contact
turns Off. When DHSCR command has been executed, there is no counter input
and the compared result does not output. Therefore, Y10=On will remain
unchaged.
When M1261=On, X2=On, the current value of C251 is reset to 0 and its contact
turns Off. When DHSCR command has been executed, although there is no
counter input, but compared result will still output. Therefore, the content of Y10
will be reset.
M1000
DCNT C251 K1000
DHSCR K0 C251 Y10
X10
M1261


API

Applicable models
ES EP EH
55

D
HSZ


Zone Comparison (High-speed
Counter)
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

S
D
Note: Operand S
1
should be equal to or smaller than operand S
2

(S
1
S
2
)
Operand S
2
should be C235~C240, C241~C244,
C246~C249, C251~C254. Please refer to the footnote of API
53 DHSCS command for details.
Operand D occupies 3 continuous devices.
There is no 16-bit command for API 55, only 32-bit command
DHSZ is available.
Refer to each model specification for usage range.
In EP series models, operand D cannot use index register E,
F to modify.

16-bit command


32-bit command (17 STEPS)
DHSZ
Continuous
execution

Flag: M1150~M1333. Refer to the
footnote of API 53 DHSCS
command.
M1150, M1151. DHSZ command
execute multi devices comparison
mode. Refer to the program 3 below.
EP series models do not support
these flags.
M1152, M1153 DHSZ command has
been used as frequency control
mode. Refer to the program 4 below.
EP series models do not support
these flags.

Command
Explanation

4 : Lower-limit value of zone comparison : Upper-limit value of zone
comparison : Number of high-speed counter : compared result
4 should be equal to or smaller than (S1 S2).
4 Output operation wont be affected by the scan time.
4 All outputs and zone comparison all use interrupt operation.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-18
Program
Example
1

4 The specified device is Y0, then Y0~Y2 will be occupied automatically.
4 When DHSZ command has been executed and high-speed counter C246 is counting,
if the upper- and lower limit value is reached, one of Y0~Y2 will be On.
M1000
DCNT C246 K20000
DHSZ K1500 K2000 C246
Y0
Y0
Y1
Y2
When current value of C246 < K1500, Y0On
When K1500 < current value of C246 < K2000, Y1=On
When current value of C246 > K2000, Y2=On


Program
Example
2

4 When using DHSZ command to control and stop high/low speed, C251 is AB phase
high-speed counter. There will be comparison value output of DHSZ command only
when counting pulse is stored in C251. Therefore, even the counting current value is
0, Y10 will not be On.
4 When X10=On, DHSZ command force Y10=On when counting current value
K2,000. In order to improve this problem, use DZCPP command to compare C251
against and K2,000 when the program RUN at the beginning. When counting current
value K2,000, Y10=On and DZCPP command is Pulse execution command.
Command DZCPP only can be executed ONCE in program and Y10 will be still be On.
4 When drive contact X10=Off, Y10~Y12 will be reset to Off.
X20
RST C251
ZRST Y10 Y12
M1000
DCNT C251 K10000
X10
DZCPP K2000 K2400 C251 Y10
DHSZ K2000 K2400 C251 Y10

7 Application Commands API 50-99

DVP-PLC Application Manual

7-19

4 Timing diagram
2000
2400
0
X10
Y10
Y11
Y12
0
high speed
forward
low speed
forward
Stop
current value of
C251 counter
Speed of variable
speed rotational
equipment

Program
Example
3

4 When using the multi groups setting value comparison mode of DHSZ command, if
of DHSZ command is specified as special auxiliary relay M1150, it can execte a
current value of high-speed counter and has the function which can compare and
output multi groups setting value.
4 Under this mode, is defined as starting device of comparison table. It only can
be data register D and can be modified by index register E, F. But the number modified
by index register E, F is unchanged after the command has been executed. is
defined as the data groups of comparison data. It only can be K1~K128 or H1~H80
and also can be can be modified by index register E, F. After the command has been
executed, it is disabled to change this value. is defined as the number of
high-speed counter and it should be C235~C254. is defined as mode setting. It
only can be M1150 and can be modified by index register E, F. But if it is not M1150,
then will be disabled.
4 The comparison table of high-speed counter consists of the head number of register
specified by and bank numbers (groups number) specified by .
4 Please input the setting value of each register before the command being executed.
4 When current value of C251 high-speed counter specified by is equal to the
setting value of (D1, D0), output Y specified by D2 will be reset to Off (D3=K0) or On
(D3=K1) and latched. All of output Y use interrupt operation.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-20

4 When the current value of C251 is equal to the setting value of the first groups in the
comparison table, D1150=K1. If the current value of C251 is equal to the setting value
of the second groups, D1150=K2. Then the comparison will continute to execute in the
above described order. After the comparison operation of all groups are completed,
M1151=On for one scan cycle and D1150 will be reset to 0, then jump back to the first
groups to execute.
4 When the drive contact X10 turns Off, the operation of the command will be
interruptted and the content of table counting register D1150 will be reset to 0. But the
ON/OFF state is unchanged at that time.
4 When this command command has been executed and first scan to END command,
all setting value inside of the diagram are valid.
4 This function of this command only can be used ONCE in program. In EP series
models, this function does not provided.
4 This function of this command only can be used in hard ware high-speed counter
C241~C254.
X10
DHSZ D0 K4 C251 M1150

Comparison table
32-bit comparison data
High word Low word
Number of output
Y
On/Off
indication
Table counting
register D1150
D1 (K0) D0 (K100) D2 (K10) D3 (K1) 0
D5 (K0) D4 (K200) D6 (K11) D7 (K1) 1
D9 (K0) D8 (K300) D10 (K10) D11 (K0) 2
D13 (K0) D12 (K400) D14 (K11) D15 (K0) 3

K10:Y10
K11:Y11
K0:Off
K1:On
01230
Cyclic scan

M1151
D1050
Y11
Y10
100
200
300
400
C251
0
1
2
3
0
current value

7 Application Commands API 50-99

DVP-PLC Application Manual

7-21


4 Related flags and special register of high-speed counter:
Flag Function Explanation
M1150
Announce that DHSZ command is used as multi groups setting
value compare mode
M1151
For DHSZ command, Multi groups setting value compare mode
execution completed

Special register Function Explanation
D1150 For DHSZ command, Table index of DHSZ Y output
Program
Example
4

4 Frequency control operation (Combined DHSZ and DPLSY command): When
of DHSZ command is special auxiliary relay M1152, it can execte a current value of
high-speed counter and has the function which can control pulse output frequency of
DPLSY command.
4 Under this mode, is defined as starting device of comparison table. It only can
be data register D and can be modified by index register E, F. But the number modified
by index register E, F is unchanged after the command has been executed. is
defined as the data groups of comparison data. It only can be K1~K128 or H1~H80
and also can be can be modified by index register E, F. After the command has been
executed, it is disabled to change this value. is defined as the number of
high-speed counter and it should be C235~C254. is defined as mode setting. It
only can be M1152 and can be modified by index register E, F. But if it is not M1152,
then will be disabled.
4 This function of this command only can be used ONCE in program. In EP series
models, this function does not provided. For EH series models, it only can be used in
hardware high-speed counters C241~C254. Please input the setting value of each
register before the command being executed.
4 When the current value of C251 specified by is within the range between the
upper- and lower-limit of (D1, D0), the setting value of (D3, D2) will be converted to
pulse output frequency of DPLSY command. Then, the second groups in the
comparison table will continue to execute. After the comparison operation of all groups
are completed, M1153=On for one scan cycle and D1151 will be reset to 0, then jump
back to the first groups to execute.
4 If desiring to stop the execution at the last group, Please set the content of the last
group as KO.
4 When the drive contact X10 turns Off, the operation of the command will be
interruptted and the content of table counting register D1151 will be reset to 0.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-22
X10
DHSZ D0 K5 C251 M1152
PLS M0
DPLSY D1152 K0 Y0
M0

Comparison table
32-bit comparison data
High word Low word
Pulse output frequency
0~250KHz
Table counting
register D1151
D1 (K0) D0 (K100) D3, D2 (K5,000) 0
D5 (K0) D4 (K200) D7, D6 (K10,000) 1
D9 (K0) D8 (K300) D11, D10 (K15,000) 2
D13 (K0) D12 (K400) D15, D14 (K6,000) 3
D17 (K0) D16 (K0) D19, D18 (K0) 4

01234
Cyclic scan

D1051
0
1
2
0
3
4
0
5000
10000
15000
M1153
0
100
200
300
400
500
(Hz)
p
u
l
s
e

o
u
t
p
u
t

f
r
e
q
u
e
n
c
y
C251
current value



4 Related flags and special register of high-speed counter:
Flag Function Explanation
M1152
Announce that DHSZ command is used as frequency control
mode
M1153
For DHSZ command, frequency control mode execution
completed

Special register Function Explanation
D1151 Table index changed by DHSZ D value
D1152 (low word)
D1153 (high word)
DHSZ command saves table counting register value that read
in sequence from pulse output frequency of each group in
D1153 and D1152.
D1336 (low word)
D1337 (high word)
Pulse numbers of DPLSY command output

7 Application Commands API 50-99

DVP-PLC Application Manual

7-23

4 The completed program is shown below:
X10
DMOVP K5000 D2
DHSZ D0 K5 C251 M1152
DMOVP K10000 D6
DMOVP K15000 D10
DMOVP K6000 D14
DMOVP K0 D18
DMOVP K100 D0
DMOVP K200 D4
DMOVP K300 D8
DMOVP K400 D12
DMOVP K0 D16
PLS M0
M0
DPLSY D1152 K0 Y0
frequency pulse
number
output

4 Please do not change the setting value in this comparison table during the execution
of DHSZ command.
4 When the program has been executed to END command, the specified data will be
operated shown as the above example program. Therefore, DPLSY command should
be executed after the execution of DHSZ command.












7 Application Commands API 50-99

DVP-PLC Application Manual

7-24
API

Applicable models
ES EP EH
56


SPD


Speed Detection
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: The usage of Operand S
1
: In ES and EP series models,
operand S
1
only can be specified as X1~X2. In EH series
models, operand S
1
only can be specified as X0~X3.
Operand D occupies 5 continuous devices.
Refer to each model specification for usage range.

16-bit command (7 STEP)
SPD
Continuous
execution


32-bit command

Flag: M1100. SPD command sampling
one time flag

Command
Explanation

4 : External pulse input : Pulse reveived time(ms) : Detection
result
4 : Specify the input of external pulse
Pulse inputs of each series models
Models
ES series models
(V5.7 and above) and EP series models
EH series models
Available
inputs
X1, X2 X0~X3
4 Count the number of pulse received at the inputs specified by during the time
specified by (unit is ms) and store te result in the register specified by .
4 occupies 5 registers, +1, indicate the detection value of previous
pulse, +3, +2 indicate the present accumulated count value of pulse and
+4 indicates the remaining count time, the max. can be 32767ms.
4 Measured pulse frequency:
Pulse speed of each series models
Models
ES series models
(V5.7 and above) and EP series models
EH series models
Max. measured
frequency
X1(30KHz), X2(10KHz)
Total frequency is less than 30KHz
X0/X1 (250KHz)
X2/X3 (10KHz)
4 When using this command in EH series models, the pulse frequency of external input
X0~X3 and the frequency of hardware high-speed counter are the same and both of
them all can reach 250KHz.
4 This command is mainly used to obtain a proportional value of rotation speed. The
result and rotation speed are in proportion. The following equation can used to
obtain the rotation speed of motor.
N: Rotation speed
n:
The number of pulses per rotation of rotation
equipment
N=
( )
( ) rpm
nt
D
3
10
0 60

t:
Detection time specified by (ms)
4 If one of X0~X3 is specified, the specified device can not be used as the pulse input of
high-speed counter or external interrupt signal.

7 Application Commands API 50-99

DVP-PLC Application Manual

7-25
4 When SPD command has been executed and M1100 (SPD command sampling one
time flag)=On, SPD command will execute sampling one time. SPD command will
collect data one time when the movement of M1100 turning from Off to On, then stop.
If desiring to continue the collection, be sure to turn M1100 Off and execute SPD
command again.
Program
Example

4 When X7=On, D2 will count the high-speed pulse input from X1. After 1,000ms, it will
stop counting automatically and store the result in D0.
4 After 1000ms counting completed, the content of D2 will be reset to 0. When X7 turns
On again, D2 will recount.
X7
SPD X1 K1000 D0

X7
X1
1000
1000ms 1000ms
D4: content
value
D2: current
value
D2: content
value
D0: detection
value
D4:remaining time (ms)

Footnote

4 In ES series models (V5.7 and above), if X1 or X2 is used in SPD command, then the
related high-speed counters or external interrupts I101, I201 can not be used.

API

Applicable models
ES EP EH
57

D
PLSY


Pulse Output
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: For the usage range of operand S
1
, S
2
and D, please refer to
the command explanation for details.
Refer to each model specification for usage range.
In ES series models, PLSR command can be used twice but
the output cannot be repeat.

16-bit command (7 STEPS)
PLSY
Continuous
execution


32-bit command (13 STEPS)
DPLSY
Continuous
execution

Flag: M1010~M1345. Refer to the
footnote.

7 Application Commands API 50-99

DVP-PLC Application Manual

7-26
Command
Explanation

4 : Pulse output frequency : Pulse output number : Pulse output
device (Please use the transistor output as output module)
4 specified as the pulse output frequency
Output frequency range of each series models
Models ES series models
EP series
models
EH series
Output
frequency range
1~10,000Hz 1~32,000Hz 1~200,000Hz
4 specified as the pluse output number. 16-bit command: 1~32,767. 32-bit
command: 2,147,483,647.
Numbers of continuous pulses of each series models
Models
ES series models and EP series
models
EH series models (TR
models)
Specified method of
continuous pulses
M1010Y0 ON
M1023Y1 ON
Designated pulse output
number is set to K0
4 If designated pulse output number is set to 0 (zero) in EH series models, it means
that unlimit numbers of pulses will continuously output. M1010(Y0) or M1023(Y1)
should be On when unlimt numbers of pulse continuously output .
4 specified as the pulse output device. In EH series models, only Y0 and Y2 can
be specified. In EP/ES series models, only Y0 and Y1 can be specified.
4 When PLSY command has been executed, a specified quantity of pulses will
be output through pulse output device at the specified pulse output frequency
.
4 When using PLSY command in progam, the outputs of PLSY command, API 58 PWM
command and API 59 PLSR command cannot be the same.
4 In EP/ES series models, after Y0 pulse output completed, M1029 will be turned On,
after Y1 pulse output completed, M1030 will be turned On. When PLSY command is
Off, M1029 or M1030 will be turned Off.
4 In EH series models, Y0 and Y1 pulse output completed, M1029 will be turned On,
after Y2, Y3 pulse output completed, M1030 will be turned On. When PLSY command
is Off, M1029 or M1030 will be turned Off.
4 The execution completed flag M1029, M1030 should be clear by user after the
execution of the command has been completed.
4 When command PLSY has been executed, Y start to output pulse. At this time, the
output will not be affected if is changed. If desiring to change pulse output
number, stop command PLSY, then change the pulse number.
4 can be changed when command PLSY has been executed. It can change the
effective time. is changed when the program is executed to the executed
command PLSY.
4 The ratio of Off TIME and On TIME of the pulse output is 1:1.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-27

4 The actual output pulse numbers are stored in special registers D1336~D1339 when
the program is executed to the command PLSY. Refer to the footnote for details.
4 The special register D and M which are allowed to be changed during the execution of
the command. Refer to the footnote for details.
Program
Example


4 When X0=On, the pulse of 1KHz for 200 times is generated from output Y0, after the
pulse has been completed, M1029=On trigger Y10=On.
4 When X0=Off, pulse output Y0 immediately stop. When X0 turns On again, the first
pulse start to output.
X0
PLSY K1000 K200 Y0
M1029
Y100

1 2 3 200 Output Y0
0.5ms
1ms
Footnote

4 Flags description:
M1010: In EH series MPU, when M1010= On, Y0, Y1 and Y2, Y3 will output pulse
while END command is executed. When output starts, M1010 will
automatically turn Off.
In EP/ES series MPU, when M1010=On, Y0 can output limitless continuous
pulses. When M1010=Off, the pulse output numbers of Y0 are decided by
.
M1023: In EP/ES series MPU, when M1023=On, Y1 can output limitless continuous
pulses. When M1023=Off, the pulse output numbers of Y1 are decided by
.
M1029: In EH series MPU, M1029= On after Y0, Y1 pulse output complete.
In EP/ES series MPU, M1029= On after Y0 pulse output complete.
M1030: In EH series MPU, M1030= On after Y2, Y3 pulse output complete.
In EP/ES series MPU, M1030= On after Y1 pulse output complete.
M1078: In EP/ES series, Y0 pulse output stop.
M1079: In EP/ES series, Y1 pulse output stop.
M1258: In EH series MPU, (PWM command) Y0, Y1 pulse output signal exchange.
M1259: In EH series MPU, (PWM command) Y2, Y3 pulse output signal exchange.
M1334: In EH series MPU, CH0 pulse output stop.
M1335: In EH series MPU, CH1 pulse output stop.
M1336: In EH series MPU, CH0 pulse output indication flag.
M1337: In EH series MPU, CH1 pulse output indication flag.
M1338: In EH series MPU, CH0 offset pulse start flag.
M1339: In EH series MPU, CH1 offset pulse start flag.
M1340: In EH series MPU, the interrupt (I110) occur after CH0 pulse output complete.
M1341: In EH series MPU, the interrupt (I120) occur after CH1 pulse output complete.
M1342:
In EH series MPU, the interrupt (I130) occur simultaneously when CH0 pulse
transmit.
M1343:
In EH series MPU, the interrupt (I140) occur simultaneously when CH1 pulse
transmit.
M1344: In EH series MPU, CH0 compensation pulse start flag.
M1345: In EH series MPU, CH1 compensation pulse start flag.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-28
4 Special registers description of EP series MPU:
D1030: Present total pulse numbers of first output group Y0 (LOW WORD).
D1031: Present total pulse numbers of first output group Y0 (HIGH WORD).
D1032: Present total pulse numbers of second output group Y1 (LOW WORD).
D1033: Present total pulse numbers of second output group Y1 (HIGH WORD).
4 Special registers description of EH series MPU:
D1220: The phase setting of the first output group Y0, Y1: determine by the last two bits
of D1220, other bits are invalid.
1. K0: Y0 output
2. K1: Y0, Y1 AB phase output, A leads B
3. K2: Y0, Y1 AB phase output, B leads A
4. K3: Y1 output
D1221: The phase setting of the second output group Y2, Y3: determine by the last two
bits of D1221, other bits are invalid.
1. K0: Y2 output
2. K1: Y2, Y3 AB phase output, A leads B
3. K2: Y2, Y3 AB phase output, B leads A
4. K3: Y3 output
D1328: CH0 offset pulse number (Low word)
D1329: CH0 offset pulse number (High word)
D1330: CH1 offset pulse number (Low word)
D1331: CH1 offset pulse number (High word)
D1332: CH0 remaining pulse number (Low word)
D1333: CH0 remaining pulse number (High word)
D1334: CH1 remaining pulse number (Low word)
D1335: CH1 remaining pulse number (High word)
D1336: Present total output pulse numbers of first output group (Y0, Y1) (LOW WORD).
D1337: Present total output pulse numbers of first output group (Y0, Y1) (HIGH WORD).
D1338: Present total output pulse numbers of second output group(Y2,Y3)(LOW WORD).
D1339: Present total output pulse numbers of second output group(Y2,Y3)(HIGH WORD).
D1344: CH0 compensation pulse number (Low word)
D1345: CH0 compensation pulse number (High word)
D1346: CH1 compensation pulse number (Low word)
D1347: CH1 compensation pulse number (High word)
4 When several high-speed pulse output commands (PLSY, PWM, PLSR) use Y0 to
output pulse in one program and simultaneously been executed in the same scanning
cycle, PLC will perform the command which has fewest step numbers.
4 The explanation of PLSY pulse output command and related devices of EH series
MPU:
Explanation of PLSY command
Operand S1 S2 D
Explanation Frequency setting Pulse quantity Output device
16-bit 0~32,767Hz 0~32,767
Range
32-bit 0~200KHz 0~2,147,483,647
Y0~Y3
Definition
K0: No output
Kn: Specified
frequency output
K0: Continuous pulse
output
Kn: Specified pulse output
Refer to the
setting of D1220,
D1221
7 Application Commands API 50-99

DVP-PLC Application Manual

7-29


Explanation of the related device of PLSY command (Special D)
Device No.
Data
format
Attribute
Initial
value
Content
D1220 16-bit R/W K0
The phase setting of the first output pulse
group
D1221 16-bit R/W K0
The phase setting of the second output
pulse group
D1328 Low word
D1329 High word
32-bit R/W K0
The offset pulse number of the first pulse
group
D1330 Low word
D1331 High word
32-bit R/W K0
The offset pulse number of the first pulse
group
D1332 Low word
D1333 High word
32-bit R/W K0
The remaining pulse number of the first
pulse group
D1334 Low word
D1335 High word
32-bit R/W K0
The remaining pulse number of the second
pulse group
D1336 Low word
D1337 High word
32-bit R/W K0
The current value of the first pulse group
(The accumulated value of pulse output
numbers)
D1338 Low word
D1339 High word
32-bit R/W K0
The current value of the second pulse
group (The accumulated value of pulse
output numbers)
D1341 Low word
D1342 High word
32-bit R/W K200000 Max. output frequency
D1344 Low word
D1345 High word
32-bit R/W K0
The compensation pulse number of the
first pulse group
D1346 Low word
D1347 High word
32-bit R/W K0
The compensation pulse number of the
second pulse group

Explanation of the related device of PLSY command (Special M)
Device
No.
Attribute Content
Related
setting device
M1010 R/W Two pulse output groups simultaneously
M1029 R End indication flag of the first pulse group
M1030 R End indication flag of the second pulse group
M1334 R/W Pulse output stop of the first pulse group
M1335 R/W Pulse output stop of the second pulse group
M1336 R Output indication flag of the first pulse group
M1337 R Output indication flag of the second pulse group
M1338 R/W OFFSET start flag of the first pulse group D1328, D1329
M1339 R/W OFFSET start flag of the second pulse group D1330, D1331
M1340 R/W
Interrupt occur after the first pulse group output
complete.
I110
M1341 R/W
Interrupt occur after the first pulse group output
complete.
I120
M1342 R/W
Interrupt occur after the first pulse group output
complete.
I130
M1343 R/W
Interrupt occur after the first pulse group output
complete.
I140
M1344 R/W Compensation start flag of the first pulse group D1344, D1345
M1345 R/W Compensation start flag of the second pulse group D1346, D1347
M1347 R/W Auto interrupt reset flag of the first pulse group
M1348 R/W Auto interrupt reset flag of the second pulse group

7 Application Commands API 50-99

DVP-PLC Application Manual

7-30
API

Applicable models
ES EP EH
58


PWM


Pulse Width Modulation Output
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D


Note: For the usage range of operand S
1
, S
2
and D, please refer
to the command explanation.
The content value of operand S
1
should be smaller than the
content value of S
2
.
Refer to each model specification for usage range.
In ES / EP series models, command PWM only can be used
ONCE in program.

16-bit command (7 STEPS)
PWM
Continuous
execution


32-bit command

Flag: M1010~M1337. Refer to the
footnote.

Command
Explanation

4 : Pulse output width : Pulse output cycle : Pulse output device
(Please use transistor output as the output module)
4 is specified as pulse output width as t:0~32,767ms.
4 is specified as pulse output cycle as T:1~32,767ms, .
4 is specified as pulse output device. In EH series MPU, can be specified
as Y0, Y2. In EP/ES series models, can be specified as Y1.
Modulated pulse output of each series models
Models ES/EX series models and EP series models EH series models
PWM output Y1 Y0, Y2
4 PWM command can be used TWICE in the program of EH series models. PWM
command can be used ONCE in the program of EP/ES series models.
4 The output cannot be the same as the output of API 57 PLSY, API 59 PLSR command
while PWM command is used in program.
4 When PWM command has been executed, the pulse output width and pulse
output cycle is output through pulse output device .
4 If > , an operation error will occur, M1067 =On. When is 0, there is
no pulse output from the pulse output device. When = , the pulse output
device will be always On.
4 , can be changed during the execution of PWM command.
Program
Example


4 When X0=On, Y1 output the following pulse. When X0=Off, output Y1 will also turn
Off.
X0
PWM K1000 K200 Y1

Output Y1
t=1000ms
T=2000ms
7 Application Commands API 50-99

DVP-PLC Application Manual

7-31
Footnote

4 Flags description:
M1010: In EH series MPU, when M1010= On, Y0, Y1 and Y2, Y3 will output pulse
while END command is executed. When output starts, M1010 will
automatically turn Off.
M1067: In EH series MPU, when operand is error, M1067=On.
M1070: In EP/ES series MPU, When PWM command output Y1, the pulse unit will
exchange. When M1070=On, the pulse unit is 100s, when M1070=Off, the
pulse unit is 1ms.
In EH series MPU, when the first pulse output group of PWM command
output Y0, the pulse unit will exchange. When M1070=On, the pulse unit is
100s, when M1070=Off, the pulse unit is 1ms.
M1071: In EH series MPU, when the first pulse output group of PWM command
output Y2, the pulse unit will exchange. When M1071=On, the pulse unit is
100s, when M1071=Off, the pulse unit is 1ms.
M1258: In EH series MPU, (PWM command) Y0, Y1 pulse output signal exchange.
M1259: In EH series MPU, (PWM command) Y2, Y3 pulse output signal exchange.
M1334: In EH series MPU, CH0 pulse output stop.
M1335: In EH series MPU, CH1 pulse output stop.
M1336: In EH series MPU, CH0 pulse output indication flag.
M1337: In EH series MPU, CH1 pulse output indication flag.

4 When several high-speed pulse output commands (PLSY, PWM, PLSR) use Y0 to
output pulse in one program and simultaneously been executed in the same scanning
cycle, PLC will perform the command which has fewest step numbers.
Functions of
EH series MPU

4 Explanation of PWM command and the related device of EH series models.
Device
No.
Data
Format
Attribute
Related setting
device
M1010 R/W Two pulse output groups simultaneously
M1070 R/W Y0 and Y1 PWM pulse time unit exchange
M1071 R/W Y2 and Y3 PWM pulse time unit exchange
M1258 R/W Y0 and Y1 PWM pulse output signal exchange
M1259 R/W Y2 and Y3 PWM pulse output signal exchange
M1334 R/W Pulse output stop of the first pulse group
M1335 R/W Pulse output stop of the second pulse group
M1336 R Output indication flag of the first pulse group
M1344 R/W Output indication flag of the second pulse group D1344, D1345

API

Applicable models
ES EP EH
59

D
PLSR


Pulse Wave Output with
Acceleration/Deceleration Speed
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

S
3

D
Note: For the usage range of operand S1, S2 and D, please refer
to the command explanation.
Refer to each model specification for usage range.
In ES series models, PLSR command can be used TWICE
in program but the output can not be the same.

16-bit command (9 STEPS)
PLSR
Continuous
execution


32-bit command (17 STEPS)
DPLSR
Continuous
execution

Flag: M1029, M1030. Execution
Completed flag.



7 Application Commands API 50-99

DVP-PLC Application Manual

7-32
Command
Explanation

4 : Maximum speed (HZ) : Content of the pulse output quantity (PLS)
: Acceleration/Deceleration time (ms) : Pulse output device (Please use
transistor output as output module)
4 : the maximum frequency (Hz) of output pulse. Settings: In 16-bit command: 10
to 32,767 Hz. In 32-bit command: 10 to 200,000 Hz. The maximum speed is deemed
to be the multiples of 10, if not, the first unit will be discarded automatically. 1/10 of the
maximum speed is the one time variation of the accel/decel speed. Note that the
condition meets the acceleration requirement of the step motor and would not result in
the step motor crash..
4 : Content of the pulse output quantity (PLS). Settings: In 16-bit command:
110~32,767 (PLS). In 32-bit command: 110~2,147,483,647(PLS). If the setting is
below 110, the pulse cannot output normally.
4 : Acceleration/Deceleration time (ms). Settings: below 5,000ms. The accel time
and the decel time have to be the same and cannot be set without one another.
1. The accel/decel time has to be over 10 times the maximum scan time (contents of
D1012). If the setting is below 10 times, the slope of the accel/decel speed will be
inaccurate.
2. Minimum setting of the accel/decel time could be obtained from the following
equation.
90000

If the setting is smaller than the result of the above-mentioned equation, the
acceleration/deceleration time will be greater, and if the setting is smaller than the
9000/ , the result value of 9000/ will be treated as its regular setting.
3. Maximum setting of the accel/decel time could be obtained from the following
equation.
818

4. Number of the accel/decel speed variation steps is fixed to be 10. If the input
acceleration/deceleration time is greater than the maximum setting, the maximum
setting will be treated as its regular setting. If the setting is smaller than the
minimum setting, the minimum setting will be treated as its regular setting.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-33

4 PLSR command is the pulse output command with the accel/decel speed function.
The acceleration is conducted when the pulse wave goes from the static status to
reaching its targeted speed, and getting faster when the targeted speed is to be
reached. The pulse wave will stop its output once the targeted distance is reached.
4 When PLSR command has been executed, after set the maximum frequency , a
quantity of total pulse numbers and accel/decel time , then output them through
pulse output device . The output frequency is first raised up in 1/10 of the
maximum frequency /10 and the time of each output frequency is fixed as 1/9 of
.
4 Even user change , or when PLSR command has been executed,
the output will not be affected.
4 After the pulse numbers of the first output pulse group (Y0, Y1) set by has been
completely output, M1029=On. After the pulse numbers of the second output pulse
group (Y0, Y1) set by has been completely output, , M1030=On. When the
command PLSR is activated again, M1029 or M1030 will turn to 0, then turn to 1 after
the PLSR command has been completed.
4 The output pulse of the first output group (Y0, Y1) and the cueent value of he second
output group (Y2, Y3) are stored in the special regisers D1336~D1339.
4 During the acceleration of each step, the pulse numbers (each frequency x time) may
not all be integer, but the output operation of PLC is conducted in whole integer
number. Therefore, the time of each interval may not be the same and has some
deviation. The offset is determined by the frequency value and the discarding decimal
point value. In order to ensure the output pulse numbers are correct, PLC will fill the
insufficiency pulse numbers to the last interval.
Program
Example

4 When X0=On, the maximum frequency of command PLSR is 1,000Hz. The quantity of
total pulse numbers D10, accel/decel time is 3,000ms and pulses output from output
Y0. The pulses are output and the output frequency is 1,000/10 Hz every time. The
time of output pulse of each frequency is fixed as 3,000/9.
4 When X10 is OFF, output will be interrupted, and when turned ON again, counting of
the pulse will be counted from 0.
X0
PLSR K1000 D10 K3000 Y0

7 Application Commands API 50-99

DVP-PLC Application Manual

7-34


Outputs: Y0 or Y2
Pul se speed(Hz)
Targeted speed: 10~200,000Hz
Time(Sec)
Decel time
below 5000ms
Accel ti me
below 5000ms
16-bit command:110~32,767PLS
32-bit command:110~2,147,483,647PLS
1 1
2 2
3 3
4 4
5 5
6 6
7 7
8 8
9 9
1010
Output pul ses
The time interval of the
one time pulse output
is 1/9 of
The max. speed of the
one time speed variation
is 1/10 of
10-step
variations
10-step
variations

Footnote

4 The output cannot be the same as the output of API 57 PLSY, API 58 PWM command
while PLSR command is used in program.
4 When several high-speed pulse output commands (PLSY, PWM, PLSR) use Y0 to
output pulse in one program and simultaneously been executed in the same scanning
cycle, PLC will perform the command which has fewest step numbers.
Functions of
EH series MPU

4 Explanation of the command and related devices in EH series MPU
X0
PLSR K1000 D10 K3000 Y0

4 The speed range for the pulse of this command is 10~200,000Hz. And if the settings
for the high speed and the accel/decel time exceed this range, use the allowable
setting within this range for operation.
Command Explanation
Operand S1 S2 S3 D
Explanation Max. frequency Total pulse quantity
Accel/Decel
Time
Output device
16-bit 10~32,767Hz 110~32,767
Range
32-bit 10~200KHz 110~2,147,483,647
1~5000ms Y0~Y3
Definition
K0: No output
Kn: Specified
frequency output
K0: Continuous pulse
output
Kn: Specified pulse
output
Flag:
M1067
M1068
Refer to the
setting of
D1220, D1221
1~5000ms 1~5000ms
16-bit command: 110~32,767PLS
16-bit command: 110~2,147,483,647PLS
Frequency F
Maximum speed: 10~200,000Hz
Decel time Accel ti me
F0
Start
frequency
Total output pulses

7 Application Commands API 50-99

DVP-PLC Application Manual

7-35


Explanation of the related device of PLSR command (Special D)
Device No.
Data
forma
t
Attribute
Initial
value
Content
D1220 16-bit R/W K0
The phase setting of the first output
pulse group
D1221 16-bit R/W K0
The phase setting of the second
output pulse group
D1336 Low word
D1337 High word
32-bit R/W K0
The current value of the first pulse
group (The accumulated value of
pulse output numbers)
D1338 Low word
D1339 High word
32-bit R/W K0
The current value of the second
pulse group (The accumulated value
of pulse output numbers)
D1340 16-bit R/W K200 Start frequency
D1341 Low word
D1342 High word
32-bit R/W K200000 Max. output frequency


Explanation of the related device of PLSR command (Special M)
Device
No.
Attribute Content
Related
setting device
M1010 R/W Two pulse output groups simultaneously
M1029 R End indication flag of the first pulse group
M1030 R End indication flag of the second pulse group
M1334 R/W Pulse output stop of the first pulse group
M1335 R/W Pulse output stop of the second pulse group
M1336 R Output indication flag of the first pulse group
M1337 R Output indication flag of the second pulse group
M1067 R/W Program execution error flag
M1068 R Execution error latch D1068
4 In EH series models, if the acceleration/deceleration time cannot reach the maximum
acceleration frequency, the acceleration/deceleration time and maximum frequency
will be adjusted automatically. The related functions are listed as follows:
Step 1: First, use the following equations to obtain the result of (1), (2) and (3) to adjust
acceleration time.
1340
0
D F = if
1 0
60 S F > + or 0
0
= F
60
S
1
0
= F ..(1)
( )
( )
1 0
2
3
29 30
30
S F
S
S
+

< ..(2)
0
3
600000
F
S ..(3)
Step 2: Calculates the interval of the acceleration of each step, F
G
by using the following
equation. The interval of each step are the same:
59
1
S
F
G
= ..(4)
7 Application Commands API 50-99

DVP-PLC Application Manual

7-36


Step 3: Calculates the max. output pulse numbers of acceleration/ deceleration
time: 2
2
2
=
S
P
G
(5)
Step 4: Set the following variables.
Fi: The frequency of each acceleration/deceleration interval, i = 1~59,

G
F F F + =
0 1
,
G i i
F F F + =
1
(6)
T
G
: The acceleration/deceleration time of each acceleration/deceleration
interval
59
3
S
T
G
= (7)
Step 5: Entering the result of (5), (6), (7) to the following equation can get the result as
follows:

=

59
0 i
G G i
P T F .. (8)
Step 6: In the equation of (8), if the value of the calculation result has been greater than the
P
G
value before item 59 has been calculated.
4 In EH series models, the commands that are related to acceleration and deceleration
all can use the above equations.
4 The parameters of command PLSR must be input before the command has been
executed.
4 All acceleration and deceleration commands are with brake function. When the PLC
acceleration is executed but the switch contact is Off suddenly, the brake function is
activated and PLC will decelerate in the same slope of acceleration speed.
S1
F
0
Time T
Frequency F
Origin acceleration path
Brake path


API

Applicable models
ES EP EH
60


I ST


Manual/Auto Control
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
1

D
2

Note: Operand S will occupy 8 continuous devices.
The usage range of operand D
1
and

D
2
is S20~S899 and
D
2
D
1.

IST command only can be used one time in program.
Refer to each model specification for usage range.

16-bit command (7 STEPS)
IST
Continuous
execution


32-bit command

Flag: M1040~M1047.
Refer to following for detail.

7 Application Commands API 50-99

DVP-PLC Application Manual

7-37
Command
Explanation

4 : The starting input number of the designated operation mode. : The
smallest number for the designated-status step point under the auto mode. : The
greatest number for the designated-status step point under the auto mode.
4 The IST is a convenient command made specifically for the initial state of the step
ladder control procedure to accommodate the special auxiliary relay to the convenient
auto control command.
M1000
IST X10 S20 S60


X10: Individual operation (Manual operation)
X11: Zero point return
X12: Step operation
X13: One cycle operation
X14: Continuous operation
X15: Zero point return start switch
X16: Start switch
X17: Stop switch
4 When the IST command is executed, the following special auxiliary relay will switch
automatically.
M1040: Movement inhibited
M1041: Movement start
M1042: Status pulse
M1047: STL monitor enable
S0: Manual operation/initial state step point
S1: Zero point return/initial state step point
S2: Auto operation/initial state step point
Program
Example
1


4 When IST command is used, S10~S19 are for zero point return operation and the step
point of this state cant be used as general step point. However, when using S0~S9
step points, S0 initiates manual operation, S1 initiates zero point return operation
and S2 initiates auto operation. Thus, there should be three circuits of these three
initial state step points first written in program.
4 When switching to S1 (zero point return mode), zero point return wont have any
actions once one of S10~S19 is On.
4 When switching to S2 (auto operation mode), auto operation wont have any actions
once one of between to is On or M1043=On
Program
Example
2

4 Example: the Robot arm control (use IST command):
Motion request: In the example, two kinds of balls (big and small) are separated and
moved to different boxes. Distribute the control panel for the control.
Motion of the Robot arm: lower robot arm, collect balls, raise robot arm, shift to right,
lower robot arm, release balls, raise robot arm, shift to left to finish motion in order.
I/O Device:
Y0
Y1
Y2 Y3
Left-limit X1
Upper-li mi t X4
Upper-li mi t X5
Right-li mi t X2
(bi g bal ls)
Right-li mi t X3
(small bal ls)
Big Small Big/smal l
sensor X0

7 Application Commands API 50-99

DVP-PLC Application Manual

7-38

Control panel
X15
X16
X17
X20
X21
X22
X23
X24
X25
Step X12
One cycle
operation X13
Continuous
operation X14
Manual
operation X10
Zero return X11
Power start
Power stop
Zero return Auto start
Auto stop
Shi ft
to right
Shi ft
to left
Rel ease
balls
Col lect
balls
Lower
robot arm
Rai se
robot arm

Big/small sensor X0.
The left-limit of the robot arm X1, the right-limit X2 (big balls), the right-limit X3
(small balls), the upper-limit X4, and the lower-limit X5.
Raise robot arm Y0, lower robot arm Y1, shift to right Y2, shift to left Y3, and
collect balls Y4.
START circuit:
M1000
IST X10 S20 S80
X0
M1044
X1 Y4

Manual operation mode:
X20
SET
RST Y4
Y4
S
S0
X21
X22 Y1
Y0
X23 Y0
Y1
X24 X4
Y2
Y3
X25 X4
Y3
Y2
Collect balls
Release balls
Lower robot arm
Raise robot arm
Condition interlock
Shift to right
Shift to left
Condition interlock
Raise robot arm to the
upper-limit (X4 is ON)

Zero point return mode:
SFC figure:
S1
S10
X15
S11
X4
S12
X1
RST Y4
RST Y1
Y0
RST Y2
Y3
SET M1043
RST S12
Release balls
Stop lowering robot arm
Raise robot arm to the
upper-limit (X4 is ON)
Stop shifting to right
Shift to left and shift to
the left-limit (X1 is On)
Start zero return completed flag
Zero return operation completed

7 Application Commands API 50-99

DVP-PLC Application Manual

7-39
Ladder Diagram:
X15
SET S10
S
S1
RST Y4
S
S10
RST Y1
Y0
X4
SET S11
RST Y2
S
S11
Y3
X1
SET S12
SET M1043
S
S12
RST S12
Enter zero return operation mode
Release balls
Stop lowering robot arm
Raise robot arm to the
upper-limit (X4 is ON)
Stop shifting to right
Shift to left and shift to
the left-limit (X1 is On)
Start zero return completed flag
Zero return operation completed


Auto operation (step/one-cycle/continuous operation modes):
SFC figure:
S2
S20
S30
S31
M1044
X5
T0
Y1
SET
Y0
S32
X4
X2
S50 Y1
Y2
S2
X1
M1041
X0
Y4
TMR T0 K30
S60 RST
X5
Y4
TMR T2 K30
S70
T2
Y0
S80
X4
Y3
X1
S40
S41
X5
T1
SET
Y0
S42
X4
X3
Y2
X0
Y4
TMR T1 K30
X3 X2

7 Application Commands API 50-99

DVP-PLC Application Manual

7-40

Ladder Diagram:
SET S20
SET S30
SET Y4
Y0
END
X5
S31
S
X4
TMR T0
SET S32
S2
S
M1041 M1044
S20
S
S30
S
Y1
X0
SET S40
X5 X0
SET S31
T0
K30
Y2
S32
S
X2
SET S50
X2
SET Y4
TMR T1
S40
S
SET S41
T1
K30
Y0
S41
S
X4
SET S42
Y2
S42
S
X3
SET S50
X3
Y1
S50
S
X5
SET S60
RST Y4
TMR T2
S60
S
SET S70
T2
K30
Y0
S70
S
X4
SET S80
Y3
S80
S
X1
X1
RET
S2
Enter auto operation mode
Collect balls
Release balls
Lower robot arm
Shift to right
Raise robot arm to the
upper-limit (X4 is ON)
Shift to left and shift to
the left-limit (X1 is On)
Collect balls
Raise robot arm to the
upper-limit (X4 is ON)
Shift to right
Lower robot arm
Raise robot arm to the
upper-limit (X4 is ON)

7 Application Commands API 50-99

DVP-PLC Application Manual

7-41
Footnote

4 Flag explanation:
M1040: step point movement inhibited. When M1040=ON, all movements of the step point
are inhibited.
1. Manual operation mode: M1040 keeps being ON.
2. Zero point return mode/one cycle operation mode: During the time of pressing
STOP button and pressing START button again, M1040 will keep being ON.
3. Step operation mode: M1040 keeps being ON, and will only be OFF when the
START button is pressed.
4. Continuous operation mode: When PLC goes from STOPRUN, M1040 keeps
being ON, and will be OFF when the START button is pressed.
M1041: Step point movement start: the special auxiliary relay that reflects the movement of
the primary step point (S2) to the next step point.
1. Manual operation mode/Zero point return mode: M1041 keeps being OFF.
2. Step operation mode/One cycle operation mode: M1041 will only be OFF when
the START button is pressed.
3. Continuous operation mode: Keeps being ON when the START button is pressed,
and keeps being OFF when the STOP button is pressed.
M1042: START pulse: Only one pulse will be sent out when the button is pressed.
M1043: Zero point return complete: Once M1043 =ON is driven, it means that the RESET
motion has been executed.
M1044: Conditions of the origin: Under the continuous operation mode, conditions of the
origin, M1044, have to be driven to ON to execute the motion of initial step point (S2)
moving to the next step point.
M1045: All output reset inhibit.
If executing conditions: A. from manual control S0 to zero point return S1
B. from auto operation S2 to manual operation S0
C. from auto operation S2 to zero point return S1
1. When M1045=Off and one of S of D1~D2 is ON, step point of SET Y output and
actions will be cleared to Off.
2. When M1045 =On, SET Y output will be reserved and step point during action will
be cleared to Off.
3. If executing from zero point return S1 to manual operation S0, no matter
M1045=On or M1045=Off, SET Y output will be reserved and step point action will
be cleared to Off.
M1046: Setting STL state to On: If one of step point S is On, M1046=On. After M1047 forces
to be On, M1046 will be On once one of S is On. Besides, 8 points numbers before S
is on will be recorded in D1040~D1047.
M1047: STL monitor enabled. When IST command starts executing, M1047 will be forced to
be On and it will be forced to On for each scan time once IST command is still On.
This flag is used to monitor all S.
D1040~D1047: ON state number 1-8 of step point S.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-42
API

Applicable models
ES EP EH
61

D
SER
P

Search a Data Stack
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
N
Note: If operand S
2
uses with device F, it is only available in
16-bit command.
Operand D occupies 5 continuous devices.
The usage of operand n: n=1~256 (16-bit command),
n=1~128 (32-bit command)
Refer to each model specification for usage range.

16-bit command (9 STEPS)
SER
Continuous
execution


32-bit command (17 STEPS)
DSER
Continuous
execution

Flag: None

Command
Explanation

4 : Starting device of data stack for multiple devices comparison : Value
data for comparison : Starting device for storing compared result : Data
stack length for comparison
4 specify the numbers of compared registers and specify the compared
numbers. The specified data is compared against the data specified by and the
compared result is stored in several registers specified by .
4 When using 32-bit command to designate registers, , , and
specify 32-bit register.
Program
Example

4 When X0=On, the data stack consist of D10~D19 are compared against D0 and the
result is stored in D50~D54. If the equal value does not exist, the content of D50~D52
will all be 0.
4 The data is compared in algebra formate. (-102)
4 The largest value of all compared data will be record in D53 and the samllest value of
all compared data will be record in D54. When the numbers of largest value and
smallest are more than one, only the numbers of largest value will be recorded.
X0
SER D10 D0 D50 K10



Content value Compared data Data number Result
D10 88 0
D11 100 1 Equal
D12 110 2
D13 150 3
D14 100 4 Equal
D15 300 5
D16 100 6 Equal
D17 5 7 Smallest
D18 100 8 Equal

n



D19 500




D0=K100

9 Largest

7 Application Commands API 50-99

DVP-PLC Application Manual

7-43

Content value Explanation
D50 4 The total data numbers of equal value
D51 1 The number of the first equal value
D52 8 The number of the last equal value
D53 7 The number of the smallest value
D54 9 The number of the largest value

API

Applicable models
ES EP EH
62

D
ABSD


Absolute Drum Sequencer
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
n
Note: When operand S
1
is specified as KnX, KnY, KnM, KnS, K4
should be specified in 16-bit command and K8 should be
specified in 32-bit command.
The usage range of n: n=1~64
Refer to each model specification for usage range.

16-bit command (9 STEPS)
ABSD
Continuous
execution


32-bit command (17 STEPS)
DABSD
Continuous
execution

Flag: None

Command
Explanation

4 : Starting device of the compared data table : Number of counter :
Starting number of compared result : Groups of multi-step comparison
4 The ABSD command is a multi-step comparison command and usually used in
absolute cam control.
4 of DABSD command can specify high-speed counter. However, when the
current value of high-speed counter is compared against the setting value, the result
can not output immediately because it is influenced by the scan time. If immediate
output is desired, please use the DHSZ command, the specific comparison command
for high-speed counter.
Program
Example

4 Before executing the ABSD command, use MOV command to write each setting value
into D100~D107 in advance. The content of the even number D is the lower-limit value
and the content of the odd number D is the upper-limt value.
4 When X0=On, the current value of counter C10 is compared against the upper- and
lower-limit value of D100~D107 four groups. The compared result is showed in
M10~M13.
4 When X10=Off, the origin On/Off state of M10~M13 will not be changed.
X10
ABSD D100 C10 M10 K4
C10
RST C10
X11
CNT C10 K400
X11

7 Application Commands API 50-99

DVP-PLC Application Manual

7-44

4 M10~ M13 will be On when the current value of C10 is equal to or higher than the
lower-limit value and equal to or lower than the upper-limit value.
Lower-limit value Upper-limit value Current value of C10 Output
D100= 40 D101=100 50C10100 M10=On
D102=120 D103=210 120C10210 M11=On
D104=140 D105= 170 140C10170 M12=On
D106=150 D107=390 150C10390 M13=On

4 When the lower-limit value is higher than the upper-limit value, if the current value of
C10 is higher than the lower-limit value and lower than the upper-limit value
(C10>140), M12=On.
Lower-limit value Upper-limit value Current value of C10 Output
D100= 40 D101=100 50C10100 M10=On
D102=120 D103=210 120C10210 M11=On
D104=140 D105= 60 60C10140 M12=Off
D106=150 D107=390 150C10390 M13=On

400 200 0
40 100
120 210
60 140
150 390
M0
M1
M2
M3


API

Applicable models
ES EP EH
63


I NCD


Increment Drum Sequencer
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
N
Note: When operand S
1
is specified as KnX, KnY, KnM, KnS, K4
should be specified.
In 16-bit command, operand S
2
should be C0~C198 and will
occupy 2 continuous counters.
The usage range of operand n: n=1~64
Refer to each model specification for usage range.

16-bit command ( 9 STEPS)
INCD
Continuous
execution


32-bit command

Flag: M1029 execution completed flag


7 Application Commands API 50-99

DVP-PLC Application Manual

7-45
Command
Explanation

4 : Starting device of the compared data table : Number of counter :
Starting number of compared result : Groups of multi-step comparison
4 The INCD command is a multi-step comparison command and usually used in relative
cam control.
4 The current value of is compared against the setting value of . Once the
current value is equal to the setting value, the current value of will be reset to 0
and be compared again. The return times will be stored in +1.
4 When the comparison of groups data has been completed, the execution
completed falg M1029 will On one scan cycle.
Program
Example

4 Before executing the INCD command, use MOV command to write each setting value
into D100~D104 in advance. D100=15, ,D101=30, D102=10, D103=40, D104=25.
4 The current value of counter C10 is compared against the setting value of
D100~D104. Once the current value is equal to the setting value, the current value of
C10 will be reset to 0 and be compared again.
4 The return times will be stored in C11.
4 When the content of C11 increase 1, M10~M14 will also change in response. Please
refer to the following timing diagram.
4 When the comparison of 5 groups data has been completed, the execution completed
falg M1029 will On one scan cycle.
4 When X0 turns from On to Off, C10 and C11 will all bereset to 0 and M10~M14 all turn
Off. When X0 turns On again, this command will be executed again from the
beginning.
INCD D100 C10 M10 K5
X0
CNT C10 K100
M1013


X0
M10
M12
M11
M13
M14
M1029
15
10
15 15
30 30
40
25
1 1 1
0 0 0
2
3
4
C10
C11
Current value
Current value


7 Application Commands API 50-99

DVP-PLC Application Manual

7-46
API

Applicable models
ES EP EH
64


TTMR


Teaching Timer
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D


n
Note: Operand D will occupy 2 continuous devices.
The usage range of operand n: n=0~2
Refer to each model specification for usage range.
It only can use TTMR command eight times in program.

16-bit command (5 STEPS)
TTMR
Continuous
execution


32-bit command

Flag: None

Command
Explanation

4 : Device number for storing the On duration of the button switch : Multiple
setting
4 The On duration of external button switch is measured and stored in the number of
+1, the measured unit is 100ms periods. The content of +1 in seconds is
multiplied by and stored in .
4 When multiple setting n=0, the measured unit of is in seconds. When n=1, the
measured unit of is 100ms periods (is multiplied by 10). When n=2, the
measured unit of is 10ms periods (is multiplied by 100).
Program
Example
1

4 The time that the button switch X0 is pushed (On duration of X0) will be stored in D1, n
is used to specify the multiple of the time and the total bit time is stored in D0. Then the
button switch can be used to adjust the setting value of timer.
4 When X0 turns Off, the content of D1 will be reset to 0 but the content of D0 is
unchanged.
X0
TTMR D0 K0
X0
D1
D0
D0
D1
T T
pushed time (sec) pushed time (sec)

4 If On duration of X0 is T seconds, the relation between D0, D1 and n are shown as the
table below.
n D0 D1(unit: 100 ms)
K0 (unit: s) 1T D1=D010
K1 (unit: 100 ms) 10T D1=D0
K2 (unit: 10 ms) 100T D1=D0/10

7 Application Commands API 50-99

DVP-PLC Application Manual

7-47
Program
Example
2

4 Using TTMR command to write 10 groups setting time.
4 Write the setting value into D100~D109 in advance.
4 The measured unit of the following timers T0~T9 is 0.1 second and the measured unit
of the alternate is 1 second.
4 Connect one bit digital switch to X0~X3 and use BIN command to convert the setting
value of digital switch to BIN value and store in E.
4 The On duration (in sec) of X10 is stored in D100.
4 M0 is the pulse of one time scan cycle generated when the alternate timer button is
released.
4 Use the setting number of digital switch as the pointers of index register, and then
transmit the content of D100 to D200E (D200~D209).
M10
TMR T0 D100
M11
TMR T1 D101
M19
TMR T9 D109
M1000
BIN K1X0 E
X10
TTMR D200 K0
X10
PLF M0
M0
MOV D100 D200E

Footnote

4 For EP series models, it can only use TTMR command eight times in program. If used
in subroutine or interrupt subroutine, it only can use ONCE.
4 For EH series models, the maximum TTMR command groups it can only use at the
same time is eight groups.










7 Application Commands API 50-99

DVP-PLC Application Manual

7-48
API

Applicable models
ES EP EH
65


STMR


Special Timer
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


M
D
Note: The operand S: EP series models can use T0~T191, EH
series models can use T0~T199
The usage range of operand m: m=1~32767
Operand D occupies 4 continuous devices.
Refer to each model specification for usage range.

16-bit command (7 STEP)
STMR
Continuous
execution


32-bit command

Flag: None

Command
Explanation

4 : Number of timer : Setting value of timer, unit is 100ms : Starting
device of output device
4 STMR command is a command which provides Off-delay, one shot and flash loop.
4 The number of timer specified by STMR command can not be reapeat.
Program
Example

4 When X10=On, the settting value of the timer T0 specified by STMR command is 5
seconds.
4 Y0 is the contact of Off-delay: When X10 turns from Off to On, Y0= On. When X10
turns On to Off and delay 5 seconds, Y0=Off.
4 When X10 turns from On to Off, Y1= On output one time for 5 seconds.
4 When X10 turns from Off to On, Y2=On output one time for 5 seconds.
4 When X10 turns from Off to On, Y3= On after delay 5 seconds. When X10 turns from
On to Off, Y3=Off after delay 5 seconds.
X10
STMR T0 K50 Y0
X10
Y0
Y1
Y2
Y3
5 sec 5 sec
5 sec 5 sec
5 sec
5 sec

7 Application Commands API 50-99

DVP-PLC Application Manual

7-49
4 Add a b contact of Y3 after the drive contact X10, ans then Y1, Y2 can be used as the
output of flash loop. When X10 turns Off, Y0, Y1 and Y3 will be Off and the content of
T10 will be reset to 0.
X10
STMR T10 K50 Y0
Y3
X10
Y1
Y2 5 sec 5 sec


API

Applicable models
ES EP EH
66


ALT
P

ON/OFF Alternate
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D


Note: Refer to each model specification for usage range.
ES series models do not support pulse execution command
(ALTP).

16-bit command (3 STEP)
ALT
Continuous
execution
ALTP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Dentisation device
4 This command is usually pulse execution command (ALTP).
Program
Example
1

4 When X0 turns from Off to On for the first time, Y0=ON. When X0 turns from Off to On
for the second time, Y0=OFF.
X0
ALTP Y0
X0
Y0

7 Application Commands API 50-99

DVP-PLC Application Manual

7-50
Program
Example
2


4 The ALT command is a command, which use one switch to control start and stop mode.
In the beginning, M0=Off, so Y0=On, Y1=Off. When X10 is activated for the first time,
M0=ON, Y1=ON and Y0=OFF. When X10 is activated for the second time, M0=OFF,
Y0=ON, Y1=OFF.
X10
ALT M0
M0
Y0
M0
Y1

Program
Example
3

4 Output Y will flash. When X10= On, T0 will generate a pulse every two seconds and
output Y0 will be switching between On and Off mode depending on the pulse of T0.
X10
TMR T0
ALTP Y0
K20
T0
T0


API

Applicable models
ES EP EH
67


RAMP


Ramp Signal
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
N
Note: The usage range of operand n: n=1~32767
Refer to each model specification for usage range.

16-bit command ( 9 STEPS)
RAMP
Continuous
execution


32-bit command

Flag: M1026 Starting mode (Please
refer to the footnote)
M1029 Execution completed flag

Command
Explanation

4 : Start setting of ramp signal : End setting of ramp signal : Current
value of ramp signal : Scan times
4 This command is used to get a ramp signal. A ramp signal has a strong connection
with linear and scan time. Therefore, must fix the scan time before using this RAMP
command.
4 Write the start setting value of ramp signal to D10 and end setting value of ramp signal
to D11 in advance. When X0 is On, the setting value is forwarding from D10 to D11
(setting value in D10 will be increased) and the proceeding time (n= 100 times scans)
is stored in D12.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-51

4 The scan time can be fixed if set M1039=On in the program previously. Then, using
MOV command to write the setting value of the fixed scan time into special register
D1039. Take the above program as an example, if the setting value is 30ms and
n=K100, the time between D10 and D11 is 3 second (D3: 30ms100).
4 During the execution of this command, when starting signal X10 turns Off, this
command will stop the operation. When X10 turns On again, the content value of D12
will be reset to 0(zero) and calculated again.
4 After the execution of this command has been completed, M1029= On and the
content value of D12 will be reset to the setting value of D10.
4 Using this command with analog signal output can execute the operation of Sort
Start/Stop.
4 If start PLC from STOP to RUN when X10= On, please reset the content value of D12
to 0(zero) in the beginning of the program. (If D12 is a latched area.)
X10
RAMP D10 D11 D12 K100


D10
D12
D11
D11
D12
D10
D10<D11
D10 D11 >
?times scans ?times scans
The scan times is stored in D13

Footnote

4 On/Off condition of starting mode flag M1026 and the change of the content value in
D12 are shown below:
D11
D10
D12
M1029
M1026=ON
X10
D11
D10
D12
M1029
M1026=OFF
Starting signal
X10
Starting signal






7 Application Commands API 50-99

DVP-PLC Application Manual

7-52
API

Applicable models
ES EP EH
69


SORT


Data Sort
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


m
1

m
2

D
n
Note: The usage range of operand m
1
: m
1
=1~32
The usage range of operand m
2
: m
2
=1~6
The usage range of operand n: n=1~ m2
Refer to each model specification for usage range.

16-bit command ( 11 STEPS)
SORT
Continuous
execution


32-bit command

Flag: M1029 Execution completed flag

Command
Explanation

4 : Starting device of source data table : Sort data grops : Column
numbers of each data : Starting device for storing sort data : Reference
value of sort data
4 The resulting sorted data is stored in the m1 m2 registers counted from the starting
device specified by . Therefore, if the device and specify the same
register, the resulting sorted data will be the same as the content of source device
.
4 An ideal most right number of the head number specified by is 0.
4 The data sort will be completed after the SORT command being processed m1 times.
Once the SORT command has been completed, the Flag M1029= On.
Program
Example

4 When X0 is On, it starts to sort specified data. After the data sort is completed,
M1029= On. During the execution of the SORT command, do not change the sort
data. If user want to re-sort the data, be sure to turn X0 from Off to On again.
X0
SORT D0 K5 K5 D50 D100

7 Application Commands API 50-99

DVP-PLC Application Manual

7-53
4 Example table of data sort
Data numbers: m
2

Data Column
1 2 3 4 5
Column

Row
Students
No.
Chinese English Mathematics
Physis and
Chemistry
1 D01 D590 D1075 D1566 D2079
2 D12 D655 D1165 D1654 D2163
3 D23 D780 D1298 D1789 D2290
4 D34 D870 D1360 D1899 D2350

D
a
t
a

n
u
m
b
e
r
s
:

m
1


5 D45 D995 D1479 D1975 D2469

4 Sort data table when D100=K3.
Data numbers: m
2

Data Column
1 2 3 4 5
Column

Row
Students
No.
Chinese English Mathematics
Physis and
Chemistry
1 D504 D5570 D6060 D6599 D7050
2 D512 D5655 D6165 D6654 D7163
3 D521 D5790 D6275 D6766 D7279
4 D535 D5895 D6379 D6875 D7369

D
a
t
a

n
u
m
b
e
r
s
:

m
1


5 D543 D5980 D6498 D6989 D7490

4 Sort data table when D100=K5.
Data numbers: m
2

Data Column
1 2 3 4 5
Column

Row
Students
No.
Chinese English Mathematics
Physis and
Chemistry
1 D504 D5570 D6060 D6599 D7050
2 D512 D5655 D6165 D6654 D7163
3 D525 D5795 D6279 D6775 D7269
4 D531 D5890 D6375 D6866 D7379
D
a
t
a

n
u
m
b
e
r
s
:

m
1


5 D543 D5980 D6498 D6989 D7490

7 Application Commands API 50-99

DVP-PLC Application Manual

7-54
API

Applicable models
ES EP EH
70

D
TKY


10-Key Keyboard Input
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
1

D
2

Note: Operand S occupies 10 continuous devices
Operand D
2
occupies 10 continuous devices
Refer to following for detail.

16-bit command (7 STEPS)
TKY
Continuous
execution


32-bit command (13 STEPS)
DTKY
Continuous
execution

Flag: None

Command
Explanation

4 : Head input device : Destination device for storing key input value
: Key input signal
4 This command can specify ten external input devices from and these ten
external input devices is identified as decimal value of 0 to 9. These ten external input
devices are connected to ten keys respectively. When one of the ten keys is pressed,
the value of decimal numbers from 0 to 9,999 (max. 4 digits in 16-bit command) or from
0 to 99,999,999 (max. 8 digits in 32-bit command) can be inputted and stored in
destination device . The device is used to store the condition of that key
has been pressed.
Program
Example

4 Using this command can specify ten input terminals from X0 to connect to ten keys
which number is from 0 to 9. When X20=On, the command is executed and it will store
the BIN value which is inputted by keys into D0 and M10~M19 is used to store the
condition of that key has been pressed.
X20
TKY X0 D0 M10

PLC
0 1 3 2 4 5 6 7 8 9
X3 X2 X1 X0 S/S X6 X5 X4 X10 X7 X11 +24V 0V

0 1 2 3 4 5 6 7 8 9
D0
10
3
10
2
10
1
10
0
number key
BCD value one digit number BCD code
BIN value
overflow
BCD value

7 Application Commands API 50-99

DVP-PLC Application Manual

7-55
4 As the time chart shown below, the four keys are connected to X5, X3, X0, X1 of
number keyboard. After pressing the four keys in that order of 1234 and the number
5,301 will be entered into D0. The max. number which can be entered in D0 is 9,999 i.e.
4 digits. If the entered number exceeds the above allowable range, the highest digits will
overflow.
4 After X2 is pressed, M12=On untill other keys are pressed. The situation of other press
keys are the same.
4 When any key of X0~X11 is pressed, one device of M10~M19 will be On.
4 If any key is pressed, M20=On.
4 When the drive contact X20 turns Off, the previous value do not change but M10~M20
all turns Off.
X0
X1
X3
X5 j
k
l
m
j k l m
M10
M11
M13
M15
M20
Key output
signal


















7 Application Commands API 50-99

DVP-PLC Application Manual

7-56
API

Applicable models
ES EP EH
71

D
HKY


16-Key Keyboard Input
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
1

D
2

D
3

Note: Operand S occupies 4 continuous devices
Operand D
1
occupies 4 continuous devices
Operand D3 occupies 8 continuous devices
Refer to each model specification for usage range.

16-bit command (9 STEPS)
HKY
Continuous
execution


32-bit command (17 STEPS)
DHKY
Continuous
execution

Flag: M1029 execution completed flag
M1167 HKY input mode switch
Please refer to the footnote

Command
Explanation

4 : Head scan input device : Head scan output device : Destination
device for storing key input value : Key input signal
4 This command can create a 16-key keyboard which is a multiplex of 4 continuous
external input devices from and 4 continuous external output devices from
by matrix scan. The key input value will be stored in and is used to
store the condition of that key has been pressed.
4 When this command is executed every time, the execution completed flag M1029 will
be On for the duration of that key pressed (one scan cycle).
4 If two or more keys are pressed at the same time, only the key activated first is
effective.
4 When HKY command is used in 16-bit command, can store numbers from 0 to
9,999 (max. 4 digits). When DHKY command is used in 32-bit command, can
store numbers from 0 to 99,999,999 (max. 8 digits). If the entered number exceeds the
above allowable range, the highest digits will overflow.
Program
Example

4 Using this command to create a 16-key keyboard which is a multiplex of 4 continuous
external input devices X10~X13 and 4 continuous external output devices Y10~Y13.
When X4=On, the command is executed and it will store the BIN value which is
inputted by keys into D0 and M0~M7 is used to store the condition of that key has been
pressed.
X4
HKY X10 Y10 D0 M0

7 Application Commands API 50-99

DVP-PLC Application Manual

7-57

4 Number input:
0 1 2 3 4 5 6 7 8 9
D0
10
3
10
2
10
1
10
0
number key
one digit number BCD code
BCD value
BCD value
BIN value
overflow


4 Function key input:
When press A key, M0=On and latch. Next, press D key and then M0=Off, M3=On
and latch.
If two or more keys are pressed at the same time, only the key activated first is
effective.
F E D C B A
M5 M4 M3 M2 M1 M0

4 Key output signal:
When any key of A to Fis pressed, M6=On one time.
When any key of 0 to 9 is pressed, M7=Onone time.
4 When the drive contact X4 turns Off, the previous value do not change but M0~M7 all
turns Off.

4 External wiring:
Y13 Y12 Y11 Y10 COM
X13 X12 X11 X10 COM
C D E F
8 9 A B
4 5 6 7
0 1 2 3
PLC( ) Transistor output

7 Application Commands API 50-99

DVP-PLC Application Manual

7-58
Footnote

4 When this command is executed, 8 times scan cycles is required to read the input
value of keys sucessfully. If the scan cycle is too long or too short, it may cause the key
to input incorrectly. Therefore, user can use the following command to avoid it.
When the scan cycle is too short, the I/O may not response in time and can not
read the key input correctly. At this time, user can fix the scan time to avoid it.
When the cycle is too long, the response of key may become slow. User can avoid
this by writing this command in a time interrupt subroutine and executing this
command in the fix time.
4 The function of flag M1167:
When M1167=On, HKY command can input hexadecimal value of 0~F.
When M1167=Off, A~F of HKY command are used as function keys.

API

Applicable models
ES EP EH
72


DSW


Digital Switch Input
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
1

D
2

n
Note: The usage range of operand n: n=1~2
Refer to each model specification for usage range.

16-bit command (9 STEPS)
DSW
Continuous
execution


32-bit command

Flag: M1029 Execution completed flag


Command
Explanation

4 : Head input device : Head output device : Destination device for
storing the setting value : Number of digits
4 This command is used to read one or two groups of 4 digits switch through 4 or 8
continuous external input devices from and 4 continuous external devices from
and store the setting value in destination device . When is 1, only
one group of digital switches is read. When is 2, two groups of digital switches
are read.
Program
Example

4 The first group of switches consists of X20~X23 and Y20~Y23. The second group of
switches consists of X24~X27 and Y20~Y23. When X10=On, the command starts to
execute. The setting value of the first group of switches are read and converted to BIN
value and stored in D20. The setting value of the second group of switches are read
and converted to BIN value and stored in D21.
X10
DSW X20 Y20 D20 K2



7 Application Commands API 50-99

DVP-PLC Application Manual

7-59
4 When X10=On, Y20~Y23 will be On and scan in circles automatically. After the
completion of each circle scan, execution completed falg M1029=ON is a scan period
after a circle scan.
4 Outputs Y20~Y23 please use transistor output. Besides, please make sure that every
1, 2, 4, 8 terminal should connect a diode (0.1A/50V) to the inputs of PLC in serial as
shown in the example below.
X10
Y20
Y21
Y22
Y23
M1029
0.1s
0.1s
0.1s
0.1s
0.1s 0.1s
interrupt
execution completed
operation start

4 Wiring diagram of digital switch
S/S X20 X21 X22 X23 X24 X25 X26 X27
Y23 Y22 Y21 Y20 C
1 2 4 8 1 2 4 8
PLC
10 10 10 10
0 1 2 3
10
0
10
1
10
2
10
3
0V +24V
BCD digital
switches
should connect
a diode (1N4148)
in serial
The first group
The second group
7 Application Commands API 50-99

DVP-PLC Application Manual

7-60
Footnote

4 When the scan terminals are relay outputs, the following program technique is used
with this command to operate successfully:
When X10=On, DSW command is executed. When X10 turns Off, M10 will be On
until the scan terminals of DSW command complete one output scan cycle. Then,
M10 will turn Off.
If the drive contact X10 use button switch, every time when X10 is pushed, M10,
the scan terminals specified by DSW command, will be reset to Off after the
completion of one output scan cycle. Then, the command will stop executing, the
data of digital switch will be read completely and the scan terminals will be activated
while the button switch is pushed. Therefore, even relay output is used in this
situation, the relay can be used for long because the operation of relay is not
frequent.
M10
DSW X20 Y20 D20 K2
X10
SET M10
M1029
RST M10


API

Applicable models
ES EP EH
73


SEGD
P

Decode the 7-segment Display
Panel
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Refer to each model specification for usage range.
ES series models do not support pulse execution command
(SEGDP)

16-bit command (5 STEPS)
SEGD
Continuous
execution
SEGDP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Source device for decoding : Output device after decoding
Program
Example

4 When X10=On, contents (0~F: 16 bits) of the lower 4 bits (b0~b3) of D10 will be
decoded as readable in the 7-segment display panel for output. The decoding results
will be stored in Y10~Y17.
X10
SEGD D10 K2Y10

7 Application Commands API 50-99

DVP-PLC Application Manual

7-61
Decoding Chart of the 7-segment Display Panel:
0
1
2
3
4
5
6
7
8
9
A
B
C
D
E
F 1111
1110
1101
1100
1011
1010
1001
1000
0111
0110
0101
0100
0011
0010
0001
0000 ON OFF ON ON ON ON ON
OFF OFF OFF OFF OFF ON ON
ON ON ON ON OFF OFF ON
ON ON ON ON ON OFF OFF
OFF OFF OFF ON ON ON ON
ON OFF ON ON OFF ON ON
OFF ON ON ON ON ON
ON ON ON OFF OFF OFF
ON ON ON ON ON ON ON
ON ON ON ON ON ON OFF
ON ON
OFF OFF ON ON ON
OFF ON ON
ON OFF ON
OFF OFF ON ON ON ON
OFF OFF OFF
a
c
b
d
g
ON
ON
ON ON ON ON OFF
ON ON
ON OFF ON OFF
OFF ON ON ON
ON ON ON
ON
ON
16
bits
Bit
Combi-
nation
Composition
of the 7-Step
Display Panel
Status of Every Step
Data
Displayed


API

Applicable models
ES EP EH
74


SEGL


7-segment Display Scan Output
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: The usage range of operand n: n=0~7. Please refer to
the footnote.
In EH series models, SEGL command can only be used
twice.
Refer to each model specification for usage range.

16-bit command (7 STEPS)
SEGL
Continuous
execution


32-bit command

Flag: M1029 execution completed flag

Command
Explanation

4 : Display source device of 7-segment display : Start device of
7-segment display scan output : Polarity setting of output signal and scan
signal
4 8 or 12 continuous external output points that start from this command can be
regarded as display and scan signal output of 1 or 2 groups of 4 digits of 7-segment
display. 7-segment display module has function to convert input BCD code to
7-segment display and has control signal to latch or not.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-62

4 will decide the numbers of groups of 4 digits of 7-segment display and also
indicate the polaritys of PLC output terminal and 7-segment display input terminal.
4 The points number of 7-segment display output command that a group of 4 digits use
is 8 points and 2 groups of 4 digits use are 12 points.
4 Scan output terminal will circulate in sequence when this command executes. The
drive contact will be changed from Off to On and scan output execute again.
Program
Example

4 When X10=ON, command will start to execute. 7-segment display scan loop is
composed of Y10~Y17. The value of D10 will be converted to BCD code and send to
the first group of 7-segment display to display. The value of D11 will be converted to
BCD code and send to the second group of 7-segment display to display. If any value
of D10 or D11 is greater than 9999, operation error will occur.
X10
SEGL D10 Y10 K4

4 When X10=ON, Y14~Y17 will scan in circles automatically. Each circle scan needs 12
scan time. M1029=ON is a scan period after a circle scan.
4 4 digits of a group, n=0~3.
After the terminal of 1, 2, 4, 8 of decoded 7-segment display connects itself in
parallet, they should connect to Y10~Y13 of PLC. Latch terminal of each number
connects to Y14~Y17 of PLC individually.
When X10=ON, the content of D10 will be transmitted to 7-segment display to
display in sequently according to Y14~Y17 circulates in sequence
4 4 digits of 2 groups, n=4~7.
After the terminal of 1, 2, 4, 8 of decoded 7-segment display connects itself in
parallet, they should connect to Y20~Y23 of PLC. Latch terminal of each number
and the first group share Y14~Y17 of PLC.
The content of D10 will be transmitted to the first group of 7-segment display and
the content of D11 will be transmitted to the second group of 7-segment display to
display. If D10=K1234 and D11=K4321, the first group will display and
the second group will display will display 1.

4 7-segment display scan output wiring
COM Y10 Y11 Y12 Y13 Y14 Y15 Y16 Y17 Y20 Y21 Y22 Y23 COM COM
1 2 4 8
10
0
10
1
10
2
10
3
10
3
10
2
10
1
10
0
V+
10
3
10
2
10
1
10
0
V+
1
2
4
8
1
2
4
8
The first group The second group
7 Application Commands API 50-99

DVP-PLC Application Manual

7-63
Footnote

4 The V4.9 and above of ES series provide this command (SEGL).
4 Version 4.9 of ES series only provide a group of 4 digits of 7-segment display and use
8 points to output. SEGL command only can be used once in the program and the
usage range of operand n is 0 to 3.
4 Scan time must be longer than 10ms while this command is executed. If scan time is
shorter than 10ms, please use fixed scan time function to fix scan time on 10ms.
4 Please use suitable 7-segment display for the transistor that PLC uses to output.
4 Settings of n: it is used to set the polarity of transistor output loop. It can be set to
positive polarity or negative polarity. What 7-segment display it connects is a group of
4 digits or two groups of 4 digits.
PLC transistor output is NPN type and it is open collect output. When wiring,
output should connect a step up resistor to VCC (less than 30VDC). Therefore,
when output point Y is On, output will be low potential.
On
PLC
VCC
Y
step up resistor
signal output
Y drive


Output loop of PNP transistor: when inner signal is 1, it will output high potential.
This logic is called positive polarity.
PLC
Logic 1
On
+24V
HIGH
posi ti ve
Step down
resistor

7 Application Commands API 50-99

DVP-PLC Application Manual

7-64

Positive logic (Negative polarity) output of BCD code
BCD value Y output (BCDcode) Signal output
b
3
b
2
b
1
b
0
8 4 2 1 A B C D
0 0 0 0 0 0 0 0 1 1 1 1
0 0 0 1 0 0 0 1 1 1 1 0
0 0 1 0 0 0 1 0 1 1 0 1
0 0 1 1 0 0 1 1 1 1 0 0
0 1 0 0 0 1 0 0 1 0 1 1
0 1 0 1 0 1 0 1 1 0 1 0
0 1 1 0 0 1 1 0 1 0 0 1
0 1 1 1 0 1 1 1 1 0 0 0
1 0 0 0 1 0 0 0 0 1 1 1
1 0 0 1 1 0 0 1 0 1 1 0
Negative logic (Positive polarity) output of BCD code
BCD value Y output (BCDcode) Signal output
b
3
b
2
b
1
b
0
8 4 2 1 A B C D
0 0 0 0 1 1 1 1 0 0 0 0
0 0 0 1 1 1 1 0 0 0 0 1
0 0 1 0 1 1 0 1 0 0 1 0
0 0 1 1 1 1 0 0 0 0 1 1
0 1 0 0 1 0 1 1 0 1 0 0
0 1 0 1 1 0 1 0 0 1 0 1
0 1 1 0 1 0 0 1 0 1 1 0
0 1 1 1 1 0 0 0 0 1 1 1
1 0 0 0 0 1 1 1 1 0 0 0
1 0 0 1 0 1 1 0 1 0 0 1
Display scan (latch) signal
Positive logic (Negative polarity)
output
Negative logic (Positive polarity)
output
Y output (Latch)
Output control
signal
Y output (Latch)
Output control
signal
1 0 0 1
Parameter n settings:
groups number of
7-segment display
A group Two groups
Y of BCD code outputs
Display scan latch signal
n 0 1 2 3 4 5 6 7
: Positive logic (Negative polarity) output
: Negative logic (Positive polarity) output

4 The combination of output polarity of PLC transistor and input polaity of 7-segment
display can be set by settings of n.

7 Application Commands API 50-99

DVP-PLC Application Manual

7-65
API

Applicable models
ES EP EH
75


ARWS


Arrow Keyboard Input
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
1

D
2

n
Note: Operand S occupies 4 continuous devices
The usage range of operand n: n=0~3 (Refer to API 74 SEGL
footnote). ARWS command only can be used once in the
program.
In EP series models, operand D
2
do not provide index
register E, F to modify and it only can be specified as a
multiple of 10, e.g. Y0, Y10etc.

16-bit command (9 STEPS)
ARWS
Continuous
execution


32-bit command

Flag: None
Refer to each model specification for
usage range.
Output point that designated by this
command should use transistor to
output.
When using this command, please fix
scan time or put this command into time
interrupt subroutine (I6~I8) to
execute.

Command
Explanation

4 : Start device of key input : Display device on 7-segment display
: Scan output start device of 7-segment display : Polarity setting of output
signal and scan signal
Program
Example

4 When the command is executed, X20 is defined as the down key, X21 is defined as
the up key, X22 is defined as the right key and X23 is defined as the left key. These
keys are used to edit and display the external setting value. The setting value is stored
in D20 and its setting range is from 0 to 9,999.
4 When X10=On, 103 is a effective setting digit number. If pressing left key, the effective
setting digit number will be displayed and jump by the direction from 103100101
102103100.
4 If pressing the right key, the effective setting digit number will be displayed and jump
by the direction from 103102101100103102. Meanwhile, the digit position
LED connected from Y24 to Y27 will also be Onto indicate the effective setting digit
number.
4 If pressing the up key to increase , the effective number will change from 012
8901. If pressing the down key, the effective number will change from 098
109, meanwhile, the changed value will be displayed on the 7-segment
display.
X10
ARWS X20 D20 Y20 K0

7 Application Commands API 50-99

DVP-PLC Application Manual

7-66
1
2
4
8
10 10 10 10
3 2 1 0
Y20
Y21
Y22
Y23
Y27
Y26
Y25
Y24
LED
Digit
position
7-step display which displays
setting value (4 digits data)
X21
X20
X22 X23
Increase digit value
decrease digit value
move
to
the left
move
to
the right
The 4 switches is used to move
digit position to the left or to the
right and increase or decrease
the setting value of the digits


API

Applicable models
ES EP EH
76


ASC


ASCII Code Conversion
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Operand S is 8 alphanumeric character string inputted by
WPLSoft software from PC, or ASC II code inputted by
HPP02.
Refer to each model specification for usage range.

16-bit command (11 STEPS)
ASC
Continuous
execution


32-bit command

Flag: M1161 8/16 mode exchange

Command
Explanation

4 : The alphanumeric character which can be converted to its ASC II code :
The destination device for storing ASC II code.
4 The alphanumeric character can be used to display error message directly if connect
7-segment display when using this command.
Program
Example

4 When X0=On, A~H is converted to ASCII code and stored in D0~D3.
X0
ASC A B C D E F G H D0

D0
D1
D2
b15 b0
42H (B) 41H (A)
44H (D) 43H (C)
46H (F) 45H (E)
D3 48H (H) 47H (G)
low byte high byte

4 When M1161=On, the ASCII code converted from every character will occupy lower
8-bit (b7~b0) of one register. The high byte will be invalid and its content is filled as 0.
This also means that one register only can be used to store one character.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-67
b15 b0
D0
D2
D4
D6
D1
D3
D5
D7
00 H
00 H
00 H
00 H
00 H
00 H
00 H
00 H
41H (A)
42H (B)
43H (C)
44H (D)
45H (E)
46H (F)
47H (G)
48H (H)
low byte high byte


API

Applicable models
ES EP EH
77


PR


Print
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Operand S occupies 4 continuous devices.
Operand D occupies 10 continuous devices.
PR command only can be used twice in the program.
Refer to each model specification for usage range.
In EP series models, operand D does not provide index
register E, F to modify.

16-bit command (5 STEPS)
PR
Continuous
execution


32-bit command

Flag: M1029 execution completed flag
M1027

Command
Explanation

4 : The device for storing ASCII code : The external output device which
outputs ASC II code.
4 This command will output ASCII codes stored in 4 registers from device in
order of the output devices specified by .
Program
Example
1

4 First, using API 76 ASC command convert A~H to ASCII code and store them in
D0~D3. Then, using this command output them in the order of A~H.
4 When M1027=Off, X10 turns from Off to On, the command is executed, Y10(low byte)
to Y17(high byte) is specified as the data output devices, Y20 is specified as scan
signal and Y21 is specified as the monitor signal while the command being executed.
This mode can execute 8 character string output operation.
4 If X10 turns from Off to On while the command being executed, the data output will be
interrupt. When X10 is On once more, the data will be sent again.
X10
PR D0 Y10

7 Application Commands API 50-99

DVP-PLC Application Manual

7-68

T T T
T (ms) : scan time
X10 start signal
Y10~Y17 data
Y20 scan singal
Y21 being executed
A B C D H

Program
Example
2


4 PR command provide 8 serial string output operation. When M1027=Off, maximum 8
character string can be outputted in serial. When M1027=On, 1 to 16 character string
output operation can be executed.
4 When M1027=On, X10 turns from Off to On, Y10(low byte) to Y17(high byte) is
specified as the data output devices, Y20 is specified as scan signal and Y21 is
specified as the monitor signal while the command being executed. This mode can
execute 16 character string output operation.
4 If the character string 00H (NUL) has been sent, it means the end of the character
string and the operation of PR command wont be continous.
4 The drive contact X10 is always On but it will automatically stop after one time
operation of data output. However, if X0 is always On, M1029 wont be activated.
X10
PR D0 Y10
M1002
SET M1027

T T T
M1029 execution
is completed
X10 start signal
Y10~Y17 data
Y20 scan singal
Y21 being executed
last character first character
T : scan time or
i nterrupt time

Footnote

4 This command should only use transistor output.
4 When using this command, please fix the scan time or execute this command in a time
interrupt subroutine.




7 Application Commands API 50-99

DVP-PLC Application Manual

7-69
API

Applicable models
ES EP EH
78

D
FROM
P

Read Special Module CR Data
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
m
1

m
2

D
n
Note: The usage range of operand m
1
: m
1
=0~7
The usage range of operand m
2
: m2=0~48
The usage range of operand n: n =1~(49- m2)
Refer to each model specification for usage range.
For ES series, it doesnt support pulse execution
command (FROMP, DFROMP).

16-bit command (9 STEPS)
FROM
Continuous
execution
FROMP
Pulse
execution

32-bit command (17 STEPS)
DFROM
Continuous
execution
DFROMP
Pulse
execution
Flag: When M1083=On, it allows to
insert interrupt during command
FROM/TO. Refer to following
explanation for detail.


Command
Explanation

4 : Number for special module : Number of CR (Control Register) of
special module that will be read : Location to save reading data : Data
number of reading one time
4 DVP PLC uses this command to read CR data of special module.
4 When indicates bit operand, you can use K1~K4 for 16-bit command and
K5~K8 for 32-bit command.
4 Please refer to the following footnote to see the detail of the numbering rule of special
module.
Program
Example

4 To read the content of CR#29 of special module#0 to D0 of PLC and to read the
content of CR#30 of special module#0 to D1 of PLC. It can read 2 data at one time
(n=2).
4 The command will be executed when X0=ON. The command wont be executed when
X0=OFF and the content of previous reading data wont change.
X0
FROM K0 K29 D0 K2


API

Applicable models
ES EP EH
79

D
TO
P

Special Module CR Data Write in
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
m
1

m
2

S
n
Note: The usage range of operand m
1
: m
1
=0~7
The usage range of operand m
2
: m
2
=0~48
The usage range of operand n: n =1~(49- m2)
Refer to each model specification for usage range.
For ES series, it doesnt support pulse execution command
(TOP, DTOP)

16-bit command (9 STEPS)
TO
Continuous
execution
TOP
Pulse
execution

32-bit command (17 STEPS)
DTO
Continuous
execution
DTOP
Pulse
execution
Flag: M1083 FROM/TO mode
exchange
Refer to following for detail.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-70

Command
Explanation

4 : Number of special module : Number of CR (Control Register) of special
module that will be wrote in : Data to write in CR : data number to write in
one time.
4 When assigns bit operand, K1~K4 can be used for 16-bit command and K1~K8
can be used for 32-bit command.
4 DVP-series PLC uses this command to write data into CR of special module.
Program
Example

4 Using 32-bit command DTO, program will write D11 and D10 into CR#13 and CR#12 of
special module#0. It only writes a group of data at one time (n=1)
4 The command will be executed when X0=ON and it wont be executed when X0=OFF.
The data that wrote in previous wont have any change.
X0
DTO K0 K12 D10 K1

4 The rule of command operand:
m1: arrangement number of special module. The number of special module that
connects to PLC MPU. The numbering rule of special module from the near to the
distant of MPU is from 0 to 7. The maximum is 8 special modules and wont occupy
I/O point.
m2: the number of CR. Built-in 16-bit of 36 groups memory of special module is
called CR (Control Register). The number of CR uses decimal digits (#0~#35). All
running status and setting values of special module have included.
Footnote

If using FROM/TO command, the unit of read/write of CR is one number for one time.
If using DFROM/DTO command, the unit of read/write of CR is two numbers in one
time.
CR #10 CR #9
Upper 16-bit Lower 16-bit
Specified CR number

The number of transmission groups n. The meaning of n=2 of 16-bit command and
n=1 of 32-bit are the same.
D0
D1
D2
D3
D4
D5
CR #5
CR #6
CR #7
CR #8
CR #9
CR #10
D0
D1
D2
D3
D4
D5
CR #5
CR #6
CR #7
CR #8
CR #9
CR #10
Specified device Specified CR Specified device Specified CR
16-bit command when n=6 32-bit command when n=3

4 In ES series models, flag M1083 is not provided. When FROM/TO command is executed,
all interrupts (including external or internal interrupt subroutines) will be disabled. All
interrupts will be executed after FROM/TO command is completed. Besides, FROM/TO
command also can be executed in the interrupt subroutine.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-71

4 The function of the flag M1083 (FROM/TO mode exchange) provided in EP/EH series
models:
1. When M1083=Off, FROM/TO command is executed, all interrupts (including external
or internal interrupt subroutines) will be disabled. All interrupts will be executed after
FROM/TO command is completed. Besides, FROM/TO command also can be
executed in the interrupt subroutine.
2. When M1083=On, if a interrupt occurs while FROM/TO command has been
programmed, FROM/TO command will be interruptted to execute the interrupt.
However, FROM/TO command cannot be executed in the interrupt subroutine
4 Application program example of FROM/TO command:
Example 1: Adjust A/D conversion characteristic curve of DVP-04AD by setting
OFFSET value of CH1 to 0V(=K0
LSB
) and GAIN value of CH1 to 2.5V(=K2000
LSB
).
M1002
TO K0 K1 H0 K1
TO K0 K33 H0 K1
X0
TO K0 K18 K0 K1
TO K0 K24 K2000 K1


1. Write H0 to CR#1 of analog input mode No. 0 and set CH1 to mode 0 (voltage
input : -10V to +10V).
2. Write H0 to CR#33 and allow to adjust characteristics of CH1 to CH4.
3. When X0 turns from OFF to ON, K0
LSB
of OFFSET value will be wrote in CR#18
and K2000
LSB
of GAIN value will be wrote in CR#24.
Example 2: Adjust A/D conversion characteristic curve of DVP-04AD by setting
OFFSET value of CH2 to 2mA(=K400 LSB) and GAIN value of CH2 to 18
mA(=K3600LSB).
M1002
TO K0 K1 H18 K1
TO K0 K33 H0 K1
X0
TO K0 K19 K400 K1
TO K0 K25 K3600 K1


7 Application Commands API 50-99

DVP-PLC Application Manual

7-72
1. Write H18 to CR#1 of analog input mode No. 0 and set CH2 to mode 3 (current
input : -20mA to +20mA).
2. Write H0 to CR#33 and allow to adjust characteristics of CH1 to CH4.
3. When X0 turns from OFF to ON, K400
LSB
of OFFSET value will be wrote in
CR#19 and K3600
LSB
of GAIN value will be wrote in CR#25.
Example 3: Adjust D/A conversion characteristic curve of DVP-02DA by setting
OFFSET value of CH2 to 0mA(=K0LSB) and GAIN value of CH2 to
10mA(=K1000LSB).
M1002
TO K1 K1 H18 K1
TO K1 K33 H0 K1
X0
TO K1 K22 K0 K1
TO K1 K28 K1000 K1

1. Write H18 to CR#1 of analog input mode No. 1 and set CH2 to mode 3
(current input : 0mA to +20mA).
2. Write H0 to CR#33 and allow to adjust characteristics of CH1 and CH2.
3. When X0 turns from OFF to ON, K0
LSB
of OFFSET value will be wrote in
CR#22 and K1000
LSB
of GAIN value will be wrote in CR#28.

Example 4: Adjust D/A conversion characteristic curve of DVP-02DA by setting
OFFSET value of CH2 to 2mA(=K400
LSB
) and GAIN value of CH2 to
18mA(=K3600
LSB
).
M1002
TO K1 K1 H10 K1
TO K1 K33 H0 K1
X0
TO K1 K23 K400 K1
TO K1 K29 K3600 K1

1. Write H10 to CR#1 of analog input mode No. 1 and set CH2 to mode 2
(current input : +4mA to +20mA).
2. Write H0 to CR#33 and allow to adjust characteristics of CH1 and CH2.
3. When X0 turns from OFF to ON, K400
LSB
of OFFSET value will be wrote in
CR#23 and K3600
LSB
of GAIN value will be wrote in CR#29.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-73

Example 5: Program example when DVP-04AD and DVP-02DA module are used
together
M1000
FROM K0 K0 D0 K1
TO K0 K1 H3030 K1 LD= H88 D0
TO K0 K2 K32 K2
FROM K0 K6 D20 K4
M1000
FROM K1 K0 D0 K1
CMP H49 D0 M0
M1013
INC D100
ADD D101 K5 D101
RST D100 LD= K4000 D100
RST D101 LD= K4000 D101
M1
TO K1 K1 H10 K1
M1
TO K1 K10 D100 K2
END

1. Read the data of model type from expansion module K0 and distinguish if the data is
H88 (DVP-04AD model type).
2. If the model type is DVP-04AD, the drive contact M1 is on and set input mode CR#1:
(CH1, CH3)= mode 0, (CH2, CH4)= mode 3.
3. Set the mode of CR#2 and CR#3. The average times of CH1 and CH2 is K32.
4. Read the input signal average value of CH1~CH4 (4 data) from CR#6~CR#9 and
store them in D20 to D23.
5. Read the data of model type from expansion module K1 and distinguish if the data is
H49 (DVP-02DA model type).
6. D100 will increase K1 and D101 will increase K5 every second.
7. When value of D100 and D101 attain to K4000, they will be reset to 0.
8. If the model type is DVP-04AD, the drive contact M1 is on and set input mode CR#1:
CH1 mode to 0, CH2 mode to 2.
9. Write output setting CR#10 and CR#11 to D100 and D101. Analog output will change
with D100 and D101 value.



7 Application Commands API 50-99

DVP-PLC Application Manual

7-74
API

Applicable models
ES EP EH
80


RS


Serial Data Communication
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


m
D
n
Note: Operand m available range: m=0~256
Operand n available range: n=0~256
Refer to following for detail.

16-bit command (9 STEPS)
RS
Continuous
execution


32-bit command

Flag: M1120~M1131,
M1140~M1143, M1161
Please refer to the footnote.

Command
Explanation

4 : Start device of transmitting data : Transmitting data group number
: Start device of receiving data : receiving data group number
4 This command is a convenience command for MPU to use RS-485 to connect
communication interface in series. It stores words data in source data register
and sets length . It also can set to receive data register and length .
4 If it doesnt need to transmit data, can be indicated to K0 and if it doesnt need
to receive data, can be indicated to K0.
4 RS command can be used in the program unlimitedly, but you cant execute two or
more RS commands at the same time.
4 It is invalid to change transmitting data during executing RS command.
4 Use this RS command to transmit and receive data of PLC and external/peripheral
equipment (AC drive, etc.) when external/peripheral equipment has RS-485 serial
communication and communication format of this equipment is public.

4 If communication format of external/peripheral equipment corresponds with
communication format of MODBUS, DVP series PLC provides several convenience
communication commands, API 100 MODRD, API 101 MODWR and API 150
MODRW, for user to use. Please refer to individual command explanation for detail.
4 Please refer to following footnote for more information of special auxiliary relay
M1120~M1161 and special data register D1120~D1131 related to RS-485
communication command.
Program
Example
1

4 Writing data into the register that starts from D100 and set M1122 (send request flag)
to ON.
4 If RS command is executed when X10=ON, PLC will in the state of waiting for
transmitting and receiving data. It will start to transmit 10 continuous data that start
from D100. M1122 will be set to OFF at the end of transmitting (Please do not use
program to execute RST M1122). After 1ms, it will start to receive external 10 data and
store them into continuous registers that start from D120.


7 Application Commands API 50-99

DVP-PLC Application Manual

7-75
4 When receiving data complete, M1123 will be set to ON. (Program will set M1123 to
OFF when receiving data complete and in the state of waiting for transmitting and
receiving data. Please do use not PLC program to execute RST M1123 continuously.
MOV D1120 H86
M1002
SET M1120
SET M1122
MOV D1129 K100
X10
M1123
RST M1123
RS D100 K10 D120 K10
transmission
request
pulse
receiving
completed
Setting communication
protocol 9600, 7, E, 1
Communication
protocol latched
Setting communication
time out 100ms
write transmitting data
in advance
sending request
Process of receiving data
receiving completed
and flag reset

Program
Example
2

4 8-bit mode (M1161=ON) / 16-bit mode (M1161=OFF) switch:
8-bit mode:
Head code and tail code of PLC transmission data will be set by using M1126 and M1130
according to D1124~D1126. After setting, PLC will send head code and tail code that set
by user automatically when executing RS command.
When M1161=ON, the conversion mode will be 8-bit. 16-bit data will be divided into high
byte and low byte. High byte will be ignored and low byte will be received and
transmitted.
M1000
M1161
D100 D120 K4 K7 RS
X0

Transmit data: (PLC external equipment)
STX D100L D101L D102L D103L EXT1 EXT2
Head
code
source data register will start from
low byte of D100
length = 4
Tail code
1
Tail code
2

Receive data: (external equipment PLC)
7 Application Commands API 50-99

DVP-PLC Application Manual

7-76
D120L D122L D123L D124L D125L D126L D121L
Head
code
Tail code
1
Tail code
2
receive data register will start from
low byte of D120
length = 7

PLC will receive all data that transmitted from external equipment, including head code
and tail code. Please pay attention on setting length .
16-bit mode:
Head code and tail code of PLC transmitting data is set by using M1126 and M1130 with
D1124~D1126. After complete the setting, PLC will send head code and tail code set by
user automatically when executing RS command.
When M1161=OFF, the conversion mode will be 16-bit. 16-bit data will be divided into high
byte and low byte for data transmitting and receiving.
M1001
M1161
D100 D120 K4 K7 RS
X0

Transmit data: (PLC external equipment)
STX D100L D100L D101L D101L EXT1 EXT2
Head
code
source data register will start from
low byte of D100
length = 4
Tail code
1
Tail code
2


Receive data: (external equipment PLC)
D120L D120H D121L D121H D122L D122H D123L
Tail code
1
Tail code
2
receive data register will start from
low byte of D120
length = 7
Head
code

PLC will receive all data that transmitted from external equipment, including head code
and tail code. Please pay attention on setting length .
7 Application Commands API 50-99

DVP-PLC Application Manual

7-77
Program
Example
3

4 When PLC connects to VFD-B series AC drives (ASCII Mode, M1143=OFF), (16-bit
Mode, M1161=OFF), it will transmit data to read 6 continuous data that start from
VFD-B parameter address H2101.
MOV D1120 H86
M1002
SET M1120
SET M1122
MOV D1129 K100
X10
M1123
RST M1123
RS D100 K17 D120 K35
pulse
receiving
completed
Setting communication
protocol 9600, 7, E, 1
Communication
protocol latched
Setting communication
time out 100ms
write transmitting data
in advance
sending request
Process of receiving data
transmission
request
receiving completed
and flag reset

PLC = VFD-B, PLC transmitting: : 01 03 2101 0006 D4 CR LF
VFD-B = PLC, PLC receiving: : 01 03 0C 0100 1766 0000 0000 0136 3B CR LF

PLC transmitting data register (PLC transmitting messages)
Register DATA
D100 low byte : 3A H STX
D100 high byte 0 30 H ADR 1
D101 low byte 1 31 H ADR 0
ADR (1,0) is AC drive address
D101 high byte 0 30 H CMD 1
D102 low byte 3 33 H CMD 0
CMD (1,0) is command code
D102 high byte 2 32 H
D103 low byte 1 31 H
D103 high byte 0 30 H
D104 low byte 1 31 H
Start data address
D104 high byte 0 30 H
D105 low byte 0 30 H
D105 high byte 0 30 H
D106 low byte 6 36 H
Number of data (count by word)
D106 high byte D 44 H LRC CHK 1
D107 low byte 4 34 H LRC CHK 0
LRC CHK (0,1) is error check
code
D107 high byte CR A H
D108 low byte LF D H
END



PLC receiving data register (VFD-B response messages)
Register DATA
D120 low byte : 3A H STX
D120 high byte 0 30 H ADR 1
D121 low byte 1 31 H ADR 0
D121 high byte 0 30 H CMD 1
D122 low byte 3 33 H CMD 0
D122 high byte 0 30 H
D123 low byte C 43 H
Number of data (count by byte)
D123 high byte 0 30 H
D124 low byte 1 31 H
D124 high byte 0 30 H
Content of address 2101 H
7 Application Commands API 50-99

DVP-PLC Application Manual

7-78

Register DATA
D125 low byte 0 30 H
D125 high byte 1 31 H
D126 low byte 7 37 H
D126 high byte 6 36 H
D127 low byte 6 36 H
Content of address 2102 H
D127 high byte 0 30 H
D128 low byte 0 30 H
D128 high byte 0 30 H
D129 low byte 0 30 H
Content of address 2103 H
D129 high byte 0 30 H
D130 low byte 0 30 H
D130 high byte 0 30 H
D131 low byte 0 30 H
Content of address 2104 H
D131 high byte 0 30 H
D132 low byte 1 31 H
D132 high byte 3 33 H
D133 low byte 6 36 H
Content of address 2105 H
D133 high byte 0 30 H
D134 low byte 0 30 H
D134 high byte 0 30 H
D135 low byte 0 30 H
Content of address 2106 H
D135 high byte 3 33 H LRC CHK 1
D136 low byte B 42 H LRC CHK 0
D136 high byte CR A H
D137 low byte LF D H
END

Program
Example
4

4 When PLC connects to VFD-B AC drive (RTU Mode, M1143=ON), (16-bit Mode,
M1161=ON), writing transmitting data, H12, in advance into VFD-B parameter address
H2000.
MOV D1120 H86
M1002
SET M1120
SET M1122
MOV D1129 K100
X10
M1123
RST M1123
RS D100 K8 D120 K8
SET M1143
SET M1161
RTU Mode
8 bits Mode
receiving
completed
sending request
write transmitting data
in advance
transmission
request
pulse
Setting communication
time out 100ms
Communication
protocol latched
Setting communication
protocol 9600, 7, E, 1
Process of receiving data
receiving completed
and flag reset

7 Application Commands API 50-99

DVP-PLC Application Manual

7-79
PLC = VFD-B, PLC transmitting: 01 06 2000 0012 02 07
VFD-B = PLC, PLC receiving: 01 06 2000 0012 02 07
PLC transmitting data register (PLC transmitting messages)
Register DATA
D100 low byte 01 H Address
D101 low byte 06 H Function
D102 low byte 20 H
D103 low byte 00 H
Data address
D104 low byte 00 H
D105 low byte 12 H
Data content
D106 low byte 02 H CRC CHK Low
D107 low byte 07 H CRC CHK High
PLC receiving data register (response messages of VFD-B)
Register DATA
D120 low byte 01 H Address
D121 low byte 06 H Function
D122 low byte 20 H
D123 low byte 00 H
Data address
D124 low byte 00 H
D125 low byte 12 H
Data content
D126 low byte 02 H CRC CHK Low
D127 low byte 07 H CRC CHK High
7 Application Commands API 50-99

DVP-PLC Application Manual

7-80
Footnote

4 RS-485 communication RS / MODRD / MODWR / FWD / REV / STOP / RDST /
RSTEF / MODRW commands relation flags:
Flag Function Explanation Action
M1120
Communication protocol holding. It is used to hold communication
setting. PLC will reset communication protocol setting according to
special data register D1120 after first program scan. When second
program scan starts and RS command is executed, it will reset
communication protocol setting according to special data register
D1120. If communication protocol is fixed, M1120 can be set to
ON. At this time, communication protocol setting wont be reset as
RS / MODRD / MODWR / FWD / REV / STOP / RDST / RSTEF /
MODRW is executed even if D1120 setting is changed.
User setting
and clear
M1121
When it is off, RS-485 of PLC is sending communication
information.
System acts
M1122
Sending request. Users need to set M1122 to ON by pulse
command when using RS / MODRD / MODWR / FWD / REV /
STOP / RDST / RSTEF / MODRW command to transmit and
receive data. If above command starts to execute, PLC will
transmit and receive data. M1122 will be reset after above
commands complete transmitting.
User setting
and system
clears auto
M1123
Receiving completed. M1123 will be set to ON after RS / MODRD /
MODWR / FWD / REV / STOP / RDST / RSTEF / MODRW
commands complete executing. User can process receiving data
when M1123 is set to ON and reset M1123 to OFF when the
process of receiving data is completed.
System
auto setting
and user
clear
M1124
Receiving wait. When M1124 is set to ON, it means PLC is waiting
for receiving data.
System acts
M1125
Communication reset. When M1125 is set to ON, the
communication of PLC will be reset. After resetting, M1125 must
be reset to Off.
M1126
STX/ETX selection. Please refer to the following table for selecting
user/system definition and STX/ETX.
M1130
STX/ETX selection. Please refer to the following table for selecting
user/system definition and STX/ETX.
User setting
and clear
M1127
Communication command finishes transmitting and receiving. RS
command is not included.
M1129
Receiving time out. This flag will be activated if D1129 is set and
the process of receiving data is not completed within the setting
time. After resetting, M1129 should be reset to OFF.
System
auto setting
and user
clear
M1128 Transmitting/receiving indication
M1131
M1131=ON during MODRD / RDST / MODRW convert to HEX.
Otherwise M1131 will be OFF.
M1140
MODRD / MODWR / MODRW data received error
M1141
MODRD / MODWR / MODRW command error
M1142
VFD-A command data received error
System acts
M1143
ASCII / RTU mode selection, ON is RTU mode and OFF is ASCII
mode. (use with MODRD / MODWR / MODRW commands)
M1161
8/16-bit mode setting. ON is 8-bit mode and OFF is 16-bit mode
User setting
and clear

7 Application Commands API 50-99

DVP-PLC Application Manual

7-81
4 Special register related to RS-485 communication RS / MODRD / MODWR / FWD /
REV / STOP / RDST / RSTEF / MODRW command:
Special register Function Explanation
D1038
For ES/EP models, data response delay time setting when PLC
MPU is slave. Time unit (0.1ms).
D1050~D1055
After executing MODRD/RDST command, PLC will convert ASCII
data of D1070~D1085 to HEX and store hexadecimal data to
D1050~D1055.
D1070~D1085
PLC built-in RS-485 communication convenience command.
Executing this command will receive feedback (return) messages
from receiver. The messages will be stored at D1070~D1085. User
can check return data by viewing the content of the register.
D1089~D1099
PLC built-in RS-485 communication convenience command. The
transmitting message will be stored in D1089~D1099 when this
command is executed. Users can check if the command is correct
by the content of the register.
D1120
Please refer to the following table for RS-485 communication
protocol.
D1121 Communication address of PLC MPU when PLC MPU is slave.
D1122 Residual words of transmitting data.
D1123 Residual words of receiving data.
D1124 Start word definition (STX). Please refer to the table above.
D1125 First end word definition (ETX1). Please refer to the table above.
D1126 Second end word definition (ETX2). Please refer to the table above.
D1129
Communication time out is abnormal. Time unit (ms). It is used to
set time of time out. If the value of the time is 0, it means there is no
time out. PLC will set M1129 to be ON if receiving time of the first
word or between any two words is more than setting after executing
RS / MODRD / MODWR / FWD / REV / STOP / RDST / RSTEF /
MODRW commands to enter received mode when the value of the
time is more than 0. User can use M1129 to handle communication
time out but be sure to remember to reset M1129 after handling.
D1130 MODBUS return error code record.
D1256~D1295
PLC built-in RS-485 communication convenience command
MODRW. The characters transmitted by this command will be
stored in D1256~D1295 when this command is executed. User can
check if the command is correct by the content of the registers.
D1296~D1311
PLC will automatically convert ASCII data in the receiving register
specified by user to HEX, hexadecimal value.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-82

4 D1120: RS-485 communication protocol. For the settings, please refer to following
table:
Content 0 1
b0 Data length 7 8
00 : None
01 : Odd
b1
b2
Parity bits
11 : Even
b3 Stop bits 1 bit 2 bit
0001 (H1) : 110
0010 (H2) : 150
0011 (H3) : 300
0100 (H4) : 600
0101 (H5) : 1200
0110 (H6) : 2400
0111 (H7) : 4800
1000 (H8) : 9600
1001 (H9) : 19200
1010 (HA) : 38400
1011 (HB) : 57600 (only in EH/EP series models)
b4
b5
b6
b7
1100 (HC) : 115200 (only in EH/EP series models)
b8
Start word
selection
None D1124
b9
First end word
selection
None D1125
b10
Second end word
selection
None D1126
b15~b11 No definition
4 Start word and end word of control characters will be defined in the communication
format of peripheral equipment when using RS command. Start word and end word
can be set in D1124~D1125 by user or defined by machine/equipment. When using
M1126, M1130, D1124~D1125 to set start and end word, b8~b9 of D1120 of RS485
communication protocol should be set to 1. For the settings, please refer to the
following table:
M1130
0 1
0
D1124: user define
D1125: user define
D1126: user define
D1124: H 0002
D1125: H 0003
D1126: H 0000no setting
M
1
1
2
6

1
D1124: user define
D1125: user define
D1126: user define
D1124: H 003A:
D1125: H 000DCR
D1126: H 000ALF
4 Example for communication format setting:
Communication format: Baud rate 9600 7, N, 2
STX : :
ETX1 : CR
EXT2 : LF
You can get the communication format H788 via check with table and write into D1120.

7 Application Commands API 50-99

DVP-PLC Application Manual

7-83



b15 b0
0 0 0 0 0 1 1 1 1 0 0 0 1 0 0 0
7 8 8
D1120
0
Don t care

MOV H788 D1120
M1002

When using STX, EXT1 and EXT2 should pay attention to the On/Off relationship
between special auxiliary relay M1126 and M1130.
4 M1143: ASCII / RTU mode selection. ON is RTU mode and OFF is ASCII mode.
Take standard MODBUS format to explanation:
ASCII mode (M1143=Off):
STX Start word = : (3AH)
Address Hi
Address Lo
Communication address:
8-bit address consists of 2 ASCII codes
Function Hi
Function Lo
Function code:
8-bit function code consists of 2 ASCII codes
DATA (n-1)
.
DATA 0
Data content:
n 8-bit data content consists of 2n ASCll codes
LRC CHK Hi
LRC CHK Lo
LRC check sum:
8-bit check sum consists of 2 ASCll code
END Hi
END Lo
End word:
END Hi = CR (0DH), END Lo = LF(0AH)
Communication protocol is made of MODBUS ASCII (American Standard Code for
Information Interchange). Each byte consists of 2 ASCII characters. For example: a
1-byte data 64 Hex shown as 64 in ASCII, consists of 6 (36Hex) and 4 (34Hex). The
table below identifies the usable hexadecimal characters and their associated ASCII
codes.
Character 0 1 2 3 4 5 6 7
ASCII code 30H 31H 32H 33H 34H 35H 36H 37H

Character 8 9 A B C D E F
ASCII code 38H 39H 41H 42H 43H 44H 45H 46H
Start word (STX): : (3AH)
Communication address (Address):
0 0: broadcast for all driver (Broadcast)
0 1: toward the drive at the 01 address
0 F: toward the drive at the 15 address
1 0: toward the drive at the 16 addressand consequently, the Max. address
can be reached is 255 (F F).
Function code (Function):
0 3: read contents of many registers
0 6: write one WORD into the register
1 0: write contents of many registers
7 Application Commands API 50-99

DVP-PLC Application Manual

7-84
Data content:
The content of transmitting data send by user
LRC check:
LRC check is the added sum from Address to Data contents. For example, the 01H +
03H + 21H + 02H + 00H + 02H = 29H, then take the complementary of 2, D7H.
End word: END Hi = CR (0DH), END Lo = LF(0AH)
For example: when the address of the drive is set as 01H, read 2 data contents that exist
successively within the register, as shown follows: the address of the start register is
2102H.
Inquiry message: Response message:
STX : STX :
0 0
Address
1
Address
1
0 0
Function
3
Function
3
2 0
1
Number of data
(count by byte) 4
0 1 Start address
2 7
0 7
0
Content of start address
2102H
0
0 0
Number of data
(count by word)
2 0
D 0
LRC Check
7
Content of address
2103H
0
CR 7
END
LF
LRC Check
1
CR

END
LF
RTU mode (M1143=On):
START Please refer to following explanation
Address Communication address: 8-bit binary
Function Function code: 8-bit binary
DATA (n-1)
.
DATA 0
Data content:
n 8-bit data
CRC CHK Low
CRC CHK High
CRC check:
16-bit CRC consists of 2 8-bit binary
END
Please refer to following explanation
START:
ES / EP series: keep none input signal to be greater or equal to 10 ms
EH series:
Baud Rate(bps) RTU Timeout Timer(ms) Baud Rate(bps) RTU Timeout Timer(ms)
300 40 9600 2
600 21 19200 1
1200 10 38400 1
2400 5 57600 1
4800 3 115200 1
7 Application Commands API 50-99

DVP-PLC Application Manual

7-85

Communication Address (Address):
00 H: broadcast for all driver (Broadcast)
01 H: toward the drive at the 01 address
0F H: toward the drive at the 15 address
10 H: toward the drive at the 16 addressand consequently, the Max. address
can be reached is 255 (F F)
Function code (Function):
03 H: read contents of many registers
06 H: write one WORD into the register
01 H: write contents of many registers
Data content:
The content of transmitting data send by user
CRC check:
CRC check starts from Address and ends in Data content. Its calculation is as
follows:
Step 1: Load the 16-bit register (the CRC register) with FFFFH.
Step 2: Exclusive OR the first 8-bit byte message command with the 16-bit CRC
register of the low byte, then store the result into the CRC register.
Step 3: Shift the CRC register one bit to the right and fill 0 in the higher bit.
Step 4: Check the value that shifts to the right. If it is 0, store the new value from
step 3 into the CRC register, otherwise, Exclusive OR A001H and the CRC
register, then store the result into the CRC register.
Step 5: Repeat step 3 and 4 and calculates the 8-bit.
Step 6: Repeat Steps 2~5 for the next 8-bit message command, till all the message
commands are processed. And finally, the obtained CRC register value is
the CRC check value. What should be noticed is that the CRC check must
be placed interchangeably in the check sum of the message command.
END:
ES / EP series: keep none input signal to be greater or equal to 10 ms
EH series:
Baud Rate(bps) RTU Timeout Timer(ms) Baud Rate(bps) RTU Timeout Timer(ms)
300 40 9600 2
600 21 19200 1
1200 10 38400 1
2400 5 57600 1
4800 3 115200 1



7 Application Commands API 50-99

DVP-PLC Application Manual

7-86

For example: when the address of the drive is set as 01H, read 2 continuous data of the
register shown follows: the address of the start register is 2102H
Inquiry message: Response message:
Address
01 H
Address
01 H
Function
03 H
Function
03 H
21 H
Start data address
02 H
Number of data
(count by byte)
04 H
00 H 17 H Number of data
(count by word) 02 H
Content of data address
8102H 70 H
CRC CHK Low 6F H 00 H
CRC CHK High F7 H
Content of data address
8103H 00 H
CRC CHK Low FE H
CRC CHK High 5C H
4 Timing chart of RS-485 communication program flag:
MOV D1120 H86
M1002
SET M1120
SET M1122
MOV D1129 K100
X10
M1123
RST M1123
RS D100 K2 D120 K8
Setting communication
protocol 9600, 7, E, 1
Communication
protocol latched
Setting communication
time out 100ms
write transmitting data
in advance
transmission
request
pulse
sending request
receiving
completed
receiving completed
and flag reset
Process of receiving data

7 Application Commands API 50-99

DVP-PLC Application Manual

7-87
4 Timing chart:
8
7
6
5
4
3
2
1
0
3
2
1
0
1 2 3 4 5 6 7 8 1 2 3
SET M1122 X0
RS X10 command executes
MODRD/RDST/MODRW data
recei ving and conversion
completed
M1127
Covert MODRD/RDST
/MODRW to hexadecimal
M1131
Transmission ready M1121
Sending request M1122
Receiving completed M1123
Receiving wait M1124
Communication reset M1125
Transmitting and receiving M1128
Receiving time out M1129
Receive time out
timer set by D1129
Residual words of
transmitting data D1122
Residual words of
receiving data D1123
Auto reset after transmitting data completed
Change
direction
immediately
User must reset in program
User will reset to the transmit
standby status in program
ASCII data converted to hexadecimal,
less than a scan period
It will be activated when receiving time out message
Stop to count time after
receiving data completed
Conversion data

API

Applicable models
ES EP EH
81

D
PRUN
P

Octal Number System
Transmission
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: X, Y, M of word device KnX, KnY, KnM should be a multiple
of 10, e.g. X10, M10, Y10.
When operand S is specified as KnX, operand D should be
specified as KnM.
When operand S is specified as KnM, operand D should be
specified as KnY.
Refer to each model specification for usage range.

16-bit command (5 STEPS)
PRUN
Continuous
execution
PRUNP
Pulse
execution

32-bit command (9 STEPS)
DPRUN
Continuous
execution
DPRUNP
Pulse
execution
Flag: None

Command
Explanation

4 : Transmission source device : Transmission destination device
4 Transmit the the content of to in octal number system format.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-88
Program
Example
1

4 When X3=On, transmit the content of K4X10 to K4M10 in octal number system
format.
X3
PRUN K4X10 K4M10

X27
M27
X26 X25 X24 X23 X22 X21 X20 X17 X16 X15 X14 X13 X12 X11 X10
M17 M16 M15 M14 M13 M12 M11 M10 M26 M25M24 M23 M22 M21 M20 M19M18
NO CHANGE
Program
Example
2

4 When X2=On, transmit the content of K4M10 to K4Y10 in octal number system format.
X2
PRUN K4M10 K4Y10

X27
M27
X26 X25 X24 X23 X22 X21 X20 X17 X16 X15 X14 X13 X12 X11 X10
M17 M16 M15 M14 M13 M12 M11 M10 M26 M25M24 M23 M22 M21 M20 M19M18
These two devices won be transmitted


API

Applicable models
ES EP EH
82


ASCI
P

Convert HEX into ASCII
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: Operand n available range: n=1~256
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(ASCIP)

16-bit command (7 STEPS)
ASCI
Continuous
execution
ASCIP
Pulse
execution

32-bit command

Flag: M1161 8/16-bit mode setting

Command
Explanation

4 : Start device of source data : Start device for storing converted result
: Converted digits
4 16-bit conversion mode: When M1161=Off, read hexadecimal data characters
from the source devcie and convert the data into the ASCII code. Then, store
the result into high and low byte of device .
4 8-bit conversion mode: When M1161=On, read hexadecimal data characters
from the source devcie and convert the data into the ASCII code. Then, store
the result into low byte of device (high byte of device are all set to 0).
7 Application Commands API 50-99

DVP-PLC Application Manual

7-89
Program
Example
1

4 When M1161=Off, it is 16-bit conversion mode.
4 When X0=On, read four hexadecimal data characters from D10 and convert them into
ASCII codes. Then, store the converted data to the register started from D20.
X0
ASCI D10 D20 K4
M1001
M1161

4 Supposed condition:
(D10) = 0123 H 0 = 30H 4 = 34H 8 = 38H
(D11) = 4567 H 1 = 31H 5 = 35H 9 = 39H
(D12) = 89AB H 2 = 32H 6 = 36H A = 41H
(D13) = CDEFH 3 = 33H 7 = 37H B = 42H
4 When n is 4, the bit structure is:
0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1
0 1 2 3
D10=0123 H
D20
D21
0 0 1 1 0 0 0 1 0 0 1 1 0 0 0 0
0 0 1 1 0 0 1 1 0 0 1 1 0 0 1 0
1
31H
0
30H
3 33H 2 32H
high byte low byte
high byte
low byte

4 When n is 6, the bit structure is:
0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0
0 0 0 0 1 0 0 1 0 1 1 1 1 1 1 0
0 1 1 0 1 0 1 1 0 1 0 0 1 1 0 1
0 1 2 3
D10 = H 0123
b15
b15
7 H 37 6 H 36
Convert to
b15
0 0 1 1 0 1 0 0 0 1 1 0 0 0 0 0
0 1 1 0 0 1 0 0 0 0 1 0 0 1 1 1
b15
3 H 33 2 H 32
D22
b15
b0
b0
b0
b0
b0
D11 = H 4567
4 5 6 7
D20
D21
1 H 31 0 H 30

7 Application Commands API 50-99

DVP-PLC Application Manual

7-90
4 When n = 1 to 16:
n
D
K1 K2 K3 K4 K5 K6 K7 K8
D20 low byte 3 2 1 0 7 6 5 4
D20 high byte 3 2 1 0 7 6 5
D21 low byte 3 2 1 0 7 6
D21 high byte 3 2 1 0 7
D22 low byte 3 2 1 0
D22 high byte 3 2 1
D23 low byte 3 2
D23 high byte 3
D24 low byte
D24 high byte
D25 low byte
D25 high byte
D26 low byte
D26 high byte
D27 low byte
D27 high byte


no
change





n
D
K9 K10 K11 K12 K13 K14 K15 K16
D20 low byte B A 9 8 F E D C
D20 high byte 4 B A 9 8 F E D
D21 low byte 5 4 B A 9 8 F E
D21 high byte 6 5 4 B A 9 8 F
D22 low byte 7 6 5 4 B A 9 8
D22 high byte 0 7 6 5 4 B A 9
D23 low byte 1 0 7 6 5 4 B A
D23 high byte 2 1 0 7 6 5 4 B
D24 low byte 3 2 1 0 7 6 5 4
D24 high byte 3 2 1 0 7 6 5
D25 low byte 3 2 1 0 7 6
D25 high byte 3 2 1 0 7
D26 low byte 3 2 1 0
D26 high byte 3 2 1
D27 low byte 3 2
D27 high byte


no
change



3
Program
Example
2

4 When M 1161=On, it is 8-bit conversion mode.
4 When X0=On, read four hexadecimal data characters from D10 and convert them into
ASCII codes. Then, store the converted data to the register started from D20.
X0
ASCI D10 D20 K4
M1000
M1161


7 Application Commands API 50-99

DVP-PLC Application Manual

7-91
4 Supposed condition:
(D10) = 0123 H 0 = 30H 4 = 34H 8 = 38H
(D11) = 4567 H 1 = 31H 5 = 35H 9 = 39H
(D12) = 89AB H 2 = 32H 6 = 36H A = 41H
(D13) = CDEFH 3 = 33H 7 = 37H B = 42H
4 When n is 2, the bit structure is:
0 0 0 0 0 0 0 1 0 0 1 0 0 0 1 1
0 1 2 3
D10=0123 H
0 0 0 0 0 0 0 1 1 0 0 0
0 0 0 0 0 0 1 1 0 0 1
3
3 3
2
1 0 0 0
1 0 0 0 0
ASCII code of D20=2 is 32H
ASCII code of D21=3 is 33H

4 When n is 4, the bit structure is:
0 0 0 0 0 1 0 1 1 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
0 0
0 1 2 3
D10 = H 0123
b15
b15
Convert to
b15
0 0 0 0 0 0 0 0 0 0 1 1 0 0 1 1
b15
3 H 33
2 H 32
D22
b15
b0
b0
b0
b0
b0
D20
D21
1 H 31
D23
0 H 30
0 0 0 0 0 0 0 0 0 0 1 0 1 1
0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1


7 Application Commands API 50-99

DVP-PLC Application Manual

7-92
4 When n = 1 to 16:
n
D
K1 K2 K3 K4 K5 K6 K7 K8
D20 3 2 1 0 7 6 5 4
D21 3 2 1 0 7 6 5
D22 3 2 1 0 7 6
D23 3 2 1 0 7
D24 3 2 1 0
D25 3 2 1
D26 3 2
D27 3
D28
D29
D30
D31
D32
D33
D34
D35


no
change




n
D
K9 K10 K11 K12 K13 K14 K15 K16
D20 B A 9 8 F E D C
D21 4 B A 9 8 F E D
D22 5 4 B A 9 8 F E
D23 6 5 4 B A 9 8 F
D24 7 6 5 4 B A 9 8
D25 0 7 6 5 4 B A 9
D26 1 0 7 6 5 4 B A
D27 2 1 0 7 6 5 4 B
D28 3 2 1 0 7 6 5 4
D29 3 2 1 0 7 6 5
D30 3 2 1 0 7 6
D31 3 2 1 0 7
D32 3 2 1 0
D33 3 2 1
D34 3 2
D35


no
change



3

API

Applicable models
ES EP EH
83


HEX
P

Convert ASCII to HEX
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
n
Note: Operand n available range: n=1~256
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(HEXP).

16-bit command (7 STEPS)
HEX
Continuous
execution
HEXP
Pulse
execution

32-bit command

Flag: M1161 8/16-bit mode
exchange
Command
Explanation

4 : Start device of source data : Start device for storing converted result
n
: number of converted ASCII codes.

7 Application Commands API 50-99

DVP-PLC Application Manual

7-93
4 16-bit conversion mode: When M1161=Off, it is 16-bit conversion mode. Convert
16-bit ASCII code of (high and low byte) to hexadecimal data characters and
then transmit to per 4-bit for one time. Number of converted ASCII codes is set
by .
4 8-bit conversion mode: When M1161=On, it is 16-bit conversion mode Convert 16-bit
ASCII code of (high and low byte) to hexadecimal data characters and then
transmit to low byte of . Number of converted ASCII codes is set by . (high
byte of are all 0)
Program
Example
1

4 When M1161=Off, it is 16-bit conversion mode.
4 When X0=On, read ASCII bytes of the register started from D20 and convert them to
hexadecimal characters. Then, store the converted data to four registers started from
D10. (The converted data is four characters converted as one segment of data)
X0
HEX D20 D10 K4
M1001
M1161

4 Supposed condition:
S
ASCII code
HEX
conversion
S
ASCII code
HEX
conversion
D20 low byte H 43 C D24 low byte H 34 4
D20 high byte H 44 D D24 high byte H 35 5
D21 low byte H 45 E D25 low byte H 36 6
D21 high byte H 46 F D25 high byte H 37 7
D22 low byte H 38 8 D26 low byte H 30 0
D22 high byte H 39 9 D26 high byte H 31 1
D23 low byte H 41 A D27 low byte H 32 2
D23 high byte H 42 B D27 high byte H 33 3
4 When n is 4, the bit structure is:
0 1 0 0 0 1 0 0 0 1 1 0 0 0 0 0
0 0 0 0 0 1 0 1 0 0 1 0 1 1 0 0
0 0 0 1 0 1 1 1 1 1 0 0 1 0 0 0
0 A B C
D10
D20
D21
41H A
43H C
30H 0
42H B

7 Application Commands API 50-99

DVP-PLC Application Manual

7-94
4 When n = 1 to 16:
n
D

D13 D12 D11 D10
1 ***C H
2 **CD H
3 *CDE H
4

CDEF H
5 ***C H DEF8 H
6 **CD H EF89 H
7 *CDE H F89A H
8

CDEF H 89AB H
9 ***C H DEF8 H 9AB4 H
10 **CD H EF89 H AB45 H
11 *CDE H F89A H B456 H
12
The used
registers which
are not
specified are all
0
CDEF H 89AB H 4567 H
13 ***C H DEF8 H 9AB4 H 5670 H
14 **CD H EF89 H AB45 H 6701 H
15 *CDE H F89A H B456 H 7012 H
16 CDEF H 89AB H 4567 H 0123 H
Program
Example
2

4 When M1161=On, it is 16-bit conversion mode.
X0
HEX D20 D10 K4
M1000
M1161

4 Supposed condition:

ASCII code
HEX
conversion

ASCII code
HEX
conversion
D20 H 43 C D28 H 34 4
D21 H 44 D D29 H 35 5
D22 H 45 E D30 H 36 6
D23 H 46 F D31 H 37 7
D24 H 38 8 D32 H 30 0
D25 H 39 9 D33 H 31 1
D26 H 41 A D34 H 32 2
D27 H 42 B D35 H 33 3
4 When n is 2, the bit structure is
0 0 0 1 1 0 0 0
0 1 0 0 1 0 0
0 0 0 0 1 1 0 0 0 0
0 A
D10
D20
D21
4 1
3 0
0 0
0
0 0 0 0

7 Application Commands API 50-99

DVP-PLC Application Manual

7-95
4 When n = 1 to 16:
n
D D13 D12 D11 D10
1 ***C H
2 **CD H
3 *CDE H
4

CDEF H
5 ***C H DEF8 H
6 **CD H EF89 H
7 *CDE H F89A H
8

CDEF H 89AB H
9 ***C H DEF8 H 9AB4 H
10 **CD H EF89 H AB45 H
11 *CDE H F89A H B456 H
12
The used
registers which
are not
specified are all
0
CDEF H 89AB H 4567 H
13 ***C H DEF8 H 9AB4 H 5670 H
14 **CD H EF89 H AB45 H 6701 H
15 *CDE H F89A H B456 H 7012 H
16 CDEF H 89AB H 4567 H 0123 H

API

Applicable models
ES EP EH
84


CCD
P

Check Code
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: Operand n available range: n=1~256
Refer to each model specification for usage range.
ES series models do not support this command (CCD,
CCDP)

16-bit command (7 STEPS)
CCD
Continuous
execution
CCDP
Pulse
execution

32-bit command

Flag: M1161 8/16-bit mode
exchange

Command
Explanation


4 : Start device of source data : Result device for storing check sum
: Number of data
4 This command is used to check sum of words to ensure the truth of transmission data
during communication.
4 16-bit conversion mode: When M1161=Off, it is 16-bit conversion mode. Check the
sum of words (8-bit in one byte) from the register specified by source devcie
and store the sum to the register specified by device while the parity bits
are stored in +1.
4 8-bit conversion mode : When M1161=On, it is 8-bit conversion mode. Check the sum
of words (8-bit in one byte, only low byte are available) from the register
specified by source devcie and store the sum to the register specified by device
while the parity bits are stored in +1.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-96
Program
Example
1

4 When M1161=Off, it is 16-bit conversion mode.
4 When X0=On, check sum of 6 words from the register specified by D0 (8-bit in one
byte, n=6 means to specify D0~D2) and store the sum in the register specified by
D100 while the parity bits are stored in D101.
X0
CCD D0 D100 K6
M1000
M1161

(S)
D0 low byte K100 = 0 1 1 0 0 1 0 0
D0 high byte K111 = 0 1 1 0 1 1 1 1
D1 low byte K120 = 0 1 1 1 1 0 0 0
D1 high byte K202 = 1 1 0 0 1 0 1 0
D2 low byte K123 = 0 1 1 1 1 0 1 1
D2 high byte K211 = 1 1 0 1 0 0 1 1
D100 K867 Total
D101 0 0 0 1 0 0 0 1
Content of data(words)
0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 0
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1
D100
D101
Parity
An even result is indicated
by the use of 0(zero)
An odd result is indicated
by the use of 1(one)

Program
Example
2

4 When M1161=Off, it is 16-bit conversion mode.
4 When X0=On, check sum of 6 words from the register specified by D0 (8-bit in one
byte, n=10 means to specify D0~D4) and store the sum in the register specified by
D100 while the parity bits are stored in D101.
X0
CCD D0 D100 K6
M1000
M1161

0 0 0 0 0 1 1 1 1 1 0 0 0 0 1 0 D100
0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 1 D101
Parity
An even result is indicated
by the use of 0(zero)
An odd result is indicated
by the use of 1(one)
(S)
D0 low byte K100 = 0 1 1 0 0 1 0 0
D1 low byte K111 = 0 1 1 0 1 1 1 1
D2 low byte K120 = 0 1 1 1 1 0 0 0
D3 low byte K202 = 1 1 0 0 1 0 1 0
D4 low byte K123 = 0 1 1 1 1 0 1 1
D5 low byte K211 = 1 1 0 1 0 0 1 1
D100 K867 Total
D101 0 0 0 1 0 0 0 1
Content of data(words)

7 Application Commands API 50-99

DVP-PLC Application Manual

7-97
API

Applicable models
ES EP EH
85


VRRD
P

Potentiometer Read
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Operand S available range: n=0~7
Refer to each model specification for usage range.
ES series models do not support this command (VRRD,
VRRDP)

16-bit command (5 STEPS)
VRRD
Continuous
execution
VRRDP
Pulse
execution

32-bit command

Flag: M1178 and M1179.
Please refer to following footnote.

Command
Explanation

4 : Potentiometer number : Destination device for storing read
potentiometer
4 VRRD command is used to read the two potentiometers of PLC main processing unit
and the number is No.0 and No.1., or it is used to read the six potentiometers of
function card and the number is No.2 to No.7. The read data will be converted as value
from 0 to 255 and stored in destination device .
4 If regarding the potentiometer as the setting value of timer, the setting time of timer
can be changed by truning VR. If desiring to get the value more than 255, please
multiply by some constant.
Program
Example
1

4 When X0=On, the potentiometer of No.0 of VR specified by VRRD command will be
converted to BIN value (0~255) in an 8-bit format and stored in D0 temporarily.
4 When X1=On, timer T0 regards the content of D0 as the setting value of timer and
starts to count time.
X1
TMR T0 D0
X0
VRRD K0 D0

Program
Example
2

4 Potentiometer read in order: S=K0 to K7 corresponding to the 8 potentiometers, No.0
to No.7. The following program example use E (E=0~7) to modify, K0E=K0 to K7.
4 The loop of timer convert the potentiometer scale 0~10 to 0~255. The time unit of T0
to T7 is 0.1 second, therefore, the setting value is 0 to 25.5 seconds.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-98

M1000
RST E
FOR K8
M1000
VRRD
INC E
D100E
NEXT
X10
TMR D100 T0
T0
Y000
X11
TMR D101 T1
T7
Y007
END
K 0E

4 Operation of FOR~NEXT command:
1. In FOR~NEXT command area, FOR command specify K8 indicates the loop
between FOR~NEXT command is executed 8 times repeatly. After 8 times of
execution, it will continue to execute.
2. Between FOR~NEXT command (INC E), the content of E will be 0, 1, 27 and
increased by 1(one). Therefore, 8 potentiometer scales will also show as VR0
D100, VR1D101, VR2D102VR7D107 in order and be read into the
specified register.
Footnote

4 VR means VARIABLE RESISTOR SCALE.
4 For EP/EH models, built-in 2 points VR potentiometer can be used with special D and
special M.
Device Function
M1178 Start potentiometer VR0
M1179 Start potentiometer VR1
D1178 VR0 value
D1179 VR1value









7 Application Commands API 50-99

DVP-PLC Application Manual

7-99
API

Applicable models
ES EP EH
86


VRSC
P

Potentiometer Scale
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: S operand available range: n=0~7
Refer to each model specification for usage range.
ES series models do not support this command (VRSC, VRSCP).

16-bit command (5 STEPS)
VRSC
Continuous
execution
VRSCP
Pulse
execution

32-bit command

Flag: None

Command
Explanation

4 : Potentiometer number : Destination device for storing potentiometer
scale
4 VRRD command is used to read the potentiometer scale value of two potentiometers
on PLC main processing unit and the number is No.0 and No.1., or it is used to read
the potentiometer scale value of six potentiometers on function card and the number is
No.2 to No.7 (potentiometer scale value is from 0 to 10). The read data will be stored
in destination device as an integer from the range 0 to 10.
Program
Example
1

4 When X0=On, the potentiometer scale value (0 to10) of No. 0 specified by VRSC
command is stored in device D10.
X0
VRSC K0 D10

Program
Example
2

4 Regrad as digital switch: Correspond potentiometer scale 0 to 10. Only one contact is
On between M10 to M20. Using DECO command (API 41) can decode the
potentiometer scale into M0~M15.
4 When X0=On, store the potentiometer scale value (0 to 10) of specified No. 1
potentiometer to D1.
4 When X1=On, use DECO command (API 41) to decode the potentiometer scale into
M10~M25.
X0
VRSC K1 D1
X1
DECO D1 M10 K4
M10
M11
M20
On when volume scale is 0
On when volume scale is 1
On when volume scale is 10




7 Application Commands API 50-99

DVP-PLC Application Manual

7-100


API

Applicable models
ES EP EH
87

D
ABS
P

Absolute Value
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D


Note: Refer to each model specification for usage range.
ES series models do not support this command (ABSP, DABSP).

16-bit command (3 STEPS)
ABS
Continuous
execution
ABSP
Pulse
execution

32-bit command (5 STEPS)
DABS
Continuous
execution
DABSP
Pulse
execution
Flag: None

Command
Explanation

4 : Specified device for taking absolute value
4 When the command is executed, take the absolute value of the specified device,
.
4 This command is usually pulse execution (ABSP).
Program
Example

4 When X0 goes from OFFON, take the absolute value of the D0 contents.
X0
ABS D0


API

Applicable models
ES EP EH
88

D
PI D


PID Calculation
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

S
3

D
Note: Operand S
3
uses 14 continuous devices
Refer to each model specification for usage range.
For the information of the PID usage times during the
program, please refer to the footnote.

16-bit command (9 STEPS)
PID
Continuous
execution


32-bit command
DPID
Continuous
execution

Flag: None

Command
Explanation

4 : Target value (SV) : Present measured value (PV) : Parameter
: Output value (MV)
4 Specific command for PID calculation control. This scan will execute PID operation
when sampling time reaches. PID means Proportion, Integration and Differential. PID
control is widely applied on many applications of machine equipments, pneumatic
equipments and electric equipments.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-101

4 : Target value (SV), : Present measured value (PV), for 16-bit command:
~ +14, for 32-bit command: ~ +20: PID command will start to
execute after completing all parameters setting and the result will be stored in .
Please give no latch register area for content. (if you want to give
content a latch register, please reset latch to 0 when program runs.)
Program
Example

4 Please complete the parameter settings before executing PID command.
4 This command will be executed when X0=ON and the result will be stored in D150.
The command will not be executed when X0=OFF and the previous data wont have
any change.
D150
X0
D100 D1 D0 PID

Footnote

4 PID command is only available in V5.7 and above of ES series models and it is not
available for other version.
4 There is no time limit for using PID command but the register number specified by
cannot be repeated.
4 For 16-bit commands, uses 15 registers. In above program, the parameter
setting area of PID command that indicates are D100~D114. You should use
MOV command to transmit settings to the indication register to set before PID
command executes. If the registers that parameters indicate are latch area, please
use MOVP to execute transmitting.
4 Parameter table of 16-bit :
Device No. Function Setting range Explanation
:
Sampling time (T
S
)
(unit: 10ms) 1~2,000
(unit: 10ms)
If T
S
is less than one program scan
time, PID command will execute one
program scan time. If T
S
=0, PID
command wont be activated.
+1:
Propotional gain (K
P
) 0~30,000(%)
+2:
Integral gain (K
I
) 0~30,000(%)
+3:
Differential gain (K
D
) 0~30,000(%)
When setting exceeds 30,000,
setting will be regarded as 30,000.
+4:
Control method (Dir) 0: normal control
1: Forward control (E=SV-PV)
2: Inverse control (E=PV-SV)
+5:
The range that Error
value (E) doesnt
work
0~32,767
For example: if the range of error
value (E) is 5, output value MV of E
between 5~5 is 0.
+6:
Upper bound of
saturated output (MV)
-32,768~32,767
For example: if upper bound is set
to 1000 and once output (MV) is
larger than 1000, it will output 1000.
(upper bound should larger than
lower bound, i.e. S
3
+6 > S
3
+7.)
+7:
Lower bound of
saturated output (MV)
-32,768~32,767
For example: if lower bound is set
to 1000, once output (MV) is less
than 1000, it will output 1000.


7 Application Commands API 50-99

DVP-PLC Application Manual

7-102

Device No. Function Setting range Explanation
+8:
Upper bound of
saturated integration
-32,768~32,767
For example: if upper bound is
set to 1000 and once output is
larger than 1000, it will output
1000 and doesnt integrate.
(upper bound should larger than
lower bound, i.e. S
3
+8 > S
3
+9.)
+9:
Lower bound of
saturated integration
-32,768~32,767
For example: if lower bound is set
to 1000, once output is less
than 1000, it will output 1000
and doesnt integrate.
+10, 11:
Save accumulation
integral value
temporality
32-bit floating
point range
For example: It is accumulated
integration. It is usually for
reference but user can clear or
modify by requirement. (needs to
modify by 32-bit floating point)
+12:
Save previous PV
value temporality

For example: It is present
measured value and usually for
reference. But user can modify by
requirement.
+13:
~

+14:
For system use, please dont use it.


4 When parameter setting is out of setting range, it will be set to upper bound or lower
bound. But if operation method is out of range, it will be set to 0.
4 PID commands can be used in interrupt subroutine, step point and CJ command.
4 Max. range of sampling error time T
S
is - a scan time+1ms~+a scan time. If error
value has influence on output, please keep the scan time fixable or execute PID
command in interrupt subroutine of timer.
4 If the settings of sampling time T
S
a scan time, CPU will have error code K6740
(PID operation error). At this time, CPU will reset T
S
= a scan time to execute PID
operand. In this situation, please execute PID command in time interrupt subroutine
(I6~I8).
4 The present measured value (PV) must be a stable value before the execution of PID
command. If using input value of DVP-04AD / DVP-04XA / DVP-04PT / DVP-04TC
these modules to perform the PID calculation, please pay attention to the A/D
conversion time of the above-mentioned modules.
4 32-bit command occupies 21 registers. If parameter setting area of PID
command that designated by is D100~D120, it needs to use MOV command to
send setting to designated registers before executing PID command.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-103

4 Parameter table of 32-bit :
Device No. Function Setting range Explanation
:
Sampling time (T
S
)
(unit: 10ms)
1~2,000
(unit: 10ms)
If T
S
is less than one program
scan time, PID command will
execute one program scan time.
If T
S
=0, PID command wont be
activated.
+1:
Propotion gain (K
P
) 0~30,000(%)
+2:
Integration gain (K
I
) 0~30,000(%)
+3:
Differential gain (K
D
) 0~30,000(%)
When setting exceeds 30,000,
setting will be regarded as
30,000.
+4:
Control method (Dir) 0: normal control
1: Forward control (SVPV)
2: Inverse control (PVSV)
+5, 6:
The range that
32-bit Error value (E)
doesnt work
0~2,147,483,647
For example: if the range of
error value (E) is 5, output value
MV of E between 5~5 is 0.
+7, 8:
Upper bound of
32-bit saturated
output (MV)
-2,147,483,648~
2,147,483,647
For example: if upper bound is
set to 1000 and once output
(MV) is larger than 1000, it will
output 1000. (upper bound
should larger than lower bound,
i.e. S
3
+7, 8 > S
3
+9, 10.)
+9, 10:
Lower bound of
32-bit saturated
output (MV)
-2,147,483,648~
2,147,483,647
For example: if lower bound is
set to 1000, once output (MV)
is less than 1000, it will
output 1000.
+11, 12:
Upper bound of
32-bit saturated
integrator
-2,147,483,648~
2,147,483,647
For example: if upper bound is
set to 1000 and once output is
larger than 1000, it will output
1000 and doesnt integrate.
(upper bound should larger than
lower bound, i.e. S
3
+11, 12 >
S
3
+13, 14.)
+13, 14:
Lower bound of
32-bit saturated
integrator
-2,147,483,648~
2,147,483,647
For example: if lower bound is
set to 1000, once output is less
than 1000, it will output 1000
and doesnt integrate.
+15, 16:
32-bit temporary
accumulation integral
value
32-bit floating
point range
For example: It is accumulated
integration. It is usually for
reference but user can clear or
modify by requirement. (needs
to modify by 32-bit floating
point)
+17, 18:
32-bit save previous
PV temporality

For example: It is previous test
value and usually for reference.
But user can modify by
requirement.
+19:
~

+20:
For system uses, please dont use it.
4
Explanation of 32-bit and 16-bit are almost the same. The different is
that capacity of +5 ~ +20.

7 Application Commands API 50-99

DVP-PLC Application Manual

7-104
PID
Equations

4 This command executes PID calculation according to speed and differential type of
measured value.
4 PID operation has three control methods: normal, forward and inverse controls. The
control method is set by +4. Besides, the settings that have relation to PID
operation is set by ~ +5.
4 PID equations:
( ) ( ) ( )S t PV K
S
t E K t E K MV
D I P
*
1
* * + + =
Control Method PID Equations
Forward control, normal
control

( ) PV SV t E =
Inverse control

( ) SV PV t E =
Besides, ( )S t PV means the differential value of ( ) t PV and
( )
S
t E
1
means the
integral value of ( ) t E .
You can know that this command is different from general PID command from above
equation. The difference is the change on differential usage. To avoid transient
differential value is too large when executing general PID command at the first time, this
command willl lower output (MV) value once the change of present measured value (PV)
is too large by monitoring differential value of present measured value (PV).
4 Symbols explanation:
MV : Output value
P
K

: Porprotional gain
( ) t E :
Error value. Forward control ( ) PV SV t E = , Inverse control
( ) SV PV t E =
PV : Present measured value
SV : Target value
D
K : Differential gain
( )S t PV :
Differential value of
( ) t PV

I
K : Integral gain
( )
S
t E
1

: Integral value of ( ) t E

7 Application Commands API 50-99

DVP-PLC Application Manual

7-105

4 Control diagram:
G(s)
S
1/S K
I
K
P
K
D
+
+
+
+
In dotted-line is PID command


4 Note and suggestion:
1. When adjusting three major parameters, KP, KI and KD, please adjust KP first (set
by experience) and set 0 to KI and KD. When adjusting to control, adjust KI (order
from small to big) and KD (order from small to big). Refer to example 4 for adjusting.
If KP=100, it means 100%. When KP is less than 100%, error value will attenuate
and when KP is more than 100%, error value will amplify.

2. This command should be controlled with many parameters. Please follow setting
rule to avoid error occurs.

Example 1: block diagram for using PID command to control position (control method
S
3
+4 should be set to 0)

PID
MV
Encoder
PV
Position command
(SV) Plant

Example 2: block diagram for using PID command to control speed (control method
S
3
+4 should be set to 0)

7 Application Commands API 50-99

DVP-PLC Application Manual

7-106
PID
S+MV
AC drive
speed
detection
equipment (P)
actual accel/decel
speed (PV=S-P)
Accel/Decel
command (SV)
speed command
(S)
Accel/Decel
output (MV)

Example 3: block diagram for using PID command to control temperature (action
direction S
3
+4 should be set to 1)

temperature
command (SV)
PID
add temperature
(MV)
heater
equipment
temperature
detection
equipment
actual temperature(PV)


Example 4: suggested steps of PID adjustment
Consider that transfer function of plant
( )
a s
b
s G
+
=
(most general AC drive model is this
function) in control system, command value SV is 1 and sampling time Ts is 10ms.
Suggested steps are in the following:

Step1: set K
I
and K
D
to 0 first, then set K
P
to 5, 10, 20 and 40 in order and record (SV)
and (PV) state. The result will be shown as following figure.
1.5
1
0.5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
K =40
P
K =20
P
K =10
P
SV=1
K =5
P
Time (sec)




7 Application Commands API 50-99

DVP-PLC Application Manual

7-107
Step 2: In above figure, we will choose the situation when K
P
is 10. The reason is in the
following:
When K
P
is 40, response has overshoot situation. So we wont use it.
When K
P
is 20, PV response is close to SV and wont have overshoot but transient MV
will be great due to start-up too fast. We also wont use it.
When K
P
is 10, PV response is close to SV and is smooth. So we consider to use it.
When K
P
is 5, the response is too slow. So we wont use it.

Example 3: When deciding to use the curve K
P
=10, arrange K
I
in order

from small to big
(such as 1, 2, 4, 8) and not to large than K
P
. Then arrange K
D
in order

from small to big
(such as 0.01, 0.05, 0.1 and 0.2) and not to exceed 10% K
P
. Finally, you can get
following PV and SV relation figure.
1.5
1
0.5
0
0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1
PV=SV
K =10,K =8,K =0.2
P I D
Time (sec)

Note: This example is only for reference. Therefore, user should adjust suitable control
parameters by himself according to real control system.

Applications

4 Application 1: using PID command in pressure control system. (use block diagram of
example 1)
Control destination: make control system reach pressure target value.
Control characteristics: this system should reach to control destination step by step,
therefore, it may cause system out of control or overload if reaching control destination
too fast.
Recommend solve method:
Method 1: reach by using long sampling time.
Method 2: reach by using delay command and its control block diagram is shown in the
following.
7 Application Commands API 50-99

DVP-PLC Application Manual

7-108

4
PID
MV
D5
SV
PV
D1
D1110
0
511
0
511
0V
10V
0rpm
rpm
3000
D1116
0
255
0V
5V
AC
Drive
pressure
command
value (D0)
pressure
command
delay
A
wave
B
wave
MV
convert
to
speed
speed
convert
to
voltage
voltage
convert
to
command
value
pressure
meter

280
0
0
280
250
200
150
100
50
t t
command
value
command
value
A wave B wave
D2 is command interval value
D3 is command interval time
user can adjust by require

Program application of command delay is in the following:
M1002
MOV K10 D3
M10
M0
TMR T0 D3
T0
RST T0
MOV K50 D2 D1 D0 >
MOV K-50 D2 D1 D0 <
MOV K0 D2 D1 D0 =
ADD D2 D1 D1
CMP D2 K0 M10
D0 D1 < MOV D0 D1
M12
D0 D1 > MOV D0 D1
M0
PID D1 D1116 D10 D5

7 Application Commands API 50-99

DVP-PLC Application Manual

7-109
4 Application 2: speed control and pressure control system is controlled separately. (use
block diagram of example 2)
Control destination: Adding pressure control system (PID command) after using open
loop to control speed for a period time to reach pressure control.
Control characteristics: This architecture should use open loop to reach speed control
and then reach control target by close loop pressure control due to there is no relation
between speed and pressure of these two systems. Besides, you can add command
delay function of application 1 to avoid control command of pressure control system
changes too fast. Control block diagram is shown in the following.
D40
0
255
0rpm
3000rpm
D30
D32 D1116
D31
+
+
M3 M2=ON
PID
PV
MV D5
D1
SV
D0
D1110
M0=ON
M1=ON
Speed
command
speed
convert
to
voltage
AC
drive
MV
convert to
accel/decel
pressure
command
delay
function
(optional)
pressure
meter

Partial program application is in the following:
7 Application Commands API 50-99

DVP-PLC Application Manual

7-110
M1
MOV K0 D5
M3
MOV D40 D30
M2
MOV K3000 D32 K3000 D32 >
MOV K0 D32 K0 D32 <
ADD D30 D31 D32
MOV D32 D1116
M1
PID D1 D1110 D10 D5
M1002
MOV K1000 D40
M0
MOV D0 D1
DIV D32 K11 D32
MOV K255 D32 K255 D32 >

8 Application Commands API 100-149
DVP-PLC Application Manual 8-1
API

Applicable models
ES EP EH
100


MODRD


MODBUS Data Read


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

n
Note: Operand S
1
available range: K0~K255
Operand n available range: K1nK6
Refer to each model specification for usage range.

16-bit command (7 STEPS)
MODRD
Continuous
execution


32-bit command

Flag: M1120~M1131, M1140~M1143
Please refer to the footnote of API 80 RS
command

Command
Explanation


: Communication address. : Address for reading data : Read data
length.
MODRD is a specific command for the MODBUS ASCII mode and RTU mode
communication. The RS-485 communication build-in Delta VFD series drives (except
VFD-A series) all have MODBUS communication. Therefore, MODRD command can be
used to read communication data from Delta VFD series AC drives. Please refer to the
Delta VFD series manual for more details.
is the address for reading data. If the address setting is illegal, the user will be
informed by an error message. The error code will be stored in D1130, while M1141 turn
to be ON.
The feedback (return) data from peripheral equipment will be stored in D1070 to D1085.
After receiving the feedback (return) data completed, PLC will check if all feedback
(return) data are correct. If there is an error, then M1140 will be ON.
If using ASCII mode, PLC will convert the data to value and store them in D1050 to
D1055 because the feedback (return) data are all ASCII characters. D1050 to D1055 will
be invalid if using RTU mode.
After M1140 or M1141 is On, a correct data will be transmit to peripheral equipment
again. If the feedback (return) data are all correct, then the flag M1140, M1141 will be
clear.
Program
Example
1

Communication between PLC and VFD-S series AC drives (ASCII Mode, M1143=Off)
MOV D1120 H87
M1002
SET M1120
MOV D1129 K100
M1127
RST M1127
receiving
completed
Setting communication
protocol 9600, 8, E, 1
Communication
protocol latched
Setting communication
time out 100ms
Process of receiving data
receiving completed and flag reset
SET M1122 Setting transmission flag
X1
X0
MODRD K1 H2101 K6
Setting communication command:
device address 01
data address H2101
data length 6 words
PLC will convert the receiving data stored
in D1070~D1085 from ASCII character to
value and store the value in D1050~D1055.

8 Application Commands API 100-149
DVP-PLC Application Manual 8-2
PLC VFD-S, PLC transmitting: 01 03 2101 0006 D4
VFD-S PLC , PLC receiving: 01 03 0C 0100 1766 0000 0000 0136 0000 3B
PLC transmitting data register (transmitting messages)
Register DATA
D1089 low 0 30 H ADR 1
D1089 high 1 31 H ADR 0
ADR (1,0) is AC drive
address
D1090 low 0 30 H CMD 1
D1090 high 3 33 H CMD 0
CMD (1,0) is command
code
D1091 low 2 32 H
D1091 high 1 31 H
D1092 low 0 30 H
D1092 high 1 31 H
Starting data address
D1093 low 0 30 H
D1093 high 0 30 H
D1094 low 0 30 H
D1094 high 6 36 H
Number of data (count by word)
D1095 low D 44 H LRC CHK 1
D1095 high 4 34 H LRC CHK 0
LRC CHK (0,1) is error
check code
PLC receiving data register (response messages)
Register DATA
D1070 low 0 30 H ADR 1
D1070 high 1 31 H ADR 0
D1071 low 0 30 H CMD 1
D1071 high 3 33 H CMD 0
D1072 low 0 30 H
D1072 high C 43 H
Number of data (count by byte)
D1073 low 0 30 H
D1073 high 1 31 H
D1074 low 0 30 H
D1074 high 0 30 H
Content of
address 2101 H
PLC automatically convert
ASCII codes to value and
store the converted value in
D1050 = 0100 H
D1075 low 1 31 H
D1075 high 7 37 H
D1076 low 6 36 H
D1076 high 6 36 H
Content of
address 2102 H
PLC automatically convert
ASCII codes to value and
store the converted value in
D1051 = 1766 H
D1077 low 0 30 H
D1077 high 0 30 H
D1078 low 0 30 H
D1078 high 0 30 H
Content of
address 2103 H
PLC automatically convert
ASCII codes to value and
store the converted value in
D1052 = 0000 H
D1079 low 0 30 H
D1079 high 0 30 H
D1080 low 0 30 H
D1080 high 0 30 H
Content of
address 2104 H
PLC automatically convert
ASCII codes to value and
store the converted value in
D1053 = 0000 H
D1081 low 0 30 H
D1081 high 1 31 H
D1082 low 3 33 H
D1082 high 6 36 H
Content of
address 2105 H
PLC automatically convert
ASCII codes to value and
store the converted value in
D1054 = 0136 H
D1083 low 0 30 H
D1083 high 0 30 H
D1084 low 0 30 H
D1084 high 0 30 H
Content of
address 2106 H
PLC automatically convert
ASCII codes to value and
store the converted value in
D1055 = 0000 H
D1085 low 3 33 H LRC CHK 1
D1085 high B 42 H LRC CHK 0
8 Application Commands API 100-149
DVP-PLC Application Manual 8-3
Program
Example
2

Communication between PLC and VFD-S series AC drives (RTU Mode, M1143=On)
MOV D1120 H83
M1002
SET M1120
MOV D1129 K100
M1127
RST M1127
receiving
completed
Setting communication
protocol 9600, 8, E, 1
Communication
protocol latched
Setting communication
time out 100ms
Process of receiving data
receiving completed
and flag reset
SET M1122 Setting transmission flag
X1
The receiving data in HEX value
format is stored in D1070~D1085.
SET M1143 Setting as RTU mode
X0
MODRD K1 H2102
Setting communication command:
device address 01
data address H2102
data length 2 words
K2

PLC VFD-S, PLC transmitting: 01 03 2102 0002 6F F7
VFD-S PLC, PLC receiving: 01 03 04 1700 0000 FE 5C
PLC transmitting data register (transmitting messages)
Register DATA
D1089 low 01 H Address
D1090 low 03 H Function
D1091 low 21 H
D1092 low 02 H
Starting data address
D1093 low 00 H
D1094 low 02 H
Number of data (count by word)
D1095 low 6F H CRC CHK Low
D1096 low F7 H CRC CHK High
PLC receiving data register (response messages)
Register DATA
D1070 low 01 H Address
D1071 low 03 H Function
D1072 low 04 H Number of data (count by byte)
D1073 low 17 H
D1074 low 70 H
Content of address 2102 H
D1075 low 00 H
D1076 low 00 H
Content of address 2103 H
D1077 low FE H CRC CHK Low
D1078 low 5C H CRC CHK High
Program
Example
3

PLC connects to VFD-S series AC drive (ASCII Mode, M1143=Off). When
communication is time-out, retry when error occurs during receiving data or sending
address.
When X0=On, read data from address H2100 of device 01 (VFD-S) and save in
D1070~D1085 with ASCII format. PLC will auto convert its content to numeral to save in
D1050~D1055.

8 Application Commands API 100-149
DVP-PLC Application Manual 8-4
Flag M1129 will be On when communication is time-out and program will send request
from M1129 and ask M1122 to read again.
Flag M1140 will be On when receive error and program will send request from M1140
and ask M1122 to read again.
Flag M1141 will be On when received address error and program will send request from
M1141 and ask M1122 to read again.

M1002
MOV H87 D1120
SET M1120
SET M1122
MOV K100 D1129
RST M1127
M1127
X0
MODRW K1 H2100 K 6
X0
M1129
M1140
M1141
RST M1129
Setting communication protocol
to 9600, 8, E, 1
Communication protocol latched
Setting communication
time-out to 100ms
Setting communication command:
device address 01,
data address

H2101
data length 6 words
Setting transmission request
Communication time-out Retry
data receive error Retry
sending address error Retry
receiving completed
handle received data
The receiving data in ASCII
format stored in D1070-D1085.
PLC will convert to numeral
and save into D1050-D1055
automatically.
receiving completed and
flag reset
communication time-out and flag reset

Footnote

Rising-edge contact (LDP, ANDP, ORP) and falling-edge contact (LDF, ANDF, ORF)
cant be used before API 100 MODRD, API 105 RDST, API 150 MODRW (FUNCTION
CODE H03) these three commands. Otherwise, the data stored in received register will
be incorrect.








8 Application Commands API 100-149
DVP-PLC Application Manual 8-5
API

Applicable models
ES EP EH
101


MODWR


MODBUS Data Write In


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

n
Note: Operand S
1
available range: K0~K255
Refer to each model specification for usage range.

16-bit command (7 STEPS)
MODWR
Continuous
execution


32-bit command

Flag: M1120~M1131, M1140~M1143
Please refer to the footnote of API 80 RS
command

Command
Explanation


: Communication address, K0~K255 : Address for writing data :
Write data
MODWR is a specific command for the MODBUS ASCII mode and RTU mode
communication. The RS-485 communication build-in Delta VFD series drives (except
VFD-A series) all have MODBUS communication. Therefore, MODWR command can
be used to read communication data from Delta VFD series AC drives. Please refer to
the Delta VFD series manual for more details.
is the address for reading data. If the address setting is illegal, the user will be
informed by an error message. The error code will be stored in D1130, while M1141
turn to be ON. For example, 4000H is an illegal address to VFD-S, then M1141 will turn
ON, D1130=2. For the information of error codes, please refer to VFD-S series user
manual.
The feedback (return) data from peripheral equipment will be stored in D1070 to
D1076. After receiving the feedback (return) data completed, PLC will check if all
feedback (return) data are correct. If there is an error, then M1140 will be ON.
After M1140 or M1141 is On, a correct data will be transmit to peripheral equipment
again. If the feedback (return) data are all correct, then the flag M1140, M1141 will be
clear.
Program
Example
1

Communication between PLC and VFD-S series AC drives (ASCII Mode, M1143= Off)
MOV D1120 H87
M1002
SET M1120
SET M1122
MOV D1129 K100
X0
M1123
RST M1123
MODRW K1 H0100 H1770
receiving
completed
Setting communication
protocol 9600, 8, E, 1
Communication
protocol latched
Setting communication
time out 100ms
Setting transmission flag
Process of receiving data
receiving completed
and flag reset
X1
Setting communication command:
device address 01
data address H0100
data H1770
The receiving data in ASCII character
format is stored in D1070~D1085

8 Application Commands API 100-149
DVP-PLC Application Manual 8-6
PLC VFD-B, PLC transmitting: 01 06 0100 1770 71
VFD-B PLC, PLC receiving: 01 06 0100 1770 71
PLC transmitting data register (transmitting messages)
Register DATA
D1089 low 0 30 H ADR 1
D1089 high 1 31 H ADR 0
ADR (1,0) is AC drive
address
D1090 low 0 30 H CMD 1
D1090 high 6 36 H CMD 0
CMD (1,0) is command code
D1091 low 0 30 H
D1091 high 1 31 H
D1092 low 0 30 H
D1092 high 0 30 H
Data address
D1093 low 1 31 H
D1093 high 7 37 H
D1094 low 7 37 H
D1094 high 0 30 H
Data contents
D1095 low 7 37 H LRC CHK 1
D1095 high 1 31 H LRC CHK 0
LRC CHK (0,1) is error
check code
PLC receiving data register (response messages)
Register DATA
D1070 low 0 30 H ADR 1
D1070 high 1 31 H ADR 0
D1071 low 0 30 H CMD 1
D1071 high 6 36 H CMD 0
D1072 low 0 30 H
D1072 high 1 31 H
D1073 low 0 30 H
D1073 high 0 30 H
Data address
D1074 low 1 31 H
D1074 high 7 37 H
D1075 low 7 37 H
D1075 high 0 30 H
Data content
D1076 low 7 37 H LRC CHK 1
D1076 high 1 31 H LRC CHK 0
Program
Example
2

Communication between PLC and VFD-S series AC drives (RTU Mode, M1143=On)
MOV D1120 H87
M1002
SET M1120
SET M1122
MOV D1129 K100
M1123
RST M1123
receiving
completed
Setting communication
protocol 9600, 8, E, 1
Communication
protocol latched
Setting communication
time out 100ms
Setting transmission flag
Process of receiving data
receiving completed
and flag reset
X1
The receiving data in HEX value
format is stored in D1070~D1085.
SET M1143 Setting as RTU mode
X0
MODRW K1 H2000
Setting communication command:
device address 01
data address H2000
write in data H12
H12

8 Application Commands API 100-149
DVP-PLC Application Manual 8-7

PLC VFD-S, PLC transmitting: 01 06 2000 0012 02 07
VFD-S PLC, PLC receiving: 01 06 2000 0012 02 07
PLC transmitting data register (transmitting messages)
Register DATA
D1089 low 01 H Address
D1090 low 06 H Function
D1091 low 20 H
D1092 low 00 H
Data address
D1093 low 00 H
D1094 low 12 H
Data content
D1095 low 02 H CRC CHK Low
D1096 low 07 H CRC CHK High
PLC receiving data register (response messages)
Register DATA
D1070 low 01 H Address
D1071 low 06 H Function
D1072 low 20 H
D1073 low 00 H
Data address
D1074 low 00 H
D1075 low 12 H
Data content
D1076 low 02 H CRC CHK Low
D1077 low 07 H CRC CHK High
Program
Example
3

PLC connects to VFD-S series AC drive (ASCII Mode, M1143=Off). When
communication is time-out, retry when error occurs during receiving data or sending
address.
When X0=On, PLC will write data H1770(K6000) into address H0100 of device 01
(VFD-S).
Flag M1129 will be On when communication is time-out and program will send request
from M1129 and ask M1122 to read again.
Flag M1140 will be On when receive error and program will send request from M1140
and ask M1122 to read again.
Flag M1141 will be On when received address error and program will send request from
M1141 and ask M1122 to read again.
8 Application Commands API 100-149
DVP-PLC Application Manual 8-8
M1002
MOV H87 D1120
SET M1120
SET M1122
MOV K100 D1129
RST M1123
M1123
X0
MODRW K1 H0100 H1770
X0
M1129
M1140
M1141
RST M1129
Setting communication protocol
to 9600, 8, E, 1
Communication protocol latched
Setting communication
time-out to 100ms
Setting communication command:
device address 01,
data address

H0100
data H1770
Setting transmission request
Communication time-out Retry
data receive error Retry
sending address error Retry
receiving completed
handle received data
The receiving data in ASCII
format stored in D1070-D1085.
receiving completed and
flag reset
communication time-out and flag reset

Footnote

For detail information of the related flags and special registers, please refer to the
footnote of API 80 RS command.
If using rising-edge (LDP, ANDP, ORP)/falling-edge (LDF, ANDF, ORF) before API 101
MODWR and API 150 MODRW (Function Code H06 and H10), it needs to start
transmission request M1122 to act correct.

API

Applicable models
ES EP EH
102


FWD


VFD-A Series Drive Forward
Command


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

n
Note: Operand S
1
available range: K0~K31
Operand n available range: n=K1or K2
Refer to each model specification for usage range.

16-bit command (7 STEPS)
FWD
Continuous
execution


32-bit command

Flag: M1120~M1131, M1140~M1143
Please refer to the footnote of API 80 RS
command


8 Application Commands API 100-149
DVP-PLC Application Manual 8-9
API

Applicable models
ES EP EH
103


REV


VFD-A Series Drive Reverse
Command


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

n
Note: Operand S
1
available range: K0~K31
Operand n available range: n=K1or K2
Refer to each model specification for usage range.

16-bit command (7 STEPS)
REV
Continuous
execution


32-bit command

Flag: M1120~M1131, M1140~M1143
Please refer to the footnote of API 80 RS
command

API

Applicable models
ES EP EH
104


STOP


VFD-A Series Drive Stop
Command


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

n
Note: Operand S
1
available range: K0~K31
Operand n available range: n=K1or K2
Refer to each model specification for usage range.

16-bit command (7 STEPS)
STOP
Continuous
execution


32-bit command

Flag: M1120~M1131, M1140~M1143
Please refer to the footnote of API 80 RS
command.

Command
Explanation


: Communication address. : AC drive master frequency. :
Command object.
FWD/REV/STOP are communication commands for Delta A/H series drive, make sure
to use the communication overtime setting (D1129) when applying these commands.
indicates AC drive master frequency. AC drive master frequency setting for
VFD-A series, K0000 to K4000, represents 0.0Hz to 400.0Hz. For H series AC drive,
the setting of K0000 to K1500 represent 0Hz to 1500Hz.
command object, n=1 is for one drive. n=2 communicates to all drives
connected.
The feedback (return) data from perpherial equipment will be stored in D1070 to
D1080. After receiving the feedback (return) data completed, PLC will check if all
feedback (return) data are correct. If there is an error, then M1142 will be ON. If n = 2,
PLC will not receive the data.
8 Application Commands API 100-149
DVP-PLC Application Manual 8-10
Program
Example

Communication between PLC and VFD-A series AC drives, retry for communication
time-out and received data error.
receiving completed
Setting communication
protocol 4800, 8, O, 1
Communication protocol latched
Setting communication
time-out 100ms
Setting transmission flag
Setting communication command:
device address 0
frequency setting is 500Hz
K1 is the AC drive for
designated address
The receiving data in ASCII character
format is stored in D1070~D1085
M1002
MOV H0073 D1120
SET M1120
SET M1122
MOV K100 D1129
RST M1123
M1123
X0
FWD K0 K500 K1
M1129
M1142
X0
Process of receiving data
receiving completed and flag reset
communication time-out Retry
received data error Retry
PLC VFD-A, PLC transmitting: C 0001 0500
VFD-A PLC, PLC receiving: C 0001 0500
PLC transmitting data register (transmitting messages)
Register DATA
D1089 low C 43 H Command starting word
D1090 low 03 H Check sum
D1091 low 01 H Command object
D1092 low 0 30 H
D1093 low 0 30 H
D1094 low 0 30 H
D1095 low 1 31 H
Communication address
D1096 low 0 30 H
D1097 low 5 35 H
D1098 low 0 30 H
D1099 low 0 30 H
Operation command
PLC receiving data register (response messages)

Register DATA
D1070 low C 43 H Command starting word
D1071 low 03 H Check sum
D1072 low 06 H
Reply authorization (correct: 06H,
error: 07 H)
D1073 low 0 30 H
D1074 low 0 30 H
D1075 low 0 30 H
D1076 low 1 31 H
Communication address
D1077 low 0 30 H
D1078 low 5 35 H
D1079 low 0 30 H
D1080 low 0 30 H
Operation command




8 Application Commands API 100-149
DVP-PLC Application Manual 8-11
API

Applicable models
ES EP EH
105


RDST


VFD-A Series Drive Status Read


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

n
Note: Operand S
1
available range: K0~K31
Operand n available range: n=K0~ K3
Refer to each model specification for usage range.

16-bit command (5 STEPS)
RDST
Continuous
execution


32-bit command

Flag: M1120~M1131, M1140~M1143
Please refer to the footnote of API 80 RS
command

Command
Explanation

: Communication address, K0~K31 : Status object
RDST is a specific communication convenience command for Delta VFD-A series AC
drives and used to read the execution status of AC drive.

: Status object
n = 0 Frequency command n = 2 Output current
n = 1 Output frequency n = 3 Operation command
The feedback (return) data stored in the low byte of address D1070 to D1080 are total
11 words (please refer to VFD-A series manual).
Q, S, B, Uu, Nn, ABCD
feedback
(return)
Explanation Data storage
Q Starting word: Q (51H). D1070 low
S Checksum code: 03H. D0171 low
B Command authorization. correct: 06H, error: 07H. D1072 low
U D1073 low
u
Communication address (address: 00~31). Uu =
(00~31) indicated by ASCII. D1074 low
N D1075 low
n
Status object (00~03).Nn = (00~03) indicated by ASCII.
D1076 low
A D1077 low
B D1078 low
C D1079 low
D
Status data. The content of ABCD will be different
according to the status objects (00~03). 00~03 indicate
frequency, current and operation mode respectively.
Please refer to the explanation shown below for details.
D1080 low
Nn = 00 Frequency command = ABC.DHz
Nn = 01 Output command = ABC.DHz
Nn = 02 Output current = ABC.DA

PLC will automatically convert ASCII word of ABCD to value and store
the value in D1050. For example, if ABCD = 0600, PLC will
automatically convert ASCII word to the value of K0600 (0258 H) and store
it in the special register in D1050.
Nn = 03 Operation command
8 Application Commands API 100-149
DVP-PLC Application Manual 8-12

A = 0 Stop, 5 JOG(FWD)
1 FWD operation, 6 JOG(REV)
2 Stop, 7 JOG(REV)
3 REV operation, 8 Abnormal


4 JOG(FWD),

PLC will automatically convert ASCII word of A to value and
store the value in D1051. For example, if A = 3, PLC will
automatically convert ASCII word to the value of K0003 (03 H)
and store it in the special register in D1051.
B = b7 b6 b5 b4 Operation command source
0 0 0 0 Digital keypad
0 0 0 1 1
st
Step Speed
0 0 1 0 2
nd
Step Speed
0 0 1 1 3
rd
Step Speed
0 1 0 0 4
th
Step Speed
0 1 0 1 5
th
Step Speed
0 1 1 0 6
th
Step Speed
0 1 1 1 7
th
Step Speed
1 0 0 0 JOG frequency
1 0 0 1 Analog signal frequency command
1 0 1 0 RS-485 communication interface
1 0 1 1 Up/Down control
b3 = 0 No DC braking stop 1 DC braking stop
b2 = 0 No braking startup 1 DC braking startup
b1 = 0 FWD, 1 REV
b0 = 0 Stop, 1 Operation


PLC will store the value of B in special auxiliary relays
M1168(b0)~M1175(b7)
CD = 00 No abnormal record 10 OcA
01 oc 11 Ocd
02 ov 12 Ocn
03 oH 13 GFF
04 oL 14 Lv
05 oL1 15 Lv1
06 EF 16 cF2
07 cF1 17 bb
08 cF3 18 oL2
09 HPF 19


PLC will automatically convert ASCII word of CD to value and
store the value in D1052. For example, if CD = 06, PLC will
automatically convert ASCII word to the value of 0006 H and
store it in the special register in D1052.

Footnote

Rising-edge contact (LDP, ANDP, ORP) and falling-edge contact (LDF, ANDF, ORF)
before API 100 MODRD, API 105 RDST, API 150 MODRW (FUNCTION CODE 03)
these three commands. Otherwise, the data stored in received register will be incorrect.












8 Application Commands API 100-149
DVP-PLC Application Manual 8-13
API

Applicable models
ES EP EH
106


RSTEF


VFD-A Series Drive Abnormal Reset


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

n
Note: Operand S
1
available range: K0~K31
Operand n available range: n=K1 or K2
Refer to each model specification for usage range.

16-bit command (5 STEPS)
RSTEF
Continuous
execution


32-bit command

Flag: M1120~M1131, M1140~M1143
Please refer to the footnote of API 80 RS
command.

Command
Explanation


: Communication address. : Command object.
RSTEF is a specific communication convenience command for Delta VFD-A series AC
drives and used to reset the AC drive after an abnormal execution.
: Command object, n=1 is for one drive. n=2 communicates to all drives
connected.
The feedback (return) data from peripheral equipment will be stored in D1070 to
D1089. If n = 2, there is no feedback (return) data.
Rising-edge contact (LDP, ANDP, ORP) and falling-edge contact (LDF, ANDF,
ORF)before API 100 MODRD, API 105 RDST, API 150 MODRW (FUNCTION CODE
H03) these three commands. Otherwise, the data stored in received register will be
incorrect.
Footnote

For detail information of the related flags and special registers, please refer to the
footnote of API 80 RS command.

API

Applicable models
ES EP EH
107


LRC
P

LRC Error Check


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


n
D
Note: Refer to each model specification for usage range.
ES series models do not support this command (LRC,
LRCP)

16-bit command (7 STEPS)
LRC
Continuous
execution
LRCP
Pulse
execution

32-bit command

Flag: M1161 8/16-bit mode setting

8 Application Commands API 100-149
DVP-PLC Application Manual 8-14
Command
Explanation


: Starting device for the operation of sum check (ASCII mode) : Operand
numbers : Starting device for storing the operation result. LRC check: please
refer to the footnote.
: operand numbers should be even and range is from K1~K256. If it is out of
range, error will be occurred and commond wont be executed. At this time, M1067 and
M1068 will be On and error code 0E1A will be record in D1067.
16-bit conversion mode: When M1161=Off, hexadecimal data that start from the source
devcie will be divided into upper 8-bit and lower 8-bit and perform the operation
of LRC command on numbers. Then, store the result into upper and lower 8-bit
of device .
8-bit conversion mode: When M1161=On, divide hexadecimal data that start from the
source devcie into upper 8-bit (invalid data) and lower 8-bit and perform the
operation of LRC command on numbers. Then, store the result into lower 8-bit
of device and it will use two resisters (upper 8-bit of all be zero (0)).
Program
Example

Communication between PLC and VFD-B series AC drives (ASCII Mode, M1143= Off),
(8-bit Mode, M1161=On), writing transmitting data in advance to read six data from
VFD-B parameter address H2101.
MOV D1120 H86
M1002
SET M1120
SET M1122
MOV D1129 K100
X10
M1123
RST M1123
RS D100 K17 D120 K35
transmission
request
pulse
receiving
completed
Setting communication
protocol 9600, 7, E, 1
Communication protocol latched
Setting communication
time out 100ms
write transmitting data
in advance
sending request
Process of receiving data
receiving completed
and flag reset

PLC VFD-B, PLC transmitting: : 01 03 2101 0006 D4 CR LF
PLC transmitting data register (transmitting messages)
Register DATA
D100 low : 3A H STX
D101 low 0 30 H ADR 1
D102 low 1 31 H ADR 0
ADR (1,0) is AC drive
address
D103 low 0 30 H CMD 1
D104 low 3 33 H CMD 0
CMD (1,0) is command
code
D105 low 2 32 H
D106 low 1 31 H
D107 high 0 30 H
D108 low 1 31 H
Starting data address
D109 low 0 30 H
D110 low 0 30 H
D111 low 0 30 H
D112 low 6 36 H
Number of data (count by word)
8 Application Commands API 100-149
DVP-PLC Application Manual 8-15

Register DATA
D113 low D 44 H LRC CHK 1
D114 low 4 34 H LRC CHK 0
LRC CHK (0,1) is error
check code
D115 low CR A H
D116 low LF D H
END
The LRC CHK (0,1) above is error check code and it can be calculated by LRC command
(8-bit Mode, M1161=On).
M1000
LRC D101 K12 D113

LRC check: 01 H + 03 H + 21 H + 01 H + 00 H + 06 H = 2C H, then take the complementary
of 2, D4H. At the time, D(44 H) is stored in the lower 8-bit of D113 and 4 (34 H) is stored in
the lower 8-bit of D114.
Footnote

ASCII mode of communication data, the format is listed below:
STX : Start word = : (3AH)
Address Hi 0
Address Lo 1
Communication:
8-bit address consists of 2 ASCll codes
Function Hi 0
Function Lo 3
Function code:
8-bit function consists of 2 ASCll codes
2
1
0
2
0
0
0
DATA (n-1)
.
DATA 0
2
Data content:
n 8-bit data content consists of 2n ASCll
codes
LRC CHK Hi D
LRC CHK Lo 7
LRC check:
8-bit check sum consists of 2 ASCll codes
END Hi CR
END Lo LF
End word:
END Hi = CR (0DH), END Lo = LF(0AH)
Communication protocol is made of MODBUS ASCII (American Standard Code for
Information Interchange). Each byte consists of 2 ASCII characters.
LRC check is the added sum from Address to Data contents. For example, 01H +
03H + 21H + 02H + 00H + 02H = 29H, then take the complementary of 2, D7H.

API

Applicable models
ES EP EH
108


CRC
P

CRC Error Check


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


n
D
Note: Refer to each model specification for usage range.
ES series models do not support this command (CRC,
CRCP)

16-bit command (7 STEPS)
CRC
Continuous
execution
CRCP
Pulse
execution

32-bit command

Flag: M1161 8/16-bit mode setting
8 Application Commands API 100-149
DVP-PLC Application Manual 8-16
Command
Explanation


: Starting device for the operation of sum check (RTU mode) : Operand
numbers : Starting device for storing the operation result. CRC check: please
refer to the footnote.
: range is from K1~K256. If it is out of range, error will be occurred and commond
wont be executed. At this time, M1067 and M1068 will be On and error code 0E1A will
be record in D1067.
16-bit conversion mode: When M1161=Off, hexadecimal data that start from the source
devcie will be divided into high byte and low byte. To perform the operation of
CRC command on numbers and store the result into upper and lower 8-bit of
device .
8-bit conversion mode: When M1161=On, divide hexadecimal data that start from the
source devcie into high byte (invalid data) and low byte. To perform the
operation of CRC command on numbers and store the result into low byte of
device and it will use two resisters (upper 8-bit of all be zero (0)).
Program
Example

When PLC connects to VFD-S AC drive (RTU Mode, M1143=ON), (16-bit Mode,
M1161=ON), writing transmitting data, H12, in advance into VFD-S parameter address
H2000
MOV D1120 H87
M1002
SET M1120
SET M1122
MOV D1129 K100
X10
M1123
RST M1123
RS D100 K8 D120 K8
SET M1143
SET M1161
RTU Mode
8-bit Mode
receiving
completed
sending request
write transmitting data in advance
transmission
request
pulse
Setting communication
time out 100ms
Communication protocol latched
Setting communication
protocol 9600, 8, E, 1
Process of receiving data
receiving completed and flag reset

PLC VFD-S, PLC transmitting: 01 06 2000 0012 02 07

8 Application Commands API 100-149
DVP-PLC Application Manual 8-17

PLC transmitting data register (PLC transmitting messages)
Register DATA
D100 low 01 H Address
D101 low 06 H Function
D102 low 20 H
D103 low 00 H
Data address
D104 low 00 H
D105 low 12 H
Data content
D106 low 02 H CRC CHK 0
D107 low 07 H CRC CHK 1
The CRC CHK (0,1) above is error check code and it can be calculated by CRC command
(8-bit Mode, M1161=On).
M1000
CRC D100 K6 D106

CRC check: At the time, 02 H is stored in the lower 8-bit of D106 and 07 H is stored in the
lower 8-bit of D107.
Footnote

RTU mode of communication data, the format is listed below:
START Please refer to the following explanation
Address Communication address: 8-bit binary
Function Function code: 8-bit binary
DATA (n-1)
.
DATA 0
Data content:
n 8-bit data
CRC CHK Low
CRC CHK High
CRC check:
16-bit CRC check sum consists of 2 8-bit binary
END
Please refer to the following explanation
CRC check:
CRC check starts from Address and ends in Data content. CRC check starts from
Address and ends in Data content. Its calculation is as follows:
Step 1: Load the 16-bit register (the CRC register) with FFFFH.
Step 2: Exclusive OR the first 8-bit byte message command with the 16-bit CRC
register of the low byte, then store the result into the CRC register.
Step 3: Shift the CRC register one bit to the right and fill 0 in the higher bit.
Step 4: Check the value that shifts to the right. If it is 0, store the new value from
step 3 into the CRC register, otherwise, Exclusive OR A001H and the CRC
register, then store the result into the CRC register.
Step 5: Repeat step 3 and 4 and calculates the 8-bit.
Step 6: Repeat Steps 2~5 for the next 8-bit message command, till all the message
commands are processed. And finally, the obtained CRC register value is
the CRC check value. What should be noticed is that the CRC check must
be placed interchangeably in the check sum of the message command.


8 Application Commands API 100-149
DVP-PLC Application Manual 8-18
API

Applicable models
ES EP EH
109


SWRD
P

Digital Switch Read


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D


Note: Refer to each model specification for usage range.
ES series models do not support this command (SWRD,
SWRDP)

16-bit command (2 STEPS)
SWRD
Continuous
execution
SWRDP
Pulse
execution

32-bit command

Flag: M1104~M1111 Digital switch
status

Command
Explanation


: Device for storing read value
Store the value that read from digital switch function card into the low byte of .
Every digital switch has an associated BIT.
If executing this command without digital switch function card, there is no result and no
error message.
Program
Example

There are total 8 DIP switchs on the digital switch function card. After using SWRD
command to read value, these 8 switchs are in association with the contact M0 to M7.
M1000
SWRD K2M0
M0
Y0
M1
MOV K2M0 D0
M2
CNT C0 K10
M3
RST C0
M4
TMR T0 K100

M0 to M7 can be executed by using each contact command.
When END command is executed, the process of input will complete. REF (I/O)
refreshcommand will be invalid.
The min. read one time bits are 4 bits when SWRD command use the input data of
digital switch function card (i.e. K1Y* or K1M* or K1S*).
Footnote

When digital switch function card is inserted, 8 DIP switches correspond to
M1104~M1111 individually.


8 Application Commands API 100-149
DVP-PLC Application Manual 8-19
API

Applicable models
ES EP EH
110

D
ECMP
P

Binary Floating Point Comparison


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Operand D occupies 3 continuous devices.
Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DECMP, DECMPP are available.
ES series models do not support pulse execution
command (DECMPP)

16-bit command


32-bit command (13 STEPS)
DECMP
Continuous
execution
DECMPP
Pulse
execution
Flag: None

Command
Explanation

: Comparison value 1 of binary floating point : Comparison value 2 of
binary floating point : Comparison result, 3 continuous devices used.
The data of is compared to the data of and the result (, , ) is
showed by three bit devices in .
If the source operand or is indicated as constant K or H, the integer value
will automatically be converted to binary floating point to compare.
Program
Example

If the specified device is M10, M10~M12 will automatically be used.
When X0=On and execute DECMP command, one of M10~M12 will be On. When
X0=Off and not to execute DECMP command, M10~M12 will retain the state before X0=
Off.
Connect M10~M12 in series or in parallel and then the result of , , are given.
Please use RST or ZRST command to reset the result.
X0
DECMP D0 D100 M10
M10
M11
M12
It is On when (D1 D0)>(D101 D100) A A
It is On when (D1 D0)=(D101 D100) A A
It is On when (D1 D0)<(D101 D100) A A

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.









8 Application Commands API 100-149
DVP-PLC Application Manual 8-20
API

Applicable models
ES EP EH
111

D
EZCP
P

Binary Floating Point Zone
Comparison


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

S
D
Note: Operand D occupies 3 continuous devices.
Operand S
1
should be smaller than operand S
2
.
Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DEZCP, DEZCPP are available.
ES series models do not support pulse execution
command (DEZCPP).

16-bit command


32-bit command (17 STEPS)
DEZCP
Continuous
execution
DEZCPP
Pulse
execution
Flag: None

Command
Explanation

: Lower limit of binary floating point zone comparison : Upper limit of binary
floating point zone comparison : Comparison value of binary floating point
: Comparison result, 3 continuous devices used.
The data of is compared to the data range of ~ and the result (,
, ) is showed by three bit devices in .
If the source operand or is indicated as constant K or H, the integer value
will automatically be converted to binary floating point to compare.
When , will be used as upper and lower limit for the comarison.
Program
Example

If the specified device is M10, M10~M12 will automatically be used.
When X1=On and execute DEZCP command, one of M0~M2 will be On. When X1=Off
and not to execute EZCP command, M0~M2 will retain the state before X1= Off.
Please use RST or ZRST command to reset the result.
X0
DEZCP D0 D10 D20
M10
M11
M12
It is On when (D1 D0)>(D21 D20) A A
it is On when (D1 D0) (D21 D20)<(D11 D10) A < A A
It is On when (D21 D20)>(D11 D10) A A
M0

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.




8 Application Commands API 100-149
DVP-PLC Application Manual 8-21
API

Applicable models
ES EP EH
116

D
RAD
P

Degree Radian


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Refer to each model specification for usage range.
This command is only valid for 32-bit commands DRAD
and DRADP.

16-bit command


32 -bit command (9 STEPS)
DRAD
Continuous
execution
DRADP
Pulse
execution
Flag: M1020 Zero flag, M1021
Borrow flag, M1022 Carry flag

Command
Explanation

: data source (degree) : Coverted result (radian).
Using following function to convert degree to radian:
Radian degree (/180)
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
Program
Example

When X0=On, convert degree value of specific binary floating point (D1, D0) to radian to
save in (D11, D10) and the content is binary floating point.
X0
DRAD D0 D10

D 1 D 0
D 11 D 10
binary floating point
RAD ( 180) value / X degree
degree value
binary floating point

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
117

D
DEG
P

Radian Degree


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Refer to each model specification for usage range.
This command is only valid for 32-bit commands DDEG
and DDEGP.

16-bit command


32 -bit command (9 STEPS)
DDEG
Continuous
execution
DDEGP
Pulse
execution
Flag: M1020 Zero flag, M1021
Borrow flag and M1022 Carry flag
8 Application Commands API 100-149
DVP-PLC Application Manual 8-22
Command
Explanation

: data source (radian). : Coverted result (degree).
Using following function to convert radian to degree:
degree radian (180/)
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
Program
Example

When X0=On, convert degree value of specific binary floating point (D1, D0) to radian to
save in (D11, D10) and the content is binary floating point.
X0
DDEG D0 D10

D 1 D 0
D 11 D 10
binary floating point
degree (radian 180/ ) value X
radian value
binary floating point

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API Applicable models
ES EP EH
118

D
EBCD
P

Convert Binary Floating Point to
Decimal Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DEBCD, DEBCDP are available.
ES series models do not support pulse execution
commands (DEBCDP)

16-bit command


32 -bit command (9 STEPS)
DEBCD
Continuous
execution
DEBCDP
Pulse
execution
Flag: None

Command
Explanation

: Data source : Coverted result
Convert binary floating point value at the register specified by to decimal floating
point value stored in the register specified by .
PLC floating point is operated by the binary floating point format. DEBCD command is
the specific command used to convert binary floating point to decimal floating point.
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
8 Application Commands API 100-149
DVP-PLC Application Manual 8-23
Program
Example

When X0=On, the binary floating point value in D1, D0 will be converted to decimal
floating point stored in D3, D2.
D0 DEBCD
X0
D2

D0 D1
D2 D3
Exponent Real number
Binary
Floating Point
32 bits for real number, 8 bits for exponent
1 bit for symbol bit
[D2] * 10
[D3]
Exponent
Real number
Decimal
Floating Point
32 bits for real number, 8 bits for exponent
1 bit for symbol bit

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
119

D
EBI N
P

Convert Decimal Floating Point to
Binary Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DEBIN, DEBINP are available.
ES series models do not support pulse execution
commands (DEBINP).

16-bit command


32 -bit command (9 STEPS)
DEBIN
Continuous
execution
DEBINP
Pulse
execution
Flag: None

Command
Explanation

: Data source : Coverted result
Convert decimal floating point value at the register specified by to binary floating
point value stored in the register specified by .
For example, =1234, +1= 8 will become =1.2345 x 10
5

must be a binary floating point format. and +1 represent the real
number and exponent of the floating point number respectively.
DEBIN command is the specific command used to convert decimal floating point to
binary floating point.
8 Application Commands API 100-149
DVP-PLC Application Manual 8-24
Program
Example
1

When X1=On, the decimal floating point value in D1, D0 will be converted to binary
floating point stored in D3, D2.
D0 DEBIN
X1
D2

D0 D1
D2 D3
[D1] * 10
[D0] Decimal
Floating Point
Bi nary
Floating Point
Exponent Real number
Exponent Real number
23 bi ts for real number, 8 bi ts for exponent
1 bi t for symbol bit

Program
Example
2

Before perform floating point operation, must use FLT (API 49) command to convert BIN
integer to binary floating point. The source data (the value which will be converted)
should be a BIN integer. However, DEBIN command can be used to convert floating
point value to binary floating point value.
When X0=On, move K314 to D0 and move K-2 to D1 to generate decimal floating point
format (3.14 = 314 10
-2
).
K314 MOVP
X0
D0
D0 DEBIN D2
K-2 MOVP D1
K314 D0 [D1]
K-2 D1 [D0]
314 x10
(D1 D0) (D3 D2) , ,
314 x10
-2
Binary
Floating Point

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
120

D
EADD
P

Binary Floating Point Addition


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DEADD, DEADDP are available.
ES series models do not support pulse execution command
(DEADDP).

16-bit command


32-bit command (13 STEPS)
DEADD
Continuous
execution
DEADDP
Pulse
execution
Flag: M1020 (Zero flag), M1021
(Borrow flag) and M1022
(Carry flag)

8 Application Commands API 100-149
DVP-PLC Application Manual 8-25
Command
Explanation

: Augend : Addend : Addition result
+ = . The floating point value in the register specified by and
are added and the result is stored in the register specified by . All source
data will be operated in floating point format and the result will be also stored in floating
point format.
If the source operand or is indicated as constant K or H, the integer value
will automatically be converted to binary floating point to perform the addition
operation.
and can specify the same register number (the same device can be used
as and ). If in this case and on the continuous execution of the DEADD
command, the data in the register will be added one time in every scan program during
the cycle when the condition contact is On. Therefore, the pulse execution command
(DEADDP) is generally used.
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
Program
Example
1

When X0=On, add binary floating point value of (D1, D0) and binary floating point
value of (D3, D2) and store the result in (D11, D10).
D0 DEADD
X0
D2 D10

Program
Example
2

When X2=On, add binary floating point value of (D11, D10) and K1234 (automatically
converted to binary floating point) and store the result in (D21, D20).
D10 DEADD
X2
K1234 D20

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
121

D
ESUB
P

Binary Floating Point Subtraction


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DESUB, DESUBP are available.
ES series models do not support pulse command
(DESUBP).

16-bit command


32-bit command (13 STEPS)
DESUB
Continuous
execution
DESUBP
Pulse
execution
Flag: M1020 (Zero flag), M1021
(Borrow flag) and M1022
(Carry flag)
8 Application Commands API 100-149
DVP-PLC Application Manual 8-26

Command
Explanation

: Minuend : Subtrahend : Subtraction result
= . The floating point value in the register specified by is
subtracted from the floating point value in the register specified by and the result
is stored in the register specified by . All data will be operated in floating point
format and the result will be also stored in floating point format.
If the source operand or is indicated as constant K or H, the integer value
will automatically be converted to binary floating point to perform the subtraction
operation.
and can specify the same register number (the same device can be used
as and ). If in this case and on the continuous execution of the DESUB
command, the data in the register will be subtracted one time in every scan program
during the cycle when the condition contact is On. Therefore, the pulse execution
command (DESUBP) is generally used.
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
Program
Example
1

When X0=On, binary floating point value of (D3, D2) is subtracted from binary floating
point value of (D1, D0) and the result is stored in (D11, D10).
D0 DESUB
X0
D2 D10

Program
Example
2

When X2=On, binary floating point value of (D1, D0) is subtracted from K1234
(automatically converted to binary floating point) and the result is stored in (D11, D10).
K1234 DESUB
X2
D0 D10

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
122

D
EMUL
P

Binary Floating Point Multiplication


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DEMUL, DEMULP are available.
ES series models do not support pulse execution command
(DEMULP).

16-bit command


32-bit command (13 STEPS)
DEMUL
Continuous
execution
DEMULP
Pulse
execution
Flag: M1020 Zero flag, M1021
Borrow flag and M1022 Carry
flag

8 Application Commands API 100-149
DVP-PLC Application Manual 8-27
Command
Explanation

: Multiplicand : Multiplier : Multiplication result
= . The floating point value in the register specified by is
multiplied with the floating point value in the register specified by and the result is
stored in the register specified by . All data will be operated in floating point format
and the result will be also stored in floating point format.
If the source operand or is indicated as constant K or H, the integer value
will automatically be converted to binary floating point to perform the multiplication
operation.
and can specify the same register number (the same device can be used
as and ). If in this case and on the continuous execution of the DEMUL
command, the data in the register will be multiplied one time in every scan program
during the cycle when the condition contact is On. Therefore, the pulse execution
command (DEMULP) is generally used.
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
Program
Example
1

When X1=On, binary floating point value of (D1, D0) is multiplied with binary floating
point (D11, D10) and the result is stored in (D21, D20).
D0 DEMUL
X1
D10 D20

Program
Example
2

When X2=On, binary floating point value of (D1, D0) is multiplied with K1234
(automatically converted to binary floating point) and the result is stored in (D11, D10).
K1234 DEMUL
X2
D0 D10

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.


API

Applicable models
ES EP EH
123

D
EDI V
P

Binary Floating Point Division


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DEDIV, DEDIVP are available.
ES series models do not support pulse execution command
(DEDIVP).

16-bit command


32-bit command (13 STEPS)
DEDIV
Continuous
execution
DEDIVP
Pulse
execution
Flag: M1020 Zero flag, M1021
Borrow flag and M1022 Carry
flag

8 Application Commands API 100-149
DVP-PLC Application Manual 8-28
Command
Explanation

: Dividend : Divisor : Quotient and Remainder
= . The floating point value in the register specified by is
divided by the floating point value in the register specified by and the result is
stored in the register specified by . All data will be operated in floating point format
and the result will be also stored in floating point format.
If the source operand or is indicated as constant K or H, the integer value
will automatically be converted to binary floating point to perform the division operation.
If is 0 (zero), the operation will fail and will result in an operand error, then this
command will not be executed.
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
Program
Example
1

When X1=On, binary floating point value of (D1, D0) is divided by binary floating point
(D11, D10) and the remainder is stored in (D21, D20).
D0 DEDIV
X1
D10 D20

Program
Example
2

When X2=On, binary floating point value of (D1, D0) is divided by K1234 (automatically
converted to binary floating point) and the result is stored in (D11, D10).
D0 DEDIV
X2
K10 D10

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
124

D
EXP
P

Perform Exponent Operation of
Binary Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DEXP, DEXPP are available.
ES series models do not support pulse execution command
(DEXPP).

16-bit command


32-bit command (13 STEPS)
DEXP
Continuous
execution
DEXPP
Pulse
execution
Flag: M1020 Zero flag, M1021
Borrow flag and M1022 Carry
flag

8 Application Commands API 100-149
DVP-PLC Application Manual 8-29
Command
Explanation

: operand source device. : operand result device.
For example, the base e =2.71828 and exponent is :
EXP[ +1, ]=[ +1, ]
No matter positive or negative value are valid for S. Specific register D needs to use
32-bit format and floating point for operating. Therefore, S needs to convert to floating
point.
When operand D= e S, e=2.71828 and S is specific source data.
Error flag M1067 and M1068 read D1067 and D1068.
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
Program
Example

When M0=On, convert (D0, D1) to binary floating point and save in register (D10, D11).
When M1=On, use (D10, D11) to be exponent to perform exponent operation. The
value is binary floating point and save in register (D20, D21).
When M2=On, convert (D20, D21) binary floating point to decimal floating point and
save in register (D30, D31). (at this time, D31 means D30 to the power of 10)
M0
RST M1081
M1
DEXP D10 D20
M2
DEBCD D20 D30

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
125

D
LN
P

Perform Natural Logarithm
Operation of Binary Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DLN, DLNP are available.
ES series models do not support pulse execution command
(DLNP).

16-bit command


32-bit command (13 STEPS)
DLN
Continuous
execution
DLNP
Pulse
execution
Flag: M1020 Zero flag, M1021
Borrow flag and M1022 Carry
flag

8 Application Commands API 100-149
DVP-PLC Application Manual 8-30
Command
Explanation

: operand source device. : operand result device.
For example, perform natural logarithm operation ln to operand :
LN[ +1, ]=[ +1, ]
Only positive number is valid for S. Specific register D needs to use 32-bit format and
floating point for operating. Therefore, S needs to convert to floating point.
When operand eD=S, operand D=lnS and S is specific source data.
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
Program
Example

When M0=On, convert (D0, D1) to binary floating point and save in register (D10, D11).
When M1=On, use (D10, D11) to be real number to perform natural logarithm operation.
The value is binary floating point and save in register (D20, D21).
When M2=On, convert (D20, D21) binary floating point to decimal floating point and
save in register (D30, D31). (at this time, D31 means D30 to the power of 10)
M0
RST M1081
M1
DLN D10 D20
M2
DEBCD D20 D30

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
126

D
LOG
P

Perform Logarithm Operation of
Binary Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DLOG, DLOGP are available.
ES series models do not support pulse execution command
(DLOGP).

16-bit command


32-bit command (13 STEPS)
DLOG
Continuous
execution
DLOGP
Pulse
execution
Flag: M1020 Zero flag, M1021
Borrow flag and M1022 Carry
flag

8 Application Commands API 100-149
DVP-PLC Application Manual 8-31
Command
Explanation

: operand base device. : operand source device. : operand result
device.
Perform logarithm operation to and and save the result to .
Only positive number is valid for S2 (positive and negative number are valid for S1).
Specific register D needs to use 32-bit format and floating point for operating. Therefore,
S1 and S2 need to convert to floating point.
Consider S1
D
=S2, D=? Log
S1
S2
=D
Consider S1=5,S2=125, D=log
5
125
=?
S1
D
=S25
D
=125D=log
5
125
=3
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
Program
Example

When M0=On, convert (D0, D1) and (D2, D3) to binary floating point and save in
register (D10, D11) and (D12, D13) individually.
When M1=On, use (D10, D11) and (D12, D13) binary floating point of 32-bit registers to
perform logarithm operation and save the result in 32-bit register (D20, D21).
When M2=On, convert (D20, D21) binary floating point of 32-bit registers to decimal
floating point and save in register (D30, D31). (at this time, D31 means D30 to the
power of 10)
M0
RST M1081
M1
D10 D12
M2
DEBCD D20 D30
D2 D12
D20

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
127

D
ESQR
P

Square Root of Binary Floating
Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: Essential condition: S only can be a positive value. (S0)
Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DESQR, DESQRP are available.
ES series models do not support pulse execution command
(DESQRP).

16-bit command


32-bit command (9 STEPS)
DESQR
Continuous
execution
DESQRP
Pulse
execution
Flag: M1020 (Zero flag), M1067
(Program execution error)
8 Application Commands API 100-149
DVP-PLC Application Manual 8-32
Command
Explanation

: Source device : Destination device which store the result
This command performs a square root operation on the floating point value of source
device and stores the result at the destination device . All data will be
operated in floating point format and the result will be also stored in floating point format.
If the source operand or is indicated as constant K or H, the integer
value will automatically be converted to binary floating point to perform the addition
operation.
If operation result of is 0 (zero), the Zero flag M1020=On.
only can be a positive value. Performing any square root operation on a
negative value will result in an operation error and this command will not be executed.
M1067 and M1068 will be On and error code 0E1B will be record in D1067.
Program
Example
1

When X0=On, the square root of binary floating point (D1, D0) is stored in the register
specified by (D11, D10) after the operation of square root.
D0 DESQR
X0
D10
(D1, D0) (D11 D10) ,
binary fl oati ng point binary fl oati ng point

Program
Example
2

When X2=On, the square root of K1234 (automatically converted to binary floating
point) is stored in (D11, D10).
K1234 DESQR
X2
D10

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
128

D
POW
P

Perform Power Operation of
Binary Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DPOW, DPOWP are available.
ES series models do not support pulse execution command
(DPOWP).

16-bit command


32-bit command (13 STEPS)
DPOW
Continuous
execution
DPOWP
Pulse
execution
Flag: no.

8 Application Commands API 100-149
DVP-PLC Application Manual 8-33
Command
Explanation

: base device. : exponent device. : operand result device.
Perform power operation to binary floating point and and save the result
to .
POW [ +1, ]^[ +1, ]=
Only positive number is valid for S1 and S2. Specific register D needs to use 32-bit
format and floating point for operating. Therefore, S1 and S2 need to convert to floating
point.
When S1
S2
=D, D=?
If S1=5,S2=3, D=53=?
D=53=125
Error flag M1067 and M1068 read D1067 and D1068.
If absolut of conversion result is larger than max. floating point, carry flag M1022=On.
If absolut of conversion result is less than min. floating point, borrow flag M1021=On.
If conversion result is 0, zero flag M1020=On.
Program
Example

When M0=On, convert (D0, D1) and (D2, D3) to binary floating point and save in
register (D10, D11) and (D12, D13) individually.
When M1=On, use (D10, D11) and (D12, D13) binary floating point of 32-bit registers to
perform power operation and save the result in 32-bit register (D20, D21).
When M2=On, convert (D20, D21) binary floating point of 32-bit registers to decimal
floating point and save in register (D30, D31). (at this time, D31 means D30 to the
power of 10)
M0
RST M1081
M1
D10 D12
M2
DEBCD D20 D30
D2 D12
D20

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
129

D
I NT
P

Convert Binary Floating Point to
BIN Integer


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: Refer to each model specification for usage range.
ES series models do not support this command (INTP,
DINTP).

16-bit command (5 STEPS)
INT
Continuous
execution
INTP
Pulse
execution

32-bit command (9 STEPS)
DINT
Continuous
execution
DINTP
Pulse
execution
Flag: M1020 (Zero flag), M1021
(Borrow flag), M1022 (Carry flag)
8 Application Commands API 100-149
DVP-PLC Application Manual 8-34
Command
Explanation

: Source device : Destination device which store the result
The binary floating point value of the register specified by is converted to BIN
integer and stored in the register specified . The decimal of Bin integer will be
discarded.
This command is the inverse of the API 49 (FLT) command.
If operation result of is 0 (zero), the Zero flag M1020=On.
If there is any decimal discarded, the Borrow flag M1021=On.
If the result exceeds the following setting range (an overflow occurs), the Carry flag
M1022=On.
16-bit command : -32,768~32,767
32-bit command : -2,147,483,648~2,147,483,647
Program
Example

When X0=On, the binary floating point value of (D1, D0) will be converted to BIN
integer and the result is stored in (D10). The decimal of BIN integer will be discarded.
When X1=On, the binary floating point value of (D21, D20) will be converted to BIN
integer and the result is stored in (D31, D30). The decimal of BIN integer will be
discarded.
INT
X0
D0 D10
DINT
X1
D20 D30

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
130

D
SI N
P

Sine Operation of Binary Floating
Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D


Note: The data specified in S must be within the range 0 to 360;
i.e., 0S360
Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DSIN, DSINP are available.
ES series models do not support pulse execution command
(DSINP).

16-bit command


32-bit command (9 STEPS)
DSIN
Continuous
execution
DSINP
Pulse
execution
Flag: M1018 flag for radian/angle.

8 Application Commands API 100-149
DVP-PLC Application Manual 8-35
Command
Explanation

: Specified RAD value : Area where calculated result is stored.
Source desgnated by can be radian or angle by flag M1018.
When M1018=Off, it is set to radian mode. RAD=angle /180.
When M1018=On, it is set to angle mode. Angle range: 0angle360.
The SIN value of an angle data specified by is calculated and the calculated
result is stored in the register specified by .
S: Radian
R: Result
R
S
-2
3
2
-2 2
3
2 2 2
-
1
-1
0
-
Following shows the relation between radian and result:

Program
Example
1

When M1018=Off, it is radian mode. When X0=On, specify RAD value (D1, D0).
Calculate SIN value of angle and store the result in (D11, D10). The result stored in
(D11, D10) are all in binary floating point format.
M1002
RST M1018
X0
DSIN D0 D10

D1 D0
D1 D10
COS value
RAD 180) value (degree x /
binary floating point
binary floating point

Program
Example
2

When M1018=Off, it is radian mode. Select angle from inputs X0 and X1 and convert it
to RAD value to calculate SIN value.
D10 FLT
M1000
D1120
K31415926 K1800000000
D20 D14 D40
K30 MOVP
X0
K6
K60
X1
K6
D50 D40
DEDIV
DSIN
D20
MOVP
DEMUL
(K30 D10)
(K60 D10)
(D10 D15, D14)
( /180) (D21, D20)
(D15, D14) degree x /180
(D41, D40) RAD binary floating point
(D41 D40) RAD (D51, D50) SIN ,
binary
floating point
binary floating point
binary
floating point
binary floating point
Program
Example
3

When M1018=On, it is anlge mode. When X0=On, it designates angle value of (D1,
D0). Angle range is: 0angle value360. After converting to SIN value to save in
(D11, D10) with binary floating point number.
8 Application Commands API 100-149
DVP-PLC Application Manual 8-36
M1002
SET M1018
X0
DSIN D0 D10

D 1 D 0
D 11 D 10
angle value
SIN value
(binary floating point)

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
131

D
COS
P

Cosine Operation of Binary Floating
Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: The data specified in S must be within the range 0 to 360;
i.e., 0S360
Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DCOS, DCOSP are available.
ES/EP series models do not support this command (DCOS,
DCOSP).

16-bit command


32-bit command (9 STEPS)
DCOS
Continuous
execution
DCOSP
Pulse
execution
Flag: None

Command
Explanation

: Specified RAD value. : Area where calculated result is stored.
Source desgnated by can be radian or angle by flag M1018.
When M1018=Off, it is set to radian mode. RAD=angle /180.
When M1018=On, it is set to angle mode. Angle range: 0angle360.
The COS value of an angle data specified by is calculated and the calculated
result is stored in the register specified by .
S: Radian
R: Result
Following shows the relation between radian and result:
S
-2
3
2
-2 2
3
2 2 2
-
1
-1
0
-
R

Flag M1018 radian/angle switch: when M1018=Off, is RAD value. When
M1018=On, is angle value (0-360).
8 Application Commands API 100-149
DVP-PLC Application Manual 8-37
Program
Example
1

When M1018=Off, it is radian mode. When X0=On, specify RAD value (D1, D0).
Calculate COS value of angle and store the result in (D11, D10). The value in (D1, D0)
and the result stored in (D11, D10) are all in binary floating point format.
M1002
RST M1018
X0
DCOS D0 D10

D1 D0
D1 D10
COS value
RAD 180) value (degree x /
binary floating point
binary floating point

Program
Example
2

When M1018=On, it is angle mode. When X0=On, it is angle of specific (D1, D0). Angle
range: 0angle360. After converting to COS value, save in (D11, D10) with binary
floating point.
M1002
SET M1018
X0
DCOS D0 D10

D 1 D 0
D 1 D 10
angle value
COS value
(binary floating point)

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
132

D
TAN
P

Tangent Operation of Binary Floating
Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: The data specified in S must be within the range 0 to 360;
i.e., 0S360
Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DTAN, DTANP are available.
ES series models do not support pulse execution command
(DTANP).

16-bit command


32-bit command (9 STEPS)
DTAN
Continuous
execution
DTANP
Pulse
execution
Flag: None

8 Application Commands API 100-149
DVP-PLC Application Manual 8-38
Command
Explanation

: Specified RAD value. : Area where calculated result is stored.
Source desgnated by can be radian or angle by flag M1018.
When M1018=Off, it is set to radian mode. RAD=angle /180.
When M1018=On, it is set to angle mode. Angle range: 0angle360.
The TAN value of an angle data specified by is calculated and the calculated
result is stored in the register specified by .
S: Radian
R: Result
Following shows the relation between radian and result:
R
S
-2
2
3
2
2
2
-
1
-1
0
3
2
-
-

Program
Example
1

When M1018=Off, it is radian mode. When X0=On, specify RAD value (D1, D0).
Calculate TAN value of angle and store the result in (D11, D10). The value in (D1, D0)
and the result stored in (D11, D10) are all in binary floating point format.
M1002
RST M1018
X0
DTAN D0 D10

D1 D0
D11 D10
RAD 180) value (degree x /
TAN value
binary floating point
binary floating point

Program
Example
2

When M1018=On, it is angle mode. When X0=On, it is angle of specific (D1, D0). Angle
range: 0angle360. After converting to TAN value, save in (D11, D10) with binary
floating point.
M1002
SET M1018
X0
DTAN D0 D10

D 1 D 0
D 1 D 10
angle value
TAN value
(binary floating point)

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.
8 Application Commands API 100-149
DVP-PLC Application Manual 8-39
API

Applicable models
ES EP EH
133

D
ASI N
P

Arc Sine Operation of Binary Floating
Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DASIN, DASINP are available.

16-bit command


32-bit command (9 STEPS)
DASIN
Continuous
execution
DASINP
Pulse
execution
Flag: None

Command
Explanation

: Specified source (binary floating point) : Area where calculated result is
stored.
ASIN value=SIN
1

S: Radian
R: Result
Following shows the relation between radian and result:
R
S
2
2
-
0 -1,0 1,0

Program
Example

When X0=On, specify binary floating point (D1, D0). Calculate ASIN value and save the
result in (D11, D10). The result stored in (D11, D10) is all in binary floating point format.
DASIN
X0
D0 D10

D1 D0
D11 D10
ASIN value
binary floating point
binary floating point

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.






8 Application Commands API 100-149
DVP-PLC Application Manual 8-40
API

Applicable models
ES EP EH
134

D
ACOS
P

Arc Cosine Operation of Binary
Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DACOS, DACOSP are available.

16-bit command


32-bit command (9 STEPS)
DACOS
Continuous
execution
DACOSP
Pulse
execution
Flag: None

Command
Explanation

: Specified source (binary floating point) : Area where calculated result is
stored
ACOS value=COS
1

S: Radian
R: Result
Following shows the relation between radian and result:
R
S
2
0
1,0 -1,0

Program
Example

When X0=On, specify binary floating point (D1, D0). Calculate ACOS value and save
the result in (D11, D10). The result stored in (D11, D10) is all in binary floating point
format.
DACOS
X0
D0 D10

D1 D0
D11 D10
ACOS value
binary floating point
binary floating point

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.





8 Application Commands API 100-149
DVP-PLC Application Manual 8-41
API

Applicable models
ES EP EH
135

D
ATAN
P

Arc Tangent Operation of Binary
Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DATAN, DATANP are available.

16-bit command


32-bit command (9 STEPS)
DATAN
Continuous
execution
DATANP
Pulse
execution
Flag: None

Command
Explanation

: Specified source (binary floating point) : Area where calculated result is
stored.
ATAN value=TAN
1

S: Radian
R: Result
Following shows the relation between radian and result:
R
S
2
2
-
0

Program
Example

When X0=On, specify binary floating point (D1, D0). Calculate ATAN value and save
the result in (D11, D10). The result stored in (D11, D10) is all in binary floating point
format.
DATAN
X0
D0 D10

D1 D0
D11 D10
ATAN value
binary floating point
binary floating point

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.






8 Application Commands API 100-149
DVP-PLC Application Manual 8-42
API

Applicable models
ES EP EH
136

D
SI NH
P

Hyperbolic Sine Operation of Binary
Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DSINH, DSINHP are available.

16-bit command


32-bit command (9 STEPS)
DSINH
Continuous
execution
DSINHP
Pulse
execution
Flag: None

Command
Explanation

: Specified source (binary floating point) : Area where calculated result is
stored
SINH value=(e
s
-e
-s
)/2
Program
Example

When X0=On, specify binary floating point (D1, D0). Calculate SINH value and save the
result in (D11, D10). The result stored in (D11, D10) is all in binary floating point format.
DSINH
X0
D0 D10

D1 D0
D11 D10
SINH value
binary floating point
binary floating point

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
137

D
COSH
P

Hyperbolic Cosine Operation of Binary
Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DCOSH, DCOSHP are available.

16-bit command


32-bit command (9 STEPS)
DCOSH
Continuous
execution
DCOSHP
Pulse
execution
Flag: None

Command
Explanation

: Specified source (binary floating point) : Area where calculated result is
stored
COSH value=(e
s
+e
-s
)/2
Program
Example

When X0=On, specify binary floating point (D1, D0). Calculate COSH value and save
the result in (D11, D10). The result stored in (D11, D10) is all in binary floating point
format.
8 Application Commands API 100-149
DVP-PLC Application Manual 8-43
DCOSH
X0
D0 D10

D1 D0
D11 D10
COSH value
binary floating point
binary floating point

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.

API

Applicable models
ES EP EH
138

D
TANH
P

Hyperbolic Tangent Operation of
Binary Floating Point


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


D
Note: Refer to each model specification for usage range.
This command must use the double word (32-bit) format,
only 32-bit command DTANH, DTANHP are available.

16-bit command


32-bit command (9 STEPS)
DTANH
Continuous
execution
DTANHP
Pulse
execution
Flag: None

Command
Explanation

: Specified source (binary floating point) : Area where calculated result is
stored
TANH value=(e
s
-e
-s
)/(e
s
+e
-s
)
Program
Example

When X0=On, specify binary floating point (D1, D0). Calculate ASIN value and save the
result in (D11, D10). The result stored in (D11, D10) is all in binary floating point format.
DTANH
X0
D0 D10

D1 D0
D11 D10
TANH value
binary floating point
binary floating point

Footnote

As for the operation function of floating point, please refer CH 5.3 Handling of Numeric
Values for detail.






8 Application Commands API 100-149
DVP-PLC Application Manual 8-44
API

Applicable models
ES EP EH
144

D
GPWM
P

General Pulse Width Modulation
Output


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Please refer to command explanation for usage range of
operand S1, S2 and D.
Operand S2 occupies 3 devices.
Operand S1 should be less or equal to operand S2.
Refer to each model specification for usage range.

16-bit command


32-bit command (13 STEPS)
DPOW
Continuous
execution
DPOWP
Pulse
execution
Flag: no.

Command
Explanation

: Pulse output width. : Pulse output cycle. : pulse output device.
is specified as pulse output width as t:0~32,767ms.
is specified as pulse output cycle as T:1~32,767ms, .
+1 and +2 is for system, please dont use them.
pulse output devices: Y, M and S.
When GPWM command has been executed, the pulse output width and pulse
output cycle is output through pulse output device .
When 0, there is no pulse output from the pulse output device. When
, the pulse output device will be always On.
and can be modified when executing PWM command.
Program
Example

When X0=On, Y10 will output following pulse. When X0=Off, Y10 output will also be
Off.
X0
GPWM K1000 K2000
Y10
t T

t=1000ms
T=2000ms
Output Y10

Footnote

This command counts by scan cycle so the maximum offset will be a PLC scan cycle.
The value of , and ( - ) should be larger than PLC scan cycle.
Otherwise, there will be error occurs for GPWM outputs.
Please notice that if using this command in subroutine or interruption, GPWM output
may not be accurate.

8 Application Commands API 100-149
DVP-PLC Application Manual 8-45
API


Applicable models
ES EP EH
145


FTC


Fuzzy Temperature Control



Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

S
3

D
Note: Refer to command explanation for operand S
1,
S
2
and D
usage range.
Operand S
3
occupies continuous 6 devices.
Refer to each model specification for usage range.
Refer to footnote for PID usage times in program.

16-bit command (9 STEPS)
FTC
Continuous
execution


32-bit command

Flag: None

Command
Explanation

: Target value (SV) : Present measured value (PV) : Parameter
: Output value (MV)
Operand S
1
usage range is 1~3000 to show 0.1C ~300C. The unit is 0.1C. If (
+1) (refer to footnote) sets to K0 to show 0.1C~300C.
Operand S
2
usage range is 1~3000 to show 0.1C ~300C. The unit is 0.1C. If (
+1) (refer to footnote) sets to K0 to show 0.1C~300C.
Therefore, when user gets the result that analog converts to digital from temperature
sensor, it needs to convert to the value during 1~3000 by using the four fundamental
operations of arithmetic.
is sampling time setting. If setting is less than K1, command wont act. If setting
exceeds K200, it will be regarded as K200.
The setting of ( +1) only can be K0 (means C) and K1 (means F). When setting
is not these two settings (K0 and K1), this setting will be set to K0.
Operand D

usage range is 0~100 to show 0%~100%. User should use with other
commands by heater type when using this command. For example, it can use with
GPWM command to control pulse output as shown in footnote (example 1).
Program
Example

Finishing parameter setting before executing FTC command.
When X0=On, command is executed and save result in D150. When X0=Off, command
is not executed and previous data is unchanged.
X0
FTC D0 D1 D100 D150



8 Application Commands API 100-149
DVP-PLC Application Manual 8-46
Footnote

The setting of is in the following:
Device Function Usage range Explanation
:
Sampling time (T
S
)
(unit: 10ms)
1~200
(unit: 100ms)
When T
S
is less than a scan time, PID
command will execute for a scan time.
When T
S
=0, it wont act. Therefore, the
minimum setting of T
S
should be larger
than program scan time.
When setting exceeds 200, it will be
regarded as 200.
+1:
Temperature unit K0=CK1=F
When setting is not these two settings
(K0 and K1), this setting will be set to
K0.
+2:
~

+5:
For system uses, please dont use.
Control Diagram:
+ e
FTC
PV
MV
Fuzzy
Controller
Temperature
Sensor

Attention and suggestion:
It is recommended to set sampling time to twice and above of sampling time of
temperature sensor to get better temperature control.
Example 1: control diagram
Fuzzy
Controller
FTC
SV
D0 D10
MV
Y10
D1 PV
+
e PWM
Program
Pt Module
Temperature
Sensor
Following time chart is using GPWM command to output Y10. (t is pulse output width
and T is pulse output cycle time)
8 Application Commands API 100-149
DVP-PLC Application Manual 8-47
T11
T10

The setting of FTC command is sampling time D2=K10 (unit: 10ms) and temperature
unit is D3=K0(). Other example for using with temperature control are shown in
following.
M3
FTC D0
MOV D10
<=
D11 <> D10 D11
SET M4
RST Y10 D11 K0
CJ P0
> SET Y10 D11 K99
CJ P0
M3
TMR T10
Y10
TMR T11
T11
RST Y10
T10
SET Y10
RST T10
M4
SET Y10
RST M4
> T10 K99







8 Application Commands API 100-149
DVP-PLC Application Manual 8-48
API

Applicable models
ES EP EH
147

D
SWAP
P

Swap High/Low Byte


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


Note: If operand D uses with device F, it is only available in 16-bit
command.
Refer to each model specification for usage range.
The continuous command (SWAP, DSWAP) are only
provided in V4.9(included) or later version of ES series
models and EP/EH series models.

16-bit command (5 STEPS
SWAP
Continuous
execution
SWAPP
Pulse
execution

32-bit command (9 STEPS)
DSWAP
Continuous
execution
DSWAPP
Pulse
execution
Flag: None

Command
Explanation

: Device for swapping high/low byte.
When being 16-bit command, swapping the content of high/low byte.
When being 32-bit command, swapping the content of high/low byte.of two registers
separately.
This command is usually pulse execution (SWAPP, DSWAPP).
Program
Example
1

When X0=ON, swapping the content of high/low byte of D0.
D0 SWAPP
X0

D0
High Byte Low Byte

Program
Example
2

When X0=ON, swapping upper 8-bit and lower 8-bit of D11 and swapping upper 8-bit
and lower 8-bit of D10.
D10 DSWAP
X0

D10 D11
High Byte High Byte Low Byte Low Byte


















8 Application Commands API 100-149
DVP-PLC Application Manual 8-49
API

Applicable models
ES EP EH
148

D
MEMR
P

Data Backup MEMORY Read


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
m
D
n
Note: The setting range of m operand: EP series model:
m=0~1,599; EH series models: m=0~9,999.
The setting range of D operand: EP series model:
D2000~D4999; EH series model: D2000~D9999
The setting range of n operand:
16-bit command: EP series model: n=K1~ K1,600; EH
series models: n=K1K8,000.
32-bit command: EP series model: n=K1~ K800; EH series
models: n=K1K4,000.
Refer to each model specification for usage range.

16-bit command (7 STEPS)
MEMR
Continuous
execution
MEMRP
Pulse
execution

32-bit command (13 STEPS)
DMEMR
Continuous
execution
DMEMRP
Pulse
execution
Flag: M1101 (Please refer the
following footnote for detail)


Command
Explanation

: Address (Constant) for reading data of file register. : Address (Constant)
for storing read data. : Quantity of one time reading data.
EP/EH series models use this command to read the data of file register and store the
read data in the data register.
EP series models provide 1,600 numbers of 16-bit file registers and EH series models
provide 10,000 numbers of 16-bit file registers.
Operand and for EP series models dont support register E and F.
If operands , and is out of range, operand error will be occurred.
M1067, M1068=On and error code 0E1A will be recorded in D1067.
Program
Example
1

16-bit command MEMR reads 100 items data from the 10
th
address of file register and
store the read data in the data register started from D2000.
When X0=On, the command is executed. When X0 goes to Off, the command is not
executed and the content of previous read data has no change.
X0
MEMR K10 D2000 K100

Program
Example
2

32-bit command DMEMR reads 100 items data from the 20
th
address of file register
and store the read data in the data register started from D3000.
When X0=On, the command is executed. When X0 goes to Off, the command is not
executed and the content of previous read data has no change.
X0
DMEMR K20 D3000 K100





8 Application Commands API 100-149
DVP-PLC Application Manual 8-50
API

Applicable models
ES EP EH
149

D
MEMW
P

Data Backup MEMORY Write In


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
m
n
Note: The setting range of S operand: EP series model:
S=D2000~D4999; EH series model: S=D2000~D9999.
The setting range of m operand:
EP series model: m=K0~K1,599; EH series models:
m=K0~K9,999.
The setting range of n operand:
16-bit command: EP series model: n= K1~ K1,600; EH
series models: n=K1K8,000.
32-bit command: EP series model: n=K1~ K800; EH series
models: n=K1K4,000.
Refer to each model specification for usage range.

16-bit command (7 STEPS)
MEMW
Continuous
execution
MEMWP
Pulse
execution

32-bit command (13 STEPS)
DMEMW
Continuous
execution
DMEMW
P
Pulse
execution
Flag: M1101 (Please refer the
following footnote for detail)


Command
Explanation

: Address (Constant) for data writing in, D2000~D9999 : Address
(Constant) for file register writing in, K0~K9,999 : Quantity of one time reading
data, K1~K8,000
EP/EH series models use this command to read the data of file register and store the
read data in the data register.
EP series models provide 1,600 numbers of 16-bit file registers and EH series models
provide 10,000 numbers of 16-bit file registers.
Operand and for EP series models dont support register E and F.
If operands , and is out of range, operand error will be occurred.
M1067, M1068=On and error code 0E1A will be recorded in D1067.
Program
Example

When X0=On, the double word command DMEMW is executed. Write 100 items 32-bit
data started from D2001, D2000 in the file register address 0 to 199.
When X0=On, the command is executed. When X0 goes to Off, the command is not
executed and the content of previous read data has no change.
X0
DMEMW D2000 K0 K100

File Register

EH series models: when EH series PLC startup or goes from STOP to RUN, EH
series PLC will determine M1101 (if startup the function of file register), D1101 (file
register starts to give number, K0~K9,999), D1102 (numbers of file registers of being
read, K1~K8,000), D1103 (destination device which stores the read data of file register,
specified data register D start to give number, K2,000~K9,999) and decide if
automatically transfer the content of file register to the specified data register.
EH series models: When the value of D1101 is less than 0, or the value of D1103 is
less than 2,000 or more than 9,999, reading data from file register to data register is
disabled.
8 Application Commands API 100-149
DVP-PLC Application Manual 8-51
EP series models: when EP series PLC startup or goes from STOP to RUN, EP series
PLC will determine M1101 (if startup the function of file register), D1101 (file register
starts to give number, K0~K1,600), D1102 (numbers of file registers of being read,
K1~K8,000), D1103 (destination device which stores the read data of file register,
specified data register D start to give number, K2,000~K4,999) and decide if
automatically transfer the content of file register to the specified data register.
EP series models: When the value of D1101 is less than 0 or more than 1,600, or the
value of D1103 is less than 2,000 or more than 4,999, reading data from file register to
data register is disabled.
When file register read data to data register D, if the address of file register or data
register exceeds the limit range, PLC will stop reading.
As for the data read and write in of file register, in PLC program only can use API
command 147 MEMR to read and use API command 148 MEMW to write in. For
detailed information about file registers, please refer to CH2 section 2.8.3.
There are 32,768 file registers. The file registers dont have real number, therefore the
read/write in function of file register should be performed by the API command 147
MEMR and 148 MEMW, or using a peripheral equipment HPP and WPLSoft software.
The destination device is not always continuous. One part is on the inner SRAM and
the other part is on the SRAM CARD. If user did not insert the SRAM CARD and the
read address exceeds 2,000 addresses, then the read value will be all 0(zero).
Related special relays and registers of file register:
Flag Function Explanation
M1101 If startup the function of file register, Latched, Default is Off

Special
Register
Function Explanation
D1101 File register starts to give number K0~K9,999, Latched, Default is 0
D1102 Numbers of file registers of being read K1~K8,000, Latched, Default is 0
D1103 Destination device which stores the read data of file register, specified
data register D start to give number K2,000~K9,999, Latched, Default is
2,000


9 Application Commands API 150-199

DVP-PLC Application Manual

9-1
API

Applicable models
ES EP EH
150


MODRW

MODBUS Data Read/ Write
In
- - -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

S
3

S
n
Note: The setting range of S
1
operand
:
K0~K255
The limit of S
2
operand is specified as K3(H3), K6(H6),
K16(H10)
The setting range of n operand: n=K1~K8
This command (MODRW) is only provided in V4.9(included)
or later version of ES series models and EP/EH series
models.

16-bit command (11 STEPS)
MODRW
Continuous
execution


32-bit command

Flag: M1120~M1131, M1140~M1143
(Please refer the following footnote)

Command
Explanation

4 : Connection device address : Function code : Address of being
read or write : Register of being read/write : Length of read/write data
4 : Connection device address (UNIT ADDRESS). The setting range K0 to K255.
4 : FUNCTION CODE. For example: the command of AC drive or DVP-PLC to
read many items is H03. Write command of AC drive or DVP-PLC is H06 and the
command of write many items is H10. Only above three function codes are provided
and the other function codes are disabled. Please refer the following program
examples.
4 : Device address that being read/write data (DEVICE ADDRESS). This is an
inner device address of connection device. If the address is illegal to the specified
device, there will be fault code store in D1130 and at the same time, M1141 will be
ON. For example, 4000H is illegal to VFD-S, M1141 will be ON and D1130 = 2. Please
refer to VFD-S user manual for the details of fault codes.
4 : Source or destination of being read/write (SOURCE or DESTINATION). User
can set register to write data length in advance or store data after reading.
4 : Read/Write data length (DATA LENGTH). The specified range K1~K8
(WORD).
Program
Example
1

4 Function code K3(H3) : read many items data
1. PLC connects to VFD-S AC drive. (ASCII Mode when M1143=OFF)
2. PLC connects to VFD-S AC drive. (RTU Mode when M1143=ON)
4 Received data is stored in 16 continuous registers that start from D0 with ASCII format
when in ASCII mode. PLC will convert the content to Hexadecimal and store in
registers D1296~D1311 automatically. M1131=ON when it starts converting to
hexadecimal and M1131 will be OFF after completing converting.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-2
Program
Example
1

4 User can use MOV, DMOV or BMOV commands to move D1296~D1311 that store
hexadecimal data to general register to use. For ES series, other command is invalid
to this area.
4 Received data is stored in 8 continuous registers that start from D0 and specified by
users in hexadecimal format in RTU mode. At the same time, D1296~D1311 is invalid.
4 In ASCII mode or RTU mode, PLC will store the transmission data in D1256~D1295.
Users can move these register data to general register by using MOV, DMOV or
BMOV commands. Other commands are invalid to this area.
4 Data received from AC drive is stored in registers specified by users. After complete
receiving data, PLC will automatically check if the received data is correct. If there is
any fault, M1140 will be set to ON.
4 If inner data address of AC drive is illegal to specified device, it will have fault code.
Fault code will be stored in D1130 and M1141 will be on. For example, 8000H is illegal
to VFD-S and M1141=ON and D1130=2. Please refer to VFD-S user manual to fault
code.

4 After M1140=ON or M1141=ON, it will transmit a correct data to AC drive. If received
data is correct, M1140 and M1141 will be reset.
H87 MOV
M1002
D1120
SET M1120
SET
X0
M1122
K100 MOV D1129
MODRW K3 K1
X0
H2100
M1127
RST M1127
M1143
X10
D0 K8
setting communication
protocol 9600, 8, E, 1
communication protocol
setting communication
time out 100ms
connection
device
address K1
function
code K3
read many
items data
data address
H2100
data stored
register
read/write data
length (word)
handling received data
ASCII mode : received data is stored in 16 consecutive registers that start
from D0 with ASCII format when in ASCII mode. PLC will convert the content
to hexadecimal and store in registers D1296~D1311 automatically
RTU mode : received data is stored in 8 consecutive registers that start from
D0 and specified by users in hexadecimal type in RTU mode
receiving data completed and reset flag
RTU mode setting
Setting sending request

9 Application Commands API 150-199

DVP-PLC Application Manual

9-3

4 ASCII Mode: PLC connects to VFD-S AC drive.
PLC = VFD-S, PLC transmits: 01 06 0100 1770 71
VFD-S = PLC, PLC receives: 01 06 0100 1770 71
PLC transmits data register (transmit message)
Register DATA Explanation
D1256 Low 0 30 H ADR 1
D1256 High 1 31 H ADR 0
ADR (1,0) is AC drive
address
D1257 Low 0 30 H CMD 1
D1257 High 6 36 H CMD 0
CMD (1,0) is command code
D1258 Low 0 30 H
D1258 High 1 31 H
D1259 Low 0 30 H
D1259 High 0 30 H
Data Address
D1260 Low 1 31 H
D1260 High 7 37 H
D1261 Low 7 37 H
D1261 High 0 30 H
Data contents
The content of register D50
(H1770=K6000)
D1262 Low 7 37 H LRC CHK 1
D1262 High 1 31 H LRC CHK 0
LRC CHK (0,1) is error
check
PLC receives data register (response message)
Register DATA Explanation
D1070 Low 0 30 H ADR 1
D1070 High 1 31 H ADR 0
D1071 Low 0 30 H CMD 1
D1071 High 6 36 H CMD 0
D1072 Low 0 30 H
D1072 High 1 31 H
D1073 Low 0 30 H
D1073 High 0 30 H
Data Address
D1074 Low 1 31 H
D1074 High 7 37 H
D1075 Low 7 37 H
D1075 High 0 30 H
Data content
D1076 Low 7 37 H LRC CHK 1
D1076 High 1 31 H LRC CHK 0
4 RTU Mode: PLC connects to VFD-S AC drive
PLC = VFD-S, PLC transmits: 01 06 2000 0012 02 07
VFD-S = PLC, PLC receives: 01 06 2000 0012 02 07
PLC transmits data register (transmit message)
Register DATA Explanation
D1256 Low 01 H Address
D1257 Low 06 H Function
D1258 Low 20 H
D1259 Low 00 H
Data Address
9 Application Commands API 150-199

DVP-PLC Application Manual

9-4

Register DATA Explanation
D1260 Low 00 H
D1261 Low 12 H
Data content
The content of register D50
(H12)
D1262 Low 02 H CRC CHK Low
D1263 Low 07 H CRC CHK High
PLC receives data register (response message)
Register DATA Explanation
D1070 Low 01 H Address
D1071 Low 06 H Function
D1072 Low 20 H
D1073 Low 00 H
Data Address
D1074 Low 00 H
D1075 Low 12 H
Data content
D1076 Low 02 H CRC CHK Low
D1077 Low 07 H CRC CHK High
Program
Example
2

4 Function code K6(H6) : write one WORD data into register
1. PLC connects to VFD-S AC drive. (ASCII Mode when M1143=OFF)
2. PLC connects to VFD-S AC drive. (RTU Mode when M1143=ON)
4 When in ASCII mode, users store the data that will be wrote to AC drive in ASCII
format in specified register D0. Data received from AC drive will be stored in registers
D1070~D1076.
4 When in RTU mode, users store the data that will be wrote to AC drive in hexadecimal
format in specified register D0. Data received from AC drive will be stored in registers
D1070~D1077.
4 When in ASCII mode or RTU mode, PLC will store the transmission data in registers
D1256~D1295. Users can move these data to general registers by using MOV, DMOV
or BMOV commands. Other commands are invalid to this area.
4 After complete receiving data, PLC will automatically check if the received data is
correct. If there is any fault, M1140 will be set to ON.
4 If inner data address of AC drive is illegal to specified device, it will have fault code.
Fault code will be stored in D1130 and M1141 will be on. For example, 8000H is illegal
to VFD-S and M1141=ON and D1130=2. Please refer to VFD-S user manual to fault
code.
4 After M1140=ON or M1141=ON, it will transmit a correct data to AC drive. If received
data is correct, M1140 and M1141 will be reset.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-5
H87 MOV
M1002
D1120
SET M1120
SET
X0
M1122
K100 MOV D1129
MODRW K6 K1
X0
H2000
M1127
RST M1127
M1143
X10
D50 K1
setting communication
protocol 9600, 8, E, 1
communication protocol
setting communication
time out 100ms
connection
device
address K1
function
code K6
write one
data in
data address
H2000
data stored
register
read/write data
length (word)
setting transmit flag
handling received data
ASCII mode : received data in ASCII format stored in special registers D1070~1078.
receiving data completed and reset flag
RTU mode : received data in hexadecimal format stored in special registers D1070~1078.

4 ASCII Mode: PLC connects to VFD-S AC drive.
PLC = VFD-S, PLC transmits: 01 06 0100 1770 71
VFD-S = PLC, PLC receives: 01 06 0100 1770 71
PLC transmits data register (transmit message)
Register DATA Explanation
D1256 Low 0 30 H ADR 1
D1256 High 1 31 H ADR 0
ADR (1,0) is AC drive
address
D1257 Low 0 30 H CMD 1
D1257 High 6 36 H CMD 0
CMD (1,0) is command
code
D1258 Low 0 30 H
D1258 High 1 31 H
D1259 Low 0 30 H
D1259 High 0 30 H
Data Address
D1260 Low 1 31 H
D1260 High 7 37 H
D1261 Low 7 37 H
D1261 High 0 30 H
Data contents
The content of register D50
(H1770=K6000)
D1262 Low 7 37 H LRC CHK 1
D1262 High 1 31 H LRC CHK 0
LRC CHK (0,1) is error
check
PLC receives data register (response message)

9 Application Commands API 150-199

DVP-PLC Application Manual

9-6

Register DATA Explanation
D1070 Low 0 30 H ADR 1
D1070 High 1 31 H ADR 0
D1071 Low 0 30 H CMD 1
D1071 High 6 36 H CMD 0
D1072 Low 0 30 H
D1072 High 1 31 H
D1073 Low 0 30 H
D1073 High 0 30 H
Data Address
D1074 Low 1 31 H
D1074 High 7 37 H
D1075 Low 7 37 H
D1075 High 0 30 H
Data content
D1076 Low 7 37 H LRC CHK 1
D1076 High 1 31 H LRC CHK 0
4 RTU Mode: PLC connects to VFD-S AC drive
PLC = VFD-S, PLC transmits: 01 06 2000 0012 02 07
VFD-S = PLC, PLC receives: 01 06 2000 0012 02 07
PLC transmits data register (transmit message)
Register DATA Explanation
D1256 Low 01 H Address
D1257 Low 06 H Function
D1258 Low 20 H
D1259 Low 00 H
Data Address
D1260 Low 00 H
D1261 Low 12 H
Data content
The content of
register D50 (H12)
D1262 Low 02 H CRC CHK Low
D1263 Low 07 H CRC CHK High
PLC receives data register (response message)
Register DATA Explanation
D1070 Low 01 H Address
D1071 Low 06 H Function
D1072 Low 20 H
D1073 Low 00 H
Data Address
D1074 Low 00 H
D1075 Low 12 H
Data content
D1076 Low 02 H CRC CHK Low
D1077 Low 07 H CRC CHK High
9 Application Commands API 150-199

DVP-PLC Application Manual

9-7
Program
Example
3

4 Function code K16(H10) : write many items WORD data into register
1. PLC connects to VFD-S AC drive. (ASCII Mode when M1143=OFF)
2. PLC connects to VFD-S AC drive. (RTU Mode when M1143=ON)
4 When in ASCII mode, users store the data that will be wrote to AC drive in ASCII
format in 8 continuous specified register started from D0. Received data from AC drive
will be stored in registers D1070~D1078.

4 When in RTU mode, users store the data that will be wrote to AC drive in hexadecimal
format in 8 continuous specified register started from D0. Received data from AC drive
will be stored in registers D1070~D1078.
4 When in ASCII mode or RTU mode, PLC will store the transmission data in registers
D1256~D1295. Users can move these data to general registers by using MOV, DMOV
or BMOV commands. Other commands are invalid to this area.
4 After complete receiving data, PLC will automatically check if the received data is
correct. If there is any fault, M1140 will be set to ON.
4 If inner data address of AC drive is illegal to specified device, it will have fault code.
Fault code will be stored in D1130 and M1141 will be on. For example, 8000H is illegal
to VFD-S and M1141=ON and D1130=2. Please refer to VFD-S user manual to fault
code.
4 After M1140=ON or M1141=ON, it will transmit a correct data to AC drive. If received
data is correct, M1140 and M1141 will be reset.
H87 MOV
M1002
D1120
SET M1120
SET
X0
M1122
K100 MOV D1129
MODRW K16 K1
X0
H2000
M1127
RST M1127
M1143
X10
D50 K8
setting communication
protocol 9600, 8, E, 1
communication protocol
setting communication
time out 100ms
connection
device
address K1
function
code K16
write one
data in
data address
H2000
data stored
register
read/write data
length (word)
setting transmit flag
handling received data
ASCII mode : received data in ASCII format stored in special registers D1070~1078.
receiving data completed and reset flag
RTU mode : received data in hexadecimal format stored in special registers D1070~1078.

9 Application Commands API 150-199

DVP-PLC Application Manual

9-8

4 ASCII Mode: PLC connects to VFD-S AC drive.
PLC = VFD-S, PLC transmits: 01 10 2000 0002 04 0012 1770 30
VFD-S = PLC, PLC receives: 01 10 2000 0002 CD
PLC transmits data register (transmits messages)
Register DATA Explanation
D1256 Low 0 30 H ADR 1
D1256 High 1 31 H ADR 0
ADR (1,0) is AC drive
address
D1257 Low 1 31 H CMD 1
D1257 High 0 30 H CMD 0
CMD (1,0) is command
code
D1258 Low 2 32 H
D1258 High 0 30 H
D1259 Low 0 30 H
D1259 High 0 30 H
Data Address
D1260 Low 0 30 H
D1260 High 0 30 H
D1261 Low 0 30 H
D1261 High 2 32 H
Number of Register
D1262 Low 0 30 H
D1262 High 4 34 H
Byte Count
D1263 Low 0 30 H
D1263 High 0 30 H
D1264 Low 1 31 H
D1264 High 2 32 H
Data contents 1
The content of register
D50 (H12)
D1265 Low 1 31 H
D1265 High 7 37 H
D1266 Low 7 37 H
D1266 High 0 30 H
Data contents 2
The content of register
D51 (H1770=K6000)
D1267 Low 3 33 H LRC CHK 1
D1267 High 0 30 H LRC CHK 0
LRC CHK (0,1) is error
check
PLC receives data register (response messages)
Register DATA Explanation
D1070 Low 0 30 H ADR 1
D1070 High 1 31 H ADR 0
D1071 Low 1 31 H CMD 1
D1071 High 0 30 H CMD 0
D1072 Low 2 32 H
D1072 High 0 30 H
D1073 Low 0 30 H
D1073 High 0 30 H
Data Address
D1074 Low 0 30 H
D1074 High 0 30 H
D1075 Low 0 30 H
D1075 High 2 32 H
Number of Register
D1076 Low C 43 H LRC CHK 1
D1076 High D 44 H LRC CHK 0
4 RTU Mode: PLC connects to VFD-S AC drives
PLC = VFD-S, PLC transmits: 01 10 2000 0002 04 0012 1770 C4 7F
VFD-S = PLC, PLC receives: 01 10 2000 0002 4A 08
9 Application Commands API 150-199

DVP-PLC Application Manual

9-9
PLC transmits data register (transmits messages)
Register DATA Explanation
D1256 Low 01 H Address
D1257 Low 10 H Function
D1258 Low 20 H
D1259 Low 00 H
Data Address
D1260 Low 00 H
D1261 Low 02 H
Number of Register
D1262 Low 04 H Byte Count
D1263 Low 00 H
D1264 Low 12 H
Data content 1
The content of register D50
(H12)
D1265 Low 17 H
D1266 Low 70 H
Data content 2
The content of register D51
(H1770=K6000)
D1262 Low C4 H CRC CHK Low
D1263 Low 7F H CRC CHK High
PLC receives data register (response messages)
Register DATA Explanation
D1070 Low 01 H Address
D1071 Low 10 H Function
D1072 Low 20 H
D1073 Low 00 H
Data Address
D1074 Low 00 H
D1075 Low 02 H
Number of Register
D1076 Low 4A H CRC CHK Low
D1077 Low 08 H CRC CHK High
9 Application Commands API 150-199

DVP-PLC Application Manual

9-10
Footnote

4 The startup condition (the contact) before MODRD, RDST, MODRW these three
commands, cannot use rising-edge contact and falling-edge. Otherwise, the data
stored in received register will be incorrect.
4 Related flags and special registers of RS-485 communication MODRW command:
Please refer to the footnote of API 80 RS command for more detail information.
Flag/Special
Register
Function Description
M1120
Communication setting latched. The change of D1120 will be
invalid after setting.
M1121 When it is Off, RS-485 of PLC is sending communication data.
M1122 Delivery request
M1123 Receive completed
M1124 Receive waiting message
M1125 Receive status disable
M1126 STX/ETX system definition selection
M1127 MODRD / RDST / MODRW commands data receive completed
M1128 Transmitting/receiving indication
M1129 Receive time out
M1130 Users/system definition STX/ETX
M1131 MODRD / MODWR / MODRW data convert to HEX, M1131=ON
M1140 MODRD / MODWR / MODRW data receive error
M1141 MODRD / MODWR / MODRW command parameter error
M1142 VFD-A convenience command data receive error
M1143
ASCII/RTU mode selection (use with commands
MODRD/MODWR/MODRW) (Off is ASCII mode, ON is RTU
mode)
D1070~D1085
It is PLC built-in RS-485 communication convenience command.
This command will send messages during executing and if the
receiver receives, it will return messages and save it in
D1070~D1085. Users can view return data by this register
content.
D1120 RS-485 communication protocol
D1121
PLC communication address.(save PLC communication address,
has latched function)
D1122 Remainder characters of delivery data
D1123 Remainder characters of received data
D1124 Start text definitionSTX
D1125 Definition of the first end characterETX1
D1126 Definition of the second end characterETX2
D1129 Communication time out abnormal. Time unit:ms
D1130 Return fault code record of MODBUS
D1256~D1295
This is PLC built-in RS-485 communication convenience
command MODRW. The message that this command sends
during executing will be saved in D1256~D1295. User can check
according to this register content.
D1296~D1311
PLC will automatically convert ASCII data saved in the register
specified by users to hexadecimal format.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-11
API

Applicable models
ES EP EH
151


PWD


Input Pulse Width Detection
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: The limit of S operand is specified as X10~X17
The setting range of D operand: D=D0~D999, two
continuous devices are used and only can be used one
time in the program.

16-bit command (5 STEPS)
PWD
Continuous
execution


32-bit command

Flag: None

Command
Explanation

4 : Source device : Destenstation device which stores detection result
4 This command is used to detect the On pulse width of X10~X17 inputs and time unit is
100us.
4 occupy two continuous devices. The longest detectable time is 214,748.3647
seconds, about 3,579.139 minutes, about 59.652 hours.
4 If the On pulse width is less than 100us, the value of specified is equal to
0(zero).
Program
Example

4 When X0=On, record the On pulse width of input X10 and store in D1, D0.
X0
PWD X10 D0


API

Applicable models
ES EP EH
152


RTMU


Start to Measure the Execution
Time of I Interrupt
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: The limit of S operand is specified as K0~K9
The limit of D operand is specified as K1~K1,000

16-bit command (5 STEPS)
PWD
Continuous
execution


32-bit command

Flag: None

Command
Explanation

4 : Source device : Destination device which stores measure time (time
unit is 1us)
4 The limit range of is K0~K9, specified special D register and can measure ten
interrupt subroutine at most, the number of specified special D register is D1156~1165
in order. For example, when the value of is K5, it means the number of
specified special D register is D1161.



9 Application Commands API 150-199

DVP-PLC Application Manual

9-12
4 After executing RTMU command, if the range of , inputted by user is
legal, this command will get the timer started to measure the execution time of I
interrupt and reset the content of special D register specified by to 0(zero)
simultaneously. When reaching RTMD command, the timer will be closed and
measuring the execution time of I interrupt will end. At the same time, specify the
measuring execution time to the special D register specified by RTMD command.
4 This RTMU command is used with the next introduced RTMD command and these
two commands are all be used to measure the execution time of I interrupt service
program for the user to deal with high speed response and restrict to providing the
execution time of ISR (Interrupt Service Routine) at the beginning of the program
development.

API

Applicable models
ES EP EH
153


RTMD


End to Measure the Execution
Time of I Interrupt
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
Note: The limit of S operand is specified as K0~K9

16-bit command (3 STEPS)
PWD
Continuous
execution


32-bit command

Flag: None

Command
Explanation

4 : Source device
4 The limit range of is K0~K9, specified special D register and can measure ten
interrupt subroutine at most, the number of specified special D register is D1156~1165
in order. For example, when the value of is K5, it means the number of
specified special D register is D1161
Program
Example

4 When X0 is OffOn, enter into I001 interrupt subtoutine, the RTMU command will
start a 8-bit timer (unit time is 10us). When reaching RTMD command K0 , close the
timer and store the measurin time in special D register (there are totally ten registers
D1156~D1165 and it is specified as K0~K9).
FEND
M1000
RTMU K0 D0
RTMD K0
IRET
I 001
M1000

9 Application Commands API 150-199

DVP-PLC Application Manual

9-13
Footnote

4 After developing PLC program completed, we recommanded that user should remove
this command.
4 Additional Explanation:
1. Due to the time interrupt executed by RTMU command is a less priority (less
important than other interrupts), the timer may not be triggered and cannot count the
time when executing high-speed pulse input counting or specifying high-speed pulse
input during the execution period of RTMU command.
2. If user execute RTMU command but not execute RTMD command before the end of
program interrupt, then the interrupt will not be ended.
3. Please specially notice that RTMU command is executed by starting one inner timer
interrupt of PLC, therefore, the timer may be disordered if execute multiple RTMU or
RTMD commands simultaneously.
4 D1156~D1165: Special D registers specified by RTMU, RTMD command (numbers is
from K0 to K9).

API

Applicable models
ES EP EH
154


RAND
P

Random Number
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: S
1
operand S
2
operand
The usage range of operands S
1
, S
2
is: K0 S
1
, S
2

K32,767
Refer to each model specification for usage range.

16-bit command (7 STEPS)
RAND
Continuous
execution
RANDP

32-bit command


Pulse
executioin
Flag: No


Command
Explanation

4 : lower bound for producing random number. : upper bound for producing
random number. : result for producing random number.
4 When user inputs S1 > S2, PLC will occur operand error and wont execute it, and
then M1067, M1068=On, and records error code 0E1A(HEX) in D1067.
Program
Example

4 When X10=On, the random number that produced during lower bound D0 and upper
bound D10 will save in D20.
X10
RAND D0 D10 D20






9 Application Commands API 150-199

DVP-PLC Application Manual

9-14
API

Applicable models
ES EP EH
155

D
ABSR


Absolute Current Value Read
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
1

D
2

Note: Operand S occupies 3 continuous devices
Operand D
1
occupies 3 continuous devices
Operand D
2
occupies 2 continuous devices
Refer to each model specification for usage range.
There is no 16-bit command for API 55, only 32-bit
command, DABSR is available and it can only be used for
ONCE in program.

16-bit command


32-bit command (13 STEPS)
DABSR
Continuous
execution

Flag: For the description of M1010,
M1029, M1030, M1334, M1335,
M1336, M1337, M1346, please
refer to the footnote.


Command
Explanation

4 This command provides continuous absolute position data read function of mitsubishi
servo drive MR-J2 (with absolute position check function).
4 : Input signal from Servo : Control signal for controling Servo :
Absolute position data (32 bit) read from Servo
4 is the input signal from Servo and it will use 3 continuous devices , +1,
+2. Device and +1 are connected to the ABS (bit0, bit1) of Servo for
data transmitting. Device +2 is connected to Servo for transmitting data ready flag.
Please see the wiring drawing below for details.
4 is the control signal for controling Servo and it will use 3 continuous devices ,
+1, +2. Device is connected to Servo On (SON) of Servo, device
+1 is connected to ABS data transmitting mode of Servo and +2 is connected
to ABS data request signal. Please see the wiring drawing below for details.
PLC
DVP32EH00T
ABS(bit 0)
ABS(bit 1)
SERVO ON
SERVO AMP
MR-J2-A
CN1B
D01 4
19
10
6
ZSP
TLC
SG
5
8
9
SON
ABSM
ABSR
X0
X1
X2
24G
S/S
+24V
Y4
Y5
Y6
C4
VDD 3
transmission data is ready
ABS requirement
ABS transmission mode





9 Application Commands API 150-199

DVP-PLC Application Manual

9-15
4 is the absolute position data (32 bit) read from Servo and it will use 2 continuous
devices , +1. is low word and +1 is high word. The absolute
position data should be stored in the current value registers (D1337, D1336)
corresponding to CH0 pulse or the current value registers (D1339, D1338) corresponding
to CH1 pulse, so it is recommanded to specify these two registers. If specify other
devices, finally, the user still have to transmit the data into the current value registers
(D1337, D1336) corresponding to CH0 pulse or the current value registers (D1339,
D1338) corresponding to CH1 pulse.
4 When DABSR command drvie contact turns ON and read starts, the command execution
completed flag M1029, M1030 will be energized. The flags must be reset by user.
4 When driving the DABSR command, please specify normally open contact. If the drive
contact of DABSR command turns Off when DABSR command read starts, the execution
of absolute current value read will be interrupted and result in incorrect data. Please be
careful and notice that.
4 If the drive contact of DABSR command turns Off after the read is completed, the Servo
On (SON) signal connected to will also turn Off and the operation will be disabled.
Program
Example

4 When X7= On, the absolute position data (32 bit) read from Servo should be stored in the
current value register (D1337, D1336) corresponding to CH0 pulse. At the same time,
drive a timer T10 to count 5 second. If over 5 second and the absolute position data (32
bit) read not complete, it will drvie M10=On and this means the absolute position data (32
bit) read is abnormal.

4 When connecting to system, please set the power of DVP-PLC and SERVO AMP to be
On at the same time or set the SERVO AMP to be ON earlier than the power of DVP-PLC.
X7
DABS X0 Y4 D1336
TMR T0 K50
M11
M10
T0
SET M11
M1029
ABS read completed
execution completed
flag
Read overtime
ABS absol ute posi tion
data read is abnormal
ABS absol ute posi tion
data read completed

9 Application Commands API 150-199

DVP-PLC Application Manual

9-16
Wiring

X0
X1
X2
COM
+
24V
Y4
Y5
Y6
COM4
24
23
25
16 SG
PF
ZSP
TLC
CN1
PLC Controller
DVP-20EH
SERVO AMP
MR-H-A
ABS(bit 0)
ABS(bit 1)
SERVO ON
SERVO AMP
MR-J2-A
CN1B
X0 D01 4
19
10
6
ZSP
TLC
SG
X1
X2
COM
Y4
Y5
Y6
5
8
9
SON
ABSM
ABSR
SON
D13
D14
12
44
45
transmitting data ready flag
ABS data mode transmitting
ABS data request
Footnote

4 Time chart explanation of DABSR command absolute position data read:
When DABSR command starts to execute, it will drive the signal of Servo On (SON)
and ABS data transmitting mode to output.
By the transmitting data ready flag and ABS request signal can confirm the
transmission and receipt of both sides and process the data transmission of current
value position data (32 bit) plus check data (6 bit).
Data is transmitted by ABS (bit0, bit1) two bits.
SON
ABSM
TLC
ABSR
ZSP
D01
AMP output
SERVO ON
ABS(bit 1)
ABS(bit 0)
ABS data
request
Transmitting
data ready
ABS data
mode transmitting
Current value position data 32-bit
+(plus) check data 6-bit
Controller output
AMP output
AMP output

9 Application Commands API 150-199

DVP-PLC Application Manual

9-17

4 This command is applicable to the Servo motor equipped with absolute positioning
function is connected, such as Mitsubishi MR-J2-A Servo drive.
4 The Servo motor with absolute positioning function should be rotated more than one
revolution and given the reset signal before manufacturing equipments. Please use one of
the following methods to proceed the first time zero point return:
1. Complete zero point return by using reset signal function to execute API 156 ZRN
command.
2. After using JOG or manual operation to adjust the zero point position of the
equipment, input reset signal SERVO AMP. As for the reset signal input, please refer
to the external switches diagram below to see if using DVP-PLC controller to output.
For the detail of the wiring between DVP-PLC and Mitsubishi MR-J2-A, please
refer to the API 159 DRVA.
CR 8
SG 10
reset
Use Mitsubishi MR-J2- A
as exampl e

4 Flags description:
M1010: In EH series MPU, when M1010= On, CH0 (Y0, Y1) and CH1 (Y2, Y3) will
output pulse while END command is executed. When output starts, M1010 will
automatically turn Off.
M1029: In EH series MPU, M1029=On after the first group pulse (Y0, Y1) pulse output
complete or other relative command complete execution.
M1030: In EH series MPU, M1030= On after the second group pulse (Y2, Y3) pulse
output complete.
M1334: In EH series MPU, CH0 (Y0, Y1) pulse stop output when M1334= On.
M1335: In EH series MPU, CH1 (Y2, Y3) pulse stop output when M1335= On.
M1336: In EH series MPU, CH0 (Y0, Y1) pulse output indication flag
M1337: In EH series MPU, CH1 (Y2, Y3) pulse output indication flag
M1346: In EH series MPU, ZRN command CLEAR output signal enable flag
4 Special registers description:
D1337, D1336: 1. D1337(HIGH WORD), D1336(LOW WORD) represents the
current value registers of positioning control commands (API 156
ZRN, API 157 PLSV, API 158 DRVI, API 159 DRVA) output to the
first output group Y0, Y1, the current value increases or decreases
in accordance with the direction of rotation.
2. D1337(HIGH WORD), D1336(LOW WORD) represents the total
number of output pulse of pulse output commands (API 57 PLSY,
API 59 PLSR) output to the first output group Y0, Y1.
D1338, D1339: 1. D1339(HIGH WORD), D1338(LOW WORD) represents the
current value registers of positioning control commands (API 156
ZRN, API 157 PLSV, API 158 DRVI, API 159 DRVA) output to the
second output group Y2, Y3, the current value increases or
decreases in accordance with the direction of rotation.
2. D1339(HIGH WORD), D1338(LOW WORD) represents the total
number of output pulse of pulse output commands (API 57 PLSY,
API 59 PLSR) output to the first output group Y2, Y3.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-18

D1340: Operates as the frequency setting of the first step acceleration and
last step deceleration when positioning control commands (API 57
PLSY, API 59 PLSR) are executed.
Setting range: This speed can not less than 10Hz. If the speed is less
than 10Hz or larger than max. output frequency, it will output by 10Hz.
Factory setting is 200Hz.
Note: When controlling stepping motor, please consider the
resonance of stepping motor and limit of initial frequency while setting
speed.
D1341, D1342: D1342(HIGH WORD), D1341(LOW WORD) represents as the
maximum speed setting when positioning control commands ((API
156 ZRN, API 158 DRVI, API 159 DRVA) are executed.
Setting range: it is 200KHz.
D1343: Operates as the Acceleration/Deceleration time setting in which
maximum speed (D1342, D1341) is achieved from the first step
acceleration and last step deceleration when positioning control
commands (API 156 ZRN, API 158 DRVI, API 159 DRVA) are
executed.
Setting range: This acceleration / deceleration time cant be less than
50ms. If it less than 50ms or larger than 5000ms, it will output by
50ms.Facotry setting is 100ms.
Note: When controlling stepping motor, please consider the
resonance of stepping motor and limit of initial frequency while setting
speed.

API

Applicable models
ES EP EH
156

D
ZRN


Zero Point Return
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

S
3

D
Note: Please refer to the command explanation for the
information of the usage range of Operand S
1
, S
2
,, D.

16-bit command(9 STEPS)
ZRN
Continuous
execution


32-bit command (17 STEPS)
DZRN
Continuous
execution

Flag: For the description of M1010,
M1029, M1030, M1334, M1335,
M1336, M1337, M1346, please refer
to the footnote of API 155 ABSR
command.

Command
Explanation

4 : Zero point return speed : Creep speed : Near point signal (DOG)
: Pulse output device (Please use transistor output as output module)
4 is specified as the zero point return speed as, 16-bit 10 to 32,767Hz or 32-bit 10
to 200,000Hz.
4 is specified as the creep speed, the lower speed after near point signal (DOG)
turns On and its available range is 10 to 32,767Hz.
4 is specified as the near point signal (DOG) input (A contact input). If any Y, M, S
device other than an input relay (X) is specified for the near point signal, it will be
affected by the scanning cycle of the PLC and the dispersion of zero point may be
large.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-19
4 Pulse output device only can be specified as Y0, Y2.
4 When executing API 158 DRVI and API 159 DRVA command, the PLC store the
FWD/REV pulse which increase or decrease during operation in current vlaue
registers (Y0: D1337,D1336, Y2: D1339, D1338) so that it can always know the
machine position. However, the data may lost when the power of PLC is Off.
Therefore, the machine should execute zero point turn during initial operation to input
the zero point.
Program
Example

4 When M10= On, a frequency of 20KHz outpus from Y0 and zero point return will be
energized. When it reaches the near point signal (DOG), X5= On and it will change to
creep speed. Then, a frequency of 1KHz outpus from Y0 and the command will be
energized. Pulses output will stop until X5=Off.
M10
ZRN K20000 K1000 X5 Y0

Footnote

4 Time chart explanation of reset signal output:
1. When reset flag M1346= On, the reset signal is sent to the servo drive when zero
point trun is completed.
2. Output device of reset signal:
CH0(Y0, Y1) reset output device (Y4)
CH1(Y2, Y3) reset output device (Y5)
M1336, M1337
inside 1ms
OFF
ON
ON
OFF
DOG ON Output near point
signal (DOG)
Creep speed
Reset si gnal Y4 or Y5
Pulse output monitor
reset si gnal
Zero return speed
Initial
posi tion
about 20ms
+ 1 scan time
program interrupt
scan i n circle

4 Explanation of zero point return operation:
1. When ZRN command is executed, accelerate to Zero point return speed
and start to move.
2. When the Near point signal (DOG) goes from Off to On, it will decelerate to Creep
speed .
3. When the Near point signal (DOG) goes from On to Off and the same time of pulse
output stop, the content value of current value register (D1337, D1336) of CH0
pulse or current value register (D1339, D1338) of CH1 pulse will be 0(zero). Also,
if the reset signal flag M1346= On, the reset signal Y4 or Y5 will output
simultaneously.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-20
4. When the operation of pulse output is completed and flag M1029, M1030 is
activated, indication flag M1336 sent by CH0 pulse or indication flag M1337 sent
by CH1 pulse will be Off.
5. Hence, the command can not search the position of Near point signal (DOG) and
the operation of ZRN command only can be processed in unidirection. In the
operation of ZRN command, the content value of current value register (D1337,
D1336) of CH0 pulse or current value register (D1339, D1338) of CH1 pulse will
decrease.
LSR
(DOG)
DOG
LSF
DOG front end detect DOG back end detect
( ) zero point positi on
initial position
Zero return speed
Motor
decelerate to
Creep speed
Near point
signal
ON switch near
zero point
Forward Backward
(Forward limit)
(Backward limit)
Front end Back end

6. This command is applicable to the Servo motor equipped with absolute positioning
function is connected, such as Mitsubishi MR-H-A Servo drive, MR-J2-A Servo
drvie. It can record current position even the power is Off. Besides, because the
current position of the servo drive can be read by API 155 ABSR command of
DVP-EH series PLC, the ZRN command should only be executed for one time.
After the power is Off, it is unnecessary to execute the ZRN command again.
7. When CH0 and CH1 pulse execute the ZRN command, the current value of pulse
output frequency will display in (D1394, D1395) and (D1396, D1397). After the
operation of ZRN command is completed, the last output frequency value will be
stored in (D1394, D1395) and (D1396, D1397).
8. When the drive contact of ZRN command is On, CH0 and CH1 pulse will read the
content value set by D1343t as aeceleration time. After accelerating to zero point
return speed, wait for the entry of the near point signal (DOG) and output the creep
speed of low speed by decelerating. Immediately stop output pulse when the near
point signal (DOG) turns Off..




9 Application Commands API 150-199

DVP-PLC Application Manual

9-21
API

Applicable models
ES EP EH
157

D
PLSV


Variable Speed Pulse Output
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

D
1

D
2

Note: Please refer to the command explanation for the information
of the usage range of Operand S
1
, S
2
, D.

16-bit command (7 STEPS)
PLSV
Continuous
execution


32-bit command (13 STEPS)
DPLSV
Continuous
execution

Flag: For the description of M1010,
M1029, M1030, M1334,
M1335, M1336, M1337, please
refer to the footnote of API 155
ABSR command.

Command
Explanation

4 : Pulse output frequency : Pulse output device (Please use transistor as
output module) : Rotation direction signal
4 is specified as pulse output frequemcy, 16-bit 1 to 32,767Hz and -1 to -32,768
Hz or 32-bit 1 to 200,000Hz, -1 to -200,000 Hz. The (+) and (-) symbol indicates the
positive and negative direction. The pulse output frequency can be changed even
when pulses are being output.
4 Pulse output device only can be specified as Y0, Y2.
4 is specified as rotation direction signal and it operates following the polarity of
. When is positive (+), is On. When is negative (-), is
Off.
4 PLSV command do not has acceleration/deceleration setting function. Therefore,
acceleration/deceleration are not performed at start and stop. If cushion start and stop
is desired, please increase or decrease the output pulse frequency by using API 67
RAMPcommand.
4 If the drive contact turns Off while PLSV command execute to output pulse, the
machine will stop without deceleration.
4 When the drive contact of PLSV command truns Off, it is impossible to drive PLSV
command again even if the pulse send indication flag M1336 of CH0 pulse or pulse
send indication flag M1337 of CH1 pulse is set.
Program
Example

4 When M10= On, a frequency of 20KHz outputs from Y0. Y5= On represents the
positive direction.
M10
PLSV K20000 Y0 Y5




9 Application Commands API 150-199

DVP-PLC Application Manual

9-22
API

Applicable models
ES EP EH
158

D
DRVI


Drive to Increment
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
1

D
2

Note: Please refer to the command explanation for the
information of the usage range of Operand S
1
, S
2
, D
1
, D
2
.

16-bit command(9 STEPS)
DRVI
Continuous
execution


32-bit command (17 STEPS)
DDRVI
Continuous
execution

Flag: For the description of M1010,
M1029, M1030, M1334,
M1335, M1336, M1337,
M1346, please refer to the
footnote.

Command
Explanation

4 : Numbers of pulses (Target device) : Pulse output frequency :
Pulse output designation device (Please use transistor as output module) :
Rotation direction signal
4 is specified as the numbers of pulses (relative positioning). The available
numbers of are:
4 16-bit command: -32,768 to +32,767
4 32-bit command: -999,999 to +999,999. The positive (+) and negative (-) symbol
indicates the forward and reverser direction.
4 is specified as the pulse output frequency. The available numbers of are:
4 16-bit command: 10 to 32,767Hz
4 32-bit command: 10 to 200,000Hz
4 is specified as pulse output designation device. In EH series models, it only can
be specified as Y0, Y2.
4 is specified as rotation direction signal and it operates following the polarity of
. When is positive (+), is On. When is negative (-), is
Off.
4 The numbers of pulses will be stored in current value register (D1337 high byte, D1336
low byte) of CH0 pulse or current value register (D1339 high byte, D1338 low byte) of
CH1 pulse. When rotation direction is negative, the content value of current value
register will decrease.
4 The contents of each operand can not be changed while the DRVI command is
executed. The contents will be changed when the next execution is driven.
4 If the drive contact turns off when the DRVI command is executed, the machine will
decelerates and stops and the execution completed flag M1029, M1030 does not turn
On.

9 Application Commands API 150-199

DVP-PLC Application Manual

9-23
4 When the drive contact of DRVI command turns Off, it is impossible to drive DRVI
command again even if the pulse send indication flag M1336 of CH0 pulse or pulse
send indication flag M1337 of CH1 pulse is set.
Program
Example

4 When M10= On, twenty thousands (20000) of 2KHz frequency pulses outputs from Y0
(relative positioning). Y5= On represents the positive direction.
M10
DRVI K20000 K2000 Y0 Y5

Footnote

4 Operation explanation of relative positioning control: Using a positive or a negative
symbol to specify travel distance from the current position is also a kind of drive method
of relative positioning control.
+3,000
-3,000
0
Current
position

4 Settings of relative positioning and operation speed:
Initial value: 100ms
(D1343)
(D1343)
Initi al value(default) 200,000Hz :
(D1342,D1341)
(D1340)
(D1340)
Actual
time
acceleration
Output pul se
frequency
Maximum speed
Current
position
Last step
deceleration
Fi rst step
acceleration
Actual
time
deceleration
Output pul se
numbers
Accel/Decel time
Accel/Decel time
Initial value 100ms :
4 The minimum value of output pulse frequency which can be actually used is deternined
by the following equation:
1. Minimum value of output pulse frequency =
MaxSpeed [D1342,D1341]Hz ( 2 (Acceleration\Deceleration [ D1343]ms 1000 ))
2. Even if the specified pulse output frequency is lower than the value of the
calculation value of the equation above, the calculation value of the equation above
will still be actually used while outputting the pulses.
3. The actual output pulse frequency of the first step acceleration and last step
deceleration also use the calculation value of the equation above as the minimum value.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-24
4 See below for an example:
1. Minimum value of output pulse frequency =
50000Hz ( 2 (100ms 1000 )) 500Hz =
.
2. Although the specified output pulse frequency is equal to 400 Hz (lower than
the calculation value, 500 Hz), the frequency of 500 Hz will be still be used when
output the pulses.
3. If specifying the output pulse frequency = 50,000 Hz, minimum value of
output pulse frequency for the first step acceleration and last step deceleration will
still be the calculation value, 500 Hz.

50000Hz
500Hz 500Hz

4 Flags description:
M1010: In EH series MPU, when M1010= On, Y0, Y1 and Y2, Y3 will output pulse
while END command is executed. When output starts, M1010 will
automatically turn Off.
M1029: In EH series MPU, M1029= On after Y0, Y1 pulse output complete.
In EP/ES series MPU, M1029= On after Y0 pulse output complete.
M1030: In EH series MPU, M1030= On after Y2, Y3 pulse output complete.
In EP/ES series MPU, M1030= On after Y1 pulse output complete.
M1334: In EH series MPU, CH0 (Y0, Y1) pulse stop output when M1334= On.
M1335: In EH series MPU, CH1 (Y2, Y3) pulse stop output when M1335= On.
M1336: In EH series MPU, CH0 (Y0, Y1) pulse output indication flag
M1337: In EH series MPU, CH1 (Y2, Y3) pulse output indication flag
M1346: In EH series MPU, ZRN command output signal enable flag
9 Application Commands API 150-199

DVP-PLC Application Manual

9-25

4 Special registers description:
D1337, D1336: 1. D1337(HIGH WORD), D1336(LOW WORD) represents the current
value registers of positioning control commands (API 157 PLSV, API
158 DRVI, API 159 DRVA) output to the first output group Y0, Y1, the
current value increases or decreases in accordance with the direction
of rotation.
2. D1337(HIGH WORD), D1336(LOW WORD) represents the total
number of output pulse of pulse output commands (API 57 PLSY, API
59 PLSR) output to the first output group Y0, Y1.
D1338, D1339: 1. D1339(HIGH WORD), D1338(LOW WORD) represents the current
value registers of positioning control commands (API 157 PLSV, API
158 DRVI, API 159 DRVA) output to the second output group Y2, Y3,
the current value increases or decreases in accordance with the
direction of rotation.
2. D1339(HIGH WORD), D1338(LOW WORD) represents the total
number of output pulse of pulse output commands (API 57 PLSY, API
59 PLSR) output to the first output group Y2, Y3.
D1340: Operates as the frequency setting of the first step acceleration and last
step deceleration when positioning control commands (API 156 ZRN,
API 158 DRVI, API 159 DRVA) are executed.
Setting range: 1/10 or less of maximum speed (D1342, D1341)
If the current value exceeds the range, it is automatically set to 1/10 of
the maximum speed during operation.
3. Note: When controlling stepping motor, please consider the
resonance of stepping motor and limit of initial frequency while
setting speed.
D1341, D1342: D1342(HIGH WORD), D1341(LOW WORD) represents as the maximum
speed setting when positioning control commands (API 156 ZRN, API
158 DRVI, API 159 DRVA) are executed.
Setting range: 10 to 200,000Hz, the factory setting (default) is 200,000Hz
Note: The output pulse frequency specified by operand S
2
of API 158
DRVI command should be under this maximum speed.
D1343: Operates as the Acceleration/Deceleration time setting in which
maximum speed (D1342, D1341) is achieved from the first step
acceleration and last step deceleration (D1340) when positioning control
commands (API 156 ZRN, API 158 DRVI, API 159 DRVA) are executed.
Setting range: 50 to 5,000 ms, the factory setting (default) is 100ms


9 Application Commands API 150-199

DVP-PLC Application Manual

9-26
API

Applicable models
ES EP EH
159

D
DRVA


Data Backup MEMORY Write In
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
1

D
2

Note: Please refer to the command explanation for the
information of the usage range of Operand S
1
, S
2
, D
1
, D
2
.

16-bit command (9 STEPS)
DRVA
Continuous
execution


32-bit command (17 STEPS)
DDRVA
Continuous
execution

Flag: For the description of M1010,
M1029, M1030, M1334, M1335,
M1336, M1337, M1346, please refer
to the footnote of API 158 DRVI
command.

Command
Explanation

4 : Numbers of pulses (Target device) : Pulse output frequency :
Pulse output designation device (Please use transistor as output module) :
Rotation direction signal
4 is specified as the numbers of pulses (absolute positioning). The available
numbers of are: 16-bit command: -32,768 to +32,767
32-bit command: -2,147,483,648 ~ +2,147,483,647. The positive (+) and negative (-)
symbol indicates the forward and reverser direction.
4 is specified as the pulse output frequency. The available numbers of are:
16-bit command: 10 to 32,767Hz. 32-bit command: 10 to 200,000Hz
4 is specified as pulse output designation device. In EH series models, it only can
be specified as Y0, Y2.
4 is specified as rotation direction signal and it operates following the polarity of
. When is positive (+), is On. When is negative (-), is
Off
4 The numbers of pulses will be stored in current value register (D1337 high byte, D1336
low byte) of CH0 pulse or current value register (D1339 high byte, D1338 low byte) of
CH1 pulse. When rotation direction is negative, the content value of current value
register will decrease.
4 The contents of each operand can not be changed while the DRVA command is
executed. The contents will be changed when the next execution is driven.
4 If the drive contact turns off when the DRVA command is executed, the machine will
decelerates and stops and the execution completed flag M1029, M1030 does not turn
On. D1343 is used to set acceleration / deceleration time.
4 When the drive contact of DRVA command turns Off, it is impossible to drive DRVA
command again even if the pulse send indication flag M1336 of CH0 pulse or pulse
send indication flag M1337 of CH1 pulse is set.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-27
Program
Example

4 When M10= On, twenty thousands (20000) of 2KHz frequency pulses outputs from Y0
(absolute positioning), Y5= On represents the positive direction.
M10
DRVA K20000 K2000 Y0 Y5

Footnote

4 Operation explanation of absolute positioning control: Specifying travel distance from a
zero point is also a kind of drive method of absolute positioning control.
+3,000
0
0
Zero point
Target posi tion
F0 first step acceleration
(D1340) min. speed: 10Hz
last step deceleration

4 Settings of absolute positioning and operation speed:
T Accel/Decel time
Current
position
Accel/Decel time
(D1342,D1341)
(D1340) (D1340)
min. speedG10Hz
F0 last step (deceleration)
F0 first step
(acceleration)
min. speedG10Hz
output pulse frequency
Tg acceleration
sampling time
Fa accelerated gradient
Initial value: 200,000Hz
F max. speed
Initial value: 50ms
(D1343)
Initial value: 50ms
(D1343)
output
pulse
number

4 The relation between actual frequency and acceleration / deceleration time is in the
following:
Tg: sampling time of acceleration / deceleration
T: acceleration / deceleration time
Fa: acceleration / deceleration gradient
F: Max. frequency
F0: first step acceleration, last step deceleration
P: total pulse number
1. Tg = T / ( 60 * 1000 )
2. Fa = (F F0) / 60
3. P0 (output pulse number of first step (acceleration)/last step (deceleration)) = 1
4. Each segment frequency:
i. F(n) = F0 + Fa * n ( n = 1~60)
5. Output pulse number of each segment:
Restriction:
1. When each segment of output pulse number P(n)1, PLC wont output pulse and
jump to next segment.
2. Speed of first step (acceleration) and last step (deceleration) F0 cant less than
10Hz. If it is less than 10Hz or larger than max. output frequency, it will output 10Hz.

) ( * ) ( n F Tg n P =
9 Application Commands API 150-199

DVP-PLC Application Manual

9-28
3. If total pulse number P 3, acceleration/deceleration function will be invalid.
4 Wiring of DVP-EH series and Delta ASDA servo drive:
COM-
/PLS 43
47
COM-
/SIGN 36
49
/OZ
COM-
24
EH MPU
L
N
X0
X1
X2
X3
X4
X5
X6
S/S
Y2
C2
start
zero poi nt reset
forward limit
JOG(+)
reverse limit
3
-
p
h
a
s
e

p
o
w
e
r
R
S
T
U
V
W
ASDA series
Del ta Servo Drive
s
e
r
v
o

m
o
t
o
r
24V
CN1
VDD
COM+
DI 1
DI 5
DI 6
DI 1
DI 5
DI 6
DI 7
DI 8
: servo start
: servo reset
: forward li mi t
: reverse li mi t
: emergency stop
COM-
DI 2
+24V
X7
24G
JOG(-)
stop
error reset
DO_COM
X10
X11
X12
X13
X14
SRDY
ZSPD
TPOS
ALARM
DI 7
DI 8
17
11
9
33
32
31
30
CN1
Z phase signal (zero point signal )
Error
Counter
Electric
Gear
200KPPS
Encoder CN2
10
45
pulse clear
Y0
C0
pulse output
Y1
C1
forward/reverse direction
DVP32EH00T
CN1
26
1
2
3
4
5
6
7 DO1+
DO2+
DO3+
DO4+
DO1-
DO2-
DO3-
DO4-
SRDY
ZSPD
TPOS
ALARM
DO_COM
220VAC
single-phase
220VAC
COM- 50
45
DO_COM
Note:
Please connect forward/reverse limit switch to SERVO AMP.
4 Wiring example of connection between DVP-EH series PLC and a Mitsubishi
MR-J2-A Servo drive:
9 Application Commands API 150-199

DVP-PLC Application Manual

9-29
Error
Counter
Electric
Gear
pulse clear
pulse output
forward/reverse direction
SG
PP 3
10
SG
NP 2
10
OP
LG
14
EH MPU
L
N
X0
X1
X2
X3
X4
X5
X6
S/S
Y2
C2
start
zero poi nt reset
forward limit
JOG(+)
reverse limit
3
-
p
h
a
s
e

p
o
w
e
r
R
S
T
U
V
W
MR-J2 series
Mitsubi shi servo drive
s
e
r
v
o

m
o
t
o
r
CN1B
SON
RES
LSP
LSN
TL
SON
RES
LSP
LSN
TL
Gservo start
Gservo reset
Gforward li mi t
Greverse li mi t
Gemergency stop
SG
CR
+24V
X7
24G
JOG(-)
stop
error reset
X10
X11
X12
X13
X14
EMG
SG
5
14
16
17
9
15
10
CN1A
Z phase signal
(zero poi nt ) signal
8
20
Y0
C0
Y1
C1
DVP32EH00T
servo
malfunctioin
Rcal1
Rcal2
Rcal3
SV-END
SV-READY
1
RD
INP
ALM
VDD
COM
24V
Rc3
Rc2
Rc1
5
14
18
18
13
CN1A
CN1B
220VAC
single power
220VAC
200KPPS
Encoder CN2

1. Connect to PLC when detecting absolute position.
2. Connect the forward/reverse limit switch to the SERVO AMP.
Cautions when designing position control program:
4 There are no using time limit for position control command API 156 ZRN, API 157
PLSV, API 158 DRVI, API 159 DRVA. User can use these commands many times in a
program but be sure to follow the following cautions below:
1. Do not drive the position control commands which use the same output CH0(Y0,
Y1) or CH1(Y2, Y3) simultaneously. Otherwise, they will be treated as double coils
and can not function correctly.
2. It is recommended to use step ladder commands (STL) to design positioning
control program (please see the programming example shown below).
4 Notes when using position control commands API 156 ZRN, API 157 PLSV, API 158
DRVI, API 159 DRVA with pulse output commandsAPI 57 PLSY, API 58 PWM, API 59
PLSR:


9 Application Commands API 150-199

DVP-PLC Application Manual

9-30
The current value register (D1337 high byte, D1336 low byte) of CH0 pulse or current
value register (D1339 high byte, D1338 low byte) of CH1 will both be used in position
control commands and pulse output commands and this will result in complicated
operation. To avoid incorrect operation when pulse output commands are required while
position control commands are used, it is recommended to use position control
commands in place of pulse output commands.
4 Explanation of pulse output terminals Y0, Y1of CH0 pulse and Y2, Y3 of CH1 pulse:
1. Voltage range: DC5V to DC24V
2. Current range: 10 mA to 100 mA
3. Output pulse frequency: Y0, Y2 is 200KHz, Y1, Y3 is 10KHz.
Pulse output signal settings of positioning operation:
4 There are three kinds of pulse output signal of positioning operation for DVP-EH series
PLC:
1. 1-phase 1 output + direction (it is recommended to use this)
U/D
U/D FLAG

2. 1-phase 2 outputs (frequency limit is 10KHz)
U
D
3. 2-phase 2 outputs (frequency limit is 10KHz)
A
B
4 Please follow the PLC output settings above to set the pulse input type of parameters
on SERVO AMP or stepping motor.
4 Flags description:
M1010: In EH series MPU, when M1010= On, CH0 (Y0, Y1) and CH1 (Y2, Y3) will
output pulse while END command is executed. When output starts, M1010 will
automatically turn Off.
M1029: In EH series MPU, M1029= On after first group pulse CH0 (Y0, Y1) pulse
output complete or other relative commands complete execution.
M1030: In EH series MPU, M1030= On after second group pulse CH1 (Y2, Y3) pulse
output complete.
M1334: In EH series MPU, CH0 (Y0, Y1) pulse stop output when M1334= On.
M1335: In EH series MPU, CH1 (Y2, Y3) pulse stop output when M1335= On.
M1336: In EH series MPU, CH0 (Y0, Y1) pulse output indication flag
M1337: In EH series MPU, CH1 (Y2, Y3) pulse output indication flag
M1346: In EH series MPU, ZRN command output signal enable flag
9 Application Commands API 150-199

DVP-PLC Application Manual

9-31
4 Special registers description of EH series MPU:
D1220:
The phase setting of the first output group Y0, Y1: determine by the last two
bits of D1220, other bits are invalid.
1. K0: Y0 output
2. K1: Y0, Y1 AB phase output, A leads B
3. K2: Y0, Y1 AB phase output, B leads A
4. K3: Y1 output
D1221:
The phase setting of the second output group Y2, Y3: determine by the last two
bits of D1221, other bits are invalid.
1. K0: Y2 output
2. K1: Y2, Y3 AB phase output, A leads B
3. K2: Y2, Y3 AB phase output, B leads A
4. K3: Y3 output
4 When several high speed pulse output commands (PLSY, PWM, PLSR) and position
control commands (ZRN, PLSV, DRVI, DRVA) all use Y0 to output pulse in one
program and simultaneously been executed in the same scanning cycle, PLC will
perform the command which has fewest step numbers.
Programming example for forward/reverse operation:
4 For wiring, please refer to the wiring example of connection between DVP-EH series
PLC and a Mitsubishi MR-J2-A Servo drive.
4 There is one operation positionng is performed by using the absolute position method
shown below:
500Hz
500Hz
500000
100
200ms
200,000Hz
Zero point
Output pul se frequency
Acceleration/
Decel erati on time

4 In this example, the minimum output pulse frequency calculated by equation=
MaxSpeed [D1342,D1341]Hz ( 2 (Acceleration\Deceleration [ D1343]ms 1000 ))

as the actual minimum output pulse frequency=
200,000Hz ( 2 (100ms 1000 )) 1,000Hz =
.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-32

4 Programming example when using step ladder command (STL):
M1002
S0 S10 S11 S12 S13
M1000
X0
JOG(+) JOG(-)
1
1
200,000Hz D1342,D13
200ms D1343
DMOV K10000 D1341
MOV K200 D1343
S1334
M5
M1334
M1346
Y0
Stop
Zero point
return
Output to X-axis (Y0)
is stopped
Return to the zero poi nt
with reset signal is valid
Operation is stopped
Positi oning
in normal
rotation
Positi oning
in reverse
rotation
output stop
Set the maximum speed
Set the accel erati on/
deceleration time

1. If the maximum speed (D1342,D1341), the acceleration/deceleration (D1343) can set
in their factory setting value (default), then the programming is not required. The
factory setting value (default) of the maximum speed (D1342,D1341) is 200,000Hz.
The factory setting value (default) of the acceleration/deceleration (D1343) is 100
ms.

9 Application Commands API 150-199

DVP-PLC Application Manual

9-33

X1
RST M10
M5
RST M12
RST M13
SET S0
X2
RST M12
M5
RST M13
SET S10
X3
RST M12
M5
RST M13
SET S11
X4
RST M12
M5
RST M13
SET S12
M10
X5
RST M12
M5 M10
JOG(+)
2
JOG(-)
2
Zero point
return
Operation
being stopped
Operation
being stopped
Operation
being stopped
Operation
being stopped
Positi oni ng
in normal
rotation
Positi oni ng
in reverse
rotation
Operation
being stopped
Zero point
return
completed
flag
Zero point
return
completed
flag
Reset the reverse rotation
posi tioning completed fl ag
Reset the normal rotation
posi tioning completed fl ag
Drive the normal rotation
posi tioning status(S12)
Reset the reverse rotation
posi tioning completed fl ag
Reset the normal rotation
posi tioning completed fl ag
Reset the reverse rotation
posi tioning completed fl ag
Reset the normal rotation
posi tioning completed fl ag
Drive the JOG(-) status (S11)
Drive the JOG(+) status (S11)
Reset the reverse rotation
posi tioning completed fl ag
Reset the normal rotation
posi tioning completed fl ag
Reset the reverse rotation
posi tioning completed fl ag
Reset the normal rotation
posi tioning completed fl ag
Reset the reverse rotation
posi tioning completed fl ag
Reset the normal rotation
posi tioning completed fl ag
Reset the reverse rotation
posi tioning completed fl ag
Reset the normal rotation
posi tioning completed fl ag
Drive the zero poi nt return
status (S0)
Reset the zero point return
completed flag
RST M13
SET S13
Drive the reverse rotation
posi tioning status(S13)
2. The maximum size of a JOG command is 999,999 pulses, as this is equal to the
maximum number of output pulses for API 158 DRVI command. If a greater distance is
required, please execute the JOG command again.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-34


S0 M50
M50
M1000
S10
DDRVI K999999 K30000 Y0 Y4
X2
RST S10
M1336 M51
M51
M1000
M51
S11
DDRVI K-999999 K30000 Y0 Y4
X3
RST S11
M1336 M52
M52
M1000
M52
3
JOG(+) JOG(+)
3
3
JOG(-) JOG(-)
Zero point return is completed
(auto-reset)
Execution
completed
RST S0
M1336 M50
Y0 being
output
DZRN K50000 K5000 X6 Y0
SET M10
M1029
Zero point
return
Zero point
return
speed
Creep
speed
Near point
signal (DOG)
Pul se output
devi ce
Zero point return command
operate i n the (-) direction
Reset the zero point return
completed flag
Y0 being
output
(maximum
value in (+)
direction)
Output pul se
numbers
Output
pulse
frequency
Output
pulse
devi ce
Rotati on
di rection
signal output
devi ce
JOG(+) operati on is completed
(auto-reset)
JOG(-) operation is completed
(auto-reset)
Using relative positioning
command execute the JOG
operation in the (+) direction
(Y4=On)
(maximum
value in (-)
direction)
Output pul se
numbers
Output
pulse
frequency
Output
pulse
devi ce
Rotati on
di rection
signal output
devi ce
Using relative positioning
command execute the JOG
operation in the (-) direction
(Y4=Off)
Y0 being
output
RUN monitor

3. In order to prevent position control commands being driven at the same time, the
command drive timing is delayed by one scanning cycle.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-35
S12
DDRVA K500000 K100000 Y0 Y4
M53
SET M12
M1029
RST M12
M1336 M53
M53
M1000
S13
DDRVA K100 K100000 Y0 Y4
M54
SET M13
M1029
RST M13
M1336 M54
M54
M1000
Positi oni ng
in normal
rotation
Positi oni ng
in reverse
rotation
Execution
completed
Execution
completed
Reverse rotation positi oni ng
completed flag
Normal rotation posi tioning
completed flag
Normal rotation posi tioning
is completed (auto-reset)
Reverse rotation positi oni ng
is completed (auto-reset)
Y0 being
output
Y0 being
output
Using absolute positioning
command move to the
absolute position ? 00000
(Y4=On)
Using absolute positioning
command move to the
absolute position ? 00
(Y4=Off)
RET
END



API

Applicable models
ES EP EH
160


TCMP
P

Time Compare
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

S
3

S
D
Note: The range of operand S
1
, S
2
, S
3
: S
1
=0~23, S
2
=S
3
=S0~59
Operand S occupies 3 continuous devices.
Operand D occupies 3 continuous devices.
Refer to each model specification for usage range.

16-bit command (11 STEPS)
TCMP
Continuous
execution
TCMPP
Pulse
execution

32-bit command

Flag: None

9 Application Commands API 150-199

DVP-PLC Application Manual

9-36
Command
Explanation

4 : setting the hour of comparison time, setting range is K0~K23 : setting
the minute of comparison time, setting range is K0~K59 : setting the second
of comparison time, setting range is K0~K59 : Current time of real time clock
: Comparison result
4 , , is compared to the current value of the head address and
save the comparsion result in .
4 is the hour of current time and the content is K0~K23. +1 is the minute of
current time and the content is K0~K59. +2 is the second of current time and the
content is K0~K59.
4 The current time of real time clock specified by is read by using TRD command
previously and then compared by using TCMP command. If the content of
exceeds the range, it will result in operation error. At this time, the command wont
be executed and M1067=On, M1068=On, records error code 0E1A (HEX) in D1067.
Program
Example

4 When X10= On, the command is executed and the current time of real time clock in
(D20~D22) is compared to the set value 12:20:45 and the result is shown at
M10~M12. When X10 goes from OnOff, the command is not executed but the
On/Off state before M10~M12 is kept.

4 Connect M10~M12 in series or in parallel and then the result of , , are given.
X10
M10
TCMP K12 K20 K45 D20 M10
M11
M12
ON when 12:20:45
ON when 12:20:45
ON when 12:20:45
>
=
<



API

Applicable models
ES EP EH
161


TZCP
P

Time Zone Compare
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

S
D
Note: Operand S
1
, S
2
, S occupies 3 continuous devices.
S
1
should be less than S
2
, i.e. S
1
S
2

Operand D occupies 3 continuous devices.
Refer to each model specification for usage range.

16-bit command (9 STEPS)
TZCP
Continuous
execution
TZCPP
Pulse
execution

32-bit command

Flag: None

9 Application Commands API 150-199

DVP-PLC Application Manual

9-37
Command
Explanation

4 : Lower limit time data : Upper limit time data : Current time of real
time clock : Comparison result
4 is compared to the time period of ~ and the comparsion result is
stored in .
4 , +1, +2: respectively represent Hours, Minutes, Seconds of
the lower limit time data.
4 , +1, +2: respectively represent Hours, Minutes, Seconds of
the Upper limit time data
4 , +1, +2: respectively represent Hours, Minutes, Seconds of
the current time of perpetual calender.
4 The current time of real time clock specified by is read by using TRD command
previously and then compared by using TZCP command. If the content of
S
,
, exceeds the range, it will result in operation error. At this time, the
command wont be executed and M1067=On, M1068=On, records error code 0E1A
(HEX) in D1067.
4 If < , is On. If > , +2 is On. Besides these two
situations, +1 is On. (Lower bound should be less than upper bound
.)
Program
Example

4 When X10= On, the command is executed and one of M10~M12 will be On. When
X10=Off, the command is not executed but the state of M10~M12 before X10=Off is
kept.
X10
M10
TZCP D0 D10 D20 M10
M11
M12
ON when
ON when
ON when


API

Applicable models
ES EP EH
162


TADD
P

Time Addition
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D

Note: Operand S
1
, S
2
, D occupies 3 continuous devices.
Refer to each model specification for usage range.

16-bit command (7 STEPS)
TADD
Continuous
execution
TADDP
Pulse
execution

32-bit command

Flag: M1020 (Zero flag)
M1022 (Carry flag)
9 Application Commands API 150-199

DVP-PLC Application Manual

9-38
Command
Explanation

4 : Time augend : Time addend : Addition result
4 + = . The time data in the register specified by is added to
the time data in the register specified by and the addition result is stored in the
register specified by .
4 If the time data in , exceeds the range, it will result in operation error. At
this time, the command wont be executed and M1067=On, M1068=On, records error
code 0E1A (HEX) in D1067.
4 If the addition result is in a value greater than 24 hours, the Carry flag M1022=On. The
value of the result shows in is the time remaining above 24 hours.
4 If the addition result is equal to 0 (zero, 0 hour, 0 minute, 0 second), the Zero flag
M1020= On.
Program
Example

4 When X10= On, the command is executed. Add the time data specified by D0~D2 and
D10~D12 and store the result in the register specified by D20~D22.
X10
TADD D0 D10 D20
8
20
6
40
6
14
26
50 10
08:10:20 06:40:06 14:50:26

4 If the addition result is in a value greater than 24 hours, the Carry flag M1022=On.
X10
TADD D0 D10 D20
30
11
30
8
6
38
10 40
18:40:30 11:30:08 06:10:38
18


API

Applicable models
ES EP EH
163


TSUB
P

Time Subtraction
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Operand S
1
, S
2
, D occupies 3 continuous devices.
Refer to each model specification for usage range.
ES series models do not support this command (TSUB,
TSUBP).

16-bit command (7 STEPS)
TSUB
Continuous
execution
TSUBP
Pulse
execution

32-bit command

Flag: M1020 (Zero flag)
M1021 (Borrow flag)

9 Application Commands API 150-199

DVP-PLC Application Manual

9-39
Command
Explanation

4 : Time Minuend : Time Subtrahend : Subtraction result
4 = . The time data in the register specified by is subtracted
from the time data in the register specified by and the result is stored in the
register specified by .
4 If the time data in , exceeds the range, it will result in operation error. At
this time, the command wont be executed and M1067=On, M1068=On, records error
code 0E1A (HEX) in D1067.
4 If the subtraction result is a negative value (less than 0), the Zero flag M1020= On.
The value of the result shows in is the time remaining below 0 (zero) hour.
4 If the subtraction result is equal to 0 (zero, 0 hour, 0 minute, 0 second), the Zero flag
M1020= On.
4 Except using API 166 TRD command, MOV command also can be used to move the
special register D1315 (Hours), D1314 (Minutes), D1313 (Seconds) to the three
registers specified to read the current time of real time clock.
Program
Example

4 When X10= On, the command is executed. The time data specified by D10~D12 is
subtracted from the time data specified by D0~D2 and the result is stored in the
register specified by D20~D22.
X10
TSUB D0 D10 D20
14
30
8
5
57
49 20
20:20:05 14:30:08 05:49:57
20
5

4 If the subtraction result is a negative value (less than 0), the borrow flag M1021= On.
X10
TSUB D0 D10 D20
19
11
15 15
9 20
05:20:30 19:11:15 10:09:15
5
30
10









9 Application Commands API 150-199

DVP-PLC Application Manual

9-40
API

Applicable models
ES EP EH
166


TRD
P

Time Data Read
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
D
Note: Operand D occupies 7 continuous devices.
Refer to each model specification for usage range.

16-bit command (5 STEPS)
TRD
Continuous
execution
TRDP
Pulse
execution

32-bit command

Flag: M1016, M1017, M1076
(Please refer the footnote for detail.)

Command
Explanation

4 : The device stored the reading current time of perpetual calender
4 A perpetual calender clock is built in the DVP-EH/EP series PLC and this clock
provide year (A.D.), week, month, date, hours, minutes and seconds total 7 data
devices stored in D1319~D1313. The function of TRD command is for program
designer to read the current time of perpetual calender directly and store the reading
data in the 7 data registers specified by .
4 D1319 is read as a two digit number and this setting can be change to a four digit
number, please refer the footnote of API 167 TWR command for the detail.
Program
Example

4 When X0=On, read the current time of perpetual calender to the specified register
D0~D6.
4 The content of D1318: 1 is indicated Monday, 2 is indicated Tuesday,, 7 is indicated
Sunday.
D0 TRD
X0

Special D
device
Meaning Content
General D
device
Meaning
D1319 Year (A.D.) 00~99

D0 Year (A.D.)
D1318
Day
(Mon.~Sun.)
1~7

D1
Day
(Mon.~Sun.)
D1317 Month 1~12

D2 Month
D1316 Date 1~31

D3 Date
D1315 Hours 0~23

D4 Hours
D1314 Minutes 0~59

D5 Minutes
D1313 Seconds 0~59

D6 Seconds

9 Application Commands API 150-199

DVP-PLC Application Manual

9-41
Footnote

4 Error Flag of the real time clock built in DVP-EH/EP series PLC:
Device Name Function
M1016 year display
of perpetual
calender
It displays 2 right-most digit number of year of D1319
when it is Off.
It displays (2000+ 2 right-most digit number of year of
D1319) when it is On.
M1017 30 seconds
correction
It will correct when it is from Off On. (if it is 0-29
seconds, it will reset to 0. If it is 30-59 seconds, add 1 to
minute and set 0 to second)
M1076 perpetual
calender fault
It will be On when setting is out of range or run out of
battery. (it only check when power is on)

Device Name Range
D1313 Second 0-59
D1314 Minue 0-59
D1315 Hour 0-23
D1316 Day 1-31
D1317 Month 1-12
D1318 Week 1-7
D1319 Year 0-99 (two right-most digit number of year)
4 The method to correct perpetual calender:

4 There are two methods to correct built-in API perpetual calender:
1. specified command to correct
please refer to command TWR (API 167) for reference.
2. setting by peripheral
using WPLSoft (software to edit ladder diagram) to set
4 Display four digit number of year:
1. It usually displays 2 digit number of year (for example: only display 03 for year
2003). If you want to display 4 digit number, please key in following program at the
start of program.
M1002
SET M1016 display 4 digit number for year

2. It will display 4 bits (two right-most digit number + 2000) to replace original 2 digit
number.
3. If you want to write new time setting in 4 digit number display mode, only 2 digit
number you can write in and its range is 00-99 which corresponds to year
2000-2099. For example, 00=year 2000, 50=year 2050 and 99=year 2099.













9 Application Commands API 150-199

DVP-PLC Application Manual

9-42
API

Applicable models
ES EP EH
167


TWR
P

Time Data Write In
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
Note: Operand D occupies 7 continuous devices.
Refer to each model specification for usage range.

16-bit command (5 STEPS)
TWR
Continuous
execution
TWRP
Pulse
execution

32-bit command

Flag: M1016, M1017, M1076
Please refer the footnote of API 166
TRD command.

Command
Explanation

4 : The device stored the new setting time of perpetual calender
4 A perpetual calender clock is built in the DVP-EH/EP series PLC. This command can
be used to write the correct current time in the built-in perpetual calender clock when
adjusting the built in perpetual calender.
4 When executing this command, new setting time will be written in the internal
perpetual calender clock immediately. Therefore, please notice that the written-in new
setting time if match the current time then when executing this command.
4 If the time data in exceeds the range, it will result in operation error. At this
time, the command wont be executed and M1067=On, M1068=On, records error
code 0E1A (HEX) in D1067.
Program
Example
1

4 When X0= On, write the correct current time in the built-in perpetual calender clock.
D20 TWRP
X0


General D
device
Meaning Content
Special D
device
Meaning
D20 Year (A.D.) 00~99

D1319 Year (A.D.)
D21
Day
(Mon.~Sun.)
1~7

D1318
Day
(Mon.~Sun.)
D22 Month 1~12

D1317 Month
D23 Date 1~31

D1316 Date
D24 Hours 0~23

D1315 Hours
D25 Minutes 0~59

D1314 Minutes
N
e
w

s
e
t
t
i
n
g

t
i
m
e

D26 Seconds 0~59

D1313 Seconds
R
e
a
l

T
i
m
e

C
l
o
c
k



9 Application Commands API 150-199

DVP-PLC Application Manual

9-43
Program
Example
2

4 Set the current time of perpetual calender and adjust the time to 2002/03/23, Tuesday,
15:27:30 (please refer the following program example).
4 The content of D0~D6 is the new setting time of perpetual calender.
4 When X10= On, then can change the current time of perpetual calender clock to
setting time.
4 When X11=On every time, the perpetual calender clock will perform the 30 seconds
correction. Correction means that if the second hand of perpetual calender colock is
located between 1~29, the second time will be automatically calculated as 0 (zreo)
second and the minute time wont change. However, if the second hand of perpetual
calender colock is located between 30~59, the second time will also be automatically
calculated as 0 (zreo) second but the minute time will increase 1 minute.

X10
MOV K02 D0
MOV K2 D1
MOV K3 D2
MOV K26 D3
MOV K15 D4
MOV K27 D5
MOV K30 D6
TWR D0
M1017
X11
Year (2002)
Day (Tuesday)
Month(March)
Date
Hours
Minutes
Seconds
Write the setting time in the perpetual calender
30 seconds correction

Footnote

4 Using WPLSoftsoftware also can set the time of perpetual calender.
4 The year (A.D.) display four digit number:
1. The year usually only dispaly two digit number (for example, year 1998 only
display 98). But this can be changed to a four digit number by setting the following
program during the first program scan.
M1002
MOV
K2000 D1018
The year dispaly four digit number

2. The year display will switch from two digit number to four digit number after the first
scan program when PLC is running. K2,000 in the command is a fix value.
3. If the new setting time is desired to be written in under the four digit number mode,
also only two digit number can be written in. The range for the year of two digit
number is 0~99. Hence, the corresponding range for the year of four digit number
is 1980~2079.


9 Application Commands API 150-199

DVP-PLC Application Manual

9-44
For example:
80(a two digit number) is equal to 1980(a four digit number)
99(a two digit number) is equal to 1999(a four digit number)
00(a two digit number) is equal to 2000 (a four digit number)
79(a two digit number) is equal to 2079 (a four digit number)

API

Applicable models
ES EP EH
169

D
HOUR


Hour Meter
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
Note: Operand S only can use 16-bit command when using F
device.
Operand D
1
occupies 2 continuous devices.
Refer to each model specification for usage range.
Command HOUR can be used for four times in program.

16-bit command (7 STEPS)
HOUR
Continuous
execution


32-bit command
DHOUR
Continuous
execution

Flag: None

Command
Explanation

4 : setting time for turning on and unit is hour. Its setting range is
K1~K32,767. : current time suring counting and unit is hour. Its setting range is
K1~K32,767. : output device. +1 saves current time that less than one
hour and unit is second. Its setting range is K0~K3,599.
4 If using input contact to be timer, output device will be On when attaining setting time
(unit is hour). It can provide user a timer for managing machine operation or maintain.
4 After output device is On, timer will keep on counting.
4 When 16-bit timer counts up to max. value (32,767 hours and 3,599 seconds) of
16-bit, it will stop. If you want to recount, and +1 need to clear to 0.
- +3 need to clear to 0.
4 When 32-bit timer counts up to max. value (2,147,483,647 hours and 3,599 seconds)
of 16-bit, it will stop. If you want to recount, - +3 need to clear to 0.
Program
Example
1

4 For 16-bit command: When X0=On, Y10 will turns On and start to count time. When
the time reaches 100 hours, Y0 will turns On and D0 will record the current time (unit
is hour, but if D0 is less than one hour, unit will be second and its range is 0~3599).
HOUR
Y10
K100 Y0 D0
Y10
X0

Program
Example
2

4 For 32-bit command: When X0=On, Y10 will turns On and start to count time. When
the time reaches 40000 hours, Y0 will turns On. D0 and D1 will record the current time
(unit is hour). If current time is less than one hour, D2 will record the current time (unit:
second).
9 Application Commands API 150-199

DVP-PLC Application Manual

9-45
DHOUR
Y10
K40000 Y0 D0
Y10
X0


API

Applicable models
ES EP EH
170

D
GRY
P

BIN GRAY CODE
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Operands S and D only can use 16-bit command when
using F device.
Refer to each model specification for usage range.

16-bit command (5 STEPS)
GRY
Continuous
execution
GRYP
Pulse
execution

32-bit command (9 STEPS)
DGRY
Continuous
execution
DGRYP
Pulse
execution
Flag: None

Command
Explanation

4 : Source device : Device which store Gray code
4 The BIN value in the specified device by is converted to the GRAY CODE
equivalent and the converted result is stored in the area specified by .
4 The range of that can be converted to the GRAY CODE is shown as follows:
16-bit command 0~32,767
32-bit command 0~2,147,483,647
If the BIN value is outside the range shown above, it is determined as Operation Error.
At this time, the command wont be executed and M1067=On, M1068=On, records error
code 0E1A (HEX) in D1067.
Program
Example

4 When X0=On, constant K 6513 is converted to the GRAY CODE and stored in the
K4Y20.
X0
GRY K6513 K4Y20

0 0 0 1 1 1 0 0 0 1 1 1 1 0 0 0
b15 b0
K6513=H1971
0 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1
K4Y20
Y37 Y20
GRAY6513










9 Application Commands API 150-199

DVP-PLC Application Manual

9-46
API

Applicable models
ES EP EH
171

D
GBI N
P

GRAY CODE BIN
- -

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
Note: Refer to each model specification for usage range.

16-bit command (5 STEPS)
GBIN
Continuous
execution
GBINP
Pulse
execution

32-bit command (9 STEPS)
DGBIN
Continuous
execution
DGBINP
Pulse
execution
Flag: None

Command
Explanation

4 : Source device which store GRAY CODE : Device which store
converted BIN value
4 The GRAY CODE value in the specified device by is converted to the BIN value
equivalent and the converted result is stored in the area specified by .
4 This command can be used to read the value from an absolute position type encoder
(it is generally a gray code encoder) which is connected to PLC inputs. Convert the
value to the BIN value and store it in the specified register.
4 Program scan time plus input response time is equal to the output delay time specified
by .
4 If the source is set to inputs X0~X17, it can speed up the input response time by using
REFF command (API151) or D1020 (adjust input response time).
4 The range of that can be converted to the GRAY CODE is shown as follows:
16-bit command 0~32,767
32-bit command 0~2,147,483,647
If the GRAY CODE value is outside the range shown above, it is determined as
Operation Error.
Program
Example

4 When X20=On, the GRAY CODE value in the absolute position type encoder
connected to X0~X17 inputs is converted to BIN value and stored in D10.
X20
GBIN K4X0 D10

0 0 0 1 1 0 1 1 1 0 0 0
b15 b0
H1971=K6513 0 0 0 0 0 0 1 1 1 1 1 1
X17 X0
GRAY6513
K4X0
0 1 0 1
0 0 1 0






9 Application Commands API 150-199

DVP-PLC Application Manual

9-47
API

Applicable models
ES EP EH
180


MAND
P

Matrix AND
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
n
Note: specific range of operand n is 1~256.
For EP series, when operands S
1
, S
2
and D designate KnX,
KnY, KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (9 STEPS)
MAND
Continuous
execution
MANDP
Pulse
execution

32-bit command (17 STEPS)

Flag: None


Command
Explanation

4 : matrix source device 1. : matrix source device 2. : Area where
calculated result is stored : matrix length
4 Do matix AND operation to matix source device 1 and 2 by length of and save
the result in .
4 The operation rule of matix AND is: bit is 1 when 2 bits are all 1 otherwise it is 0.
Program
Example

4 When X0=On, do MAND and matrix AND operation to 3 rows (D0-D2) of 16-bit
register and 3 rows (D10-D12) of 16-bit register. Then save the result in 3 rows
(D20-D22) of 16-bit register.
X0
MAND D0 D10 D20 K3


1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0
b15 b0
MAND
1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0
1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0
1 1 0 0 0 1 1 1 0 0 0 0 0 0 0 0
1 1 0 0 0 1 0 0 0 0 0 0 0 0
1 1 0 0 0 1 0 0 0 0 0 0 0 0
1 1 0 0 0 1 0 0 0 0 0 0 0 0
0 0
0 0
0 0
Before
Execution
After
Execution

Footnote

4 Explanation for matrix command:
1. A matix is made up of 1 and above continuous 16-bit registers. The register
number that made up matrix is called matrix length n. There are 16 X n bits (dots)
for a matix and a bit (dot) once for a oprand unit.
2. 16 X n bits (serial number b
0
b
16n-1
) will be regarded as a set of a serial single
point for matrix command. Thus, operate with a specific point in the set not value.
3. The matrix command is convenient and important application command for dealing
with single point to multi-points or multi-point to multi-point, such as move, copy,
compare, search, etc.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-48
4. It usually needs a 16-bit register to designate one point of 16 X n points during
marix operation. This regsiter calls Pr (pointer). The setting range is 0 16
n-1
and
correspond to b
0
b
16n-1
in matrix individually.
5. There are actions: shift left, shift right or rotate during operation. Large number is
defined to left and small number is defined to right as shown in the following.
1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1
1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1
1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0
1 1 0 1 0 0 0 0 0 0 0 0 1 1 0 0
b0
b16
b32
b31
b15
b47
D0
D1
D2
b16n-1
1 1 1 1 1 1 1 1 1 1 0 0 0 0 1 1
Left
Right
width is 16-bit
Dn-1

6. Fixed width of matrix is 16-bit.
7. Pr: matrix pointer. If Pr is 15, it means designated point is b15.
8. Matrix length is n and n is 1-256.
Example: The matrix that is made up of D0 and n=3, D0=HAAAA, D1=H5555,
D2=HAAFF


C
15
C
14
C
13
C
12
C
11
C
10
C
9
C
8
C
7
C
6
C
5
C
4
C
3
C
2
C
1
C
0

R
0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 D0
R
1
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 D1
R
2
1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 D2
Example: The matrix that is made up of K2X0 and n=3, K2X0=H37, K2X10=H68,
K2X20=H45
C
15
C
14
C
13
C
12
C
11
C
10
C
9
C
8
C
7
C
6
C
5
C
4
C
3
C
2
C
1
C
0

R
0
0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 X
0
~X
7

R
1
0 0 0 0 0 0 0 0 0 1 1 0 1 0 0 0 X
10
~X
17
R
2
0 0 0 0 0 0 0 0 0 1 0 0 0 1 0 1 X
20
~X
27
It needs to fill 0 to R0(C
15
-C
8
), R1(C
15
-C
8
), R2(C
15
-C
8
) once the value is empty.














9 Application Commands API 150-199

DVP-PLC Application Manual

9-49
API

Applicable models
ES EP EH
181


MOR
P

Matrix OR
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
n
Note: usage range of operand n is 1~256.
For EP series, when operands S
1
, S
2
and D designate KnX, KnY,
KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (9 STEPS)
MOR
Continuous
execution
MORP
Pulse
execution

32-bit command (17 STEPS)

Flag: None


Command
Explanation

4 : matrix source device 1. : matrix source device 2. : Area where
calculated result is stored : matrix length
4 Do matix OR operation to matix source device 1 and 2 by length of and save
the result in .
4 The operation rule of matrix OR is: bit is 1 when one of 2 bits is 1 and only 2 bits are 0
bit will be 0.
Program
Example

4 When X0=On, do MOR and matrix OR operation to 3 rows (D0-D2) of 16-bit register
and 3 rows (D10-D12) of 16-bit register. Then save the result in 3 rows (D20-D22) of
16-bit register.
X0
MOR D0 D10 D20 K3

1
1 1 0 0 0 1 1 0 0 0 0
1 1 0 0 0 1 1 0 0 0 0
1 1 0 0 0 1 1 0 0 0 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
1 1 0 0 1 1 0 0
1 1 0 0 1 1 0 0
1 1 0 0 1 1 0 0
1
1
1
1
1
1
1
1
1
1
1
1
1 1 1 1
1
1
1
1
1
1
1
1
b15 b0
MOR
Before
Execution
After
Execution











9 Application Commands API 150-199

DVP-PLC Application Manual

9-50
API

Applicable models
ES EP EH
182


MXOR
P

Matrix XOR
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
n
Note: usage range of operand n is 1~256.
For EP series, when operands S
1
, S
2
and D designate KnX, KnY,
KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (9 STEPS)
MXOR
Continuous
execution
MXORP
Pulse
execution

32-bit command (17 STEPS)

Flag: None

Command
Explanation

4 : matrix source device 1. : matrix source device 2. : Area where
calculated result is stored : matrix length
4 Do matix XOR operation to matix source device 1 and 2 by length of and save
the result in .
4 The operation rule of matrix XOR is: bit is 1 when 2 bits are different otherwise it is 0.
Program
Example

4 When X0=On, do MXOR and matrix XOR operation to 3 rows (D0-D2) of 16-bit
register and 3 rows (D10-D12) of 16-bit register. Then save the result in 3 rows
(D20-D22) of 16-bit register.
X0
MXOR D0 D10 D20 K3

Before
Execution
After
Execution
1
1 1 0 0 0 1 1 0 0 0 0
1 1 0 0 0 1 1 0 0 0 0
1 1 0 0 0 1 1 0 0 0 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
1 0 0 1 0 0
1 0 0 1 0 0
1 0 0 1 0 0
1
1
1
1
1
1
1 1 1 1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
b15 b0
MXOR








9 Application Commands API 150-199

DVP-PLC Application Manual

9-51
API

Applicable models
ES EP EH
183


MXNR
P

Matrix XNR
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
n
Note: usage range of operand n is 1~256.
For EP series, when operands S
1
, S
2
and D designate KnX, KnY,
KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (9 STEPS)
MXNR
Continuous
execution
MXNRP
Pulse
execution

32-bit command (17 STEPS)

Flag: None

Command
Explanation

4 : matrix source device 1. : matrix source device 2. : Area where
calculated result is stored : matrix length
4 Do matix XNR operation to matix source device 1 and 2 by length of and save
the result in .
4 The operation rule of matrix XNR is: bit is 1 when 2 bits are the same otherwise it is 0.
Program
Example

4 When X0=On, do MXNR and matrix XNR operation to 3 rows (D0-D2) of 16-bit
register and 3 rows (D10-D12) of 16-bit register. Then save the result in 3 rows
(D20-D22) of 16-bit register.
X0
MXNR D0 D10 D20 K3

Before
Execution
After
Execution
1
1 1 0 0 0 1 1 0 0 0 0
1 1 0 0 0 1 1 0 0 0 0
1 1 0 0 0 1 1 0 0 0 0
0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1
1
1
1
1
1
0
0
0
1
1
1
1
1
1
1 0 0 0
1 0 0 0
1 0 0 0
1
1
1
1 1
1
1
1
1
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
1
1
1
1
1
1
1
1
1
1
1
1
b15 b0
MXNR







9 Application Commands API 150-199

DVP-PLC Application Manual

9-52
API

Applicable models
ES EP EH
184


MI NV
P

Matrix Inverse
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: usage range of operand n is 1~256.
For EP series, when operands S
1
, S
2
and D designate KnX, KnY,
KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (7 STEPS)
MINV
Continuous
execution
MINVP
Pulse
execution

32-bit command (13 STEPS)

Flag: None

Command
Explanation

4 : Matrix source device : result : matrix length
4 Do matix inverse operation to matix source device 1 by length of and save the
result in .
Program
Example

4 When X0=On, do MINV operation to 3 rows (D0-D2) of 16-bit register and 3 rows
(D10-D12) of 16-bit register. Then save the result in 3 rows (D20-D22) of 16-bit register.
X0
MINV D0 D20 K3

Before
Execution
After
Execution
0
0
0
1 1
1
1
1
1
0
0
0
0
0
0
1 1
1
1
1
1
0
0
0
1
1
1
0
0
0
1
1
1
0
0
0
1
1
1
0
0
0
1
1
1
0
0
0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
b15 b0
MINV


API

Applicable models
ES EP EH
185


MCMP
P

Matrix Compare
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

D
n
Note: usage range of operand n is 1~256.
For EP series, when operands S
1
, S
2
and D designate KnX, KnY,
KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (9 STEPS)
MCMP
Continuous
execution
MCMPP
Pulse
execution

32-bit command (17 STEPS)

Flag: Please refer to explanation for
M1088-M1092.

9 Application Commands API 150-199

DVP-PLC Application Manual

9-53
Command
Explanation

4 : matrix source device 1. : matrix source device 2. : Area where
calculated result is stored : pointer Pr, save target address.
4 For each comparison, it will compare each bit of with from address Pr.
To find the address of different value and save the address in to complete this
comparison.
4 You can find the result of comparison from comparison flag M1088. If the same,
M1088=1 and M1088=0 for difference. Once comparsion attains, it will stop
comparing immediately and set bit search flag M1091=1. When comparison attains
the last bit, matrix search end flag M1089 will be On and comparison attained number
is saved in . For next scan period, it will start comparing from the first bit and set
matrix search start flag M1090=1. When value exceeds the usage range, point
error flag M1092 =1.
4 It usually needs a 16-bit register to designate one of 16n points in matrix to operate.
This register is called pointer, Pr. This is designated by user and the range is 0-16n-1
that correspond to bit b
0
b
16n-1
individually. You should avoid to change Pr in
operation to affect correct comparison search. If Pr value exceeds this range, matrix
pointer error flag M1092 will be 1 and this command wont be executed.
4 Matrix search end flag M1089 and set bit search flag M1091 will be 1 at the same
time.
Program
Example

4 When X0 is from OffOn, matrix search start falg M1090=0 thus it will start comparing
to find the different bit from the bit that present value +1. (M1088=0 means difference)
4 When present value of pointer D20=2, it can get following four results (O, O, O, O)
when X0 is executed from OffOn for four times.
O D20=5, matrix bit search flag M1091=1, matrix search end flag M1089=0.
O D20=45, matrix bit search flag M1091=1, matrix search end flag M1089=0.
O D20=47, matrix bit search flag M1091=0, matrix search end flag M1089=1.
O D20=1, matrix bit search flag M1091=1, matrix search end flag M1089=0.
X0
MCMPP D0 D10 D20 K3

b0
1 0 1 1 0 0 0
1 0 0 0 1 1 0 0 0
1 0 0 0 1 1 0 0
1
1
1
1
1
1
1
1
1
D20
2
1
1
1
0
0
0
0
0
0
1
1
1
1 0 1 0 1 0 1 0 1 0 1 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0
b47
b0
MCMP
b47
b0
0
0 1
1
1 0
pointer

9 Application Commands API 150-199

DVP-PLC Application Manual

9-54
Footnote

4 Explanation for flag signal
M1088: matrix comparison flag, if the result of comparison is the same, M1088=1,
otherwise M1088=0.
M1089: matrix search end flag, when comparing to the last bit, M1089=1.
M1090: matrix search start flag, start comparing from the first bit, M1090=1.
M1091: matrix bit search flag, it will stop comparing once comparison attained,
M1091=1.
M1092: matrix pointer error flag, pointer Pr exceeds that range, M1092=1.

API

Applicable models
ES EP EH
186


MBRD
P

Matrix Bit Read
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: usage range of operand n is 1~256.
For EP series, when operands S
1
, S
2
and D designate KnX, KnY,
KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (5 STEPS)
MBRD
Continuous
execution
MBRDP
Pulse
execution

32-bit command (9 STEPS)

Flag: Please refer to explanation for
M1089-M1095

Command
Explanation

4 : matrix source device. : matrix length : pointer Pr, save target
address.
4 When executing command, it will start to see if M1094 (matrix pointer clear flag) is On.
If it is On, pointer will be cleared to 0 and read from the 0 bit and read
On/Off state of each bit to M1095 (matrix rotate/shift/output/carry). It will see if M1093
(matrix pointer increase flag) is On after reading a bit. And increase 1 to if it is
On. When reading to the last bit, M1089 (matrix search end flag) =On, pointer
records the number of read bit and then end executing this command.
4 Pr (pointer) is designated by user and the range is 0-16n-1 that correspond to bit b0
b16n-1 individually. If Pr value exceeds this range, matrix pointer error flag M1092 will
be 1 and this command wont be executed.
Program
Example

4 When X0 is from OffOn, pointer clear flag M1094=On, matrix pointer increase flag
M1093=1, and increase 1 to pointer Pr after reading a bit.
4 When present value of pointer D20=45, it can get following three results (O, O, O)
when X0 is executed from OffOn for three times.
O D20=46, matrix rotate/shift/output carry flag M1095=0, matrix search end flag
M1089=0.
O D20=47, matrix rotate/shift/output carry flag M1095=1, matrix search end flag
M1089=0.
O D20=47, matrix rotate/shift/output carry flag M1095=1, matrix search end flag
9 Application Commands API 150-199

DVP-PLC Application Manual

9-55
M1089=1.
X0
MBRD D0 D10 D20 K3

b0
D20
45
1 0 1 0 1 0 1 0 1 0 1 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 1 0 1 0 1 0 1 0 1 0 1 0
b47
0
0 1
0 1
pointer

Footnote

4 Explanation for flag signal
M1089: matrix search end flag, when comparing to the last bit, M1089=1.
M1092: matrix pointer error flag, pointer Pr exceeds that range, M1092=1.
M1093: matrix pointer increase flag, add 1 to present pointer.
M1094: matrix pointer clear flag, clear present pointer to 0.
M1095: matrix rotate/shift/output carry flag.

API

Applicable models
ES EP EH
187


MBWR
P

Matrix Bit Write
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: usage range of operand n is 1~256.
For EP series, when operands S
1
, S
2
and D designate KnX, KnY,
KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (5 STEPS)
MBWR
Continuous
execution
MBWRP
Pulse
execution

32-bit command (9 STEPS)

Flag: Please refer to explanation for
M1089-M1096

Command
Explanation

4 : matrix source device. : matrix length : pointer Pr, save target
address.
4 When executing command, it will start to see if M1094 (matrix pointer clear flag) is On.
If it is On, pointer will be cleared to 0 and write M1096 (matrix shift/input
complement flag) in the 0 bit of . It will see if M1093 (matrix pointer increase flag)
is On after writing a bit. And increase 1 to if it is On. When writing to the last bit,
M1089 (matrix search end flag) =On, pointer records the number of read bit
and then end executing this command. If exceeds range, M1092=1.
4 Pr (pointer) is designated by user and the range is 0-16n-1 that correspond to bit b0
b16n-1 individually. If Pr value exceeds this range, matrix pointer error flag M1092 will
be 1 and this command wont be executed.
9 Application Commands API 150-199

DVP-PLC Application Manual

9-56
Program
Example

4 When X0 is from OffOn, pointer clear flag M1094=On, matrix pointer increase flag
M1093=1, and increase 1 to pointer Pr after writing a bit.
4 When present pointer is D20=45, M1094 (matrix shift/input complement flag) =1.
When X0 is executed once from OffOn, it can get following result:
X0
MBWRP D0 D20 K3

1
b0
0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0
b47
D20 45
1
1
M1096
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0
1
0
1
b47
D20 45
Before
Execution
After
Execution
pointer
pointer
(Matrix shift/input complement flag)

Footnote

4 Explanation for flag signal
M1089: matrix search end flag, when comparing to the last bit, M1089=1.
M1092: matrix pointer error flag, pointer Pr exceeds that range, M1092=1.
M1093: matrix pointer increase flag, add 1 to present pointer.
M1094: matrix pointer clear flag, clear present pointer to 0.
M1096: matrix shift/input complement flag

API

Applicable models
ES EP EH
188


MBS
P

Matrix Bit Shift
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: usage range of operand n is 1~256.
For EP series, when operands S
1
, S
2
and D designate KnX, KnY,
KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (5 STEPS)
MBS
Continuous
execution
MBSP
Pulse
execution

32-bit command (9 STEPS)

Flag: Please refer to explanation for
M1095-M1097

Command
Explanation

4 : matrix source device. : matrix length : result.



9 Application Commands API 150-199

DVP-PLC Application Manual

9-57
4 This command is used to shift to left or right by matrix length. M1097=0 moves
to left and M1097=1 moves to right. It needs to use the state of M1096 (complement
flag) to fill the empty bit (shift to left is b0 and shift to right is b16n-1) due to shiftment
for each bit. If there is one more bit due to shiftment (shift to left is b16n-1 and shift to
right is b0), it needs to send the state to M1095 (carry flag) and save the result in
.
4 The most use of this command is pulse execution command (MBSP).
Program
Example
1

4 When X0=On, M1097=Off means shift matrix to left. Setting complement flag
M1096=0, shift 16-bit registers D0-D2 to left and save the result in 16-bit register
D20-D22 and carry flag M1095 will be 1.
X0
RST
MBSP D0 D20 K3
M1097

Before
Execution
After shifting
to left
1
b0
0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0
b15
0
0
0
M1096
1 0 1 0 1 0 1 0 1 0 1 0 1 0 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 0
0
1
M1095
M1095
MBS
M1097=0

Program
Example
2

4 When X1=On, M1097=On to shift matrix to right. Setting complement flag M1096=1,
shift 16-bit registers D0-D2 to right and save the result to 16-bit registers D20-D22 and
carry flag M1095 will be 0.
X1
M1097
MBSP D0 D20 K3

Before
Execution
1
b0
0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0
b15
0
0
0
M1096
1 0 1 0 1 0 1 0 1 0 1 0 1 0 0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 0
0
1
M1095
M1095
MBS
M1097=0

9 Application Commands API 150-199

DVP-PLC Application Manual

9-58
Footnote

4 Explanation for flag signal
M1095: matrix rotate/shift/output carry flag
M1096: matrix shift/input complement flag
M1097: matrix rotate/shift direction flag

API

Applicable models
ES EP EH
189


MBR
P

Matrix Bit Rotate
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: usage range of operand n is 1~256.
For EP series, when operands S
1
, S
2
and D designate KnX, KnY,
KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (5 STEPS)
MBR
Continuous
execution
MBRP
Pulse
execution

32-bit command (9 STEPS)

Flag: Please refer to explanation for
M1095, M1097

Command
Explanation

4 : matrix source device. : matrix length : result.
4 This command is used to rotate to right or left by matrix length. M1097=0
moves to left and M1097=1 moves to right. The empty bit (rotate to left is b0 and shift
to right is b16n-1) due to rotation will be filled by the bit (rotate to left is b16n-1 and
shift to right is b0) that rotated out and save the result in . The bit that is rotated
out is not only used to fill the empty bit but also send its state to carry flag M1095.
4 The most use of this command is pulse execution command (MBRP).
Program
Example
1

4 When X0=On, M1097=Off means rotate matrix to left. To rotate 16-bit registers D0-D2
to left and save the result in 16-bit register D20-D22. The carry flag M1095 will be 1.
X0
MBRP D0 D20 K3
RST M1097

Before
Execution
After rotating
to left
1
b0
0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0
b15
0
0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 0
0
1
M1095
M1095
MBR
M1097=0

9 Application Commands API 150-199

DVP-PLC Application Manual

9-59
Program
Example
2

4 When X1=On, M1097=On to rotate matrix to right. To rotate 16-bit registers D0-D2 to
right and save the result to 16-bit registers D20-D22 . The carry flag M1095 will be 0.
X1
MBRP D0 D20 K3
M1097

Before
Execution
After rotating
to right
M1097=0
1
b0
0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0
b15
0
0
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
1 0 1 1 0 1 0 1 0 1 0 1 0 1 0 0
0 0
M1095
M1095
MBR

Footnote

4 Explanation for flag signal
M1095: matrix rotate/shift/output carry flag
M1097: matrix rotate/shift direction flag

API

Applicable models
ES EP EH
190


MBC
P

Matrix Bit State Count
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
D
n
Note: usage range of operand n is K1~K256.
For EP series, when operands S
1
, S
2
and D designate KnX, KnY,
KnM and KnS, n can only be 4.
Refer to each model specification for usage range.

16-bit command (7 STEPS)
MBC
Continuous
execution
MBCP
Pulse
execution

32-bit command (13 STEPS)

Flag: Please refer to explanation for
M1098, M1099

Command
Explanation

4 : Matrix source device : result : matrix length
4 To count number of bit 1 or bit 0 by matrix length and number in .
4 When M1098=1, count the number of bit 1. And count the number of bit 0 when
M1098=0. If counting result is 0, M1099=1.
Program
Example

4 When X10=On, it counts bit 1 number of D0-D2 and save the total number in D10. When
M1098=0, it counts bit 0 number of D0-D2 and save the total number in D10.
X10
MBC D0 K3 D10

9 Application Commands API 150-199

DVP-PLC Application Manual

9-60
1 1 1 1 1 1 0 1
1 1 1 1 1 1 0 1 0
1 1 1 1 1 1 0 1 0
0
12
1
1
1
1
1
1
1
1
1
1
1
1
1
1
1
0
0
0
0
0
0
M1098=0
36 M1098=1

Footnote

4 Explanation for matrix command:
M1098: matrix count bit 1 or bit 0 flag
M1099: it is On when counted result is 0.

API

Applicable models
ES EP EH
196


HST
P

High Speed Counter
-

Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S


Note: usage range of operand S is K0 (H0), K1(H1).

16-bit command (9 STEPS)
HST
Continuous
execution
HSTP
Pulse
execution

32-bit command (17 STEPS)

Flag: M1015 high speed connected
timer action


Command
Explanation

4 : the ondition to stop high speed timer start
4 When =1, start high speed timer and set M1015=On, high speed timer starts and
records present value in D1015. The min. unit of D1015 is 100us.
4 The range for D1015 to count is K0-K32767. When counting up to K32767, the next
count will be 0.
4 When =0, stop high speed timer and set M1015=Off, D1015 will stop counting
immediately.
4 When is not 1 or 0, command HSTMR wont act.
Program
Example

4 When X10=On, M1015=On. It will start high speed timer and record present value in
D1015.
4 When X10=Off, M1015=Off. It will stop high speed timer.
X10
HST K1
X10
HST K0

9 Application Commands API 150-199

DVP-PLC Application Manual

9-61
Footnote

4 Explanation for flag signal
M1015: high speed timer start flag
D1015: high speed timer
4 This command doesnt support for EH models. Following is the explanation for using
special M and special D directly.
1. It is only valid when PLC RUN.
2. When M1015=On, only start high speed timer D1015 as PLC executes END
command of that scan period. The min. unit of D1015 is 100us.
3. The range of D1015 is K0-K32767. When counting up to K32767, the next count will
be 0.
4. When M1015=Off, D1015 will stop counting in command END or HST.
4 This command doesnt support for EP models. Following is the explanation for using
special M and special D directly.
1. It is only valid when PLC RUN.
2. When D1015=On, start high speed timer D1015 immediately. The min. unit of
D1015 is 100us.
3. The range of D1015 is K0-K32767. When counting up to K32767, the next count will
be 0.
4. When M1015=Off, D1015 will stop counting immediately.




10 Application Commands API 215-246

DVP-PLC Application Manual

10-1
API

Applicable models
ES EP EH 215~
217

D
LD#


The Contact Type Logic Operation
LD#


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

Note: : &, |, ^
Refer to each model specification for usage range.

16-bit command (5 STEPS)
LD#
Continuous
execution


32-bit command (9 STEPS)
DLD#
Continuous
execution

Flag: None

Command
Explanation

: Data source device 1 : Data source device 2
Compare the contents of and . To take LD& as an example, if the
comparison result is not 0 , the contact is in continuity, and if it is 0 , the contact is in
discontinuity.
Command LD# could connect directly with the BUS.
API No.
16 -bit
command
32 -bit
command
Continuity
condition
Discontinuity
condition
215 LD& DLD& & 0 & =0
216 LD| DLD| | 0 | =0
217 LD^ DLD^ ^ 0 ^ =0
& : Logic AND operation
| : Logic OR operation
^ : Logic XOR operation
If the 32-bit length counter (C200~) is put into this command for comparison, be sure to
use the 32-bit command (DLD#). If the 16-bit command (LD#) is utilized, CPU will
determine it as Program Error, and the red ERROR indicator on the MPU panel will
be blinking.
Program
Example

When the result that using the LD& (Logic AND operation) command to compare the
content of C0 and C10 is not equal to 0, Y10=ON.
When the result that using the LD| (Logic OR operation) command to compare the
content of D200 and D300 is not equal to 0 and X1=ON, Y10=ON and retain.
When the result that using the LD^ (Logic XOR operation) command to compare the
content of C201 and C200 is not equal to 0 or M3=ON, M50=ON.
M3
DLD C201 C200 M50
LD C0 C10
LD D200 D300 SET
X1
&
^
I
Y011
Y10


10 Application Commands API 215-246

DVP-PLC Application Manual

10-2
API

Applicable models
ES EP EH 218~
220

D
AND#


The Series Connection Contact
Type Logic Operation AND#


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

Note: : &, |, ^
Refer to each model specification for usage range.

16-bit command (5 STEPS)
AND#
Continuous
execution


32-bit command (9 STEPS)
DAND#
Continuous
execution

Flag: None

Command
Explanation

: Data source device 1. : Data source device 2.
Compare the contents of and of . To take AND& as an example, if the
comparison result is not 0, the contact is in continuity, and if it is 0, the contact is in
discontinuity.
The AND# command is used to connect to contact in series.
API No.
16 -bit
command
32 -bit
command
Continuity
condition
Discontinuity
condition
218 AND& DAND& & 0 & =0
219 AND| DAND| | 0 | =0
220 AND^ DAND^ ^ 0 ^ =0
& : Logic AND operation
| : Logic OR operation
^ : Logic XOR operation
If the 32-bit length counter (C200~) is put into this command for comparison, be sure to use
the 32-bit command (DAND#). Or if the 16-bit command (AND#) is utilized, CPU will
determine it as Program Error, and the red ERROR indicator on the MPU panel will be
blinking.
Program
Example

When X0=ON, using the AND& (Logic AND operation) command to compare the content of
C0 and C10. If the result is not equal to 0, Y10=ON.
When X1=OFF, using the AND| (Logic OR operation) command to compare the content of
D10 and D0. If the result is not equal to 0, Y11=ON and retain.
When X2=ON, using the AND^ (Logic XOR operation) command to compare the content of
32-bit registers D200(D201) and D100(D101). If the result is not equal to 0 or
M3=ON,M50=ON.
10 Application Commands API 215-246

DVP-PLC Application Manual

10-3
M3
DAND D200 D100 M50
AND C0 C10
AND D10 D0 SET
&
^
I
Y11
Y10
X0
X1
X2


API

Applicable models
ES EP EH 221~
223

D
OR#


The Parallel Connection Contact
Type Logic Operation OR#


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

Note: : &, |, ^
Refer to each model specification for usage range.

16-bit command (5 STEPS)
OR#
Continuous
execution


32-bit command (9 STEPS)
DOR#
Continuous
execution

Flag: None

Command
Explanation

: Data source device 1 : Data source device 2
Compare the contents of and of . Take OR& as an example, if the
comparison result is not 0, the contact is in continuity, and if it is 0, he contact is in
discontinuity.
Command OR# is used to connect to contact in parallel.
API No.
16 -bit
command
32 -bit
command
Continuity
condition
Discontinuity
condition
221 OR& DOR& & 0 & =0
222 OR| DOR| | 0 | =0
223 OR^ DOR^ ^ 0 ^ =0
& : Logic AND operation
| : Logic OR operation
^ : Logic XOR operation
If the 32-bit length counter (C200~) is put into this command for comparison, be sure
to use the 32-bit command (DOR#). Or if the 16-bit command (OR#) is utilized, CPU
will determine it as Program Error , and the red ERROR indicator on the MPU panel
will be blinking.
10 Application Commands API 215-246

DVP-PLC Application Manual

10-4
Program
Example

When X1=ON, using the OR& (Logic AND operation) command to compare the
content of C0 and C10. If the result is not equal to 0, Y0=ON.
If both X2 and M30 are ON, or when using the OR| (Logic OR operation) command
to compare the content of D10 and D20 and the result is not equal to 0, or when using
the OR^ (Logic XOR operation) command to compare the content of D100 and D200
and the result is not equal to 0, M60=ON.
DOR D100 D200
OR C0 C10
DOR D10 D20
&
^
I
Y0
X2
X1
M30
M60


API

Applicable models
ES EP EH 224~
230

D
LD


The Contact Type Comparison
LD


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

Note: : =, >, <, <>, ,
Refer to each model specification for usage range.

16-bit command (5 STEPS)
LD
Continuous
execution


32-bit command (9 STEPS)
DLD
Continuous
execution

Flag: None

Command
Explanation

: Data source device 1 : Data source device 2
Compare the contents of and of . To take API 224 LD= as an example, if
the comparison result is = , the contact is in continuity, and if it is , the contact is in
discontinuity.
Command LDcan connect to BUS directly.
API No.
16 -bit
command
32 -bit
command
Continuity
condition
Discontinuity
condition
224 LD DLD

225 LD DLD

226 LD DLD

228 LD DLD

229 LD DLD

230 LD DLD

When the left most bit, MSB (the 16-bit command: b15, the 32-bit command: b31), from
and is 1, this comparison value will be viewed as a negative value for
comparison.


10 Application Commands API 215-246

DVP-PLC Application Manual

10-5
If the 32-bit length counter (C200~) is put into this command for comparison, be sure to
use the 32-bit command (DLD). If the 16-bit command (LD) is utilized, CPU will
determine it as Program Error, and the red ERROR indicator on the MPU panel will
be blinking.
Program
Example

If the content of counter C10 is equal to K200, Y10=ON.
When the content of D200 is smaller or equal to K30, and that X1=ON, Y11=ON and
retain.
If the content of C200 is smaller than K678,493 or when M3=ON, M50=ON.
LD= K200 C10
DLD> K678493 C200
M3
Y10
LD> D200 K-30
X1
SET Y11
M50


API

Applicable models
ES EP EH 232~
238

D
AND


The Series Connection Contact
Type Comparison AND


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

Note: : =, >, <, <>, ,
Refer to each model specification for usage range.

16-bit command (5 STEPS)
AND
Continuous
execution


32-bit command (9 STEPS)
DAND
Continuous
execution

Flag: None

Command
Explanation

: Data source device 1 : Data source device 2
Compare the contents of and of . To take API 232 AND= as an
example, if the comparison result is = , the contact is in continuity, and if it is , the
contact is in discontinuity.
Command ANDis the comparison command that connect to contact in series.
API No.
16 -bit
command
32 -bit
command
Continuity
condition
Discontinuity
condition
232 AND DAND

233 AND DAND

234 AND DAND

236 AND DAND

237 AND DAND

238 AND DAND



10 Application Commands API 215-246

DVP-PLC Application Manual

10-6
When the left most bit, MSB (the 16-bit command: b15, the 32-bit command: b31),
from and is 1, this comparison value will be viewed as a negative value
for comparison.
If the 32-bit length counter (C200~C254) is put into this command for comparison, be
sure to use the 32-bit command (DAND). Or if the 16-bit command (AND) is
utilized, CPU will determine it as Program Error, and the red ERROR indicator on
the MPU panel will be blinking.
Program
Example

If X0=ON and that the current value of counter C10 equals K200, Y10=ON.
If X1=OFF and that the content of register D0 not equal to K10, Y11=ON and retain.
If X2=ON and that the contents of the 32-bit registers D11 and D0 are smaller than
K678,493, M50=ON.
AND= K200 C10
DAND> K678493 D10
M3
Y10
AND<> K-10 D0 SET Y11
M50
X2
X1
X0


API

Applicable models
ES EP EH 240~
246

D
OR


The Parallel Connection Contact
Type Comparison OR


Bit devices Word devices
X Y M S K H KnX KnY KnM KnS T C D E F
S
1

S
2

Note: : =, >, <, <>, ,
Refer to each model specification for usage range.

16-bit command (5 STEPS)
OR
Continuous
execution


32-bit command (9 STEPS)
DOR
Continuous
execution

Flag: None

Command
Explanation

: Data source device 1. : Data source device 2.
Compare the contents of and of . Take API 240 (OR=) as an example, if
the comparison result is =, the contact is in continuity, and if it is , the contact is in
discontinuity.
Command ORis the comparison command that connect to contact in parallel.






10 Application Commands API 215-246

DVP-PLC Application Manual

10-7

API No.
16 -bit
command
32 -bit
command
Continuity
condition
Discontinuity
condition
240 OR DOR

241 OR DOR

242 OR DOR

244 OR DOR

245 OR DOR S1

S1

246 OR DOR S1

S1

When the left most bit, MSB (the 16-bit command: b15, the 32-bit command: b31),
from and is 1, this comparison value will be viewed as a negative value
for comparison.
If the 32-bit length counter (C200~C254) is put into this command for comparison, be
sure to use the 32-bit command (DOR). Or if the 16-bit command (OR) is utilized,
CPU will determine it as Program Error , and the red ERROR indicator on the MPU
panel will be blinking.
Program
Example

If X1=ON, or that the current value of counter C10 is equal to K200, Y0=ON.
If both X2 and M30 are ON, or if the contents of the 32-bit registers D101 and D100
are greater or equal to K100,000, M60=ON.
OR= K200 C10
DOR> D100 K100000
Y0
X2
X1
M30
M60
=

Potrebbero piacerti anche