1 Program Framework of a DVP-PM Series Motion Controller
1.2 Structure of Ox Motion Subroutines
The motion subroutines Ox0~Ox99 are motion control programs. They are subroutines which control the
motion of the axes of a DVP-PM series motion controller. Ox0~Ox99 support basic instructions, applied
instructions, motion instructions, and G-codes. They can call P subroutines. Users can control the paths of
the axes of a DVP-PM series motion controller through Ox motion subroutines. The characteristics of Ox
motion subroutines are described below.
1. There are two methods of enabling an Ox motion subroutine.
When O100 runs, users can set motion subroutine numbers in O100. (The motion subroutine
numbers must be in the range of Ox0 to Ox99. The users can set a motion subroutine number in
O100 by setting D1868. The value in D1868 must be in the range of H8000 to H8063.) If the users
want to enable an Ox motion subroutine, they have to set M1074 to ON or set bit 12 in D1846 to
ON.
Before an Ox motion subroutine is enabled, users have to make sure that no Ox motion subroutine
runs.
Oxn
(Motion subroutine number)
O100 runs.
M1074 is set to ON,
or bit 12 in D1846
is set to ON.
Oxn
runs.
2. Whenever an Ox motion subroutine is enabled, it is executed once. After O100 enables an Ox motion
subroutine, the execution of the Ox motion subroutine will start from the starting flag in the Ox motion
subroutine. After the ending instruction M2 in the Ox motion subroutine is executed, the execution of
the Ox motion subroutine will stop.
MOV
.
.
.
.
.
.
.
.
.
H800A
D1868
OUT
M1074
X0
.
.
.
MOVP
K100
D1836
MOVP
K100
D1837
MOV
H1000
D1846
or
Setting the Ox number Ox10, and setting bit 15 to ON.
If X0is ON, the motion subroutine Ox10 will be enabled.
Cyclic scan
It is executed once.
X0 is ON.
Ox10
Motion subroutine
O100
Main program
If X0 is ON, the motion subroutine Ox10 will be enabled. After the ending instruction M2 in Ox10 is
executed, the execution of Ox10 will stop. (Ox10 is executed once. If Ox10 needs to be executed again,
X0 has to be set to ON.)
3. There are four methods of disabling an Ox motion subroutine.
If the STOP/RUN switch of a DVP-PM series motion controller is turned form the “RUN” position to
the “STOP” position when the DVP-PM series motion controller is powered, M1072 will be OFF,
O100 will stop, and Ox motion subroutines will not be executed.
Users can stop the execution of Ox motion subroutines by means of the external terminal Stop0.
If a DVP-PM series motion controller is powered, users can use communication to set the value in
D1846 to 0, or to set M1074 to OFF, and to stop the execution of Ox motion subroutines.
If an error occurs when an Ox motion subroutine is compiled or when an Ox motion subroutine is
DVP-20PM Application Manual
1-3