You are on page 1of 459

DVP-PLC Application Manual【Program】

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

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

5.3 Handling of Numeric Values ............................................................................. 5-11

5.4 Index register E, F ........................................................................................... 5-14

5.5 Index for Commands ........................................................................................ 5-16

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

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 can’t 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
X0 Y0 X0
Y0
X1 Y1 X1
Y1
X2 X4 Y2 X2 X4
Y2
X3 X3

DVP-PLC Application Manual 1-1


1 Working Principles of PLC Ladder Diagram

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
circuit’s 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
X5 X6
Y3
Y3 Y3

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
X5 X6 Y3
Step
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-2 DVP-PLC Application Manual


1 Working Principles of PLC Ladder Diagram

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 what’s 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.

Read input state from outside

X0 X1
Start Y0
Y0
Calculate the result by ladder
diagram algorithm (it doesn’t sent X10
M100 X3
to the outer output point but the Execute in cycles
Y1
inner equipment will output :
immediately.) :
X100 M505
Y126
End

Send the result to the output point

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 equipment—WPLSoft due to scan method of
MCU is from up to down and from left to right.

DVP-PLC Application Manual 1-3


1 Working Principles of PLC Ladder Diagram

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

X6 X6

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 doesn’t 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 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
Input relay
signal). Input signal from external will decide it to display 0 or 1. You couldn’t 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
can’t 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-4 DVP-PLC Application Manual


1 Working Principles of PLC Ladder Diagram

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
Output relay
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 doesn’t 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 doesn’t 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 can’t 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 won’t 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.

DVP-PLC Application Manual 1-5


1 Working Principles of PLC Ladder Diagram

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
Explanation Command Equipment
Structure

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
LDF X, Y, M, S, T, C
switch
Rising-edge trigger in
ANDP X, Y, M, S, T, C
serial
Falling-edge trigger in
ANDF X, Y, M, S, T, C
serial

1-6 DVP-PLC Application Manual


1 Working Principles of PLC Ladder Diagram

Ladder Diagram
Explanation Command Equipment
Structure

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

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

Block in serial ANB none

Block in parallel ORB none

MPS
Multiple output MRD none
MPP
Output command of coil
OUT Y, M, S
drive
S Step ladder STL S

Basic command, Application Please refer chapter 3 basic command and


Application command command 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 combinative line of block 2


divergent line of block 2

DVP-PLC Application Manual 1-7


1 Working Principles of PLC Ladder Diagram

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.

X0 X1 X2 X3 X4 X5 X6 X7 X10 C0 C1
00000
X11 X12 X13
00000 Y1

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.
8
7
4 6
5
3
2 5
1
X0 X1 Y1 X4
Y1
M0 T0 M3
TMR T0 K10
X3 M1

1-8 DVP-PLC Application Manual


1 Working Principles of PLC Ladder Diagram

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
LD command

AND Block 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.

Rising-edge
Falling-edge
X0 X0
Time Time
OFF ON OFF OFF ON OFF

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


AND AND
command 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 OR OR
command command command

DVP-PLC Application Manual 1-9


1 Working Principles of PLC Ladder Diagram

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-10 DVP-PLC Application Manual


1 Working Principles of PLC Ladder Diagram

MPS
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 MPS
outputs as shown at the right.

MRD

MPP
MPP

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.

M1002
M1002 SET S0
initial S0
pulse S
S0 SET S21
S21
S SET S22
S21 S22
e
S S0

S22 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.

S20
e
S

RET

S20
e
S

RET

Refer to chapter 4 for the structure of step ladder [ STL ] , [ RET ].

1.5 The Conversion of PLC Command and Each Diagram Structure

DVP-PLC Application Manual 1-11


1 Working Principles of PLC Ladder Diagram

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


1 Working Principles of PLC Ladder Diagram

X0 X2 X4
Good method Bad method
X1 X3 X5 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
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 can’t 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 won’t 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.

X0 Good method Bad method

X1 LD X0 LD X0
OR X1 LD X1
OR X2 LD X2
X2 OR X3 LD X3
ORB
X3 ORB
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 can’t do OR operation upward.

DVP-PLC Application Manual 1-13


1 Working Principles of PLC Ladder Diagram

There is reverse power flow during the circuit that


is from input to output signal.

reverse flow power


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 can’t do parallel operation with empty device.

Empty device can’t 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-14 DVP-PLC Application Manual


1 Working Principles of PLC Ladder Diagram

X0 X1 Command
LD X0
X2
LD X1
OR X2
ANB

X1 X0 Command
LD X1
X2 OR 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.

T0 Command
LD T0
X1 X2 LD X1
AND X2
ORB
X1 X2 Command
LD X1
T0
AND 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
X0
LD X0

X1 X2 OR X1
AND X2
X3 X4 LD X3
AND X4
Fig. a
ORB

command
X3 X4
LD X3

X1 X2 AND X4
LD X1
X0 OR X0
AND X2
Fig. b
ORB

DVP-PLC Application Manual 1-15


1 Working Principles of PLC Ladder Diagram

You can omit commands MPS, MPP when the multiple outputs in the same horizontal line don’t need to operate
with other input device.

X0 command
Y1 MPS
AND X0
Y0 OUT Y1
MPP
OUT Y0

command
Y0
OUT Y0
X0 AND X0
Y1 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 X1 X2

X0 X1 X2 X3 X4 X5

X3 X4 X5 X10

X6 X7 X10 LOOP1
X6 X7 X5

reverse flow power X10 LOOP1

Example 2:

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

reverse flow power


X3 X7 X10

reverse flow power


X6

X0 X1 X2 LOOP1

X0 X1 X4 X7 X10
X3 X4 X5

LOOP 2
X6 X7 X10

1.7 The Example for Designing Basic Program

1-16 DVP-PLC Application Manual


1 Working Principles of PLC Ladder Diagram

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 Y1 X2


Y1
contact X2=Off, and Y1=On are set at the same time, if
X1
X2=On, the coil Y1 will stop acting. Therefore, it calls priority of
stop.

Example 2: the latching circuit for priority of start

When start normally open contact X1=On, stop normally X1 X2


Y1
contact X2 = Off and Y1=On (coil Y1 will be active and
Y1
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.

Example 3: the latching circuit of SET and RST commands

The figure at the right side is latching circuit that made up Top priority of stop

of RST and SET command. X1


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

Example 4: latched

Auxiliary relay M512 is latched at the right side. (refer to X1


PLC user manual) the circuit at the right side will be latched SET M512
X2
when power is on and it will be also latched once the power
RST M512
loss and power on again. Therefore the latched is continuous.
M512
Y1

The common control circuit

DVP-PLC Application Manual 1-17


1 Working Principles of PLC Ladder Diagram

Example 5: condition control

X1 X3
X1
Y1
X3
Y1
X2
X2 X4 Y1 X4
Y2
Y1
Y2
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

X1 X3 Y2 X1
Y1
X3
Y1
X2

X4

X2 X4 Y1 Y1
Y2 Y2
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 won’t act. (This is called interlock.)
Even if X1 and X2 are valid at the same time, Y1 and Y2 won’t 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

X1 X3 Y2
If add normally close contact Y2 into Y1 circuit to be
Y1
an input for Y1 to do AND function. (as shown in the left
Y1
side) Y1 is an input of Y2 and Y2 can stop Y1 after
X2 X4 Y1 acting. In this way, Y1 and Y2 can execute in sequential.
Y2
Y2

Example 8: Oscillating Circuit

The period of oscillating circuit is ΔT+ΔT

1-18 DVP-PLC Application Manual


1 Working Principles of PLC Ladder Diagram

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.
X0 Y1
TMR T0 Kn X0

T0
Y1 Y1

nT T

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

X0 T2
TMR T1 Kn1 X0
T1 n2 T

TMR T2 Kn2
Y1
X0 T1
Y1 n1 T

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

X0
M0 X0

M0 Y1 T
Y1 M0
M0 Y1
Y1

DVP-PLC Application Manual 1-19


1 Working Principles of PLC Ladder Diagram

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

X0
TMR T10 K1000 X0
T10
Y1 Y1

TB = 0.1 sec 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.

X0
TMR T5 K50 X0
5
T5 T6 seconds

Y4 T5
Y4
Y0
Y4 X0
TMR T6 K30 T6
3
seconds

Example13: Extend Timer Circuit

X0 In this circuit, the total delay time from input X0 is


TMR T11 Kn1
close and output Y1 is ON= (n1+n2)* T. where T is
T11
clock period.
TMR T12 Kn2
T12
Y1

Example 14: The method of enlarge counter range

1-20 DVP-PLC Application Manual


1 Working Principles of PLC Ladder Diagram

X13 The range of 16-bit counter is 0~32,767. If using


CNT C5 Kn1
two counters as figure in left side, the counter range
C5
CNT C6 Kn2 can be enlarge to n1*n2. When counter C5 attains n1,
counter C6 will counts one time and reset itself. Then
RST C5
X14 counter C6 will count the pulse of X13. When counter
RST C6 C6 attains n2, the pulse of X13 will be n1*n2.
C6
Y1

Example 15: Traffic light control (by using step ladder command)

Traffic light control


Yellow Green Green
Red light
Vertical light light blink light
Light Vertical
Y0 Y1 Y2 Y2
light
Horizontal
Y10 Y11 Y12 Y12
light

Horizontal Light Time 35 Sec 5 Sec 25 Sec 5 Sec


Light

Timing chart:
Vertical
Light

Red Y0

Yellow Y1

Green Y2
25 Sec
Horizontal 5 Sec 5 Sec
Light
Red Y10

Yellow Y11

Green Y12
25 Sec
5 Sec 5 Sec

DVP-PLC Application Manual 1-21


1 Working Principles of PLC Ladder Diagram

SFC Figure: Ladder Diagram:


M1002
M1002
ZRST S0 S127
S0

SET S0
S20 Y0 S30 Y12 S0
S SET S20
TMR T0 K350 TMR T10 K250
T0 T10
Y2
SET S30
S21 S31 TMR T11 K50
M1013
S20
TMR T1 K250 Y12 S Y0
T1 T11
S22 TMR T2 K50 S32 Y11
TMR T0 K350
M1013
Y2 TMR T12 K50 T0
T2 T12 SET S21
S23 Y1 S33 Y10 S21
S Y2
TMR T13 K350

T13 TMR T1 K250


T1
S0 SET S22
S22
S TMR T2 K50
M1013
Y2
T2
SET S23
S23
S Y1
S30
S Y12

TMR T10 K250


T10
SET S31
S31
S TMR T11 K50
M1013
Y12
T11
SET S32
S32
S Y11

TMR T12 K50


T12
SET S33
S33
S Y10

TMR T13 K350


S23 S33 T13
S S S0

RET

END

1-22 DVP-PLC Application Manual


1 Working Principles of PLC Ladder Diagram

Drawing by SFC Editor (WPLSoft )

Drawing by SFC Internal Ladder Diagram View

LAD-0

M1002
ZRST S0 S127

SET S0
LAD-0

S0
Transferred condition 1
0
T0
TRANS*
S20 S30

1 5 S22
S21 S31

TMR T2 K50
2 6
M1013
S22 S32 Y2

3 7

S23 S33 Transferred condition 4

T13
TRANS*
4

S0
Transferred condition 7

T12
TRANS*

DVP-PLC Application Manual 1-23


2 DVP-PLC Function

2.1 Summary of DVP-PLC Device Number


ES, EX, SS Models:
Type Device Item Usage Range Function
X0~X177, 128 points, octal Correspond to
X External input relay Total is
number system external input point
256
Y0~Y177, 128 points, octal Correspond to
Y External output relay points
number system external output point
M0~M511, M768~M999,
For general
744 points Total is Contacts can switch to
M Auxiliary For latched * M512~M767, 256 points 1280 On/Off in program
M1000~M1279, 280 points points (some is latched)
For special
(some are latched)
100ms timer T0~T63, 64 points When the timer
indicated by TMR
Relay bit mode

T64~T126, 63 points (when Total is command attains the


T Timer 10ms counter M1028=On, it is 10ms, 128
setting, the T contact
M1028=Off, it is 100ms) points
with the same number
1ms timer T127, 1 points will be ON.
16-bit count up for general C0~C111, 112 points Total is
When the counter
128
16-bit count up for latched * C112~C127, 16 points indicated by CNT
points
(DCNT) command
32-bit count C235~C238, C241, C242,
C Counter 1-phase input attains the setting, the
up/down C244, 7 points Total is
C contact with the
high-speed 1-phase 2 inputs C246, C247, C249, 3 points 13
same number will be
counter for points
2-phase 2 inputs C251, C252, C254, 3 points ON.
latched*
Initial step point latched * S0~S9, 10 points
Total is
Step S10~S19, 10 points (use 128 Usage device of step
S Zero point return latched *
point with IST command) ladder diagram (SFC)
points
latched * S20~S127, 108 points
When timer attains,
T Present value of timer T0~T127, 128 points the contact of timer
will be ON.
When timer attains,
Register WORD data

C0~C127, 16-bit counter, 128


C Present value of counter the contact of timer
C235~C254, 32-bit counter, 13 points
will be ON.
For general D0~D407, 408 points Total is
For latched * D408~D599, 192 points 600 points It can be memory
D1000~D1311, 312 points area for storing data.
D
Data (for V4.9 and above) Total is E and F can be used
For special
register D1000~D1143, 144 points 312 points as the special
(for V4.8 and below) (144 purpose of index
E(=D1028), F(=D1029), 2 points) indication
For index indication
points
Control point of
N For master control nested loop N0~N7, 8 points master control nested
loop
Location pointer of
Pointer

P For CJ, CALL commands P0~P63, 64 points


CJ, CALL
I6□□, 1 point (□□=10~99ms)
Time interrupt
(for Version 5.7) Location pointer of
I Interrupt
External interrupt I001, I101, I201, I301, 4 points interrupt subroutine
Communication interrupt I150
K-32,768 ~ K32,767 (16-bit operation)
K Decimal
Constant

K-2,147,483,648 ~ K2,147,483,647 (32-bit operation)


H0000 ~ HFFFF (16-bit operation)
H Hexadecimal
H00000000 ~ HFFFFFFFF (32-bit operation)
* latched area is fixed, it can’t be changed.
DVP-PLC Application Manual 2-1
2 DVP-PLC Function

EP/SA models:
Type Device Item Range Function

X0~X177, 128 points, octal number Correspond to


X External input relay Total
system is external input point
Y0~Y177, 128 points, octal number 256 Correspond to
Y External output relay points
system external output point
For general M0~M511, 512 points (*1) Contacts can be
M512~M999, 488 points (*3) Total switched during
Auxiliary For latched * is
M M2000~M4095, 2096 points (*3) ON/OFF in the
Relay 4096
M1000~M1999, 1000 points (some points program (some is
For special
are latched) latched)
T0~T199, 200 points (*1)
T192~T199 for subroutine
100ms When the timer that
T250~T255, 6 points (accumulative
TMR command
type) (*4) Total
is indicates attains the
T Timer T200~T239, 40 points (*1)
256 setting, the T contact
10ms T240~T245, 6 points (accumulative points
with the same
type) (*4)
Relay bit mode

number will be On.


T246~T249, 4 points (accumulative
1ms
type) (*4)
C0~C95, 96 points (*1)
16-bit count up
C96~C199, 104 points (*3)
C200~C215, 16 points (*1) When the timer that
32-bit count up/down
C216~C234, 19 points (*3) CNT(DCNT)
Total
C235~C244, 1-phase 1 input, 9 is command indicates
C Counter
points (*3) 250 attains, the contact C
points
32-bit high-speed C246, C247, C249, 1-phase 2 with the same
counter inputs, 3 points (*3) number will be On.
C251, C252, C254, 2-phase 2
inputs, 3 points (*3)
Initial step point S0~S9, 10 points (*1)
S10~S19, 10 points (use with IST
Step Zero point return Total
S command) (*1) is Usage device of step
point For general S20~S512, 492 points (*1) 1024 ladder diagram
points
For latched * S512~S895, 384 points (*3)
For alarm S896~S1023, 128 points (*3)

2-2 DVP-PLC Application Manual


2 DVP-PLC Function

Type Device Item Range Function

When timer attains,


T Present value of timer T0~T255, 256 points the contact will be
On.
Present value of counter C0~C199, 16-bit counter, 200 points When timer attains,
C
Register WORD data

C200~C254, 16-bit counter, 50 points the contact will be On.


For general D0~D199, 200 points (*1)
It is the memory area
D200~D999, 800 points (*3)
for storing data. E and
D Data For latched* D2000~D4999, 3000 points Total is
F can be used as
register (*3) 5000 points
special purpose of
For special D1000~D1999, 1000 points
index indication
For index indication E0~E3, F0~F3, 8 points (*1)
It is extension register
None File register * K0~K1599 (1600 points) (*4)
for storing data
The control point of
N Master control nested N0~N7, 8 points
master control nested
The location point of
P For CJ, CALL commands P0~P255, 256 points
CJ, CALL
I001, I101, I201, I301, I401, I501, total is 6
External interrupt
Pointer

points
I6□□, I7□□, 2 points (□□=1~99ms,
For Time interrupt The location point of
I time base=0.1ms)
interrupt interrupt subroutine.
High-speed counter
I010, I020, I030, I040, I050, I060, 6 points
reaches interrupt
Communication interrupt I150
K-32,768 ~ K32,767 (16-bit operation)
K Decimal number system
Constant

K-2,147,483,648 ~ K2,147,483,647 (32-bit operation)


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

*1: non-latched area is fixed, it can’t 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 can’t be modified. (the area marked with【】can’t be changed)

DVP-PLC Application Manual 2-3


2 DVP-PLC Function

Latched setting for each EP/SA model:


For general For latched Special auxiliary relay Latched
M0~M511 M512~M999 M1000~M1999 M2000~M4095
M Factory setting is
Auxiliary relay Factory setting is latched
latched
It is fixed to be Some are latched and
non-latched Start: D1200(K512) can’t be changed Start: D1202(K2000)
End: D1201(K999) 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 It is fixed to be Accumulative type
non-latched non-latched It is fixed to be latched

32 bits count up/down high


16 bits count up 32 bits count up/down
speed counter
C0~C95 C96~C199 C200~C215 C216~C234 C235~C255
It is fixed to be It is fixed to be
C Factory setting is latched
latched latched
Counter It is fixed to
It is fixed to be Start: D1208 Start: D1210
be
non-latched (K96) (K216) Start: D1212(K235)
non-latched
End: D1209 End: D1211 End: D1213(K255)
(K199) (K234)
For Special
Latched Latched For general
general register
S S0~S9 S10~S19 S20~S511 S512~S895 S896~S1023
Step relay Factory setting is latched
It is fixed to be non-latched Start: D1214(K512) It is fixed to be latched
End: D1215(K895)
For general Latched Special register Latched
D0~D199 D200~D999 D1000~D1999 D2000~D9999
D Factory setting is
Factory setting is latched
Register It is fixed to be latched Some are latched and
non-latched Start: D1216 (K200) can’t be changed Start: D1218 (K2000)
End: D1217 (K999) End: D1219 (K4999)
K0~K1599
Data Register
It is fixed to be latched

EH model:

Type Device Item Range Function

Total Corresponds to
X External input relay X0~X377, 256 points, octal number system
is external input point
512 Corresponds to
Y External output relay Y0~Y377, 256 points, octal number system
points external output point
For general M0~M499, 500 points (*2)
Total Contacts can be
Relay bit mode

M500~M999, 500 points (*3)


Auxiliary For latched is switched between
M M2000~M4095, 2096 points (*3)
relay 4096 On/Off in the program
M1000~M1999, 1000 points (some are points (some is latched)
For special
latched)
T0~T199, 200 points (*2) When the timer that
100ms T192~T199 is for subroutine Total set by TMR
【T250~T255】, 6-point Accumulative type (*4) is command attains, the
T Timer
T200~T239, 40 points (*2) 256 T contact with the
10ms points same number will be
【T240~T245】, 6-point Accumulative type (*4)
1ms 【T246~T249】, 4-point Accumulative type (*4) On.

2-4 DVP-PLC Application Manual


2 DVP-PLC Function

Type Device Item Range Function

C0~C99, 100 points (*2)


16-bit count up
C100~C199, 100 points (*3)
Total When the timer that
32-bit count C200~C219, 20 points (*2)
is set by CNT(DCNT)
C Counter up/down C220~C234, 15 points (*3)
253 command attains, the
C235~C244, 1-phase 1 input, 10 points (*3) points contact C will be On.
High-speed
C246~C249, 1-phase 2 inputs, 4 points(*3)
counter
C251~C254, 2-phases 2 inputs, 4 points (*3)
Initial step
S0~S9, 10 points (*2)
point
For zero point S10~S19, 10 points (use with IST command) Total
Step return (*2) is Usage device of step
S
points For general S20~S499, 480 points (*2) 1024 ladder diagram (SFC)
For latched S500~S899, 400 points (*3) points

For alarm S900~S1023, 124 points (*3)


When timer attains,
T Present value of timer T0~T255, 256 points the contact of timer
will be On.
Register WORD data

When timer attains,


C0~C199, 16-bit counter, 200 points
C Present value of counter the contact of timer
C200~C254, 132-bit counter, 53 points
will be On.
For general D0~D199, 200 points, (*2) It is the memory area
D200~D999, 800 points (*3) Total is for storing data. E
Data For latched
D D2000~D9999, 8000 points (*3) 10000 and F can be used as
register
For special D1000~D1999, 1000 points points special purpose of
For index E0~E7, F0~F7, 16 points (*1) index indication
Extension register for
None File register K0~K9999(10000 points) (*4)
storing data
Master control nested
N Master control nested N0~N7, 8 points
control point
The location pointer of
P For CJ, CALL commands P0~P255, 256 points
CJ, CALL
I00□(X0), I10□(X1), I20□(X2), I30□(X3), I40□
(X4), I50□(X5), 6 points
External interrupt
(□=1, rising-edge trigger , □=0, falling-edge
Pointer

trigger )
I6□□, I7□□, I8□□, 3 points(□□=1~99ms) time
Interrupt

Time interrupt base=1ms The location pointer of


I
interrupt subroutine
I8□□, 1 point (□□=1~99, time base=0.1ms)
High-speed counter
I010, I020, I030, I040, I050, I060, 6 points
attained interrupt
Pulse interrupt I110, I120, I130, I140, 4 points
Communication
I150
interrrupt
K-32,768 ~ K32,767 (16-bit operation)
K Decimal system K-2,147,483,648 ~ K2,147,483,647 (32-bit
Constant

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

DVP-PLC Application Manual 2-5


2 DVP-PLC Function

*1: the area of non-latched is fixed, it can’t 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 can’t be modified. (the area marked with【】can’t be changed)

Latched setting for each EH model:


For general For latched Special auxiliary relay Latched
M M0~M499 M500~M999 M1000~M1999 M2000~M4095
Auxiliary relay
Start: D1200(K500) Some are latched and Start: D1202(K2000)
End: D1201(K999) they can’t be changed. End: D1203(K4095)
100 ms 10 ms 10ms 1 ms 100 ms
T0 ~T199 T200~T239 T240~T245 T246~T249 T250~T255
T Factory setting is Factory setting is
Timer non-latched non-latched Accumulative type
Start: D1204 (HFFFF)*1 Start: D1206 (HFFFF)*1 Fixed latched
End: D1205 (HFFFF)*1 End: D1207 (HFFFF)*1
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
C Non-latched Non-latched Latched
Latched (default) Latched (default)
Counter (default) (default) (default)
Start: D1208 (K100) Start: D1210 (K220) Start: D1212 (K235)
End: D1209 (K199) End: D1211 (K234) End: D1213 (K255)
Zero point
Initial For general Latched Step point for alarm
return
S0~S9 S10~S19 S20~S499 S500~S899 S900~S1023
S
Step relay Non-latched (default) Latched (default)
Start: D1214 (K500) Always is latched
End: D1215 (K899)
For general Latched Special register Latched
D0~D199 D200~D999 D1000~D1999 D2000~D9999
D
Non-latched (default) Latched (default) Latched (default)
Register
Some is latched, it can’t
Start: D1216 (K200) be changed Start: D1218 (K2000)
End: D1217 (K999) End: D1219 (K9999)

* 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:
Clear all M1031
Power Clear all M1032 Factory
Memory type STOP=>RUN RUN=>STOP Non-latched
Off=>On latched area setting
area
When M1033=Off, clear
Non-latched Clear Clear Unchanged 0
When M1033=On, unchanged
Latched Unchanged Unchanged Clear Unchanged
Special M,
Initial
Special D, Initial Unchanged Unchanged
setting
index register

2-6 DVP-PLC Application Manual


2 DVP-PLC Function

The memory type of EP/SA/EH models will be as following:


Clear all M1031
Power Clear all M1032 Factory
Memory type STOP=>RUN RUN=>STOP Non-latched
Off=>On latched area setting
area
When M1033=Off, clear
Non-latched Clear Clear Unchanged 0
When M1033=On, No change
Latched Unchanged Unchanged Clear 0
Special M,
Initial
Special D, Initial Unchanged Unchanged
setting
index register
File Register Unchanged 0

2.2 Value, constant [K] / [H]

K-32,768 ~ K32,767 (16-bit operation)


K Decimal
K-2,147,483,648 ~ K2,147,483,647 (32-bit operation)
Constant
H0 ~ HFFFF (16-bit operation)
H Hexadecimal
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.

DW Double Word

W1 W0 Word

BY3 BY2 BY1 BY0 Byte

NB7 NB6 NB5 NB4 NB3 NB2 NB1 NB0 Nibble

Bit

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)

DVP-PLC Application Manual 2-7


2 DVP-PLC Function

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 Octal Decimal BCD Hexadecimal
(BIN) (OCT) (DEC) (Binary Code Decimal) (HEX)
Constant K,
Equipment For DIP Switch and 7-segment
For PLC internal operation equipment M, S, T, C, Constant H
X, Y number display
D, E, F, P, I number
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-8 DVP-PLC Application Manual


2 DVP-PLC Function

Binary Octal Decimal BCD Hexadecimal


(BIN) (OCT) (DEC) (Binary Code Decimal) (HEX)
Constant K,
Equipment For DIP Switch and 7-segment
For PLC internal operation equipment M, S, T, C, Constant H
X, Y number display
D, E, F, P, I number
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 extension 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 Extension I/O

X0~X7 X0~X7 X0~X7 X0~X17 X0~X17 X0~X43 X20(X50)~X177


Input X
(8 Points) (8 Points) (8 Points) (16 Points) (16 Points) (36 Points) (Note)
Y0~Y5 Y0~Y5 Y0~Y5 Y0~Y7 Y0~Y17 Y0~Y27 Y20(Y30)~Y177
Output Y
(6 Points) (6 Points) (6 Points) (8 Points) (16 Points) (24 Points) (Note)

Note: Besides DVP-60ES, the started input number of extension unit is from X20 and the started output
number of extension 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 extension 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 Extension 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 extension card. All SA extension units share
with SS series.

Note 2: The started input number of extension unit is from X20 and the started output number of extension
unit from Y20. The number of extension I/O is increased by 8 times and if it is less than 8 points, it
will count with 8 points.

DVP-PLC Application Manual 2-9


2 DVP-PLC Function

EH model:

Model no DVP-16EH DVP-20EH DVP-32EH DVP-48EH DVP-64EH DVP-80EH Extension I/O

X0~X7 X0~X13(12 X0~X17 X0~X27 X0~X37 X0~X47 X20~X377


Input X
(8 points) points) (16 points) (24 points) (32 points) (40 points) (note)

Y0~Y7 Y0~Y7(8 Y0~Y17 Y0~Y27 Y0~Y37 Y0~Y47 Y20~Y377


Output Y
(8 points) points) (16 points) (24 points) (32 points) (40 points) (note)

Note: Besides DVP-16EH and DVP-20EH, the started input/output number of extension 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 extension 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 can’t 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 won’t 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-10 DVP-PLC Application Manual


2 DVP-PLC Function

X0
Y0 1 2 , i.e.
The output of Y0 will be decided by circuit ○
decided by On/Off of X10.
Y0 is repeated

X10
Y0 2

The Handling Process of PLC Program (Batch I/O)

Input signal input X Input signal:


1. PLC will read the On/Off of input signal into the
memory of input signal before executing
input terminal
program.
read in memory
2. The input signal state in memory won’t change
Input signal memory
if On/Off of the input signal changes during

Program read X0 state from memory executing. The new On/Off state will be read

X0 Write Y0 state into into memory in the next scan.


Device Memory

Y0 3. The delay time from the changes of external


read Y0 state from memory signal On→Off or Off→On to the contact will be
Y0
10ms.
M0
Write M0 state into Program:

Output output PLC executes each command in program from


address 0 after reading On/Off state of input
output latched memory
signal in input signal memory and save each
On/Off of output coil into each equipment
output terminal memory.

Output:
Y 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 On→Off or
Off→On 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.


Total is
Auxiliary relay
For latched M512~M767, 256 points. It is fixed to be latched area. 1280
M points
For special M1000~M1279, 280 points. Some are latched.

DVP-PLC Application Manual 2-11


2 DVP-PLC Function

EP/SA models:

For general M0~M511, 512 points. It is fixed to be non-latched area.


Total is
Auxiliary relay M512~M999, M2000~M4095, 2584 points. It can be changed to
For latched 4096
M non-latched area by parameters.
points
For special M1000~M1999, 1000 points.

EH models:

M0~M499, 500 points. It can be changed to latched area by setting


For general
parameters.
Total is
Auxiliary relay
M500~M999, M2000~M4095, 2596 points. It can be changed to 4096
M For latched
non-latched area by setting parameters. points
For special M1000~M1999, 1000 points. Some are latched.

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 can’t 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 don’t 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 S10~S19, 10 points. (use with IST command) It is fixed to be Total is
Step relay S 128
return latched latched area. points
Latched S20~S127, 108 points. It is fixed to be latched area.

EP/SA Models:

For initial S0~S9, 10 points. It is fixed to be non-latched area.


For zero point S10~S19, 10 points. (use with IST command) It is fixed to be
return non-latched area.
Total is
Step relay S For general S20~S511, 492 points. It is fixed to be non-latched area. 1024
points
S512~S895, 384 points. It can be changed to be non-latched area
For latched
by parameters.
For alarm S896~S1023, 128 points. It is fixed to be latched area.

2-12 DVP-PLC Application Manual


2 DVP-PLC Function

EH Models:

For initial S0~S9, 10 points. It can be latched area by setting parameters.


For zero point S10~S19, 10 points. (use with IST command). It can be latched
return area by setting parameters.
Total is
For general S20~S499, 480 points. It can be latched area by setting parameters. 1024
Step relay S
S500~S899, 400 points. It can be non-latched area by setting points
For latched
parameters.
S900~S1023, 124 points. It can be latched area by setting
For alarm
parameters.

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 can’t 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 : S10~S19, 10 points.


relay S10 – S19 are for zero point return when using API 60 IST in program. If it can’t
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


Total is
T64~T126, 63 points (when M1028=On, it is 10ms. when M1028=Off, it
Timer T 10ms for general 128
is 100ms)
points
1ms for general T127, 1 points

DVP-PLC Application Manual 2-13


2 DVP-PLC Function

EP/SA model:

100ms for general T0~T199, 200 points. (T192~T199 are the timers for subroutine.)
100ms for
T250~T255, 6 points. It is fixed to be latched area.
accumulative
Total is
10ms for general T200~T239, 40 points.
Timer T 256
10ms for points
T240~T245, 6 points. It is fixed to be latched area.
accumulative
1ms for
T246~T249, 4 points. It is fixed to be latched area.
accumulative

EH model:

T0~T199, 200 points. It can be latched area by setting parameters.


100ms for general
(T192~T199 are the timers for subroutine.)
100ms for
T250~T255, 6 points. It is fixed to be latched area.
accumulative Total is
Timer T 10ms for general T200~T239, 40 points. It can be latched area by setting parameters. 256
10ms for points
T240~T245, 6 points. It is fixed to be latched area.
accumulative
1ms for
T246~T249, 4 points. It is fixed to be latched area.
accumulative

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 General timer will count once when executing command END. Output coil will be On if
:
Models timer attains when executing command TMR.

General timer will count once when executing command TMR. Output coil will be On if
EH Series Models :
timer attains when executing command TMR.

X0 When X0=On, timer T0 is counted up with


TMR T0 K100
100ms. The output coil T0=On, when the present
T0 value of timer equals to setting (K100).
Y0 10 sec
When X0=Off or power off, timer T0 will be
X0 cleared to 0 and output coil T0 will be OFF.
K100
present
T0 value

Y0

2. Accumulative timer:

2-14 DVP-PLC Application Manual


2 DVP-PLC Function

General timer will count once when executing command END. Output coil will be On if
ES/EP Series Models :
timer attains when executing command TMR.
General timer will count once when executing command TMR. Output coil will be On if
EH Series Models :
timer attains when executing command TMR.
X0 When X0=On, timer T250 is counted up with
TMR T250 K100 100ms. The output coil T0=On, when the present
value of timer equals to settings (K100).
T250
If X0=Off or power off during counting, timer
Y0 T250 pauses and keep on counting after X0=On. The
present value counts up till the present value of timer
T1 T2 T1+T2=10sec
equals to settings (K100), output coil T0=On.
X0
K100
present
T250 value

Y0

3. Timer for subroutine


If timer is used in subroutine or have interrupt in subroutine, use timer T192~T194 for it.
General timer will count once when executing command END. Output coil will be On if
ES/EP Series Models :
timer attains when executing command TMR.
General timer will count once when executing command TMR. Output coil will be On if
EH Series Models :
timer attains when executing command TMR.
If general timer is used in subroutine or interrupt to insert in subroutine and the subroutine won’t be executed,
timer can’t 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:
Timer will start when executing TMR command.
When X0=On, If scan time is longer, same scan will count with
input reflash it starts to count. plural timing pulse automatically.
X0
contact T0 is On
TMR T0 K100 T0 counts to
10sec now,
but contact
isn’t On.
T0 contact Y0=On
Y0
1st scan 2nd scan Nth scan (N+1)th scan
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)

DVP-PLC Application Manual 2-15


2 DVP-PLC Function

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
C0~C111, 112 points
general
Counter C
16 bits count up for
C112~C127, 16 points. it is always latched area Total is
latched
141
C235~C238, C241, C242, C244, 7 points. It is always
1-phase input points
32 bits count up/down latched area
High speed counters C 1-phase 2 inputs C246, C247, C249, 3 points. It is always latched area
2-phase inputs C251, C252, C254, 3 points. It is always latched area

EP/SA models:
16 bits count up for
C0~C95, 96 points. It is fixed to be non-latched area.
general
16 bits count up for C96~C199, 104 points. It can be non-latched area by setting
latched parameters.
32 bits count
Counter C
up/down for C200~C215, 15 points. It is fixed to be non-latched area.
general
Total is
32 bits count
C216~C234, 19 points. It can be changed to be non-latched 250
up/down for
area by setting parameters. points
latched
1-phase input for C235~C242, C244, 9 points. It can be changed to be
latched non-latched area by setting parameters.
32 bits count up/down 1-phase 2 inputs C246, C247, C249, 3 points. It can be changed to be
High speed counters C for latched non-latched area by setting parameters.
2-phase 2 inputs C251, C252, C254, 3 points. It can be changed to be
for latched non-latched area by setting parameters.

EH models:
16-bit count up for C0~C99, 100 points. It can be changed to be latched area
general by parameters.
16-bit count up for C100~C199, 100 points. It can be changed to be
latched non-latched area by parameters.
Counter C
32-bit count up/down C200~C219, 20 points. It can be changed to be latched area
for general by parameters.
32-bit count up/down C220~C234, 15 points. It can be changed to be non-latched
Total is
for latched area by parameters.
253
Software 1-phase 1 C235~C240, 6 points. It can be changed to be non-latched
points
input area by parameters.
Hardware 1-phase 1 C241~C244, 4 points. It can be changed to be non-latched
32 bits count up/down input area by parameters.
High-speed counters C Hardware 1-phase 2 C246~C249, 4 points. It can be changed to be non-latched
inputs area by parameters.
Hardware 1-phase 2 C251~C254, 4 points. It can be changed to be non-latched
inputs area by parameters.

Features:

2-16 DVP-PLC Application Manual


2 DVP-PLC Function

Item 16 bits counters 32 bits counters


Type General General High speed
Count
Count up Count up/down
direction
Settings 0~32,767 -2,147,483,648~+2,147,483,647
Designate for Constant K or data register D Constant K or data register D (2 for designated)
constant
Present Counter will stop when attaining Counter will keep on counting when attaining settings
value change settings
Output When count attains settings, When count up attains settings, contact will be ON and latched.
contact 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
16 bits 32 bits
register
Contact After scanning, act together. After scanning, act Act immediately when count attains. It
action together. 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
X0
RST C0 RST C0
LD X1 X1
CNT C0 K5
CNT C0 K5
C0
LD C0 Y0
OUT Y0

DVP-PLC Application Manual 2-17


2 DVP-PLC Function

1. When X0=On, RST command is executed, X0


C0 reset to 0 and output contact reset to
OFF.
2. When X1 is from Off to On, counter will X1
count up (add 1).
3. When counter C0 attains settings K5, C0 5
contact is ON and C0 = setting =K5. C0 4
won’t accept X1 trigger signal and C0 C0 settings
3
remains K5. present 2
value 1
0 0

Contacts Y0, C0

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 X10
OUT M1200 M1200
LD X11 X11
RST C200 RST C200

LD X12
X12
DCNT C200 K-5
CNT C200 K-5
C200
LD C200 Y0
OUT Y0

2-18 DVP-PLC Application Manual


2 DVP-PLC Function

1. X10 drives M1200 to decide C200 is gradual gradual


X10 increase increase
addition or subtraction. gradual decrease

X11
2. When X11 is from Off to ON and RST
command is executed, C200 will be clear X12
to 0 and contact will be off. 5
4 4
C200 3 3
3. When X12 is from Off to On, counter present 1
2 2
1
value
0 0 0
will add one (count up) or subtract 1 (count -1
-2
down). -3 -3
-4 -4
output contact -5 -5
4. When counter C200 is from K-6 to K-5, is On before. -6 -6
-7 -7
the contact of C200 is from Off to On. contacts -8
When counter C200 is from K-5 to K-6, the Y0, C0
contact of C200 will be from On to Off.

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 doesn’t 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.

DVP-PLC Application Manual 2-19


2 DVP-PLC Function

High-speed counter for ES / EX / SS series, 1-phase high-speed counter: 5KHz, total frequency: 40KHz.
Type 1-phase input 1-phase 2 inputs 2-phase inputs
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.
Type 1-phase input 1-phase 2 inputs 2-phase inputs
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-20 DVP-PLC Application Manual


2 DVP-PLC Function

Type Program-interrupted 1-phase


Hardware High-speed Counter
High-speed Counter
Type 1-phase input 1-phase input 1-phase 2 inputs 2-phase inputs
C235 C236 C237 C238 C239 C240 C241 C242 C243 C244 C246 C247 C248 C249 C251 C252 C253 C254
Input
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 aren’t 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.

DVP-PLC Application Manual 2-21


2 DVP-PLC Function
Current value Comparison value
HHSC0 HHSC1 HHSC2 HHSC3 U/D of counter reached setting
Counting pulse U
X0 X4 X10 X14 HHSC0
A
HHSC1
HHSC0 HHSC1 HHSC2 HHSC3 Comparator
HHSC2
Counting pulse B
X1 X5 X11 X15
D HHSC3

DHSCS occupies one group setting value


HHSC0 HHSC1 HHSC2 HHSC3 DHSCR occupies one group setting value
Counting mode Counting Comparison value DHSCZ occupies two groups setting value
D1225 D1226 D1227 D1228
up/down flag reached output
Setting value:0~3 respectively selection
represent Mode 1~4
(1~4 frequency mode )

HHSC0 HHSC1 HHSC2 HHSC3 U/D mode setting flag HHSC0 M1246 M1251 High speed Comparison value
comparison reached operation
C241 C242 C243 C244 HHSC1 M1247 M1252 command
M1241 M1242 M1243 M1244
DHSCS SET/RESET
HHSC2 M1248 M1253
DHSCR I 010 ~ I 060 interrupt
HHSC0 HHSC1 HHSC2 HHSC3 HHSC3 M1249 M1254 counting value reset
DHSCZ
X2 X6 X12 X16
AND Reset signal R
M1264 M1266 M1268 M1270 OR

Interrupt inhibit flag


M1272 M1274 M1276 M1278 I 010 M1289
I 020 M1290
HHSC0 HHSC1 HHSC2 HHSC3 I 030 M1291
X3 X7 X13 X17 I 040 M1292
AND Start signal S
M1265 M1267 M1269 M1271 OR I 050 M1293
I 060 M1294

M1273 M1275 M1277 M1279

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 Wave for counting mode


mode
1
A-phase
(normal frequency)

2-phase
inputs

B-phase counting down


counting up

2-22 DVP-PLC Application Manual


2 DVP-PLC Function

Counting Wave for counting mode


mode

A-phase

2
frequency) B-phase
(double

counting down
counting up

A-phase
4 (four times
frequency)

B-phase

counting down
counting up

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
Count up (+1) Count down (-1)
D(settings)
1(normal U/D

frequency) U/D FLAG


1-phase input
2(double U/D

frequency) U/D FLAG

1(normal U

1-phase 2 frequency) D

inputs 2(double U

frequency) D

1(normal A

frequency) B

2(double A

2-phase 2 frequency) B

inputs 3(three times A

frequency) B

4(four times A

frequency) 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

DVP-PLC Application Manual 2-23


2 DVP-PLC Function

Device number Functions

M1153 Frequency control finishes executing.


C235 ~ C244 are count direction of high-speed counters.
M1235 ~ M1244 When M12□□=Off, C2□□ is count up. When M12□□=On, C2□□ is count
down.
C246 ~ C249, C251 ~ C254 are monitor count direction of high-speed
M1246 ~ M1249 counters.
M1251 ~ M1254 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-24 DVP-PLC Application Manual


2 DVP-PLC Function

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
The register to record the comparison item of settings comparison mode of
D1150
multi-group
D1151 The register to record the comparison item of frequency control mode
Executing DHSZ command in frequency control mode, the high word of pulse
D1152
output frequency.
Executing DHSZ command in frequency control mode, the low word of pulse
D1153
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
HHSC0~ HHSC3 counting mode of EH hardware high-speed counter
When setting to 1, it is normal frequency. Setting to 2 is double
D1225 ~ D1228
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 X10
RST C241 RST C241
LD X11 X11
OUT M1241 M1241
LD X12 X12
DCNT C241 K5 DCNT C241 K5
LD C241 C241
OUT Y0 Y0

1. X11 drives M1241 to decide C241 is counting down


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

Y0, C241 contact

DVP-PLC Application Manual 2-25


2 DVP-PLC Function

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 X10
RST C246 RST C246
LD X11 X11
DCNT C246 K5 DCNT C246 K5
LD C246 C246
OUT Y0 Y0

X10
1. When X10=On and RST command is executed,
clear C246 to 0 and reset output contact to off. X11

X0
2. When X11=On, C246 receives count signal count up
X1
from X0 input terminal and counter will count up count down
C246
(+1) or receive count signal from X1 input present 7
value 6 6
terminal and counter will count down (-1). 5 5
4 4
3 3
3. When C246 attains settings K5, C246 will be 2 0
on. After C246 is ON, if there is counter pulse 1
0
input, C246 will keep on counting.
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-26 DVP-PLC Application Manual


2 DVP-PLC Function

2-phase AB input high-speed counter:

Example:
LD X10 X10
RST C251 RST C251
LD X11 X11
DCNT C251 K5 DCNT C251 K5
LD C251 C251
OUT Y0 Y0

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:
X10

X11

A-phase X0

B-phase X1
6
C251 present value 5 5
4 4
3 3 3
2 2
1 Counting up Counting down 1
0 0

Y0, C251 contact

DVP-PLC Application Manual 2-27


2 DVP-PLC Function

EH series:(double frequency)

X10

X11
A-phase
X0
B-phase
X1
C251 6
5 5
present 4 4
value 3 3
2 2 2
1 counting up counting down 1
0 0

Y0. C251 contact

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) Total is
Data register D 744
Special D1000~D1143, 144 points. (Some are latched area) points
Index register E, F E(=D1028), F(=D1029), 2 points

EP/SA model:

For general D0~D199, 200 points. (It is fixed to be unlatched area)


D200~D999, D2000~D4999, 3800 points. (It can be used to
For latched Total is
Data register D be unlatched area by setting parameter.) 5000
points
Special D1000~D1999, 1000 points. (Some are latched area)
Index register E, F E0~E3, F0~F3, 8 points
File register K0~K1599, MPU 1600 points. (It is fixed to be latched area)

2-28 DVP-PLC Application Manual


2 DVP-PLC Function

EH model:

D0~D199, 200 points. It can be latched area by setting


For general
parameter
D200~D999, D2000~D9999, 8800points. It can be Total is
Data register D For latched 10000
non-latched area by setting parameter points
For special D1000~D1999, 1000 pints. Some are latched.
Index register E, F E0~E7, F0~F7, 16 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 won’t be
cleared but the data will be cleared to 0 when power is off.

2. Latched register : The data is the latched register won’t 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 can’t 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]

Index registers E, F are 16-bit data register, just the same as general
16-bit 16-bit data register. It can be wrote/read.
E0 F0 It can be used as 32-bit register. But at this time, this register should
be indicated to E and F can’t be used. Otherwise, the data will be
32-bit
error. (It is recommend to use command DMOVP K0 E and clear E

E0 F0 and F to 0 when power on.

upper 16-bit lower 16-bit The combination of E and F when using as 32-bit register are:
(E0, F0) , (E1, F1) (E2, F2) ….(E7, F7)

DVP-PLC Application Manual 2-29


2 DVP-PLC Function

X0 When X0=On and E0=8, F0=14, D5E0=D(5+8)=D13, D10F0


MOV K8 E0
=D(10+14) = D24, the content in D13 will be moved to D24.
MOV K14 F0

MOV D5E0 D10F0

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 can’t 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 don’t 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 STOP→RUN.
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 won’t 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-30 DVP-PLC Application Manual


2 DVP-PLC Function

ES, EX, SS models:

Control point of master


N For master control nested N0~N7, 8 points
control nested
Location pointer of CJ,
P For CJ, CALL commands P0~P63, 64 points
CALL
I6□□, 1 point (□□=10~99ms, time
Pointer Insert timer interrupt
base=1ms) (for Version 5.7)
Location pointer of
I Interrupt Insert external I001, I101, I201, I301, 4 points
interrupt interrupt subroutine
Insert communication
I150
interrupt

EP/SA models:

The control point of


N Master control nested N0~N7, 8 points
master control nested
The location point of
P For CJ, CALL commands P0~P255, 256 points
CJ, CALL
Insert external I001, I101, I201, I301, I401, I501, total is 6
interrupt points
I6□□, I7□□, 2 points (□□=10~99ms, time
Pointer Insert time interrupt
base=1ms)
For Insert high-speed The location point of
I
interrupt counter attained I010, I020, I030, I040, I050, I060, 6 points interrupt subroutine.
interrupt
Insert
communication I150
interrupt

EH models:

Master control nested


N Master control nested N0~N7, 8 points
control point
The location pointer of
P For CJ, CALL commands P0~P255, 256 points
CJ, CALL
I00□(X0), I10□(X1), I20□(X2), I30□(X3),
Insert external I40□(X4), I50□(X5), 6 points
interrupt (□=1, rising-edge trigger , □=0,
falling-edge trigger )
I6 □ □ , I7 □ □ , I8 □ □ , 2 points ( □ □ =
Pointer 1~99ms, time base=1ms)
Insert time interrupt
I8 □ □ , 1 points ( □ □ = 0.1~9.9ms, time
The location pointer of
I Interrupt base=0.1ms)
Insert high-speed interrupt subroutine
counter attained I010, I020, I030, I040, I050, I060, 6 points
interrupt
Insert pulse
I110, I120, I130, I140, 4 points
interrupt
Insert
communication I150
interrupt

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.

DVP-PLC Application Manual 2-31


2 DVP-PLC Function

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:
P**
X0 When X0=On, program will jump from 0 to N
0 CJ P1
(designated label P1) and keep on executing

X1 without executing the address between 0 and


Y1 N.
X2 When X0=Off, program will execute from 0 and
P1 N Y2
keep on executing the followings. CJ command
won’t be executed at this time.

CALL subroutine, SRET subroutine END:

P**
X0 When X0 is On, it will jump
20 CALL P2 Call subroutine P** to P2 to execute the
X1 designated subroutine as
24 Y1
executing CALL

FEND command. When


executing SRET
P2 Y0 command, return to
(subroutine
P2) subroutine address 24 to go on
Y0 executing.

SRET subroutine return

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-32 DVP-PLC Application Manual


2 DVP-PLC Function

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 equipments 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.
ES Off STOP RUN
Special EP Factory
Function EX EH Attribute Latched setting
M SA
SS On RUN STOP
Normally open contact (a contact). This contact
M1000* is ON when running and it is ON when the ○ ○ ○ Off On Off R NO Off
status is set to RUN.
Normally OFF contact (b contact). This contact
M1001* is OFF in running and it is OFF when the status ○ ○ ○ On Off On R NO On
is set to RUN.
ON only for 1 scan after RUN. Initial pulse is
M1002* contact a. It will get positive pulse in the RUN ○ ○ ○ Off On Off R NO Off
moment. Pulse width=scan period.
OFF only for 1 scan after RUN. Initial pulse is
M1003* contact a. It will get negative pulse in the RUN ○ ○ ○ On Off On R NO On
moment. Pulse width=scan period.
M1004* On when error occurs ○ ○ ○ Off Off - R NO Off
M1008* Monitor timer flag (ON: PLC WDT time out) ○ ○ ○ Off Off - R NO Off
M1009 System used - - - - - - - - -
ES/EX/SS and EP/SA: PLSY Y0 mode
M1010 selection. It is continuous output when it is ON. ○ ○ ○ Off Off Off R/W NO Off
EH:PULSE will be output at the END.
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 connection counter ╳ ○ ○ Off Off Off R/W NO Off
When it is Off, it will display two right-most bits.
M1016* When it is On, it will display (two right-most bits ╳ ○ ○ Off - - R/W NO Off
+ 2000).
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
M1020 Zero flag ○ ○ ○ Off Off Off R NO Off
M1021 Barrow flag ○ ○ ○ Off Off Off R NO Off

DVP-PLC Application Manual 2-33


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched setting
M SA
SS On RUN STOP
M1022 Carry flag ○ ○ ○ Off Off Off R NO Off
PLSY Y1 mode selection, it is continuous
M1023 ○ ○ ╳ Off Off Off R/W NO Off
output when it is ON.
M1024 System used flag - - - - - - - - -
If PLC receive illegal communication request
M1025 when HPP, PC or HMI connects to PLC, M1025 ○ ○ ○ Off - - R NO Off
will be set and save the error code in D1025.
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
10ms time switch flag. The base setting flag of
M1028 T64~T126 is 100ms, when timer is OFF and ○ ╳ ╳ Off - - R/W NO Off
the base setting flag is 10ms when it is ON.
ES/EX/SS and EP/SA: Pulse output Y0 of
PLSY and PLSR command execution
completed or other relative command execution
M1029* completed ○ ○ ○ Off Off Off R NO Off
EH: The first group pulse CH0 (Y0, Y1) output
complete executing or other relative command
execution completed
ES/EX/SS and EP/SA: Pulse output Y1 of
PLSY and PLSR command execution
M1030* completed ○ ○ ○ Off Off Off R NO Off
EH: The second group pulse CH1 (Y2, Y3)
output complete executing
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
Start X input point to be RUN/STOP switch and
M1035* correspond to D1035 (for EP/SA models, only ╳ ○ ○ - - - R/W YES Off
X7 can be used)
M1039* Constant scan mode ○ ○ ○ Off - - R/W NO Off
M1040 Step transition inhibit ○ ○ ○ Off Off Off R/W NO Off
M1041 Step transition start ○ ○ ○ 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
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

2-34 DVP-PLC Application Manual


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched setting
M SA
SS On RUN STOP
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 latched (D1068) ○ ○ ○ Off Off - R NO Off
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
M1070 pulse unit is 1ms. ○ ○ ○ Off Off Off R/W NO Off
EH: Unit setting for PWM command of the 1st
pulse CH0 (Y0, Y1). On is 100us and Off is
1ms.
Unit setting for PWM command of the 2nd pulse
M1071 ╳ ╳ ○ Off Off Off R/W NO Off
CH1 (Y2, Y3). On is 100us and Off is 1ms.
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* Perpetual calendar error ╳ ○ ○ Off - - R NO Off
M1077 Battery voltage is too low or malfunction ╳ ╳ ○ Off - - R NO Off
PLSY command Y0 pulse output stop
M1078 ○ ○ ╳ Off - - R/W NO Off
immediately flag
PLSY command Y1 pulse output stop
M1079 ○ ○ ╳ Off - - R/W NO Off
immediately flag
M1080 System used - - - - - - - - -
M1081 FLT command change direction flag ╳ ○ ○ Off Off Off R/W NO Off
Enable/Disable execute interrupt program in
M1083 ╳ ○ ○ Off - - R/W NO Off
FROM/TO mode
Matrix compared flag. If the result is the same,
M1088 ╳ ╳ ○ Off Off - R/W NO Off
M1088 = 1. If the result is different, M1088 = 0.
Matrix search start flag. Compare from the first
M1089 ╳ ╳ ○ Off Off - R NO Off
bit and M1090=1.
Matrix search start flag. Compare from the first
M1090 ╳ ╳ ○ Off Off - R NO Off
bit and M1090=1.
Matrix finding bit flag. When find it, it will stop
M1091 ╳ ╳ ○ Off Off - R NO Off
comparing and M1091=1.
Matrix pointer error flag. When pointer Pr Off
M1092 ╳ ╳ ○ Off - R NO Off
exceeds this range, M1092=1.
Matrix pointer increase flag. It will add 1 to Off
M1093 ╳ ╳ ○ Off - R/W NO Off
present pointer.
Matrix pointer clear flag. It will clear present Off
M1094 ╳ ╳ ○ Off - R/W NO Off
pointer to 0.
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
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* Digital switch function card SW1 state ╳ ╳ ○ Off Off - R NO Off

DVP-PLC Application Manual 2-35


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched setting
M SA
SS On RUN STOP
M1105* Digital switch function card SW2 state ╳ ╳ ○ Off Off - R NO Off
M1106* Digital switch function card SW3 state ╳ ╳ ○ Off Off - R NO Off
M1107* Digital switch function card SW4 state ╳ ╳ ○ Off Off - R NO Off
M1108* Digital switch function card SW5 state ╳ ╳ ○ Off Off - R NO Off
M1109* Digital switch function card SW6 state ╳ ╳ ○ Off Off - R NO Off
M1110* Digital switch function card SW7 state ╳ ╳ ○ Off Off - R NO Off
M1111* Digital 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 ○ ○ ╳ Off Off Off R/W NO Off
M1117* Target attained frequency flag ○ ○ ╳ Off Off Off R/W NO Off
M1118* Deceleration flag ○ ○ ╳ 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
MODRD/RDST/MODRW commands. Data
M1127 ○ ○ ○ Off Off Off R/W NO Off
receivingcompleted.
M1128 Transmitting/Receiving 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
MODRD/RDST/MODRW, M1131=On when
M1131 ○ ○ ○ Off Off Off R NO Off
data convert to HEX
Special high speed pulse (50KHz) output swich
M1133* ╳ ○ ╳ Off Off Off R/W NO Off
(On is start)
M1134* 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
ASCII/RTU mode selections (use with MODRD
M1143 / MODWR / MODRW) (it is Off when in ASCII ○ ○ ○ Off Off Off R/W NO Off
mode and it is On when in RTU)
Ouput start switch of accel/decel pulse output
M1144* ╳ ○ ╳ Off Off Off R/W NO Off
function of adjustable slope
Acceleration flag of accel/decel pulse output
M1145* ╳ ○ ╳ Off Off - R NO Off
function of adjustable slope
Target attained frequency flag of accel/decel
M1146* ╳ ○ ╳ Off Off - R NO Off
pulse output function of adjustable slope
Deceleration flag of accel/decel pulse output
M1147* ╳ ○ ╳ Off Off - R NO Off
function of adjustable slope
Complete function flag of accel/decel pulse
M1148* ╳ ○ ╳ Off Off Off R/W NO Off
output function of adjustable slope
Stop counting temporality flag of accel/decel
M1149* ╳ ○ ╳ Off Off - R/W NO Off
pulse output function of adjustable slope

2-36 DVP-PLC Application Manual


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched setting
M SA
SS On RUN STOP
Declare DHSZ command used for multi-group
M1150 ╳ ╳ ○ Off - - R/W NO Off
settings comparison mode
Finish executing multi-group settings
M1151 ╳ ╳ ○ Off Off Off R NO Off
comparison mode
Declare DHSZ command used to be frequency
M1152 ╳ ╳ ○ Off - - R/W NO Off
control mode
M1153 Finish executing frequency control mode ╳ ╳ ○ Off Off Off R NO Off
Start designated deceleration function flag of
M1154* accel/decel pulse output function of adjustable ╳ ○ ╳ Off - - R/W NO Off
slope
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 volume starts ╳ ○ ○ Off - - R/W NO Off


M1179* VR1 volume 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
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

DVP-PLC Application Manual 2-37


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched setting
M SA
SS On RUN STOP
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
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

2-38 DVP-PLC Application Manual


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched setting
M SA
SS On RUN STOP
M1259 Swap Y2 and Y3 pulse output signal ╳ ╳ ○ Off Off Off R/W NO Off
Let X5 be the reset input signal of all
M1260 ╳ ○ ╳ Off - - R/W NO Off
high-speed counter
DHSCR command High-speed comparison
M1261 ╳ ╳ ○ Off Off Off R/W NO Off
flag
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
M1303 Switch flag of high and low bit ╳ ○ ○ 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

DVP-PLC Application Manual 2-39


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched setting
M SA
SS On RUN STOP
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 ╳ ╳ ○ Off Off Off R/W NO Off
M1335 Stop CH1 (Y2,Y3) pulse output ╳ ╳ ○ 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
To have interrupt after completing to send CH0
M1340 ╳ ╳ ○ Off Off Off R/W NO Off
(Y0,Y1) pulse
To have interrupt after completing to send CH1
M1341 ╳ ╳ ○ Off Off Off R/W NO Off
(Y2,Y3) pulse
To have interrupt at the same time that sending
M1342 ╳ ╳ ○ Off Off Off R/W NO Off
CH0 (Y0,Y1) pulse
To have interrupt at the same time that sending
M1343 ╳ ╳ ○ Off Off Off R/W NO Off
CH1 (Y2,Y3) pulse
M1344 Start CH0 (Y0,Y1) compensation pulse flag ╳ ╳ ○ Off Off Off R/W NO Off
M1345 Start CH1 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

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

2-40 DVP-PLC Application Manual


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched setting
M SA
SS On RUN STOP
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

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

DVP-PLC Application Manual 2-41


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched setting
M SA
SS On RUN STOP
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
M1438* PLC LINK ID 15 write completed ╳ ╳ ○ Off - - R NO Off
M1439* PLC LINK ID 16 write completed ╳ ╳ ○ Off - - R NO Off

2-42 DVP-PLC Application Manual


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
D1000* Watchdog timer (WDT) value (Unit: 1ms) ○ ○ ○ 200 - - R/W NO 200
DVP model number+memory capacity / type (user
can read PLC program version from this register.
For example, D1001 = H XX27 means version
D1001 ○ ○ ○ - - - R NO #
2.7. When reading from HPP it will display
Knnnnn and you can convert it to hexadecimal
number by pressing <H> key.
D1002* Program capacity ○ ○ ○ - - - R NO #
Sum of program memory (sum of the PLC internal
D1003 program memory. User can identify the content of ○ ○ ○ - - - R NO #
PLC control program by this register)
D1004* Grammar detective number ○ ○ ○ 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
0~32,767(unit: 0.1ms) addition type of high-speed
D1015* ╳ ╳ ○ 0 - - R/W NO 0
connection timer
D1018* πPI (Low byte) ╳ ○ ○ H’0FDB H’0FDB H’0FDB R/W NO H’0FDB

D1019* πPI(High byte) ╳ ○ ○ H’4049` H’4049` H’4049` R/W NO H’4049`


ES/EX/SS and EP/SA: X0~X7 input filter (unit: ms)
D1020* ○ ○ ○ 10 - - R/W NO 10
EH: X0~X17 input filter (unit: ms)
ES/EX/SS and EP/SA: X10~X17 input delay
D1021* setting (unit: ms) ○ ○ ○ 10 - - R/W NO 10
EH: X20~X377 input filter (unit: ms)
Double frequency selection for AB phase counter
D1022 ○ ○ ╳ 0 - - R/W NO 0
of ES/EX/SS and EP/SA models

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
When PLC MPU is master, the setting of data
D1038* ○ ○ ╳ 0 - - R/W NO 0
response delay time. Time unit is 0.1ms.
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

DVP-PLC Application Manual 2-43


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
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
PLC will automatically convert the ASCII data
↓ ○ ○ ○ 0 - - R NO 0
saved in D1070~D1085 to HEX.
D1055
Present value of EX MPU analog input channel 0
D1056* ○ ╳ ╳ 0 - - R NO 0
(CH0) and EP/EH MPU AD card channel 0 (CH0)
Present value of EX MPU analog input channel 1
D1057* ○ ╳ ╳ 0 - - R NO 0
(CH1) and EP/EH MPU AD card channel 1(CH1)
Present value of EX MPU analog input channel 2
D1058* ○ ╳ ╳ 0 - - R NO 0
(CH2)
Present value of EX MPU analog input channel 3
D1059* ○ ╳ ╳ 0 - - R NO 0
(CH3)
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
Step number of errors associated with flags
D1069 ○ ○ ○ 0 - - R NO 0
M1065~M1067
When the PLC built-in RS-485 communication
D1070 command receives feedback signals from
↓ receiver. The signals will be saved in the registers ○ ○ ○ 0 - - R NO 0
D1085 D1070~D1085. User can use the contents saved
in the registers to check the feedback data.
When the PLC built-in RS-485 communication
D1089 command is executed, the transmitting signals will
↓ be stored in the registers D1089~D1099. User ○ ○ ○ 0 - - R NO 0
D1099 can use the contents saved in registers to check
the feedback data.
D1101* Start address of file register ╳ ○ ○ 0 - - R/W Yes 0
D1102* Copy numbers of file register ╳ ○ ○ 1600 - - R/W Yes 1600
Set start D number for file register to store (the
D1103* ╳ ○ ○ 2000 - - R/W Yes 2000
number should be large than 2000)
Parameter index for Accel/Decel pulse output Y0
D1104* ○ ○ ╳ 0 0 - R/W NO 0
(corresponds to device D)
Average of EX series analog input channel 0 (CH
D1110* ○ ╳ ╳ 0 - - R NO 0
0) and EP/EH series DA card channel 0 (CH0)
Average of EX series analog input channel 1 (CH
D1111* ○ ╳ ╳ 0 - - R NO 0
1) and EP/EH series DA card channel 1 (CH1)
Average of EX series analog input channel 2 (CH
D1112* ○ ╳ ╳ 0 - - R NO 0
2)
Average of EX series analog input channel 3 (CH
D1113* ○ ╳ ╳ 0 - - R NO 0
3)
EX series analog output channel 0 (CH 0) and
D1116* ○ ╳ ╳ 0 - - R/W NO 0
EP/EH series DA card channel 0 (CH0)

2-44 DVP-PLC Application Manual


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
EX series analog output channel 1 (CH 1) and
D1117* ○ ╳ ╳ 0 - - R/W NO 0
EP/EH series DA card channel 0 (CH0)
For EX model only. It is the filter wave time setting
between the A/D conversions, and with the default
D1118* ○ ╳ ╳ 5 - - R/W NO 5
setting as 0 and the unit as 1ms, all will be
regarded as 5ms if D1118<=5.
D1119 System used - - - - - - - - -
D1120 RS-485 communication protocol ○ ○ ○ H’86 - - R/W NO H’86
PLC communication address (the address that
D1121 ○ ○ ○ - - - R/W Yes 1
save PLC communication address, it is latched)
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) ○ ○ ○ H’3A - - R/W NO H’3A
D1125 First ending character definition (EXT1) ○ ○ ○ H’0D - - R/W NO H’0D
D1126 Second ending character definition (EXT2) ○ ○ ○ H’0A - - R/W NO H’0A
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
Connection number of BCD module extension unit
D1139* ╳ ╳ ○ 0 - - R NO 0
(the maximum is two units)
Special extension module number, maximum is 8
D1140* ○ ○ ○ 0 - - R NO 0
units
D1141 System used - - - - - - - - -
D1142 Input points (X) of extension unit ○ ○ ○ 0 - - R NO 0
D1143 Output points (Y) of extension unit ○ ○ ○ 0 - - R NO 0
Parameter index for Accel/Decel pulse output of
D1144* ╳ ○ ╳ 0 - - R/W NO 0
adjustable slope (corresponds to component D)
D1145* Connection number of KEY module extension unit ╳ ╳ ○ 0 - - R NO 0
Connection number of DISP module extension
D1146* ╳ ╳ ○ 0 - - R NO 0
unit
D1148 System used - - - - - - - - -
Memory card type:
0: no card, 1: RS-232, TS-01, RS-422, 4: analog
D1149 volume switch, 5: digital switch, 6: transitor output ╳ ○ ○ - - - R NO 0
card, 7: high-speed pulse output card, 8: 2AD
card, 9: 2DA card
Table count register in multi-group setting
D1150 ╳ ╳ ○ 0 0 0 R NO 0
comparison mode
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
Recommended Interval of accelerated time
D1154* (10~32767 ms) of Accel/Decel pulse output of ╳ ○ ╳ 200 - - R/W NO 200
adjustable slope
Recommended Interval of decelerated time (-1~
D1155* -32700 ms) of Accel/Decel pulse output of ╳ ○ ╳ -1000 - - R/W NO -1000
adjustable slope

DVP-PLC Application Manual 2-45


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
D1156
Special D that indicated by RTMU command
↓ ╳ ╳ ○ 0 - - R/W NO 0
(K0~K9)
D1165
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
Target number for 2-phase pulse outputs (low
D1174* ╳ ○ ╳ 0 - - R/W NO 0
16-bit)
Target number for 2-phase pulse outputs (high
D1175* ╳ ○ ╳ 0 - - R/W NO 0
16-bit)
Present output number of 2-phase pulse (low
D1176* ╳ ○ ╳ 0 - - R/W NO 0
16-bit)
Present output number of 2-phase pulse (high
D1177* ╳ ○ ╳ 0 - - R/W NO 0
16-bit)
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
Start address of M2000~M4095 auxiliary relay
D1202* ╳ ╳ ○ - - - R/W Yes 2000
latched
End address of M2000~M4095 auxiliary relay
D1203* ╳ ╳ ○ - - - R/W Yes 4095
latched
D1204* Start latched address of 100ms timer T0~T199 ╳ ╳ ○ - - - R/W Yes H’FFFF

D1205* End latched address of 100ms timer T0~T199 ╳ ╳ ○ - - - R/W Yes H’FFFF

D1206* Start latched address of 10ms timer T200~T239 ╳ ╳ ○ - - - R/W Yes H’FFFF

2-46 DVP-PLC Application Manual


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
D1207* End latched address of 10ms timer T200~T239 ╳ ╳ ○ - - - R/W Yes H’FFFF

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
Start latched address of 32-bit counter
D1210* ╳ ○ ○ - - - R/W Yes #
C200~C234
End latched address of 32-bit counter
D1211* ╳ ╳ ○ - - - R/W Yes 234
C200~C234
Start latched address of 32-bit high-speed counter
D1212* ╳ ╳ ○ - - - R/W Yes 235
C235~C255
End latched address of 32-bit high-speed counter
D1213* ╳ ╳ ○ - - - R/W Yes 255
C235~C255
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 #
The first group of pulse output phase 00: 1-phase
D1220 ╳ ╳ ○ 0 - - R/W NO 0
(Y0 output) 01:A Phase 02:B Phase
The second group of pulse output phase 00:1-
D1221 ╳ ╳ ○ 0 - - R/W NO 0
phase (Y2 output) 01:A Phase 02:B Phase
The first group of the count setting of counter
D1225 (HHSC0). It is the count mode of C241, C246, ╳ ╳ ○ 0 - - R/W NO 0
C251.
The second group of the count setting of counter
D1226 (HHSC1).. It is the count mode of C242, C247, ╳ ╳ ○ 0 - - R/W NO 0
C252.
The third group of the count setting of counter
D1227 (HHSC2).. It is the count mode of C243, C248, ╳ ╳ ○ 0 - - R/W NO 0
C253.
The forth group of the count setting of counter
D1228 (HHSC3).. It is the count mode of C244, C249, ╳ ╳ ○ 0 - - R/W NO 0
C254.
MODRW command of RS-485 is built-in. The
D1256
characters that sent during executing is saved in
↓ ○ ○ ○ 0 - - R NO 0
D1256~D1295. User can check according to the
D1295 content of these registers.
D1296 MODRW command of RS-485 is built-in. PLC
system will convert ASCII in the content of the
↓ ○ ○ ○ 0 - - R NO 0
register that user indicates to HEX and save it in
D1311
D1296 – D1311.
D1313* Perpetual calendar (RTC) second 00~59 ╳ ○ ○ 0 - - R/W NO 0
D1314* Perpetual calendar (RTC) minute 00~59 ╳ ○ ○ 0 - - R/W NO 0
D1315* Perpetual calendar (RTC) hour 00~23 ╳ ○ ○ 0 - - R/W NO 0
D1316* Perpetual calendar (RTC) day 01~31 ╳ ○ ○ 0 - - R/W NO 1
D1317* Perpetual calendar (RTC) month 01~12 ╳ ○ ○ 0 - - R/W NO 1
D1318* Perpetual calendar (RTC) week 1~7 ╳ ○ ○ 0 - - R/W NO 6
D1319* Perpetual calendar (RTC) year 00–99 ╳ ○ ○ 0 - - R/W NO 0
D1320* The first special extension module ID ╳ ╳ ○ 0 - - R NO 0

DVP-PLC Application Manual 2-47


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
D1321* The 2nd special extension module ID ╳ ╳ ○ 0 - - R NO 0
D1322* The 3rd special extension module ID ╳ ╳ ○ 0 - - R NO 0
D1323* The 4th special extension module ID ╳ ╳ ○ 0 - - R NO 0
D1324* The 5th special extension module ID ╳ ╳ ○ 0 - - R NO 0
D1325* The 6th special extension module ID ╳ ╳ ○ 0 - - R NO 0
D1326* The 7th special extension module ID ╳ ╳ ○ 0 - - R NO 0
D1327* The 8th special extension 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 1st step acceleration frequency ╳ ╳ ○ 200 - - R/W Yes 200

Maximum output frequency (Low word) (it is fixed


D1341 ╳ ╳ ○ H’04D0 - - R Yes H’04D0
to 200KHz)
Maximum output frequency (High word) (it is fixed
D1342 ╳ ╳ ○ 3 - - R Yes 3
to 200KHz)
D1343 Acceleration /Deceleration time ╳ ╳ ○ 100 - - R/W Yes 100

CH0 (Y0,Y1) complement pulse number (Low


D1344 ╳ ╳ ○ - - - R/W NO 0
word)

CH0 (Y0,Y1) complement pulse number (High


D1345 ╳ ╳ ○ - - - R/W NO 0
word)
CH1 (Y2,Y3) complement pulse number (Low
D1346 ╳ ╳ ○ - - - R/W NO 0
word)
CH1 (Y2,Y3) complement pulse number (High
D1347 ╳ ╳ ○ - - - R/W NO 0
word)
Communication address that read by PLC LINK
D1355* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 1
Communication address that read by PLC LINK
D1356* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 2
Communication address that read by PLC LINK
D1357* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 3
Communication address that read by PLC LINK
D1358* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 4
Communication address that read by PLC LINK
D1359* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 5
Communication address that read by PLC LINK
D1360* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 6

2-48 DVP-PLC Application Manual


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
Communication address that read by PLC LINK
D1361* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 7
Communication address that read by PLC LINK
D1362* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 8
Communication address that read by PLC LINK
D1363* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 9
Communication address that read by PLC LINK
D1364* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 10
Communication address that read by PLC LINK
D1365* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 11
Communication address that read by PLC LINK
D1366* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 12
Communication address that read by PLC LINK
D1367* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 13
Communication address that read by PLC LINK
D1368* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 14
Communication address that read by PLC LINK
D1369* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 15
Communication address that read by PLC LINK
D1370* ╳ ╳ ○ H1064 - - R/W NO H1064
ID 16
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 (High byte) ╳ ╳ ○ 0 - - R NO 0
D1382* The first BCD module (Low byte) ╳ ╳ ○ 0 - - R NO 0
D1383* The second BCD module (High byte) ╳ ╳ ○ 0 - - R NO 0
D1384* The second BCD module (Low byte) ╳ ╳ ○ 0 - - R NO 0
D1385* The first DISP module (High byte) ╳ ╳ ○ 0 H’FFFF - R/W NO 0
D1386* The first DISP module (Low byte) ╳ ╳ ○ 0 H’FFFF - 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 H’FFFF - R/W NO 0
D1389* The second DISP module (Low byte) ╳ ╳ ○ 0 H’FFFF - 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 H’FFFF - R/W NO 0
D1392* The third DISP module (Low byte) ╳ ╳ ○ 0 H’FFFF - R/W NO 0
D1393* The decimal setting of third DISP module ╳ ╳ ○ 0 0 - R/W NO 0
Communication address that wrote by PLC LINK
D1415* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 1
Communication address that wrote by PLC LINK
D1416* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 2
Communication address that wrote by PLC LINK
D1417* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 3
Communication address that wrote by PLC LINK
D1418* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 4

DVP-PLC Application Manual 2-49


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
Communication address that wrote by PLC LINK
D1419* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 5
Communication address that wrote by PLC LINK
D1420* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 6
Communication address that wrote by PLC LINK
D1421* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 7
Communication address that wrote by PLC LINK
D1422* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 8
Communication address that wrote by PLC LINK
D1423* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 9
Communication address that wrote by PLC LINK
D1424* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 10
Communication address that wrote by PLC LINK
D1425* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 11
Communication address that wrote by PLC LINK
D1426* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 12
Communication address that wrote by PLC LINK
D1427* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 13
Communication address that wrote by PLC LINK
D1428* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 14
Communication address that wrote by PLC LINK
D1429* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 15
Communication address that wrote by PLC LINK
D1430* ╳ ╳ ○ H10C8 - - R/W NO H10C8
ID 16
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
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

2-50 DVP-PLC Application Manual


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
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* ID 1 LINK PLC reads. Communication address for
↓ ID 1 reads is in D1355. The range is D100-D115 ╳ ╳ ○ 0 - - R NO 0
D1495* of ID 1 PLC.
D1496* ID 1 LINK PLC writes. Communication address for
↓ ID 1 writes is in D1415. The range is D200-D215 ╳ ╳ ○ 0 - - R/W NO 0
D1511* of ID 1 PLC.
D1512* ID 2 LINK PLC reads. Communication address for
↓ ID 2 reads is in D1356. The range is D100-D115 ╳ ╳ ○ 0 - - R NO 0
D1527* of ID 2 PLC.
D1528* ID 2 LINK PLC writes. Communication address for
↓ ID 2 writes is in D1416. The range is D200-D215 ╳ ╳ ○ 0 - - R/W NO 0
D1543* of ID 2 PLC.
D1544* ID 3 LINK PLC reads. Communication address for
↓ ID 3 reads is in D1357. The range is D100-D115 ╳ ╳ ○ 0 - - R NO 0
D1559* of ID 3 PLC.
D1560* ID 3 LINK PLC writes. Communication address for
↓ ID 3 writes is in D1417. The range is D200-D215 ╳ ╳ ○ 0 - - R/W NO 0
D1575* of ID 3 PLC.
D1576* ID 4 LINK PLC reads. Communication address for
↓ ID 4 reads is in D1358. The range is D100-D115 ╳ ╳ ○ 0 - - R NO 0
D1591* of ID 4 PLC.
D1592* ID 4 LINK PLC writes. Communication address for
↓ ID 4 writes is in D1418. The range is D200-D215 ╳ ╳ ○ 0 - - R/W NO 0
D1607* of ID 4 PLC.
D1608* ID 5 LINK PLC reads. Communication address for
↓ ID 5 reads is in D1359. The range is D100-D115 ╳ ╳ ○ 0 - - R NO 0
D1623* of ID 5 PLC.
D1624* ID 5 LINK PLC writes. Communication address for
↓ ID 5 writes is in D1419. The range is D200-D215 ╳ ╳ ○ 0 - - R/W NO 0
D1639* of ID 5 PLC.
D1640* ID 6 LINK PLC reads. Communication address for
↓ ID 6 reads is in D1360. The range is D100-D115 ╳ ╳ ○ 0 - - R NO 0
D1655* of ID 6 PLC.
D1656* ID 6 LINK PLC writes. Communication address for
↓ ID 6 writes is in D1420. The range is D200-D215 ╳ ╳ ○ 0 - - R/W NO 0
D1671* of ID 6 PLC.

DVP-PLC Application Manual 2-51


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
D1672* ID 7 LINK PLC reads. Communication address for
↓ ID 7 reads is in D1361. The range is D100-D115 ╳ ╳ ○ 0 - - R NO 0
D1687* of ID 7 PLC.
D1688* ID 7 LINK PLC writes. Communication address for
↓ ID 7 writes is in D1421. The range is D200-D215 ╳ ╳ ○ 0 - - R/W NO 0
D1703* of ID 7 PLC.
D1704* ID 8 LINK PLC reads. Communication address for
↓ ID 8 reads is in D1362. The range is D100-D115 ╳ ╳ ○ 0 - - R NO 0
D1719* of ID 8 PLC.
D1720* ID 8 LINK PLC writes. Communication address for
↓ ID 8 writes is in D1422. The range is D200-D215 ╳ ╳ ○ 0 - - R/W NO 0
D1735* of ID 8 PLC.
D1736* ID 9 LINK PLC reads. Communication address for
↓ ID 9 reads is in D1363. The range is D100-D115 ╳ ╳ ○ 0 - - R NO 0
D1751* of ID 9 PLC.
D1752* ID 9 LINK PLC writes. Communication address for
↓ ID 9 writes is in D1423. The range is D200-D215 ╳ ╳ ○ 0 - - R/W NO 0
D1767* of ID 9 PLC.
D1768* ID 10 LINK PLC reads. Communication address
↓ for ID 10 reads is in D1364. The range is ╳ ╳ ○ 0 - - R NO 0
D1783* D100-D115 of ID 10 PLC.
D1784* ID 10 LINK PLC writes. Communication address
↓ for ID 10 writes is in D1424. The range is ╳ ╳ ○ 0 - - R/W NO 0
D1799* D200-D215 of ID 10 PLC.
D1800* ID 11 LINK PLC reads. Communication address
↓ for ID 11 reads is in D1365. The range is ╳ ╳ ○ 0 - - R NO 0
D1815* D100-D115 of ID 11 PLC.
D1816* ID 11 LINK PLC writes. Communication address
↓ for ID 11 writes is in D1425. The range is ╳ ╳ ○ 0 - - R/W NO 0
D1831* D200-D215 of ID 11 PLC.
D1832* ID 12 LINK PLC reads. Communication address
↓ for ID 12 reads is in D1366. The range is ╳ ╳ ○ 0 - - R NO 0
D1847* D100-D115 of ID 12 PLC.
D1848* ID 12 LINK PLC writes. Communication address
↓ for ID 12 writes is in D1426. The range is ╳ ╳ ○ 0 - - R/W NO 0
D1863* D200-D215 of ID 12 PLC.
D1864* ID 13 LINK PLC reads. Communication address
↓ for ID 13 reads is in D1367. The range is ╳ ╳ ○ 0 - - R NO 0
D1879* D100-D115 of ID 13 PLC.
D1880* ID 13 LINK PLC writes. Communication address
↓ for ID 13 writes is in D1427. The range is ╳ ╳ ○ 0 - - R/W NO 0
D1895* D200-D215 of ID 13 PLC.
D1896* ID 14 LINK PLC reads. Communication address
↓ for ID 14 reads is in D1368. The range is ╳ ╳ ○ 0 - - R NO 0
D1911* D100-D115 of ID 14 PLC.
D1912* ID 14 LINK PLC writes. Communication address
↓ for ID 14 writes is in D1428. The range is ╳ ╳ ○ 0 - - R/W NO 0
D1927* D200-D215 of ID 14 PLC.
D1928* ID 15 LINK PLC reads. Communication address
↓ for ID 15 reads is in D1369. The range is ╳ ╳ ○ 0 - - R NO 0
D1943* D100-D115 of ID 15 PLC.
D1944* ID 15 LINK PLC writes. Communication address
↓ for ID 15 writes is in D1429. The range is ╳ ╳ ○ 0 - - R/W NO 0
D1959* D200-D215 of ID 15 PLC.

2-52 DVP-PLC Application Manual


2 DVP-PLC Function

ES Off STOP RUN


Special EP Factory
Function EX EH Attribute Latched
setting
D SA
SS On RUN STOP
D1960* ID 16 LINK PLC reads. Communication address
↓ for ID 16 reads is in D1370. The range is ╳ ╳ ○ 0 - - R NO 0
D1975* D100-D115 of ID 16 PLC.
D1976* ID 16 LINK PLC writes. Communication address
↓ for ID 16 writes is in D1430. The range is ╳ ╳ ○ 0 - - R/W NO 0
D1991* D200-D215 of ID 16 PLC.

2.11 Special Auxiliary Relay and Special Register Functions

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

M1000 is On contact
during operation always ON

2. M1001: M1001 is Off contact during running, i.e. a normal 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

DVP-PLC Application Manual 2-53


2 DVP-PLC Function

Monitor 1. Monitor timer is used to moitor PLC scan time. When scan time exceeds the setting time of
Timer 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
D1000 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 It is different program capacity for different series:


Capacity 1. ES, EX, SS series: 3792 Steps
2. EP, SA series: 7920 Steps
D1002
3. EH series: 15872 Steps

Grammar 1. If there is grammar error, PLC ERROR LED will blinking and special relay M1004=On.
Check 2. Time to check PLC grammar: When power is from Off→On. Other time:

M1004 Writing program into PLC by WPLSoft or HPP


D1004, D1137 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 1. When scan time-out during executing, PLC ERROR LED will light and M1008=On.
Timer
2. Using WPLSoft or HPP to monitor D1008 which saves timeout STEP address as WDT timer
M1008, D1008 is ON.

2-54 DVP-PLC Application Manual


2 DVP-PLC Function

Scan Time The present value, minimum value and maximum value of scan time are saved in
Monitor D1010~D1012.
1. D1010: the present scan time.
D1010~D1012
2. D1011: the minimum scan time.
3. D1012: the maximum scan time.

Internal Clock 1. There are four following clock pulses in PLC. Once PLC is power on, these four clock pulse
Pulse will act automatically.
10 ms
M1011~M1014
M1011 (10 ms) 100 Hz

100 ms

M1012 (100 ms) 10 Hz


1 sec

M1013 (1 sec) 1 Hz
1 min

M1014 (60 sec)

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

High-speed 1. The steps for using special M and special D directly:


Timer
Only valid when PLC is RUN.

M1015, D1015 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

DVP-PLC Application Manual 2-55


2 DVP-PLC Function

Perpetual 1. The relative command special M and special D.


Calendar
Clock
Device name Fuunction
M1016, M1017
Year display of Off: show the 2 right most bits
M1076 M1016
perpetual calendar On: show the (2 right most bits + 2000)
D1313~D1319
When Off→On, it is triggered to adjust
When it is during 0~29 seconds, minute won’t change
±30 seconds
M1017 and second will be reset to 0.
adjustment
When it is during 30~59 seconds, it will add 1 to
minute and reset second to 0.
Perpetual calendar It will be ON when setting exceeds range or battery
M1076
malfunction 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 perpetual calendar 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 perpetual
calendar. Refer to API 167 TWR for detail.

Using peripherial WPLSoft and digital setting display DU-01 to set.

π(PI)
1. It uses 32-bit data register which is combined with D1019 and D1018 to save floating point
D1018, D1019
value π(PI),

2. Floating point value = H 40490FDB

2-56 DVP-PLC Application Manual


2 DVP-PLC Function

Response time 1. Digital filter circuit is built-in input terminals X0~X17 can set response time of receive pulse
adjustment of
input terminal 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
M1019
automatically.
D1020, D1021
Terminal response time
0
X0 0ms
1
1ms
setting by D1020
(default is 10)
10 input reflash
X17 10ms
15
15ms state
memory

3. When setting X0~X17 response time to 0ms to execute following program, the faster
response time in input terminla will be 50µs 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 Execution Completed Flag:


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.
M1029, M1030
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.

DVP-PLC Application Manual 2-57


2 DVP-PLC Function

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 when communication error:


Error Code
01: illegal command.
D1025
02: illegal equipment address.

03: request data exceeds range.

07: checksum error

Clear 1. M1031 (clear unlatched area) , M1032 (clear latched area)


Command
Device The component that will be cleared

M1031, M1032 M1031 The contact state of Y, general M, general S


T contact for general and time coil
Clear unlatched
C contact for general, time coil reset coil
area
D present register for general
T present register for general
C present register for general

M1032 The contact state of M and S for latched

Clear latched area 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 When M1003 is On, the On/Off state of output will be held once PLC is from RUN to STOP. If
in STOP mode output contact load of PLC is heater, heater’s state will be held as PLC is from RUN to STOP
and RUN after program modification.
M1033

2-58 DVP-PLC Application Manual


2 DVP-PLC Function

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

RUN/STOP 1. For EH series, when M1035 is drove to be On to start input point X0~X17 to be RUN/STOP
Switch switch by the content of D1035 (0~17).

M1035, D1035 2. For EP/SA series, When M1035 is drove to be On to start input point X7 to be RUN/STOP
switch.

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

D1038

Constant Scan 1. When M1039 is On, program scan time is determined by D1039. When program finishes
Time 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.
M1039, D1039
M1000
M1039 Constant scan time

normally ON
contact MOV P K20 D1039

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 4×4 matrix to be 16 keys to operate.

4. Scan time D1010~D1012 display also include constant scan time.

DVP-PLC Application Manual 2-59


2 DVP-PLC Function

Analog 1. For EX MPU, analog input channel resolution 10 bits (±10V or ±20mA)
Function
2. For EX MPU, analog output channel resolution 8 bits (0~10V or 0~20mA)
D1056~D1059 3. It is analog digital converter filter time setting for EX series. The factory setting is 0 and unit
D1110~D1113 is 1ms. If D1118 ≦5, it will be regarded as 5ms.
D1116~D1118
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

Present value of EX MPU analog input channel 0 (CH0)


D1056
and EP/EH MPU AD card channel 0 (CH0)
Present value of EX MPU analog input channel 1 (CH 1)
D1057
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)
Average value of EX MPU analog input channel 0 (CH 0)
D1110
and EP/EH MPU AD card channel 0 (CH0)
Average value of EX MPU analog input channel 1 (CH 1)
D1111
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)
EX MPU analog output channel 0 (CH 0), EP/EH MPU DA
D1116
card channel 0 (CH0)
EX MPU analog output channel 1 (CH 1), EP/EH MPU DA
D1117
card channel 1 (CH1)
D1118 EX series analog input filter setting (ms)

Algorithm 1. Algorithm error flag:


Error Flag
Component Explanation Latched STOP→RUN RUN→STOP
M1067~M1068
M1067 Algorithm error flag none clear latched
D1067~D1068
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-60 DVP-PLC Application Manual


2 DVP-PLC Function

File 1. For EP/EH series, When PLC is power on or from STOP to RUN, it will check start file
Register 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
M1101
D1102(read items of file registers for EP/SA series: K0~K1,600; for EH series: K0~K8,000),
D1101~D1103
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.

Digital Switch 1. When PLC is RUN with digital switch card, 8 DIP switches correspond to M1104~M1111
Function Card separately.

M1104~M1111 2. Please refer to command API 109 SWRD for detail.

Transistor When PLC is RUN with transistor output card, M1112 and M1113 correspond to 2 points
Output Card transistors output TR1 and TR2 separately.

M1112, M1113

Pulse Output
with 1. The definition of special D and special M which are used by pulse output with acceleration/
Acceleration/
Deceleration
deceleration:

M1115~M1119 Device Function


D1104 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)
(TP)
+4 Total number of pulse output number (upper 16-bit of 32-bit)
+5 Output pulse number in acceleration area (lower 16-bit of 32-bit)
(AP)
+6 Output pulse number in deceleration area (upper 16-bit of 32-bit)

3. It doesn’t 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.

DVP-PLC Application Manual 2-61


2 DVP-PLC Function

Acceleration/Deceleration step number


GF = (TF-SF)/GF

Output pulse number for each step GP=


Frequency AP/(Acceleration or Deceleration step number)
GP

TF

SF
Pulse number
AP AP
AP is pulse number of
acceleration/deceleration

4. Note:

This function should be executed under the following conditions all exist. Once a condition
doesn’t exist, this function can’t 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 STOP RUN or from RUN STOP, M1115~M1119 will be
cleared to Off. And D1104 will be cleared to 0 only when it is from Off On.

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-62 DVP-PLC Application Manual


2 DVP-PLC Function

Frequency (Hz)

5000
4000
3000
2000
1000
Time (sec)
t1 t2 t3 t4

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


M1002
MOV K500 D1104 Using D500-D506 to be parameter address

MOV K1000 D500 1KHz start frequency

MOV K100 D501 100Hz gap frequency

MOV K10000 D502 10KHz target frequency

DMOV K80000 D503 80000 pulses output

DMOV K10000 D505 10000 pulses in acceleration/deceleration section

SET M1115

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 won’t be reset automatically and it needs to be cleared by user.

Actual pulse output curve is in the following:

DVP-PLC Application Manual 2-63


2 DVP-PLC Function

Frequency (Hz)

10K

1K Pulse
number
10000 90000 100000

Special 1. For EP series, the definition of special D and special M for special high-speed pulse (50KHz)
High-speed
pulse output output function:

M1133~M1135 Device Function

D1133 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)
Display present special high-speed pulse output number (lower
+4
16-bit of 32 bits)
Display present special high-speed pulse output number (upper
+5
16-bit of 32 bits)

3. Function explanation:

Output frequency and output numbers above can be modified when M1133=On and
M1135=Off. It won’t 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 Off On and it will keep that last output number when M1133
is from On Off.

2-64 DVP-PLC Application Manual


2 DVP-PLC Function

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) won’t be affected. If command PLSY
(Y1) is executed prior to this function, this function can’t 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 1. D1139: connection number of BCD extension module, the maximum is 2 connections to use
Connected
Detection with KEY extension module.
2. D1140: special extension module (AD, DA, XA, PT, TC, RT, HC, PU) numbers, the maximum
D1139, D1140
is 8.
D1142, D1143
3. D1142: Digital extension input X point number.
D1145, D1146
4. D1143: Digital extension input Y point number.
5. D1145: connection number of KEY extension module, the maximum is 2connects to use with
BCD extension module.
6. D1146: connection number indication of DISP extension module, the maximum is 3
connections.

1. For EH series, special D and special M definition of BCD module:


BCD Module

Device Function
D1139
connection number indication of BCD extension module, the
D1381~D1384 D1139
maximum is 2 connections to use with KEY extension 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 extension unit or 2 BCD extension units.

DVP-PLC Application Manual 2-65


2 DVP-PLC Function

3. BCD module external wiring terminal:

DIP Switch

W8
W4
W2
W1

D7 D6 D5 D4 D3 D2 D1 D0

4. BCD module wiring example:

D7 D6 D5 D0
DIP switch group

W8
W4 it needs to connect a diode in
W2 series (1N4148 is recommended)
W1

1. For EH series, the definition of special D and special M of KEY module:


KEY Module

Device Function
D1145
Connection number indication of KEY extension module, the
D1145
D1375~D1380 maximum is 2 connections to use with BCD extension 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-66 DVP-PLC Application Manual


2 DVP-PLC Function

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 extension unit or 2 BCD extension 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:

Matrix Keypad

V1
V2

H1H2

4. KEY module wiring example:

Button coordinate(x,y)
(D1375, D1376) Button number
(D1378, D1379) (1,1) D1377(D1380)
(1,1) (2,1) (3,1) (4,1) (5,1) (6,1) (7,1) (8,1)
1
V1
V1 1 2 3 4 5 6 7 8
H1
(1,2) (2,2) (3,2) (4,2) (5,2) (6,2) (7,2) (8,2)

V2 9 10 11 12 13 14 15 16
(1,3) (2,3) (3,3) (4,3) (5,3) (6,3) (7,3) (8,3)

17 18 19 20 21 22 23 24
V3
(1,4) (2,4) (3,4) (4,4) (5,4) (6,4) (7,4) (8,4)

25 26 27 28 29 30 31 32
V4
(1,5) (2,5) (3,5) (4,5) (5,5) (6,5) (7,5) (8,5)

V5 33 34 35 36 37 38 39 40
(1,6) (2,6) (3,6) (4,6) (5,6) (6,6) (7,6) (8,6)

V6 41 42 43 44 45 46 47 48
(1,7) (2,7) (3,7) (4,7) (5,7) (6,7) (7,7) (8,7)

49 50 51 52 53 54 55 56
V7
(1,8) (2,8) (3,8) (4,8) (5,8) (6,8) (7,8) (8,8)

57 58 59 60 61 62 63 64
V8

H1 H2 H3 H4 H5 H6 H7 H8

DVP-PLC Application Manual 2-67


2 DVP-PLC Function

1. For EH series, the definition of special D and special M definition of DISP module (7-segment
DISP Module
display):

D1146 Device Function


D1385~D1393
Connection number indication of DISP extension module, the
D1146
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 extension units that a PLC can connect are 3 DISP
module extension units and each DISP module extension 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 extension 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 won’t 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- dot
zero
The value of
F F F F F F F F 0 0
STOP->RUN

2-68 DVP-PLC Application Manual


2 DVP-PLC Function

3. DISP module external wiring terminal:

cathode 7-segment display (8-bit)


a
b
c
d
e
f
g
dot

D7 D6 D5 D4 D3 D2 D1 D0

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 2. Using internal +24VDC to be driven


power of display module. power of display module.

P P
Short additional DC
circuit
24VDC 24VDC
24V
OV OV

Common cathode 7-segment display connection:

a
b
c
d
e
f
g
dot

D7
D6
D5
D4
D3
D2
D1
D0

DVP-PLC Application Manual 2-69


2 DVP-PLC Function

1. For EP/SA series, the definition of special D and special M of adjustable accel/decel pulse
Adjustable Acceleration/
Deceleration Pulse output function:
Output Function
Explanation
Device Function
M1144~M1149,
M1144 Start switch of accel/decel pulse output
M1154
M1145 Flag that is used in acceleration
D1032, D1033
M1146 Target frequency attained flag
D1144, D1154
M1147 Flag that is used in deceleration
D1155
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-70 DVP-PLC Application Manual


2 DVP-PLC Function

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)

GF

GF
Frequency(Hz)
GT
TF2
GT
SF3
SF2 TF3
TF1 SF4
TF4

SF1
Time(ms)

1st section 3rd section


pulse number 2nd section pulse number 4th section
(SE1) pulse number (SE3) pulse number
(SE2) (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 can’t 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 isn’t greater than ((GF*GT/1000)* ((TF-SF)/GF), this function can’t 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.

DVP-PLC Application Manual 2-71


2 DVP-PLC Function

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 can’t 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 can’t 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 won’t
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 can’t
set it by this way, we can’t ensure that you can get correct output pulse.

When STOP RUN, M1144~M1149 will be cleared to Off. When RUN STOP, M1144
will be cleared and M1145~M1149 won’t be cleared. D1144 will be cleared to 0 when it
is from Off On and unchanged in other case.

The usage parameter range of EP/SA series is D0~D999 and D2000~D4999. It won’t
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-72 DVP-PLC Application Manual


2 DVP-PLC Function

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 K200

MOV K2 D200

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
M0

END

7. Example 3: pulse output program of a segment acceleration/deceleration with direction

DVP-PLC Application Manual 2-73


2 DVP-PLC Function

Y7=OFF
TF1
SF2

TF2
SF1
X0=ON

Position

Zero point SF1


TF2

SF2 TF1
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

RST M1
X0
SET M0
X0 M0
ALT M1
M1
Y7
M1
SET
M1

M1148
RST
M0

X0
RST

END

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-74 DVP-PLC Application Manual


2 DVP-PLC Function

Acceleration for Deceleration for


returning to zero point returning to zero point

Stop returning to zero point


X0

M1144

M1148

Stop pulse output


M1149

The relation between frequency and position are shown in the following.

Frequency(Hz)

zero point

Position

Acceleration for Deceleration for


returning to zero point returning to zero point

Number setting of acceleration/deceleration, frequency and pulse are shown in the


following. (correspond to component 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)

DVP-PLC Application Manual 2-75


2 DVP-PLC Function

X7
SET

SET
X0
RST
X0
SET

RST

END

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 1. The definition of special D and special M of EH series single step execution function
Execution
Function
Device Function explanation
M1170, M1171
M1170 Start flag of single step function
D1170 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-76 DVP-PLC Application Manual


2 DVP-PLC Function

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, won’t be


affected by single STEP due to hardware start.

2-phase Pulse 1. For EP/SA series, the definition of special D and special M of 2-phase output function:
Output Function

Device Function Explanation


M1172~M1174
M1172 2-phase pulse output switch
D1172~D1177 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.

Y0(A)

Y1(B)

1 2 7 8

DVP-PLC Application Manual 2-77


2 DVP-PLC Function

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
won’t 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 Stop Run, and keep that last output number
when M1172 is from Run Stop.

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 can’t be used, and vice versa.

1. For EH/EP/SA series, the definition of special D and special M of built-in 2 points VR volume
VR Volume
function:

M1178~M1179 Device Function


D1178~D1179
M1178 Start volume VR0
M1179 Start volume 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.

Power Loss 1. For EH/EP/SA series to set latched range. The latched range will be from start address
Latched Range
Setting number to end address number.

D1200~D1219 2. Please refer to chapter 2.1 for detail.

Input Point X 1. For EP/SA series, When M1304=On, input point X (X0-X17) of MPU can force to be On-Off
can force to be
ON/OFF by using peripheral WPLSoft and HPP.

M1304 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-78 DVP-PLC Application Manual


2 DVP-PLC Function

Special
Extension
For EH series, it will display extension module ID in D1320~ D1327 by order when
Module ID connecting to special extension module.
Special extension module ID of EH series:
D1320~D1327
Extension Module Extension Module
Extension Module ID Extension Module ID
Name Name
DVPEH04AD H’0400 DVPEH01PU H’0110
DVP04DA-H H’0401 DVPEH01HC H’0120
DVPEH04PT H’0402 DVPEH02HC H’0220
DVPEH04TC H’0403 DVPEH01DT H’0130
DVPEH06XA H’0604 DVPEH02DT H’0230
DVPEH06RT H’0405

Easy PLC 1. Explanation of Special D and special M explanation of EH series EASY PLC LINK ID1–ID8:
Link
MASTER PLC
SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID
M1350-M1352 1 2 3 4 5 6 7 8
M1360-M1439 read Write read Write read Write read Write read Write read Write read Write read Write
out in out in out in out in out in out in out in out in
D1355-D1370 D1480 D1496 D1512 D1528 D1544 D1560 D1576 D1592 D1608 D1624 D1640 D1656 D1672 D1688 D1704 D1720
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
D1415-D1465
D1495 D1511 D1527 D1543 D1559 D1575 D1591 D1607 D1623 D1639 D1655 D1671 D1687 D1703 D1719 D1735
D1480-D1991
Item Item Item Item Item Item Item Item Item Item Item Item Item Item Item Item
number number number number number number number number number number number number number number number number

D1434 D1450 D1435 D1451 D1436 D1452 D1437 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 SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID


1 2 3 4 5 6 7 8
read Write read Write read Write read Write read Write read Write read Write read Write
out in out in out in out in out in out in out in out in
D100 D200 D100 D200 D100 D200 D100 D200 D100 D200 D100 D200 D100 D200 D100 D200
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
D115 D215 D115 D215 D115 D215 D115 D215 D115 D215 D115 D215 D115 D215 D115 D215

Factory setting of Communication address for reading is H1064 (D100).

Factory setting of Communication address for writing is H10C8 (D200).

DVP-PLC Application Manual 2-79


2 DVP-PLC Function

2. Explanation of Special D and special M explanation of EH series EASY PLC LINK ID9–ID16:

MASTER PLC
SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID
9 10 11 12 13 14 15 16
read Write read Write read Write read Write read Write read Write read Write read Write
out in out in out in out in out in out in out in out in
D1736 D1752 D1768 D1784 D1800 D1816 D1832 D1848 D1864 D1880 D1896 D1912 D1928 D1944 D1960 D1976
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
D1751 D1767 D1783 D1799 D1815 D1831 D1847 D1863 D1879 D1895 D1911 D1927 D1943 D1959 D1975 D1991

Item Item Item Item Item Item Item Item Item Item Item Item Item Item Item Item
number number number number number number number number number number number number number number number 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 SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID SLAVE ID


9 10 11 12 13 14 15 16
read Write read Write read Write read Write read Write read Write read Write read Write
out in out in out in out in out in out in out in out in
D100 D200 D100 D200 D100 D200 D100 D200 D100 D200 D100 D200 D100 D200 D100 D200
│ │ │ │ │ │ │ │ │ │ │ │ │ │ │ │
D115 D215 D115 D215 D115 D215 D115 D215 D115 D215 D115 D215 D115 D215 D115 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

All communication format used to connect to PLC should be the same (set D1120 for
PLC) and it supports ASCII and RTU mode.

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 can’t be repeated.

One to one connection can connect to RS-232, RS-485 and RS-422 in series

One to multiple connection can connect to RS-485 in series

2-80 DVP-PLC Application Manual


2 DVP-PLC Function

4. Operation:

Setting Master PLC ID by D1121 and slave ID first. ID can’t 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 can’t 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.

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.

DVP-PLC Application Manual 2-81


2 DVP-PLC Function

Note:

1. Automation mode M1351 and manual mode M1352 can’t be On at the same
time.

2. Please clear M1350 first before switching automation/manual mode.

3. 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.

4. 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.

5. It won’t communicate when write/read item is 0.

2-82 DVP-PLC Application Manual


2 DVP-PLC Function

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
Operand bit device S exceeds the usage
0001 0F06 SFTR misuse operand
range
Label P exceeds the usage range or
0002 0F07 SFTL misuse operand
duplicated
0003 Operand KnSm exceeds the usage range 0F08 REF misuse operand
Interrupt pointer I exceeds the usage
0102 1000 ZRST misuse operand
range or duplicated
An unrecognized command code is being
0202 Command MC exceeds the usage range C400
used
0302 Command MCR exceeds the usage range C401 Loop error
Operand bit device X exceeds the usage LD / LDI continuously use more than 9
0401 C402
range times
0403 Operand KnXm exceeds the usage range C403 MPS continuously use more than 9 times
Operand bit device Y exceeds the usage
0501 C404 FOR-NEXT exceeds 6 levels
range
STL/RET used between FOR-NEXT
0503 Operand KnYm exceeds the usage range C405
SRET/IRET used between FOR-NEXT
Operand bit device T exceeds the usage MC/MCR used between FOR-NEXT
0601
range END / FEND used between FOR-NEXT
Operand word device T register usage
0604 C407 STL continuously use more than 9 times
exceeds limit
Operand bit device M exceeds the usage Use command MC/MCR in STL
0801 C408
range Use I/P in STL
Use STL/RET in subroutine
0803 Operand KnMm exceeds the usage range C409
Use STL/RET in interrupt program
0D01 DECO misuse operand Use MC/MCR in subroutine
C40A
0D02 ENCO misuse operand Use MC/MCR in interrupt program
0D03 DHSCS misuse operand MC/MCR doesn’t start from N0 or
C40B
0D04 DHSCR misuse operand discontinuously
0D05 PLSY misuse operand MC/MCR corresponding value N is
C40C
0D06 PWM misuse operand different
0D07 FROM/TO misuse operand C40D Use I/P incorrectly
0D08 PID misuse operand IRET doesn’t follow by the last FEND
command
Operand bit device C exceeds the usage C40E
0E01 SRET doesn’t follow by the last FEND
range
command
Operand word device C register usage
0E04 The number of input/output points of I/O
exceeds limit C41C
extension unit exceeds usage range
0E05 DCNT misuse operand CXXX
0E18 BCD conversion error Special extension module exceeds usage
C41D
0E19 Division error (divisor=0) range
Component exceeds usage range (include Hardware setting of special extension
0E1A C41E
E and F error) module error
It is negative number after radical
0E1B C41F Data write in memory failure
expression
0E1C FROM/TO communication error C4FF Invalid command (no this command)
Operand word device D register usage
0F04 C4EE No END command in program
exceeds limit
0F05 DCNT misuse operand DXXX

DVP-PLC Application Manual 2-83


3 Basic Commands

3.1 Summary of Basic Command and Step Ladder Command

Basic Commands

Command Execution speed (us)


Function Operands STEP Page
Code ES/EX/SS/EP/SA EH
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
Read the operation result (the
MRD None 4 0.24 1 3-6
pointer not moving)
MPP Read the result None 4.4 0.24 1 3-6

Output commands

Command Execution speed (us)


Function Operands STEP Page
Code
ES/EX/SS/EP/SA EH
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
Y, M, S, T, C, D,
RST Clear the contacts or the registers 7.6 0.24(0.56) 3 3-7
E, F

Timers, Counters

Command Execution speed (us)


API Function Operands STEP Page
Code ES/EX/SS/EP/SA EH
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-D(16 bits) 12.8 30 4 3-8

97 DCNT 32-bit counter C-K or C-D(32 bits) 14.32 50 6 3-9

Main control commands

Command Execution speed (us)


Function Operands STEP Page
Code ES/EX/SS/EP/SA EH

MC Connect the common series connection contacts N0~N7 5.6 20 3 3-10

Disconnect the common series connection


MCR N0~N7 5.76 15 3 3-10
contacts

DVP-PLC Application Manual 3-1


3 Basic Commands

Rising-edge/falling-edge detection commands of contact

Command Execution speed (us)


API Function Operands STEP Page
Code
ES/EX/SS/EP/SA EH

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

Command Execution speed (us)


API Function Operands STEP Page
Code
ES/EX/SS/EP/SA EH
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 STEP Page
ES/EX/SS/EP/SA EH
END Program end none 7.44 0.24 1 3-14

Other commands

Command Execution speed (us)


API Function Operands STEP Page
Code ES/EX/SS/EP/SA EH
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
Function Operands STEP Page
Code
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-2 DVP-PLC Application Manual


3 Basic Commands

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

The LD command is used on the A contact that has its start from the left BUS or the A
Command
Explanation 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.
Ladder Diagram: Command Code: Command code explanation:
Program
Example X0 X1 LD X0 Load contact A of X0
Y1 AND X1 Connect to contact A of X1 in
OUT Y1 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

The LDI command is used on the B contact that has its start from the left BUS or the B
Command
Explanation 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.

Ladder Diagram: Command Code: Command code explanation:


Program
Example X0 X1 LDI X0 Load contact B of X0
Y1 AND X1 Connect to contact A of X1 in series
OUT Y1 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

DVP-PLC Application Manual 3-3


3 Basic Commands

The AND command is used in the series connection of A contact. The function of the
Command
Explanation 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.

Ladder Diagram: Command Code: Command code explanation:


Program Load contact B of X1
Example X1 X0 LDI X1 Connect to contact A of X0 in series
Y1 AND X0 Drive Y1 coil
OUT Y1

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

The ANI command is used in the series connection of B contact. The function of the
Command
Explanation 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.

Ladder Diagram: Command Code: Command code explanation:


Program Load contact A of X1
Example X1 X0 LD X1 Connect to contact B of X0 in
Y1 ANI X0 series
OUT Y1 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

The OR command is used in the parallel connection of A contact. The function of the
Command
Explanation 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.

Ladder Diagram: Command Code: Command code explanation:


Program Load contact A of X0
Example X0 LD X0 Connect to contact A of X1 in
Y1 OR X1 parallel
X1 OUT Y1 Drive Y1 coil

3-4 DVP-PLC Application Manual


3 Basic Commands

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

The ORI command is used in the parallel connection of B contact. The function of the
Command
Explanation 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.

Ladder Diagram: Command Code: Command code explanation:


Program Load contact A of X0
Example X0 LD X0 Connect to contact B of X1 in
Y1 ORI X1 parallel
X1 OUT Y1 Drive Y1 coil

Command Functions Adaptive model


ES/EX/SS EP/SA EH
ANB Series connection (Multiple Circuits)

Operand none

To perform the “AND” calculation between the previous reserved logic results and
Command
Explanation contents of the accumulative register.

Ladder Diagram: Command Code: Command code explanation:


Program Load contact A of X0
Example X0 ANB X1 LD X0 Connect to contact B of X2 in
Y1 ORI X2 parallel
X2 X3 LDI X1 Load contact B of X1
OR X3 Connect to contact A of X3 in
ANB parallel
Block A Block B OUT Y1 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

To perform the “OR” calculation between the previous reserved logic results and
Command
Explanation contents of the accumulative register.

DVP-PLC Application Manual 3-5


3 Basic Commands

Ladder Diagram: Command Code: Command code explanation:


Program Load contact A of X0
Example X0 X1 Block A LD X0 Connect to contact B of X1 in
Y1 ANI X1 series
LDI X2 Load contact B of X2
X2 X3 AND X3 Connect to contact A of X3 in
ORB ORB series
Block B OUT Y1 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

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

Command Functions Adaptive model


ES/EX/SS EP EH
MRD Reads the operation result

Operand None

Reading content of the operation result to the accumulative register. (the pointer of
Command
Explanation operation result doesn’t move)

Command Functions Adaptive model


ES/EX/SS EP/SA EH
MPP Reads, then clears the operation result

Operand None

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

Ladder Diagram: Command Code: Command code explanation:


Program Load contact A of X0
Example MPS LD X0 Save to stack
X0 X1 MPS Connect to contact A of X1 in
Y1 AND X1 series
X2 OUT Y1 Drive M0 coil
MRD M0 MRD Read from stack
AND X2 Drive Y2 coil
OUT M0 Program end
Y2
MPP
MPP OUT Y2
END END

3-6 DVP-PLC Application Manual


3 Basic Commands

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

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

Ladder Diagram: Command Code: Command code explanation:


Program Load contact B of X0
Example X0 X1 LDI X0 Connect to contact A of X1 in
Y1 AND X1 series
OUT Y1 Drive Y1 coil

Command Functions Adaptive model


ES/EX/SS EP/SA EH
SET Latch(ON)

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


Operand
- - - -

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

Ladder Diagram: Command Code: Command code


Program explanation:
Example X0 Y0 LD X0 Load contact A of X0
SET Y1 ANI Y0 Connect to contact B
SET Y1 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

DVP-PLC Application Manual 3-7


3 Basic Commands

When the RST command is driven, motion of its specific device is as follows:
Command
Explanation Device Status
S, Y, M Coil and contact will be set to “OFF”.
Present values of the timer or counter will be set to 0, and the coil and
T, C
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.

Ladder Diagram: Command Code: Command code


Program explanation:
Example X0 LD X0
RST Y5 RST Y5 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

When TMR command is executed, the specific coil of timer is ON and timer will start to
Command
Explanation 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
Ladder Diagram: Command Code: Command code
Program explanation:
Example X0 LD X0
TMR T5 K1000 TMR T5 K1000 Load contact A of X0
T5 timer
Setting is K1000

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

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-8 DVP-PLC Application Manual


3 Basic Commands

When the CNT command is executed from OFF ON, which means that the counter
Command
Explanation coil is driven, and 1 should thus be added to the counter’s 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.

Ladder Diagram: Command Code: Command code


Program explanation:
Example X0 LD X0 Load contact A of X0
CNT C20 K100 CNT C20 K100 C20 counter
Setting is K100

Command Functions Adaptive model


ES/EX/SS EP/SA EH
DCNT 32-bit counter

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

DCNT is the startup command for the 32-bit high-speed counter that is utilized
Command
Explanation 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 Off→On.
When specific high-speed counter pulse input of high-speed addition/subtraction
counters C235~C254 is from Off→On, 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.
LadderDiagram: Command Code: Command code
Program M0 LD M0 explanation:
Example DCNT C254 K1000 DCNT C254 K1000 Load contact A of
M0 and C254
LD M0 counter
DCNT C254 K1000 Setting is K1000

DVP-PLC Application Manual 3-9


3 Basic Commands

Command Functions Adaptive model


ES/EX/SS EP/SA EH
MC / MCR Master control Start/Reset command

Operand N0~N7

MC is the main-control start command. When the MC command is executed, the


Command
Explanation 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:
The counting value is set back to zero, the coil
Timer
and the contact are both turned OFF
The coil is OFF, and the timer value and the
Accumulative timer
contact stay at their present condition
The coil is OFF, and the counting value and the
Counter
contact stay at their present condition
Coils driven up by the OUT
All turned OFF
command
Devices driven up by the SET
Stay at present condition
and RST commands
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:
Ladder Diagram: Command Code Explanation
Program LD X0 Load A contact of X0
Example X0 MC N0 Enable N0 common series
MC N0 connection contact
X1 LD X1 Load A contact of X1
Y0 OUT Y0 Drive Y0 coil
:
X2 LD X2 Load A contact of X2
MC N1 MC N1 Enable N1 common series
connection contact
X3
LD X3 Load A contact of X3
Y1 OUT Y1 Drive Y1 coil
:
MCR N1 MCR N1 Disable N1 common series
connection contact
:
MCR N0 MCR N0 Disable N0 common series
X10 connection contact
:
MC N0
LD X10 Load A contact of X10
X11 MC N0 Enable N0 common series
Y10 connection contact
LD X11 Load A contact of X11
OUT Y10 Drive Y10 coil
MCR N0 :
MCR N0 Disable N0 common series
connection contact

3-10 DVP-PLC Application Manual


3 Basic Commands

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

Usage of the LDP command is the same as the LD command, but the motion is
Command
Explanation 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.
Ladder Diagram: Command code: Command code explanation:
Program
Example X0 X1 LDP X0 Start X0 rising-edge
Y1 AND X1 detection
OUT Y1 Series connection A contact
of X1
Drive Y1 coil
Please refer to the specification of every model for the operand usage.
Footnote 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

Usage of the LDF command is the same as the LD command, but the motion is
Command
Explanation 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.
Ladder Diagram: Command code: Command code
Program explanation:
Example X0 X1 LDF X0
Y1 AND X1 Start X0 falling-edge
OUT Y1 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

DVP-PLC Application Manual 3-11


3 Basic Commands

ANDP command is used in the series connection of the contacts’ rising-edge detection.
Command
Explanation
Ladder Diagram: Command Code: Command code
Program explanation:
Example X0 X1 LD X0
Y1 ANDP X1 Load A contact of X0
OUT Y1 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

ANDF command is used in the series connection of the contacts’ falling-edge detection.
Command
Explanation
Ladder Diagram: Command Code: Command code explanation:
Program
Example X0 X1 LD X0 Load A contact of X0
Y1 ANDF X1 X1 falling-edge detection in
OUT Y1 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

The ORP commands are used in the parallel connection of the contact’s rising-edge
Command
Explanation detection.

Ladder Diagram: Command Code: Command code


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

3-12 DVP-PLC Application Manual


3 Basic Commands

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

The ORP commands are used in the parallel connection of the contact’s falling-edge
Command
Explanation detection.

Ladder Diagram: Command Code: Command code


Program explanation:
Example X0 LD X0 Load A contact of X0
Y1 ORF X1 X1 falling-edge detection in
X1 OUT Y1 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
- - - - -

When X0=OFF→ON (rising-edge trigger), PLS command will be executed and M0 will
Command
Explanation send the pulse of one time which the length is a scan time.

Ladder Diagram: Command Code: Command code


Program X0 explanation:
Example PLS M0 LD X0 Load A contact of X0
PLS M0 M0 rising-edge output
M0
LD M0 Load the contact A of
SET Y0 SET Y0 M0
Timing Diagram:
Y0 latched (ON)
X0

M0 a scan time

Y0

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

DVP-PLC Application Manual 3-13


3 Basic Commands

When X0= ON→OFF (falling-edge trigger), PLF command will be executed and M0 will
Command
Explanation send the pulse of one time which the length is the time for scan one time.

Ladder Diagram: Command Code: Command code


Program X0 explanation:
Example PLF M0 LD X0 Load A contact of X0
PLF M0 M0 falling-edge output
M0
LD M0 Load the contact A of
SET Y0 SET Y0 M0
Timing Diagram:
Y0 latched (ON)
X0
a scan time
M0

Y0

Command Functions Adaptive model


ES/EX/SS EP/SA EH
END Program End

Operand None

It needs to add the END command at the end of ladder diagram program or command
Command
Explanation 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 This is a no-operation command and has no effect on the previous operation. NOP is
Explanation used in the following cases: To delete a command without changing the number of
steps. (Overwrite with NOP)

Ladder Diagram: Command Code: Command code


Program explanation:
Example Command NOP will be omitted LD X0 Load B contact of X0
when ladder diagram displays. NOP No operation
OUT Y1
X0 Drive Y1 coil
NOP Y1

3-14 DVP-PLC Application Manual


3 Basic Commands

Command Functions Adaptive model


ES/EX/SS EP/SA EH
INV Inverting Operation

Operand None

Inverting the operation result and use the new data as an operation result.
Command
Explanation
Ladder Diagram: Command Code: Command code
Program X0 explanation:
Example Y1 LD X0 Load A contact of X0
INV Inverting the operation
OUT Y1 result
Drive Y1 coil

Command Functions Adaptive model


ES/EX/SS EP/SA EH
P Pointer

Operand P0~P255

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

Ladder Diagram: Command Code: Command code


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

Command Functions Adaptive model


ES/EX/SS EP/SA EH
I Interrupt Pointers (I)

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


Operand
I010, I020, I030, I040, I050, I060, I110, I120, I130, I140

Interrupt programs should begin with interrupt pointer (I□□□)and ends with
Command
Explanation application command to be as interrupt end and return. It must use with application
commands API 03 IRET, API 04 EI, API 05 DI.

DVP-PLC Application Manual 3-15


3 Basic Commands

Ladder Diagram: Command Code: Command


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

The number of interrupt pointer I of ES / EX / SS series:


Footnote 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).

3-16 DVP-PLC Application Manual


4 Step Ladder Commands

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

The step ladder command, STL Sn, has constituted the stepping point, and when the
Command
Explanation 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 can’t be repeated.

Common Function Operand Adaptive model


ES/EX/SS EP/SA EH
RET Step Transition Ladder Return Command None

At the end of the step procedure, be sure to write in the RET command; the RET
Command
Explanation 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.
Ladder Diagram: SFC:
Program M1002
ZRST S0 S127 M1002
Example
SET S0 S0
S0 X0 X0
S SET S20
S20 S20 Y0
S Y0
X1 X1
SET S30
S30 S30 Y1
S Y1
X2
X2
SET S40 S40 Y2
S40
S Y2 X3
X3
S0

RET
S0

END

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).

DVP-PLC Application Manual 4-1


4 Step Ladder Commands

Features:

1. You don’t need to do SFC design for constant state step. PLC will execute the
SFC:
action of interlock and double output between each state. It is only needed do
simple SFC design for each state and make machine works.
S0
2. The action is easy to understand and easy to adjust initial PLC start-up, detect
X0
and maintain.
S21
3. SFC edition theory is made by IEC1131-3. It is figure edition mode and the
X1 X2
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 S22 S24
will transfer to the next step, i.e. next step point S, by setting condition. By X3
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 X4
to move from one step to the next step. In this figure, primary step point S0 will
S24
move to step point S21 once this transition condition X0 is established, and
X5
S21 can move to S22 or S24 by transition condition X1 or X2 and S25 will
S25
move to S0 to finish a whole procedure once transition condition X6 is
X6
established. By this way, it can circulate control with repeat again and again.
S0
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-2 DVP-PLC Application Manual


4 Step Ladder Commands

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.

M1002 M1002
primary pulse SET S0
S0 S0
S SET S21
S21
S21 S SET S22
S22
S SET S23
S22
S23
S S0
S23
RET

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:

S10 S10
S Y0 S Y0

SET Y1 SET Y1
X0 X0
When X0=ON,
SET S20 SET S20
S20=On,
S20 S10=Off. S20
S Y10 S Y10
X1 X1
SET S30 SET S30

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 won’t 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:

DVP-PLC Application Manual 4-3


4 Step Ladder Commands

1. Output coils of the same number could be used in different S10


step points. S Y0
2. Such as right diagram, there is the same output device
Y0 in the different state. No matter S10 or S20 is On, Y0 SET Y1
will be On.
3. Y0 will be close during the transition from S10 to S20 and X0
output Y0 after S20 is On. Thus in this case, Y0 will be SET S20
On no matter S10 or S20 is On. S20
4. For general ladder diagrams, repeated usages of the S Y0
output coils should be avoided. Output coil number used
X1
in step point should be avoided to use after returning to
general ladder diagram. SET S30

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
S20 TMR T1 K10
ladder diagram, but for general ladder diagrams, repeated
usages of the output coils should be avoided. Output coil X1
number used in step point should be avoided to use after S30 TMR T2 K20
returning to general ladder diagram.) X2
Note: as right diagram, ES/EX/SS/EP/SA series timer only S40 TMR T1 K30
used repeatedly in disconnected step point.

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:

Within the same procedure, S10


SET Sn S Y10
it is used to drive up the next X0
status step point, and after SET S12 When executing “SET S12”,
S12 status step point moves from
the status is transferred, S Y11 S12 to S10 and clear S10 and
X1 all outputs (Y10).
outputs of previous action SET S14
status points will be clear.

Within the same procedure, transfer of the simultaneous convergence point and different procedures
OUT Sn
are used to drive up separate step points, and after the status is transferred, outputs of previous action
status points will be clear.

4-4 DVP-PLC Application Manual


4 Step Ladder Commands

Within the same SFC diagram: Ladder diagram:

procedure, it is used to OUT S0


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

At different procedures, it SFC figure: ladder diagram:


is used to drive up OUT OUT S0 Drive separate
S0 S1 S step point
separate step points. S21 Using OUT S42
S
S21 S41 X2 step procedure
S42 inducted by S0
S23
X2
OUT S
S42
S1 RET
S
S23 S43 S42
S step procedure
S43 inducted by S1
S0 and S1 two different step procedures S
S23 return to primary step point RET
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 can’t 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.
BUS
Sn Sn Sn
S Y0 S Y0 S Y0
M0 M0
Y1 Y2 or Y1
M0 M1000
Y2 Y1 Y2
modify position
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:

DVP-PLC Application Manual 4-5


4 Step Ladder Commands

Basic commands that are to be used within the step point

Basic command LD/LDI/LDP/LDF


AND/ANI/ANDP/ANDF ANB/ORB
MC/MCR
OR/ORI/ORP/ORF MPS/MRD/MPP
Step point INV/OUT/SET/RST
Primary step point/ General step point Yes Yes No
Diverging step point/ General output Yes Yes No
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: Command code: Explanation:

LD X0 STL Sn The BUS of step point can’t use


MPS LD X0
Sn X0 X1 commands MPS / MRD / MPP
MPS
S Y1 directly. It needs to use command
AND X1
X2 LD or LDI before using
MRD M0 OUT Y1
BUS
X3 MRD commands MPS / MRD / MPP.
Y2 AND X2
MPP OUT M0
MPP
AND X3
OUT Y2

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.

S10 S10
S Y0 S Y0

SET S20 Y1

Y1 SET S20
S20 S20
S Y2 S Y2

4-6 DVP-PLC Application Manual


4 Step Ladder Commands

It is needed to add RET command after finishing step S20 X1


S S0
ladder program and RET command is also needed to add
after STL as shown in right figure. RET

S20 X1
S S0

RET

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 aren’t 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 OUT OUT
S0 S1
diagram; procedure of the program is to write in S0 ~S30 first,
and then S1~S43.
S21 S41
Either one step point on the procedure could jump to any one
specified step point on other procedures. OUT
S42
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. S30 S43

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.

DVP-PLC Application Manual 4-7


4 Step Ladder Commands

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-8 DVP-PLC Application Manual


4 Step Ladder Commands

Step Ladder Diagram SFC diagram


M1002
ZRST S0 S127 M1002
S0
SET S0 X0
S0 X0
S20 Y0
S SET S20
S20 X1
S Y0 S30 Y1
X1 X2
SET S30
S30
S40 Y2
S Y1 X3
X2 S50 Y3
SET S40
X4
S40
S Y2 S60 Y4
X3 X5
SET S50
S50
S Y3 S0
X4
SET S60
S60
S Y4
X5
S0

RET

END

DVP-PLC Application Manual 4-9


4 Step Ladder Commands

A-2 JUMP Procedure

1. Transfer control power of step 2. Transfer control power of step


point to upper certain step point to step point of other
point. procedure.

OUT OUT OUT


S0 S0 S1

OUT
S21 S21 S41

OUT
S42

S42
S41 S43

S43

A-3 Reset Procedure

At the right diagram, S50 will Reset itself and end the
S0
procedure when condition is held.

S21

RST
S50

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-10 DVP-PLC Application Manual


4 Step Ladder Commands

S20 X0
S SET S21

SET S22

SET S23

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:

S20 X0
S SET S30
X1
SET S31
X2
SET S32

SFC diagram of alternative divergence:

S20

X0 X1 X2

S30 S31 S32

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.

DVP-PLC Application Manual 4-11


4 Step Ladder Commands

Ladder diagram of simultaneous convergence:


S40 S41 S42 X2
S S S SET S50

SFC diagram of simultaneous convergence:

S40 S41 S42

X2
S50

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:


S30 X0
S SET S60
S40 X1
S SET S60
S50 X2
S SET S60

SFC diagram of alternative convergence:

S30 S40 S50


X0 X1 X2

S60

4-12 DVP-PLC Application Manual


4 Step Ladder Commands

Example of the alternative divergence and alternative convergence procedures

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

RET

END

DVP-PLC Application Manual 4-13


4 Step Ladder Commands

Example of the simultaneous divergence and simultaneous convergence procedures

M1002
M1002
ZRST S0 S127
S3
SET S3 X0
S3 X0 S20 Y0
S SET S20
X1
S20
S Y0
S30 Y1 S31 Y3 S32 Y5
X1
SET S30 X2 X3 X4
S40 Y2 S41 Y4 S42 Y6
SET S31
X5
SET S32
S50 TMR T1 K10
S30
S Y1 T1
X2 S60 Y7
SET S40 X6
S40
S Y2 S3
S31
S Y3
X3
SET S41
S41
S Y4
S32
S Y5
X4
SET S42
S42
S Y6
S40 S41 S42 X5
S S S SET S50
S50
S TMR T1 K10
T1
SET S60
S60
S Y7
X6
S3

RET

END

4-14 DVP-PLC Application Manual


4 Step Ladder Commands

Example of the simultaneous divergence and alternative convergence procedures

M1002
M1002
ZRST S0 S127
S4

SET S4 X0

S4 X0 S20 Y0
S SET S20 X1

S20
S30 Y1 S31 Y3 S32 Y5
S Y0
X2 X4 X6
X1
S40 Y2 S41 Y4 S42 Y6
SET S30
X3 X5 X7

SET S31 S50 TMR T1 K10


T1
SET S32
S60 Y7
S30
S Y1
X2 S4
SET S40
S40
S Y2
X3
SET S50
S31
S Y3
X4
SET S41
S41
S Y4
X5
SET S50
S32
S Y5
X6
SET S42
S42
S Y6
X7
SET S50
S50
S TMR T1 K10
T1
SET S60
S60
S Y7
X6
S4

RET

END

DVP-PLC Application Manual 4-15


4 Step Ladder Commands

Combination example 1: (includes the alternative divergence and convergence, the simultaneous divergence
and convergence)

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

END

M1002
S0 Y0
X0
S20 Y1

X1 X2 X3
S30 Y2 S31 Y3 S32 Y4
X4 X5 X6

S40 Y5 S41 Y6
X7 X10

S50 Y7 S51 Y10 S52 Y11 S53 Y12


X11 X12 X13 X14
S60 Y13 S61 Y14 S62 Y15 S63 Y16

X15 X16
S70 Y17
S0
X17

S0

4-16 DVP-PLC Application Manual


4 Step Ladder Commands

Combination example 2: (includes the alternative divergence and convergence, the simultaneous divergence
and convergence)

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

RET

END

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.
M1002
S0
X0
S20 Y0

X1 X2 X3 X4 X5 X6 X7 X10
S30 Y1 S31 Y2 S32 Y3 S32 Y4 S34 Y5 S35 Y6 S36 Y7 S37 Y10

X11 X12 X14 X15 X15 X15 X16 X17


RST
X13 SET S42 Y13
S40 Y11 OUT S41 Y12 S36
S0
S20 X25
X20 X26 X27 X30 X31
X21 X22 X23 X24
S59 Y25 S60 Y26 S61 Y27 S62 Y30 S63 Y31
OUT S58 Y24
S50 Y14 S51 Y15 S52 Y16 OUT
S53 Y17 S54 Y20 S55 Y21 S56 Y22 S57 Y23 S20 X40 X41 X42
S20 X37
X32 X33 X34 RST
X43
S70 Y32 S71 Y33 S72 Y34 X35 X36 S75 Y37
S58 S76 Y40
S73 Y35 S74 Y36 X47
SET X50
X44
X45 X46 S0 OUT
S80 Y41
S42
X51 S81 Y42
SET X52
S0 SET
S0

DVP-PLC Application Manual 4-17


4 Step Ladder Commands

4.6 IST command

API Applicable models


IST Manual/Auto Control ES/EX/SS EP/SA EH
60

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S ¼ ¼ ¼ Continuous
IST - -
D1 ¼ execution
D2 ¼
32-bit command
Note: Operand S will occupy 8 continuous devices.
- - - -
The usage range of operand D1 and D2 is S20~S899 and
D2>D1. Flag: M1040~M1047.
Refer to following for detail.
IST command only can be used one time in program.
Refer to each model specification for usage range.

: The starting input number of specific operation mode. : The smallest


Command
number for the specific status step point under the auto mode. : The greatest
Explanation
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.

Program M1000
Example IST X10 S20 S60
1
X10: Individual operation (Manual operation) X14: Continuous operation
X11: Zero point return X15: Zero point return start switch
X12: Step operation X16: Start switch
X13: One cycle operation X17: Stop switch
When the IST command is executed, the following special auxiliary relay will switch
automatically.
M1040: Movement inhibited S0: Manual operation/initial state step point
M1041: Movement start S1: Zero point return/initial state step point
M1042: Status pulse S2: Auto operation/initial state step point
M1047: STL monitor enable
When IST command is used, S10~S19 are for zero point return operation and the step
point of this state can’t 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 won’t have any actions
once one of S10~S19 is On.
When switching to S2 (auto operation mode), auto operation won’t have any actions
once one of between to is On or M1043=On

4-18 DVP-PLC Application Manual


4 Step Ladder Commands

Example: the Robot arm control (use IST command):


Program
Example Motion request: In the example, two kinds of balls (big and small) are separated and
2 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:
Right-limit X2 Right-limit X3
Left-limit X1 (big balls) (small balls)
Y0

Upper-limit X4 Y3 Y2
Y1
Upper-limit X5
Big/small Big Small
sensor X0
Control panel
Power start Zero return X15 Auto start X16

Power stop Auto stop X17

Collect Raise Shift


balls robot arm to right Step X12

Zero return X11 One cycle


X20 X22 X24 operation X13
Release Lower Shift
balls robot arm to left Continuous
Manual
operation X10 operation X14
X21 X23 X25

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:

X0 X1 Y4
M1044
M1000
IST X10 S20 S80

DVP-PLC Application Manual 4-19


4 Step Ladder Commands

Manual operation mode:


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

Zero point return mode:

SFC figure:

S1
X15
S10 RST Y4 Release balls

RST Y1 Stop lowering robot arm


Raise robot arm to the
X4 Y0
upper-limit (X4 is ON)
S11 RST Y2 Stop shifting to right

Shift to left and shift to


Y3
X1 the left-limit (X1 is On)

S12 SET M1043 Start zero return completed flag

RST S12 Zero return operation completed

4-20 DVP-PLC Application Manual


4 Step Ladder Commands

Ladder Diagram:
S1 X15
S SET S10 Enter zero return operation mode
S10
S RST Y4 Release balls

RST Y1 Stop lowering robot arm

Raise robot arm to the


Y0 upper-limit (X4 is ON)
X4
SET S11
S11
S RST Y2 Stop shifting to right

Y3
X1 Shift to left and shift to
SET S12 the left-limit (X1 is On)
S12
S SET M1043 Start zero return completed flag

RST S12 Zero return operation completed

Auto operation (step/one-cycle/continuous operation modes):

SFC figure:

S2
M1041
M1044
S20 Y1

X5 X5
X0 X0
S30 SET Y4 S40 SET Y4

TMR T0 K30 TMR T1 K30


T0 T1
S31 Y0 S41 Y0
X4 X4
X2 X3
S32 Y2 S42 Y2
X2 X3

S50 Y1
X5
S60 RST Y4

TMR T2 K30
T2
S70 Y0
X4
X1
S80 Y3
X1

S2

DVP-PLC Application Manual 4-21


4 Step Ladder Commands

Ladder Diagram:

S2 M1041 M1044
S SET S20 Enter auto operation mode
S20
S Y1 Lower robot arm
X5 X0
SET S30
X5 X0
SET S40
S30
S SET Y4 Collect balls

TMR T0 K30
T0
SET S31
S31
S Y0 Raise robot arm to the
upper-limit (X4 is ON)
X4
SET S32
S32 X2
S Y2 Shift to right
X2
SET S50
S40
S SET Y4 Collect balls

TMR T1 K30
T1
SET S41
S41
S Raise robot arm to the
Y0 upper-limit (X4 is ON)
X4
SET S42
S42 X3
S Y2 Shift to right
X3
SET S50
S50
S Y1 Lower robot arm
X5
SET S60
S60
S RST Y4 Release balls

TMR T2 K30
T2
SET S70
S70
S Y0 Raise robot arm to the
upper-limit (X4 is ON)
X4
SET S80
S80 X1
S Y3 Shift to left and shift to
the left-limit (X1 is On)
X1
S2

RET

END

4-22 DVP-PLC Application Manual


5 Application Commands

5.1 Summary of Parameters

Mnemonic Codes P Applicable models STEPS


API Function Page
Classification Command
16 bits 32 bits ES EP EH 16-bit 32-bit
00 CJ – 3 Conditional jump 3 3 3 3 – 6-1
01 CALL – 3 Call subroutine 3 3 3 3 – 6-5
02 SRET – – Subroutine return 3 3 3 1 – 6-5
03 IRET – – Interrupt return 3 3 3 1 – 6-7
Loop Control

04 EI – – Enable interrupt 3 3 3 1 – 6-7


05 DI – – Disable interrupt 3 3 3 1 – 6-7
Terminate the main routine
06 FEND – – 3 3 3 1 – 6-11
program
07 WDT – 3 Reset the watchdog timer 3 3 3 1 – 6-12
08 FOR – – Nested loops begin 3 3 3 3 – 6-14
09 NEXT – – Nested loops end 3 3 3 1 – 6-14
10 CMP DCMP 3 Comparison output 3 3 3 7 13 6-17
11 ZCP DZCP 3 Zone comparison 3 3 3 9 17 6-18
12 MOV DMOV 3 Data Move 3 3 3 5 9 6-19
Transmission
Comparison

13 SMOV – 3 Shift move – 3 3 11 – 6-20


14 CML DCML 3 Counter transfer 3 3 3 5 9 6-22
15 BMOV – 3 Block move 3 3 3 7 – 6-23
16 FMOV DFMOV 3 Multiple devices movement 3 3 3 7 13 6-24
17 XCH DXCH 3 Data exchange 3 3 3 5 9 6-25
18 BCD DBCD 3 Convert BIN data into BCD 3 3 3 5 9 6-26
19 BIN DBIN 3 Convert BCD data into BIN 3 3 3 5 9 6-27
20 ADD DADD 3 Perform the addition of BIN data 3 3 3 7 13 6-29
Perform the subtraction of BIN
Four Fundamental Operations of

21 SUB DSUB 3 3 3 3 7 13 6-30


data
Perform the multiplication of BIN
22 MUL DMUL 3 3 3 3 7 13 6-31
data
23 DIV DDIV 3 Perform the division of BIN data 3 3 3 7 13 6-32
Arithmetic

24 INC DINC 3 Perform the addition of 1 3 3 3 3 5 6-34


25 DEC DDEC 3 Perform the subtraction of 1 3 3 3 3 5 6-34
Perform the logical product
26 WAND DAND 3 3 3 3 7 13 6-35
(AND) operation
Perform the logical sum (OR)
27 WOR DOR 3 3 3 3 7 13 6-36
operation
Perform the exclusive logical add
28 WXOR DXOR 3 3 3 3 7 13 6-37
(XOR) operation
29 NEG DNEG 3 Complement of 2 3 3 3 3 5 6-38
30 ROR DROR 3 Rotate to the right 3 3 3 5 9 6-41
31 ROL DROL 3 Rotate to the left 3 3 3 5 9 6-42
Rotate to the right with the carry
Rotation and Displacement

32 RCR DRCR 3 3 3 3 5 9 6-43


flag attached
Rotate to the left with the carry
33 RCL DRCL 3 3 3 3 5 9 6-44
flag attached
Shift the data of device specified
34 SFTR – 3 3 3 3 9 – 6-45
to the right
Shift the data of device specified
35 SFTL – 3 – 3 3 9 – 6-46
to the left
36 WSFR – 3 Shift the register to the right – 3 3 9 – 6-47
37 WSFL – 3 Shift the register to the left – 3 3 9 – 6-48
38 SFWR – 3 Displacement is wrote – 3 3 7 – 6-49
39 SFRD – 3 Displacement is read – 3 3 7 – 6-50
Resets a range of device
40 ZRST – 3 3 3 3 5 – 6-51
specified
41 DECO – 3 8 → 256 bits decoder 3 3 3 7 – 6-53

DVP-PLC Application Manual 5-1


5 Application Commands

Mnemonic Codes P Applicable models STEPS


API Function Page
Classification Command
16 bits 32 bits ES EP EH 16-bit 32-bit
42 ENCO – 3 256 → 8 bits encoder 3 3 3 7 – 6-54
43 SUM DSUM 3 Sum of ON bits 3 3 3 5 9 6-56
Data Operation

44 BON DBON 3 Determine the ON bits 3 3 3 7 13 6-56


45 MEAN DMEAN 3 Mean value 3 3 3 7 13 6-57
46 ANS – – Alarm device output – 3 3 7 – 6-58
47 ANR – 3 Alarm device reset – 3 3 1 – 6-58
48 SQR DSQR 3 Square root of BIN 3 3 3 5 9 6-60
Convert BIN integer to binary
49 FLT DFLT 3 3 3 3 5 9 6-61
floating point
50 REF – 3 I/O refresh 3 3 3 5 – 7-1
Refresh and adjust the response
51 REFF – 3 – 3 3 3 – 7-2
time of input filter
52 MTR – – Input matrix – 3 3 9 – 7-3
High Speed Processing

High speed counter comparison


53 – DHSCS – 3 3 3 – 13 7-6
SET
High speed counter comparison
54 – DHSCR – 3 3 3 – 13 7-15
RESET
Zone comparison (High-speed
55 – DHSZ – – 3 3 – 17 7-17
counter)
56 SPD – – Speed detection – 3 3 7 – 7-24
57 PLSY DPLSY – Pulse output 3 3 3 7 13 7-25
58 PWM – – Pulse width modulation output 3 3 3 7 – 7-30
Pulse wave output with
59 PLSR DPLSR – 3 3 3 9 17 7-31
acceleration/deceleration speed
60 IST – – Manual/Auto control 3 3 3 7 – 7-36
Convenience Command

61 SER DSER 3 Multiple devices comparison – 3 3 9 17 7-42


62 ABSD DABSD – Absolute cam control – 3 3 9 17 7-43
63 INCD – – Relative cam control – 3 3 9 – 7-44
64 TTMR – – Alternate timer – 3 3 5 – 7-46
65 STMR – – Special timer – 3 3 7 – 7-48
66 ALT – – On/Off alternate command 3 3 3 3 – 7-49
67 RAMP – – Ramp signal – 3 3 9 – 7-50
69 SORT – – Data sort – 3 3 11 – 7-52
70 TKY DTKY – 10-key keypad input – 3 3 7 13 7-54
71 HKY DHKY – 16-key keypad input – 3 3 9 17 7-56
External I/O Display

72 DSW – – Digital Switch input – 3 3 9 – 7-58


73 SEGD – 3 Decode the 7-step display panel 3 3 3 5 – 7-60
74 SEGL – – 7-step display scan output 3 3 3 7 – 7-61
75 ARWS – – Arrow keypad input – 3 3 9 – 7-65
76 ASC – – ASCII code conversion – 3 3 11 – 7-66
77 PR – – ASCII code output – 3 3 5 – 7-67
78 FROM DFROM 3 Read special module CR data 3 3 3 9 17 7-69
79 TO DTO 3 Special module CR data write in 3 3 3 9 17 7-69
80 RS – – Serial data communication 3 3 3 9 – 7-74
Octal number system
81 PRUN DPRUN 3 – 3 3 5 9 7-87
transmission
Serial I/O

82 ASCII – 3 Convert HEX to ASCII 3 3 3 7 – 7-88


83 HEX – 3 Convert ASCII to HEX 3 3 3 7 – 7-92
84 CCD – 3 Check sum – 3 3 7 – 7-95
85 VRRD – 3 Volume read – 3 3 5 – 7-97
86 VRSC – 3 Volume scale – 3 3 5 – 7-99
87 ABS DABS 3 Absolute value 3 3 3 3 5 7-100
88 PID DPID – PID calculation 3 3 3 9 – 7-100

5-2 DVP-PLC Application Manual


5 Application Commands

Mnemonic Codes P Applicable models STEPS


API Function Page
Classification Command
16 bits 32 bits ES EP EH 16-bit 32-bit
89 PLS – – Rising-edge output 3 3 3 3 – 3-13
90 LDP – – Rising-edge detection operation 3 3 3 3 – 3-11
91 LDF – – Falling-edge detection operation 3 3 3 3 – 3-11
Series connection command for
92 ANDP – – the rising-edge detection 3 3 3 3 – 3-11
operation
Series connection command for
Basic Command

93 ANDF – – the falling-edge detection 3 3 3 3 – 3-12


operation
Parallel connection command for
94 ORP – – the rising-edge detection 3 3 3 3 – 3-12
operation
Parallel connection command for
95 ORF – – the falling-edge detection 3 3 3 3 – 3-13
operation
96 TMR – – Timer 3 3 3 4 – 3-8
97 CNT DCNT – Counter 3 3 3 4 6 3-8
98 INV – – Inverting operation 3 3 3 1 – 3-15
99 PLF – – Falling-edge output 3 3 3 3 – 3-13
100 MODRD – – MODBUS data Read 3 3 3 7 – 8-1
Communication command of Delta

101 MODWR – – MODBUS data write in 3 3 3 7 – 8-5


VFD-A series drive forward
102 FWD – – 3 3 3 7 – 8-8
command
AC Motor Drives

VFD-A series drive reverse


103 REV – – 3 3 3 7 – 8-9
command
VFD-A series drive stop
104 STOP – – 3 3 3 7 – 8-9
command
105 RDST – – VFD-A series drive status read 3 3 3 5 – 8-11
VFD-A series drive abnormal
106 RSTEF – – 3 3 3 5 – 8-13
reset
107 LRC – 3 LRC check sum – 3 3 7 – 8-13
108 CRC – 3 CRC check sum – 3 3 7 – 8-15
109 SWRD – 3 Digital switch read – 3 3 3 – 8-18
110 – DECMP 3 Binary floating point comparison 3 3 3 – 13 8-19
Binary floating point zone
111 – DEZCP 3 3 3 3 – 17 8-20
comparison
116 – DRAD 3 Degree Radian – 3 3 – 9 8-21
117 – DDEG 3 Radian Degree – 3 3 – 9 8-21
Convert binary floating point to
Floating Operation

118 – DEBCD 3 3 3 3 – 9 8-23


decimal floating point
Convert decimal floating point to
119 – DEBIN 3 3 3 3 – 9 8-23
binary floating point
120 – DEADD 3 Binary floating point addition 3 3 3 – 13 8-24
121 – DESUB 3 Binary floating point subtraction 3 3 3 – 13 8-25
Binary floating point
122 – DEMUL 3 3 3 3 – 13 8-26
multiplication
123 – DEDIV 3 Binary floating point division 3 3 3 – 13 8-27
Perform exponent operation of
124 – DEXP 3 3 3 3 – 9 8-28
binary floating point
Perform natural logarithm
125 – DLN 3 3 3 3 – 9 8-29
operation of binary floating point
Perform logarithm operation of
126 – DLOG 3 3 3 3 – 13 8-30
binary floating point
Square root of binary floating
127 – DESQR 3 3 3 3 – 9 8-31
point

DVP-PLC Application Manual 5-3


5 Application Commands

Mnemonic Codes P Applicable models STEPS


API Function Page
Classification Command
16 bits 32 bits ES EP EH 16-bit 32-bit
Perform power operation of
128 – DPOW 3 3 3 3 – 13 8-32
binary floating point
Convert binary floating point to
129 INT DINT 3 3 3 3 5 9 8-33
BIN integer
Sine operation of binary floating
130 – DSIN 3 3 3 3 – 9 8-34
point
Cosine operation of binary
131 – DCOS 3 3 3 3 – 9 8-36
floating point
Floating Operation

Tangent operation of binary


132 – DTAN 3 3 3 3 – 9 8-37
floating point
Arcsine operation of binary
133 – DASIN 3 – 3 3 – 9 8-39
floating point
Arccosine operation of binary
134 – DACOS 3 – 3 3 – 9 8-40
floating point
Arctangent operation of binary
135 – DATAN 3 – 3 3 – 9 8-41
floating point
Hyperbolic sine operation of
136 – DSINH 3 – 3 3 – 9 8-42
binary floating point
Hyperbolic cosine operation of
137 – DCOSH 3 – 3 3 – 9 8-42
binary floating point
Hyperbolic tangent operation of
138 – DTANH 3 – 3 3 – 9 8-43
binary floating point
General pulse width modulation
144 GPWM – – – – 7 8-44
output
145 FTC – – Fuzzy temperature control – – 9 8-45
Additional Command

147 SWAP DSWAP 3 Swap high/low byte 3 3 3 3 5 8-48


148 MEMR DMEMR 3 MEMORY read – 3 3 7 13 8-49
149 MEMW DMEMW 3 MEMORY write in – 3 3 7 13 8-50
150 MODRW – – MODBUS data read/write in 3 3 3 11 – 9-1
151 PWD – – Input pulse width detection – – 3 5 – 9-11
Start to measure the execution
152 RTMU – – – – 3 5 – 9-11
time of I interrupt
End to measure the execution
153 RTMD – – – – 3 3 – 9-12
time of I interrupt
154 RAND – – Random value – 3 3 9 – 9-13
155 ABSR DABSR – ABS current value read – – 3 7 13 9-14
Positioning
Control

156 ZRN DZRN – Zero point return – – 3 9 17 9-18


157 PLSV DPLSV – Variable speed pulse output – – 3 7 13 9-21
158 DRVI DDRVI – Relative positioning – – 3 9 17 9-22
159 DRVA DDRVA – Absolute positioning – – 3 9 17 9-26
Perpetual calendar data
160 TCMP – 3 – 3 3 11 – 9-35
comparison
Perpetual Calendar

Perpetual calendar data zone


161 TZCP – 3 – 3 3 9 – 9-36
comparison
162 TADD – 3 Perpetual calendar data addition – 3 3 7 – 9-37
Perpetual calendar data
163 TSUB – 3 – 3 3 7 – 9-38
subtraction
166 TRD – 3 Perpetual calendar data read – 3 3 3 – 9-40
167 TWR – 3 Perpetual calendar data write in – 3 3 3 – 9-42
169 HOUR DHOUR – Hour meter – 3 3 7 13 9-44
170 GRY DGRY 3 Convert BIN to Gray code – 3 3 5 9 9-45
Gray Code 171 GBIN DGBIN 3 Convert Gray code to BIN – 3 3 5 9 9-46
180 MAND – 3 Matrix AND – – 3 9 – 9-47
181 MOR – 3 Matrix OR – – 3 9 – 9-49

5-4 DVP-PLC Application Manual


5 Application Commands

Mnemonic Codes P Applicable models STEPS


API Function Page
Classification Command
16 bits 32 bits ES EP EH 16-bit 32-bit
182 MXOR – 3 Matrix XOR – – 3 9 – 9-50
183 MNOR – 3 Matrix NOR – – 3 9 – 9-51
Matrix Handling

184 MINV – 3 Matrix inverse – – 3 7 – 9-52


185 MCMP – 3 Matrix compare – – 3 9 – 9-52
186 MBRD – 3 Matrix bit read – – 3 7 – 9-54
187 MBWR – 3 Matrix bit write – – 3 7 – 9-55
188 MBS – 3 Matrix bit shift – – 3 7 – 9-56
189 MBR – 3 Matrix bit rotate – – 3 7 – 9-58
190 MBC – 3 Matrix bit state count – – 3 7 – 9-59
High-level
196 HST DHST 3 High speed counter – – 3 3 – 9-60
Command
215 LD& DLD& – S1 & S2 – 3 3 5 9 10-1
216 LD| DLD| – S1 | S2 – 3 3 5 9 10-1
Contact Type Logic

217 LD^ DLD^ – S1 ^ S2 – 3 3 5 9 10-1


Operation

218 AND& DAND& – S1 & S2 – 3 3 5 9 10-2


219 AND| DAND| – S1 | S2 – 3 3 5 9 10-2
220 AND^ DAND^ – S1 ^ S2 – 3 3 5 9 10-2
221 OR& DOR& – S1 & S2 – 3 3 5 9 10-3
222 OR| DOR| – S1 | S2 – 3 3 5 9 10-3
223 OR^ DOR^ – S1 ^ S2 – 3 3 5 9 10-3
224 LD= DLD= – S1 = S2 3 3 3 5 9 10-4
225 LD> DLD> – S1 > S2 3 3 3 5 9 10-4
226 LD< DLD< – S1 < S2 3 3 3 5 9 10-4
228 LD<> DLD<> – S1 ≠ S2 3 3 3 5 9 10-4
Contact Type Compare Command

229 LD<= DLD<= – S1 ≦ S2 3 3 3 5 9 10-4


230 LD>= DLD>= – S1 ≧ S2 3 3 3 5 9 10-4
232 AND= DAND= – S1 = S2 3 3 3 5 9 10-5
233 AND> DAND> – S1 > S2 3 3 3 5 9 10-5
234 AND< DAND< – S1 < S2 3 3 3 5 9 10-5
236 AND<> DAND<> – S1 ≠ S2 3 3 3 5 9 10-5
237 AND<= DAND<= – S1 ≦ S2 3 3 3 5 9 10-5
238 AND>= DAND>= – S1 ≧ S2 3 3 3 5 9 10-5
240 OR= DOR= – S1 = S2 3 3 3 5 9 10-6
241 OR> DOR> – S1 > S2 3 3 3 5 9 10-6
242 OR< DOR< – S1 < S2 3 3 3 5 9 10-6
244 OR<> DOR<> – S1 ≠ S2 3 3 3 5 9 10-6
245 OR<= DOR<= – S1 ≦ S2 3 3 3 5 9 10-6
246 OR>= DOR>= – S1 ≧ S2 3 3 3 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 don’t possess pulse execution command (P command).

DVP-PLC Application Manual 5-5


5 Application Commands

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:

1 2 3 4 5 6 7

API Applicable models


41 DECO P S D n 8 to 256 bit Encoder ES/EX/SS EP EH

15 Bit device Word device 16-bit command (7 STEPS) 8


14 X Y M S K H T C D E F Continuous Pulse
DECO execution DECOP
execution
13 S
32-bit command 9
D
n
12 Flag: None 10
Note: When D is a bit device, n=1~8
11
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-6 DVP-PLC Application Manual


5 Application Commands

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 When X0=On, K10 has been sent to D10.


MOV K10 D10

32-bit DMOV command


When X1=On, Data of (D11, D10) have been
X1
D10 D20 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

DVP-PLC Application Manual 5-7


5 Application Commands

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


When X0 goes from OFF→ON, the MOVP command
X0
D10 D12 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


When X1=ON, the MOV command can be
X1
MOV D10 D12 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-8 DVP-PLC Application Manual


5 Application Commands

X0 When X0=On, move the contents of M0 to M7 to D10


MOV K2M0 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): Specified Number of Digits (32-bit command):
K-32,768~K+32,767 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.

DVP-PLC Application Manual 5-9


5 Application Commands
X0
SET M0 When X0=ON, DSW command is activated.
M0 When X0=OFF, wait for the program cycle of
DSW X10 Y10 D0 K0 DSW command being completed, after
M1029 M1029=ON, then M0 will be OFF.
RST M0

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 When error operations occur, M1067=On, D1067 will show the error number and D1069 will
D1067 show the error address.
D1069 If other errors occur, the contents of D1067 and D1069 will be refreshed. (when the error is
resetd, M1067=Off)
M1068 When error operations occur, M1068=On, D1068 will show the error address.
D1068 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-10 DVP-PLC Application Manual


5 Application Commands

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.

DVP-PLC Application Manual 5-11


5 Application Commands

valid data

M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M1 M0


0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
low byte
transmit
clear to 0

D1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0

equal to
low byte
D1 0 0 0 0 0 0 0 0 0 1 0 1 0 1 0 1

Transmit K1M0, K2M0, K3M0 to 16-bit registers and insufficient upper bit data have not been transmitted.
It’s 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
The BCD value combined by X4 to X13 will be converted to
BIN K2X4 D0
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, X20…Y0, 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, M20…etc.

Assign Continuous Numbers

For example , like D date register, the continuous numbers of D are D0, D1, D2, D3, D4…etc.

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-12 DVP-PLC Application Manual


5 Application Commands

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:
8-bit 23-bit

S exponent mantissa

b 31 b0

Sign bit
0: positive
1: negative

Equation (− 1) × 2 E − B × 1.M ; B = 127


S

Therefore, the range of 32-bit floating is from ±2-126 to ±2+128, i.e. from ±1.1755×10-38 to ±3.4028×10+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 × 24, 0111 is mantissa and 4 is an exponent.

Step 3: get exponent: E-B=4 →E-127=4 E=131=100000112

Step 4: We can now combine the sign, exponent, and normalized mantissa into the binary IEEE short real
representation.

0 10000011 011100000000000000000002=41B8000016
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 011100000000000000000002=C1B8000016

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.
D1(b15~b0) D0(b15~b0)
7 6 5 1 0 -1 -2 -3 -17 -18 -19 -20 -21 -22 -23
2 2 2 2 2 2 2 2 2 2 2 2 2 2 2
S E7 E6 E5 E1 E0 A22 A21 A20 A6 A5 A4 A3 A2 A1 A0
b31 b30 b29 b28 b24 b23 b22 b21 b20 b6 b5 b4 b3 b2 b1 b0

8 bits of exponent 23 bits of constant


E0~E7=0 or 1 A0~A22=0 or 1

sign bit (0: positive 1:negative)


When b0~b31 is 0, the content is 0.

DVP-PLC Application Manual 5-13


5 Application Commands

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 doesn’t exist in D0 due to 100 will be shown with 1,000×10-1.
The range of decimal number is from ±1175×10-41 to ±3402×10+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).

E and F are also 16-bit register just the same as general


register. It can be wrote/read freely.

16-bit 16-bit If using a 32-bit register, you should specify E. In this


E0 F0 condition, F will be covered by E and cannot be used
anymore; otherwise the contents of E will become incorrect.
32-bit
(When PLC start-up, it is commended to use MOVP
E0 F0 command to clear the contents of F and reset it to 0)
upper bit lower bit
When using 32-bit index register, the combination of E, F are
as follows. (E0, F0), (E1, F1), (E2, F2)…(E7, F7).

5-14 DVP-PLC Application Manual


5 Application Commands

As the left figure shown, the contents of operand will change

MOV K20E0 D10F0 according to the contents of E, F. and we name this kind of
modification as “Index”.

E0=8 F0=14 For example, E0=8 and K20E0 all represent constant
20+8=28 10+14=24 K28(20+8). If the contact is ON, constant K28 will be
K28 D24 transmit 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: T0 can use index register F0 to shorten the program and
display the 7 present value of T0~T9 on the external 7-step

The digit switch input X3~X0, display panel.


5 which be selected by Timer T
M1000
BIN K1X0 F0
(X3~X0)BCD (F0)BIN

DVP - PLC BCD T0F0 K4Y0


(T0F0)BIN (Y17~Y0)BCD

When F0=0~9, T0F0=T0~T9.

The 7-step display output Y17~Y0, which be


used to display the present value of Timer T

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.

DVP-PLC Application Manual 5-15


5 Application Commands

5.5 Index for Commands


• Sort by Characters

Mnemonic Codes P Applicable models STEPS


Classification A P I Function Page
Command
16 bits 32 bits ES EP EH 16-bit 32-bit

87 ABS DABS 3 Absolute value 3 3 3 3 5 7-100


62 ABSD DABSD – Absolute cam control – 3 3 9 17 7-43
155 ABSR DABSR – ABS current value read – – 3 7 13 9-14
20 ADD DADD 3 Perform the addition of BIN data 3 3 3 7 13 6-29
66 ALT – – On/Off alternate command 3 3 3 3 – 7-49
218 AND& DAND& – S1 & S2 – 3 3 5 9 10-2
220 AND^ DAND^ – S1 ^ S2 – 3 3 5 9 10-2
219 AND| DAND| – S1 | S2 – 3 3 5 9 10-2
234 AND< DAND< – S1 < S2 3 3 3 5 9 10-5
237 AND<= DAND<= – S1 ≦ S2 3 3 3 5 9 10-5
236 AND<> DAND<> – S1 ≠ S2 3 3 3 5 9 10-5
232 AND= DAND= – S1 = S2 3 3 3 5 9 10-5
233 AND> DAND> – S1 > S2 3 3 3 5 9 10-5
238 AND>= DAND>= – S1 ≧ S2 3 3 3 5 9 10-5
Series connection command for
A 93 ANDF – – the falling-edge detection 3 3 3 3 – 3-12
operation
Series connection command for
92 ANDP – – the rising-edge detection 3 3 3 3 – 3-11
operation
47 ANR – 3 Alarm device reset – 3 3 1 – 6-58
46 ANS – – Alarm device output – 3 3 7 – 6-58
75 ARWS – – Arrow keyboard input – 3 3 9 – 7-65
76 ASC – – ASCII code conversion – 3 3 11 – 7-66
82 ASCII – 3 Convert HEX to ASCII 3 3 3 7 – 7-88
Arcsine operation of binary
133 – DASIN 3 – 3 3 – 9 8-39
floating point
Arccosine operation of binary
134 – DACOS 3 – 3 3 – 9 8-40
floating point
Arctangent operation of binary
135 – DATAN 3 – 3 3 – 9 8-41
floating point
18 BCD DBCD 3 Convert BIN data into BCD 3 3 3 5 9 6-26
19 BIN DBIN 3 Convert BCD data into BIN 3 3 3 5 9 6-27
B
15 BMOV – 3 Block move 3 3 3 7 – 6-23
44 BON DBON 3 Determine the ON bits 3 3 3 7 13 6-56
01 CALL – 3 Call subroutine 3 3 3 3 – 6-5
84 CCD – 3 Check sum – 3 3 7 – 7-95
00 CJ – 3 Conditional jump 3 3 3 3 – 6-1
14 CML DCML 3 Counter transfer 3 3 3 5 9 6-22
10 CMP DCMP 3 Comparison output 3 3 3 7 13 6-17
C 97 CNT DCNT – Counter 3 3 3 4 6 3-8
Cosine operation of binary
131 – DCOS 3 3 3 3 – 9 8-36
floating point
Hyperbolic cosine operation of
137 – DCOSH 3 – 3 3 – 9 8-42
binary floating point
108 CRC – 3 CRC check sum – 3 3 7 – 8-15

5-16 DVP-PLC Application Manual


5 Application Commands

Mnemonic Codes P Applicable models STEPS


Classification A P I Function Page
Command
16 bits 32 bits ES EP EH 16-bit 32-bit
25 DEC DDEC 3 Perform the subtraction of 1 3 3 3 3 5 6-34
41 DECO – 3 8 → 256 bits decode 3 3 3 7 – 6-53
117 – DDEG 3 Radian → Degree – 3 3 – 9 8-21
05 DI – – Disable interrupt 3 3 3 1 – 6-7
D
23 DIV DDIV 3 Perform the division of BIN data 3 3 3 7 13 6-32
159 DRVA DDRVA – Absolute positioning – – 3 9 17 9-26
158 DRVI DDRVI – Relative positioning – – 3 9 17 9-22
72 DSW – – Digital Switch input – 3 3 9 – 7-58
120 – DEADD 3 Binary floating point addition 3 3 3 – 13 8-24
Convert binary floating point to
118 – DEBCD 3 3 3 3 – 9 8-23
decimal floating point
Convert decimal floating point to
119 – DEBIN 3 3 3 3 – 9 8-23
binary floating point
110 – DECMP 3 Binary floating point comparison 3 3 3 – 13 8-19
123 – DEDIV 3 Binary floating point division 3 3 3 – 13 8-27
04 EI – – Enable interrupt 3 3 3 1 – 6-7
Binary floating point
122 – DEMUL 3 3 3 3 – 13 8-26
E multiplication
42 ENCO – 3 256 → 8 bits encode 3 3 3 7 – 6-54
Square root of binary floating
127 – DESQR 3 3 3 3 – 9 8-31
point
121 – DESUB 3 Binary floating point subtraction 3 3 3 – 13 8-25

Convert binary floating point to


124 – DEXP 3 3 3 3 – 9 8-28
perform exponent operation

Binary floating point zone


111 – DEZCP 3 3 3 3 – 17 8-20
comparison
Terminate the main routine
06 FEND – – 3 3 3 1 – 6-11
program
Convert BIN integer to binary
49 FLT DFLT 3 3 3 3 5 9 6-61
floating point
16 FMOV DFMOV 3 Multiple devices movement 3 3 3 7 13 6-24
F 08 FOR – – Nested loops begin 3 3 3 3 – 6-14
78 FROM DFROM 3 Read special module CR data 3 3 3 9 17 7-69
VFD-A series drive forward
102 FWD – – 3 3 3 7 – 8-8
command
145 FTC – – Fuzzy temperature control – 9 9 – 9 8-45
General pulse width modulation
144 GPWM – – – 9 9 – 7 8-44
output
G
171 GBIN DGBIN 3 Convert Gray code to BIN – P P 5 9 9-45
170 GRY DGRY 3 Convert BIN to Gray code – P P 5 9 9-44
83 HEX – 3 Convert ASCII to HEX 3 P P 7 – 7-92
71 HKY DHKY – 16-key keyboard input – P P 9 17 7-56
169 HOUR DHOUR – Hour meter – P P 7 13 9-44
H High speed counter comparison
54 – DHSCR – 3 P P – 13 7-15
RESET
High speed counter comparison
53 – DHSCS – 3 3 3 – 13 7-6
SET
196 HST DHST 3 High speed counter – – 3 3 – 9-60

DVP-PLC Application Manual 5-17


5 Application Commands

Mnemonic Codes P Applicable models STEPS


Classification A P I Function Page
Command
16 bits 32 bits ES EP EH 16-bit 32-bit
Zone comparison (High-speed
55 – DHSZ – – 3 3 – 17 7-17
counter)
24 INC DINC 3 Perform the addition of 1 3 3 3 3 5 6-34
63 INCD – – Relative cam control – 3 3 9 – 7-44
Convert binary floating point to
129 INT DINT 3 3 3 3 5 9 8-33
I BIN integer
98 INV – – Inverting operation 3 3 3 1 – 3-15
03 IRET – – Interrupt return 3 3 3 1 – 6-7
60 IST – – Manual/Auto control 3 3 3 7 – 7-36
215 LD& DLD& – S1 & S2 – 3 3 5 9 10-1
217 LD^ DLD^ – S1 ^ S2 – 3 3 5 9 10-1
216 LD| DLD| – S1 | S2 – 3 3 5 9 10-1
226 LD< DLD< – S1 < S2 3 3 3 5 9 10-4
229 LD<= DLD<= – S1 ≦ S2 3 3 3 5 9 10-4
228 LD<> DLD<> – S1 ≠ S2 3 3 3 5 9 10-4
224 LD= DLD= – S1 = S2 3 3 3 5 9 10-4
225 LD> DLD> – S1 > S2 3 3 3 5 9 10-4
L 230 LD>= DLD>= – S1 ≧ S2 3 3 3 5 9 10-4
91 LDF – – Falling-edge detection operation 3 3 3 3 – 3-11
90 LDP – – Rising-edge detection operation 3 3 3 3 – 3-11
Convert binary floating point to
125 – DLN 3 perform natural logarithm 3 3 3 – 9 8-29
operation

Convert binary floating point to


126 – DLOG 3 3 3 3 – 13 8-30
perform logarithm operation

107 LRC – 3 LRC check sum – 3 3 7 – 8-13


180 MAND – 3 Matrix AND – – 3 9 – 9-47
190 MBC – 3 Matrix bit state count – – 3 7 – 9-59
189 MBR – 3 Matrix bit rotate – – 3 7 – 9-58
186 MBRD – 3 Matrix bit read – – 3 7 – 9-54
188 MBS – 3 Matrix bit shift – – 3 7 – 9-56
187 MBWR – 3 Matrix bit write – – 3 7 – 9-55
185 MCMP – 3 Matrix compare – – 3 9 – 9-52
45 MEAN DMEAN 3 Mean value 3 3 3 7 13 6-57
148 MEMR DMEMR 3 MEMORY read – 3 3 7 13 8-49
149 MEMW DMEMW 3 MEMORY write in – 3 3 7 13 8-50
M 184 MINV – 3 Matrix inverse – – 3 7 – 9-51
183 MNOR – 3 Matrix NOR – – 3 9 – 9-52
100 MODRD – – MODBUS data Read 3 3 3 7 – 8-1
150 MODRW – – MODBUS data read/write in 3 3 3 11 – 9-1
101 MODWR – – MODBUS data write in 3 3 3 7 – 8-5
181 MOR – 3 Matrix OR – – 3 9 – 9-49
12 MOV DMOV 3 Data Move 3 3 3 5 9 6-19
52 MTR – – Input matrix – 3 3 9 – 7-3
Perform the multiplication of BIN
22 MUL DMUL 3 3 3 3 7 13 6-31
data
182 MXOR – 3 Matrix XOR – – 3 9 – 9-50

5-18 DVP-PLC Application Manual


5 Application Commands

Mnemonic Codes P Applicable models STEPS


Classification A P I Function Page
Command
16 bits 32 bits ES EP EH 16-bit 32-bit

29 NEG DNEG 3 Complement of 2 3 3 3 3 5 6-38


N
09 NEXT – – Nested loops end 3 3 3 1 – 6-14
221 OR& DOR& – S1 & S2 – 3 3 5 9 10-3
O
223 OR^ DOR^ – S1 ^ S2 – 3 3 5 9 10-3
222 OR| DOR| – S1 | S2 – 3 3 5 9 10-3
242 OR< DOR< – S1 < S2 3 3 3 5 9 10-6
245 OR<= DOR<= – S1 ≦ S2 3 3 3 5 9 10-6
244 OR<> DOR<> – S1 ≠ S2 3 3 3 5 9 10-6
240 OR= DOR= – S1 = S2 3 3 3 5 9 10-6
241 OR> DOR> – S1 > S2 3 3 3 5 9 10-6
O 246 OR>= DOR>= – S1 ≧ S2 3 3 3 5 9 10-6
Parallel connection command for
95 ORF – – the falling-edge detection 3 3 3 3 – 3-13
operation
Parallel connection command for
94 ORP – – the rising-edge detection 3 3 3 3 – 3-12
operation
88 PID – – PID calculation 3 3 3 9 – 7-100
99 PLF – – Falling-edge output 3 3 3 3 – 3-13
89 PLS – – Rising-edge output 3 3 3 3 – 3-13
Pulse wave output with
59 PLSR DPLSR – 3 3 3 9 17 7-31
acceleration/deceleration speed
157 PLSV DPLSV – Variable speed pulse output – – 3 7 13 9-21
57 PLSY DPLSY – Pulse output 3 3 3 7 13 7-25
P
Convert binary floating point to
128 – DPOW 3 3 3 3 – 13 8-32
perform power operation

77 PR – – ASCII code output – 3 3 5 – 7-67


Octal number system
81 PRUN DPRUN 3 – 3 3 5 9 7-87
transmission
151 PWD – – Input pulse width detection – – 3 5 – 9-11
58 PWM – – Pulse width modulation output 3 3 3 7 – 7-30
116 – DRAD 3 Degree → Radian – 3 3 – 9 8-21
67 RAMP – – Ramp signal – 3 3 9 – 7-50
154 RAND – – Random value – 3 3 9 – 9-13
Rotate to the left with the carry
33 RCL DRCL 3 3 3 3 5 9 6-44
flag attached
R
Rotate to the right with the carry
32 RCR DRCR 3 3 3 3 5 9 6-43
flag attached

105 RDST – – VFD-A series drive status read 3 3 3 5 – 8-11

50 REF – 3 I/O refresh 3 3 3 5 – 7-1


Refresh and adjust the response
51 REFF – 3 – 3 3 3 – 7-2
time of input filter

R VFD-A series drive reverse


103 REV – – 3 3 3 7 – 8-9
command
31 ROL DROL 3 Rotate to the left 3 3 3 5 9 6-42
30 ROR DROR 3 Rotate to the right 3 3 3 5 9 6-41
80 RS – – Serial data communication 3 3 3 9 – 7-74

DVP-PLC Application Manual 5-19


5 Application Commands

Mnemonic Codes P Applicable models STEPS


Classification A P I Function Page
Command
16 bits 32 bits ES EP EH 16-bit 32-bit
VFD-A series drive abnormal
106 RSTEF – – 3 3 3 5 – 8-13
reset
End to measure the execution
153 RTMD – – – – 3 3 – 9-12
time of I interrupt
Start to measure the execution
152 RTMU – – – – 3 5 – 9-11
time of I interrupt
73 SEGD – 3 Decode the 7-step display panel 3 3 3 5 – 7-60
74 SEGL – – 7-step display scan output 3 3 3 7 – 7-61
61 SER DSER 3 Multiple devices comparison – 3 3 9 17 7-42
39 SFRD – 3 Displacement is read – 3 3 7 – 6-50
Shift the data of device specified
35 SFTL – 3 – 3 3 9 – 6-46
to the left
Shift the data of device specified
34 SFTR – 3 3 3 3 9 – 6-45
to the right
38 SFWR – 3 Displacement is wrote – 3 3 7 – 6-49
Sine operation of binary floating
130 – DSIN 3 3 3 3 – 9 8-34
point
Hyperbolic sine operation of
136 – DSINH 3 – 3 3 – 9 8-42
binary floating point
S
13 SMOV – 3 Shift move – 3 3 11 – 6-20
69 SORT – – Data sort – 3 3 11 – 7-52
56 SPD – – Speed detection – 3 3 7 – 7-24
48 SQR DSQR 3 Square root of BIN 3 3 3 5 9 6-60
02 SRET – – Subroutine return 3 3 3 1 – 6-5
65 STMR – – Special timer – 3 3 7 – 7-48
VFD-A series drive stop
104 STOP – – 3 3 3 7 – 8-9
command
Perform the subtraction of BIN
21 SUB DSUB 3 3 3 3 7 13 6-30
data
43 SUM DSUM 3 Sum of ON bits 3 3 3 5 9 6-56
147 SWAP DSWAP 3 Swap high/low byte 3 3 3 3 5 8-48
109 SWRD – 3 Digital switch read – 3 3 3 – 8-18

162 TADD – 3 Perpetual calendar data addition – 3 3 7 – 9-37

Tangent operation of binary


132 – DTAN 3 3 3 3 – 9 8-37
floating point
Hyperbolic tangent operation of
138 – DTANH 3 – 3 3 – 9 8-43
T binary floating point
Perpetual calendar data
160 TCMP – 3 – 3 3 11 – 9-35
comparison
70 TKY DTKY – 10-key keyboard input – 3 3 7 13 7-54
96 TMR – – Timer 3 3 3 4 – 3-8
79 TO DTO 3 Special module CR data write in 3 3 3 9 17 7-69
166 TRD – 3 Read perpetual calendar data – 3 3 3 – 9-40
Perpetual calendar data
163 TSUB – 3 – 3 3 7 – 9-38
subtraction
T 64 TTMR – – Alternate timer – 3 3 5 – 7-46
167 TWR – 3 Perpetual calendar data write in – 3 3 3 – 9-42
Perpetual calendar data zone
161 TZCP – 3 – 3 3 9 – 9-36
comparison

5-20 DVP-PLC Application Manual


5 Application Commands

Mnemonic Codes P Applicable models STEPS


Classification A P I Function Page
Command
16 bits 32 bits ES EP EH 16-bit 32-bit

85 VRRD – 3 Volume read – 3 3 5 – 7-97


V
86 VRSC – 3 Volume scale – 3 3 5 – 7-99
Perform the logical product
26 WAND DAND 3 3 3 3 7 13 6-35
(AND) operation
07 WDT – 3 Reset the watchdog timer 3 3 3 1 – 6-12
Perform the logical sum (OR)
27 WOR DOR 3 3 3 3 7 13 6-36
W operation
37 WSFL – 3 Shift the register to the left – 3 3 9 – 6-48
36 WSFR – 3 Shift the register to the right – 3 3 9 – 6-47
Perform the exclusive logical add
28 WXOR DXOR 3 3 3 3 7 13 6-37
(XOR) operation
X 17 XCH DXCH 3 Data exchange 3 3 3 5 9 6-25
11 ZCP DZCP 3 Zone comparison 3 3 3 9 17 6-18
156 ZRN DZRN – Zero point return – – 3 9 17 9-18
Z
Resets a range of device
40 ZRST – 3 3 3 3 5 – 6-51
specified

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 don’t possess pulse execution command (P command).

DVP-PLC Application Manual 5-21


6 Application Commands API 00-49

API Applicable models


CJ Conditional Jump ES EP EH
00 P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (3 STEPS)
Note: Operand S can assign P Continuous Pulse
CJ CJP
P can be modified by Index register E, F execution execution
ES Series models: Operand S can assign P0~P63
32-bit command
EP / EH Series models: Operand S can assign P0~P255
- - - -
ES series models do not support the pulse execution
command (CJP) Flag: None

: The destination pointer of conditional jump


Command
CJ command can be used in the following conditions:
Explanation
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.
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.
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.
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.

DVP-PLC Application Manual 6-1


6 Application Commands API 00-49

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

X1
Y1
X2
P1 N Y2

There are five situations that the CJ command can be executed between the
Program commands MC and MCR.
Example
2 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.

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
CJ P0
X3
CJ P1
X1
MC N1
M1000
P1 Y1

MCR N1
M1000
P0 Y0

MCR N0

6-2 DVP-PLC Application Manual


6 Application Commands API 00-49

The states of each device are shown in the following:


Program
The contact The contact state
Example state before CJ during CJ
The output coil state during CJ
3 Device execution
execution execution
M1, M2, M3 M1, M2, M3
Y1 (note1), M20, S1 Off
Off OfftOn
Y, M, S
M1, M2, M3 M1, M2, M3
Y1 (note1), M20, S1 On
On OntOff
10ms, 100ms M4 Off M4 OfftOn Timer is not activated
Timer The interrupt of timer latched.
(ES/EP/EH) M4 On M4 OntOff
Keep on counting after M0 is off.
M6 Off M6 OfftOn Timer (T240) is not activated
1ms, 10ms, All accumulative timers will stop
100ms Timer (for but latched once executing
accumulative) M6 On M6 OntOff command CJ. When M0 is from
EP/EH OntOff, T240 will be
unchanged.
M10 On/Off
M7, X10 Off Timer does not count
trigger
C0~C234
M7 Off, X10 M10 On/Off The interrupt of counter latched.
On/Off trigger trigger Keep on counting after M0 is off.
Application commands won’t be
M11 Off M11 OfftOn
executed.
Application Do not execute the skipped
command application command but API
M11 On M11 OntOff
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.

DVP-PLC Application Manual 6-3


6 Application Commands API 00-49

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

RST C0

RST D0

END

6-4 DVP-PLC Application Manual


6 Application Commands API 00-49

API Applicable models


CALL Call Subroutine ES EP EH
01 P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (3 STEPS)
Note: Operand S can assign P. Continuous Pulse
CALL CALLP
P can be modified by Index register E, F. execution execution
ES Series models: operand S can assign P0~P63.
EP / EH Series models: operand S can assign P0~P255. 32-bit command
ES Series models do not support the pulse execution - - - -
command (CALLP).
Flag: None

Command : The desinition pointer of call subrountine.


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

API Applicable models


SRET Subroutine Return ES EP EH
02

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (1 STEPS)
Note: No operand Continuous
SRET - -
The command driven by contact is not necessary. execution

32-bit command
- - - -
Flag: None

Indicates the end of subroutine program.


Command
Explanation 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.
When X0 = ON, then start CALL command, jump to P2 and run subroutine. When run
Program
Example SRET command, it will jump back to address 24 and keep running.
1

DVP-PLC Application Manual 6-5


6 Application Commands API 00-49

X0 P***
20 CALL P2 call subroutine P***
X1
24 Y1

FEND

P2 Y0
subroutine
Subroutine P2 Y0

SRET subroutine return

When X10 is the rising-edge triggered CALL P10 command that goes from Off to On,
Program
Example jump to P10 and run subroutine.
2 When X11 is On, execute CALL P11, jump to P11 and run subroutine.
When X12 is On, execute CALL P12, jump to P12 and run subroutine.
When X13 is On, execute CALL P13, jump to P13 and run subroutine.
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.
Run SRET command in the P10 subroutine and return to the main program.

X0 X2
INC D0 P12 INC D30

Y0 Y10
X10 X13
CALL P10 CALL P13
Main subroutine
X0 Program X2
INC D1 INC D31

Y1 Y11

FEND SRET
X2 X2
P10 INC D10 P13 INC D40

Y4 Y12
X11 X14
CALL P11 CALL P14
subroutine subroutine
X2 X2
INC D11 INC D41

Y5 Y13

SRET SRET
X2 X2
P11 INC D20 P14 INC D50

Y6 Y14
X12 subroutine
CALL P12 SRET
subroutine
X2
INC D21 END

Y7

SRET

6-6 DVP-PLC Application Manual


6 Application Commands API 00-49

API Applicable models


IRET Interrupt Return ES EP EH
03

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (1 STEPS)
Continuous
Note: No operand IRET - -
execution
The command driven by contact is not necessary.
32-bit command
- - - -
Flag: None

IRET denotes the interrupt of subroutine program.


Command
Explanation 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


EI Enable Interrupt ES EP EH
04

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (1 STEPS)
Continuous
Note: No operand EI - -
execution
The command driven by contact is not necessary.
The pulse width of interrupt signal should be higher than 200us. 32-bit command
Please refer to the footnote of DI command to see the range of - - - -
numbers of each model.
Flag: M1050~M1059, M1280~M1294
(Please refer to the footnote of DI
command)

API Applicable models


DI Disable Interrupt ES EP EH
05

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (1 STEPS)
Continuous
Note: No operand DI - -
execution
The command driven by contact is not necessary.
32-bit command
- - - -
Flag: None

EI command enables interrupt subroutine to be processed in the program, e.g. External


Command
interrupt, Time interrupt, High-speed counter interrupt.
Explanation
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.

DVP-PLC Application Manual 6-7


6 Application Commands API 00-49

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.

Interrupting cursor ( I ) must be used after the FEND command.


Other interrupts are not allowed to occur during executing the interrupt routine
program.
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.
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.
When using the interrupt pointer, please do not repeatly use the high-speed counter
driven by the same X input contact.
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.
During the PLC operation, the program scans the commands between EI and DI, if X1
Program
Example or X2 are ON, the subroutine A or B will be interruptted. When IRET is reached, the
main program will resume.

EI
X0
Y1 Enabled interrupt

DI
Disabled interrupt
EI
Enabled interrupt
FEND

I 101 Y0
Interrupt subroutine A
IRET

I 201 Y0
Interrupt subroutine B
IRET

6-8 DVP-PLC Application Manual


6 Application Commands API 00-49

Interrupt pointer I numbers of ES series models:


Footnote 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)
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.

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

DVP-PLC Application Manual 6-9


6 Application Commands API 00-49

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

Interrupt Inhibit Flag of EH series models:

Flag Function
M1280 External interrupt, I00□masked
M1281 External interrupt, I10□masked
M1282 External interrupt, I20□masked
M1283 External interrupt, I30□masked
M1284 External interrupt, I40□masked
M1285 External interrupt, I50□masked
M1286 Time interrupt, I60□masked
M1287 Time interrupt, I70□masked
M1288 Time interrupt, I80□masked
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-10 DVP-PLC Application Manual


6 Application Commands API 00-49

API Applicable models


FEND Terminate the Main Routine Program ES EP EH
06

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (1 STEPS)
Continuous
Note: No operand FEND - -
execution
The command driven by contact is not necessary.
32-bit command
- - - -
Flag: None

This command denotes the end of the main routine program. It has the same function
Command
Explanation as END command during PLC operation.
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.
If using several FEND commands, please place the subroutine and interrupt service
programs between the last FEND and END command.
After CALL command is executed, the program error will occur when execute the FEND
command before SRET command is executed.
After FOR command is executed, the program error will occur when execute the FEND
command before NEXT command is executed.
The program flow The program flow when X0=On
CJ Command when X0=off, 0 program jumps to P0
ProgramFlow X1=off
main
program
X0
CJ P0
X1
CALL P63
main
program

main
P0 program

command CALL
P63 subroutine

interrupt
I301
subroutine

DVP-PLC Application Manual 6-11


6 Application Commands API 00-49

CALLCommand The program flow


0
ProgramFlow when X0=off, The program flow
X1=off when X0=Off,
main
X1=On.
program
X0
CJ P0
X1
CALL P63
main
program

main
P0 program

command CALL
P63
subroutine

I301 interrupt
subroutine

API Applicable models


WDT Reset the Watchdog Timer ES EP EH
07 P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (1 STEPS)
Continuous Pulse
Note: No operand WDT WDTP
execution execution
ES series models do not support the pulse execution
command (WDTP).
32-bit command
- - - -

Flag: None

6-12 DVP-PLC Application Manual


6 Application Commands API 00-49

WDT (Watch Dog Timer) is used to monitor the PLC operation in the DVP series PLC
Command
system.
Explanation
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.

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 STEP0 WDT END(FEND)

T1 t2
Use the set value of D1000 (default is 200ms) to change the watchdog time.
If the program scanning time is over 300ms, users can divide the program into 2 parts.
Program
Insert the Watchdog Timer in between, so both programs’ scanning time will be less
Example
than 200ms.

300ms program

END
Dividing the program to two parts
so that both parts’ scan time are
less than 200ms.
150ms program
X0
WDT Watchdog timer reset

150ms program

END

DVP-PLC Application Manual 6-13


6 Application Commands API 00-49

API Applicable models


FOR Nested Loops Begin ES EP EH
08

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (3 STEPS)
S Continuous
FOR - -
execution
Note: The contact execution command is not necessary
Refer to each model specification for usage range. 32-bit command
- - - -
Flag: None

: The number of repeats for the nested loop


Command
Explanation

API Applicable models


NEXT Nested Loops End ES EP EH
09

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (1 STEPS)
Continuous
Note: No operand NEXT - -
execution
The command driven by contact is not necessary.
32-bit command
- - - -
Flag: None

FOR and NEXT commands are used when “n” nested loops are needed.
Command
“N” may be within the range of K1 to K32767. If the range N≦K1, N will always be K1.
Explanation
When it is not desired to execute the FOR to NEXT commands, use the CJ command.
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.
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-14 DVP-PLC Application Manual


6 Application Commands API 00-49

After loop A operate 3 times, the program after the NEXT command will resume. For
Program
Example every completed cycle of loop A, loop B will completely executed for 4 times, therefore,
1 the total number of times that loop B operate will be 3 ×4=12 times.

FOR K3

FOR K4
B A
NEXT

NEXT

Program which executes the FOR to NEXT commands when X7 is off. It does not
Program
Example execute the FOR to NEXT commands when X7 is on and CJ command jump to P6.
2
X7
CJ P6
M0
MOV K0 D0

FOR K3
M0
MOV D0 D1

INC D0

MEXT
X10
P6 Y10

DVP-PLC Application Manual 6-15


6 Application Commands API 00-49

When the FOR to NEXT command are not executed, CJ command can be used to
Program
Example jump. When the most internal loop of FOR to NEXT, X1 will be ON and CJ command
3 will jump to P0 and not be executed.

X0
TMR T0 K10

FOR K4X100
X0
INC D0

FOR K2
X0
INC D1

FOR K3
X0
INC D2

FOR K4
X0
WDT

INC D3
X1
CJ P0

FOR K5
X0
INC D4

NEXT

P0 NEXT

NEXT

NEXT

NEXT

END

6-16 DVP-PLC Application Manual


6 Application Commands API 00-49

API Applicable models


CMP Comparison Output ES EP EH
10 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S1 Continuous Pulse
CMP CMPP
S2 execution execution
D
Note: If operand S1, S2 use with device F, it is only available in 16-bit 32-bit command (13 STEPS)
command. Continuous Pulse
DCMP DCMPP
Operand D occupies 3 continuous devices. execution execution
Refer to each model specification for usage range. Flag: None
ES series models do not support the pulse execution
command (CMPP, DCMPP).

: First comparison value : Second comparison value :


Command
Comparison result.
Explanation
The contents of the comparison source and are compared and
denotes the compare result.
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.
If is set to Y0, then Y0, Y1, Y2 will work as the program example as below.
Program
When X10=On, CMP command is driven and one of Y0, Y1, Y2 is On. When X10=Off,
Example
CMP command is not driven and Y0, Y1, Y2 remain in the previous status.
The comparison result of ≧, ≦, ≠ commands can be got by the parallel connection of
Y0~Y2.
X10
CMP K10 D10 Y0
Y0
If K10>D10, Y0 = On
Y1
If K10=D10, Y1 = On

Y2
If K10<D10, Y2= On

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

X10 X10
RST M0 ZRST M0 M2

RST M1

RST M2

DVP-PLC Application Manual 6-17


6 Application Commands API 00-49

API Applicable models


ZCP Zone Comparison ES EP EH
11 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (9 STEPS)
S1 Continuous Pulse
ZCP ZCPP
S2 execution execution
S
D 32-bit command (17 STEPS)
Note: If operand S1, S2, S use with device F, it is only available in Continuous Pulse
DZCP DZCPP
16-bit command. execution execution
Operand S1 should be less than Operand S2. Flag: None
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).

: First comparison value (Minimum) : Second comparison value


Command
(Maximum) : Comparison value : Comparison result.
Explanation
is compared with its limits and and denotes the compare
result.
When > , set as the limit to compare.
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.
If is set to M0, then M0, M1, M2 will work as the program example as below.
Program
When X0=On, ZCP command is driven and one of M0, M1, M2 is On. When X0=Off,
Example
ZCP command is not driven and M0, M1, M2 remain in the previous status.
X0
ZCP K10 K100 C10 M0
M0
If C10 < K10, M0 = On
M1
If K10 <
= C10 <
= K100, M1 = On
M2
If C10 > K100, M2 = On

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


X0 X0
RST M0 ZRST M0 M2

RST M1

RST M2

6-18 DVP-PLC Application Manual


6 Application Commands API 00-49

API Applicable models


MOV Data Move ES EP EH
12 D P

Bit devices Word devices


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

S : Data source : Data move destination


Command
When the MOV command is driven, the data of is moved to without any
Explanation
change. If the MOV command is not driven, the content of remain unchanged.
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.

MOV command is used in 16-bit command to move data.


Program When X0=Off, the content of D10 remain unchanged. If X0=On, the data of K10 is
Example 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.
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
MOV K10 D0

X1
MOV T0 D10
X2
DMOV D20 D30

DMOV C235 D40

DVP-PLC Application Manual 6-19


6 Application Commands API 00-49

API Applicable models


SMOV Shift Move ES EP EH
13 P -

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (11 STEPS)
S Continuous Pulse
SMOV SMOVP
m1 execution execution
m2
D 32-bit command
n - - - -
Note: The usage range of operand m1: m1=1~ 4 Flag: M1168 (mode setting operation
The usage range of operand m2: m2=1~ m1 of SMOV)
The usage range of operand n: n=m2 ~ 4 When M1168=On, BIN mode.
Refer to each model specification for usage range. When M1168=Off, BCD mode.

: Data movementsource : Source position of the first digit to be moved


Command
: Number of source digits to be moved : Data destination of movement
Explanation
: Destination position for the first digit
This command can arrange or combine the data.
When M1168=Off, X0=On, assign the content of the two digits from the 4th digit
Program
Example (thousands’ place digital) of D10 (decimal number) and move the assigned data to the
1 two digits from the 2nd digit (hundreds' place digits) of D20 (decimal number). Then, the
content of 103 and 100 of D20 remain unchaged after SMOV command is executed.
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).
M1001
M1168
X0
SMOV D10 K4 K2 D20 K3

D10(BIN 16bit)
Auto conversion
3 2 1 0
10 10 10 10 D10(BCD 4 digits)
No variation Shift move
No variation
2
10
3
10 10
1
10
0
D20(BCD 4 digits)
Auto conversion

D20(BIN 16bit)
If D10=H1234,D20=H5678 before executing, D10 won’t change and D20=H5128 after
finishing execution.
When M1168=On, if use SMOV command, the D10 and D20 do not move data in BCD
Program
Example format. However the data is moved as a 4 digit BIN number.
2

6-20 DVP-PLC Application Manual


6 Application Commands API 00-49

M1000
M1168
X0
SMOV D10 K4 K2 D20 K3

Digit 4 Digit 3 Digit 2 Digit 1


D10(BIN 16bit)

Shift move

D20(BIN 16bit)
Digit 4 Digit 3 Digit 2 Digit 1
No variation No variation
Digit switch connected to the interrupted number inputs can use SMOV command to
Program
Example combine.
3 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.
Use SMOV command to move the first digit to the third digit of D2 and combine these
two digit switches into one group.
2 1 0
10 10 10

6 4 2

8 8
8

X13~X10 X27~X20

PLC
M1001
M1168
M1000
(X20~X27)BCD
BIN K2X20 D2 2 digits D2(BIN)

D1 (X10~X13)BCD
BIN K1X10
1 digit D1(BIN)

SMOV D1 K1 K1 D2 K3

DVP-PLC Application Manual 6-21


6 Application Commands API 00-49

API Applicable models


CML Counter Transfer ES EP EH
14 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (5 STEPS)
S Continuous Pulse
CML CMLVP
D execution execution
Note: If operand S, D use with device F, it is only available in 16-bit
32-bit command (9 STEPS)
command.
Continuous Pulse
Refer to each model specification for usage range. DCML DCMLP
execution execution
ES series models do not support the pulse execution
command (CMLP, DCMLP) Flag: None

: Transfer data source : Transfer destination device


Command
Counter phase the contents of (0→1, 1→0) and have the contents transferred to
Explanation
. If the content is Constant K, this Constant K will be converted to the BIN value
automatically.
This command can be used during the counter-phase output.
Program
Example When X10=ON, contents of D1, b0~b3, will be counter transferred to K1Y0.
1 X10
CML D1 K1Y0

b 15 b3 b2 b1 b0
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
The left loop shown below can be displayed as the right program example by using CML
Program
Example command.
2 X000
M0
X001
M1
X002
M2
X003
M3
M1000
CML K1X0 K1M0
X000 Normal on contact
M0
X001
M1
X002
M2
X003
M3

6-22 DVP-PLC Application Manual


6 Application Commands API 00-49

API Applicable models


BMOV Block Move ES EP EH
15 P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S Continuous Pulse
BMOV BMOVP
D execution execution
n
32-bit command
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 Flag: None
(BMOVP).

: Head source device : Head destination device : Block of multiple


Command
data
Explanation
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.
When X10=On, move the contents of the four registers D0~D3 to their corresponding
Program
Example registers D20~D23.
1 X10
D20 K4 D0 D20
D1 D21 n=4
D2 D22
D3 D23
If move the specified bit device, KnX, KnY, KnM, KnS, the digit numbers of and
Program
Example should be the same and this also means the number of n should be the same.
2 ES series models do not support KnX, KnY, KnM, KnS devices.
M1000
D0 D20 K4 M0
M1
M2
M3

M4
M5
n=3
M6
M7

M8 Y10
M9 Y11
M10 Y12
M11 Y13

DVP-PLC Application Manual 6-23


6 Application Commands API 00-49

The BMOV command has built the automatic movement as the program example below
Program
Example to prevent overwriting errors from occurring when the specified numbers of and
3 coincide.
When > , the BMOV command is processed in the order as 1→2→3
When < , the BMOV command is processed in the order as 3→2→1.
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 3→2→1, the
content value of D11 to D13 will all be the content value of D10.

X10 1
BMOV D20 D19 K3 D20 D19
2
D21 D20
3
D22 D21
X11 3
BMOV D10 D11 K3 D10 D11
2
D11
1
D12 D13

API Applicable models


FMOV Multiple Devices Movement ES EP EH
16 D P

Bit devices Word devices


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

: Source device : Head destination device : A quantity of multiple


Command
devices
Explanation
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.
ES series models do not support KnX, KnY, KnM, KnS devices.

6-24 DVP-PLC Application Manual


6 Application Commands API 00-49

When X0=ON, move Constant K10 to the continuous five registers (D10~D14) starting
Program
from D10.
Example
X10
FMOV K10 D10 K5

K10 K10 D10

K10 D11

K10 D12 n=5

K10 D13

K10 D14

API ☺ Applicable models


XCH Data Exchange ES EP EH
17 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (5 STEPS)
D1 Continuous Pulse
XCH XCHP
D2 execution execution
Note: If operand D1, D2 use with device F, it is only available in 16-bit
32-bit command (9 STEPS)
command.
Continuous Pulse
Refer to each model specification for usage range. DXCH DXCHP
execution execution
ES series models do not support the pulse execution
command (XCHP, DXCHP). Flag: None

: First exchange data : Second exchange data


Command
Exchange the contents of and with each other.
Explanation
This command is usually pulse execution (XCHP).
When X0=Off→On, the contents of D20 and D40 exchange with each other.
Program
Example X0
1 XCHP D20 D40

Before After
execution execution
D20 120 40 D20

D40 40 120 D40

DVP-PLC Application Manual 6-25


6 Application Commands API 00-49

When X0=Off→On, the contents of D20 and D40 exchange with each other.
Program X0
Example D100 D200
2
Before After
execution execution
D100 D100

D101 20 40 D101

D200 D200

D201 40 20 D201

In 16-bit command, when the devices specified by and are the same and
Footnote M1303=On, the upper and lower 8-bit contents of that specified devices will exchange.
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.
When X0=On and M1303=On, the upper and lower 8-bit contents of D100, D0101 will
exchange.
Before After
X0 execution execution
M1303
D100L 9 20 D100L

DXCHP D100 D100 D100H 20 9 D100H


D101L 8 40 D101L
D101H 40 8 D101H

API Applicable models


BCD Converts BIN Data into BCD ES EP EH
18 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (5 STEPS)
S Continuous Pulse
BCD BCDP
D execution execution
Note: If operand S, D use with device F, it is only available in 16-bit
command. 32-bit command (9 STEPS)
Refer to each model specification for usage range. Continuous Pulse
DBCD DBCDP
ES series models do not support the pulse execution execution execution
command (BCDP, DBCDP) Flag: M1067 (operation error)
M1068 (operation error)
D1067 (error code)

Converts BIN data (0 to 9999) of the source device into BCD and transfers the
Command
result to the device .
Explanation
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-26 DVP-PLC Application Manual


6 Application Commands API 00-49

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).
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.
When X0=ON, the binary data D10 is converted into BCD number, and stored at K4Y0
Program
(Y0~Y3).
Example
X0
BCD D10 K1Y0

When D10=001E (Hex)=0030 (decimal number), the execution result will be


Y0~Y3=0000(BIN).

API Applicable models


BIN Converts BCD Data into BIN ES EP EH
19 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (5 STEPS)
S Continuous Pulse
BIN BINP
D execution execution
Note: If operand S, D use with device F, it is only available in 16-bit
command. 32-bit command (9 STEPS)
Refer to each model specification for usage range. Continuous Pulse
DBIN DBINP
ES series models do not support pulse execution execution execution
command (BINP, DBINP) Flag: M1067 (operation error)
M1068 (operation error)
D1067 (error code)

: Data source : Converted result


Command
Converts BCD data (0 to 9,999) of the source device into BIN and transfers the
Explanation
result to the device .
The enabled range of source device : BCD (0 to 9,999), DBCD (0 to 99,999,999)
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”.
Constant K and H is automatically converted into the BIN data. There is no necessity for
constant to use this command.
When X0=ON, the BCD data K1X0 is converted to BIN data, and stored the result at
Program
D10.
Example
X0
BIN K1X0 D10

DVP-PLC Application Manual 6-27


6 Application Commands API 00-49

The application explanation of BCD and BIN command:


Footnote 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 K4X0 D100

BCD D100 K4Y20


3 2 1 0
10 10 10 10

4 digit BCD format switch


6 6 4 2

8 8 8 8

X17 X0
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

Y37 Y20

4 digit BCD format


7-segment display

6-28 DVP-PLC Application Manual


6 Application Commands API 00-49

API Applicable models


ADD Perform the Addition of BIN Data ES EP EH
20 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S1 Continuous Pulse
ADD ADDP
S2 execution execution
D
32-bit command (13 STEPS)
Note: If operand S1, S2, D use with device F, it is only available in
Continuous Pulse
16-bit command. DADD DADDP
execution execution
Refer to each model specification for usage range.
Flag: M1020 (Zero flag)
ES series models do not support the pulse execution command
(ADDP, DADDP). M1021 (Borrow flag)
M1022 (Carry flag)
Refer to following for detail.

: Augend : Addend : Addition result


Command
+ = . Performs the addition on BIN data and the BIN data
Explanation
, and stores the addition result into the device .
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.
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.

16-bit command:
Program
When X0 is ON, the data contained within the augend D0 and addend D10 is combined
Example and the total is stored in the result device D20.
1 X0
ADD D0 D10 D20
(D0) + (D10) = (D20)

32-bit command:
Program
Example When X0 is ON, the data contained within the augend (D31, D30) and addend (D41, D40)
2 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)

DVP-PLC Application Manual 6-29


6 Application Commands API 00-49

Flag operations:
16-bit command: Zero flag Zero flag Zero flag
Footnote

-2B -1B 0B -32,768 -1B 0B 1 32,767B 0B 1B 2

the most significant bit the most significant bit


Borrow flag Carry flag
becomes “1” (negative) becomes “0” (positive)

32-bit command: Zero flag Zero flag Zero flag

-2B -1B 0B -2,147,483,648 -1B 0B 1 2,147,483,647B 0B 1B 2

the most significant bit the most significant bit


Borrow flag Carry flag
becomes “1” (negative) becomes “0” (positive)

API Perform the Subtraction of BIN Applicable models


SUB ES EP EH
21 D P Data

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S1 Continuous Pulse
SUB SUBP
S2 execution execution
D
32-bit command (13 STEPS)
Note: If operand S1, S2, D use with device F, it is only available in
Continuous Pulse
16-bit command. DSUB DSUBP
execution execution
Refer to each model specification for usage range.
Flag: M1020 (Zero flag)
ES series models do not support the pulse execution command
(SUBP, DSUBP). M1021 (Borrow flag)
M1022 (Carry flag)
Please refer to the command
explanation of ADD command

: Minuend : Subtrahend : Subtraction result


Command
− = . Performs the subtraction of BIN data and the BIN data
Explanation
, and stores the subtraction result into the device .
The most significant bit are the symbolic bit 0 and 1. 0 indicates positive and 1 indicates
negative. All calculation are algebraically processed.
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-30 DVP-PLC Application Manual


6 Application Commands API 00-49

The flag operations of SUB command please refer to the flag operations of ADD
command on the previous page.
16-bit command:
When X0 is ON, the data contained within the subtrahend D10 is subtracted from the data
Program
Example contained within the minuend D0 and the result of this calculation is stored in the result
1 device D20.
X0
SUB D0 D10 D20
(D0) − (D10) = (D20)
32-bit command:
Program
Example When X0 is ON, the data contained within the subtrahend (D41, D40) is subtracted from
2
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 Perform the Multiplication of BIN Applicable models


MUL ES EP EH
22 D P Data

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S1 Continuous Pulse
MUL MULP
S2 execution execution
D
Note: If operand S1, S2 use with device F, it is only available in 32-bit command (13 STEPS)
16-bit command. Continuous Pulse
DMUL DMULP
If operand D use with device E, it is only available in 16-bit execution execution
command. Flag: None
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).

Command : Multiplicand : Multiplier : Multiplication result


Explanation × = . 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.
16-bit command:

DVP-PLC Application Manual 6-31


6 Application Commands API 00-49

+1

b15................ b00 b15................ b00 b31............ b16 b15............. b00


X =
b15 is a symbol bit b15 is a symbol bit b31 is a symbol bit (b15 of D+1)

b15=0,S 1 is a positive value b15=0,S 2 is a positive value b31=0,S 2 is a positive value


b15=1,S 1 is a negative value b15=1,S 2 is a negative value b31=1,S 2 is a negative value

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”.
32-bit command:
+1 +1 +3 +2 +1

b31.. b16 b15.. b00 b31.. b16 b15.. b00 b63. b48 b47. b32 b31. b16 b15. b00
X =
b31 is a symbol bit b31 is a symbol bit b63 is a symbol bit (b15 of D+1 )

b31=0,S 1 (S 1 +1) are positive value b31=0,S 2 (S 2 +1) are positive value b63=0, D1(D1+1) (D1+2) (D1+3) are positive value
b31=1,S 1 (S 1 +1) are negative value b31=1,S 2 (S 2 +1) are negative value b63=1, D1(D1+1) (D1+2) (D1+3) are negative value

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.
16-bit command:
Program
A 16-bit data source, D10 is multiplied by another 16-bit data source, D0 and the total is a
Example 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


DIV Perform the Division of BIN Data ES EP EH
23 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S1 Continuous Pulse
DIV DIVP
S2 execution execution
D
Note: If operand S1, S2 use with device F, it is only available in 32-bit command (13 STEPS)
16-bit command. Continuous Pulse
DDIV DDIVP
If operand D use with device E, it is only available in 16-bit execution execution
command. Flag: None
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).

6-32 DVP-PLC Application Manual


6 Application Commands API 00-49

: Dividend : Divisor : Quotient and Remainder


Command
÷ = . Performs the division of BIN data and the BIN data
Explanation
, 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.
This command is not executed when the divisor is “0”. Then, the flag M1067, M1068 will
be On and D1067 record error code “0E19”.
16-bit command:
Quotient Remainder
+1

/ =
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.

32-bit command:
Quotient Remainder

+1 +1 +1 +3 +2

/ =
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.

When X0 is ON, the primary source D0 (divisor) is divided by the second source D10
Program
(dividend). The quotient is specified to be stored in D20 and the remainder is specified to
Example
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

DIV D0 D10 K4Y0

DVP-PLC Application Manual 6-33


6 Application Commands API 00-49

API ☺ Applicable models


INC Perform the Addition of 1 ES EP EH
24 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (3 STEPS)
D Continuous Pulse
INC INCP
execution execution
Note: If operand D use with device F, it is only available 16-bit
command. 32-bit command (5 STEPS)
Refer to each model specification for usage range. Continuous Pulse
DINC DINCP
ES series models do not support the pulse execution execution execution
(INCP, DINCP). Flag: None

: Destination device
Command
If the command is not the pulse execution command, “1” is added to the value of
Explanation
destination device on every execution of the command.
This command is usually pulse execution (INCP, DINCP).
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.
Flag M1020~M1022 won’t be influenced by the operation result of this command.
When X0 is ON, the content of D0 will perform the addition of 1.
Program X0
Example INCP D0

API ☺ Applicable models


DEC Perform the Subtraction of 1 ES EP EH
25 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (3 STEPS)
D Continuous Pulse
DEC DECP
execution execution
Note: If operand D use with device F, it is only available in 16-bit
command. 32-bit command (5 STEPS)
Refer to each model specification for usage range. Continuous Pulse
DDEC DDECP
ES series models do not support pulse the execution execution execution
(DECP, DDECP). Flag: None

: Destination device
Command
If the command is not the pulse execution command, “1” is subtracted to the value of
Explanation
destination device on every execution of the command.
This command is usually pulse execution (INCP, DINCP).
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-34 DVP-PLC Application Manual


6 Application Commands API 00-49

Flag M1020~M1022 won’t be influenced by the operation result of this command.

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


Program X0
Example DECP D0

API W Perform the Logical Product Applicable models


AND ES EP EH
26 D P (AND) Operation

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S1 Continuous Pulse
WAND WANDP
S2 execution execution
D
Note: If operand S1, S2, D use with device F, it is only available in 32-bit command (13 STEPS)
16-bit command. Continuous Pulse
DAND DANDP
Refer to each model specification for usage range. execution execution
ES series models do not support the pulse execution Flag: None
(WANDP, DANDP)

: First data source device : Second data source device


Command
: Operation result
Explanation
Performs the logical product of the data source device and , and stores the
operation result into the device .
General operation rule: If one of the bit contained within the data source devices is “0”,
then the operation result is also “0”.
When X0 is ON, the 16-bit data source device D0 and D2 are analyzed and the
Program
Example operation result of the logical WAND command is stored in the device D4.
1 X0
WAND D0 D2 D4
b15 b00
D0 1 1 1 1 1 1 1 1 0 0 0 0 1 1 1 1
Before
WAND
execution
D2 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0

After
execution D4 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0

DVP-PLC Application Manual 6-35


6 Application Commands API 00-49

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

b31 b15 b0
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
Before
D11 D10 DAND
execution
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
D21 D20
After
execution 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0
D41 D40

API W Perform the Logical Sum (OR) Applicable models


OR ES EP EH
27 D P Operation

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S1 Continuous Pulse
WOR WORP
S2 execution execution
D
32-bit command (13 STEPS)
Note: If operand S1, S2, D use with device F, it is only available in
Continuous Pulse
16-bit command. DOR DORP
execution execution
Refer to each model specification for usage range.
ES series models do not support the pulse execution Flag: None
(WORP, DORP)

: First data source device : Second data source device


Command
: Operation result
Explanation
Performs the logical sum of the data source device and , and stores the
operation result into the device .
General operation rule: If one of the bit contained within the data source devices is “1”,
then the operation result is also “1”.
When X0 is ON, the 16-bit data source device D0 and D2 are analyzed and the
Program
Example operation result of the logical WOR command is stored in the device D4.
1 X0
WOR D0 D2 D4
b15 b00
D0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
Before
execution WOR
D2 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1

After
execution D4 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1

6-36 DVP-PLC Application Manual


6 Application Commands API 00-49

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

b
b31 b15 b0
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
Before
execution D11 D10 DOR
0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1 0 0 0 0 1 1 1 1 1 0 1 0 0 1 0 1
D21 D20
After
execution 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1 0 1 0 1 1 1 1 1 1 1 1 1 0 1 0 1
D41 D40

API W Perform the Exclusive Logical Applicable models


XOR ES EP EH
28 D P Add (XOR) Operation

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S1 Continuous Pulse
WXOR WXORP
S2 execution execution
D
Note: If operand S1, S2, D use with device F, it is only available in 32-bit command (13 STEPS)
16-bit command. Continuous Pulse
DXOR DXORP
Refer to each model specification for usage range. execution execution
ES series models do not support the pulse execution Flag: None
(WXORP, DXORP).

: First data source device : Second data source device :


Command
Operation result
Explanation
Performs the exclusive logical add of the data source device and , and
stores the operation result into the device .
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”.
When X0 is ON, the 16-bit data source device D0 and D2 are analyzed and the
Program
Example operation result of the logical WXOR command is stored in the device D4.
1 X0
WXOR D0 D2 D4

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

After
execution D4 0 1 0 1 1 0 1 0 1 1 1 1 0 0 0 0

DVP-PLC Application Manual 6-37


6 Application Commands API 00-49

When X1 is ON, the 32-bit data source device (D11, D10) and (D21, D20) are analyzed
Program
Example and the operation result of the logical DXOR command is stored in the device (D41,
2 D40).
X1
DXOR D10 D20 D40
b
b31 b15 b0
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
Before
execution D11 D10 DXOR
0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
D21 D20
After
execution 1 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1 1 1 1 0 1 1 0 1 0 0 1 1 1 0 1 1
D41 D40

API ☺ Applicable models


NEG Complement of 2 ES EP EH
29 D P

Bit devices Word devices


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

: Once the command is executed, the specified device, , will be served as


Command
the complement of 2.
Explanation
This command can convert the negative BIN value to the positive number, and that is, to
get its absolute value.
This command is usually pulse execution (NEGP, DNEGP).

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

Obtaining the absolute value of a negative value:


Program
1. When the 15th bit of D0 is “1”, M0 is ON. (D0 is a negative value).
Example 2. When M0 is ON, the absolute value of D0 can be obtained using the NEG command.
2 M1000
BON D0 M0 K15
Normal ON contact

M0
NEGP D0

6-38 DVP-PLC Application Manual


6 Application Commands API 00-49

Obtaining the absolute value by the result of the subtraction


Program
1. When D0>D2, M0=ON.
Example 2. When D0=D2, M1=ON.
3 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
M1

M2
SUB D2 D0 D4

DVP-PLC Application Manual 6-39


6 Application Commands API 00-49

Indication of the negative value and absolute value


Footnote 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).

(D0=2)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0

(D0=1)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1

(D0=0)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

(D0=-1) (D0)+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 0 0 0 1

(D0=-2) (D0)+1=2
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 0 0 0 1 0

(D0=-3) (D0)+1=3
1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1

(D0=-4) (D0)+1=4
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 0 0 0 1 0 0

(D0=-5) (D0)+1=5
1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1

(D0=-32,765) (D0)+1=32,765
1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1

(D0=-32,766) (D0)+1=32,766
1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0

(D0=-32,767) (D0)+1=32,767
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1

(D0=-32,768) (D0)+1=32,768
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Max. absolute value is 32,767

6-40 DVP-PLC Application Manual


6 Application Commands API 00-49

API ☺ Applicable models


ROR Rotate to the Right ES EP EH
30 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (5 STEPS)
D Continuous Pulse
ROR RORP
n execution execution
Note: If operand D uses with device F, it is only available in 16-bit
32-bit command (9 STEPS)
command.
Continuous Pulse
If operand D is specified as KnY, KnM, KnS, only K4 DROR DRORP
execution execution
(16-bit) and K8 (32-bit) is valid.
Flag: M1022 (Carry flag)
Essential condition: 1≤n≤16 (16-bit), 1≤n≤32 (32-bit)
Refer to each model specification for usage range.
ES series models do not support pulse execution (RORP,
DRORP).

: Rotation device (destination device) : Bit places of one time rotation


Command
The bit pattern of device is rotated bit places to the right on every
Explanation
operation of the command.
This command is usually pulse execution (RORP, DRORP).

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

Rotate to the right


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

DVP-PLC Application Manual 6-41


6 Application Commands API 00-49

API ☺ Applicable models


ROL Rotate to the Left ES EP EH
31 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (5 STEPS)
D Continuous Pulse
ROL ROLP
n execution execution
Note: If operand D uses with device F, it is only available in 16-bit
32-bit command (9 STEPS)
command.
Continuous Pulse
If operand D is specified as KnY, KnM, KnS, only K4 DROL DROLP
execution execution
(16-bit) and K8 (32-bit) is valid.
Flag: M1022 (Carry flag)
Essential condition: 1≤n≤16 (16-bit), 1≤n≤32 (32-bit)
Refer to each model specification for usage range.
ES series models do not support pulse execution (ROLP,
DROLP).

: Rotation device (destination device) : Bit places of one time rotation


Command
The bit pattern of device is rotated bit places to the left on every
Explanation
operation of the command.
This command is usually pulse execution (ROLP, DROLP).
When X0 goes from OFF → ON, the 16 bit data of D10 will rotate 4 bits to the left, as
Program shown in the diagram, and b12 that located at D10 originally will then be moved to the
Example
carry flag (CY) M1022.
X0
D10 K4

Rotate to the left


upper bit lower bit
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 D10
Carry
flag 16 bits
After one rotation
to the left
upper bit lower bit
1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 D10
Carry
flag

6-42 DVP-PLC Application Manual


6 Application Commands API 00-49

API ☺ Rotate to the Right with the Carry Applicable models


RCR ES EP EH
32 D P flag

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (5 STEPS)
D Continuous Pulse
RCR RCRP
n execution execution
Note: If operand D uses with device F, it is only available in 16-bit
32-bit command (9 STEPS)
command.
Continuous Pulse
If operand D is specified as KnY, KnM, KnS, only K4 (16-bit) DRCR DRCRP
execution execution
and K8 (32-bit) are valid.
Flag: M1022 (Carry flag)
Essential condition: 1≤n≤16 (16-bit), 1≤n≤32 (32-bit)
Refer to each model specification for usage range.
ES series models do not support pulse execution (RCRP,
DRCRP).

: Rotation device (destination device) : Bit places after one time rotation
Command
The bit pattern of device with the attached carry flag (M1022) is rotated
Explanation
bit places to the right on every operation of the command.
This command is usually pulse execution (RCRP, DRCRP).
When X0 goes from OFF to ON, the 16 bit data of D10, including the attached carry
Program flag (M1022), will rotate 4 bits to the right, as shown in the diagram, and b3 that
Example
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.

X0
D10 K4

Rotate to the right


upper bit lower bit
D10 0 0 0 0 1 1 1 1 0 0 0 0 0 1 1 0 1
Carry
flag
16 bits
After one rotation
upper bit to the right lower bit
D10 1 1 0 1 0 0 0 0 1 1 1 1 0 0 0 0 0
Carry
flag

DVP-PLC Application Manual 6-43


6 Application Commands API 00-49

API ☺ Rotate to the Left with the Carry Applicable models


RCL ES EP EH
33 D P flag Attached

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (5 STEPS)
D Continuous Pulse
RCL RCLP
n execution execution
Note: If operand D uses with device F, it is only available in 16-bit
32-bit command (9 STEPS)
command.
Continuous Pulse
If operand D is specified as KnY, KnM, KnS, only K4 DRCL DRCLP
execution execution
(16-bit) and K8 (32-bit) is valid.
Flag:M1022 (Carry flag)
Essential condition: 1≤n≤16 (16-bit), 1≤n≤32 (32-bit)
Refer to each model specification for usage range.
ES series models do not support pulse execution (RCLP,
DRCLP).

: Rotation device (destination device) : Bit places after one time rotation
Command
The bit pattern of device with the attached carry flag (M1022) is rotated
Explanation
bit places to the left on every operation of the command.
This command is usually pulse execution (RCLP, DRCLP).
When X0 goes from OFF to ON, the 16 bit data of D10, including the attached carry
Program flag (M1022), will rotate 4 bits to the left, as shown in the diagram, and b12 that
Example
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

Rotate to the left


upper bit lower bit
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 D10
Carry
flag
16 bits
After one rotation
to the left
upper bit lower bit
1 1 1 1 0 0 0 0 0 0 0 0 0 1 1 1 D10
Carry
flag

6-44 DVP-PLC Application Manual


6 Application Commands API 00-49

API ☺ Shifts the Data of Device Applicable models


SFTR ES EP EH
34 P Specified to the Right

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (9 STEPS)
S Continuous Pulse
SFTR SFTRP
D execution execution
n1
n2 32-bit command
- - - -
Note: Essential condition: 1≤n1≤1024, 1≤ n2≤n1
In ES series models: 1≦n2≦n1≦512 Flag: None
Refer to each model specification for usage range.
ES series models do not support pulse execution (SFTRP).

: Starting number of shift device (source device) : Starting number of


Command
specified shift device (destination device) : Specified bit stack of data length
Explanation
: Bit places after one time shift
Shifts data bits of device to the right by bits. bits, which
begin with , are shifted to the right.
This command is usually pulse execution (SFTRP).
When X0 is in the rising-edge, the 16 bit data of M0~M15 will shift 4 bits to the right.
Program Please refer to the following ~ steps to perform SFTR command of one time scan.
Example
M3~M0 → carry
M7~M4 → M3~M0
M11~M8 → M7~M4
M15~M12 → M11~M8
X3~X0 → M15~M12 complete
X0
SFTR X0 M0 K16 K4

4 bits in a group shift to the right


X3 X2 X1 X0
5
M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M1 M0 carry

4 3 2 1

DVP-PLC Application Manual 6-45


6 Application Commands API 00-49

API ☺ Shifts the Data of Device Applicable models


SFTL ES EP EH
35 P Specified to the Left

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (9 STEPS)
S Continuous Pulse
SFTL SFTLP
D execution execution
n1
n2 32-bit command
- - - -
Note: Essential condition: 1≤n1≤1024, 1≤ n2≤n1
In ES series models: 1≦n2≦n1≦512 Flag: None

Refer to each model specification for usage range.


ES series models do not support pulse execution (SFTLP).

: Starting number of shift device (source device) : Starting number of


Command
specified shift device (destination device) : Specified bit stack of data length
Explanation
: Bits after one time shift
Shifts data bits of device to the left by bits. bits, which
begin with , are shifted to the left.
This command is usually pulse execution (SFTLP).
When X0 is in the rising-edge, the 16 bit data of M0~M15 will rotate 4 bits to the left.
Program Please refer to the following ~ steps to perform SFTL command of one time scan.
Example
M15~M12 → carry
M11~M8 → M15~M12
M7~M4 → M11~M8
M3~M0 → M7~M4
X3~X0 → M3~M0 complete

X0
SFTR X0 M0 K16 K4

4 bits in a group shift to the left


X3 X2 X1 X0
5
carry M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M1 M0

1 2 3 4

6-46 DVP-PLC Application Manual


6 Application Commands API 00-49

API ☺ Applicable models


WSFR Shift the Register to the Right ES EP EH
36 P -

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (11 STEPS)
S Continuous Pulse
WSFR WSFRP
D execution execution
n1
n2 32-bit command
- - - -
Note: When using bit devices as operand S (source) and D
(destination) the specified device must be equal, for Flag: None
example, one kind is the KnX, KnY, KnM, KnS 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: 1≤n1≤512, 1≤ n2≤n1
Refer to each model specification for usage range.
ES series models do not support pulse execution (WSFR,
WSFRP).

: Starting number of shift device (source device) : Starting number of


Command
specified shift device (destination device) : Specified bit stack of data length
Explanation
: Words after one time shift
Shifts data words of device to the right by words. words,
which begin with , are shifted to the right.
This command is usually pulse execution (WSFRP).
When X0 goes from OFF to ON, the 16 register data of D20~D35 are paralleled a shift
Program
area and shift 4 register to the right.
Example
1 Please refer to the following ~ steps to perform WSFR command of one times.
D23~D20 → carry
D27~D24 → D23~D20
D31~D28 → D27~D24
D35~D32 → D31~D28
D13 ~D10 → D35~D32 complete

X0
WSFRP D10 D20 K16 K4

D13 D12 D11 D10 4 registers in one group shift to the right
5
D35 D34 D33 D32 D31 D30 D29 D28 D27 D26 D25 D24 D23 D22 D21 D20 Carry

4 3 2 1

DVP-PLC Application Manual 6-47


6 Application Commands API 00-49

When X0 goes from OFF to ON, the word register data of Y10~Y27 are paralleled a
Program
shift area and shift 2 digits to the right.
Example
2 Please refer to the following ~ steps to perform WSFR command of one time shift.
Y17~Y10 → carry
Y27~Y20 → Y17~Y10
X27~X20 → Y27~Y20 complete
When using Kn device, the specified value must be equal
X0
WSFRP K1X20 K1Y10 K4 K2

X27 X26 X25 X24 X23 X22 X21 X20 2 digits shift to the right
3
Y27 Y26 Y25 Y24 Y23 Y22 Y21 Y20 Y17 Y16 Y15 Y14 Y13 Y12 Y11 Y10 Carry

2 1

API ☺ Applicable models


WSFL Shift the Register to the Left ES EP EH
37 P -

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (11 STEPS)
S Continuous Pulse
WSFL WSFLP
D execution execution
n1
n2 32-bit command
- - - -
Note: When using bit devices as operand S (source) and D
(destination) the specified device must be equal, for Flag: None
example, one kind is the KnX, KnY, KnM, KnS 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: 1≤n1≤512, 1≤ n2≤n1
Refer to each model specification for usage range.
ES series models do not support pulse execution (WSFL,
WSFLP)

: Starting number of shift device (source device) : Starting number of specified


Command
shift device (destination device) : Specified bit stack of data length : Words after
Explanation
one time shift
Shifts data words of device to the left by words. words, which
begin with , are shifted to the left.
This command is usually pulse execution (WSFLP).

6-48 DVP-PLC Application Manual


6 Application Commands API 00-49

When X0 goes from OFF to ON, the 16 register data of D20~D35 are paralleled a shift area
Program and shift 4 register to the right.
Example
Please refer to the following ~ steps to perform WSFL command of one time shift.
D35~D32 → carry
D31~D28 → D35~D32
D27~D24 → D31~D28
D23~D20 → D27~D24
D13~D10 → D23~D20 complete
X0
WSFLP D10 D20 K16 K4

4 registers in one group shift to the left D13 D12 D11 D10
5
Carry D35 D34 D33 D32 D31 D30 D29 D28 D27 D26 D25 D24 D23 D22 D21 D20

1 2 3 4

API ☺ Applicable models


SFWR Displacement is Wrote ES EP EH
38 P -

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S Continuous Pulse
SFWR SFWRP
D execution execution
n
32-bit command
Note: Essential condition: 2≤n≤512
- - - -
Refer to each model specification for usage range.
ES series models do not support pulse execution (SFWR, Flag: M1022 (Carry flag)
SFWRP).

: Source device which the data is written in : Head address device :


Command Data length
Explanation
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.
This command is usually pulse execution (SFWRP).
First, reset the content of D0 to 0. When X0 goes from OFF to ON, the content of D0
Program becomes 1 when the content of D20 is created and built in D1. After changing the
Example
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.

DVP-PLC Application Manual 6-49


6 Application Commands API 00-49

Please refer to the following ~ steps to perform SFWR command.


The content of D20 is created and built in D1.
The content of D0 becomes 1.
X10
RST D0 reset the content of D0 to 0 (zero) previously

X0
SFWRP D20 D0 -K10

n = 10 points
D20 D9 D8 D7 D6 D5 D4 D3 D2 D1 D0
pointer

D0 = 3 2 1
This API 38 SFWR command can be used with the API 39 SFRD command to execute
Footnote the Write-in/Read Control of the First-in/First-OUT stack.

API ☺ Applicable models


SFRD Displacement is Read ES EP EH
39 P -

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S Continuous Pulse
SFRD SFRDP
D execution execution
n
32-bit command
Note: Essential condition: 2≤n≤512
- - - -
Refer to each model specification for usage range.
ES series models do not support pulse execution (SFRD, Flag: M1020 (Zero flag)
SFRDP).

: Head address device : destination device : Data length


Command
is the length of the First-in/First-OUT stack and the source device is the
Explanation
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.
This command is usually pulse execution (SFRDP).

6-50 DVP-PLC Application Manual


6 Application Commands API 00-49

When X1 goes from OFF to ON, D9~D2 are all shifted one register to the right and the
Program content of D0 is substracted by 1 when the content of D1 is read and moved to D21.
Example
Please refer to the following ~ steps to perform SFRD command.
The content of D1 is read and moved to D21.
D9~D2 are all shifted one register to the right.
The content of D0 is substracted by 1.

X0
SFRDP D0 D21 K10

n = 10 points
D9 D8 D7 D6 D5 D4 D3 D2 D1 D0 D21
pointer

data read

This API 38 SFWR command can be used with the API 39 SFRD command to execute
Footnote the Write-in/Read Control of the First-in/First-OUT stack.

API ☺ Applicable models


ZRST Resets a Range of Device Specified ES EP EH
40 P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (5 STEPS)
D1 Continuous Pulse
ZRST ZRSTP
D2 execution execution
Note: Essential condition: D1 must be less than or equal to (≦) D2.
32-bit command
Operand D1 and D2 must be in the same category. - - - -
Refer to each model specification for usage range.
ES series models do not support pulse execution command Flag: None
(ZRSTP).

: First destination device : Second destination device


Command
For ES series models, standard and High speed counters cannot be mixed.
Explanation
For EH/EP series models, standard and High speed counters can be mixed use.
When > , then only device is reset.
This command is usually pulse execution (ZRSTP).

DVP-PLC Application Manual 6-51


6 Application Commands API 00-49

When X0 is ON, M300 to M399 (auxiliary relays) will be reset to OFF.


Program
When X1 is ON, C0 to C127 (16-bit counter) will all be reset. (0 is written in and
Example
contact and coil will be reset to OFF)
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)
When X2 is ON, the status of S0 to S127 will be reset to OFF.
When X3 is ON, the data of D0 to D100 (data register) will be reset to 0.
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)
X0
ZRST M300 M399
X1
ZRST C0 C127
X10
ZRST T0 T127
X2
ZRST S0 S127
X3
ZRST D0 D100
X4
ZRST C235 C254

The RST command can be independently used in the bit device, i.e. Y, M, S and in
Footnote word device, i.e. T, C, D.
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.
X0
RST M0

RST T0

RST Y0

FMOV K0 D10 K5

6-52 DVP-PLC Application Manual


6 Application Commands API 00-49

API ☺ Applicable models


DECO 8 → 256 Bits Decoder ES EP EH
41 P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S Continuous Pulse
DECO DECOP
D execution execution
n
32-bit command
Note: When operand D is bit device, n=1~8
- - - -
When operand D is word device, n=1~4
Flag: None
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(DECOP).

: Decode source device : Destination device for storing the encode result
Command
: Decode data length
Explanation
Decodes the data of lower “n” bit of source device and stores the result of “2 n”
bit at device .
This command is usually pulse execution (DECOP).
is used in case of a bit device, 0<n≦8. But if n=0 or n>8, the calculation error
Program
Example will occur.
1 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.)
When X10 goes from Off → On, the data of X0~X2 will be decoded to M100~M107.
If data source is 1+2=3, M103 at the third position from M100 turns ON and is set to 1.
After the execution is completed, X10 is changed to OFF. The device which have been
decoded is still action.
X10
DECOP X0 M100 K3

X2 X1 X0
0 1 1

4 2 1

3
7 6 5 4 3 2 1 0
0 0 0 0 1 0 0 0
M107 M106 M105 M104 M103 M102 M101 M100

DVP-PLC Application Manual 6-53


6 Application Commands API 00-49

is used in case of a bit device, 0<n≦4, but if n=0 or n>4, the calculation error will
Program
Example occur.
2 When n=4, the maxium decoded data is 2 4, equal 16 points.
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.
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.
After the execution is completed, X10 is changed to OFF. The device which have been
decoded is still action.
X10
DECOP D10 D20 K3

D10
b15 b0
0 1 0 1 0 1 0 1 0 1 0 1 0 0 1 1 When 3 is specified
at b2 to b0 of D10
4 2 1
all be 0 (zero)
7 6 5 4 3 2 1 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 result after decoding
b15 b0
D20
When 3 is specified as effective
b3 at the third position from bits, 8 points are occupied.
b0 turns ON and is set to 1

API ☺ Applicable models


ENCO 256 → 8 Bits Encoder ES EP EH
42 P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEPS)
S Continuous Pulse
ENCO ENCOP
D execution execution
n
32-bit command
Note: When operand S is bit device, n=1~8
- - - -
When operand S is word device, n=1~4
Flag: None
Refer to each model specification for usage range.
ES series models do not support pulse execution command
(ENCOP).

: Encode source device : Destination device for storing encode data


Command
: Encode data length
Explanation
Encodes the data of lower “2 n” bit in source device and stores the result at
device .
If the source device is a multiple bit and its value is 1, processing is performed
for the last bit position.
This command is usually pulse execution (ENCOP).

6-54 DVP-PLC Application Manual


6 Application Commands API 00-49

is used in case of a bit device, 0<n≦8. But if n=0 or n>8, the calculation error
Program
Example will occur.
1 When n=8, the maxium decoded data is 2 8, equal 256 points.
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.
After the execution is completed, X10 is changed to OFF and the data in
remain unchanged.
X0
ENCOP M0 D0 K3

When 3 is specified as effective bits, 8 points are occupied.

M07 M06 M05 M04 M03 M02 M01 M00


0 0 0 0 1 0 0 0
7 6 5 4 3 2 1 0

all be 0 (zero)
4 2 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 result after encoding
b15 D0 b0

Which point, counting from M0, is ON and stored in BIN.

is used in case of a word device, 0<n≦4. But if n=0 or n>4, the calculation error
Program
Example will occur.
2 When n=4, the maxium decoded data is 2 4, equal 16 points.
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)
After the execution is completed, X10 is changed to OFF and the data in
remain unchanged.
X0
ENCOP D10 D20 K3

Data inactivated
b0
0 1 0 1 0 1 0 1 0 0 0 0 1 0 0 0
6 5 4 3 2 1 0
b15 D10
7
all be 0 (zero)

0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 result after encoding


b15 D20 b0

When 3 is specified as effective bits, 8 points are occupied.

DVP-PLC Application Manual 6-55


6 Application Commands API 00-49

API Applicable models


SUM Sum of ON Bits ES EP EH
43 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (5 STEPS)
S Continuous Pulse
SUM SUMP
D execution execution
Note: If operand S, D use with device F, it is only available in
32-bit command (9 STEPS)
16-bit command.
Continuous Pulse
Refer to each model specification for usage range. DSUM DSUMP
execution execution
ES series models do not support pulse execution Flag: M1020 (Zero flag)
command (SUMP, DSUMP).

: Source device : Destination device for storing counted number


Command
If the contents of these 16 bits are all “0”, the “Zero” flag, M1020=ON.
Explanation
will occupy two registers when using in 32-bit command.

When X10 is ON, all the bits that with “1” as its content within D0 will be counted and
Program have this counted number stored in D2.
Example X10
SUM D0 D2

0 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 3
D0 D2

API Applicable models


BON Determine the ON Bits ES EP EH
44 D P

Bit devices Word devices


X Y M S K H KnX KnY KnM KnS T C D E F 16-bit command (7 STEP)
S Continuous Pulse
BON BONP
D execution execution
n
32-bit command (13 STEPS)
Note: If operand S uses with device F, it is only available in 16-bit