PLC Dvp50mc
PLC Dvp50mc
Asia
Delta Electronics (Jiangsu) Ltd.
Wujiang Plant 3
1688 Jiangxing East Road,
Wujiang Economic Development Zone
Wujiang City, Jiang Su Province, P.R.C. 215200
TEL: 86-512-6340-3008 / FAX: 86-769-6340-7290
DVP-50MC Series
Geumcheon-gu, Seoul, Korea, 153-704
TEL: 82-2-515-5303 / FAX: 82-2-515-5302
Motion Controller
4 Kaki Bukit Ave 1, #05-05, Singapore 417939
TEL: 65-6747-5155 / FAX: 65-6744-9228
Operation Manual
Plot No 43 Sector 35, HSIIDC
Gurgaon, PIN 122001, Haryana, India
TEL : 91-124-4874900 / FAX : 91-124-4874945
Americas
Delta Products Corporation (USA)
Raleigh Office
P.O. Box 12173,5101 Davis Drive,
Research Triangle Park, NC 27709, U.S.A.
TEL: 1-919-767-3800 / FAX: 1-919-767-8080
Europe
Delta Electronics (Netherlands) B.V.
Eindhoven Office
De Witbogt 20, 5652 AG Eindhoven, The Netherlands
TEL : +31 (0)40-8003800 / FAX : +31 (0)40-8003898
28-12-2020
DVP-0192520-03
*We reserve the right to change the information in this manual without prior notice.
www.deltaww.com
DVP-50MC Series Motion Controller
Operation Manual
Table of Contents
Chapter 1 Preface
Chapter 2 Overview
Chapter 3 Specifications
i
4.4 Left-side Extension ................................................................................ 4-7
4.4.1 Connectable Left-side Extension Module................................................. 4-7
4.4.2 Allocation of Left-side Network Module Addresses ................................... 4-7
4.4.3 Method of Reading/Writing of Left-side Modules ...................................... 4-7
Chapter 5 Installation
ii
6.4 RS-232 Communication Port ................................................................ 6-12
6.4.1 Function that RS-232 Port Supports .................................................... 6-12
6.4.2 Definitions of RS-232 Port Pins ........................................................... 6-12
6.4.3 RS-232 Hardware Connection ............................................................. 6-12
6.4.4 Supported Function Codes and Exception Codes.................................... 6-13
7.2 The Impact of PLC RUN or STOP on Variables and Devices .............. 7-10
iii
Chapter 8 Logic Instructions
iv
8.9.1 ADD ........................................................................................... 8-61
8.9.2 SUB ........................................................................................... 8-65
8.9.3 MUL ........................................................................................... 8-68
8.9.4 DIV ............................................................................................ 8-71
8.9.5 MOD ........................................................................................... 8-74
8.9.6 MODREAL ................................................................................... 8-76
8.9.7 MODTURNS ................................................................................. 8-78
8.9.8 MODABS ..................................................................................... 8-80
8.9.9 ABS............................................................................................ 8-82
8.9.10 DegToRad ................................................................................... 8-84
8.9.11 RadToDeg ................................................................................... 8-86
8.9.12 SIN ............................................................................................ 8-88
8.9.13 COS ........................................................................................... 8-90
8.9.14 TAN ............................................................................................ 8-92
8.9.15 ASIN .......................................................................................... 8-94
8.9.16 ACOS ......................................................................................... 8-96
8.9.17 ATAN .......................................................................................... 8-98
8.9.18 LN ............................................................................................. 8-100
8.9.19 LOG .......................................................................................... 8-102
8.9.20 SQRT ......................................................................................... 8-104
8.9.21 EXP ........................................................................................... 8-106
8.9.22 EXPT ......................................................................................... 8-108
8.9.23 RAND ........................................................................................ 8-110
8.9.24 TRUNC ....................................................................................... 8-112
8.9.25 FLOOR ....................................................................................... 8-114
8.9.26 FRACTION .................................................................................. 8-116
v
8.12.4 MUX .......................................................................................... 8-146
8.12.5 LIMIT ........................................................................................ 8-148
8.12.6 BAND ........................................................................................ 8-150
8.12.7 ZONE ........................................................................................ 8-152
vi
8.14.4.1 RS232_Link_Config .................................................................. 8-260
8.14.4.2 RS232_Link_Manage ................................................................ 8-265
8.14.4.3 RS232_Link_Status .................................................................. 8-267
8.14.4.4 RS232 Data Exchange Example.................................................. 8-270
8.14.4.5 RS232_RS ............................................................................... 8-273
8.14.4.6 RS232 Free Protocol Example .................................................... 8-279
8.14.4.7 RS232_SetDelayTime ............................................................... 8-282
vi i
8.21.1 CRC16 ....................................................................................... 8-341
8.21.2 LRC ........................................................................................... 8-343
viii
11.3.23 DMC_Jog ................................................................................. 11-178
11.3.24 DMC_MoveVelocityStopByPos ..................................................... 11-181
11.3.25 DMC_MoveVelocityStopByLinePos ................................................ 11-186
11.3.26 DMC_ReadPositionLagStatus ...................................................... 11-191
11.3.27 DMC_WritePositionLagSetting ..................................................... 11-195
11.3.28 DMC_ChangeMechanismGearRatio .............................................. 11-197
11.3.29 DMC_TorqueControl................................................................... 11-200
11.3.30 DMC_MoveVelocity .................................................................... 11-206
11.3.31 DMC_SwitchSoftLimit ................................................................ 11-207
ix
11.6.4.3 G0 (Rapid Positioning) ............................................................ 11-339
11.6.4.4 G1 (Linear Interpolation) ........................................................ 11-343
11.6.4.5 G2 (Clockwise Circular/ Helical Interpolation) ............................ 11-346
11.6.4.6 G3 (Anticlockwise Circular /Helical Interpolation) ....................... 11-355
11.6.4.7 G17/G18/G19 (Specify Circular Interpolation Plane) ................... 11-361
11.6.4.8 G4 (Dwell Instruction) ............................................................ 11-363
11.6.4.9 G50 (Precise Stop) ................................................................. 11-363
11.6.4.10 G51 (Round path transition) .................................................. 11-364
11.6.4.11 G52 (Smooth path transition) ................................................ 11-365
11.6.4.12 M Code ............................................................................... 11-368
11.6.5 G Code Instructions .................................................................. 11-370
11.6.5.1 DMC_CartesianCoordinate ....................................................... 11-370
11.6.5.2 DMC_ReadMFunction .............................................................. 11-378
11.6.5.3 DMC_ResetMFunction ............................................................. 11-382
11.6.5.4 DMC_SetG0Para .................................................................... 11-387
11.6.5.5 DMC_SetG1Para .................................................................... 11-391
11.6.5.6 DMC_SetStartPosition ............................................................. 11-395
Chapter 12 Troubleshooting
x
12.2 Table of Error IDs in Motion Instructions......................................... 12-6
12.3 System Trouble Diagnosis through System Error Codes ................ 12-16
xi
This manual provides an introduction to product functions, specifications,
installation, basic operations and settings.
This product is an OPEN TYPE device and therefore should be installed in
an enclosure free of airborne dust, humidity, electric shock and vibration.
The enclosure should prevent non-maintenance staff from operating the
device (e.g. key or specific tools are required for operating the enclosure)
in case that danger and damage on the device may occur.
Be sure to read the manual carefully and follow the instructions so as to
avoid injuries to personnel and damage to products.
xi i
1
Preface
Table of Contents
1.1 Explanation of Symbols in This Manual ..................................... 1-2
1.2 Revision History ....................................................................... 1-2
1-1
DVP-50MC Series Motion Controller Operation Manual
Thank you for purchasing DVP-50MC series motion controller which is created on the basis of motion control
and we are providing you with a high-end motion control system.
_1 This manual describes the product specifications, functions, system architecture, installation, wiring,
execution principle, logic instructions and motion control instructions, trouble-shooting, communication
protocols, homing modes and other relevant information.
Make sure that you have well known about the motion control system configuration and product operation
before use.
indicates the highly potential hazards. Severe personnel injury or even death will
! Dan ger result if you do not follow the instructions.
indicates the potential hazards. Minor personnel injury or even death may result if
! Warnin g you do not follow the instructions.
indicates much attention should be paid. A bad accident can occur if you do not
! Cau tion follow the instructions.
1-2
Chapter 1 Pr ef ac e
1-3
DVP-50MC Series Motion Controller Operation Manual
MEMO
_1
1-4
2
Overview
Table of Contents
2.1 Product Description ................................................................... 2-2
2.2 Functions ................................................................................... 2-2
2.3 Profile and Components ............................................................ 2-3
2- 1
DVP-50MC Series Motion Controller Operation Manual
2.2 Functions
The transmission speed is 100Mbps in the EtherCAT bus network for the high-speed, precise and
high-efficiency data transmission.
For different models, the max. number of axes they can control and multi-axis instructions they can
support are different. For details, please refer to Specifications in Chapter 3.
Equipped with 1GHz high-speed floating-point operation processor; supporting 64-bit floating point
(LREAL) and capable to meet various complicated motion control.
With two built-in incremental encoder ports and one SSI absolute encoder port.
With one EtherCAT port, one Ethernet port, one RS-232 port and one RS-485 ports built in the
controller.
With one built-in CAN port serving as CANopen master or slave.
Supports powerful field network (as Profibus-DP slave) for construction of a function-complicated
control system.
With a variety of I/O extensions (Left-side high-speed AIAO; right-side low-speed AIAO and DIDO,
temperature modules and etc.).
Using the easy-to-use software interface with the features of complete function and convenient
application.
Providing standard bus cables, terminal resistors, distributor boxes and other accessories as well
as easy and convenient plug-and-play wiring.
2-2
Chapter 2 Specifications
2 EtherCAT
Ethernet
00 01 02 03 04 05 06 07
15
EXTENSION
PORT
9
2_
3 16
10
11
12
4
17
5
13
6 7
○
1 Model name ○
10 Right-side extension module port
○
2 State indicators ○
11 Input and output pins and symbols
○
3 COM/SSI communication port ○
12 24V power port
○
4 Encoder port ○
13 Screw fixing clip
○
5 EtherCAT communication port ○
14 Extension module fixing clip
○
6 Ethernet communication port ○
15 Left-side extension module port
○
7 CANopen communication port ○
16 Nameplate
○
8 IO indicators ○
17 DIN rail fixing clip
○
9 SD card slot
2- 3
DVP-50MC Series Motion Controller Operation Manual
Memo
_2
2-4
3
Specifications
Table of Contents
3.1 Functional Specifications ........................................................ 3-2
3.1.1 Specifications ........................................................................3-2
3.1.2 Devices and Data Types ..........................................................3-3
Devices .............................................................................3-3
Valid Ranges of Devices.......................................................3-4
Latched Devices .................................................................3-5
Data Types and Valid Ranges Supported ................................3-5
3.2 Electrical Specifications .......................................................... 3-7
3- 1
DVP-50MC Series Motion Controller Operation Manual
Right-side
1 DVP-S series special module
extension port
3-2
Chapter 3 Specifications
Specification
Item DVP50MC DVP50MC DVP50MC DVP50MC
11T/P 11T/P-06 11T-04S 11T-16S
Left-side
Left-side 8 pieces of DVP-S series left-side extension
extension Quantity
extension modules
Left-side and modules
right-side Special
Quantity 8 pieces of DVP-S series special modules
extension Right-side modules
extension Number
Digital modules 240 input points and 240 output points
of points
Note:
3_
*1: The multi-axis instructions mentioned here include Coupling instructions, Application instructions,
Coordination instructions, G Code instructions and Axis Group instructions. For instruction sets, please
refer to Table of Motion Control Instructions in section 11.1.
*2: The number of axes supporting multi-axis instructions is recalculated from 0 after the controller is
powered on. After the number of axes which have executed multi-axis instructions exceeds the allowed
maximum number, other axes will not be able to execute multi-axis instructions. When coupling and
application instructions are executed, the master axis is not counted into the number of axes which
execute multi-axis instructions. When other multi-axis instructions except coupling and application
instructions are executed, all used axes are counted into the number of axes which execute multi-axis
instructions.
With DVP50M11T-16S taken for example, the number of axes supporting multi-axis instructions is 2. E.g.,
Axis 1 (master) and axis 2 (slave) executed MC_GearIn instruction and Axis 1 (master) and axis 3 (slave)
executed MC_GearIn instruction. Afterwards, other axes would not be able to execute any multi-axis
instruction. Even if axis 2 and axis 3 are aborted by a single-axis instruction, other axes will still not be
able to execute any multi-axis instruction. E.g., other axes can not execute any multi-axis instruction as
well after axis 1 and axis 2 execute the DMC_MoveLinearRelative instruction.
% I X 0 .0
Digital point number
P refix 2 s ymbo l
P refix 1 s ymbo l
A fixed chara ct er
3- 3
DVP-50MC Series Motion Controller Operation Manual
%ML1 includes %MB8~%MB15, %MD2 includes %MB8~%MB11, %MW4 includes %MB8~%MB9 and
%MB8 includes %MX8.0~8.7 as shown in the following table.
Corresponding relationships
Device The 5th WORD The 6th WORD The 7th WORD The 8th WORD
name
Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit Bit
... … ... … ... … ... …
0 7 8 15 0 7 8 15 0 7 8 15 0 7 8 15
%MX10.0~10 %MX11.0~11 %MX12.0~12 %MX13.0~13 %MX14.0~14 %MX15.0~15
%MX %MX8.0~8.7 %MX9.0~9.7
.7 .7 .7 .7 .7 .7
%MB %MB8 %MB9 %MB10 %MB11 %MB12 %MB13 %MB14 %MB15
%MW %MW4 %MW5 %MW6 %MW7
%MD %MD2 %MD3
%ML %ML1
3-4
Chapter 3 Specifications
%QX1.0~%QX1.7 16#A008~16#A00F
Q Bit
(Output) …… ……
%QX127.0~%QX127.7 16#A3F8~16#A3FF
Word %QW0~%QW63 16#A000~16#A03F
M
Word %MW0~%MW32767 16#0000~16#7FFF
(Register)
Latched Devices
The %MW0~%MW999 devices are latched devices in which data are retained when power off. Besides, the
variables defined in the software can select Retain as its property. The capacity of latched devices is 128K
bytes.
Data Types and Valid Ranges Supported
The data types and valid ranges of the variables in the software that the motion controller uses are shown in
the following table.
No. Data type Valid range Initial value
1 BOOL TRUE or FALSE FALSE
2 BYTE 16#00 ~ FF 16#00
3 WORD 16#0000 ~ FFFF 16#0000
4 DWORD 16#00000000 ~ FFFFFFFF 16#00000000
16#00000000000
5 LWORD 16#0000000000000000 ~ FFFFFFFFFFFFFFFF
00000
6 USINT 0 ~ +255 0
7 UINT 0 ~ +65535 0
8 UDINT 0 ~ +4294967295 0
9 ULINT 0 ~ +18446744073709551615 0
3- 5
DVP-50MC Series Motion Controller Operation Manual
3-6
Chapter 3 Specifications
3- 7
DVP-50MC Series Motion Controller Operation Manual
Item Content
The shielded cable: 500m
Max. cable length
The unshielded cable: 300m
#1: UP and ZP must connect the auxiliary power 24VDC (-15%~20%).
_3
3-8
4
System Constitution
Table of Contents
4- 1
DVP-50MC Series Motion Controller Operation Manual
Ether CAT
Ether net
HMI PC
Et h er C AT E t her n et C A No pen
Ethernet
RS-232 CANopen
E therCAT
HMI
RS-485
AS DA -A2-M HMI
_4
AC motor drive Temperature c ontr ol ler
E ncoder
The figure above illustrates the peripheral devices which are connected to various ports of the motion
controller in the entire system. Refer to “Wiring, Communication Setting and Network Construction” for details
on the functions of communication ports.
4-2
Chapter 4 System Architecture
During the data exchange between master and slaves, slaves achieve the processing of EtherCAT bus data
via ESC chips. By doing so, the efficiency of bus data processing has been greatly improved. Thanks to the
ESC chips in slaves, the master can make a communication with all slaves in an EtherCAT data frame and
thus the communication efficiency is enhanced.
4_
The EtherCAT port of the controller exchanges data with EtherCAT slaves according to COE(CANopen over
EtherCAT) protocol. There are two kinds of transmission methods for the controller and slaves. One is cyclic
data exchange based on the specified time cycle, called PDO (Process Data Object). The other is request-
response data exchange, called SDO (Service Data Object).
PDO data transmission is used for speedy cyclic data exchange. While master and slaves are exchanging
4- 3
DVP-50MC Series Motion Controller Operation Manual
data through PDO, the other party does not need to make any response after one party sends out data. If the
controller controls EtherCAT slave via motion instructions, the data exchange between the controller and
slaves are conducted through PDO.
The SDO data are sent only when the master need read or write data in the slave. The SDO transmission
method can only be used for the master to read or write the data in the slave and the slave need respond to
the master. Reading or writing data via SDO can be achieved by using DMC_ReadParameter_Motion and
DMC_WriteParameter_Motion instructions.
_4
1. The network initialization command is sent through broadcasting and the initialization of all slaves
starts. All slaves enter the Pre-Operational status.
2. Slave data for cyclic exchange are configured based on the configuration information in the software.
3. The slave which is configured successfully enters the Operational status and makes a connection with
the master.
4. After the configured slave enters the Operational status, the master and slave start to conduct the
cyclical data exchange.
The initialization process above is completed by the controller without users’ operation.
4-4
Chapter 4 System Architecture
If all slaves configured in the master are offline, the master and all slaves make the connection again. After the
connection is made again, MC_Reset need be executed on the offline slaves and then the slaves can be
controlled.
If the offline slaves are required to make the connection with the master again, the EtherCAT cable between
the controller and the first servo drive should be re-plugged after being removed or the controller is repowered
on. If the normally running slaves are affected due to the operations mentioned above, the normally working
slaves and the master will make the connection again. If some axis is running, it will be caused to stop running
immediately in the situation.
Relevant servo parameter settings are shown in the following table when the motion controller and the
servo drive are connected.
Parameter Explanation Setting value Explanation
Set up the control
P1-01 X0C*1 Set to EtherCAT mode
mode of the servo
4- 5
DVP-50MC Series Motion Controller Operation Manual
*1:The output directions of the torque are illustrated as below when the value of X is 0 and 1 respectively.
0 1
Positive
direction
P(CCW ) N(CW)
Negative
direction
N(CW) P(CCW )
The wiring figure of the motion controller and ASDA-A2-XXXX-E series servo drives
_4
DV P50MC11T
C A N op en
DVP50MC11T PW R R s 23 2 00 01 02 0 3 04 05 06 0 7
RUN
R UN R s 48 5 10 11 12 1 3 14 15 16 1 7
ER R ERR E t her C A T
00 01 02 0 3 04 05 06 0 7
SD E t her n et
IN
0 0 10
15
10
5
0 1 11
C O M / S SI
0 2 12
0 3 13
11
1
0 4 14
6
0 5 15
0 6 16
0 7 17
S 0 S1
OUT
0V 24V
1
5
10
5
E N C O DE R
0 0 04
0 1 05
0 2 06
1
1
6
0 3 07
U P ZP
U C-E MC003-02A
U C-E MC005-02A
AS DA -A 2 -E AS D A-A 2 -E AS D A-A2 -E
Note:
1. Please refer to the servo operation manual for the wiring of ASDA-A2-XXXX-E series servo
drives, servo motors and encoders.
2. Choose UC-EMC003-02A, UC-EMC005-02A or UC-EMC010-02A communication cable
according to the field situation.
3. Refer to section E.1 for explanation of EtherCAT communication cable models.
4-6
Chapter 4 System Architecture
Refer to the operation manuals of modules for details on allocation of left-side extension module mapping
areas. Pay attention to how the mapping address expression format is changed in the operation manual.
For example, the output mapping area for DVPPF02-SL is D6250~D6349. But the area address is expressed
as %MW6250~%MW6349 when the module is connected to the left of the motion controller.
4- 7
DVP-50MC Series Motion Controller Operation Manual
4-8
Chapter 4 System Architecture
SD memory cards can be classified into SD, Mini SD and Micro SD according to its size. The motion controller
only supports the first standard-dimension SD as below.
SD Mini SD
4_
Micro SD
Specification
There are various SD card specifications on current market. Except that SD cards are different in size, they
can be classified into SD, SDHC and SDXC according to its capacity. However, the controller only supports
basic SD specification currently. The following table includes the information of SD card family members. The
controller only supports SD and SDHC. Please make sure to purchase the SD card of the right specification
that the controller supports.
SD card classification
Class SD SDHC SDXC
Capacity 32MB~2GB 4GB~32GB 32GB~2TB
File system FAT16/FAT32 FAT32 exFAT(FAT64)
Size SD SDHC Mini SDHC Micro SDHC SDXC Micro SDXC
* Please notice that there is a kind of MMC card which is very similar to SD card in appearance and thus
please differentiate them carefully during purchase.
4- 9
DVP-50MC Series Motion Controller Operation Manual
Released
Write-
protected
_4
4-10
5
Installation
Table of Contents
5- 1
DVP-50MC Series Motion Controller Operation Manual
5.1 Dimensions
5.1.1 Profile and Dimensions
128 68.4
CANopen
00 01 02 03 04 05 06 07
RUN
ERR 10 11 12 13 14 15 16 17
EtherCAT
00 01 02 03 04 05 06 07
Ethernet
EXTENSION
PORT
110
116
Unit: mm
5.1.2 Dimensions of Left-side and Right-side Extension Modules
_5 See the following dimension figure of a left-side extension module by taking DVPCOPM-SL for example.
The length, width and height of all left-side modules are the same as that of DVPCOPM-SL.
96
90
33.1 60
Unit: mm
5-2
Chapter 5 Installation
See the following dimension figure of a right-side extension module, which takes DVP04AD-S for
example. The length, width and height of all left-side modules are the same as that of DVP04AD-S.
25.2 60
96
90
Unit: mm
5.1.3 Connecting to the Left-side Extension Module
Connection of DVP-50MC Series Controller and DVPDNET-SL
Pull open the extension module clips on the top left and bottom left of the motion controller and
install DVPDNET-SL along four mounting holes in the four angles of the motion controller as step
1 in figure 5.1.3.1. 5_
Press the clips respectively on the top left and bottom left of the motion controller to fix the module
tightly and ensure that their contact is normal as step 2 in figure 5.1.3.1.
C AN o p e n 00 01 02 03 04 05 06 07
RUN
ERR 10 11 12 13 14 15 16 17
Et he r CA T
00 01 02 03 04 05 06 07
Et h e rn e t
Figure 5.1.3.1
5- 3
DVP-50MC Series Motion Controller Operation Manual
CA Nop e n
RU N
3 5 mm
0 0 0 1 0 2 03 04 05 06 07
ERR
1 0 11 12 13 14 15 16 17
Eth e rCAT
Eth e rn et 0 0 0 1 0 2 03 04 05 06 07
D in R ai l
Figure 5.1.3.2
5.1.4 Connecting to the Right-side Extension Module
Connection of the controller and DVP16SP11T
_5 Pull open the extension module clips on the top right and bottom right of the motion controller and
install DVP16SP11T along four mounting holes in the four angles of the controller as step 1
in figure 5.1.4.1.
Press the clips on the upper right and bottom right of the controller to fix the module tightly
and ensure that their contact is normal as step 2 in figure 5.1.4.1.
CAN op e n
RUN 0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7
ERR
Eth e rCAT 1 0 1 1 1 2 1 3 1 4 15 16 17
Eth e rne t
0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7
Figure 5.1.4.1
5-4
Chapter 5 Installation
CA No p e n
R UN
ER R
E th er CA T
00
10
01
11
02 03 04 0 5 0 6
12 1 3 1 4 1 5 1 6
07
17
3 5mm
E th e rn e t
00 01 02 03 04 0 5 0 6 07
Din Rail
Figure 5.1.4.2
5.1.5 SD Card Installing and Removing
5_
The memory card slot of the motion controller
The memory card slot is seated in the right side of the front of the motion controller as illustrated below.
CA No p e n
RU N 0 0 0 1 02 0 3 04 0 5 06 0 7
ER R
Eth e rC AT 1 0 1 1 12 1 3 14 15 16 17
Eth e rn e t
0 0 0 1 02 0 3 04 0 5 06 0 7
S D card slot
5- 5
DVP-50MC Series Motion Controller Operation Manual
Installing SD card
Insert an SD card to the memory card slot directly and push it to the end of the slot until hearing a click.
After the installation is finished, the SD card should be fixed tightly. If the SD card inserted to the slot is
loose, the installation is unsuccessful. In addition, the SD card has a fool-proofing design. If the direction
in which SD card is inserted is wrong, the card will fail to reach the end of the slot. In this case, do not
force to push the SD card toward the end of the slot in order to avoid the damage to the module and SD
card.
Follow the instructions in the figures below to insert the SD card in the right direction.
C AN op en CA N op en C AN op en
RUN 00 01 0 2 03 04 05 06 07 R UN 00 01 02 03 04 05 06 07 RUN 00 01 02 03 04 0 5 06 07
ERR E RR ERR
10 11 12 13 14 15 16 17 10 11 1 2 13 14 15 16 17 E t her C A T 10 11 12 13 14 15 16 17
E t her C A T E th er C AT
E t her n et
E t her n et 00 01 0 2 03 04 05 06 07 E th er ne t 00 01 02 03 04 05 06 07 00 01 02 03 04 0 5 06 07
Removing SD card
Just push the SD card to the end of the slot so that the SD card will loosen and rebound from inside the
slot. And then remove the SD card out of the slot easily.
_5 C A No pen
RUN
ERR
E t he rC A T
00
10 11
01 0 2 03
12 13
04
14
05
15
06
16
07
17
C AN op en
RUN
ERR
E t her C A T
E t her n et
0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7
1 0 1 1 1 2 1 3 1 4 1 5 1 6 1 7
0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7
C A N ope n
RU N
ER R
Et he r C AT
Et he r net
0 0 0 1 0 2 0 3 04
1 0 1 1 1 2 1 3 14
0 0 0 1 0 2 0 3 04
05
15
05
06
16
06
07
17
07
E t he rn et 00 01 0 2 03 04 05 06 07
5-6
Chapter 5 Installation
CAN
o p e n
0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7
RUN
ERR 1 0 1 1 2 1 3 1 4 1 5 1 6 1 7
Et h
e rC A T
0 0 0 1 0 2 0 3 0 4 0 5 0 6 0 7
Et h
e rn e t
IN
0 0 1 0
1 5
0
1
5
0 1 1 1
S
I
0 2 1 2
M /S
0 3 1 3
O
C
1 1
1
0 4 1 4
6
0 5 1 5
0 6 1 6
0 7 1 7
S 0 S1
5
1
1 0
5
OUT
4 V
E NCODE R
2
0 0 0 4
V
0
0 1 0 5
1 1
1
0 2 0 6
6
0 3 0 7
U PZP
5_
5- 7
DVP-50MC Series Motion Controller Operation Manual
The ambient temperature of the motion controller inside the control cabinet is 0~55°C and the
humidity is 5 ~ 95%.
Please avoid making the installation near the high-temperature equipment.
Keep enough space for air ventilation.
The fan or air conditioner must be installed if the environment temperature exceeds 55°C.
The motion controller is for indoor use only.
The control cabinet which is 1.0m~2.0m in height is easier for installation and operation.
Keep the installation away from the high-voltage equipment and power equipment.
The power supply in the control cabinet must be cut off before installation.
_5 Do not install the controller in the control cabinet which contains high-voltage equipment.
Please keep at least 200mm far away from the power wire for the installation.
There should be a grounding wire for the control cabinet.
If the equipment is used in a manner not specified by the manufacturer, the protection provided
by the equipment may be impaired.
D
The motion controller has to be installed in an
enclosure. In order to ensure that the controller D D
radiates heat normally, the space between the Motion Controller
controller and the enclosure has to be larger
than 50 millimeters. D > 50mm
D
5-8
6
Wiring, Communication Setting and
Network Construction
Table of Contents
6.1 Wiring ....................................................................................... 6-3
6.1.1 Power Supply ............................................................................6-3
6.1.2 Safety Circuit Wiring ..................................................................6-4
6.2 Input Point and Output Point Wiring ......................................... 6-6
6.2.1 Function that Input Points Support ...............................................6-6
6.2.2 Input Point Wiring ......................................................................6-7
6.2.3 Output Point Wiring....................................................................6-9
Output Point Wiring for DVP50MC11T and DVP50MC11T-06 ....6-9
Output Point Wiring for DVP50MC11P and DVP50MC11P-06 ....6-9
6.3 RS-485 Communication Port.................................................... 6-10
6.3.1 Function that RS-485 Port Supports ........................................... 6-10
6.3.2 Definitions of RS-485 Port Pins .................................................. 6-10
6.3.3 RS-485 Hardware Connection .................................................... 6-10
6.3.4 Supported Function Codes and Exception Function Codes ............. 6-11
6.4 RS-232 Communication Port.................................................... 6-12
6.4.1 Function that RS-232 Port Supports ........................................... 6-12
6.4.2 Definitions of RS-232 Port Pins .................................................. 6-12
6.4.3 RS-232 Hardware Connection .................................................... 6-12
6.4.4 Supported Function Codes and Exception Codes .......................... 6-13
6.5 SSI Absolute Encoder Port ....................................................... 6-14
6.5.1 Function of SSI Absolute Encoder .............................................. 6-14
6.5.2 Definitions of SSI Port Pins ....................................................... 6-14
6.5.3 SSI Absolute Encoder Hardware Connection ................................ 6-14
6.6 Incremental Encoders ............................................................. 6-16
6.6.1 Function of Incremental Encoder ............................................... 6-16
6.6.2 Definition of Incremental Encoder Port Pins ................................. 6-16
6.6.3 Incremental Encoder Hardware Connection ................................. 6-16
6.7 Ethernet Communication Port.................................................. 6-17
6.7.1 Function that Ethernet Communication Port Supports ................... 6-17
6.7.2 Pins of Ethernet Communication Port.......................................... 6-19
6.7.3 Network Connection of Ethernet Communication Port ................... 6-19
6.7.4 Function Codes that Ethernet Communication Port Supports ......... 6-20
6.8 EtherCAT Communication Port................................................. 6-21
6.8.1 Function that EtherCAT Communication Port Supports .................. 6-21
6.8.2 Pins of EtherCAT Communication Port ......................................... 6-21
6- 1
DVP-50MC Series Motion Controller Operation Manual
6- 2
Chapter 6 Wiring, Communication Setting and Network Construction
6.1 Wiring
1. Connect the supply power to the two terminals, 24V and 0V and the grounding terminal to the earth.
Be cautious that the motion controller may be damaged if the positive and negative polarities of the
supply power are connected reversely.
2. Please be sure to use certified power supply with SELV output or certified power supply providing
double insulation evaluated by UL60950, or UL61010-1 and UL61010-2-201 standards
3. Use copper conductors as power wires only. The diameter of power wires must be between 12 and
28AWG and the rated temperature should be greater than 70°C. The power terminal block plug wiring
torque is 4.5 in-lbs.
4. Separate the supply power for the controller, the external supply power for input and output points of
the controller and the supply power for other loads. The controller uses an individual supply power.
5. Add a noise filter and an isolation transformer before the controller’s supply power. The isolation
transformer is installed between the supply power and the noise filter. The transformer secondary side
need not be earthed. See the wiring diagram below.
6. The isolation transformer effectively reduces interference from the ground, electrical surge noise and
etc. The power wires between the isolation transformer and the controller should be tightly twisted. The
shorter the distance between them is, the better effect is produced. Be sure to keep away from the
power lines and high voltage lines.
7. The noise filter can effectively reduce interference. The incoming cable and the outgoing cable of the
filter should be arranged separately to avoid coupling the interference before the noise filter to the cable
after the noise filter.
8. The long power shutdown or power voltage drop will stop the motion controller from running and the 6
controller will stop communicating with the servo drive when all outputs are FALSE. The motion
controller will resume the connection with the servo drive when the power supply returns to normal.
6- 3
DVP-50MC Series Motion Controller Operation Manual
Main circuit
L1
L2
L3
N
Noise Isola tion Powe r supply
filter transformer for Controller
1:1
AC
DC
Power supply
for other loads
6
6.1.2 Safety Circuit Wiring
The action of any device inside the motion controller may affect the behavior of the external equipment
under the motion controller’s control over the servo drive. Therefore, any device trouble may cause the
entire automatic control system to lose control and even result in injuries and death of personnel. For these
reasons, we suggest the following safety device should be included in the power input circuit.
6- 4
Chapter 6 Wiring, Communication Setting and Network Construction
2 3
1
5
4
Mot ion Cont rolle r
24V
0V
7
N L 24V 0V
8
DV PP S05 6
6- 5
DVP-50MC Series Motion Controller Operation Manual
Input
signals t(us) t(us)
Input signal s
after being filte re d
Inp ut
In put signa ls
withou t filter set
6- 6
Chapter 6 Wiring, Communication Setting and Network Construction
S0 S1
Sinking Sinking
24VDC
24VDC
00 10
24 VDC
(Common )
S0
Switch
00(I nput)
6
The input points of the motion controller, 10~17 correspond to S1 as shown below.
Mot ion Con troller
24 VDC
S1(Common)
Switch
10(I nput)
Source Mode
Under Source mode, the simplified model is illustrated below and the current flows into the common ports
S0 and S1.
6- 7
DVP-50MC Series Motion Controller Operation Manual
00 10
24VDC
24VDC
S0 S1
So urc ing So urc ing
24 VDC
(Common)
S0
Switch
00(In put)
The input points of the motion controller, 10~17 correspond to S1 as shown below.
Motion Contr oller
6 24 VDC
(Common)
S1
Switch
10(I nput)
6- 8
Chapter 6 Wiring, Communication Setting and Network Construction
Q0 5~30V DC
0 .5A
ZP
5~30V DC
0 .5A
Load
Q0
6- 9
DVP-50MC Series Motion Controller Operation Manual
12 D- Negtive pole
6
D VP50M C11T
DVP 50MC11T
4 4
3
2 2
5 5 6
2 2
2
Device No. 1 2 3 4 5 6
Device Communi AC
name Modbus The motion
cation VFD-CM08 motor Servo drive
master controller
cable drive
1 D+ D- S G 2 D+ D- S G ..... SG D+ D- 2
3 3
4 4
6- 1 0
Chapter 6 Wiring, Communication Setting and Network Construction
RS-485 Wiring:
Explanation of numbers
○
1 ○
2 ○
3 ○
4
Master Slave Terminal resistor Shielded cable
Notes:
Terminal resistors with the value of 120Ω are recommended to connect to both ends of the bus.
To ensure high communication quality, please use the shielded twisted pair cable (20AWG).
When the internal voltages of two devices are different, make SG (Signal Ground) of the two
devices connected with each other to balance their SG voltages and make the communication
more stable.
6- 11
DVP-50MC Series Motion Controller Operation Manual
9 Rx Receiving data
DV P50M C11T PC
CO M (RS -232 port w iring)
6 F unc tion P in N o. Pin N o. Fun ctio n
1 1
2 2 RX D
T XD 3 3 TX D
4 4 DT R
GN D 5 5 GN D
6 6 DS R
7 7 RT S
8 8 CT S
RX D 9 9
10
11
12
13
14
15
RS-232 port is connected to HMI when the motion controller functions as a slave.
DVP50MC11T
HMI
RS-232
Et he r C AT Et he rne t C A N ope n
6- 1 2
Chapter 6 Wiring, Communication Setting and Network Construction
The exception codes that RS-232 port of the motion controller supports are listed in the following
table.
Exception
code
Indication 6
16#01 Unsupportive function code
16#02 Unsupportive Modbus address
16#03 The data length is out of the valid range.
6- 1 3
DVP-50MC Series Motion Controller Operation Manual
6
Et h e r C AT Et h e r ne t C A N op en
Encoder
EtherCAT
ASDA-A2-E
DV P50M C11T
CO M/S SI S SI encoder
Pin N o. F unction Function
1 DATA+ DATA+
2 DATA- DATA-
6 CLK + CLK +
14 CLK - CLK -
15 5V VCC
8 G ND 0V
6- 1 4
Chapter 6 Wiring, Communication Setting and Network Construction
Note: The power supply for COM/SSI port of the motion controller is 5V power.
When VCC = 5V, connect the power voltage VCC of SSI encoder to pin 15 of COM/SSI interface and 0V
of SSI encoder to pin 8 of COM/SSI interface.
When VCC ǂ 5V, the power is supplied to SSI encoder alone according to the actual power voltage of
the SSI encoder which is connected.
6- 1 5
DVP-50MC Series Motion Controller Operation Manual
4 Z1+
5 Z1-
Power supply for the first
15 +5V
encoder
3 A2+
9 A2-
6 B2+ Differential signals of the
6 12 B2- second incremental encoder
Encoder
13 Z2+
14 Z2-
Power supply for the second
7 +5V
encoder
8 0V 0V shared by the two encoders
Outer
metal - Shielding layer
shell
6.6.3 Incremental Encoder Hardware Connection
Illustration of Incremental Encoder Wiring
DVP50MC11T
DVP 50MC 1T P R CR
ANp
oen
RW
UN UN R
RS42
S23
5
8 0 0102 0
3 0405 6
0 07
ERR 0
1 1112 1
3 1415 6
1 17
ERR Et h
eCr AT
SD Ethernet 0 0102 0
3 0405 6
0 07
EtherCAT
ASDA-A 2- E
6- 1 6
Chapter 6 Wiring, Communication Setting and Network Construction
5 1
10 6
15 11
DVP 50MC11T
Enc oder Encoder
Pin No. Fun ctio n Functi on
1 A1+ A
2 A1- A
10 B1+ B
11 B1- B
4 Z1+ Z
5 Z1- Z
15 +5V Vcc
8 G ND 0V
Note: The power supply for Encoder port of the motion controller is 5V power.
When VCC = 5V, connect the power voltage VCC of an encoder to pin 15 of the motion controller’s
Encoder interface and 0V of the encoder to pin 8 of Encoder interface.
When VCC ǂ 5V, the power is supplied to the encoder alone according to the actual power voltage of
the encoder which is connected.
The Ethernet port can be used to download the configuration file, execution file and CAM file. It also supports
automatic jumper function and users do not need to specially select wire jumper when the Ethernet port is 6
connected to the computer or switchboard. Besides, it can automatically detect the transmission speed of
10Mbps and 100 Mbps as well.
HMI, PLC or other Modbus TCP master device can read and write data in the devices inside the motion
controller via the Ethernet port. For details on Modbus TCP communication, refer to appendix B.
6- 1 7
DVP-50MC Series Motion Controller Operation Manual
The Ethernet port supports EtherNet/IP slave function and Socket function. See the details about the
specification for the port as below.
Item Ethernet port
Connections (Server)
MODBUS TCP 16
Connections (Client)
TCP connections
Socket 8
UDP connections
Device type Adapter
CIP connections 8
TCP connections 16
Interval time for
CIP_IO
sending messages 5ms~1000ms
Connection
(RPI)
Maximum data size per
200bytes
EtherNet/IP message
Class 3
8
(Connected Type)
UCMM
CIP_Explicit 16
Message (Non-Connected Type)
Identity, Message Router, Assembly,
Supports CIP objects Connection Manager, Port, TCP/IP
interface, Ethernet link, Vendor specific
When the controller serves as the EtherNet/IP slave, IO connections correspond to default start devices as
6 shown in the following table.
Start device
Default start device for receiving Default start device for sending data
data from the master to the master
IO Connection
Connection 1 %MW11000 %MW12000
Connection 2 %MW11100 %MW12100
Connection 3 %MW11200 %MW12200
Connection 4 %MW11300 %MW12300
Connection 5 %MW11400 %MW12400
Connection 6 %MW11500 %MW12500
Connection 7 %MW11600 %MW12600
Connection 8 %MW11700 %MW12700
6- 1 8
Chapter 6 Wiring, Communication Setting and Network Construction
4 Reserved Reserved
5 Reserved Reserved
Ethernet
Negative pole for receiving
6 Rx-
data
7 Reserved Reserved
8 Reserved Reserved
DV P50M C11T
D VP5 0M C11T P WR
CANo p e n
RS2 3
2 0 0 0 1 0 2 0 3 0 4 0 5 6
0 0 7
RUN
RUN RS4 8
5
ERR
1 0 1 1 1 2 1 3 1 4 1 5 6
1 1 7
ERR E th e rC A T
SD E th e rn e t 0 0 0 1 0 2 0 3 0 4 0 5 6
0 0 7
HM I
Et h e r CAT E t h e rn e t
CANo p e n
Ethernet
6- 1 9
DVP-50MC Series Motion Controller Operation Manual
Exception
response Indication
code
16#01 Unsupportive function code
6- 2 0
Chapter 6 Wiring, Communication Setting and Network Construction
4 Reserved Reserved
5 Reserved Reserved
Negative pole for receiving EtherCAT
6 Rx-
data
7 Reserved Reserved
8 Reserved Reserved
D V P50MC11T
D VP 50M C11 T PWR CANopen RS232 0 01 02 0
3 04 05 0
6 07
RUN
RUN ERR RS485
1
0 11 12 1
3 14 15 1
6 17
ERR EtherCAT
SD Ethernet 0 01 02 0
3 04 05 0
6 07
A S DA -A2 A SD A-A2 A S DA -A 2
6
Ether CAT Et her nte CANopen
E therC AT
Encoder
1. There is a strict network topology requirement for the EtherCAT network. The network must
follow the rule that the input port of the next servo should be connected to the output port of
the previous servo.
2. Please use Delta cables as EtherCAT cables. For specifications of Delta cables, refer to
Appendix E
6.8.4 EtherCAT Communication Distance
The distance between two adjacent EtherCAT nodes should not exceed 50m.
6- 2 1
DVP-50MC Series Motion Controller Operation Manual
6- 2 2
Chapter 6 Wiring, Communication Setting and Network Construction
4 Reserved Reserved
5 Reserved Reserved
6 Reserved Reserved CANopen
7 CAN_GND 0 VDC
8 Reserved Reserved
Note: One CANopen port connects the CANopen cable and the other port connects the 120Ω terminal resistor.
CAN_H
6
120Ω 120 Ω
CAN_L
CAN node3
6- 2 3
DVP-50MC Series Motion Controller Operation Manual
DVPCOPM-SL
Et he r C AT Et he rne t C A N ope n
TAP-CN02
DVPCP02-H2
C2000 TAP-CN03
ASDA-A2
IFD9503
Modbus
Delta’s standard cables such as UC-DN01Z-01A thick cable, UC-DN01Z-02A thin cable and UC-
CMC010-01A thin cable are recommended to use in construction of a CANopen network. The
communication cable must keep away from the power cable.
The terminal resistor of 120Ω should be connected between CAN_H and CAN_L (white wire and
6 blue wire) of two respective ends of the network. Users can purchase Delta terminal resistor, TAP-
TR01.
6- 2 4
7
Execution Principle
Table of Contents
7- 1
DVP-50MC Series Motion Controller Operation Manual
7.1 Tasks
Tasks are a series of functions of processing specified execution conditions and execution sequences
for I/O refresh and user program execution.
A task is defined with a name, priority level and type. Tasks can be classified into three types, the cyclic
task, freewheeling task and event-triggered task.
For every task, a group of POUs which are triggered by the task can be specified. If the task is executed
in current period, the POUs will be processed within a period of time.
The priority level and task type determine the execution sequence of the task.
A watchdog can be assigned for every task.
Maximum 24 tasks that the motion controller supports are respectively described below.
Cyclic task
The cyclic task will be executed cyclically according to the set time interval.
The way the cyclic task is executed
Prior ity Time i nter val between tasks Time i nterval between task s
High Remaining
Cycl ic tas k Remaining
IO Us er pr ogr am IO User program
i nter val i nterval
IO: IO means I/O refresh. I/O includes local I/O points and left-side and right-side extension
module data and CANopen data. The data can be specified to refresh before the set task is
executed. If not specified, the data will be refreshed during the system processing.
User Program: User Program stands for user program execution which is based on the execution
_7 sequences of programs assigned in a task.
Remaining interval:
When the controller is to perform system processing, the low-priority task is executed first if any
and then the system processing is performed.
System processing:
The controller will perform the system processing which includes Ethernet, RS232 and RS485
communication processing after all task requests are completed.
The four terms mentioned above have the same meanings as those in the following sections.
Note: If the cycle set for a cyclic task is too short, after the user program execution is finished, the
task execution will be repeated immediately and no low-priority task or no system processing
will be executed. In this case, the execution of all tasks will be affected. If the watchdog is set
for the task, the watchdog timeout will occur, the controller will enter Error status and user
program execution will stop. If the watchdog is not set for the task, the controller will not be able
to perform system processing and the problems such as communication timeout will take place.
7- 2
Chapter 7 Introduction of Axis Parameters
Freewheeling task
Freewheeling task: The task will be handled as soon as the program running starts. The task will
be restarted automatically in the next cycle after one execution cycle ends.
The way a freewheeling task is executed
Prior ity Task ex ecution time 1 Tas k execution time 2
High
Freewheeli ng
task IO User pr ogram IO User pr ogram
Note: There is no fixed execution time for the freewheeling task. So the values of task execution time
1 and task execution time 2 may not be equal in the above figure.
Event task: An event task is executed once just when the specified event happens. The timing for
execution of an event task depends on the timing for occurring of the event and the priority level of the
event task.
The way an event task is executed
Tas k ex ecution
condition met
Hi gh
E ven t Task IO User progr am
S ystem S ys tem
pr oc essing pr ocessi ng
Low
The condition for the second-time execution is ignored when the condition required for execution of the
event task is met again before the event task is completed. The period before an event task is completed
is the course while the event task is being executed or is waiting to be executed.
Motion Event
Tasks are performed according to the set SYNC cycle time.
Note: The motion task is set to priority 1 by default. The priority level can be modified. However, make
sure that there is enough time for execution of the motion task within EtherCAT SYNC period.
SYNC cycle setting should meet following conditions.
7- 3
DVP-50MC Series Motion Controller Operation Manual
There must be enough time for execution of the program defined in a motion task.
There must be sufficient time for PDO and SDO data exchange between the controller and
servo drive.
Insufficient SYNC period time will result in the controlled device to fail to receive SYNC signal and
unpredictable operations. Refer to section 7.3 for SYNC period setting.
The task is triggered when rising edge or falling edge of input point signal is detected. The response time
of input points can be set through the filter function.
CANopen bus SYNC message
The task is triggered when SYNC signal is produced at CANopen port of the controller.
Z pulse rising edge for incremental encoder 1
The task is triggered when the rising edge of Z signal of the first encoder is detected at Encoder port of
the controller.
Z pulse rising edge for incremental encoder 2
The task is triggered when the rising edge of Z signal of the second encoder is detected at Encoder port
of the controller.
7.1.2 Priority levels of Tasks
The controller can not perform multiple tasks simultaneously. Every task must be given a priority level and they
are executed according to preset priorities. Priority level can be set within the range of 1 to 24. (1 is the highest
priority and 24 is the lowest priority.) The priority level of each task must be unique. The task with higher priority
takes priority to perform. The high-priority task can interrupt the low-priority task.
We recommend that the task which has a high requirement of real time should be given a high priority and the
task which has a low requirement of real time should be given a low priority. The priority of the default motion
control task built in the CANopen Builder software is 1 by default.
The principle for multi-task execution
When the execution conditions of two tasks are met simultaneously (Cyclic task and
freewheeling task)
_7
Task execution Task execution Task execution Task execution
condition met finished condition met finished
Task execution time Task execution time Task execution time
User
IO User IO User User
Freewh eeling task
( Priorit y 2) P ause P ause IO
program program program program
3 4 7 8
Task execution Task execution Task execution Task execution
Task execution
condition met condition met finished condition met
finished
① The execution conditions for the cyclic task and freewheeling task are met at the same time. The
cyclic task is executed first because of its higher priority.
② When the cyclic task execution is finished, the freewheeling task execution starts.
③ The controller will execute the system processing if there is no other task after the execution of
the freewheeling task is completed.
7- 4
Chapter 7 Introduction of Axis Parameters
④ The execution of the freewheeling task continues since the high-priority cyclic task request has
not arrived.
⑤ The cyclic task interrupts the freewheeling task execution and the controller executes the cyclic
task because of the arrival of the high-priority cyclic task request during the execution of the
freewheeling task.
⑥ The controller continues to execute the part of the low-priority freewheeling task, which has not
been executed yet when the execution of the cyclic task is completed.
⑦ When the execution of the freewheeling task is completed, the controller executes the system
processing due to no other task request.
⑧ When the system processing is completed, the execution of the freewheeling task continues due
to no high-priority cyclic task request.
When three tasks are executed in mixture (Event task, Cyclic task and Freewheeling
task)
Time interval between tasks Time inter val between tas ks Time i nter val between task s
① When the conditions for execution of the freewheeling task and cyclic task are both met, the
freewheeling task is executed first because the priority of the freewheeling task is higher.
② The cyclic task execution starts when the freewheeling task execution is completed.
③ When the cyclic task execution is completed, the controller executes the system processing due
to no other task request.
④ The freewheeling task is executed when the system processing is completed.
⑤ When the freewheeling task execution is completed, the controller executes the system 7_
processing due to no other task request.
⑥ The freewheeling task is executed when the system processing is completed.
⑦ The freewheeling task execution continues because the freewheeling task has a higher priority
than the cyclic task although the execution condition for the cyclic task is met. And the cyclic
task waits to execute.
⑧ The event task interrupts the freewheeling task execution because the event task has the
highest priority and the execution condition for the event task is met.
⑨ The controller continues to execute the part of the low-priority freewheeling task, which has not
been executed yet when the event task execution is completed.
⑩ The freewheeling task execution is completed. The controller executes the cyclic task since the
cyclic task request in ⑦ is not responded yet.
⑪ The cyclic task execution is completed. The controller executes the system processing due to no
other task request.
7- 5
DVP-50MC Series Motion Controller Operation Manual
_7
7- 6
Chapter 7 Introduction of Axis Parameters
Single-axis MC_ReadActualPosition V V V V
instructions MC_ReadStatus V V V V
MC_ReadMotionState V V V V
DMC_ReadParameter_Motion V V V V
DMC_WriteParameter_Motion V V V V
DMC_TouchProbe - - V - 7_
DMC_ChangeMechanismGearRatio - - V -
DMC_Jog - - V -
DMC_MoveVelocity - - V -
DMC_MoveVelocityStopByPos - - V -
DMC_MoveVelocityStopByLinePos - - V -
DMC_ReadPositionLagStatus V V V V
DMC_SwitchSoftLimit V V V V
DMC_TorqueControl - - V -
DMC_TouchProbeCyclically - - V -
DMC_WritePositionLagSetting V V V V
7- 7
DVP-50MC Series Motion Controller Operation Manual
Task type
Event-triggered
Classification Instruction name Cyclic Freewheeling task
task task Motion Motion
task task
MC_GearIn - - V -
MC_GearOut - - V -
MC_CombineAxes - - V -
MC_CamIn - - V -
MC_CamOut - - V -
DMC_CamAddTappet V V V V
Coupling DMC_CamDeleteTappet V V V V
instructions
DMC_CamReadPoint V V V V
DMC_CamWritePoint V V V V
DMC_CamSet - - V -
DMC_CamReadTappetStatus V V V V
DMC_CamReadTappetValue V V V V
DMC_CamWriteTappetValue V V V V
APF_RotaryCut_Init - - V -
Application
APF_RotaryCut_In - - V -
instructions
APF_RotaryCut_Out - - V -
DMC_CartesianCoordinate - - V -
DMC_ReadMFunction V V V V
G code DMC_ResetMFunction V V V V
instructions DMC_SetG0Para V V V V
DMC_SetG1Para V V V V
DMC_SetStartPosition V V V V
_7 DMC_ AddAxisToGroup - - V -
DMC_RemoveAxisFromGroup - - V -
DMC_UngroupAllAxes - - V -
DMC_ GroupEnable - - V -
DMC_GroupStop - - V -
7- 8
Chapter 7 Introduction of Axis Parameters
Task type
Event-triggered
Classification Instruction name Cyclic Freewheeling task
task task Motion Motion
task task
DMC_MoveCircularRelative - - V -
DMC_GroupSetOverride - - V -
DMC_GroupReadActualPosition V V V V
Coordination DMC_ControlAxisByPos - - V -
Instructions DMC_NC - - V -
DMC_ReadParameter_CANopen V V V V
DMC_WriteParameter_CANopen V V V V
ETH_Link_Config V V V V
ETH_Link_Manage V V V V
ETH_Link_Status V V V V
ETH_Link_Config_Ext V V V V
ETH_ SetServerlinkkeeptime V V V V
ETH_Socket_Manage V V V V
ETH_Socket_Config V V V V
ETH_Socket_Open V V V V
ETH_Socket_Send V V V V
Communication ETH_Socket_Receive V V V V
instructions ETH_Socket_Close V V V V
ETH_Socket_Status V V V V
RS485_Link_Manage V V V V
RS485_Link_Config V V V V
RS485_Link_Status V V V V
RS485_RS V V V V
7_
RS485_SetDelayTime V V V V
RS232_Link_Manage V V V V
RS232_Link_Config V V V V
RS232_Link_Status V V V V
RS232_RS V V V V
RS232_SetDelayTime V V V V
7- 9
DVP-50MC Series Motion Controller Operation Manual
The motion control program execution time is the maximum execution time of motion event tasks with the
unit: μs (microsecond) which can be viewed by double clicks on Task on the CANopen Builder software
interface. 1000μs (microseconds) are 1ms (millisecond).
In the actual application, the SYNC cycle time is calculated by rounding the maximum program execution
time up to an integer. For example, the maximum time for program execution is 1567μs=1.5ms, in this case,
we can regard 2ms as the time for program execution.
If the running time of the program is increased too much after the program changes, the preset
synchronization time will not fit any more. So the reserved time should be set to 1~2ms.
For example, the maximum program execution time is 1634μs and there are totally 20 servos in the
application. The reserved time for the program change is 1ms.
Synchronization cycle period= 2ms (obtained by rounding up the maximum program execution time, 1634μs)
_7 +1ms (reserved for a program change)=3ms
! Note
The above method is used for getting an estimated time, which is suitable for most applications. If you need
a more precise synchronization cycle period, the actual time can be recalculated by omitting the reserved
time after the application development is completed.
7- 1 0
8
Logic Instructions
Table of Contents
8.1 of Logic Instructions ....................................................... 8-5
8.2 Explanation of Logic Instructions ............................................. 8-9
8.2.1 EN and ENO ..............................................................................8-9
8.3 Sequence Input /Output Instructions ...................................... 8-9
8.3.1 R_TRIG ....................................................................................8-9
8.3.2 F_TRIG ................................................................................... 8-11
8.3.3 RS ......................................................................................... 8-13
8.3.4 SR ......................................................................................... 8-15
8.3.5 SEMA ..................................................................................... 8-17
8.4 Sequence Control Instructions ............................................... 8-19
8.4.1 JMP ........................................................................................ 8-19
8.5 Data Movement Instructions .................................................. 8-20
8.5.1 MOVE ..................................................................................... 8-20
8.5.2 MoveBit .................................................................................. 8-21
8.5.3 TransBit .................................................................................. 8-23
8.5.4 MoveDigit ............................................................................... 8-25
8.5.5 Exchange ................................................................................ 8-27
8.5.6 Swap ..................................................................................... 8-29
8.6 Comparison Instructions ........................................................ 8-31
8.6.1 LT .......................................................................................... 8-31
8.6.2 LE .......................................................................................... 8-33
8.6.3 GT ......................................................................................... 8-35
8.6.4 GE ......................................................................................... 8-37
8.6.5 EQ ......................................................................................... 8-39
8.6.6 NE ......................................................................................... 8-41
8.7 Timer Instructions .................................................................. 8-43
8.7.1 TON ....................................................................................... 8-43
8.7.2 TOF........................................................................................ 8-45
8.7.3 TP.......................................................................................... 8-47
8.7.4 Sys_ReadTime......................................................................... 8-49
8.7.5 Sys_ReadTotalWorkTime ........................................................... 8-50
8.7.6 Sys_ReadPowerOnTime ............................................................ 8-51
8.7.7 Sys_WdgStatus ....................................................................... 8-52
8.8 Counter Instructions .............................................................. 8-54
8.8.1 CTU ....................................................................................... 8-54
8.8.2 CTD ....................................................................................... 8-56
8.8.3 CTUD ..................................................................................... 8-58
8- 1
DVP-50MC Series Motion Controller Operation Manual
8- 2
Chapter 8 Logic Instructions
8- 3
DVP-50MC Series Motion Controller Operation Manual
_8
8- 4
Chapter 8 Logic Instructions
LT Less Than
EQ Equal to
NE Not Equal to
TP Pulse-type Timer
CTU Up-Counter
ADD Addition
Math Instructions
SUB Subtraction
8- 5
DVP-50MC Series Motion Controller Operation Manual
MUL Multiplication
DIV Division
Integer Modulo Division to Get the
MOD
Remainder
Real-Number Modulo Division to Get the
MODREAL
Remainder
Real-Number Modulo Division to Get
MODTURNS
Signed Integral Part
Real-Number Modulo Division to Get the
MODABS
Unsigned Modulo Value
ABS Absolute value
SIN Sine
COS Cosine
TAN Tangent
LN Natural Logarithm
EXPT Exponentiation
TRUNC Truncate
OR Logical OR
8- 6
Chapter 8 Logic Instructions
MAX Maximum
MIN Minimum
SEL Selection
LIMIT Limiter
8- 7
DVP-50MC Series Motion Controller Operation Manual
TO Write Value to CR
Immediate Refresh ImmediateInput Immediate Refresh of Input Points
Instructions
ImmediateOutput Immediate Refresh of Output Points
Enable/disable left-side module device
Left_Manage
mapping
PID PID operation
PID-related
Instructions GPWM Basic pulse width tuning
8- 8
Chapter 8 Logic Instructions
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input
CLK Input Rising edge trigger signal TRUE or FALSE
signal
Output
Q Output Output for a period TRUE or FALSE
signal
Boolean BOOL
String
Real
Bit string Integer Time, date
number
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
8_
CLK ● 8_
Q ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
When CLK of R_TRIG changes from FALSE to TRUE, Q output is TRUE for only one period. In other
circumstances, Q is FALSE.
Precautions for Correct Use
Q will have no output until the rising edge signal at CLK is detected.
Programming Example
8- 9
DVP-50MC Series Motion Controller Operation Manual
R_TRG
R_ TRIG 1
R_TRG_ EN EN ENO
R_TRG_CLK CLK Q R_TRG _Q
Timing Chart:
R_TRG_CLK
R_TRG _Q
_8
8- 1 0
Chapter 8 Logic Instructions
8.3.2 F_TRIG
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB F_TRIG is used for the falling edge trigger. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
F_TRIG _inst ance
F_TRI G
EN E NO
CL K Q
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input
CLK Input Falling edge trigger signal TRUE or FALSE
signal
Output
Q Output Output for a period TRUE or FALSE
signal
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
CLK ●
Q ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
When CLK of F_TRIG changes from TRUE to FALSE, Q output is TRUE for only one period. In other
circumstances, Q is FALSE.
Precautions for Correct Use
Q will have no output until the falling edge signal at CLK is detected.
Programming Example 8_
The variable table and program
8_
Variable name Data type Initial value
F_TRG F_TRIG
F_TRG_EN BOOL FALSE
F_TRG_CLK BOOL FALSE
F_TRG_Q BOOL
F_TRG
F_TRI G 1
F_TRG_EN EN E NO
F_TRG_CLK CLK Q F_TRG_Q
8- 11
DVP-50MC Series Motion Controller Operation Manual
Timing Chart:
F_TRG_CLK
F_TRG_Q
_8
8- 1 2
Chapter 8 Logic Instructions
8.3.3 RS
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB RS is used for giving priority to the Reset input. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
RS _in st anc e
RS
EN E NO
SET Q
Rese t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input Input
SET SET signal TRUE or FALSE
signal
Input Input
Reset Reset signal TRUE or FALSE
signal
Output
Q Output Output signal TRUE or FALSE
signal
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
SET ●
Reset ●
Q ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
When the SET and Reset inputs of RS are both TRUE, Reset is given the priority.
Programming Example 8_
The variable table and program 8_
Variable name Data type Initial value
RS1 RS
RS1_EN BOOL FALSE
RS1_SET BOOL FALSE
RS1_Reset BOOL FALSE
RS1_Q BOOL
8- 1 3
DVP-50MC Series Motion Controller Operation Manual
RS 1
RS 1
RS1 _EN EN ENO
RS1_ SET SE T Q RS 1_Q
RS1 _Reset Res et
Timing Chart:
Case 1 Case 2
RS1_ SET
RS1 _Reset
RS1 _Q
Case 1: When RS1_SET is TRUE, the output RS1_Q is TRUE. If RS1_Reset is TRUE, RS1_Q is
FALSE.
Case 2: When RS1_Reset is TRUE, RS1_Q is always FALSE.
_8
8- 1 4
Chapter 8 Logic Instructions
8.3.4 SR
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB SR is used for giving priority to the Set input. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
S R_in st anc e
SR
EN E NO
SET Q
Rese t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input Input
SET SET signal TRUE or FALSE
signal
Input Input
Reset Reset signal TRUE or FALSE
signal
Output
Q Output Output signal TRUE or FALSE
signal
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
SET ●
Reset ●
Q ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
When the SET and Reset inputs of RS are both TRUE, SET is given the priority.
8_
8_
8- 1 5
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The variable table and program
Variable name Data type Initial value
SR1 SR
SR1_EN BOOL FALSE
SR1_SET BOOL FALSE
SR1_Reset BOOL FALSE
SR1_Q BOOL
SR 1
SR 1
S R1 _EN EN ENO
S R1_SET SE T Q SR1_Q
SR1_Res et Res et
Timing Chart:
Cas e 1 Cas e 2
SR1_SE T
SR1_Res et
SR1_Q
Case 1: When SR1_SET is TRUE, SR1_Q is TRUE. When SR1_Reset is TRUE, SR1_Q is
FALSE.
Case 2: SR1_SET is given the priority when SR1_SET and SR1_Reset are both TRUE.
_8
8- 1 6
Chapter 8 Logic Instructions
8.3.5 SEMA
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
SEMA is used for giving priority to CLAIM. (The output
FB DVP50MC11P/DVP50MC11P-06
will be valid in the second period.)
DVP50MC11T-04S/DVP50MC11T-16S
SEMA_ in sta nce
SE MA
EN E NO
CL AIM Q
RELEA SE
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input Input
CLAIM Set signal TRUE or FALSE
signal
Input Input
RELEASE Reset signal TRUE or FALSE
signal
Output
Q Output Output signal TRUE or FALSE
signal
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
CLAIM ●
RELEASE ●
Q ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
When CLAIM of SEMA is TRUE, Q is TRUE. When RELEASE is TRUE, Q is FALSE. When CLAIM and
RELEASE are both TRUE, Q is TRUE.
8_
8_
Precautions for Correct Use
When CLAIM is TRUE, Q will be TRUE in the second period.
8- 1 7
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The variable table and program
Variable name Data type Initial value
SEMA1 SEMA
SEMA1_EN BOOL FALSE
SEMA1_CLAIM BOOL FALSE
SEMA1_RELEASE BOOL FALSE
SEMA1_Q BOOL
S EMA1
SEMA 1
SEMA 1_EN EN ENO
S EMA1_ CL AIM CLA IM Q SE MA1_Q
SEMA1 _RELEA SE RE LEAS E
Timing Chart:
Ca se 1 Ca se 2
S EMA1_ CL AIM
SEMA1 _RELEA SE
SEMA 1_Q
Case 1: When SEMA1_CLAIM is TRUE, SEMA1_Q is TRUE in the second period. When
SEMA1_RELEASE is TRUE, SEMA1_Q changes to FALSE immediately.
Case 2: When SEMA1_CLAIM is TRUE, SEMA1_Q is TRUE in the second period no matter
whether SEMA1_RELEASE is TRUE or FALSE.
_8
8- 1 8
Chapter 8 Logic Instructions
LA BEL
JMP
Function Explanation
JMP is used for jumping to any position specified by a label in the LD program.
Precautions for Correct Use
Label is any string.
A key word can not be specified as a label.
JMP can be used for an upward jump.
More than one JMP instruction can jump to the same label.
The label positions to which JMP instructions jump must be in the same POU in the LD program.
Otherwise, the jump will not take effect.
Programming Example
Variable table
Variable name Data type Current value
Start BOOL TRUE
Start1 BOOL TRUE
Out1 BOOL FALSE
Start2 BOOL TRUE
Out2 BOOL TRUE
Program
1 Start S TE P1
J MP
2 St art1 O ut1
S
8_
3 S TE P1 8_
St art2 Ou t2
STEP1 is taken as the jump label of JMP instruction in the program above. When Start changes to
TRUE, JMP instruction will jump to the position of STEP1 label and the program of network 3 will be
executed.
When Start2 changes to TRUE, Out2 will also change to TRUE; the program of network 2 will not be
executed. When Start changes to FALSE, the programs from network 1 to network 3 will all be executed.
8- 1 9
DVP-50MC Series Motion Controller Operation Manual
MO VE
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input Depends on the data type of the variable
In Input Move Source
signal that the input parameter is connected to.
Output Depends on the data type of the variable
Out Output Move destination
signal that the output parameter is connected to.
Boolean BOOL
String
Real
Bit string Integer Time, date
number
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The Move instruction moves the value of move source In to move destination Out.
The instruction supports the transmission of the values of array elements.
Precautions for Correct Use
The data type of Out must be the same as that of In. Otherwise, an error will occur in the compiling of
the software.
_8
Programming Example
The variable table and program
Variable name Data type Current value
MOVE_EN BOOL TRUE
MOVE_In INT 200
Out1 INT 200
MOVE 1
MOV E_EN EN ENO
MO VE_In In Out Out 1
8- 2 0
Chapter 8 Logic Instructions
8.5.2 MoveBit
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FC MoveBit is used for sending one bit value in a string. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
MoveB it
EN ENO
In
InPos
InOutPos
InOut
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input Depends on the data type of the variable
In Input Move source
signal that the input parameter is connected to.
Input Depends on the data type of the variable
InPos Input Move source bit
signal that the input parameter is connected to.
Input Depends on the data type of the variable
InOutPos Input Move destination bit
signal that the input parameter is connected to.
Input Depends on the data type of the variable
InOut Input Move destination
signal that the input parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
In ● ● ● ● ● ● ● ● STRING
InPos ●
InOutPos ●
InOut ● ● ● ● ● ● ● ● 8_
Note: 8_
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
MoveBit moves one bit value from the bit position InPos in move source In to the bit position InOutPos in
move destination InOut.
Precautions for Correct Use
The instruction has no ouput but input.
If the value of InPos exceeds the range of the data type of In, the movement of one bit is not
performed.
If the value of InOutPos exceeds the range of the data type of InOut, the movement of one bit is not
performed.
8- 2 1
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The variable table and program
Variable name Data type Current value
MovBit_EN BOOL TRUE
MovBit_In USINT 31
MovBit_Inpos UINT 2
MovBit_InOutPos UINT 3
MovBit_Inout USINT 8
Mo veBit 1
MovB it _EN EN ENO
Mov Bit_In In
MovBit_InP os InPos
Mov Bit _InOutP os InO utPos
MovBit_I nOut InO ut
Move Figure
bit7 bit0
M ovBit_InOut 0 0 0 0 1 0 0 0
_8
8- 2 2
Chapter 8 Logic Instructions
8.5.3 TransBit
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
TransBit is used for sending one or more bits in a bit
FC DVP50MC11P/DVP50MC11P-06
string.
DVP50MC11T-04S/DVP50MC11T-16S
TransBit
EN ENO
In
InPos
InOutPos
Size
InOut
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input Depends on the data type of the variable
In Input Move source
signal that the input parameter is connected to.
Input Depends on the data type of the variable
InPos Input Move source bit
signal that the input parameter is connected to.
Input Input Depends on the data type of the variable
InOutPos Move destination bit
signal that the input parameter is connected to.
Input Input Depends on the data type of the variable
Size Number of bits to move
signal that the input parameter is connected to.
Input Input Depends on the data type of the variable
InOut Move destination
signal that the input parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ● ● ● ● ●
InPos ●
●
InOutPos
8_
Size ● 8_
InOut ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
TransBit moves data of Size bits from the bit InPos in move source In to the bit InOutPos in move
destination InOut.
Precautions for Correct Use
The instruction has no output but input.
The movement can not be performed if the value of Size is 0.
If the value of InPos exceeds the range of the data type of In, the movement is not performed.
8- 2 3
DVP-50MC Series Motion Controller Operation Manual
If the value of InOutPos exceeds the range of the data type of InOut, the movement is not
performed.
If the value of Size exceeds the range, the movement is not performed.
Programming Example
The variable table and program
Variable name Data type Current value
TrsBit_EN BOOL TRUE
TrsBit_In USINT 63
TrsBit_InPos UINT 1
TrsBit_InOutPos UINT 2
TrsBit_Size UINT 2
TrsBit_Inout USINT 12
Trans Bit 1
TrsBit_EN EN ENO
TrsB it_I n In
Trs Bit_InPos I nPos
TrsBit_I nOutPos InOut Pos
TrsB it_S iz e Size
Trs Bit_InOut InOut
Move Figure
TrsBit_InPos =UINT #1
bit7 bit0
Trs Bit_In 1 1 1 1 1 1 1 1
TrsBit_Siz e= UINT#2
bit7 bit0
Trs Bi t_InOut 0 0 0 0 1 1 0 0
_8
8- 2 4
Chapter 8 Logic Instructions
8.5.4 MoveDigit
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FC MoveDigit is used for moving digits. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
MoveDigit
EN ENO
In
In Pos
InOu tPos
Size
InO ut
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input Depends on the data type of the variable
In Input Move source
signal that the input parameter is connected to.
Input Position of digit in In to Depends on the data type of the variable
InPos Input
signal move that the input parameter is connected to.
Input Position of digit in Out to Depends on the data type of the variable
InOutPos Input
signal receive the digit that the input parameter is connected to.
Input Depends on the data type of the variable
Size Input Number of digits to move
signal that the input parameter is connected to.
Input Depends on the data type of the variable
InOut Input Move destination
signal that the input parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ● ● ● ● ●
InPos ●
InOutPos ● 8_
Size ● 8_
InOut ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
MoveDigit moves Size digits from InPos of move source In to InOutPos of move destination InOut.
Precautions for Correct Use
The instruction has no output but input parameter.
The move can not be performed if the value of Size is 0.
If the value of InPos exceeds the range of the data type of In, the move will not be performed.
8- 2 5
DVP-50MC Series Motion Controller Operation Manual
If the value of InOutPos exceeds the range of the data type of InOut, the movement is not
performed.
If the value of Size exceeds the range, the movement is not performed.
Programming Example
The variable table and program
Variable name Data type Current value
MovDigt_EN BOOL TRUE
MovDigt_In UDINT 16#1234
MovDigt_InPos UINT 1
MovDigt_InOutPos UINT 2
MovDigt_Size UINT 2
MovDigt_Inout UDINT 16#2300
MoveDigit 1
MovDigt_EN EN ENO
Mov Digt_I n In
MovDigt _InPos I nPos
Mov Digt_InO utPos InOut Pos
Mov Digt_Siz e Size
MovDigt_InOut InOut
Move Figure
In=16#1234 0 0 0 1 0 0 1 0 0 0 1 1 0 1 0 0
InPos =1
Digi t 3 Digit 2 Digit 1 Di git 0
Size=2
InOut=16#2300 0 0 1 0 0 0 1 1 0 0 0 0 0 0 0 0
_8
8- 2 6
Chapter 8 Logic Instructions
8.5.5 Exchange
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FC Exchange is used for the data exchange. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
Exchange
EN ENO
In1
In2
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input Depends on the data type of the variable
In1 Input Data to exchange
signal that the input parameter is connected to.
Input Depends on the data type of the variable
In2 Input Data to exchange
signal that the input parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
In2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The Exchange instruction exchanges the values of In1 and In2.
Precautions for Correct Use
The data types of In1 and In2 must be same.
The instruction has no output but two input parameters.
Programming Example 8_
The variable table and program 8_
Variable name Data type Current value
Exchg_EN BOOL TRUE
Exchg_In1 INT 30
Exchg_In2 INT 10
Ex change 1
Ex chg_EN EN ENO
Ex chg_I n1 In1
Ex chg_I n2 In2
8- 2 7
DVP-50MC Series Motion Controller Operation Manual
Exchange Figure
In pu t pa ra mete r In pu t va lu e Ex c hange In pu t val ue In pu t pa ra mete r
While the Exchange instruction is executed, the values of Exchg_In1 and Exchg_In2 are always
exchanged.
_8
8- 2 8
Chapter 8 Logic Instructions
8.5.6 Swap
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
Swap is used for swapping the high byte and low byte
FC DVP50MC11P/DVP50MC11P-06
of a 16-bit value.
DVP50MC11T-04S/DVP50MC11T-16S
Swap
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input
In Input Data to swap 0~65535 for word data type
signal
Output
Out Output Result 0~65535 for word data type
signal
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ●
Out ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The Swap instruction exchanges the high byte and low byte of the value of In and the result is output to
Out.
Programming Example
The variable table and program
Variable name Data type Current value
Swap_EN BOOL TRUE 8_
Swap_In UINT 32768
8_
Out1 UINT 128
Swap 1
Swap_ EN EN ENO
Swap_In In O ut O ut1
8- 2 9
DVP-50MC Series Motion Controller Operation Manual
Swap Figure
Hi gh byte L ow byte
Swap_I n 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
bit15 bit0
bit15 bit0
Out 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0
_8
8- 3 0
Chapter 8 Logic Instructions
LT
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The number of comparison data can be
Depends on the data type
increased or decreased through the
Comparison of the variable that the
In1 to InN Input programming software. Maximum: 8.
data input parameter is
Minimum: 2. That is N=2~8.
connected to.
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
InN
Out ●
Note: 8_
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type. 8_
Function Explanation
LT is used for a less-than comparison of two or more variables or constants. if In1<In2<…<InN, Out
is TRUE. Otherwise, Out is FALSE.
The input parameters In1~InN are allowed to be the variables of different data types in this
instruction when the data types of input variables are not BOOL, TIME, DATE, TOD and STRING.
When the data type of one input variable is one of BOOL, TIME, DATE, TOD and STRING, input
parameters In1~InN are all required to be of the data type. For example, if the data type of In1 is
TIME, the data type of In2~InN must be TIME. Otherwise, an error will occur in the compiling of the
software.
Precautions for Correct Use
8- 3 1
DVP-50MC Series Motion Controller Operation Manual
The input variables are not allowed to omit. An error will occur during the compiling of the software
if any input variable is omitted. But the output variable is allowed to omit.
The data type of output variables must be BOOL. Otherwise, an error will occur during the
compiling of the software.
Programming Example
The data types of LT_In1, LT_In2 and LT_In3 are INT, UINT and DINT respectively and the
data type of Out1 is BOOL.
Out1 changes to TRUE when the values of LT_In1, LT_In2 and LT_In3 are -10, 50 and 100
respectively and LT_EN changes to TRUE as shown in Variable 1.
Out1 changes to FALSE when the values of LT_In1, LT_In2 and LT_In3 are 20, 10 and 100
respectively and LT_EN changes to TRUE as shown in Variable 2.
Variable 1
Variable name Data type Current value
LT_EN BOOL TRUE
LT_In1 INT -10
LT_In2 UINT 50
LT_In3 DINT 100
Out1 BOOL TRUE
Variable 2
Variable name Data type Current value
LT_EN BOOL TRUE
LT_In1 INT 20
LT_In2 UINT 10
LT_In3 DINT 100
Out1 BOOL FALSE
The Program
LT 1
LT_EN EN ENO
LT_ In1 In 1 O ut Out1
LT_ In2 In 2
LT_ In3 In 3
The data types of LT_In1 and LT_In2 are both TIME and the data type of Out1 is BOOL.
Out1 changes to TRUE when the values of LT_In1 and LT_In2 are T#1ms and T#50ms respectively
and LT_EN is TRUE.
The variable table and program
Variable name Data type Current value
_8 LT_EN BOOL TRUE
LT_In1 TIME T#1ms
LT_In2 TIME T#50ms
Out1 BOOL TRUE
LT 1
LT_ EN EN ENO
LT_ In1 In 1 O ut Out1
LT_ In2 In 2
8- 3 2
Chapter 8 Logic Instructions
8.6.2 LE
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
LE is used for a less- than or equal comparison of two
FC DVP50MC11P/DVP50MC11P-06
or more variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S
LE
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The number of comparison data can be
Depends on the data type
increased or decreased through the
Comparison of the variable that the
In1 to InN Input programming software. Maximum: 8.
data input parameter is
Minimum: 2. That is N=2 ~ 8.
connected to.
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
InN
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type. 8_
Function Explanation
8_
LE is used for a less than or equal comparison of two or more variables or constants. if In1 ≤
In2≤ … ≤ InN, Out is TRUE. Otherwise, Out is FALSE.
The input parameters In1~InN are allowed to be the variables of different data types in this
instruction when the data types of input variables are not BOOL, TIME, DATE, TOD and STRING.
When the data type of one input variable is one of BOOL, TIME, DATE, TOD and STRING, input
parameters In1~InN are all required to be of the data type. For example, if the data type of In1 is
TIME, the data type of In2~InN must be TIME. Otherwise, an error will occur in the compiling of the
software.
8- 3 3
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The data types of LE_In1, LE_In2 and LE_In3 are INT, UINT and DINT respectively and the
data type of Out1 is BOOL.
Out1 changes to TRUE when the values of LE_In1, LE_In2 and LE_In3 are -10, 50 and 50
respectively and LE_EN changes to TRUE as shown in Variable 1.
Out1 changes to FALSE when the values of LE_In1, LE_In2 and LE_In3 are 20, 10 and 100
respectively and LE_EN changes to TRUE as shown in Variable 2.
Variable 1
Variable name Data type Current value
LE_EN BOOL TRUE
LE_In1 INT -10
LE_In2 UINT 50
LE_In3 DINT 50
Out1 BOOL TRUE
Variable 2
Variable name Data type Current value
LE_EN BOOL TRUE
LE_In1 INT 20
LE_In2 UINT 10
LE_In3 DINT 100
Out1 BOOL FALSE
The Program
LE 1
LE _EN EN ENO
L E_In1 I n1 O ut Out 1
L E_In2 I n2
L E_In3 I n3
The data types of LE_In1 and LE_In2 are both TIME and the data type of Out1 is BOOL.
Out1 changes to TRUE when the values of LE_In1 and LE_In2 are T#1ms and T#50ms respectively
and LE_EN is TRUE.
_8 The variable table and program
Variable name Data type Current value
LE_EN BOOL TRUE
LE_In1 TIME T#1ms
LE_In2 TIME T#50ms
Out1 BOOL TRUE
LE 1
LE _EN EN ENO
L E_In1 I n1 O ut Out 1
L E_In2 I n2
8- 3 4
Chapter 8 Logic Instructions
8.6.3 GT
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
GT is used for a greater-than comparison of two or more
FC DVP50MC11P/DVP50MC11P-06
variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S
GT
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The number of comparison data can be Depends on the data type
Comparison increased or decreased through the of the variable that the
In1 to InN Input
data programming software. Maximum: 8. input parameter is
Minimum: 2. That is N=2 ~ 8. connected to.
Depends on the data type
Comparison of the variable that the
Out Output Comparison result
result output parameter is
connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
InN
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
8_
Function Explanation
8_
LE is used for a greater than comparison of two or more variables or constants. if In1>In2>…>InN,
Out is TRUE. Otherwise, Out is FALSE.
The input parameters In1~InN are allowed to be the variables of different data types in this
instruction when the data types of input variables are not BOOL, TIME, DATE, TOD and STRING.
When the data type of one input variable is one of BOOL, TIME, DATE, TOD and STRING, input
parameters In1~InN are all required to be of the data type. For example, if the data type of In1 is
TIME, the data type of In2~InN must be TIME. Otherwise, an error will occur in the compiling of the
software.
8- 3 5
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The data types of GT_In1, GT_In2 and GT_In3 are INT, UINT and DINT respectively and the
data type of Out1 is BOOL.
Out1 changes to TRUE when the values of GT_In1, GT_In2 and GT_In3 are 100, 50 and 10
respectively and GT_EN changes to TRUE as shown in Variable 1.
Out1 changes to FALSE when the values of GT_In1, GT_In2 and GT_In3 are 20, 10 and 100
respectively and GT_EN changes to TRUE as shown in Variable 2.
Variable 1
Variable name Data type Current value
GT_EN BOOL TRUE
GT _In1 INT 100
GT _In2 UINT 50
GT _In3 DINT 10
Out1 BOOL TRUE
Variable 2
Variable name Data type Current value
GT_EN BOOL TRUE
GT _In1 INT 20
GT _In2 UINT 10
GT _In3 DINT 100
Out1 BOOL FALSE
The Program
GT 1
G T_EN EN ENO
GT_In1 I n1 O ut Out 1
GT_In2 I n2
GT_In3 I n3
The data types of GT_In1 and GT_In2 are both TIME and the data type of Out1 is BOOL.
Out1 changes to TRUE when the values of GT_In1 and GT_In2 are T#100ms and T#50ms
respectively and GT_EN changes to TRUE.
_8
The variable table and program
Variable name Data type Current value
GT_EN BOOL TRUE
GT _In1 TIME T#100ms
GT _In2 TIME T#50ms
Out1 BOOL TRUE
GT 1
G T_EN EN ENO
GT_In1 I n1 O ut Out 1
GT_In2 I n2
8- 3 6
Chapter 8 Logic Instructions
8.6.4 GE
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
GE is used for a greater- than or equal comparison of two
FC DVP50MC11P/DVP50MC11P-06
or more variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S
GE
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The number of comparison data can be
Depends on the data type
increased or decreased through the
Comparison of the variable that the
In1 to InN Input programming software. Maximum: 8.
data input parameter is
Minimum: 2. That is N=2 ~ 8.
connected to.
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
InN
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
8_
Function Explanation
8_
GE is used for a greater than or equal comparison of two or more variables or constants. if In1 ≥
In2 ≥ … ≥ InN, Out is TRUE. Otherwise, Out is FALSE.
The input parameters In1~InN are allowed to be the variables of different data types in this
instruction when the data types of input variables are not BOOL, TIME, DATE, TOD and STRING.
When the data type of one input variable is one of BOOL, TIME, DATE, TOD and STRING, input
parameters In1~InN are all required to be of the data type. For example, if the data type of In1 is
TIME, the data type of In2~InN must be TIME. Otherwise, an error will occur in the compiling of the
software.
8- 3 7
DVP-50MC Series Motion Controller Operation Manual
The input variables are not allowed to omit. An error will occur during the compiling of the software
if any input variable is omitted. But the output variable is allowed to omit.
The data type of output variables must be BOOL. Otherwise, an error will occur during the
compiling of the software.
Programming Example
The data types of GE_In1, GE_In2 and GE_In3 are INT, UINT and DINT respectively and the
data type of Out1 is BOOL.
Out1 changes to TRUE when the values of GE_In1, GE_In2 and GE_In3 are 100, 50 and 50
respectively and GE_EN changes to TRUE as shown in Variable 1.
Out1 changes to FALSE when the values of GE_In1, GE_In2 and GE_In3 are 10, 10 and 100
respectively and GE_EN changes to TRUE as shown in Variable 2.
Variable 1
Variable name Data type Current value
GE_EN BOOL TRUE
GE_In1 INT 100
GE_In2 UINT 50
GE_In3 DINT 50
Out1 BOOL TRUE
Variable 2
Variable name Data type Current value
GE_EN BOOL TRUE
GE_In1 INT 10
GE_In2 UINT 10
GE_In3 DINT 100
Out1 BOOL FALSE
The program
GE 1
G E_E N EN ENO
GE_I n1 In1 Out O ut1
GE_I n2 In2
GE_I n3 In3
The data types of GE_In1 and GE_In2 are both TIME and the data type of Out1 is BOOL.
Out1 changes to TRUE when the values of GE_In1 and GE_In2 are T#100ms and T#50ms
respectively and GE_EN changes to TRUE.
8- 3 8
Chapter 8 Logic Instructions
8.6.5 EQ
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
EQ is used for an equal comparison of two or more
FC DVP50MC11P/DVP50MC11P-06
variables and constants.
DVP50MC11T-04S/DVP50MC11T-16S
EQ
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The number of comparison data can be
Depends on the data type
increased or decreased through the
Comparison of the variable that the
In1 to InN Input programming software. Maximum: 8.
data input parameter is
Minimum: 2. That is N=2 ~ 8.
connected to.
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
InN
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation 8_
8_
EQ is used for an equal comparison of two or more variables and constants. If In1 = In2 = … = InN,
Out is TRUE. Otherwise, Out is FALSE.
The input parameters In1~InN are allowed to be the variables of different data types in this
instruction when the data types of input variables are not BOOL, TIME, DATE, TOD and STRING.
When the data type of one input variable is one of BOOL, TIME, DATE, TOD and STRING, input
parameters In1~InN are all required to be of the data type. For example, if the data type of In1 is
TIME, the data type of In2~InN must be TIME. Otherwise, an error will occur in the compiling of the
software.
8- 3 9
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The data types of EQ_In1, EQ_In2 and EQ_In3 are INT, UINT and DINT respectively and the
data type of Out1 is BOOL.
Out1 changes to TRUE when the values of EQ_In1, EQ_In2 and EQ_In3 are 50, 50 and 50
respectively and EQ_EN changes to TRUE as shown in Variable 1.
Out1 changes to FALSE when the values of EQ_In1, EQ_In2 and EQ_In3 are 10, 50 and 100
respectively and EQ_EN changes to TRUE as shown in Variable 2.
Variable 1
Variable name Data type Current value
EQ_EN BOOL TRUE
EQ _In1 INT 50
EQ _In2 UINT 50
EQ _In3 DINT 50
Out1 BOOL TRUE
Variable 2
Variable name Data type Current value
EQ_EN BOOL TRUE
EQ _In1 INT 10
EQ _In2 UINT 50
EQ _In3 DINT 100
Out1 BOOL FALSE
The Program
EQ 1
EQ _EN EN E NO
E Q_In 1 In1 Out Ou t1
E Q_In 2 I n2
E Q_In 3 In3
The data types of EQ_In1 and EQ_In2 are both TIME and the data type of Out1 is BOOL.
Out1 changes to TRUE when the values of EQ_In1 and EQ_In2 are T#50ms and T#50ms
respectively and EQ_EN changes to TRUE.
_8 The variable table and program
Variable name Data type Current value
EQ_EN BOOL TRUE
EQ _In1 TIME T#50ms
EQ _In2 TIME T#50ms
Out1 BOOL TRUE
EQ 1
EQ _EN EN E NO
E Q_In 1 In1 Out Ou t1
E Q_In 2 I n2
8- 4 0
Chapter 8 Logic Instructions
8.6.6 NE
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
NE is used for a not-equal comparison of two variables
FC DVP50MC11P/DVP50MC11P-06
or constants.
DVP50MC11T-04S/DVP50MC11T-16S
NE
EN ENO
In1 Ou t
In2
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Comparison Depends on the data type of the variable
In1 Input A value to compare
data that the input parameter is connected to.
Comparison Depends on the data type of the variable
In2 Input A value to compare
data that the input parameter is connected to.
Comparison Depends on the data type of the variable
Out Output Comparison result
result that the output parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
and ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
In2
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
NE is used for a not-equal comparison of two variables and constants. Out is TRUE if In1ǂIn2.
Otherwise, Out is FALSE.
The input parameters In1 and In2 are allowed to be the variables of different data types in this 8_
instruction when the data types of input variables are not BOOL, TIME, DATE, TOD and STRING. 8_
When the data type of one input variable is one of BOOL, TIME, DATE, TOD and STRING, input
parameters In1 and In2 are both required to be of the data type. For example, if the data type of In1
is TIME, the data type of In2 must be TIME. Otherwise, an error will occur in the compiling of the
software.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software
if any input variable is omitted. But the output variable is allowed to omit.
The data type of output variables must be BOOL. Otherwise, an error will occur during the
compiling of the software.
8- 4 1
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The data types of NE_In1 and NE_In2 are INT and DINT respectively and the data type of
Out1 is BOOL.
Out1 changes to TRUE when the values of NE_In1 and NE_In2 are 100 and 50 respectively and NE
_EN changes to TRUE as shown in Variable 1.
Out1 changes to FALSE when the values of NE_In1 and NE _In2 are 100 and 100 respectively and
NE_EN changes to TRUE as shown in Variable 2.
Variable 1
Variable name Data type Current value
NE_EN BOOL TRUE
NE _In1 INT 100
NE _In2 UINT 50
Out1 BOOL TRUE
Variable 2
Variable name Data type Current value
NE_EN BOOL TRUE
NE _In1 INT 100
NE _In2 UINT 100
Out1 BOOL FALSE
The Program
NE 1
NE_ EN EN ENO
NE_ In1 In 1 O ut Out1
NE_ In2 In2
The data types of NE_In1 and NE_In2 are both TIME and the data type of Out1 is BOOL.
Out1 changes to TRUE when the values of NE_In1 and NE_In2 are T#10ms and T#50ms
respectively and NE_EN changes to TRUE.
8- 4 2
Chapter 8 Logic Instructions
Parameters
Parameter Input/
Meaning Description Valid range
name Output
In Timer input Input Controls the timer to start or reset TRUE or FALSE
Time from when the timer starts until Q
PT Set time Input
changes to TRUE.
Q is TRUE when the set time PT is
Q Timer output Output TRUE or FALSE
reached.
ET Elapsed time Output Elapsed time from the time when the timer
starts to current time.
T#0ms ~ 213503d23h34m33s709.551ms
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ●
PT ●
Q ●
ET ●
8_
Note: 8_
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The TON instruction is defined as the function of a timer for the ON delay.
When In is TRUE, the timer starts to measure the time and the value of ET increases accordingly.
When ET equals PT, Q is TRUE. When In is set to FALSE, the measuring of the time stops and Q
and ET are both reset.
Precautions for Correct Use
When the output value of ET reaches the set value of PT, the timer stops measuring time. ET is reset to
0 (0ns) when In changes from TRUE to FALSE.
8- 4 3
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The variable table and program
Variable name Data type Initial value
TON1 TON
TON1_EN BOOL FALSE
TON1_In BOOL FALSE
TON1_PT TIME
TON1_Q BOOL
TON1_ET TIME
TON1
TO N 1
TO N1_EN EN ENO
TON1_ In In Q TON1_Q
TO N1_PT PT ET TON1_E T
Timing Chart:
Case 1 Case 2
TON1_I n
TON1_PT
TO N1_ET
TON1_ Q
Case 1: TON1_PT is the set time. When TON1_In is TRUE, the timer starts to measure the
time. When the value of TON1_ET equals the setting value of TON1_PT, TON1_Q is
TRUE. When the timer stops measuring time, TON1_In is reset to FALSE and
TON1_ET and TON1_Q are both reset.
Case 2: When the currently measured time of the timer TON1_ET is less than the set time
TON1_PT and TON1_In is reset to FALSE, TON1_ET is reset and the state of TON1_Q
does not change.
_8
8- 4 4
Chapter 8 Logic Instructions
8.7.2 TOF
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB TOF is used for the off delay. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
TOF_instance
TOF
EN E NO
In Q
PT ET
Parameters
Parameter Input/
Meaning Description Valid range
name Output
In Timer input Input Controls the timer to start or reset TRUE or FALSE
Set the time from when the timer starts
PT Set time Input
until Q changes to TRUE
Q is FALSE when the set time PT is
Q Timer output Output TRUE or FALSE
reached.
Elapsed time from the time when the timer
ET Elapsed time Output
starts to current time.
T#0ms ~ 213503d23h34m33s709.551ms
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ●
PT ●
Q ●
ET ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation 8_
The TOF instruction is defined as the function of a timer for the OFF delay.
8_
When In is TRUE, Q is TRUE. When In changes from TRUE to FALSE, the timer starts to measure
the time and the value of ET increases accordingly. At the moment, Q remains TRUE. When ET
equals PT, Q is FALSE and the timer stops measuring time. When In is set to TRUE, ET is reset
and Q changes to TRUE again.
Precautions for Correct Use
When the output value of ET reaches the set value of PT, the timer stops measuring time. ET is reset to
0 (0ns) when In changes from FALSE to TRUE.
Programming Example
8- 4 5
DVP-50MC Series Motion Controller Operation Manual
Timing Chart:
Cas e 1 Cas e 2
TOF1_In
TOF1_PT
TO F1 _ET
TOF1_Q
Case 1: TOF1_PT is the set time for off delay. When TOF1_In is TRUE, TOF1_Q is TRUE.
When TOF1_In is FALSE, the timer starts to measure the time. When the value of
TOF1_ET equals the setting value of TOF1_PT, TOF1_Q is FALSE and the timer stops
timing.
Case 2: When TOF1_In changes from TRUE to FALSE, the timer starts timing. When current
time (TOF1_ET) is less than the set time (TOF1_PT) and TOF1_In is set to TRUE,
TOF1_ET is reset and the state of TOF1_Q does not change.
_8
8- 4 6
Chapter 8 Logic Instructions
8.7.3 TP
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB TP is used for the off delay after the input In is TRUE. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
TP_ins tan ce
TP
EN E NO
In Q
PT ET
Parameters
Parameter Input/
Meaning Description Valid range
name Output
In Timer input Input Controls the timer to start or reset TRUE or FALSE
Set the time from when the timer starts
PT Set time Input
until Q changes to TRUE
Q is FALSE when the set time PT is
Q Timer output Output TRUE or FALSE
reached.
Elapsed time from the time when the timer
ET Elapsed time Output
starts to current time.
T#0ms ~ 213503d23h34m33s709.551ms
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ●
PT ●
Q ●
ET ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation 8_
When In is TRUE, Q is TRUE and the timer starts measuring time and the value of ET increases 8_
accordingly. At the moment, Q remains TRUE. When ET equals PT, Q is FALSE and the timer stops
measuring time. When In changes from TRUE to FALSE, ET is reset.
Precautions for Correct Use
When the output value of ET reaches the set value of PT, the timer stops measuring time. ET is reset
to 0 (0ns) when In changes from TRUE to FALSE.
8- 4 7
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The variable table and program
Variable name Data type Initial value
TP1 TP
TP1_EN BOOL FALSE
TP1_In BOOL FALSE
TP1_PT TIME
TP1_Q BOOL
TP1_ET TIME
T P1
TP 1
TP1_EN EN E NO
TP1 _In In Q TP 1_Q
TP1_P T PT ET TP 1_ET
Timing Chart:
Case 1 Case 2
TP1_I n
TP1_P T
TP1_ET
TP1 _Q
Case 1: TP1_PT sets the time for off delay. When TP1_In is TRUE, the timer starts to measure time
and TP1_Q is TRUE. When the value of TP1_ET equals the setting value of TP1_PT,
TP1_Q is FALSE. When TP1_In is FALSE, TP1_ET is reset.
Case 2: TP1_PT sets the time for off delay. When TP1_In is TRUE and the timer starts to measure
time, TP1_Q is TRUE. When TP1_In is FALSE and the value of TP1_ET is less than the
setting value of TP1_PT, TP1_ET keeps timing and TP1_Q keeps TRUE state. When the
value of TP1_ET equals the setting value of TP1_PT, TP1_ET and TP1_Q are both reset.
_8
8- 4 8
Chapter 8 Logic Instructions
8.7.4 Sys_ReadTime
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
Sys_ReadTime reads the time of the real-time clock of
FB DVP50MC11P/DVP50MC11P-06
the controller.
DVP50MC11T-04S/DVP50MC11T-16S
S ys_ReadTime_instance
S ys_ReadTime
Ena ble Done
Year
Mo nth
Day
Week
Hour
Minut e
Second
Input Parameter
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is executed
TRUE or FALSE When Enable is
Enable when Enable changes BOOL
(FALSE) TRUE.
from FALSE to TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
TRUE when the instruction execution is
Done BOOL TRUE/FALSE
completed.
Year Year UINT 1970~2106
Month Month UINT 1~12
Day Day UINT 1~ 31
Week Week UINT 1~7
Hour Hour UINT 0~23
Minute Minute UINT 0~59
Second Second UINT 0~59
Function Explanation
Sys_ReadTime reads the time of the real-time clock of the controller. When Enable is TRUE, the real-time 8_
clock information in the controller such as year, month, day, week, hour, minute and second will be read 8_
in the specified variables.
8- 4 9
DVP-50MC Series Motion Controller Operation Manual
8.7.5 Sys_ReadTotalWorkTime
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
Sys_ReadTotalWorkTime reads total work time of the
FB DVP50MC11P/DVP50MC11P-06
controller.
DVP50MC11T-04S/DVP50MC11T-16S
Input Parameter
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is executed
TRUE or FALSE When Enable is
Enable when Enable changes BOOL
(FALSE) TRUE.
from FALSE to TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
Done TRUE when the instruction execution is completed. BOOL TRUE/FALSE
TotalWorkTime Shows total work time of the controller. TIME
T#0ns ~ 213503d23h34m33s709ms551us615ns
Function Explanation
Sys_ReadTotalWorkTime reads total work time of the controller. When Enable is TRUE, the total work
time of the controller is read in the variable specified by TotalWorkTime. For example, the controller worked
for 3 hours yesterday and worked for 2 hours today. So the read total work time of the controller is 5 hours.
_8
8- 5 0
Chapter 8 Logic Instructions
8.7.6 Sys_ReadPowerOnTime
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
Sys_ReadPowerOnTime reads power-on time of the
FB DVP50MC11P/DVP50MC11P-06
controller.
DVP50MC11T-04S/DVP50MC11T-16S
Input Parameter
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is executed
TRUE or FALSE When Enable is
Enable when Enable changes BOOL
(FALSE) TRUE.
from FALSE to TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
Done TRUE when the instruction execution is completed. BOOL TRUE/FALSE
PowerOnTime Shows total power-on time of the controller. TIME
T#0ns ~ 213503d23h34m33s709ms551us615ns
Function Explanation
Sys_ReadPowerOnTime reads total power-on time of the controller. The instruction will restart to measure
the power-on time if the controller is repowered after power off. When Enable is TRUE, the total power-on
time of the controller will be read in the variable specified by PowerOnTime.
8_
8_
8- 5 1
DVP-50MC Series Motion Controller Operation Manual
8.7.7 Sys_WdgStatus
FB/FC Explanation Applicable model
Sys_WdgStat us_instance
Sys_WdgStat us
Enable Valid
ErrorI D
St atus
Input Parameters
Valid range Validation
Parameter name Function Data type
(Default) timing
The instruction is executed when TRUE or FALSE When Enable
Enable Enable changes from FALSE to BOOL changes to
(FALSE)
TRUE. TRUE
1~24 When Enable
Set the priority of a task, i.e. to
TaskPriority UINT changes to
specify the task via its priority. (0)
TRUE
Output Parameters
Parameter name Function Data type Valid range
Valid TRUE when the output of the instruction is valid. BOOL TRUE / FALSE
Error TRUE when an error occurs in the instruction execution. BOOL TRUE / FALSE
Contains the error code when an error occurs. Please
ErrorID WORD
refer to section 12.2 for the corresponding error ID.
TRUE when the execution time of the specified task
Status BOOL TRUE / FALSE
exceeds the allowed setting time (watchdog time).
Output Update Timing
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
Error When the input parameters for the When Enable changes from TRUE to
instruction are illegal. FALSE
When the execution time of the When the execution time of the
Status specified task exceeds the allowed specified task does not exceed the
setting time (watchdog time). allowed setting time (watchdog time).
8- 5 2
Chapter 8 Logic Instructions
Enable
Valid
Error
E rrorID
Status
Case 1: Valid changes from FALSE to TRUE when Enable changes from FALSE to TRUE.
Case 2: Valid changes from FALSE to TRUE when Enable changes from FALSE to TRUE. When the
task execution time exceeds the watchdog time, Status changes to TRUE. When Enable
changes from TRUE to FALSE, Valid changes to FALSE and Status changes to FALSE.
Case 3: When an error occurs as Enable changes from FALSE to TRUE, Error changes to TRUE and
ErrorID shows corresponding error codes. When Enable changes from TRUE to FALSE, Error
changes to FALSE.
Function
The Sys_WdgStatus instruction is used to read whether or not the execution time of the specified task
exceeds the allowed setting time (watchdog time). When this instruction is used, do not place it in the
task specified by TaskPriority. It should be placed in other different task for execution.
The Status output of the instruction changes from FALSE to TRUE, the execution of the task specified
by TaskPriority stops. Status of the instruction can be used to perform related operation in other task by
users.
8_
8_
8- 5 3
DVP-50MC Series Motion Controller Operation Manual
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Up-counter
CU Input Control the up-counter to start counting up TRUE or FALSE
input signal
Reset Reset signal Input Reset the counter present value TRUE or FALSE
PV Preset value Input Counter setting value 0 ~ 4294967295
Q Output signal Output Q is TRUE when CV equals PV. TRUE or FALSE
CV Counter value Output Counter present value 0 ~ 4294967295
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
CU ●
Reset ●
PV ●
Q ●
●
_8 CV
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
CTU functions as an up counter.
When CU changes from FALSE to TRUE, the counter perfoms the up-counting once and the value
of CV is increased by 1. When CV equals PV, Q is TRUE. When Reset is set to TRUE, CV is
cleared to 0 and Q is reset to FALSE.
8- 5 4
Chapter 8 Logic Instructions
Programming Example
The variable table and program
Variable name Data type Initial value
CTU1 CTU
CTU1_EN BOOL FALSE
CTU1_CU BOOL FALSE
CTU1_Reset BOOL FALSE
CTU1_PV UDINT 4
CTU1_Q BOOL
CTU1_CV UDINT
CTU1
CTU 1
CTU1_E N EN E NO
CTU1 _CU CU Q CTU1_Q
CTU1_Res et Reset CV CTU1_CV
CTU1_PV PV
Timing Chart:
Case 1 Case 2 Case 3
CTU1_CU
CTU1_Reset
CTU1 _PV
CTU1_CV
CTU1_ Q
8- 5 5
DVP-50MC Series Motion Controller Operation Manual
8.8.2 CTD
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB CTD is used as a down counter. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
CTD_insta nce
CTD
EN E NO
CD Q
Load CV
PV
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Down-counter
CD Input Control the counter to start counting down TRUE or FALSE
input signal
Load Load signal Input For writing the down-counter value TRUE or FALSE
PV Preset value Input Counter setting value 0 ~ 4294967295
Q is TRUE when the counter counts down
Q Output signal Output TRUE or FALSE
to 0.
CV Counter value Output Counter present value 0 ~ 4294967295
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
CU ●
Load ●
PV ●
Q ●
CV ●
_8 Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
CTU functions as a down counter.
When Load is reset to FALSE after being set to TRUE, the value of PV is written to CV. When CD
changes from FALSE to TRUE, the counter makes the counter value decreased once and the
value of CV is decreased by 1. When the value of CV reaches 0, Q is TRUE.
Precautions for Correct Use
While Load is TRUE, the counter will not count down.
8- 5 6
Chapter 8 Logic Instructions
Programming Example
The variable table and program
Variable name Data type Initial value
CTD1 CTD
CTD1_EN BOOL FALSE
CTD1_CD BOOL FALSE
CTD1_Load BOOL FALSE
CTD1_PV UDINT 4
CTD1_Q BOOL
CTD1_CV UDINT
CTD1
CTD 1
CTD1 _EN EN ENO
CTD1_CD CD Q CTD1_ Q
CTD1_Lo ad Lo ad CV CTD1_ CV
CTD1_P V PV
Timing Chart:
Case 1 Ca se 2 Case 3
CTD1_CD
CTD1_Lo ad
CTD1_ PV
CTD1 _CV
CTD1_Q
Case 1: There is no impact on the ouput by triggering CTD1_CD when the value of CTD1_CV
is 0.
Case 2: When CTD1_Load is TRUE and CTD1_CV equals the set value of CTD1_PV,
CTD1_Q changes from TRUE to FALSE. At the moment, CTD1_CV does not count
down when CTD1_CD is triggered.
Case 3: If CTD counts down normally and CTD1_Load is FALSE, the value of CTD1_CV is
decreased by 1 whenever CTD1_CD is triggered once. CTD1_Q is TRUE when the
value of CTD1_CV is decreased to 0.
8_
8_
8- 5 7
DVP-50MC Series Motion Controller Operation Manual
8.8.3 CTUD
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB CTUD is used as an up-down counter. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
CTUD_inst ance
CTUD
EN E NO
CU QU
CD QD
Rese t CV
Load
PV
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Up-counter
CU Input Control the counter to count up TRUE or FALSE
input signal
Down-counter
CD Input Control the counter to count down TRUE or FALSE
input signal
Reset Reset signal Input Reset counter present value TRUE or FALSE
Load Load signal Input For writing the down-counter value TRUE or FALSE
PV Preset value Input Counter setting value 0 ~ 4294967295
QU Output signal Output Q is TRUE when CV equals PV. TRUE or FALSE
Q is TRUE when the counter counts down
QD Output signal Output TRUE or FALSE
to 0.
CV Counter value Output Counter present value 0 ~ 4294967295
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
_8
CU ●
CD ●
Reset ●
Load ●
PV ●
QU ●
QD ●
CV ●
8- 5 8
Chapter 8 Logic Instructions
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
CTUD is used as an up counter for counting up and a down counter for counting down.
Precautions for Correct Use
The counter will not count down while Load is TRUE.
The counter will not count up while Reset is TRUE.
Programming Example
The variable table and program
Variable name Data type Initial value
CTUD1 CTUD
CTUD1_EN BOOL FALSE
CTUD1_CU BOOL FALSE
CTUD1_CD BOOL FALSE
CTUD1_Reset BOOL FALSE
CTUD1_Load BOOL FALSE
CTUD1_PV UDINT 4
CTUD1_QU BOOL
CTUD1_QD BOOL
CTUD1_CV UDINT
CTUD1
CTUD 1
CTUD1_EN EN E NO
CTUD1_ CU CU QU CTUD1 _QU
CTUD1_ CD CD QD CTUD1 _QD
CTUD1_Res et Re set CV CTUD1 _CV
CTUD1_ Load L oad
CTUD1 _PV PV
Timing Chart:
Cas e 1 Cas e 2 Cas e 3 Cas e 4
CTUD1_CU
CTUD1_ CD
CTUD1_Res et
8_
CTUD1_ Load
8_
CTUD1_ PV
CTUD1 _CV
CTUD1_QU
CTUD1_QD
8- 5 9
DVP-50MC Series Motion Controller Operation Manual
Case 3: When CTUD1_Load is TRUE and CTUD1_CV equals CTUD1_PV, CTUD1_QU changes
to TRUE and CTUD1_QD changes to FALSE. At the moment, if CTUD1_CD is triggered,
the instruction can not count down.
Case 4: If the instruction counts down normally, CTUD1_QU is FALSE when CTUD1_CD is TRUE.
The value of CTUD1_CV is decreased by 1 whenever CTUD1_CD is triggered once.
CTUD1_QD is TRUE when the value of CTUD1_CV is decreased to 0.
_8
8- 6 0
Chapter 8 Logic Instructions
ADD
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
String
Real
Bit string Integer Time, date
number
8_
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
8_
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In1
to ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
InN
In2
to ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
InN
8- 6 1
DVP-50MC Series Motion Controller Operation Manual
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The instruction is used for the addition of two or more variables or constants. The result is output to
Out, that is, Out= In1 + In2 +…+ InN.
The input parameters In1~InN in this instruction are allowed to be the variables of different types
among bits, integers and real numbers. When In1~InN are the variables of different types, the
addition operation will be performed based on the data type which can contain all valid ranges of
In1~InN values.
For example, the data type of Out is DINT if the data type of In1 is INT and In2 is DINT.
InN
The input and output variables are allowed to be of different data types among bits, integers and
real numbers. When the data types of input and output variables are different, the data type of the
output variable must include the valid ranges of data types of all input variables. Otherwise, there
will be an error during the compiling of the software. For example, if the data types of In1 and In2
are INT and DINT respectively, the data type of Out is DINT. There will be an error during
compiling of the software if the data type of the variable that Out is connected to is INT. No error
will occur during the compiling of the software if the data type of the variable that Out is connected
to is LINT.
For the data type about time and date, following combinations are supported only.
1. In1 is TIME, In2 is TIME and Out is TIME;
_8 2. In1 is TOD (TIME_OF_DAY), In2 is TIME and Out is TOD;
3. In1 is DT (DAY_AND_TIME), In2 is TIME and Out is DT.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software
if any input variable is omitted. But the output variable is allowed to omit.
The sum of In1~InN may be out of the valid range of the data type of Out.
The difference between In1 and In2 may be out of the valid range of the data type of Out.
For example, the data types of “ADD_In1” and “ADD_In2” are both INT with their respective values,
32767 and 1. If the data type of the output variable is INT, the output variable value will be -32768
as shown in the following table, variable 1. If the data type of the output variable is set to DINT, the
output variable value will be 32768 as shown in the following table, variable 2.
8- 6 2
Chapter 8 Logic Instructions
Variable 1
Variable name Data type Current value
ADD_EN BOOL TRUE
ADD_In1 INT 32767
ADD_In2 INT 1
Out1 INT -32768
Variable 2
Variable name Data type Current value
ADD_EN BOOL TRUE
ADD_In1 INT 32767
ADD_In2 INT 1
Out1 DINT 32768
The program
ADD
ADD_EN EN E NO
ADD_I n1 In1 Out O ut1
ADD_I n2 In2
Programming Example
The data types of variables ADD_In1, ADD_In2 and Out1 are all INT. The values of ADD_In1 and
ADD_In2 are 10 and 50 respectively. The value of Out1 is 60 when ADD_EN changes to TRUE as
shown in Variable 1.
The data types of variables ADD_In1, ADD_In2 and Out1 are all TIME. The values of ADD_In1 and
ADD_In2 are TIME #1s and TIME #2s respectively. The value of Out1 is TIME #3s when ADD_EN
changes to TRUE as shown in Variable 2.
The data types of variables ADD_In1, ADD_In2 and Out1 are DT, TIME and DT respectively. The
values of ADD_In1 and ADD_In2 are DT#2016-9-1-8:00:00 and TIME#1H53M34S respectively.
The value of Out1 is DT#2016-09-01-09:53:34 when ADD_EN changes to TRUE as shown in
Variable 3.
Variable 1
Variable name Data type Current value
ADD_EN BOOL TRUE
ADD_In1 INT 10
ADD_In2 INT 50
Out1 INT 60
Variable 2
8_
Variable name Data type Current value
ADD_EN BOOL TRUE 8_
ADD_In1 TIME TIME #1s
ADD_In2 TIME TIME #2s
Out1 TIME TIME #3s
Variable 3
Variable name Data type Current value
ADD_EN BOOL TRUE
ADD_In1 DT DT#2016-9-1-8:00:00
ADD_In2 TIME TIME#1H53M34S
Out1 DT DT#2016-09-01-09:53:34
8- 6 3
DVP-50MC Series Motion Controller Operation Manual
The program
ADD 1
ADD_EN EN E NO
ADD_I n1 In1 Out O ut1
ADD_I n2 In2
_8
8- 6 4
Chapter 8 Logic Instructions
8.9.3 SUB
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
SUB is used for the subtraction operation of two variables
FC DVP50MC11P/DVP50MC11P-06
or constants.
DVP50MC11T-04S/DVP50MC11T-16S
S UB
EN ENO
In1 O ut
In2
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In1 Minuend Input Minuend the variable that the input
parameter is connected to.
Depends on the data type of
In2 Subtrahend Input Subtrahend the variable that the input
parameter is connected to.
Depends on the data type of
The subtraction result of In1
Out Difference Output the variable that the output
and In2
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
● ● ● DT
●
In1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
In2 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type. 8_
Function Explanation
8_
The instruction is used for the subtraction of two or more variables or constants. The result is
output to Out, that is, Out= In1 - In2.
8- 6 5
DVP-50MC Series Motion Controller Operation Manual
The input parameters In1 and In2 in this instruction are allowed to be the variables of different data
types among bits, integers and real numbers. When In1 and In2 are the variables of different types,
the subtraction operation will be performed based on the data type which can contain valid ranges
of In1 and In2 values. For example, the data type of Out is DINT if the data type of In1 is INT and
In2 is DINT.
The input and output variables are allowed to be of different data types among bits, integers and
real numbers. When the data types of input and output variables are different, the data type of the
output variable must include the valid ranges of data types of all input variables. Otherwise, there
will be an error during the compiling of the software. For example, if the data types of In1 and In2
are INT and DINT respectively, the data type of Out is DINT. There will be an error during the
compiling of the software if the data type of the variable that Out is connected to is INT. No error
will occur during the compiling of the software if the data type of the variable that Out is connected
to is LINT.
For the data type of time and date, only following combinations are supported.
Variable 1
Variable name Data type Current value
SUB_EN BOOL TRUE
SUB _In1 INT -32768
_8 SUB _In2 INT 1
Out1 INT 32767
Variable 2
Variable name Data type Current value
SUB_EN BOOL TRUE
SUB _In1 INT -32768
SUB _In2 INT 1
Out1 DINT -32769
The Program
8- 6 6
Chapter 8 Logic Instructions
S UB 1
SUB_EN EN E NO
SUB_I n1 In1 Out O ut1
SUB_I n2 In2
Programming Example
The data types of variables SUB_In1, SUB _In2 and Out1 are all INT and the values of SUB _In1
and SUB _In2 are 100 and 40 respectively. The value of Out1 is 60 when SUB_EN changes to
TRUE as shown in Variable 1.
The data types of variables SUB_In1, SUB _In2 and Out1 are all TIME and the values of SUB _In1
and SUB _In2 are TIME#4s and TIME#1s respectively. The value of Out1 is TIME#3s when
SUB_EN changes to TRUE as shown in Variable 2.
The data types of variables SUB_In1, SUB _In2 and Out1 are DATE, DATE and TIME and the
values of SUB _In1 and SUB _In2 are DATE#2016-10-1 and DATE#2016-9-1 respectively. The
value of Out1 is TIME#30D when SUB_EN changes to TRUE as shown in Variable 3.
Variable 1
Variable name Data type Current value
SUB_EN BOOL TRUE
SUB _In1 INT 100
SUB _In2 INT 40
Out1 INT 60
Variable 2
Variable name Data type Current value
SUB_EN BOOL TRUE
SUB_In1 TIME TIME#4s
SUB_In2 TIME TIME#1s
Out1 TIME TIME#3s
Variable 3
Variable name Data type Current value
SUB_EN BOOL TRUE
SUB_In1 DATE DATE#2016-10-1
SUB_In2 DATE DATE#2016-9-1
Out1 TIME TIME#30D
The program
S UB 1
SUB_EN EN E NO
SUB_I n1 In1 Out O ut1
8_
SUB_I n2 In2
8_
8- 6 7
DVP-50MC Series Motion Controller Operation Manual
8.9.4 MUL
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
MUL is used for the multiplication of two or more
FC DVP50MC11P/DVP50MC11P-06
variables or constants. DVP50MC11T-04S/DVP50MC11T-16S
MUL
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In1 Multiplicand Input Multiplicand the variable that the input
parameter is connected to.
The maximum number of
multipliers is 7, which means
Depends on the data type of
that N can be 2~8 and the
In2 to InN Multiplier Input the variable that the input
number can be increased or
parameter is connected to.
reduced via the programming
software in creating a program.
Depends on the data type of
The multiplication result of In1
Out Product Output the variable that the output
~ InN
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In1
to ● ● ● ● ● ● ● ● ● ● ● ● ● ●
_8 InN
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The instruction is used for the multiplication of two or more variables or constants. The result is
output to Out, that is, Out= In1 * In2 * … * InN.
8- 6 8
Chapter 8 Logic Instructions
The input parameters In1 ~ InN are allowed to be the variables of different data types in this
instruction. When In1 ~ InN are the variables of different data types, the multiplication will be
performed based on the data type which can contain valid ranges of In1 ~ InN values. For
example, the data type of Out is DINT if the data type of In1 is INT and In2 is DINT.
In1 Outp ut
paramete r
In2 Result
O ut
assign ment
InN
The input and output variables are allowed to be of different data types in this instruction. When the
data types of input and output variables are different, the range of the data type of the output
variable must include the valid ranges of data types of all input variables. Otherwise, there will be
an error during the compiling of the software. For example, if the data types of In1 and In2 are INT
and DINT respectively, the data type of Out is DINT. There will be an error during the compiling of
the software if the data type of the variable that Out is connected to is INT. No error will occur
during the compiling of the software if the data type of the variable that Out is connected to is LINT.
Variable 1
Variable name Data type Current value
MUL_EN BOOL TRUE
MUL _In1 INT 20000
MUL _In2 INT 2
Out1 INT -25536
Variable 2
Variable name Data type Current value
MUL_EN BOOL TRUE
MUL _In1 INT 20000
MUL _In2 INT 2 8_
Out1 DINT 40000 8_
The Program
MUL 1
MUL_E N EN ENO
MUL_I n1 In1 Ou t O ut1
MUL_I n2 In2
Programming Example
The data types of variables MUL _In1, MUL _In2 and Out1 are all INT. The values of MUL _In1 and
MUL _In2 are 10 and 50 respectively. The value of Out1 is 500 when MUL _EN changes to TRUE.
8- 6 9
DVP-50MC Series Motion Controller Operation Manual
MUL 1
MUL_E N EN ENO
MUL_I n1 In1 Ou t O ut1
MUL_I n2 In2
_8
8- 7 0
Chapter 8 Logic Instructions
8.9.5 DIV
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
DIV is used for the division operation of two variables or
FC DVP50MC11P/DVP50MC11P-06
constants. DVP50MC11T-04S/DVP50MC11T-16S
DIV
EN ENO
In1 O ut
In2
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In1 Dividend Input Dividend the variable that the input
parameter is connected to.
Depends on the data type of
the variable that the input
In2 Divisor Input Divisor
parameter is connected to. 0
is excluded.
Depends on the data type of
The division result of In1
Out Quotient Output the variable that the output
andIn2
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In1 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
In2 ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note: 8_
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type. 8_
Function Explanation
The instruction is used for the division of two variables or constants. The result is output to Out,
that is, Out= In1 / In2.
8- 7 1
DVP-50MC Series Motion Controller Operation Manual
The input parameters In1 and In2 are allowed to be the variables of different data types in this
instruction. When In1 and In2 are the variables of different data types, the division will be
performed based on the data type which can contain valid ranges of In1 and In2. For example, the
data type of Out is DINT if the data type of In1 is INT and In2 is DINT.
Out put
Inpu t paramet er Div is ion paramet er
In1 In2 Res ult Out
as s ig nment
The input and output variables are allowed to be of different data types in this instruction. When the
data types of input and output variables are different, the range of the data type of the output
variable must include the valid ranges of data types of all input variables. Otherwise, there will be
an error during the compiling of the software. For example, if the data types of In1 and In2 are INT
and DINT respectively, the data type of Out is DINT. There will be an error during the compiling of
the software if the data type of Out is INT. No error will occur during the compiling of the software if
the data type of Out is LINT.
Variable 1
Variable name Data type Current value
DIV_EN BOOL TRUE
DIV_In1 INT -32768
DIV_In2 INT -1
Out1 INT -32768
Variable 2
Variable name Data type Current value
DIV_EN BOOL TRUE
_8 DIV_In1 INT -32768
DIV_In2 INT -1
Out1 DINT 32768
The Program
DIV 1
DIV _EN EN ENO
DIV _In1 I n1 O ut Out 1
DIV _In2 I n2
8- 7 2
Chapter 8 Logic Instructions
The result is always an integer for the division of two integers. Even if there is a remainder for the
division of two integers, the remainder is cut.
For example, the data types of In1 and In2 are both INT with their respective values, 10 and 3. And
the data type of Out is INT and Real and thus its value is 3 and 3.0 respectively as illustrated in the
following figure.
I NT INT I NT Out 2 3 .0 RE AL
The data type of Out is a real number for the division of an integer and a real number or the division
of two real numbers. The value of Out is shown as below including its fractional part when there is a
remainder for this type of division.
Division result
I n1 10 / In2 4 = 2 .5 Ou t 2.5
I NT INT I NT REA L
Programming Example
The data types of variables DIV _In1, DIV _In2 and Out1 are all INT. The values of DIV _In1 and
DIV _In2 are 100 and 20 respectively. The value of Out1 is 5 when DIV _EN changes to TRUE.
DIV 1
DIV _EN EN ENO
DIV _In1 I n1 O ut Out 1
DIV _In2 I n2
8_
8_
8- 7 3
DVP-50MC Series Motion Controller Operation Manual
8.9.6 MOD
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
MOD finds the remainder for division of two integer
FC DVP50MC11P/DVP50MC11P-06
variables or constants. DVP50MC11T-04S/DVP50MC11T-16S
MOD
EN ENO
In1 O ut
In2
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In1 Dividend Input Dividend the variable that the input
parameter is connected to.
Depends on the data type of
the variable that the input
In2 Divisor Input Divisor
parameter is connected to. 0 is
excluded.
Depends on the data type of
The remainder got by dividing
Out Remainder Output the variable that the output
In1 by In2
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In1 ● ● ● ● ● ● ● ● ● ● ● ●
In2 ● ● ● ● ● ● ● ● ● ● ● ●
● ● ● ● ● ● ● ● ● ● ● ●
_8 Out
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The instruction is used to get the remainder of the division of two integer variables or constants.
The result is output to Out, that is, Out= In1 – (In1/ In2)*In2.
The input variable and input variable or the input variable and output variable are allowed to be of
different data types in this instruction. When the data types of input and output variables are
different, the data type of the output variable must include the valid ranges of data types of all input
variables. Otherwise, there will be an error during the compiling of the software. For example, if the
data types of In1 and In2 are INT and DINT respectively, the data type of Out is DINT. There will be
an error during the compiling of the software if the data type of Out is INT. No error will occur
during the compiling of the software if the data type of Out is LINT.
8- 7 4
Chapter 8 Logic Instructions
MO D 1
MO D_ EN EN ENO
MO D_In1 In 1 O ut Out 1
MO D_In2 In 2
8_
8_
8- 7 5
DVP-50MC Series Motion Controller Operation Manual
8.9.7 MODREAL
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
MODREAL finds the remainder for division of two
FC DVP50MC11P/DVP50MC11P-06
floating- point variables or constants. DVP50MC11T-04S/DVP50MC11T-16S
MODREA L
EN ENO
In1 O ut
In2
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In1 Dividend Input Dividend the variable that the input
parameter is connected to.
Depends on the data type of
the variable that the input
In2 Divisor Input Divisor
parameter is connected to. 0 is
excluded.
Depends on the data type of
The remainder got by dividing
Out Remainder Output the variable that the output
In1 by In2
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In1 ● ●
In2 ● ●
Out ● ●
_8 Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The instruction is used to find the remainder of the division of two floating- point variables or
constants and the result is output to Out.
The input variable and input variable or the input variable and output variable are allowed to be of
different data types in this instruction.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software
if any input variable is omitted. But the output variable is allowed to omit.
The input value of In2 can not be 0. In other words, the divisor in the division operation can not be
0. The value of Out will be 0 if the value of In2 is 0.
8- 7 6
Chapter 8 Logic Instructions
Programming Example
The data types of variables MODREAL _In1, MODREAL _In2 and Out1 are REAL, REAL and
LREAL respectively. The values of MODREAL _In1 and MOD _In2 are 10.5 and 2.5 respectively.
The value of Out1 is 0.5 when MODREAL _EN changes to TRUE.
The variable table and program
Variable name Data type Current value
MODREAL_EN BOOL TRUE
MODREAL _In1 REAL 10.5
MODREAL _In2 REAL 2.5
Out1 LREAL 0.5
MODREAL 1
MO DRE AL_EN EN ENO
MO DRE AL_I n1 In1 O ut Out 1
MO DRE AL_I n2 In2
8_
8_
8- 7 7
DVP-50MC Series Motion Controller Operation Manual
8.9.8 MODTURNS
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
MODTURN finds the signed integral part for modulo
FC DVP50MC11P/DVP50MC11P-06
division of two floating-point variables or constants. DVP50MC11T-04S/DVP50MC11T-16S
MO DTURNS
EN E NO
In1 Out
In2
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In1 Input value Input Input value the variable that the input
parameter is connected to.
Depends on the data type of
the variable that the input
In2 Modulo range Input Modulo range
parameter is connected to.
0 is excluded.
Number of Depends on the data type of
Out modulo Output Number of modulo rotations the variable that the output
rotations parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In1 ● ●
In2 ● ●
Out ●
_8 Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
MODTURN is used to carry out modulo division of two floating-point variables or constants and get
the signed integral component. The result is output to Out. The number of modulo rotations of an
axis can be calculated according to its set absolute position.
The input variable and input variable or the input variable and output variable are allowed to be of
different data types in this instruction.
8- 7 8
Chapter 8 Logic Instructions
MO DTURNS 1
MO DTURNS_EN EN E NO
MO DTURNS_I n1 I n1 Out Out 1
MO DTURNS_I n2 I n2
8_
8_
8- 7 9
DVP-50MC Series Motion Controller Operation Manual
8.9.9 MODABS
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
MODABS finds the unsigned modulo value for modulo
FC DVP50MC11P/DVP50MC11P-06
division of two floating-point variables or constants. DVP50MC11T-04S/DVP50MC11T-16S
MO DABS
EN ENO
In1 Ou t
In2
Parameters
Parameter
Meaning Input/ Output Description Valid range
name
Depends on the data type of
In1 Input value Input Input value the variable that the input
parameter is connected to.
Depends on the data type of
the variable that the input
In2 Modulo range Input Modulo range
parameter is connected to.由0
is excluded.
Depends on the data type of
Out Modulo value Output Modulo value the variable that the output
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In1 ● ●
In2 ● ●
Out ●
_8
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
MODABS is used to perform modulo division of two floating-point variables or constants and get
the unsigned modulo value. The result is output to Out. The modulo position can be calculated
according to the absolute position of the axis.
The input variable and input variable or the input variable and output variable are allowed to be of
different data types in this instruction.
8- 8 0
Chapter 8 Logic Instructions
8_
8_
8- 8 1
DVP-50MC Series Motion Controller Operation Manual
8.9.10 ABS
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
ABS finds the absolute value of an integer or a real
FC DVP50MC11P/DVP50MC11P-06
number. DVP50MC11T-04S/DVP50MC11T-16S
ABS
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Number to
In Input Number to process the variable that the input
process
parameter is connected to.
Depends on the data type of
Out Absolute value Output Absolute value of In the variable that the output
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ● DT
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
ABS finds the absolute value of the input parameter In. The result is output to Out.
That is, Out = | In |.
_8 The input variable and output variable are allowed to be of different data types in this instruction.
When the data types of input and output variables are different, the range of the data type of the
output variable must include the valid ranges of data types of all input variables. Otherwise, there
will be an error during the compiling of the software.
8- 8 2
Chapter 8 Logic Instructions
8_
8_
8- 8 3
DVP-50MC Series Motion Controller Operation Manual
8.9.11 DegToRad
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FC DegToRad is used to convert degrees to radians. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
Deg ToRad
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In Degrees Input Degrees to convert the variable that the input
parameter is connected to.
Depends on the data type of
Radians converted from
Out Radians Output the variable that the output
degrees
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
DegToRad is used to convert the input parameter In to a radian and the result is output to Out.
That is, Out =( In/180)* π.
The units of In and Out are degree (°) and radian respectively.
_8 Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software
if the input variable is omitted. But the output variables are allowed to omit.
Programming Example
The data types of DegToRad _In and Out1 are INT and LREAL respectively. The value of Out1 is
0.174532925199433 if the value of DegToRad _In is 10 when DegToRad _EN changes to TRUE.
The value of Out1 is -0.174532925199433 as DegToRad _In is -10.
8- 8 4
Chapter 8 Logic Instructions
Variable 1
Variable name Data type Current value
DegToRad_EN BOOL TRUE
DegToRad _In INT 10
Out1 LREAL 0.174532925199433
Variable 2
Variable name Data type Current value
DegToRad_EN BOOL TRUE
DegToRad _In INT -10
Out1 LREAL -0.174532925199433
The program
DegToRad 1
DegToRad_ EN EN E NO
De gToRad _In In Out O ut1
8_
8_
8- 8 5
DVP-50MC Series Motion Controller Operation Manual
8.9.12 RadToDeg
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FC DegToRad is used to convert radians to degrees. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
Rad ToDeg
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In Radians Input Radians to convert the variable that the input
parameter is connected to.
Depends on the data type of
Degrees converted from
Out Degrees Output the variable that the output
radians
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
RadToDeg is used to convert the input parameter In to degrees and the result is output to Out.
That is, Out =( In/π)* 180.
The units of In and Out are radian and degree (°) respectively.
_8 Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
Programming Example
The data types of variables RadToDeg _In and Out1 are INT and LREAL respectively. The value of
Out1 is 572. 957795130824 if the value of RadToDeg _In is 10 when RadToDeg _EN changes to
TRUE. The value of Out1 is -572. 957795130824 as RadToDeg _In is -10.
8- 8 6
Chapter 8 Logic Instructions
Variable 1
Variable name Data type Current value
RadToDeg _EN BOOL TRUE
RadToDeg _In INT 10
Out1 LREAL 572. 957795130824
Variable 2
Variable name Data type Current value
RadToDeg_EN BOOL TRUE
RadToDeg_In INT -10
Out1 LREAL -572. 957795130824
The program
RadToDeg 1
RadToDeg_ EN EN ENO
Ra dToDeg _In In Ou t O ut1
8_
8_
8- 8 7
DVP-50MC Series Motion Controller Operation Manual
8.9.13 SIN
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
SIN is used to find the sine of a number and the result is
FC DVP50MC11P/DVP50MC11P-06
output to Out. The unit of In is radian. DVP50MC11T-04S/DVP50MC11T-16S
SIN
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Radians to
In Input Radians to process the variable that the input
process
parameter is connected to.
Operation -1.00000000000000
Out Output Operation result
result ~ 1.00000000000000
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
BxOOL
WORD
LREAL
UDINT
USINT
ULINT
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
SIN is used to calculate the sine of the input parameter In and the result is output to Out.
In
-2 - 32 -2 - 0
2
3 2
2 2
-1
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
8- 8 8
Chapter 8 Logic Instructions
8_
8_
8- 8 9
DVP-50MC Series Motion Controller Operation Manual
8.9.14 COS
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
COS is used to get the cosine of a number and the result
FC DVP50MC11P/DVP50MC11P-06
is output to Out. The unit of In is radian. DVP50MC11T-04S/DVP50MC11T-16S
COS
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Radians to
In Input Radians to process the variable that the input
process
parameter is connected to.
Operation -1.00000000000000~
Out Output Operation result
result 1.00000000000000
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
COS is used to calculate the cosine of the input parameter In and the result is output to Out.
In
-2 π - 32 π -2π - π2 0 π
2
π 3π 2π
2
-1
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
8- 9 0
Chapter 8 Logic Instructions
8_
8_
8- 9 1
DVP-50MC Series Motion Controller Operation Manual
8.9.15 TAN
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
TAN is used to get the tangent of a number and the result
FC DVP50MC11P/DVP50MC11P-06
is output to Out. The unit of In is radian. DVP50MC11T-04S/DVP50MC11T-16S
TAN
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Radians to
In Input Radians to process the variable that the input
process
parameter is connected to.
Depends on the data type of
Operation
Out Output Operation result the variable that the output
result
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
TAN is used to calculate the tangent of the input parameter In and the result is output to Out.
Ou t
_8
In:Angle ( i n radi ans ) data
Out: Result (Tangent)
In
-2 π - 32π - 2π - 2π 0 π
2
π 3π 2π
2
-1
8- 9 2
Chapter 8 Logic Instructions
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
Programming Example
The data types of variables TAN _In and Out1 are INT and LREAL respectively. The value of Out1
is 0.648360827459087 if the value of TAN _In is 10 when TAN _EN changes to TRUE. The value
of Out1 is -0.648360827459087 as TAN _In is -10.
Variable 1
Variable name Data type Current value
TAN_EN BOOL TRUE
TAN_In INT 10
Out1 LREAL 0.648360827459087
Variable 2
Variable name Data type Current value
TAN_EN BOOL TRUE
TAN_In INT -10
Out1 LREAL -0.648360827459087
The program
TAN 1
TAN_EN EN E NO
TAN_I n In Out O ut1
8_
8_
8- 9 3
DVP-50MC Series Motion Controller Operation Manual
8.9.16 ASIN
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
ASIN is used to get the arc sine of a number and the result
FC DVP50MC11P/DVP50MC11P-06
is output to Out. The unit of Out is radian. DVP50MC11T-04S/DVP50MC11T-16S
AS IN
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Number to
In Input Number to process the variable that the input
process
parameter is connected to.
Operation
Out Output Operation result -π/2 ~ π/2
result
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
ASIN is used to calculate the arc sine of the input parameter In and the result is output to Out.
Out
π
2
In
-1, 0 0 1,0
- π2
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
8- 9 4
Chapter 8 Logic Instructions
Programming Example
The data types of variables ASIN_In and Out1 are REAL and LREAL respectively. The value of
Out1 is 1.5707963267949 if the value of ASIN_In is 1.0 when ASIN_EN changes to TRUE. The
value of Out1 is -1.5707963267949 as ASIN_In is -1.0.
Variable 1
Variable name Data type Current value
ASIN_EN BOOL TRUE
ASIN_In REAL 1.0
Out1 LREAL 1.5707963267949
Variable 2
Variable name Data type Current value
ASIN_EN BOOL TRUE
ASIN_In REAL -1.0
Out1 LREAL -1.5707963267949
The program
ASI N 1
AS IN_EN EN E NO
A SIN_I n In Out Ou t1
8_
8_
8- 9 5
DVP-50MC Series Motion Controller Operation Manual
8.9.17 ACOS
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
ACOS is used to get the arc cosine of a number and the
FC DVP50MC11P/DVP50MC11P-06
result is output to Out. The unit of Out is radian. DVP50MC11T-04S/DVP50MC11T-16S
A CO S
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Number to
In Input Number to process the variable that the input
process
parameter is connected to.
Operation
Out Output Operation result 0~π
result
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
ACOS is used to calculate the arc cosine of the input parameter In and the result is output to Out.
Out
_8 π
π
2
In
-1,0 0 1, 0
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
8- 9 6
Chapter 8 Logic Instructions
ACO S 1
ACO S_EN EN E NO
A CO S_I n In Out O ut1
Programming Example
The data types of variables ACOS_In and Out1 are REAL and LREAL respectively. The value of
Out1 is 0 if the value of ACOS_In is 1.0 when ACOS_EN changes to TRUE. The value of Out1 is
3.14159265358979 as ACOS_In is -1.0.
Variable
Variable name Data type Current value
ACOS_EN BOOL TRUE
ACOS_In REAL 1.0
Out1 LREAL 0
Variable
Variable name Data type Current value
ACOS_EN BOOL TRUE
ACOS_In REAL -1.0
Out1 LREAL 3.14159265358979
The program
ACO S 1
ACO S_EN EN E NO
A CO S_I n In Out O ut1
8_
8_
8- 9 7
DVP-50MC Series Motion Controller Operation Manual
8.9.18 ATAN
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
ATAN is used to find the arc tangent of a number and the
FC DVP50MC11P/DVP50MC11P-06
result is output to Out. The unit of Out is radian. DVP50MC11T-04S/DVP50MC11T-16S
ATA N
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Number to
In Input Number to process the variable that the input
process
parameter is connected to.
Operation
Out Output Operation result -π/2 ~ π/2
result
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
ATAN is used to calculate the arc tangent of the input parameter In and the result is output to Out.
Out
In : Inp ut data ( Tangent )
Out: Arc tan gent ( in radi ans )
_8
π
2
In
0
-π
2
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
8- 9 8
Chapter 8 Logic Instructions
ATAN 1
ATAN_EN EN E NO
ATAN_In In O ut Ou t1
8_
8_
8- 9 9
DVP-50MC Series Motion Controller Operation Manual
8.9.19 LN
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
LN is used to find the natural logarithm of a number and
FC DVP50MC11P/DVP50MC11P-06
the result is output to Out. DVP50MC11T-04S/DVP50MC11T-16S
LN
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Number to
In Input Number to process the variable that the input
process
parameter is connected to.
Depends on the data type of
Out Logarithm Output The natural logarithm of In the variable that the output
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
LN is used to calculate the natural logarithm of the input parameter In, that is the logarithm with e
(e=2.718282) as the base, and the result is output to Out.
Ou t
_8
1
In
0 1 2 .7 18 2 8 2
8- 1 0 0
Chapter 8 Logic Instructions
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
The output value of Out is nonnumeric when the input value of In is a non-positive number as
shown in the following table.
The variable table and program
Variable name Data type Current value
LN_EN BOOL TRUE
LN_In REAL -2.0
Out1 LREAL 1.#QNAN
LN 1
L N_ EN EN ENO
LN_In In O ut Out 1
Programming Example
The data types of variables LN_In and Out1 are INT and LREAL respectively. The value of Out1 is
0.0 if the value of LN_In is 1 when LN_EN changes to TRUE. The value of Out1 is
1.00000005734143 as LN_In is 2.718282.
Variable 1
Variable name Data type Current value
LN_EN BOOL TRUE
LN_In INT 1
Out1 LREAL 0.0
Variable 2
Variable name Data type Current value
LN_EN BOOL TRUE
LN_In REAL 2.718282
Out1 LREAL 1.00000005734143
The program
LN 1
L N_ EN EN ENO
LN_In In O ut Out 1
8_
8_
8- 1 0 1
DVP-50MC Series Motion Controller Operation Manual
8.9.20 LOG
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
LOG is used to find the base-10 logarithm of a number
FC DVP50MC11P/DVP50MC11P-06
and the result is output to Out. DVP50MC11T-04S/DVP50MC11T-16S
LO G
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Number to
In Input Number to process the variable that the input
process
parameter is connected to.
Depends on the data type of
Out Logarithm Output The base-10 logarithm the variable that the output
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
LOG is used to calculate the base-10 logarithm of the input parameter In and the result is output to
Out.
Ou t
_8
1
L og
0 1 10
8- 1 0 2
Chapter 8 Logic Instructions
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
The output value of Out is a nonnumeric value when the input value of In is a non-positive number
as shown in the following table.
L OG 1
L OG_E N EN ENO
LOG _In In Ou t Out1
Programming Example
The data types of variables LOG_In and Out1 are INT and LREAL respectively. The value of Out1
is 0.0 if the value of LOG_In is 1 when LOG_EN changes to TRUE. The value of Out1 is 1.0 as
LOG_In is 10.
Variable 1
Variable name Data type Current value
LOG_EN BOOL TRUE
LOG_In INT 1
Out1 LREAL 0.0
Variable 2
Variable name Data type Current value
LOG_EN BOOL TRUE
LOG_In INT 10
Out1 LREAL 1.0
The program
L OG 1
L OG_E N EN ENO
LOG _In In Ou t Out1
8_
8_
8- 1 0 3
DVP-50MC Series Motion Controller Operation Manual
8.9.21 SQRT
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
SQRT is used to calculate the square root of a number
FC DVP50MC11P/DVP50MC11P-06
and the result is output to Out. DVP50MC11T-04S/DVP50MC11T-16S
S QRT
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
the variable that the input
Number to
In Input Number to process parameter is connected to.
process
And it is a non-negative
number.
Depends on the data type of
the variable that the output
Out Square root Output Square root parameter is connected to.
And it is a non-negative
number.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
_8 Function Explanation
SQRT is used to calculate the square root of In and the result is output to Out.
Out
2
1
In
0 1 4
8- 1 0 4
Chapter 8 Logic Instructions
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
The output value of Out is a nonnumeric value when the input value of In is a negative number.
The variable table and program
Variable name Data type Current value
SQRT_EN BOOL TRUE
SQRT_In REAL -2.0
Out1 LREAL 1.#QNAN
S QRT 1
SQRT_EN EN ENO
SQ RT_In In O ut Out 1
Programming Example
The data types of variables SQRT _In and Out1 are INT and LREAL respectively. The value of
Out1 is 4.0 if the value of SQRT _In is 16 when SQRT _EN changes to TRUE. The value of Out1 is
10.0 as SQRT_In is 100.
Variable 1
Variable name Data type Current value
SQRT_EN BOOL TRUE
SQRT_In INT 16
Out1 LREAL 4.0
Variable 2
Variable name Data type Current value
SQRT_EN BOOL TRUE
SQRT_In INT 100
Out1 LREAL 10.0
The program
S QRT 1
SQRT_EN EN ENO
SQ RT_In In O ut Out 1
8_
8_
8- 1 0 5
DVP-50MC Series Motion Controller Operation Manual
8.9.22 EXP
FB/FC Explanation Applicable model
EXP is used to perform the operation with e as the base DVP50MC11T/DVP50MC11T-06
FC number and In as the exponent. The result is output to DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
Out.
E XP
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In Exponent Input Exponent the variable that the input
parameter is connected to.
Depends on the data type of
the variable that the output
Operation Operation result with the base
Out Output parameter is connected to.
result number e and exponent In
And it is a non-negative
number.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
_8 EXP is used to perform the operation with e (e=2.718282) as the base number and In as the
exponent. The result is output to Out.
Ou t
2 .71 8 28 2
1
In
0 1
8- 1 0 6
Chapter 8 Logic Instructions
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
When the value of In is 0, +∞, -∞ and a nonnumeric value, the corresponding output values of Out
is listed in the following table.
In Out
0 1.0
+∞ +∞
-∞ 0.0
nonnumeric nonnumeric
Programming Example
The data types of EXP _In and Out1 are INT and LREAL respectively. The value of Out1 is 1.0 if
the value of EXP _In is 0 when EXP _EN changes to TRUE. And the value of Out1 is
2.71828182845905 as EXP _In is 1.
Variable 1
Variable name Data type Current value
EXP_EN BOOL TRUE
EXP_In INT 0
Out1 LREAL 1.0
Variable 2
Variable name Data type Current value
EXP_EN BOOL TRUE
EXP_In INT 1
Out1 LREAL 2.71828182845905
The program
EXP 1
E XP_E N EN ENO
EXP_ In In Out O ut1
8_
8_
8- 1 0 7
DVP-50MC Series Motion Controller Operation Manual
8.9.23 EXPT
FB/FC Explanation Applicable model
EXPT is used to perform the exponentiation operation DVP50MC11T/DVP50MC11T-06
FC with In as the base number and Pwr as the exponent. The DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
result is output to Out.
EXPT
EN ENO
In Ou t
P wr
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In Base number Input Base number the variable that the input
parameter is connected to.
Depends on the data type of
Pwr Exponent Input Exponent the variable that the input
parameter is connected to.
Operation result with In as the Depends on the data type of
Calculation
Out Output base number and Pwr as the the variable that the output
result
exponent parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Pwr ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ●
_8 Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
EXPT is used to perform the exponentiation operation with In as the base number and Pwr as the
exponent. And the result is output to Out.
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
software if the data type of the output parameter is not LREAL.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
8- 1 0 8
Chapter 8 Logic Instructions
Programming Example
The data types of variables EXPT _In and EXPT_Pwr are both INT with their respective values 10
and 2. The data type of Out1 is LREAL. Then the value of Out1 is 100.0 when EXPT _EN changes
to TRUE. The value of Out1 is 100.0 as the values of EXPT _In and EXPT_Pwr are -10 and 2
respectively.
Variable 1
Variable name Data type Current value
EXPT_EN BOOL TRUE
EXPT_In INT 10
EXPT_Pwr INT 2
Out1 LREAL 100.0
Variable 2
Variable name Data type Current value
EXPT_EN BOOL TRUE
EXPT_In INT -10
EXPT_Pwr INT 2
Out1 LREAL 100.0
The program
E XPT 1
EXPT_E N EN ENO
EXP T_ In In Out O ut1
E XPT_Pwr Pwr
8_
8_
8- 1 0 9
DVP-50MC Series Motion Controller Operation Manual
8.9.24 RAND
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FC RAND is used to generate a random number. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
RA ND
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
In Reserved Input Reserved the variable that the input
parameter is connected to.
Depends on the data type of
Random
Out Output Random number the variable that the output
number
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In1 ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
RAND is used to generate a random number and the result is output to Out, within the range
0~32767.
The input value does not have any effect on the random number to generate. But the value must
_8 be input for In.
To get the random number within a specific range, users just need perform the MOD calculation
over the generated value and get the remainder. For example, the random number between 0
and10 can be generated by writing the program RAND(0) MOD10.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
8- 11 0
Chapter 8 Logic Instructions
Programming Example
A random number is generated by writing RAND(0) as below.
The variable table and program
Variable name Data type Current value
RAND_EN BOOL TRUE
RAND_In INT 0
Out1 DINT 256
RAND 1
RAND_E N EN ENO
RA ND_I n In Out O ut1
8_
8_
8- 111
DVP-50MC Series Motion Controller Operation Manual
8.9.25 TRUNC
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FC TRUNC is used to get the integral part of a real number. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
TRUNC
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Real number to Real number whose integer
In Input the variable that the input
convert part is got
parameter is connected to.
Depends on the data type of
Conversion
Out Output Integral part of a real number the variable that the output
result
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
TRUNC is used to get the integral part of a real number and the result is output to Out.
Users can choose different data types for the input parameter in this instruction. But the data type
_8 of the output parameter is only LINT. An error will occur during the compiling of the software if the
data type of the output parameter is not LINT.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
8- 11 2
Chapter 8 Logic Instructions
Programming Example
The data type of TRUNC _In is REAL with the value -5.6. The data type of Out1 is LINT. Then the
value of Out1 is -5 when TRUNC _EN changes to TRUE. And the value of Out1 is 10 as the values
of TRUNC _In 10.8.
Variable 1
Variable name Data type Current value
TRUNC_EN BOOL TRUE
TRUNC _In REAL -5.6
Out1 LINT -5
Variable 2
Variable name Data type Current value
TRUNC_EN BOOL TRUE
TRUNC _In REAL 10.8
Out1 LINT 10
The program
TRUNC 1
TRUNC_EN EN E NO
TRUNC_I n In Out O ut1
8_
8_
8- 11 3
DVP-50MC Series Motion Controller Operation Manual
8.9.26 FLOOR
FB/FC Explanation Applicable model
FLOOR is used to get the integral part of a real number.
DVP50MC11T/DVP50MC11T-06
The output value is the integral part of the real number
FC DVP50MC11P/DVP50MC11P-06
subtracted by 1 if the input real number is a negative DVP50MC11T-04S/DVP50MC11T-16S
number.
FLO OR
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Real number to Real number whose integer
In Input the variable that the input
convert part is got
parameter is connected to.
Depends on the data type of
Conversion
Out Output Integer part of a real number the variable that the output
result
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
_8 FLOOR is used to get the integral part of a real number and the result is output to Out. The output
value is the integral part of the real number if the input real number is a positive number. For
example, the output value is 3 if the input value is 3.5. The output value is the integral part of the
real number subtracted by 1 if the input real number is a negative number. For example, the output
value is -4 if the input value is -3.5.
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LINT. An error will occur during the compiling of the
software if the data type of the output parameter is not LINT.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
Programming Example
8- 11 4
Chapter 8 Logic Instructions
The data type of variable FLOOR _In is REAL with the value 5.6. The data type of Out1 is LINT.
Then the value of Out1 is 5 when FLOOR _EN changes to TRUE. And the value of Out1 is -11 as
the values of FLOOR _In -10.2.
Variable 1
Variable name Data type Current value
FLOOR_EN BOOL TRUE
FLOOR _In REAL 5.6
Out1 LINT 5
Variable 2
Variable name Data type Current value
FLOOR_EN BOOL TRUE
FLOOR _In REAL -10.2
Out1 LINT -11
The program
FL OOR 1
FLO OR_EN EN E NO
FLO OR_I n In Out Ou t1
8_
8_
8- 11 5
DVP-50MC Series Motion Controller Operation Manual
8.9.27 FRACTION
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FRACTION is used to get the fraction part of a real
FC DVP50MC11P/DVP50MC11P-06
number.
DVP50MC11T-04S/DVP50MC11T-16S
FRACTI ON
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of
Real number to Real number whose fraction
In Input the variable that the input
convert part is got
parameter is connected to.
Depends on the data type of
Conversion
Out Output Fraction part of a real number the variable that the output
result
parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
In ● ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
FRACTION is used to get the fraction part of a real number and the result is output to Out. The sign
of the result value should be the same as that of the input value.
Users can choose different data types for the input parameter in this instruction. But the data type
of the output parameter is restricted to LREAL. An error will occur during the compiling of the
_8 software if the data type of the output parameter is not LREAL.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if
the input variable is omitted. But the output variable is allowed to omit.
8- 11 6
Chapter 8 Logic Instructions
Programming Example
The data type of variable FRACTION _In is REAL with the value -5.6. The data type of Out1 is
LREAL. Then the value of Out1 is -0.6 when FRACTION _EN changes to TRUE. And the value of
Out1 is 0.8 as the values of FRACTION _In 10.8.
Variable 1
Variable name Data type Current value
FRACTION_EN BOOL TRUE
FRACTION _In REAL -5.6
Out1 LREAL -0.6
Variable 2
Variable name Data type Current value
FRACTION_EN BOOL TRUE
FRACTION _In REAL 10.8
Out1 LREAL 0.8
The program
FRACTIO N 1
FRACTION_E N EN E NO
FRACTIO N_ In In Out O ut1
8_
8_
8- 11 7
DVP-50MC Series Motion Controller Operation Manual
AND
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The number of operands can be Depends on the data type
increased or decreased through the of the variable that the
In1 to InN Operands Input
programming software. Maximum: 8. input parameter is
Minimum: 2. That is N=2 ~ 8. connected to.
Depends on the data type
Operation of the variable that the
Out Output AND operation result of In1 ~ InN
result output parameter is
connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ●
InN
Out ● ● ● ● ● ● ● ● ●
Note:
_8 The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
AND is used for performing a bitwise logical AND operation of two or more variables or constants
and the result is output to Out. That is Out = In1 & In2 &…& InN
The operational rule:
The corresponding bit of the output variable is TRUE when corresponding bits of input variables are
all TRUE as shown below. Otherwise, the corresponding bit of the output variable is FALSE.
8- 11 8
Chapter 8 Logic Instructions
Bit 7 B it 0
In 1 0 0 1 1 0 1 0 0
In 2 1 0 0 1 1 1 1 0
In 3 0 0 1 1 0 1 0 0
Out 0 0 0 1 0 1 0 0
In1~InN are allowed to be the variables of different data types when none of the data types of input
variables are BOOL.
When In1 to InN are the variables of different data types, take the data type which can include all
ranges of the values of In1~InN for the operation.
For example, if the data type of In1 is BYTE and In2 is WORD, the data type of Out is WORD. In
operation, the value of In1 is converted from BYTE to WORD as shown in the following figure. Bit8~
Bit 15 are complemented and their values are all 0. And then the logical AND of the bit values of In1
and In2 is conducted as below.
B it 7 Bit0
I n1 0 0 1 1 0 1 0 0
Bit 15 Bit 8
I n1_WO RD 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0
I n2 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1
Out 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0
If the data type of an input variable is BOOL, the data types of all input and output variables are
required to be BOOL. Otherwise, an error will occur in the compiling of the software.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if any
input variable is omitted. But the output variable is allowed to omit.
Programming Example
The data types of AND_In1, AND_In2 and Out1 are all BYTE. The values of AND_In1 and
AND_In2 are 10 and 50 respectively and the value of Out1 is 2 when AND_EN is TRUE.
The variable table and program
8_
Variable name Data type Current value
AND_EN BOOL TRUE
8_
AND_In1 BYTE 10
AND_In2 BYTE 50
Out1 BYTE 2
AND 1
AND_EN EN E NO
AND_I n1 In1 Out O ut1
AND_I n2 In 2
The data types of AND_In1, AND_In2 and Out1 are BYTE, WORD and WORD respectively. The
values of AND_In1 and AND_In2 are 255 and 256 respectively and the value of Out1 is 0 when
AND_EN is TRUE.
8- 11 9
DVP-50MC Series Motion Controller Operation Manual
AND 1
AND_EN EN E NO
AND_I n1 In1 Out O ut1
AND_I n2 In 2
_8
8- 1 2 0
Chapter 8 Logic Instructions
8.10.2 OR
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
OR is used for performing a logical OR operation of two
FC DVP50MC11P/DVP50MC11P-06
or more variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S
OR
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The number of operands can be Depends on the data type
increased or decreased through the of the variable that the
In1 to InN Operand Input
programming software. Maximum: 8. input parameter is
Minimum: 2. That is N=2 ~ 8. connected to.
Depends on the data type
Operation of the variable that the
Out Output OR operation result of In1 ~ InN
result output parameter is
connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ●
InN
Out ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
8_
OR is used for performing a bitwise logical OR operation of two or more variables or constants and 8_
the result is output to Out. That is Out= In1 OR In2 OR…OR InN.
The operational rule:
When corresponding bits of all input variables are all FALSE, the corresponding bit of the output
variable is FALSE. Otherwise, the corresponding bit of the output variable is TRUE.
8- 1 2 1
DVP-50MC Series Motion Controller Operation Manual
Bit7 B it 0
In1 0 0 1 1 0 1 0 0
In2 1 0 0 1 1 1 1 0
In3 0 0 1 1 0 1 0 0
Out 1 0 1 1 1 1 1 0
In1~InN are allowed to be the variables of different data types when none of the data types of input
variables are BOOL.
When In1 to InN are the variables of different data types, take the data type which can include all
ranges of the values of In1~InN for the operation.
For example, if the data type of In1 is BYTE and In2 is WORD, the data type of Out is WORD. In
operation, the value of In1 is converted from BYTE to WORD as shown in the following figure. Bit8~
Bit 15 are complemented and their values are all 0. And then the logical OR of the bit values of In1
and In2 is conducted as below.
B it 7 Bit0
I n1 0 0 1 1 0 1 0 0
Bit15 Bit8
I n1_WO RD 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0
In2 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1
Out 0 0 1 1 0 1 0 0 1 0 1 1 0 1 0 1
If the data type of an input variable is BOOL, the data types of all input and output variables are
required to be BOOL. Otherwise, an error will occur in the compiling of the software.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if any
input variable is omitted. But the output variable is allowed to omit.
Programming Example
The data types of OR_In1, OR_In2 and Out1 are all BYTE. The values of OR_In1 and OR_In2 are
10 and 50 respectively and the value of Out1 is 58 when OR_EN is TRUE.
The variable table and program
_8 Variable name Data type Current value
OR_EN BOOL TRUE
OR_In1 BYTE 10
OR_In2 BYTE 50
Out1 BYTE 58
OR 1
OR_EN EN E NO
OR_In 1 I n1 Out Ou t1
OR_In 2 In2
8- 1 2 2
Chapter 8 Logic Instructions
The data types of OR_In1, OR_In2 and Out1 are BYTE, WORD and WORD respectively. The
values of OR_In1 and OR_In2 are 255 and 256 respectively and the value of Out1 is 511 when
OR_EN is TRUE.
The variable table and program
Variable name Data type Current value
OR_EN BOOL TRUE
OR_In1 BYTE 255
OR_In2 WORD 256
Out1 WORD 511
OR 1
OR_EN EN E NO
OR_In 1 I n1 Out Ou t1
OR_In 2 In2
8_
8_
8- 1 2 3
DVP-50MC Series Motion Controller Operation Manual
8.10.3 NOT
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
NOT is used for the NOT operation taking the inverse
FC DVP50MC11P/DVP50MC11P-06
of a variable or constant.
DVP50MC11T-04S/DVP50MC11T-16S
NO T
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Input parameter to take the Depends on the data type of the variable
In Operand Input
inverse that the input parameter is connected to.
Depends on the data type of the variable
Operation
Out Output Not operation result that the output parameter is connected
result
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ● ● ● ● ● ●
Out ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
NOT is used for the bitwise NOT operation taking the inverse of the value of a variable or constant
and the result is output to Out.
The operational rule:
If one bit of the input variable is TRUE, the corresponding bit of the output variable is FALSE. If one
bit of the input variable is FALSE, the corresponding bit of the output variable is TRUE.
_8
Bit7 B it0
In 0 0 1 1 0 1 0 0
Out 1 1 0 0 1 0 1 1
8- 1 2 4
Chapter 8 Logic Instructions
Programming Example
The data types of NOT _In and Out1 are both BYTE. The value of In1 is 10 and the value of Out1
is 245 when NOT_EN is TRUE.
The variable table and program
Variable name Data type Current value
NOT_EN BOOL TRUE
NOT _In BYTE 10
Out1 BYTE 245
NO T 1
NO T_E N EN ENO
NO T_In In Ou t O ut1
8_
8_
8- 1 2 5
DVP-50MC Series Motion Controller Operation Manual
8.10.4 XOR
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
XOR is used for the XOR operation of two or more
FC DVP50MC11P/DVP50MC11P-06
variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S
XO R
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The number of operands can be Depends on the data type
increased or decreased through the of the variable that the
In1 to InN Operand Input
programming software. Maximum: 8. input parameter is
Minimum: 2. That is N=2 ~ 8. connected to.
Depends on the data type
Operation of the variable that the
Out Output XOR operation result of In1 ~ InN
result output parameter is
connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ●
InN
Out ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
_8 Function Explanation
XOR is used for the bitwise XOR operation of two or more variables or constants and the result is output
to Out. That is Out= In1 XOR In2 XOR…XOR InN.
The operational rule for XOR of In1 and In2 is shown in the following figure.
Bit7 B it0
In 1 0 0 1 1 0 1 0 0
In 2 1 0 0 1 1 1 1 0
Out 1 0 1 0 1 0 1 0
The steps for XOR operation when more than 2 input parameters exist are:
8- 1 2 6
Chapter 8 Logic Instructions
The XOR result of In1 and In2 is got first; then the XOR operation of the previous result and In3 is
conducted and so on. Finally, the XOR operation of the previous XOR result and InN is processed.
The XOR result of In1 and In2 is Out_Temp and the XOR result of Out_Temp and In3 is Out as
shown below.
B it 7 Bit0
I n1 0 0 1 1 0 1 0 0
I n2 1 0 0 1 1 1 1 0
O ut _Temp 1 0 1 0 1 0 1 0
I n3 1 0 1 1 1 0 0 0
O ut 0 0 0 1 0 0 1 0
In1~InN are allowed to be the variables of different data types when none of the data types of input
variables are BOOL.
When In1 to InN are the variables of different data types, take the data type which can include all
ranges of the values of In1~InN for the XOR operation.
For example, if the data type of In1 is BYTE and In2 is WORD, the data type of Out is WORD. In
operation, the value of In1 is converted from BYTE to WORD as shown in the following figure. (Bit8~
Bit 15 are supplemented and their values are all 0.) And then the logical XOR of the bit values of In1
and In2 is conducted as below.
B it 7 Bit0
I n1 0 0 1 1 0 1 0 0
Bit15 Bit8
In1_WORD 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0
In2 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1
O ut 0 0 1 1 0 1 0 0 1 0 0 1 0 0 0 1
If the data type of an input variable is BOOL, the data types of all input and output variables are
required to be BOOL. Otherwise, an error will occur in the compiling of the software.
8_
Precautions for Correct Use 8_
The input variables are not allowed to omit. An error will occur during the compiling of the software if any
input variable is omitted. But the output variable is allowed to omit.
Programming Example
The data types of XOR_In1, XOR_In2 and Out1 are all BYTE. The values of XOR_In1 and
XOR_In2 are 10 and 50 and the value of Out1 is 56 when XOR_EN is TRUE as shown in Variable
1.
The data types of XOR_In1, XOR_In2 and Out1 are BYTE, WORD and WORD. The values of
XOR_In1 and XOR_In2 are 255 and 256 and the value of Out1 is 511 when XOR_EN is TRUE as
shown in Variable 2.
Variable 1
8- 1 2 7
DVP-50MC Series Motion Controller Operation Manual
_8
8- 1 2 8
Chapter 8 Logic Instructions
8.10.5 XORN
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
XORN is used for an XORN operation of two or more
FC DVP50MC11P/DVP50MC11P-06
variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S
XO RN
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The number of operands can be Depends on the data type
increased or decreased through the of the variable that the
In1 to InN Operand Input
programming software. Maximum: 8. input parameter is
Minimum: 2. That is N=2 ~ 8. connected to.
Depends on the data type
Operatio of the variable that the
Out Output XORN operation result of In1 ~ InN
n result output parameter is
connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ●
InN
Out ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
8_
XORN is used for a bitwise XORN of two or more variables or constants and the result is output to Out. 8_
That is Out= In1 XORN In2 XORN…XORN InN.
The operational rule for XORN of In1 and In2 is shown in the following figure.
Bit7 B it0
In 1 0 0 1 1 0 1 0 0
In 2 1 0 0 1 1 1 1 0
Out 0 1 0 1 0 1 0 1
8- 1 2 9
DVP-50MC Series Motion Controller Operation Manual
The steps for XORN operation is for when more than 2 input parameters exist:
The XORN result of In1 and In2 is got first; then the XORN of the previous result and In3 is conducted
and so on. Finally, the XORN of the previous XORN result and InN is processed.
The XORN result of In1 and In2 is Out_Temp and the XORN result of Out_Temp and In3 is Out as
shown below.
B it 7 Bit0
I n1 0 0 1 1 0 1 0 0
I n2 1 0 0 1 1 1 1 0
O ut _Temp 0 1 0 1 0 1 0 1
I n3 1 0 1 1 1 0 0 0
O ut 0 0 0 1 0 0 1 0
In1~InN are allowed to be the variables of different data types when none of the data types of input
variables are BOOL.
When In1 to InN are the variables of different data types, take the data type which can include all
ranges of the values of In1~InN for the operation.
For example, if the data type of In1 is BYTE and In2 is WORD, the data type of Out is WORD. In
operation, the value of In1 is converted from BYTE to WORD as shown in the following figure. (Bit8~
Bit 15 are supplemented and their values are all 0.) And then the logical XORN of the bit values of
In1 and In2 is conducted as below.
B it 7 Bit0
I n1 0 0 1 1 0 1 0 0
Bit15 Bit8
_
In1_ WORD 0 0 0 0 0 0 0 0 0 0 1 1 0 1 0 0
In2 0 0 1 1 0 1 0 0 1 0 1 0 0 1 0 1
Ou t 1 1 0 0 1 0 1 1 0 1 1 0 1 1 1 0
_8
If the data type of an input variable is BOOL, the data types of all input and output variables are
required to be BOOL. Otherwise, an error will occur in the compiling of the software.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if any
input variable is omitted. But the output variable is allowed to omit.
Programming Example
The data types of XORN_In1, XORN_In2 and Out1 are all BYTE. The values of XORN_In1 and
XORN_In2 are 10 and 50 and the value of Out1 is 199 when XORN_EN is TRUE as shown in
Variable 1.
The data types of XORN_In1, XORN_In2 and Out1 are BYTE, WORD and WORD. The values of
XORN_In1 and XORN_In2 are 255 and 256 and the value of Out1 is 65535 when XORN _EN is
TRUE as shown in Variable 2.
8- 1 3 0
Chapter 8 Logic Instructions
Variable 1
Variable name Data type Current value
XORN_EN BOOL TRUE
XORN _In1 BYTE 10
XORN _In2 BYTE 50
Out1 BYTE 199
Variable 2
Variable name Data type Current value
XORN _EN BOOL TRUE
XORN _In1 BYTE 255
XORN _In2 WORD 256
Out1 WORD 65535
The program
X ORN 1
XO RN_E N EN ENO
XO RN_ In1 In1 Ou t Out1
XO RN_ In2 I n2
8_
8_
8- 1 3 1
DVP-50MC Series Motion Controller Operation Manual
SHL
EN ENO
In O ut
Nu m
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The original data to shift to Depends on the data type of the variable
In Data to shift Input
the left that the input parameter is connected to.
The number of bits by
Number to which all bits of the Depends on the data type of the variable
Num Input
shift original data are shifted to that the input parameter is connected to.
the left
Result from shifting all bits
Depends on the data type of the variable
of the original data by the
Out Result Output that the output parameter is connected
number of bits specified
to.
by Num to the left
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ● ● ● ● ●
Num ●
Out The data type of Out must be the same as In.
Note:
_8 The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
SHL is used to shift all bits of the value of In by the number of bits specified by Num to the left and the
result is output to Out.
When Num=2, all bits of the value of In are shifted by two bits to the left and the values of Bit0~Bit1 are
supplemented with 0 and Bit6~Bit7 are discarded as shown in the following figure.
8- 1 3 2
Chapter 8 Logic Instructions
Discarded
fill 0
Out 1 1 0 1 0 1 0 0
Programming Example
The data types of SHL_In and SHL_Num are UINT and USINT respectively and their values are
300 and 3 respectively. The data type of Out1 is BYTE and the value of Out1 is 2400 when
SHL_EN is TRUE.
The variable table and program
Variable name Data type Current value
SHL_EN BOOL TRUE
SHL_In UINT 300
SHL_Num USINT 3
Out1 UINT 2400
SHL 1
SHL_E N EN ENO
SHL_I n In Out O ut1
SHL_Num Num
Out 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0
Bit 15 B it 0
8_
8_
8- 1 3 3
DVP-50MC Series Motion Controller Operation Manual
8.11.2 SHR
FB/FC Explanation Applicable model
SHR is used to shift all bits of a variable or constant by DVP50MC11T/DVP50MC11T-06
FC the specified number of bits to the right and the result is DVP50MC11P/DVP50MC11P-06
output to Out. DVP50MC11T-04S/DVP50MC11T-16S
SHR
EN ENO
In O ut
Nu m
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The original data to shift to Depends on the data type of the variable
In Data to shift Input
the right that the input parameter is connected to.
The number of bits by
Number to which the bits of the Depends on the data type of the variable
Num Input
shift original data are shifted to that the input parameter is connected to.
the right
Result from shifting all bits
Depends on the data type of the variable
of the original data by the
Out Result Output that the output parameter is connected
number of bits specified
to.
by Num to the right
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ● ● ● ● ●
Num ●
Out The data type of Out must be the same as In.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
_8 Function Explanation
SHR is used to shift all bits of the value of In by the number of bits specified by Num to the right
and the result is output to Out.
When Num=2, all bits of the value of In are shifted by two bits to the right and Bit0~Bit1 of In are
discarded and the value of Bit6~Bit7 are supplemented with 0 as shown in the following figure.
8- 1 3 4
Chapter 8 Logic Instructions
Disc arded
Fill 0
Out 0 0 1 0 1 1 0 1
Programming Example
The data types of SHR_In and SHR_Num are UINT and USINT respectively and their values are
300 and 3 respectively. The data type of Out1 is UINT and the value of Out1 is 37 when SHR_EN
is TRUE.
8_
O ut1 0 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1 8_
B it 15 Bit0
8- 1 3 5
DVP-50MC Series Motion Controller Operation Manual
8.11.3 ROL
FB/FC Explanation Applicable model
ROL is used to rotate left all bits of a variable or DVP50MC11T/DVP50MC11T-06
FC constant by the specified number of bits and the result DVP50MC11P/DVP50MC11P-06
is output to Out. DVP50MC11T-04S/DVP50MC11T-16S
ROL
EN ENO
In O ut
Nu m
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Data to The original data to rotate Depends on the data type of the variable
In Input
rotate left that the input parameter is connected to.
The number of bits by
Number of which the bits of the Depends on the data type of the variable
Num Input
bits original data are rotated to that the input parameter is connected to.
the left
Result from rotating all
bits of the original data by Depends on the data type of the variable
Out Result Output the number of bits that the output parameter is connected
specified by Num to the to.
left
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ● ● ● ● ●
Num ●
Out The data type of Out must be the same as In.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
_8 Function Explanation
ROL is used to rotate all bits of the value of In by the number of bits specified by Num to the left and
the result is output to Out.
Via ROL, the bits shifted out of the left will shift to the null bits in the right one by one. When Num=2,
all bits of the value of In rotates by two bits to the left. The rotation method is that Bit0~Bit5 are shifted
to Bit2~Bit7 respectively, Bit 7 is shifted to Bit1 and Bit 6 is shifted to Bit0.
Num= 2, shif ted by two bits left
B it 7 Bit0 Bit7 B it 0
In 1 0 1 1 0 1 0 1 1 1 0 1 0 1 1 0 Out
8- 1 3 6
Chapter 8 Logic Instructions
Programming Example
The data types of ROL_In and ROL_Num are UINT and USINT respectively and their values are
300 and 3 respectively. The data type of Out1 is BYTE and the value of Out1 is 2400 when
ROL_EN is TRUE.
The variable table and program
Variable name Data type Current value
ROL_EN BOOL TRUE
ROL _In UINT 300
ROL _Num USINT 3
Out1 UINT 2400
RO L 1
RO L_EN EN E NO
ROL_I n In Out Ou t1
RO L_Num Num
Bit1 5 Bit 0
Out 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0
8_
8_
8- 1 3 7
DVP-50MC Series Motion Controller Operation Manual
8.11.4 ROR
FB/FC Explanation Applicable model
ROR is used to rotate all bits of a variable or constant DVP50MC11T/DVP50MC11T-06
FC by the specified number of bits to the right and the result DVP50MC11P/DVP50MC11P-06
is output to Out. DVP50MC11T-04S/DVP50MC11T-16S
RO R
EN ENO
In O ut
Nu m
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Data to The original data to rotate Depends on the data type of the variable
In Input
rotate to the right that the input parameter is connected to.
The number of bits by
Number of Depends on the data type of the variable
Num Input which the bits of data are
bits that the input parameter is connected to.
rotated to the right
Result from rotating all
bits of the original data by Depends on the data type of the variable
Out Result Output the number of bits that the output parameter is connected
specified by Num to the to.
right
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ● ● ● ● ●
Num ●
Out The data type of Out must be the same as In.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
_8 Function Explanation
ROR is used to rotate all bits of the value of In by the number of bits specified by Num to the right and the
result is output to Out.
Via ROR, the bits shifted out of the right will shift to the null bits in the left one by one. When Num=2, all
bits of the value of In rotates by two bits to the right. The rotation method is that Bit2~Bit7 are shifted to
Bit0~Bit5 respectively, Bit0 is shifted to Bit6 and Bit1 is shifted to Bit7.
Num=2 , s hift ed b y two bits righ t
8- 1 3 8
Chapter 8 Logic Instructions
Programming Example
The data types of ROR_In and ROR_Num are UINT and USINT respectively and their values are
300 and 3 respectively. The data type of Out1 is BYTE and the value of Out1 is 32805 when
ROR_EN is TRUE.
The variable table and program
Variable name Data type Current value
ROR_EN BOOL TRUE
ROR_In UINT 300
ROR_Num USINT 3
Out1 UINT 32805
ROR 1
RO R_EN EN ENO
ROR_In In O ut Out 1
RO R_ Nu m Nu m
B it 15 B it0
Out 1 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1
8_
8_
8- 1 3 9
DVP-50MC Series Motion Controller Operation Manual
MAX
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The comparison data can
be added or removed
Comparison while the program is being Depends on the data type of the variable
In1 to InN Input
data written. The maximum that the input parameter is connected to.
number of comparison
data is 8. N=2~8
Depends on the data type of the variable
Comparison The largest value of In1 ~
Out Output that the output parameter is connected
result InN
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
InN
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
_8 Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The Max instruction finds the largest value of two or more variables or constants and the largest
value is output to Out.
In 1 : INT#10
In 2 : INT#20
MAX
O ut: INT#30
In 3 : INT#30
In 4 : INT#-20
8- 1 4 0
Chapter 8 Logic Instructions
When the data types of input variables are not BOOL, TIME, DATE, TOD or STRING, the input
parameters In1~InN are allowed to be the variables of different data types.
When the data types of input variables are one of BOOL, TIME, DATE, TOD and STRING, all the
input variables and output variable should be of the data type. For example, if the data type of In1
is TIME, the data type of In2~InN must be TIME. Otherwise, an error will occur during the compiling
of the software.
Programming Example
The data types of MAX_In1, MAX_In2 and MAX_In3 are INT, UINT and DINT respectively. The
data type of Out1 is DINT. If the values of MAX_In1, MAX_In2 and MAX_In3 are -10, 50 and 100
respectively, the value of Out1 is 100 when MAX_EN is TRUE.
The variable table and program
Variable name Data type Current value
MAX_EN BOOL TRUE
MAX_In1 INT - 10
MAX_In2 UINT 50
MAX_In3 DINT 100
Out1 DINT 100
MAX 1
MAX _EN EN E NO
MA X_In 1 I n1 Out Ou t1
MA X_In 2 I n2
MA X_In 3 I n3
The data types of MAX_In1 and MAX_In2 are TIME. The data type of Out1 is TIME.
If the values of MAX_In1 and MAX_In2 are T#1ms and T#50ms respectively, the value of Out1 is
T#50ms when MAX_EN is TRUE.
The variable table and program
Variable name Data type Current value
MAX_EN BOOL TRUE
MAX_In1 TIME T#1ms
MAX_In2 TIME T#50ms
8_
Out1 TIME T#50ms 8_
MA X 1
MAX _E N EN E NO
MA X _In1 In1 Out Out1
MA X _In2 In2
8- 1 4 1
DVP-50MC Series Motion Controller Operation Manual
8.12.2 MIN
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
MIN is used for finding the smallest value of two or more
FC DVP50MC11P/DVP50MC11P-06
variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S
MIN
EN ENO
In1 Ou t
. .
. .
. .
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The comparison data can
be added or removed
Comparison while the program is being Depends on the data type of the variable
In1 to InN Input
data written. The maximum that the input parameter is connected to.
number of comparison
data is 8. N=2~8.
Depends on the data type of the variable
Comparison The smallest value of In1
Out Output that the output parameter is connected
result ~ InN
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1
to ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
InN
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
_8 Function Explanation
The MIN instruction finds the smallest value of two or more variables and constants and the
smallest value is output to Out.
In 1 : INT#10
In 2 : INT#20
MIN
O ut: INT#-20
In 3 : INT#30
In 4 : INT#-20
When the data types of input variables are not BOOL, TIME, DATE, TOD or STRING, the input
parameters In1~InN are allowed to be the variables of different data types.
8- 1 4 2
Chapter 8 Logic Instructions
When the data types of input variables are one of BOOL, TIME, DATE, TOD and STRING, all the
input variables and output variable should be of the data type. For example, if the data type of In1
is TIME, the data type of In2~InN must be TIME. Otherwise, an error will occur during the compiling
of the software.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software
if the input variables are omitted. But the output variable is allowed to omit.
The length of the data type of the output variable must contain the length of all input parameters.
Otherwise, an error will occur during the compiling of the software.
Programming Example
The data types of MIN_In1, MIN_In2 and MIN_In3 are INT, UINT and DINT respectively. The data
type of Out1 is DINT. If the values of MIN_In1, MIN_In2 and MIN_In3 are -10, 50 and 100
respectively, the value of Out1 is -10 when MIN_EN is TRUE.
The variable table and program
Variable name Data type Current value
MIN_EN BOOL TRUE
MIN_In1 INT - 10
MIN_In2 UINT 50
MIN_In3 DINT 100
Out1 DINT - 10
MIN 1
MI N_ EN EN ENO
MI N_ In1 In 1 O ut Out1
MI N_ In2 In 2
MI N_ In3 In 3
The data types of MIN_In1 and MIN_In2 are TIME. The data type of Out1 is TIME.
If the values of MIN_In1 and MIN_In2 are T#1ms and T#50ms respectively, the value of Out1 is
T#1ms when MIN_EN is TRUE.
The variable table and program
Variable name Data type Current value
MIN_EN BOOL TRUE
MIN_In1 TIME T#1ms
MIN_In2 TIME T#50ms
Out1 TIME T#1ms
MIN 1
MIN_E N EN ENO
MI N_In1 In1 Out Out1 8_
MI N_In2 In2 8_
8- 1 4 3
DVP-50MC Series Motion Controller Operation Manual
8.12.3 SEL
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
SEL is used for selecting one of two variables or
FC DVP50MC11P/DVP50MC11P-06
constants and the selected value is output to Out.
DVP50MC11T-04S/DVP50MC11T-16S
SE L
EN ENO
G Ou t
In0
In1
Parameters
Parameter Input/
Meaning Description Valid range
name Output
In0 is selected when G is
FALSE; Depends on the data type of the variable
G Gate Input
In1 is selected when G is that the input parameter is connected to.
TRUE.
Depends on the data type of the variable
In0 and In1 Selections Input Data to be selected
that the input parameter is connected to.
Depends on the data type of the variable
Selection
Out Output Selection result that the output parameter is connected
result
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
G ●
In0
and ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
In1
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
_8 Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
According to the selection condition G, the SEL instruction selects one of two variables or
constants and the selection result is output to Out.
8- 1 4 4
Chapter 8 Logic Instructions
In0 : I NT#1 0
SE L
O ut:I NT#1 0
In1 : I NT#2 0 G=FALSE
In0 : I NT#1 0
SE L
O ut:I NT#2 0
In1 : I NT#2 0 G=TRUE
When the data types of input variables are not BOOL, TIME, DATE, TOD or STRING, the input
parameters In0~In1 are allowed to connect the variables of different data types.
When the data types of input variables are one of BOOL, TIME, DATE, TOD and STRING, all the
input variables and output variable should be of the data type. For example, if the data type of the
variable connected to In0 is TIME, the data types of the variables connected to In1 and Out must
be TIME. Otherwise, an error will occur during the compiling of the software.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software
if the input variables are omitted. But the output variable is allowed to omit.
The length of the data type of the output variable must contain the length of the variables that the
input parameters In0 and In1 connect. Otherwise, an error will occur during the compiling of the
software.
Programming Example
The data types of SEL_G, SEL_In0 and SEL_In1 are BOOL, UINT and DINT and the data type of
Out1 is DINT. When SEL_EN is TRUE, the value of Out1 is 50 if the values of SEL_G, SEL_In0
and SEL_In1 are FALSE, 50 and 100 respectively as shown in the following table Variable 1. If the
values of SEL_G, SEL_In0 and SEL_In1 are TRUE, 50 and 100 respectively, the value of Out1 is
100 as shown in the following table Variable 2.
Variable 1
Variable name Data type Current value
SEL_EN BOOL TRUE
SEL_G BOOL FALSE
SEL_In0 UINT 50
SEL_In1 DINT 100
Out1 DINT 50
Variable 2
Variable name Data type Current value
SEL_EN BOOL TRUE
8_
8_
SEL_G BOOL TRUE
SEL_In0 UINT 50
SEL_In1 DINT 100
Out1 DINT 100
The program
SE L 1
SEL_E N EN ENO
SEL _G G Ou t O ut1
SEL_ In0 In0
SEL_ In1 In1
8- 1 4 5
DVP-50MC Series Motion Controller Operation Manual
8.12.4 MUX
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
MUX is used for selecting one of two or more variables
FC DVP50MC11P/DVP50MC11P-06
or constants and the result is output to Out.
DVP50MC11T-04S/DVP50MC11T-16S
MUX
EN ENO
K Ou t
In0
. In1
.
.
InN
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of the variable
K Gate Input Gate
that the input parameter is connected to.
The selections can be
added or removed while
In0, In1 to the program is being Depends on the data type of the variable
Selections Input
InN written. The maximum that the input parameter is connected to.
number of selections is 8.
N=2~8.
Depends on the data type of the variable
Selection
Out Output Selection result that the output parameter is connected
result
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
K ●
In0,
_8 In1
● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
to
InN
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
Based on the selection condition K, the MUX instruction selects one of In0~InN and the selection
result is output to Out. The value of Out corresponds to the value of K as shown in the following
table.
8- 1 4 6
Chapter 8 Logic Instructions
Programming Example
The data types of MUX_K, MUX_In0 and MUX_In1 are UINT, UINT and DINT and the data type of
Out1 is DINT. When MUX_EN is TRUE, the value of Out1 is 50 if the values of MUX_K, MUX_In0
and MUX_In1 are 0, 50 and 100 as shown in the following table Variable 1. If the values of MUX_K,
MUX_In0 and MUX_In1 are 1, 50 and 100, the value of Out1 is 100 as shown in the following table
Variable 2.
Variable 1
Variable name Data type Current value
MUX_EN BOOL TRUE
MUX_K USINT 0
MUX_In0 UINT 50
MUX_In1 DINT 100
Out1 DINT 50
Variable 2
Variable name Data type Current value
MUX_EN BOOL TRUE 8_
MUX_K UINT 1
8_
MUX_In0 UINT 50
MUX_In1 DINT 100
Out1 DINT 100
The program
MUX 1
MUX_E N EN ENO
MUX_K K Ou t O ut1
MUX_ In0 In0
MUX_ In1 In1
8- 1 4 7
DVP-50MC Series Motion Controller Operation Manual
8.12.5 LIMIT
FB/FC Explanation Applicable model
LIMIT is used for limiting the output value within the DVP50MC11T/DVP50MC11T-06
FC zone between the specified minimum and maximum DVP50MC11P/DVP50MC11P-06
values. DVP50MC11T-04S/DVP50MC11T-16S
L IMIT
EN ENO
MN Ou t
In
MX
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Minimum Depends on the data type of the variable
MN Input Minimum value
value that the input parameter is connected to.
Depends on the data type of the variable
In Data to limit Input Data to limit
that the input parameter is connected to.
Maximum Depends on the data type of the variable
MX Input Maximum value
value that the input parameter is connected to.
Depends on the data type of the variable
Processing
Out Output Processing result that the output parameter is connected
result
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
MN ● ● ● ● ● ● ● ● ● ● ● ● ● ●
In ● ● ● ● ● ● ● ● ● ● ● ● ● ●
MX ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Out ● ● ● ● ● ● ● ● ● ● ● ● ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
_8
Function Explanation
The LIMIT instruction limits the value within range between MN and MX and the result is output to
Out.
The value of In The value of Out
In < MN MN
MN ≤ In ≤MX In
MX < In MX
The instruction allows input parameters MN, In and MX to connect the variables of different data
types. When MN, In and MX are the variables of different data types, the calculation is performed
with the data type which can contain the range of the values of MN, In and MX. For example, if the
data type of MN is INT and the data types of In and MX are DINT, the data type of Out is DINT.
8- 1 4 8
Chapter 8 Logic Instructions
The instruction allows the input parameters and the output parameter to connect the variables of
different data types. But the length of the data type of the output variable must contain the length of
the variables that the input parameters In0 ~ InN connect. Otherwise, an error will occur during the
compiling of the software.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software
if the input variables are omitted. But the output variable is allowed to omit.
Programming Example
The data types of LIMIT_MN, LIMIT_In and LIMIT_MX are UINT, UINT and DINT and the data type
of Out1 is DINT. When LIMIT_EN is TRUE, the value of Out1 is 50 if the values of LIMIT_MN,
LIMIT_In and LIMIT_MX are 1, 50 and 100 as shown in the following table Variable 1. If the values
of LIMIT_MN, LIMIT_In and LIMIT_MX are 2, 200 and 100, the value of Out1 is 100 as shown in
the following table Variable 2. If the values of LIMIT_MN, LIMIT_In and LIMIT_MX are 50, 10 and
100, the value of Out1 is 50 as shown in the following table Variable 3.
Variable 1
Variable name Data type Current value
LIMIT_EN BOOL TRUE
LIMIT_MN UINT 1
LIMIT_In UINT 50
LIMIT_MX DINT 100
Out1 DINT 50
Variable 2
Variable name Data type Current value
LIMIT_EN BOOL TRUE
LIMIT_MN UINT 2
LIMIT_In UINT 200
LIMIT_MX DINT 100
Out1 DINT 100
Variable 3
Variable name Data type Current value
LIMIT_EN BOOL TRUE
LIMIT_MN UINT 50
LIMIT_In UINT 10
LIMIT_MX DINT 100
Out1 DINT 50
8_
The program 8_
LIMI T 1
L IMIT_EN EN E NO
L IMIT_MN MN Out Ou t1
LIMIT_I n In
LIMI T_ MX MX
8- 1 4 9
DVP-50MC Series Motion Controller Operation Manual
8.12.6 BAND
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
BAND performs the deadband control and the
FC DVP50MC11P/DVP50MC11P-06
processing result is output to Out.
DVP50MC11T-04S/DVP50MC11T-16S
B AND
EN ENO
MN Ou t
In
MX
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Minimum Depends on the data type of the variable
MN Input Minimum value
value that the input parameter is connected to.
Depends on the data type of the variable
In Data to limit Input Data to limit
that the input parameter is connected to.
Maximum Depends on the data type of the variable
MX Input Maximum value
value that the input parameter is connected to.
Depends on the data type of the variable
Processing
Out Output Processing result that the output parameter is connected
result
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
MN ● ●
In ● ●
MX ● ●
Out ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
_8
Function Explanation
The BAND instruction performs the dead band control of the value of In according to the maximum
value, MX and the minimum value, MN and the processing result is output to Out.
The value of In The value of Out
In < MN In - MN
MN ≤In ≤MX 0
MX < In In - MX
The instruction allows input parameters MN, In and MX to connect the variables of different data
types. When MN, In and MX are the variables of different data types, the calculation is performed
with the data type which can contain the range of the values of MN, In and MX. For example, if the
data type of MN is REAL and the data types of In and MX are LREAL, the data type of Out is
LREAL.
8- 1 5 0
Chapter 8 Logic Instructions
The instruction allows the input parameters and the output parameter to connect the variables of
different data types. But the length of the data type of the output variable must contain the length of
the variables that the input parameters connect. Otherwise, an error will occur during the compiling
of the software.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software
if the input variables are omitted. But the output variable is allowed to omit.
When the value of MN is greater than that of MX, the instruction will still be executed normally and
the value of Out will be equal to that of MX.
Programming Example
The data types of BAND_MN, BAND_In and BAND_MX are REAL and the data type of Out1 is
LREAL. When BAND_EN is TRUE, the value of Out1 is 0 if the values of BAND_MN, BAND_In and
BAND_MX are 1, 50 and 100 as shown in the following table Variable 1. If the values of
BAND_MN, BAND_In and BAND_MX are 2, 250 and 100, the value of Out1 is 150 (150=250-100)
as shown in the following table Variable 2. If the values of BAND_MN, BAND_In and BAND_MX
are 50, 10 and 100, the value of Out1 is - 40 (- 40 = 10 – 50) as shown in the following table
Variable 3.
Variable 1
Variable name Data type Current value
BAND_EN BOOL TRUE
BAND_MN REAL 1
BAND_In REAL 50
BAND_MX REAL 100
Out1 LREAL 0
Variable 2
Variable name Data type Current value
BAND_EN BOOL TRUE
BAND_MN REAL 2
BAND_In REAL 250
BAND_MX REAL 100
Out1 LREAL 150
Variable 3
Variable name Data type Current value
BAND_EN BOOL TRUE
BAND_MN REAL 50
BAND_In REAL 10
8_
8_
BAND_MX REAL 100
Out1 LREAL -40
The program
BAND 1
B AND_EN EN ENO
B AND_MN MN O ut Out 1
BAND_In In
BAND_MX MX
8- 1 5 1
DVP-50MC Series Motion Controller Operation Manual
8.12.7 ZONE
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
ZONE is used for adding a bias value to the input value
FC DVP50MC11P/DVP50MC11P-06
and the processing result is output to Out.
DVP50MC11T-04S/DVP50MC11T-16S
ZO NE
EN ENO
BiasN Ou t
In
Bias P
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Negative Depends on the data type of the variable
BiasN Input Negative bias
bias value that the input parameter is connected to.
Data to Depends on the data type of the variable
In Input Data to control
control that the input parameter is connected to.
Positive bias Depends on the data type of the variable
BiasP Input Positive bias
value that the input parameter is connected to.
Depends on the data type of the variable
Processing
Out Output Processing result that the output parameter is connected
result
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
Bias
● ●
N
In ● ●
Bias
● ●
P
_8 Out ● ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The ZONE instruction adds the set bias value to the value of In and the processing result is output
to Out. When the value of In is a negative value, BiasN is the bias value. When the value of In is a
positive value, BiasP is the bias value.
The value of In The value of Out
In<0 In+BiasN
In=0 0
In>0 In+BiasP
8- 1 5 2
Chapter 8 Logic Instructions
The instruction allows input parameters BiasN, In and BiasP to connect the variables of different
data types. When BiasN, In and BiasP are the variables of different data types, the calculation is
performed with the data type which can contain the range of the values of BiasN, In and BiasP. For
example, if the data type of BiasN is INT and the data types of In and BiasP are DINT, the data
type of Out is DINT.
The instruction allows the input parameters and the output parameter to connect the variables of
different data types. But the length of the data type of the output variable must contain the length of
the variables that the input parameters connect. Otherwise, an error will occur during the compiling
of the software.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software
if the input variables are omitted. But the output variable is allowed to omit.
When the value of BiasN is larger than BiasP, the instruction will still be executed normally.
Programming Example
The data types of ZONE_BiasN, ZONE_In and ZONE_BiasP are INT, INT and DINT and the data
type of Out1 is DINT. When ZONE_EN is TRUE, the value of Out1 is 0 if the values of
ZONE_BiasN, ZONE_In and ZONE_BiasP are 1, 0 and 100 as shown in the following table
Variable 1. If the values of ZONE_BiasN, ZONE_In and ZONE_BiasP are 2, 50 and 100, the value
of Out1 is 150 (150 = 50 + 100) as shown in the following table Variable 2. If the values of
ZONE_BiasN, ZONE_In and ZONE_BiasP are 50, -10 and 100, the value of Out1 is 40 (40 = - 10 +
50) as shown in the following table Variable 3.
Variable 1
Variable name Data type Current value
ZONE_EN BOOL TRUE
ZONE_BiasN INT 1
ZONE_In INT 0
ZONE_BiasP DINT 100
Out1 DINT 0
Variable 2
Variable name Data type Current value
ZONE_EN BOOL TRUE
ZONE_BiasN INT 2
ZONE_In INT 50
ZONE_BiasP DINT 100
Out1 DINT 150
Variable 3
Variable name Data type Current value 8_
ZONE_EN BOOL TRUE 8_
ZONE_BiasN INT 50
ZONE_In INT - 10
ZONE_BiasP DINT 100
Out1 DINT 40
The program
ZO NE 1
ZONE_E N EN ENO
ZONE_B iN Bias N Ou t O ut1
ZONE_ In In
ZO NE _BiP Bias P
8- 1 5 3
DVP-50MC Series Motion Controller Operation Manual
BOO L_TO_* **
EN E NO
In Out
Parameters
Parameter
Meaning Input/ Output Description Valid range
name
Depends on the data type of the variable
In Data to convert Input Data to convert
that the input parameter is connected to.
Depends on the data type of the variable
Out Conversion result Output Conversion result that the output parameter is connected
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ●
Out The data type of Out must be the same as “***” of the instruction name.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
BOOL to Bit String
Relevant instructions:
BO OL_TO_ BYTE B OOL_ TO _WORD
_8 EN E NO EN E NO
In Out In Out
8- 1 5 4
Chapter 8 Logic Instructions
The rule for the conversion from Boolean to Bit-String is shown in the following table. (The
format of the bit-string value and the hexadecimal expression are to be confirmed.)
Bit String
Boolean
BYTE WORD DWORD LWORD
FALSE 16#00 16#0000 16#0000_0000 16#0000_0000_0000_0000
TRUE 16#01 16#0001 16#0000_0001 16#0000_0000_0000_0001
BOOL to Integer
Relevant instructions:
BOO L_TO_USI NT BO OL_TO_S INT
EN E NO EN E NO
In Out In Out
The rule that Boolean data are converted into Integer data is as the following table shows.
Integer
Boolean
USINT UINT UDINT ULINT SINT INT DINT LINT
FALSE 0 0 0 0 0 0 0 0
TRUE 1 1 1 1 1 1 1 1
The rule that Boolean data are converted into Real-number data is as the following table
shows.
8_
Boolean
Real
8_
REAL LREAL
FALSE 0 0
TRUE 1 1
8- 1 5 5
DVP-50MC Series Motion Controller Operation Manual
The rule that Boolean data are converted into Time or Date data is as the following table
shows.
Time and Date
Boolean
TIME DATE TOD DT
FALSE T#0ms D#1970-1-1 TOD# DT#
TRUE T#1ms D#1970-1-1 TOD# DT#
BOOL to String
Relevant instructions:
BOO L_TO_STRING
EN E NO
In Out
The rule that Boolean data are converted into String data is as the following table shows. (The
string format is to be confirmed.)
String
Boolean
STRING
FALSE ‘FALSE’
TRUE ‘TRUE’
Precautions for Correct Use
The input variables are not allowed to omit. If the input variables are omitted, an error will occur during
the compiling of the software. The output variable is allowed to omit.
_8
8- 1 5 6
Chapter 8 Logic Instructions
Parameters
Parameter
Meaning Input/ Output Description Valid range
name
Depends on the data type of the variable
In Data to convert Input Data to convert
that the input parameter is connected to.
Depends on the data type of the variable
Out Conversion result Output Conversion result that the output parameter is connected
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ●
Out The data type of Out must be the same as “***” of the instruction name.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
Bit string to BOOL
Relevant instructions:
BY TE _TO _BO OL WORD_TO _BO OL
EN ENO EN ENO
In Out In Out
8_
DWO RD_ TO_ BOO L LWO RD_TO_B OO L 8_
EN ENO EN ENO
In Out In Out
8- 1 5 7
DVP-50MC Series Motion Controller Operation Manual
The rule that Bit-string data are converted into Boolean data is as the following table shows.
Data type The value of In corresponds to the value of Out
In Out In Out
16#00 FALSE
BYTE BOOL
16#01~16#FF TRUE
16#0000 FALSE
WORD BOOL
16#0001~16#FFFF TRUE
16#0000_0000 FALSE
DWORD BOOL
16#0000_0001~16#FFFF_FFFF TRUE
16#0000_0000_0000_0000 FALSE
LWORD BOOL 16#0000_0000_0000_0001~
TRUE
16#FFFF_FFFF_FFFF_FFFF
Bit string to Bit string
Bit-string data can be converted to Bit-string data. And some instructions are shown below.
B YTE_TO_WO RD WORD_TO _BY TE
EN ENO EN ENO
In Out In Out
There are two kinds of conversion for different types of bit-string data. One is the conversion of
the less-length data to the greater-length data. The other is the conversion of the greater-length
data to the less-length data.
The less-length data is converted to the greater-length data by writing the values of all bits of
the less-length data to corresponding bits of the greater-length data and setting the values of
the remaining bits of the greater-length data to 0.
See the following example that the Byte data in In is converted to the Word data in Out. The
values of Bit0~Bit7 of In are copied and pasted to Bit0~Bit7 of Out. And the values of Bit8~Bit15
of Out are set to 0.
The less -lengt h dat a are conv ert ed
to the gre ater-lengt h dat a
_8
Fi ll 0
B it 15 Bit 8
O ut 0 0 0 0 0 0 0 0 1 0 1 1 0 1 0 1 WO RD
The greater-length data are converted to the less-length data by revising the values of all bits of
the less-length data into the values of the corresponding bits of the greater-length data and the
values of the remaining bits of the greater-length data are not converted and have no impact on
the conversion.
See the following example that the Word data In is converted to the Byte data Out. The values
of Bit0~Bit7 of In are copied and pasted to Bit0~Bit7 of Out. And the values of Bit8~Bit15 of In
are not converted and have no impact on the conversion.
8- 1 5 8
Chapter 8 Logic Instructions
WO RD_ TO _BYTE
EN ENO
In O ut
Out 1 0 1 1 0 1 0 1 BYTE
The Bit-string data are converted into the Bit-string data as the following table shows.
Data type The value of In corresponds to the value of Out
In Out In Out
WORD 16#00~16#FF 16#0000~16#00FF
DWORD 16#00~16#FF 16#0000_0000~16#0000_00FF
BYTE
16#0000_0000_0000_0000~
LWORD 16#00~16#FF
16#0000_0000_0000_00FF
BYTE 16#**00~16#**FF 16#00~16#FF
DWORD 16#0000~16#FFFF 16#0000_0000~16#0000_FFFF
WORD
16#0000_0000_0000_0000~
LWORD 16#0000~16#FFFF
16#0000_0000_0000_FFFF
BYTE 16#****_**00~16#****_**FF 16#00~16#FF
WORD 16#****_0000~16#****_FFFF 16#0000~16#FFFF
DWORD
16#0000_0000_0000_0000~
LWORD 16#0000_0000~16#FFFF_FFFF
16#0000_0000_FFFF_FFFF
16#****_****_****_**00~
BYTE 16#00~16#FF
16#****_****_****_**FF
16#****_****_****_0000~
LWORD WORD 16#0000~16#FFFF
16#****_****_****_FFFF
16#****_****_0000_0000~
DWORD 16#0000_0000~16#FFFF_FFFF
16#****_****_FFFF_FFFF
Bit string to Integer
The Bit-string data can be converted to the Integer data. And some instructions are shown
below.
BYTE_ TO _USINT BYTE_ TO_ SINT
EN ENO EN ENO
In Out In Out 8_
8_
B YTE_TO_I NT WORD_TO_I NT
EN ENO EN ENO
In Out In Out
The rule for the conversion of bit-string data into integer data is consistent with that for the
conversion of bit-string data into bit-string data.
The less-length data is converted to the greater-length data by writing the values of all bits of
the less-length data to corresponding bits of the greater-length data and setting the values of
the remaining bits of the greater-length data to 0.
8- 1 5 9
DVP-50MC Series Motion Controller Operation Manual
The greater-length data is converted to the less-length data by revising the values of all bits of
the less-length data into the values of the corresponding bits of the greater-length data and the
values of the remaining bits of the greater-length data are not converted and have no impact on
the conversion.
If the lengths of the two data to convert are equal, all values of all bits of In are copied and
pasted to the corresponding bits of Out.
The Bit-string data are converted into the Integer data as the following table shows.
Data type The value of In corresponds to the value of Out
In Out In Out
USINT 16#00~16#FF 0~255
UINT 16#00~16#FF 0~255
UDINT 16#00~16#FF 0~255
ULINT 16#00~16#FF 0~255
BYTE 16#00~16#7F 0~127
SINT
16#80~16#FF -128~-1
INT 16#00~16#FF 0~255
DINT 16#00~16#FF 0~255
LINT 16#00~16#FF 0~255
USINT 16#**00~16#**FF 0~255
UINT 16#0000~16#FFFF 0~65535
UDINT 16#0000~16#FFFF 0~65535
ULINT 16#0000~16#FFFF 0~65535
16#**00~16#**7F 0~127
WORD SINT
16#**80~16#**FF -128~-1
16#0000~16#7FFF 0~32767
INT
16#8000~16#FFFF -32768~-1
DINT 16#0000~16#FFFF 0~65535
LINT 16#0000~16#FFFF 0~65535
USINT 16#****_**00~16#****_**FF 0~255
UINT 16#****_0000~16#****_FFFF 0~65535
16#0000_0000~16#FFFF_FFF
UDINT 0~4294967295
F
16#0000_0000~16#FFFF_FFF
ULINT 0~4294967295
F
16#****_**00~16#****_**7F 0~127
SINT
16#****_**80~16#****_**FF -128~-1
_8 DWORD
16#****_0000~16#****_7FFF 0~32767
INT
16#****_8000~16#****_FFFF -32768~-1
16#0000_0000~16#7FFF_FFF
0~2147483647
F
DINT
16#8000_0000~16#FFFF_FFF
-2147483648~-1
F
16#0000_0000~16#FFFF_FFF
LINT 0~4294967295
F
16#****_****_****_**00~
USINT 0~255
16#****_****_****_**FF
LWORD
16#****_****_****_0000~
UINT 0~65535
16#****_****_****_FFFF
8- 1 6 0
Chapter 8 Logic Instructions
The Bit-string data are converted into the Real-number data as the following table shows.
Data type The value of In corresponds to the value of Out
In Out In Out
REAL 16#00~16#FF 0~2.55e+2 8_
BYTE
LREAL 16#00~16#FF 0~2.55e+2 8_
REAL 16#0000~16#FFFF 0~6.5535e+4
WORD
LREAL 16#0000~16#FFFF 0~6.5535e+4
16#0000_0000~
REAL 0~4.294967e+9
16#FFFF_FFFF
DWORD
16#0000_0000~
LREAL 0~4.294967295e+9
16#FFFF_FFFF
16#0000_0000_0000_0000~
REAL 0~1.844674e+19
16#FFFF_FFFF_FFFF_FFFF
LWORD
16#0000_0000_0000_0000~
LREAL 0~1.84467440737095e+19
16#FFFF_FFFF_FFFF_FFFF
8- 1 6 1
DVP-50MC Series Motion Controller Operation Manual
The rule for the conversion of Bit-string data into Time or Date data is the same as that for the
conversion of the Bit-string data into unsigned integer data.
The Bit-string data are converted into the Time and Date data as the following table shows.
Data type The value of In corresponds to the value of Out
In Out In Out
TIME 16#00~16#FF T#0ns~T#255ns
DATE 16#00~16#FF D#1970-1-1
BYTE TOD 16#00~16#FF TOD#0:0:0~ TOD#0:0:0.255
DT#1970-1-1-0:0:0~ DT#1970-
DT 16#00~16#FF
1-1-0:4:15
TIME 16#0000~16#FFFF T#0ns~T#65us535ns
DATE 16#0000~16#FFFF D#1970-1-1
WORD TOD 16#0000~16#FFFF TOD#0:0:0~ TOD#0:1:5.535
DT#1970-1-1-0:0:0~ DT#1970-
DT 16#0000~16#FFFF
1-1-18:12:15
T#0ns~
TIME 16#0000_0000~16#FFFF_FFFF
T#4s294ms967us295ns
DATE 16#0000_0000~16#FFFF_FFFF D#1970-1-1~D#2016-2-7
16#0000_0000~16#0526_5BFF
TOD#0:0:0~
DWORD 16#0526_5C00~16#0A4C_B7FF
TOD TOD#23:59:59.999
…….
16#FC57_9C00~16#FFFF_FFFF TOD#0:0:0~ TOD#17:2:47.295
DT#1970-1-1-0:0:0~ DT#2016-
DT 16#0000_0000~16#FFFF_FFFF
2-7-6:28:15
16#0000_0000_0000_0000~ T#213503d23h34m33s709ms5
TIME
_8 16# FFFF_FFFF_FFFF_FFFF 51us615ns
16#****_****_0000_0000~
DATE D#1970-1-1~D#2016-2-7
16#****_****_FFFF_FFFF
16#****_****_0000_0000~
16#****_****_0A4C_B7FF
TOD#0:0:0~
LWORD 16#****_****_0526_5C00~
TOD#23:59:59.999
TOD 16#****_****_0A4C_B7FF
……
16#****_****_0000_0000~
TOD#0:0:0~ TOD#17:2:47.295
16#****_****_FFFF_FFFF
16#****_****_0000_0000~ DT#1970-1-1-0:0:0~ DT#2016-
DT
16#****_****_FFFF_FFFF 2-7-6:28:15
8- 1 6 2
Chapter 8 Logic Instructions
The Bit-string data are converted into the String data as the following table shows.
Data type The value of In corresponds to the value of Out
In Out In Out
BYTE STRING 16#00~16#FF ‘00’~’FF’
WORD STRING 16#0000~16#FFFF ‘0000’~’FFFF’
DWORD STRING 16#0000_0000~16#FFFF_FFFF ‘00000000’~’FFFFFFFF’
16#0000_0000_0000_0000~ ‘0000000000000000’~
LWORD STRING
16# FFFF_FFFF_FFFF_FFFF ‘FFFFFFFFFFFFFFFF’
When the Bit-string data are converted to the String data, the length of the output String data must
meet the length of the input parameter. For example, during the use of the BYTE_TO_STRING
instruction, the output String data must contain more than 2 characters. Otherwise, an error will occur
during the compiling of the software.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if the
input variable is omitted. But the output variable is allowed to omit.
8_
8_
8- 1 6 3
DVP-50MC Series Motion Controller Operation Manual
8.13.3 Integers_TO_***
FB/FC Explanation Applicable model
Integers_TO_*** instructions convert integers into the DVP50MC11T/DVP50MC11T-06
FC data of basic data types. “***” can be any basic data DVP50MC11P/DVP50MC11P-06
type. DVP50MC11T-04S/DVP50MC11T-16S
In tegers_TO_* **
EN ENO
In O ut
Parameters
Parameter
Meaning Input/ Output Description Valid range
name
Depends on the data type of the variable
In Data to convert Input Data to convert
that the input parameter is connected to.
Depends on the data type of the variable
Out Conversion result Output Conversion result that the output parameter is connected
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ● ● ● ● ●
Out The data type of Out must be the same as “***” of the instruction name.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
Integer to BOOL
Some instructions are shown below.
S INT_ TO _BOO L INT_TO _BO OL
EN ENO EN ENO
In O ut In O ut
_8
USI NT_TO_B OOL UINT_ TO _BOO L
EN ENO EN ENO
In O ut In O ut
8- 1 6 4
Chapter 8 Logic Instructions
The Integer data are converted into the Boolean data as the following table shows. If the
Integer value is 0, the conversion result is FALSE. If not 0, the result is TRUE. For details on
the conversion rule, see the table as follows.
Data type The value of In corresponds to the value of Out
In Out In Out
0 FALSE
USINT BOOL
1~255 TRUE
0 FALSE
UINT BOOL
1~65535 TRUE
0 FALSE
UDINT BOOL
1~4294967295 TRUE
0 FALSE
ULINT BOOL
1~18446744073709551645 TRUE
0 FALSE
SINT BOOL
-128~-1, 1~127 TRUE
0 FALSE
INT BOOL
-32768~-1, 1~32767 TRUE
0 FALSE
DINT BOOL
-2147483648~-1, 1~2147483647 TRUE
0 FALSE
LINT BOOL -9223372036854775808~-1,
TRUE
1~9223372036854775807
Integer to Bit string
The Integer data can be converted to the Bit-string data. And some instructions are shown
below.
SI NT_ TO _BYTE INT_TO _WORD
EN ENO EN ENO
In O ut In O ut
The rule for the conversion of the Integer data into the Bit-string data is the same as that for the
conversion of the Bit-string data into the Bit-string data. Refer to section 8.13.2 for details.
The Integer data are converted into the Bit-string data as the following table shows.
Data type The value of In corresponds to the value of Out
8_
8_
In Out In Out
BYTE 16#00~16#FF 16#00~16#FF
WORD 16#00~16#FF 16#0000~16#00FF
USINT DWORD 16#00~16#FF 16#0000_0000~16#0000_00FF
16#0000_0000_0000_0000~
LWORD 16#00~16#FF
16#0000_0000_0000_00FF
BYTE 16#**00~16#**FF 16#00~16#FF
WORD 16#0000~16#FFFF 16#0000~16#FFFF
UINT DWORD 16#0000~16#FFFF 16#0000_0000~16#0000_FFFF
16#0000_0000_0000_0000~
LWORD 16#0000~16#FFFF
16#0000_0000_0000_FFFF
UDINT BYTE 16#****_**00~16#****_**FF 16#00~16#FF
8- 1 6 5
DVP-50MC Series Motion Controller Operation Manual
8- 1 6 6
Chapter 8 Logic Instructions
1. The rule for the conversion of the Integer data into the Integer data is the same as that for
the conversion of the Bit-string data into the Bit-string data.
2. The less-length data are converted to the greater-length data by writing the values of all
bits of the less-length data to corresponding bits of the greater-length data and setting the
values of the remaining bits of the greater-length data to 0.
3. The data of greater length is converted to the data of less length by revising the values of
all bits of the less-length data into the values of the corresponding bits of the greater-
length data and the values of the remaining bits of the greater-length data are not
converted and have no impact on the conversion.
4. If the lengths of the two data to convert are equal, all values of all bits of In are copied
and pasted to the corresponding bits of Out.
The Bit-string data are converted into the Integer data as the following table shows.
Data type The value of In corresponds to the value of Out
In Out In Out
USINT 16#00~16#FF 0~255
UINT 16#00~16#FF 0~255
UDINT 16#00~16#FF 0~255
ULINT 16#00~16#FF 0~255
USINT 16#00~16#7F 0~127
SINT
16#80~16#FF - 128~ - 1
INT 16#00~16#FF 0~255
DINT 16#00~16#FF 0~255
LINT 16#00~16#FF 0~255
USINT 16#**00~16#**FF 0~255
UINT 16#0000~16#FFFF 0~65535
UDINT 16#0000~16#FFFF 0~65535
ULINT 16#0000~16#FFFF 0~65535
16#**00~16#**7F 0~127
UINT SINT
16#**80~16#**FF - 128~ -1
16#0000~16#7FFF 0~32767
INT
16#8000~16#FFFF - 32768~ -1
DINT 16#0000~16#FFFF 0~65535
LINT 16#0000~16#FFFF 0~65535
USINT 16#****_**00~16#****_**FF 0~255
UINT 16#****_0000~16#****_FFFF 0~65535
UDINT 16#0000_0000~16#FFFF_FFFF 0~4294967295
ULINT 16#0000_0000~16#FFFF_FFFF 0~4294967295 8_
SINT
16#****_**00~16#****_**7F 0~127 8_
UDINT 16#****_**80~16#****_**FF -128~-1
16#****_0000~16#****_7FFF 0~32767
INT
16#****_8000~16#****_FFFF -32768~-1
16#0000_0000~16#7FFF_FFFF 0~2147483647
DINT
16#8000_0000~16#FFFF_FFFF -2147483648~-1
LINT 16#0000_0000~16#FFFF_FFFF 0~4294967295
16#****_****_****_**00~
USINT 0~255
16#****_****_****_**FF
ULINT
16#****_****_****_0000~
UINT 0~65535
16#****_****_****_FFFF
8- 1 6 7
DVP-50MC Series Motion Controller Operation Manual
8- 1 6 8
Chapter 8 Logic Instructions
16#****_****_****_**00~
USINT 0~255
16#****_****_****_**FF
16#****_****_****_0000~
UINT 0~65535
16#****_****_****_FFFF
16#****_****_0000_0000~
UDINT 0~4294967295
16#****_****_FFFF_FFFF
16#0000_0000_0000_0000~
ULINT 0~18446744073709551645
16# FFFF_FFFF_FFFF_FFFF
16#****_****_****_**00~
0~127
16#****_****_****_**7F
SINT
16#****_****_****_**80~
-128~-1
16#****_****_****_**FF
LINT
16#****_****_****_0000~
0~32767
16#****_****_****_7FFF
INT
16#****_****_****_8000~
-32768~-1
16#****_****_****_FFFF
16#****_****_0000_0000~
0~2147483647
16#****_****_7FFF_FFFF
DINT
16#****_****_8000_0000~
-2147483648~-1
16#****_****_FFFF_FFFF
16#0000_0000_0000_0000~
0~9223372036854775807
16#7FFF_FFFF_FFFF_FFFF
LINT
16#8000_0000_0000_0000~
-9223372036854775808~0
16#FFFF_FFFF_FFFF_FFFF
Integer to Real number
The Integer data can be converted to the Real-number data. And some instructions are shown
below.
SI NT_TO_RE AL INT_TO_LREA L
EN ENO EN ENO
8_
In O ut In O ut
8_
USINT_TO_REAL UINT_TO_LREA L
EN ENO EN ENO
In O ut In O ut
8- 1 6 9
DVP-50MC Series Motion Controller Operation Manual
The Integer data are converted into the Real-number data as the following table shows.
Data type The value of In corresponds to the value of Out
In Out In Out
REAL 0~255 0~2.55e+2
USINT
LREAL 0~255 0~2.55e+2
REAL 0~65535 0~6.5535e+4
UINT
LREAL 0~65535 0~6.5535e+4
REAL 0~4294967295 0~4.294967e+9
UDINT
LREAL 0~4294967295 0~4.294967295e+9
REAL 0~18446744073709551615 0~1.844674e+19
ULINT
LREAL 0~18446744073709551615 0~1.84467440737095e+19
REAL -128~127 -1.28e+2~1.27e+2
SINT
LREAL -128~127 -1.28e+2~1.27e+2
REAL -32768~32767 -3.2768e+4~3.2767e+4
INT
LREAL -32768~32767 -3.2768e+4~3.2767e+4
REAL -2147483648~2147483647 -2.147483e+9~2.147483e+9
DINT
LREAL -2147483648~2147483647 -2.147483e+9~2.147483e+9
-9223372036854775808~
REAL -9.223372e+18~9.223372e+18
9223372036854775807
LINT
-9223372036854775808~ -9.22337203685477e+18~
LREAL
9223372036854775807 9.22337203685477e+18
Integer to Time or Date
The Integer data are converted into the Time or Date data and some instructions are shown as
below.
S INT_TO _TIME INT_TO_DATE
EN ENO EN ENO
In O ut In O ut
The rule for the conversion of the Integer data into the Time or Date data is the same as that for
the conversion of the Integer data into the unsigned integer data.
The Integer data are converted into the Time or Date data as the following table shows.
_8
Data type The value of In corresponds to the value of Out
In Out In Out
TIME 16#00~16#FF T#0ns~T#255ns
DATE 16#00~16#FF D#1970-1-1
USINT TOD 16#00~16#FF TOD#0:0:0~ TOD#0:0:0.255
DT#1970-1-1-0:0:0~ DT#1970-
DT 16#00~16#FF
1-1-0:4:15
TIME 16#0000~16#FFFF T#0ns~T#65us535ns
UINT DATE 16#0000~16#FFFF D#1970-1-1
TOD 16#0000~16#FFFF TOD#0:0:0~ TOD#0:1:5.535
8- 1 7 0
Chapter 8 Logic Instructions
TIME 16#00000000~16#FFFFFFFF
T#0ns~
8_
T#4s294ms967us295ns
8_
DATE 16#00000000~16#FFFFFFFF D#1970-1-1~D#2016-2-7
16#00000000~16#05265BFF TOD#0:0:0~ TOD#23:59:59.999
DINT 16#05265C00~16#0A4CB7FF
TOD
…….
16#FC579C00~16#FFFFFFFF TOD#0:0:0~ TOD#17:2:47.295
DT#1970-1-1-0:0:0~ DT#2016-
DT 16#00000000~16#FFFFFFFF
2-7-6:28:15
16#0000000000000000~ T#213503d23h34m33s709ms5
TIME
16# FFFFFFFFFFFFFFFF 51us615ns
LINT
16#********00000000~
DATE D#1970-1-1~D#2016-2-7
16#********FFFFFFFF
8- 1 7 1
DVP-50MC Series Motion Controller Operation Manual
Integer to String
The Integer data can be converted to the String data and some instructions are shown as
below.
SINT_TO_STRING I NT_TO_S TRI NG
EN ENO EN ENO
In O ut In O ut
The Integer data are converted into the String data as the following table shows.
Data type The value of In corresponds to the value of Out
In Out In Out
USINT STRING 0~255 ‘0’~’255’
UINT STRING 0~65535 ‘0’~’65535’
UDINT STRING 0~4294967295 ‘0’~’4294967295’
ULINT STRING 0~18446744073709551615 ‘0’~’18446744073709551615’
SINT STRING -128~127 ‘-128’~’127’
INT STRING -32768~32767 ‘-32768’~’32767’
DINT STRING -2147483648~2147483647 ‘-2147483648’~’2147483647’
-9223372036854775808~ ‘-9223372036854775808’~
LINT STRING
9223372036854775807 ‘9223372036854775807’
_8 When the Bit-string data are converted to the String data, the length of the output String data must meet
the length of the input parameter.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if the
input variable is omitted. But the output variable is allowed to omit.
8- 1 7 2
Chapter 8 Logic Instructions
Re al numbe rs_TO_* **
EN ENO
In O ut
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of the variable that
In Data to convert Input Data to convert
the input parameter is connected to.
Depends on the data type of the variable that
Out Conversion result Output Conversion result
the output parameter is connected to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ●
Out The data type of Out must be the same as “***” of the instruction name.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
Real Number to BOOL
Relevant instructions:
The real numbers are converted into the Boolean data as the following table shows. If the real
number is 0, the conversion result is FALSE. If the real number is not 0, the conversion result
is TRUE. For details on the rule, see the table as follows.
Data type The value of In corresponds to the value of Out
In Out In Out
-3.402823E+38~-1.175495E-38 TRUE
REAL BOOL 0 FALSE
1.175495E-38~3.402823E+38 TRUE
LREAL BOOL -1.79769313486231E+308~ TRUE
8- 1 7 3
DVP-50MC Series Motion Controller Operation Manual
For the real number-to-integer conversion, there are two cases in which the fractional part is
truncated and rounded up as follows.
Case 1: If the first digital number of the fractional part is less than 5, the fractional part will be
truncated and the integer part will not change.
Case 2: If the first digital number of the fractional part is greater than or equal to 5, the fractional
part will be truncated and the integer part will add by 1.
Output result
Input value
Data type Output value
SINT 1
1.36
USINT 1
Case 1
SINT -2
-2.4
USINT 254
SINT 2
1.6
USINT 2
Case 2
SINT -3
-2.6
USINT 253
Note:
For the Real Number-to-Integer Conversion, there are two cases for the value of a real number.
_8 1. If the number of input digits of a real number exceeds what is allowed, the result will be an
unsure value. Please set a limit in the user program in order to get a correct value.
For example: Then the input value is 123456789 and the number of its digits exceeds the set
limit 7. The digits which go beyond the limit are abnormal. Then the output value is
123456792.
2. If the number of input digits does not exceed the set limit, the result is calculated based on
the conversion rule.
8- 1 7 4
Chapter 8 Logic Instructions
The rule for the conversion of real numbers into bit strings is the same as that for the conversion
of real numbers into unsigned integers.
Real Number to Real Number
Real numbers can be converted to real numbers. And some instructions are shown below.
REA L_TO _LREA L L RE AL_TO_RE AL
EN ENO EN ENO
In O ut In O ut
For the real number-to-time or date conversion, the real number is converted to the integer first
and then the integer is converted to the time or date. For relevant contents, refer to the real
number-to- integer conversion and integer-to-time or date conversion.
Real Number to String
Real numbers can be converted to strings. And some instructions are shown below.
REAL _TO _STRING LREAL _TO _STRING
EN ENO EN ENO
In O ut In O ut
The rule for the real number-to-string conversion is the same as that for the integer-to-string
conversion. Refer to section 8.13.3 for details.
Precautions for Correct Use
8_
The input variable is not allowed to omit. An error will occur during the compiling of the software if the
input variable is omitted. But the output variable is allowed to omit.
8_
8- 1 7 5
DVP-50MC Series Motion Controller Operation Manual
8.13.5 Times,dates_TO_***
FB/FC Explanation Applicable model
Times, dates_TO_*** instructions convert Time or date DVP50MC11T/DVP50MC11T-06
FC data into the data of basic data types. “***” can be any DVP50MC11P/DVP50MC11P-06
basic data type. DVP50MC11T-04S/DVP50MC11T-16S
Time s, dates_TO_* **
EN ENO
In O ut
Parameters
Parameter
Meaning Input/ Output Description Valid range
name
Depends on the data type of the variable
In Data to convert Input Data to convert
that the input parameter is connected to.
Depends on the data type of the variable
Out Conversion result Output Conversion result that the output parameter is connected
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ●
Out The data type of Out must be the same as “***” of the instruction name.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
Time and Date to Bool, Bit String, Integer, Real Number and String
The rule for the conversion of the time and date into the bool, bit string, integer, real number and
string is the same as that for the conversion of the unsigned integer into bool, bit string, integer, real
number and string. Refer to section 8.13.5 for details.
Time and Date to Time and Date
The time and date data can be converted to each other. And some instructions are shown
_8 below.
TIME_TO_DATE DATE_TO_TI ME
EN ENO EN ENO
In O ut In O ut
The rule for the conversion of the time and date data into the time and date data is the same as
that for the conversion of unsigned integers into unsigned integers. The units must be uniform
during the conversion. The unit of TIME is ns (nanosecond) and the unit of others is ms
(millisecond).
Precautions for Correct Use
8- 1 7 6
Chapter 8 Logic Instructions
The input variable is not allowed to omit. An error will occur during the compiling of the software if the
input variable is omitted. But the output variable is allowed to omit.
8_
8_
8- 1 7 7
DVP-50MC Series Motion Controller Operation Manual
8.13.6 Strings_TO_***
FB/FC Explanation Applicable model
Strings_TO_*** instructions convert String data into the DVP50MC11T/DVP50MC11T-06
FC data of basic data types. “***” can be any basic data DVP50MC11P/DVP50MC11P-06
type. DVP50MC11T-04S/DVP50MC11T-16S
St ring_TO_* **
EN ENO
In O ut
Parameters
Parameter
Meaning Input/ Output Description Valid range
name
Depends on the data type of the variable
In Data to convert Input Data to convert
that the input parameter is connected to.
Depends on the data type of the variable
Out Conversion result Output Conversion result that the output parameter is connected
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ●
Out The data type of Out must be the same as “***” of the instruction name.
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
String to Bool
Relevant instructions:
STRING _TO _BO OL
EN ENO
In O ut
_8 The rule for the String-to-Bool conversion is that the output Bool value is TRUE only when the
string value is TRUE or true. Otherwise, the output is FALSE.
String to Integer
Strings can be converted to integers. And some instructions are shown below.
STRI NG_TO_S INT S TRI NG _TO_USI NT
EN ENO EN ENO
In O ut In O ut
8- 1 7 8
Chapter 8 Logic Instructions
For the string-to-integer conversion, the string is required to be the integer value such
as ’123’, ’-123’ and ’+123’. The string like ’M123’ is not allowed to convert to the integer. The
conversion examples are shown in the following table.
Output result
Input value
Data type Output value
‘123’ SINT 123
‘+123’ SINT 123
‘-123’ SINT -123
The conversion is not allowed and the original
‘M123’ SINT
value of the output variable is retained.
For the string-to-real number conversion, the string is required to be the real number value
such as ’123’, ’-123.123’ and ’1.23e+5’. The conversion examples are shown in the following
table.
Output result
Input value
Data type Output value
‘123’ REAL 123
‘-123.123’ REAL -123.123
‘1.23e+5’ REAL -1.23e+5
The conversion is not allowed and the original
‘M123.123’ REAL
value of the output variable is retained.
8- 1 7 9
DVP-50MC Series Motion Controller Operation Manual
The rule for the string-to-bit string conversion is the same as that for the string-to integer
conversion.
Precautions for Correct Use
The input variable is not allowed to omit. An error will occur during the compiling of the software if the
input variable is omitted. But the output variable is allowed to omit.
_8
8- 1 8 0
Chapter 8 Logic Instructions
Input Parameters
Valid range Validation
Parameter name Function Data type
(Default) timing
Specify the slave which 1~127 When Execute
Axis is to be controlled by the USINT (The variable value changes from
instruction must be set) FALSE to TRUE
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
When Execute
The index of a parameter
Index UINT 0 changes from
to be read
FALSE to TRUE
When Execute
The subindex of a
SubIndex USINT 0 changes from
parameter to be read
FALSE to TRUE
Output Parameters
Parameter name Function Data type Valid range
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE 8_
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE 8_
Error TRUE when there is an error. BOOL TRUE / FALSE
Contains error codes when an error occurs. Please
ErrorID WORD
refer to section 12.2 for the corresponding error code.
The data type of the read parameter.
1: Byte,
Data Type USINT
2: Word,
4: Double Word
Data The value of the parameter which has been read UDINT
8- 1 8 1
DVP-50MC Series Motion Controller Operation Manual
The method of calculating the index and subindex of a servo drive parameter:
Index= a servo drive parameter value (Hex) + 2000 (Hex)
Subindex= 0.
Example:
The index and subindex of the servo drive parameter P6-10 are [2000 + 060A(the hexdecimal
value of P6-10) ] 260A and 0 respectively.
2. The variable table and program
Initial
Variable name Data type
value
ReadPm_C DMC_ReadParameter_CANopen
ReadPm_C_Ex BOOL FALSE
ReadPm_C_Done BOOL
ReadPm_C_Bsy BOOL
ReadPm_C_Act BOOL
ReadPm_C_Err BOOL
ReadPm_C_ErrID WORD
ReadPm_C_DaTy USINT
ReadPm_C_Dat UDINT
ReadP m_C
DMC_ReadParameter_CANopen 1
A xis1 Axis Done ReadPm_C_Done
ReadPm_C_Ex Execute Busy ReadPm_C_Bsy
16#2 60A Index Active ReadPm_C_Act
0 S ubIndex Error ReadPm_C_Err
ErrorID ReadPm_C_ErrID
DataType ReadPm_C_DaTy
Data ReadPm_C_Dat
3. For the index and subindex of other slave parameters, refer to CANopen-related manual of the
slave.
_8
Output Update Timing
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When Execute changes from
When the reading of the
Done TRUE to FALSE after the
parameter content is completed.
instruction execution is completed.
When Error changes to TRUE
Busy When Execute changes to TRUE When Done changes from FALSE
to TRUE
When Error changes to TRUE
When the slave starts being
Active When Done changes from FALSE
controlled by the instruction
to TRUE
8- 1 8 2
Chapter 8 Logic Instructions
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When an error occurs in the
instruction execution or the input When Execute changes from
Error
parameters for the instruction are TRUE to FALSE
illegal.
Output Timing Chart
Cas e1 Cas e2
E xec ut e
Don e
Bus y
Ac tiv e
Error
E rrorID
Dat aty pe
Dat a
Case 1: Busy and Active change to TRUE when Execute changes from FALSE to TRUE and one
period later, Done changes to TRUE and Datatype and Data show corresponding data. When
Done changes to TRUE, Busy and Active change to FALSE. When Execute changes from
TRUE to FALSE, Done changes from TRUE to FALSE and Datatype and Data retain original
values.
Case 2: Before DMC_ReadParameter_CANopen is executed, the input parameter value such as axis
No: 0 is illegal. When Execute changes from FALSE to TRUE, Error changes from FALSE to
TRUE, the values of Datatype and Data are cleared to 0 and ErrorID shows corresponding
error codes. As Execute changes from TRUE to FALSE, Error changes from TRUE to FALSE
and the content of ErrorID is cleared to 0.
Functions
DMC_ReadParameter_CANopen is used to read the parameter value of a slave. Users can specify the index
and subindex of the parameter to be read.
Programming Example
Below is an example of DMC_ReadParameter_CANopen instruction execution.
The variable table and program
Variable name Data type Current value
8_
ReadPm_C1 DMC_ReadParameter_CANopen
Axis1 USINT 1 8_
ReadPm_C1_Ex BOOL TRUE
ReadPm_C1_Done BOOL TRUE
ReadPm_C1_Bsy BOOL FALSE
ReadPm_C1_Act BOOL FALSE
ReadPm_C1_Err BOOL FALSE
ReadPm_C1_ErrID WORD FALSE
ReadPm_C1_DaTy USINT 2
ReadPm_C1_Dat UDINT 5000
WritePm_C DMC_WriteParameter_CANopen
WritePm_C_Done BOOL TRUE
8- 1 8 3
DVP-50MC Series Motion Controller Operation Manual
ReadPm_C1
DMC_ReadParameter_CANopen 1
Axis1 Axis Done ReadPm_C1_Done
ReadPm_C1_Ex E xecute Busy ReadPm_C1_Bsy
16#2137 I ndex A ctive ReadPm_C1_Act
0 SubIndex Error ReadPm_C1_Err
ErrorID ReadPm_C1_ErrID
DataType ReadPm_C1_DaTy
Data ReadPm_C1_Dat
Writ ePm_C
DMC_WriteParameter_CANopen 2
Axis1 Axis Done WritePm_C_Done
ReadPm_C1_Done E xecute Busy WritePm_C_Bsy
16#2137 I ndex A ctive WritePm_C_Act
0 SubIndex Error WritePm_C_Err
2 DataType ErrorID WritePm_C_ErrID
16#03E8 Data
ReadPm_C2
DMC_ReadParameter_CANopen 3
Axis1 Axis Done ReadPm_C2_Done
WritePm_C_Done E xecute Busy ReadPm_C2_Bsy
16#2137 I ndex A ctive ReadPm_C2_Act
_8 0 SubIndex Error ReadPm_C2_Err
ErrorID ReadPm_C2_ErrID
DataType ReadPm_C2_DaTy
Data ReadPm_C2_Dat
8- 1 8 4
Chapter 8 Logic Instructions
Timing Chart
ReadPm _C1
ReadPm_C1_Ex
ReadPm_C1_Done
ReadPm_C1_ Bsy
ReadPm_C1_Act
ReadPm_C1_DaTy
ReadPm_C1_Dat
Wri teP m_C
ReadPm_C1_Done
WritePm_C_Done
WritePm_C_Bsy
WritePm_C_Act
ReadPm _C2
WritePm_C_Don e
ReadPm_C2_Don e
ReadPm_C2_Bsy
ReadPm_C2_Act
ReadPm_C2_DaTy
ReadPm_C2_Dat
8_
8_
8- 1 8 5
DVP-50MC Series Motion Controller Operation Manual
DMC_WriteParameter_CANopen
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
DMC_WriteParameter_CANopen is used to set a
FB DVP50MC11P/DVP50MC11P-06
parameter value of a slave.
DVP50MC11T-04S/DVP50MC11T-16S
DMC_WriteParameter_CANopen_ins tanc e
DMC_WriteParameter_CANopen
Ax is Done
Ex ecut e Busy
Index Ac tive
SubIndex Error
DataTy pe ErrorI D
Data
Input Parameters
Valid range Validation
Parameter name Function Data type
(Default) timing
Specify the slave which 1~127 When Execute
Axis is to be controlled by the USINT (The variable value changes from
instruction must be set) FALSE to TRUE
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
The index of a parameter
Index UINT
which is set
The subindex of a
SubIndex USINT
parameter which is set
The data type of the
parameter which is set
DataType 1: Byte, USINT
2: Word,
4: Double Word.
The content value of the
Data UDINT
parameter which is set
Notes:
1. The value of DataType must indicate the data type of the parameter which is set. If the filled value
is incorrect, an error will occur in the instruction.
_8 2. For the method of calculating the index and subindex of CANopen slave parameter, refer to
Introduction of Axis Parameters in Chapter 9.
Output Parameters
Parameter name Function Data type Valid range
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
Error TRUE when there is an error. BOOL TRUE / FALSE
Contains error codes when an error occurs. Please
ErrorID WORD
refer to section 12.2 for the corresponding error code.
8- 1 8 6
Chapter 8 Logic Instructions
Ca se1 Case2
E xecute
Done
Busy
Active
Error
E rro rID
Case 1: Busy and Active change to TRUE when Execute changes from FALSE to TRUE and one
period later, Done changes to TRUE. When Done changes to TRUE, Busy and Active change
to FALSE. When Execute changes from TRUE to FALSE, Done changes from TRUE to
FALSE.
Case 2: Before DMC_WriteParameter_CANopen is executed, the input parameter value such as axis
No: 0 is illegal. After Execute changes from FALSE to TRUE, Error changes from FALSE to
TRUE and ErrorID shows corresponding error codes. As Execute changes from TRUE to
FALSE, Error changes from TRUE to FALSE and the content of ErrorID is cleared to 0.
Function
8_
DMC_WriteParameter_CANopen is used to set the parameter value of a slave. Users can specify the index 8_
and subindex of the parameter which is to be set.
Programming Example
Below is an example of one DMC_WriteParameter_CANopen instruction execution.
The variable table and program
Variable name Data type Initial value
ReadPm_C1 DMC_ReadParameter_CANopen
Axis1 USINT 1
ReadPm_C1_Ex BOOL TRUE
ReadPm_C1_Done BOOL TRUE
8- 1 8 7
DVP-50MC Series Motion Controller Operation Manual
_8
8- 1 8 8
Chapter 8 Logic Instructions
ReadPm_C1
DMC_ReadParameter_CANopen 1
Axis1 Axis Done ReadPm_C1_Done
ReadPm_C1_Ex E xecute Busy ReadPm_C1_Bsy
16#2137 I ndex A ctive ReadPm_C1_Act
0 SubIndex Error ReadPm_C1_Err
ErrorID ReadPm_C1_ErrID
DataType ReadPm_C1_DaTy
Data ReadPm_C1_Dat
Writ ePm_C
DMC_WriteParameter_CANopen 2
Axis1 Axis Done WritePm_C_Done
ReadPm_C1_Done E xecute Busy WritePm_C_Bsy
16#2137 I ndex A ctive WritePm_C_Act
0 SubIndex Error WritePm_C_Err
2 DataType ErrorID WritePm_C_ErrID
16#03E8 Data
ReadPm_C2
DMC_ReadParameter_CANopen 3
Axis1 Axis Done ReadPm_C2_Done
WritePm_C_Done E xecute Busy ReadPm_C2_Bsy
16#2137 I ndex A ctive ReadPm_C2_Act
0 SubIndex Error ReadPm_C2_Err
ErrorID ReadPm_C2_ErrID
DataType ReadPm_C2_DaTy
Data ReadPm_C2_Dat
Timing chart
ReadPm _C1
ReadPm_C1_Ex
ReadPm_C1_Done
ReadPm_C1_ Bsy
ReadPm_C1_Act
ReadPm_C1_DaTy
ReadPm_C1_Dat
Wri teP m_C
ReadPm_C1_Done
WritePm_C_Done 8_
WritePm_C_Bsy 8_
WritePm_C_Act
ReadPm _C2
WritePm_C_Don e
ReadPm_C2_Don e
ReadPm_C2_Bsy
ReadPm_C2_Act
ReadPm_C2_DaTy
ReadPm_C2_Dat
8- 1 8 9
DVP-50MC Series Motion Controller Operation Manual
_8
8- 1 9 0
Chapter 8 Logic Instructions
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
Set the number of 1~16 When Execute
LinkNum MODBUS TCP data UINT
(0)
changes from 8_
exchange FALSE to TRUE 8_
TRUE or FALSE When Execute
EnableLink Enable or disable the link BOOL changes from
(FALSE)
FALSE to TRUE
8- 1 9 1
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
8- 1 9 2
Chapter 8 Logic Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
Bit register:05,
Specify the function code 16#0F When Execute
Write_FunCode for writing data in USINT Word register: changes from
registers. 06,16#10 FALSE to TRUE
(16#10)
Specify the starting
%MW0~%MW32 When Execute
register of the master
Read_Buffer_Address UINT 767 changes from
where data received are
%QW0~%QW63 FALSE to TRUE
stored.
Set the offset of the
starting register of the
master receiving data.
The setting value 1 means
the offset is 1 word if the 0~255 When Execute
Read_Buffer_Address
word register of the slave USINT changes from
_Offset (0)
is read. FALSE to TRUE
The setting value 1 means
the offset is 1 bit if the bit
register of the slave is
read.
Specify the starting
16#0~16#FFFF When Execute
Read_Destination_Ad address of the MODBUS
UINT changes from
dress slave that the master is to (0)
FALSE to TRUE
read
0~100 for
ObjType: 0; When Execute
The length of data to be 0~256 for
Read_Length UINT changes from
read ObjType: 1; FALSE to TRUE
(0)
Bit register:
Set the function code for 01~02 When Execute
Read_FunCode reading registers of the USINT Word register: changes from
salve. 03~04 FALSE to TRUE
(03)
8- 1 9 3
DVP-50MC Series Motion Controller Operation Manual
2. The input parameters Write_Buffer_Address and Read_Buffer_Address mean the starting registers of the
MODBUS TCP master where sent and received data are stored. The two input values must be entered.
You can define variables and combine register addresses such as %MW0 for them.
3. The input parameter ObjType is the data type of the read/written parameter. If ObjType is 0, it means to
read and write data in the word registers of the slave and the ranges of Write_Length and Read_Length
are 0~100. Write_Length and Read_Length can not be 0 simultaneously.
If ObjType is 1, it means to read and write data in the bit registers of the slave and the ranges of
Write_Length and Read_Length are 0~256. Write_Length and Read_Length can not be 0 simultaneously.
4. When the instruction without the Write_FunCode input reads and writes data in Word register according
to the selection of ObjType, the default function code to write data is 16#10 and the default function code
to read data is 03. When ObjType specifies Bit register, the default function code to write data is 16#0F
and the function code to read data, 01 or 02 is selected based on the type of bit registers by referring to
corresponding product manual.
5. The firmware later than V1.11 supports the Write_FunCode input of the instruction.
6. For the instruction with the Write_FunCode input, Bit register or Word register can be selected via
ObjType, the function code to write data can be specified via the Write_FunCode input and the function
code to read data can be specified via the Read_FunCode input.
Output Parameters
Parameter
Function Data type Valid range
name
TRUE When the configuration of parameters is
Done BOOL TRUE / FALSE
completed.
TRUE when an error occurs in execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please
ErrorID WORD
refer to section 12.2 for the corresponding error ID.
E xecute
Done
E rror
E rrorI D
8- 1 9 4
Chapter 8 Logic Instructions
Case 1: When Execute changes from FALSE to TRUE, Done becomes TRUE and the configuration of
parameters is successful. When Execute changes from TRUE to FALSE, Done changes from
TRUE to FALSE.
Case 2: When Execute changes from FALSE to TRUE, Error becomes TRUE and ErrorID shows
corresponding error code if some parameter is illegal. When Execute changes to FALSE, Error
changes to FALSE and the value of ErrorID is cleared to 0.
Function
ETH_Link_Config is used to configure MODBUS TCP parameters.
1. When the Modbus TCP master function of the controller is used, the Ethernet port supports the
function.
2. MODBUS TCP data must be sent by jointly using instruction ETH_Link_Config and
ETH_Link_Manage.
3. If you modify parameters during instruction execution, the parameters are not written. After the
instruction parameters are modified, the parameter will not be written until Execute is triggered again.
4. If you modify parameters of ETH_Link_Config instruction, the new parameters will not take effect
immediately until ETH_Link_Manage instruction is re-executed.
5. When word registers in the slave are read and written, the %MW registers of local device can be
chosen as the registers for storing the read and written data. The storage registers range
from %MW0~%MW32767. If registers exceed the range or other register is used, an error will occur
in the instruction.
When bit registers in the slave are read and written, the %MW and %QW registers of local device
can be chosen as the registers for storing the read and written data. The ranges of storage registers
are %MW0~%MW32767 and %QW0~%QW63. If registers exceed the ranges or other register is
used, an error will occur in the instruction.
6. When the bit registers of the slave are read and written and the offset value is 0, the PLC will begin
to read or write Read_Length and Write_Length bits of data starting at bit0 of the starting register
where the data are stored.
7. When the bit registers of the slave are read and written and the offset value is n which is not equal
to 0, the PLC will begin to read or write Read_Length and Write_Length bits of data by offsetting n
bits backward.
E.g. Write_Buffer_Address_Offset is 0, ObjType is 1, the register combined with
Write_Buffer_Address is %MW0 and Write_Length is 5. Then the PLC will send the data
in %MX0.0~%MX0.4 to the slave.
E.g. Write_Buffer_Address_Offset is 8, ObjType is 1, the register combined with
Write_Buffer_Address is %MW0 and Write_Length is 5. Then the PLC will send the data
in %MX1.0~%MX1.4 to the slave.
8. The parameter values of this instruction are only valid during the operation of the PLC. When the
50MC is repowered after power off, the parameters configured before the power off are all invalidated.
The ETH_Link_Config instruction must be performed again if the configuration before the power off
is needed to use.
9. When the MODBUS TCP master function of the controller is used, the controller conducts the data 8_
exchange with other slaves via the Ethernet port. 8_
8- 1 9 5
DVP-50MC Series Motion Controller Operation Manual
ETH_Link_Manage
Input Parameters
Parameter Valid range
Function Data type Validation timing
name (Default)
The instruction is executed when TRUE or FALSE
Enable Enable changes from FALSE to BOOL
(FALSE)
TRUE.
_8 Parameter Name Timing for changing to TRUE Timing for changing to FALSE
8- 1 9 6
Chapter 8 Logic Instructions
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When LinkOpened changes from
FALSE to TRUE
When the physical link to the Ethernet
interface of the PLC is reconnected.
E nable
Ope n
Va lid
L in kO pened
Case 1: When Enable changes from FALSE to TRUE, Valid changes to TRUE. When Open changes
from FALSE to TRUE, LinkOpened changes to TRUE. When Open changes from TRUE to
FALSE, LinkOpened changes FALSE. When Enable changes from TRUE to FALSE, Valid
changes to FALSE.
Case 2: When Enable changes to FALSE, Open changes to TRUE and at the moment, the outputs of the
instruction do not change. When Enable changes from FALSE to TRUE, Valid and LinkOpened
change to TRUE. When Open changes to FALSE, LinkOpened changes to FALSE. When Enable
changes from TRUE to FALSE, Valid changes to FALSE.
Case 3: When Enable changes to TRUE, Valid changes to TRUE. When Open changes from FALSE to
TRUE, LinkOpened changes to TRUE. When Enable changes from TRUE to FALSE, Valid and
LinkOpened change to FALSE. Afterwards, changing Open from TRUE to FALSE will not affect
the output result.
Case 4: When Enable changes from FALSE to TRUE, Valid changes to TRUE. If there is a problem in
the link to the Ethernet port of the controller at the moment, PhysicalLinkError changes to TRUE
if Open changes to TRUE; PhysicalLinkError does not change to FALSE if Open changes to
FALSE and Valid and PhysicalLinkError changes to FALSE simultaneously if Enable changes
from TRUE to FALSE.
Case 5: If the link to the Ethernet port of the controller is disconnected during the instruction execution,
PhysicalLinkError changes to TRUE and meanwhile LinkOpened changes to FALSE. When the
link to the Ethernet port of the controller is restored, PhysicalLinkError changes to FALSE and
meanwhile LinkOpended changes to TRUE.
8_
Function 8_
ETH_Link_Manage is used to start the MODBUS TCP communication.
1. After the input Enable of ETH_Link_Manage changes to TRUE and Open is set to TRUE, the
MODBUS TCP data start being sent if the physical Ethernet interface of the PLC is connected normally.
As Open changes from TRUE to FALSE, the PLC stops sending the MODBUS TCP data.
2. If Enable is set to FALSE during the instruction execution, the outputs of ETH_Link_Manage all
change to FALSE. But the PLC will not stop sending the MODBUS TCP data. The link will not be
closed until Open is set to FALSE only as Enable is TRUE.
3. The error message from the slave or communication timeout has no impact on the instruction
execution.
8- 1 9 7
DVP-50MC Series Motion Controller Operation Manual
ETH_Link_Status
FB/FC Explanation Applicable model
ETH_Link_Status is used to watch if an error occurs DVP50MC11T/DVP50MC11T-06
FB in the MODBUS TCP link which the number DVP50MC11P/DVP50MC11P-06
corresponds to or if the slave replies with error codes. DVP50MC11T-04S/DVP50MC11T-16S
E T H_Link_Status_instance
E TH _Link_Status
Enable Valid
LinkNum ET H_Error
E TH_ErrorID
Error
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is validated TRUE or FALSE
Enable when Enable changes BOOL
(FALSE)
from FALSE to TRUE.
Output Parameters
Parameter name Function Data type Valid range
Valid TRUE when the outputs of the instruction are valid. BOOL TRUE / FALSE
TRUE when an error occurs in the MODBUS TCP
ETH_Error BOOL TRUE / FALSE
data exchange.
MODBUS TCP data exchange error code.
Refer to the table in the following Function section.
ETH_ErrorID If the ETH_ErrorID value is 1~10, refer to the WORD
relevant slave manual for corresponding error ID
explanation.
_8 Error
TRUE when an error occurs in the instruction
BOOL TRUE / FALSE
execution.
Contains error codes when an error occurs in the
ErrorID instruction execution. Please refer to section 12.2 WORD
for the corresponding error code.
8- 1 9 8
Chapter 8 Logic Instructions
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
Enable
Valid
ET H_E rror
E TH_ErrorID
E rror
ErrorID
Case 1: When Enable changes to TRUE, Valid changes to TRUE. When Enable changes to FALSE, Valid
changes to FALSE.
Case 2: When an error occurs while Enable is TRUE, Error changes to TRUE and ErrorID shows
corresponding error code. Error changes to FALSE and the value in ErrorID changes to 0 when
Enable changes to FALSE.
Case 3: When Enable changes to TRUE, Valid changes to TRUE. ETH_Error changes to TRUE and
ETH_ErrorID shows corresponding error code when the MODBUS TCP data sending fails or
timeout occurs during the instruction execution. When Enable changes to FALSE, ETH_Error
changes to FALSE and ETH_ErrorID shows corresponding error code.
Function
ETH_Link_Status is used to watch if an error occurs in the MODBUS TCP link that the number
corresponds to or if the slave replies with error codes. The firmware of V1.01 and above supports the 8_
function. 8_
Error code Description How to deal with
1. Check if the Ethernet connection is
normal.
101 The TCP link is disabled. 2. Re-execute ETH_Link_Manage
instruction to enable the MODBUS
TCP data exchange.
8- 1 9 9
DVP-50MC Series Motion Controller Operation Manual
_8
8- 2 0 0
Chapter 8 Logic Instructions
Programming Example 1
1. Example of reading and writing word registers in the slave
Example explanation
1. The motion controller is the MODBUS TCP master, DVP12SE is the MODBUS TCP slave
and the IP address of DVP12SE is 192.168.1.10.
2. The motion controller writes the values in %MW10~%MW19 to D0~D9 in DVP12SE, then
reads the values in D100~D109 in DVP12SE and stores the read values
in %MW110~%MW119.
Variable table and program
Variable name Address Data type Initial value
ETH_Link_Config0 ETH_Link_Config
Config0_Ex BOOL
Config0_En BOOL TRUE
Config0_SIP1 USINT 192
Config0_SIP2 USINT 168
Config0_SIP3 USINT 1
Config0_SIP4 USINT 10
Config0_SNodeID USINT 0
Config0_OT USINT 0
Config0_En_FunCode17 BOOL FALSE
Config0_WBf_Add %MW0 UINT
Config0_WBf_Off USINT 10
Config0_WDes_Add UINT 16#1000
Config0_WLTH UINT 10
Config0_ W_Code USINT 16#10
Config0_RBF_ADD %MW100 UINT
Config0_RBF_OFF USINT 10
Config0_RDES_ADD UINT 16#1064
Config0_RLTH UINT 10
Config0_R_Code USINT 16#03 8_
Config0_T UINT 1000 8_
Config0_Done BOOL
Config0_Err BOOL
Config0_ErrID WORD
ETH_Link_Manage0 ETH_Link_Manage
MA_En BOOL
MA_Open BOOL
MA_Valid BOOL
MA_LinkOpen BOOL
8- 2 0 1
DVP-50MC Series Motion Controller Operation Manual
ET H_Link_Manage0
ET H_Link_Manage 2
MA_En Enable Valid MA_Valid
MA _Open Open LinkOpened MA_LinkOpen
_8 PhysicalLinkError MA_PhyErr
ET H_Link_Status0
ET H_Link_Status 3
S TA _En Enable Valid STA_Valid
1 LinkNum ET H_Link_Error STA_ET H_Err
E TH_Link_ErrorID STA_ET H_ErrID
Error STA_Err
ErrorID STA_ErrID
8- 2 0 2
Chapter 8 Logic Instructions
Programming Example 2
1. Example of reading and writing bit registers in the slave
Example explanation
The motion controller is the MODBUS TCP master, DVP12SE is the MODBUS TCP slave
and the IP address of DVP12SE is 192.168.1.10.
The motion controller writes the values in %MX0.0~%MX0.7 to Y0~Y7 in DVP12SE, then
reads the values in Y20~Y27 in DVP12SE and stores the read values in %MX2.0~%MX2.7.
8- 2 0 3
DVP-50MC Series Motion Controller Operation Manual
8- 2 0 4
Chapter 8 Logic Instructions
ET H_Link_Config1
ET H_Link_Config 1
Config1_Ex Execute Done Config1_Done
1 LinkNum Error Config1_Err
Config1_En EnableLink ErrorID Config1_ErrID
Config1_S IP1 SlaveIP_segment1
Config1_S IP2 SlaveIP_segment2
Config1_S IP3 SlaveIP_segment3
Config1_S IP4 SlaveIP_segment4
Config1_S NodeID SlaveNodeID
Config1_OT ObjType
Config1_En_F unCode17 En_FunCode17
Config1_WB f_Add Write_Buffer_Address
Config1_W Bf_Off Write_Buffer_Address_Offset
Config1_WDes_Add Write_Destination_Address
Config1_W LTH Write_Length
Config1_W_Code Write_FunCode
Config1_RBF _ADD Read_Buffer_Address
Config1_R BF _OF F Read_Buffer_Address_Offset
Config1_RDE S_ADD Read_Destination_Address
Config1_RLTH Read_Length
Config1_R_Code Read_FunCode
Config1_T TimeOut
ET H_Link_Manage1
ET H_Link_Manage 2
MA 1_En Enable Valid MA1_Valid
MA1_Open Open LinkOpened MA1_LinkOpen
PhysicalLinkError MA1_PhyErr
ET H_Link_Status1
ET H_Link_Status 3
STA1_En Enable Valid STA1_Valid
1 LinkNum ET H_Link_Error STA1_E TH_Err
E TH_Link_ErrorID STA1_E TH_ErrID
Error STA1_Err
ErrorID STA1_ErrID
8- 2 0 5
DVP-50MC Series Motion Controller Operation Manual
_8
8- 2 0 6
Chapter 8 Logic Instructions
ETH_Link_Config_Ext
FB/FC Explanation Applicable model
ETH_Link_Config_Ext is used to configure the cycle DVP50MC11T/DVP50MC11T-06
FB time and link duration for MODBUS TCP data DVP50MC11P/DVP50MC11P-06
exchange. DVP50MC11T-04S/DVP50MC11T-16S
E T H_Link_Config_Ext_instance
E T H_Link_Config_Ext
Execute Done
CycleTime
LinkKeeptime
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
The cycle time the master
When Execute
sends MODBUS TCP ARRAY [1..16] 0~65535
CycleTime changes from
data. OF UINT (0)
FALSE to TRUE.
(Unit: milliseconds)
0~65535 When Execute
The link duration of the ARRAY [1..16]
LinkKeeptime changes from
master (Unit: seconds) OF UINT (0)
FALSE to TRUE.
Note:
1. Every element of the values in CycleTime and LinkKeeptime corresponds to the number in a
ETH_Link_Config instruction. For example, the first element of CycleTime value corresponds to the data-
sending cycle time of the number 1.
2. The unit of CycleTime is milliseconds (ms) and LinkKeepTime is seconds (s).
3. LinkKeeptime is the link duration (unit:seconds). If there is no data exchange between the master and
slave within the time specified by LinkKeeptime, the controller will disconnect the link to the slave
automatically.
Output Parameters
Parameter
Function Data type Valid range 8_
name
8_
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
8- 2 0 7
DVP-50MC Series Motion Controller Operation Manual
Function
ETH_Link_Config_Ext is used to configure the cycle time and link duration for MODBUS TCP data
exchange.
1. When the MODBUS TCP master function of the controller is used, ETH_Link_Config_Ext can be used
to set the cycle time and link duration for MODBUS TCP data exchange. The ETH_Link_Config_Ext
instruction can be used to set the cycle time and link duration for MODBUS TCP data exchange. The
instructon can also be used in the configuration of MODBUS TCP parameters. And it can still be used
in the MODBUS TCP master function of the controller. One piece of MODBUS TCP data sending is
finished and then another piece will be sent out immediately. The link duration is 30s by default.
2. The parameter value which is modified during the instruction execution will not be written. The new
parameter value of the instruction will be written only after Execute of the instruction is retriggered.
3. ETH_Link_Config_Ex and ETH_Link_Config has no relation in the execution sequence. The
parameters of ETH_Link_Config_Ext will not take effect unless ETH_Link_Config_Ext is executed prior
to ETH_Link_Manage.
_8
8- 2 0 8
Chapter 8 Logic Instructions
ETH_ SetServerlinkkeeptime
FB/FC Explanation Applicable model
ETH_ SetServerlinkkeeptime is used to set the link DVP50MC11T/DVP50MC11T-06
FB duration as the controller works as the MODBUS DVP50MC11P/DVP50MC11P-06
TCP slave. DVP50MC11T-04S/DVP50MC11T-16S
ET H_SetServerlinkkeeptime_instance
ET H_SetServerlinkkeeptime
Execute Done
ServerLinkKeeptime
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is executed TRUE or FALSE
Execute when Execute changes BOOL
(FALSE)
from FALSE to TRUE.
Link duration when the
0~65535 When Execute
controller works as the
ServerLinkKeeptime UINT changes from
MODBUS TCP slave (0)
FALSE to TRUE.
(Unit: seconds)
Note:
When the ServerLinkKeeptime parameter is set to 0 or blank, the default link duration of the MODBUS TCP
slave which the controller serves as is 30s.
Output Parameters
Parameter
Function Data type Valid range
name
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Output Update Timing
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
When Execute changes from FALSE to When Execute changes from TRUE to
Done
TRUE. FALSE.
Function
ETH_ SetServerlinkkeeptime is used to set the link duration as the controller works as the MODBUS TCP
slave. 8_
1. The ServerLinkKeeptime value is valid only when the controller works as the MODBUS TCP slave. 8_
When the controller works as the MKODBUS TCP master, the execution of the ETH_
SetServerlinkkeeptime instruction will have no impact on the MODBUS TCP master function.
2. If there is no data exchange between the controller slave and the master within the time specified by
ServerLinkKeeptime, the controller slave will disconnect the link to the MODBUS TCP master
automatically.
3. The instruction can only set the link duration of the MODBUS TCP slave which the LAN2 port of the
controller works as.
8- 2 0 9
DVP-50MC Series Motion Controller Operation Manual
ETH_Socket_Manage
FB/FC Explanation Applicable model
ETH_Socket_Manage is used for managing Socket DVP50MC11T/DVP50MC11T-06
FB TCP/UDP. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
E TH_Socket_Manage_instance
E TH_Socket_Manage
Enable Valid
EnableSocket SocketReady
PhysicalLinkError
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Enable TRUE or FALSE
Enable BOOL
changes from FALSE to (FALSE)
TRUE.
When Enable
TRUE or FALSE
EnableSocket Enable the Socket. BOOL changes from
(FALSE)
FALSE to TRUE
Note:
ETH_Socket_Manage is to enable the Socket function. Other Socket–related instructions can not be used until
the instruction is executed.
Output Parameters
_8
8- 2 1 0
Chapter 8 Logic Instructions
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
E nable
Va lid
S ocketRea dy
P hysica lL in kE rro r
Case 1 When Enable changes from FALSE to TRUE, Valid changes to TRUE. When EnableSocket
changes from FALSE to TRUE, SocketReady changes to TRUE. When EnableSocket
changes from TRUE to FALSE, SocketReady changes FALSE. When Enable changes from
TRUE to FALSE, Valid changes to FALSE.
Case 2 When Enable is FALSE and EnableSocket changes TRUE, the outputs of the instruction keep
unchanged. When Enable changes from FALSE to TRUE, Valid and SocketReady both change
to TRUE. When EnableSocket changes to FALSE, SocketReady changes to FALSE. When
Enable changes from TRUE to FALSE, Valid changes to FALSE.
Case 3 When Enable changes to TRUE, Valid changes to TRUE. When EnableSocket changes from
8_
FALSE to TRUE, SocketReady changes to TRUE. When Enable changes from TRUE to FALSE,
Valid and SocketReady both change to FALSE. After that, changing EnableSocket from TRUE
8_
to FALSE will not affect the output of the instruction.
Case 4 When Enable changes from FALSE to TRUE, Valid changes to TRUE. If there is a problem
with 50MC’s LAN2 port connection at the moment, PhysicalLinkError will change to TRUE
as Enable changes to TRUE. As EnableSocket changes to TRUE, SocketReady changes
to TRUE and the state of PhysicalLinkError will keep unchanged. As EnableSocket changes
from TRUE to FALSE, SocketReady changes to FALSE. As Enable changes from TRUE to
FALSE, Valid and PhysicalLinkError both change to FALSE.
Case 5 If the connection to LAN2 port of the controller is disconnected during the instruction
execution, PhysicalLinkError changes to TRUE and meanwhile the state of SocketReady
8- 2 11
DVP-50MC Series Motion Controller Operation Manual
keeps unchanged. When the connection to LAN2 of the controller is returned to normal,
PhysicalLinkError changes to FALSE.
Function
ETH_Socket_Manage is used for enabling Socket.
1. If Enable is set to FALSE during the instruction execution, all outputs of ETH_Link_Manage change to
FALSE. But the controller will not disable the Socket. The Socket can be disabled by setting EnableSocket
to FALSE only as Enable is TRUE.
2. The instruction execution will not be affected when there is an error message or communication timeout
sent back from the target device.
_8
8- 2 1 2
Chapter 8 Logic Instructions
ETH_Socket_Config
FB/FC Explanation Applicable model
ETH_Socket_Config is used for configuring Socket DVP50MC11T/DVP50MC11T-06
FB parameters. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
E TH_Socket_Config_instance
ET H_Socket_Config
Execute Done
SocketNum Busy
Protocol_Type Error
RemoteIP _segment1 ErrorID
RemoteIP_segment2
RemoteIP_segment3
RemoteIP_segment4
Remote_port
Local_port
LinkKeeptime
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
8- 2 1 3
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
Note:
1. The input parameters RemoteIP_segment1, RemoteIP_segment2, RemoteIP_segment3 and
RemoteIP_segment4 respectively represent the first segment to the fourth segment of the target IP address.
For example, if the target IP is 192.168.1.10, the input value of SlaveIP_segment1 is 192,
SlaveIP_segment2 is 168, SlaveIP_segment3 is 1 and SlaveIP_segment4 is 10.
2. The parameter LinkKeeptime means the duration time of connection with the unit of seconds. When there
is no data transmission for the built link within the period of time, the controller will automatically abort the
connection.
Output Parameters
Parameter
Function Data type Valid range
name
TRUE when the configuration of parameters is
Done BOOL TRUE/FALSE
completed.
Busy TRUE when the instruction is being executed. BOOL TRUE/FALSE
Error TRUE when an error occurs in the instruction execution. BOOL TRUE/FALSE
Contains error codes when an error occurs in the
ErrorID instruction execution. Please refer to section 12.2 for the WORD
corresponding error code.
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
8- 2 1 4
Chapter 8 Logic Instructions
Case1 Case2
E xecute
Done
Bu sy
E rror
E rrorI D
Case 1 When Execute changes from FALSE to TRUE, Busy changes to TRUE and the parameter
writing succeeds. One cycle later, Done changes to TRUE and Busy changes to FALSE. When
Execute changes from TRUE to FALSE, Done changes from TRUE to FALSE.
Case 2 When Execute changes from FALSE to TRUE, Error changes to TRUE and ErrorID shows
corresponding error code if the parameter values writing is illegal. When Execute changes to
FALSE, Error changes to FALSE and the vauel in ErrorID changes to 0.
Function
ETH_Socket_Config is used for configuring Socket parameters.
1. During the execution of ETH_Socket_Config, the modified parameter values will not be written unless
you retrigger the input Execute after instruction parameter values are modified.
2. If you retrigger the instruction to execute when current link is not disconnected, the instruction will
report an error.
3. The controller automatically allocates a local port to current link when the value of Local_port is set
to 0. When Socket TCP server mode is selected, the value of Local_port can not be set to 0 and one
local port must be set for the controller to monitor the port number.
4. When Socket TCP server mode is selected for the controller, the controller will select a remote host
according to the values of the parameter RemoteIP_segment1~4 or Remote_port if the value of the
paramter RemoteIP_segment1~4 or Remote_port is not set to 0. If the IP address of the remote host
or port number is inconsistent with that of RemoteIP_segment1~4 or Remote_port, the controller will 8_
disconnect the connection and stop monitoring local port set in current link. 8_
8- 2 1 5
DVP-50MC Series Motion Controller Operation Manual
ETH_Socket_Open
FB/FC Explanation Applicable model
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
1~8
When Execute
Set the number of the (The variable
SocketNum USINT changes from
Socket value must be
FALSE to TRUE
set.)
8- 2 1 6
Chapter 8 Logic Instructions
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
E xecute
Done
Bu sy
E rror
E rrorI D
Case 1 When Execute changes from FALSE to TRUE, Busy changes to TRUE and the writing of
parameters is successful. One cycle later, Done changes to TRUE and meanwhile Busy
changes to FALSE. When Execute changes from TRUE to FALSE, Done changes from TRUE
to FALSE.
Case 2 When Execute changes from FALSE to TRUE, Error changes to TRUE and ErrorID shows 8_
corresponding error code if the parameter value is illegal. When Execute changes to FALSE, 8_
Error changes to FALSE and the value in ErrorID changes to 0.
Function
ETH_Socket_Open instruction is used for building the TCP link or enabling UDP function.
1. ETH_Socket_Send and ETH_Socket_Receive instructions can be executed only after
ETH_Socket_Open instruction is executed normally.
2. Current connection state can be checked via ETH_Socket_Status instruction after
ETH_Socket_Open instruction is executed.
8- 2 1 7
DVP-50MC Series Motion Controller Operation Manual
ETH_Socket_Send
FB/FC Explanation Applicable model
ETH_Socket_Send is used for sending Socket data. DVP50MC11T/DVP50MC11T-06
FB DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
ET H_Socket_Send_instance
ET H_Socket_Send
Execute Done
Abort Sent
SocketNum Sending
CyclicRun Busy
CycleTime Active
Send_Buffer_Address Aborted
Send_Length Error
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
8- 2 1 8
Chapter 8 Logic Instructions
Output Parameters
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
8- 2 1 9
DVP-50MC Series Motion Controller Operation Manual
Ex ec ute
A bort
Cy c lic Run
Done
Bus y
Ac tiv e
Aborte d
Error
E rro rID
Case 1 When Execute changes from FALSE to TRUE, Busy and Active change to TRUE if you
choose the mode to send only one piece of data. When one piece of Socket data sending is
completed, Done changes to TRUE and meanwhile Busy and Active changes to FALSE.
When Execute changes from TRUE to FALSE, Done changes to FALSE.
Case 2 When Execute changes from FALSE to TRUE, Busy and Active change to TRUE and the
instruction starts to control the controller for sending Socket data if you choose the mode to
cyclically send data. When Execute changes from TRUE to FALSE, the TRUE state of Busy
and Active keep unchanged.
Case 3 The output state will keep unchanged by setting Execute from FALSE to TRUE again after
case 2. By setting Abort from FALSE to TRUE, one cycle later, Aborted changes to TRUE and
Busy and Active change to FALSE. When Abort changes from TRUE to FALSE, the output will
keep unchanged. When Execute changes from TRUE to FALSE, Aborted changes to FALSE.
Case 4 When Execute changes from FALSE to TRUE, Busy and Active change to TRUE. When an
error occurs in the instruction execution, Error changes to TRUE and the value in ErrorID
_8 shows corresponding error code and meanwhile Busy and Active change to FALSE. When
Execute changes from TRUE to FALSE, Error changes to FALSE and the value in ErrorID
changes to 0.
Function
ETH_Socket_Send is used for sending Socket data. The firmware of V1.02 and above supports the
function.
1. The input paramter CyclicRun sets whether to cyclically send data or not and CycleTime value is the
time of a cycle. When CyclicRun is TRUE and ETH_Socket_Send instruction is executed, the
controller sends a piece of data every a period of time which is the vaue of CycleTime. When
CyclicRun is FALSE and ETH_Socket_Send instruction is executed, the controller only sends out one
piece of data.
2. When the value of CycleTime is 0 and CyclicRun is TRUE, the controller still sends data cyclically
without any limit in time interval.
8- 2 2 0
Chapter 8 Logic Instructions
3. If the input parameter value is changed and then the instruction is retriggered during the instruction
execution, the new input parameter value will not be effective. You have to use the input parameter
Abort to abort the instruction first, then re-execute the instruction and then the new input parameter
value will take effect.
4. The value of Send_Length can not be set to 0. Otherwise, an error will occur in the instruction
execution.
8_
8_
8- 2 2 1
DVP-50MC Series Motion Controller Operation Manual
ETH_Socket_Receive
FB/FC Explanation Applicable model
ETH_Socket_Receive is used for receiving Socket data. DVP50MC11T/DVP50MC11T-06
FB DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
E T H_Socket_Receive_instance
E TH _Socket_Receive
Execute Done
Abort Received
SocketNum Receiving
ReceiveMode Received_Length
DataSaveMode Busy
Receive_Buffer_Address Active
Receive_Length Aborted
Error
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
8- 2 2 2
Chapter 8 Logic Instructions
Note:
The input parameter Receive_Buffer_Address represents the first register address where the data the
controller receives are stored, and the parameter Receive_Length is the length of the data received by the
controller. The two input values must be set.
Output Parameters
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
Receiving
While one piece of Socket data is When one piece of Socket data 8_
being received. receiving is completed. 8_
When Done changes from FALSE to
TRUE;
When the instruction execution is
Busy When Execute changes to TRUE.
aborted;
When Error changes from FALSE to
TRUE.
8- 2 2 3
DVP-50MC Series Motion Controller Operation Manual
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
Ex ecu te
Abort
Done
Bus y
Act ive
Ab orted
Error
ErrorID
Case 1 If the instruction is used to receive one message or constantly receive multiple messages by
setting the value of DataSaveMode to 0, Busy and Active both change to TRUE when Execute
changes from FALSE to TRUE. Done changes to TRUE and both Busy and Active change to
_8 FALSE when a piece of data receiving is finished or the total length of spliced data reaches or
exceeds the set length. Done changes to FALSE when Execute changes from TRUE to FALSE.
Case 2 If the value of DataSaveMode is set to 1, Busy and Active change to TRUE as Execute changes
from FALSE to TRUE. And the state of Busy and Active both keep unchanged and the instruction
keep receiving data as Execute changes from TRUE to FALSE.
Case 3 Execute is set from FALSE to TRUE again after case 2 and the output state of the instruction
keeps unchanged. Set Abort from FALSE to TRUE. One cycle later, Aborted changes from
FALSE to TRUE and meanwhile Busy and Active change to FALSE. When Abort changes from
TRUE to FALSE, the output of the instruction keeps unchanged. When Execute changes from
TRUE to FALSE, Aborted changes to FALSE.
8- 2 2 4
Chapter 8 Logic Instructions
Case 4 When Execute changes from FALSE to TRUE, Busy and Active change to TRUE. When an error
occurs, Error changes to TRUE, ErrorID shows corresponding error code and meanwhile Busy
and Active change to FALSE. When Execute changes from TRUE to FALSE, Error changes to
FALSE and the value of ErrorID changes to 0.
Function
ETH_Socket_Receive is used for receiving Socket data.
1. When the value of ReceiveMode is set to 0, the controller can constantly receive Socket data. When
the value of DataSaveMode is set to 0, the instruction has the received data stored in the registers
starting from the start register specified by Receive_Buffer_Address in the mode of splicing. The
controller stores new data in the registers following where the last data are stored. When the total
length of received data is greater than the value of Receive_Length, the output Done changes to
TRUE and the instruction execution is finished.
2. When the value of input parameter ReceiveMode is 0 and DataSaveMode is 1, the instruction has the
received data stored in the registers starting from the start register specified by
Receive_Buffer_Address in the mode of covering. Every time the controller has the received data
stored in the registers starting from the start register specified by Receive_Buffer_Address.
3. When the length of the first peiece of data received exceeds the length specified by Receive_Length,
the controller writes the data of the length specified by Receive_Length to the specified device first,
the data beyond the set length are discarded, and then the instruction reports an error.
4. In the process of instruction execution, modify the input parameter value of the instruction, then trigger
the instruction execution, the new input parameter value will not take effect. The instruction must be
interrupted by using the input parameter Abort, then the new input parameter value will take effect as
the instruction is re-executed.
8_
8_
8- 2 2 5
DVP-50MC Series Motion Controller Operation Manual
ETH_Socket_Close
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB ETH_Socket_Close is used for disabling Socket. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
ET H_Socket_Close_instance
E T H_Socket_Close
Execute Done
SocketNum Busy
Error
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed as Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
1~8 When Execute
Specify the number of the
SocketNum USINT changes from
Socket. (0)
FALSE to TRUE
Note: The TCP link and UDP function can be disabled through ETH_Socket_Close.
8- 2 2 6
Chapter 8 Logic Instructions
E xecute
Done
Busy
Error
ErrorID
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and parameter values
writing succeeds. One cycle later, Done changes to TRUE and meanwhile Busy changes to
FALSE. When Execute changes from TRUE to FALSE, Done changes from TRUE to FALSE.
Case 2: When Execute changes from FALSE to TRUE, Error changes to TRUE and ErrorID shows
corresponding error code if the written parameter value is illegal. When Execute changes to
FALSE, Error changes to FALSE and the value in ErrorID changes to 0.
Function
ETH_Socket_Close is used for disconnecting the TCP link or disabling UDP function.
8_
8_
8- 2 2 7
DVP-50MC Series Motion Controller Operation Manual
ETH_Socket_Status
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
ETH_Socket_Status is used for reading current state
FB DVP50MC11P/DVP50MC11P-06
of the specified Socket.
DVP50MC11T-04S/DVP50MC11T-16S
E T H_Socket _Status _instance
ET H_Socket_Status
Enable Valid
SocketNum Conected
Received
Closed
Send
Opening
Receiving
Closing
Sending
Error
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is TRUE or FALSE
Enable executed as Enable BOOL
(FALSE)
changes to TRUE.
The number of the Socket 1~8 When Enable
SocketNum UINT
to be monitored. (0) changes to TRUE
Note: Current state of the Scocket of the specified number and the occurrence of any error can be monitored
through ETH_Socket_Status instruction.
8- 2 2 8
Chapter 8 Logic Instructions
8- 2 2 9
DVP-50MC Series Motion Controller Operation Manual
Enable
Valid
Error
E rrorID
Case 1: When Enable changes from FALSE to TRUE, Valid changes to TRUE. When Enable changes
from TRUE to FALSE, Valid changes to FALSE.
Case 2: When Enable changes from FALSE to TRUE, Valid changes to TRUE. When an error occurs in
the instruction execution, Error changes to TRUE and ErrorID shows error codes and Valid keeps
the state of TRUE. When Enable changes from TRUE to FALSE, Valid and Error both change to
FALSE and the value in ErrorID changes to 0.
Function
ETH_Socket_Status is used for monitoring current state of the Socket of the specified number.
_8
8- 2 3 0
Chapter 8 Logic Instructions
Programming Example
Example of how to use ETH_Socket_Config instruction:
Variable table and the program
Initial
Variable name Address Data type
value
TEST_BEGIN BOOL
ETH_Socket_Manage0 ETH_Socket_Manage
M_En BOOL
M_SEN BOOL
M_Valid BOOL
M_SR BOOL
M_LErr BOOL
ETH_Socket_Config0 ETH_Socket_Config
CON_Ex BOOL
CON_PType USINT 1
CON_IP1 USINT 192
CON_IP2 USINT 168
CON_IP3 USINT 1
CON_IP4 USINT 10
CON_RP UINT 502
CON_LP UINT 502
CON_KT UINT 30
CON_Done BOOL
CON_Bsy BOOL
CON_Err BOOL
CON_ErrID WORD
ETH_Socket_Open0 ETH_Socket_Open
O_Ex BOOL
O_SMode BOOL TRUE 8_
O_Done BOOL
8_
O_Bsy BOOL
O_Err BOOL
O_ErrID WORD
ETH_Socket_Send0 ETH_Socket_Send
S_Ex BOOL
S_Abort BOOL
S_CR BOOL TRUE
S_CT UINT 100
8- 2 3 1
DVP-50MC Series Motion Controller Operation Manual
Initial
Variable name Address Data type
value
S_BFA %MB200 USINT
S_LTH UINT 17
S_Done BOOL
S_Sent BOOL
S_Sending BOOL
S_Bsy BOOL
S_Act BOOL
S_Abt BOOL
S_Err BOOL
S_ErrID WORD
ETH_Socket_Receive0 ETH_Socket_Receive
R_Ex BOOL
R_Abort BOOL
R_Mode USINT 0
R_SMode USINT 1
R_BFA %MB600 USINT
R_LTH UINT 100
R_Done BOOL
R_RECD BOOL
R_RING BOOL
R_RLTH BOOL
R_Bsy BOOL
R_Act BOOL
R_Abt BOOL
R_Err BOOL
R_ErrID WORD
ETH_Socket_Close0 ETH_Socket_Close
C_Ex BOOL
_8
C_Done BOOL
C_Bsy BOOL
C_Err BOOL
C_ErrID WORD
ETH_Socket_Status0 ETH_Socket_Status
STA_En BOOL TRUE
STA_Valid BOOL
STA_CON BOOL
STA_REC BOOL
8- 2 3 2
Chapter 8 Logic Instructions
Initial
Variable name Address Data type
value
STA_CLO BOOL
STA_Send BOOL
STA_OING BOOL
STA_RING BOOL
STA_CING BOOL
STA_SING BOOL
STA_Err BOOL
STA_ErrID WORD
ET H_Socket_Manage0
ET H_Socket_Manage 1
M_En Enable Valid M_Valid
M_SE N EnableSocket SocketReady M_SR
PhysicalLinkError M_LErr
ET H_Socket_Config0
ET H_Socket_Config 2
CON _Ex Execute Done CON_Done
1 SocketNum Busy CON_Bsy
CON _ PType Protocol_Type Error CON_Err
CON_IP1 RemoteIP_segment1 ErrorID CON_ErrID
CON_IP2 RemoteIP_segment2
CON_IP3 RemoteIP_segment3
CON_IP4 RemoteIP_segment4
CON_RP Remote_port
C ON_LP Local_port
CON_KT LinkKeeptime
8_
8_
8- 2 3 3
DVP-50MC Series Motion Controller Operation Manual
ET H_Socket_Open0
ET H_Socket_Open 3
O_Ex Execute Done O_Done
1 SocketNum Busy O_Bsy
O _ SMode OpenMode Error O_Err
ErrorID O_ErrID
ET H_Socket_Send0
E TH_Socket_Send 4
S_Ex Execute Done S_Done
S_Abort Abort Send S_Sent
1 SocketNum Sending S_Sending
S_CR CyclicRun Busy S_Bsy
S_C T CycleTime Active S_Act
S_B FA Send_Buffer_Address Aborted S_Abt
S _LT H Send_Length Error S_Err
ErrorID S_ErrID
ET H_Socket_Receive0
ET H_Socket_Receive 5
R_Ex Execute Done R_Done
R_Abort Abort Received R_REC D
1 SocketNum Receiving R_RING
R_Mode ReceiveMode Received_Length R_RLT H
R_SMode DataSaveMode Busy R_Bsy
R_BFA Receive_Buffer_Address Active R_Act
R _ LTH Receive_Length Aborted R_Abt
Error R_E rr
ErrorID R_E rrID
_8
8- 2 3 4
Chapter 8 Logic Instructions
ET H_Socket_Close0
ET H_Socket_Close 6
C_Ex Execute Done C_Done
1 SocketNum Busy C_Bsy
Error C_E rr
ErrorID C_E rrID
ET H_Socket_Status0
E TH_Socket_Status 7
STA_En Enable Valid S TA _Valid
1 SocketNum Conected S TA _C ON
Received S TA _R EC
Closed S TA _C LO
Send S TA _Send
Opening S TA _O ING
Receiving S TA _R ING
Closing S TA _C ING
Sending S TA _S ING
Error S TA _Err
ErrorID S TA _ErrID
1. The variables S_BFA and R_BFA are respectively bound to the addresses %MB200
and %MB600. After the program compiling is successful and download is completed, the
online is performed. After the online is activated, the standard MODBUS TCP data “00 00
00 00 00 0b 00 10 10 00 00 02 04 aa bb cc dd” are written to 17 consecutive %MB
registers starting from %MB200.
2. Execute ETH_Socket_Manage instruction first by setting M_En to TRUE and then setting
M_SEN to TRUE. After M_SR variable changes to TRUE, execute ETH_Socket_Config
by setting CON_Ex variable to TRUE.
5. Execute ETH_Socket_Receive to receive the data that the target host returns or sends
to the controller. The controller will receive and store the data constantly in the mode of
covering in this example.
6. ETH_Socket_Close instruction is used to disable current link. After C_Ex is set to TRUE,
the controller will disconnect the link and stop sending and receiving data.
8- 2 3 5
DVP-50MC Series Motion Controller Operation Manual
RS485_Link_Config_instance
R S485_Link_Config
Execute Done
LinkNum Error
EnableLink ErrorID
Noncyclic
SlaveNodeID
ObjType
En_F unCode17
Write_B uffer_Address
Write_Buffer_Address_Offset
Write_Destination_Address
Write_Length
Write_FunCode
Read_Buffer_Address
Read_Buffer_Address_Offset
Read_Destination_Address
Read_Length
Read_FunCode
TimeOut
Input Parameters
Data Valid range
Parameter name Function Validation timing
type (Default)
The instruction is executed
TRUE or FALSE
Execute when Execute changes from BOOL
(FALSE)
FALSE to TRUE.
1~24 When Execute
Specify the number of the
LinkNum UINT (The variable value changes from
Link.
must be set) FALSE to TRUE
When Execute
TRUE or FALSE
EnableLink Enable or disable the Link. BOOL changes from
_8 (FALSE)
FALSE to TRUE
Set the Link communication
When Execute
mode TRUE or FALSE
Noncyclic BOOL changes from
FALSE: Cyclic, (FALSE)
FALSE to TRUE
TRUE: Non-cyclic
When Execute
Specify the node ID of the 0~255
SlaveNodeID USINT changes from
485 slave. (0)
FALSE to TRUE
Set the type of the slave
register to be read and 0~1 When Execute
ObjType written USINT changes from
(0)
0: Word register FALSE to TRUE
1: Bit register
8- 2 3 6
Chapter 8 Logic Instructions
8- 2 3 7
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
Parameter
Function Data type Valid range
name
TRUE When the configuration of Link parameters is
Done BOOL TRUE / FALSE
successful.
TRUE when an error occurs in execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please
Error ID WORD
refer to section 12.2 for the corresponding error ID.
_8
8- 2 3 8
Chapter 8 Logic Instructions
E xec ute
Done
E rror
E rrorI D
Case 1: If the configuration of parameters is correct, Done changes from FASLE to TRUE as
Execute changes from FASLE to TRUE.
Case 2: If an error occurs in the configuration of parameters, Done is FASLE and Error changes
from FALSE to TRUE as Execute changes from FASLE to TRUE.
Function
RS485_Link_Config is used to configure parameters for 485 communication Link. The firmware of V1.01
and above supports the function.
Precaution
1. ObjType is the data type of the read and written parameter. When ObjType is 0, it means to read
and write the word register of the slave. The range of Write_Length and Read_Length is 0~100 and
the values of Write_Length and Read_Length can not be 0 at the same time.
When ObjType is 1, it means to read and write the bit register of the slave. The range of Write_Length
and Read_Length is 0~256 and the values of Write_Length and Read_Length can not be 0 at the
same time. For local addresses, you can directly fill addresses, variables combined with addresses,
arrays combined with the starting addresses.
2. For local address to fill the %MB address, you can only fill the low byte of the %MW address rather
than the high byte.
3. For the register address of the slave, you can directly fill the MODBUS address and variable.
4. For the offset in the word operation, the actual address is calculated by word. For the offset in the bit
operation, the actual address is calculated by bit.
For example:
Actual address calculated via word offset :
When the address is %MW0 and the offset is 15, the actual operation address
is %MW15=%MW (0+15).
Actual address calculated via bit offset:
8_
When the address is %QW0 and the offset is 7, the actual operation address is %QX0.7. 8_
5. If you choose to read and write the word register of the slave, the %MW register of the local device
can be regarded as the storage register for reading and writing data. The range of the storage register
is %MW0~%MW32767. If the range is exceeded or other register is used, an error will occur in the
instruction.
6. If you choose to read and write the bit register of the slave, the %MW and %QW registers of the local
device can be regarded as the storage registers for reading and writing data. The ranges of the
storage register are %MW0~%MW32767 and %QW0~%QW63. If the ranges are exceeded or other
register is used, an error will occur in the instruction.
7. The set parameter values of this instruction are only valid during the operation of the PLC. When the
motion controller is repowered after the power off, the parameters configured before the power off
8- 2 3 9
DVP-50MC Series Motion Controller Operation Manual
are all invalidated. The ETH_Link_Config instruction must be re-executed if the configuration before
the power off is needed to use.
8. Set the communication mode via the input parameter Noncyclic. The communication mode is the
cyclic communication mode if Noncyclic is set to FALSE. The communication mode is the non-
cyclic communication mode if Noncyclic is set to TRUE.
a. Cyclic Communication Mode: When the current Link is set as cyclic communication mode. The
configuration for the Link will be effective immediately and the data exchange between the
master and slave will be conducted cyclically after RS485 communication function is enabled
via RS485_Link_Manage instruction.
The configuration for the link will not be executed and the data exchange with the slave will stop
after RS485 communication function is disabled via RS485_Link_Manage instruction.
b. Non-Cyclic Communication Mode: When the current Link is set as non-cyclic communication
mode. The configuration for the Link will be effective immediately and the data exchange
between the master and slave will be conducted only once after RS485 communication function
is enabled via RS485_Link_Manage instruction.
If the data exchange between the master and the slave is to be made once again, re-enable
RS485 communication function after RS485 communication function is disabled via
RS485_Link_Manage instruction.
_8
8- 2 4 0
Chapter 8 Logic Instructions
RS485_Link_Manage
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
RS485_Link_Manage is used for switching on or off
FB DVP50MC11P/DVP50MC11P-06
RS485 communication.
DVP50MC11T-04S/DVP50MC11T-16S
R S485_Link_Manage_instance
RS485_Link_Manage
Enable Valid
Open LinkOpened
Input Parameters
Valid range Validation
Parameter name Function Data type
(Default) timing
The instruction is executed when TRUE or FALSE
Enable Enable changes from FALSE to BOOL -
(FALSE)
TRUE.
When
TRUE or FALSE Enable
The RS485 communication is
Open BOOL changes
switched on or off. (FALSE) from FALSE
to TRUE
Output Parameters
Parameter name Function Data type Valid range
Valid TRUE when the outputs of the instruction are valid. BOOL TRUE / FALSE
LinkOpened TRUE when RS485 communication is enabled. BOOL TRUE / FALSE
O pen
Va lid
L ink Op ened
Case 1: When Enable changes from FALSE to TRUE, Open changes to FALSE, Valid changes to
TRUE and LinkOpened changes to FALSE.
8- 2 4 1
DVP-50MC Series Motion Controller Operation Manual
Case 2: As Enable changes from FALSE to TRUE, Valid changes to TRUE. In this case, LinkOpened
changes to TRUE as Open changes from FALSE to TRUE. When Enable changes from TRUE
to FALSE, Valid and LinkOpened change to FALSE.
Case 3: As Open is TRUE and Enable changes from FALSE to TRUE, Valid and LinkOpened change to
TRUE. As Open changes to FALSE, LinkOpened changes to FALSE.
Function:
RS485_Link_Manage is used to enable or disable the RS485 communication. The firmware of V1.01
and above supports the function.
1. The input Enable is used to control the instruction to take effect or not. When Enable changes to
FALSE, the operation of other parameters of the instruction will be invalid. When Enable changes to
TRUE, the instruction will take effect and then the operation of other parameter of the instruction will
be valid.
2. In the case that Enable is TRUE, the RS485 communication is switched on as Open changes to
TRUE. The RS485 communication is switched off as Open is FALSE.
3. Before the RS485 communication function is switched on, the parameters of the
RS485_Link_Config instruction must have been configured.
Otherwise, the configured parameters will be not effective if the RS485 function is switched on before
the parameters of the RS485_Link_Config instruction are configured. It will be not effective unless the
RS485 communication function is re-switched on.
4. After multiple LinkNum parameters are configured through RS485_Link_Config instructions, only
one RS485_Link_Manage instruction is enough to switch on the RS485 communication function.
And all configurations specified by RS485_Link_Config instructions are for the exchange data with
the slave.
_8
8- 2 4 2
Chapter 8 Logic Instructions
RS485_Link_Status
FB/FC Explanation Applicable model
RS485_Link_Status is used to watch if an error DVP50MC11T/DVP50MC11T-06
FB occurs in the 485 link which the number corresponds DVP50MC11P/DVP50MC11P-06
to or if the slave replies with error codes. DVP50MC11T-04S/DVP50MC11T-16S
RS485_Link_Status_instance
R S485_Link_Status
Enable Valid
LinkNum R S485_Link_Error
RS485_Link_ErrorID
Error
ErrorID
Input Parameters
Parameter Valid range Validation
Function Data type
name (Default) timing
The instruction is validated when TRUE or FALSE
Enable Enable changes from FALSE to BOOL
(FALSE)
TRUE.
1~24 When Enable
LinkNum The number of the link to be watched. UINT (The variable value changes from
must be set) FALSE to TRUE
Output Parameters
Parameter name Function Data type Valid range
Valid TRUE when the outputs of the instruction are valid. BOOL TRUE / FALSE
Error TRUE when an error occurs in the instruction inputs. BOOL TRUE / FALSE
8- 2 4 3
DVP-50MC Series Motion Controller Operation Manual
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When Enable changes from FALSE When Enable changes from TRUE to
Valid
to TRUE. FALSE
E nable
Valid
Error
ErrorID
.
_8
Case 1: When Enable changes from FALSE to TRUE, Valid changes from FALSE to TRUE. (There is
no error both in the communication and instruction inputs.)
Case 2: If there is an error in the communication, as Enable changes from FALSE to TRUE, Valid
changes from FALSE to TRUE and after a while, RS485_Link_Error changes to TRUE.
Case 3: If there is an error in the instruction inputs, as Enable changes from FALSE to TRUE, Valid
changes from FALSE to TRUE and Error changes to TRUE.
Case 4: If there is an error both in the communication and in the instruction inputs, as Enable changes
from FALSE to TRUE, Valid changes from FALSE to TRUE, Error changes to TRUE and
RS485_Link_Error is still FALSE. After the input parameter values are modified correctly, Error
changes to FALSE and after a while, RS485_Link_Error changes to TRUE. When the input
parameter error occurs again, Error changes to TRUE. At the moment, there will be no change
in RS485_Link_Error no matter whether the communication works normally. When Enable is
8- 2 4 4
Chapter 8 Logic Instructions
TRUE and Error is TRUE, the state of RS485_Link_Error will not be refreshed and will be
invalid.
Function
RS485_Link_Status is used for watching the communication state of the corresponding link. The
firmware of V1.01 and above supports the function.
Precaution
1. The state of RS485_Link_Error will not be refreshed and will be invalid when Enable is TRUE and
Error is TRUE.
2. The input value of LinkNum can be a number or variable.
8_
8_
8- 2 4 5
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The node address of the slave DVP32ES2 is 1. The values in 10 word
registers %MW100~%MW109 of the master are written to D0~D9 in the slave. Then the values in
20 word registers D100~D119of the slave are read and stored in %MW0~%MW19 in the master
as shown in the following variable table 1.
Variable table 1
Variable name Address Data type Initial value
Mng RS485_Link_Manage
Mng_En BOOL TRUE
Mng_Open BOOL FALSE
Mng_Valid BOOL
Mng_LOpen BOOL
Confg RS485_Link_Config
Confg _Ex BOOL FALSE
Confg _LN UINT 1
Confg _EL BOOL TRUE
Confg _Ncyc BOOL FALSE
Confg _SNI USINT 1
Confg _OT USINT 0
Confg _EFC17 BOOL FALSE
Confg _WBA %MW100 UINT
Confg _WBAO USINT 0
Confg _WDA UINT 16#1000
Confg _WL UINT 10
Confg _WFC USINT 16#10
Confg _RBA %MW0 UINT
Confg_RBAO USINT 0
Confg _RDA UINT 16#44C
Confg _RL UINT 20
_8 Confg _RFC USINT 16#03
Confg _TOut UINT 1000
Confg _Done BOOL
Confg _Err BOOL
Confg _ErrID WORD
LStatus RS485_Link_Status
LStatus_En BOOL TRUE
LStatus_LN UINT 1
LStatus_Valid BOOL
LStatus_RLE BOOL
8- 2 4 6
Chapter 8 Logic Instructions
After these parameter settings are done, set Confg _Ex to TRUE and then Mng_Open to TRUE. If the
configuration need be modified during the communication, the input Confg_Ex should be triggered on
the rising edge, Mng_Open should be set to FALSE and then to TRUE after the new configuration data
are set up.
The node address of the slave DVP32ES2 is 1. The values in 31 bit devices %MX0.0~%MX3.6 of
the master are written to Y0~Y30 in the slave. Then the values in Y0~Y30 of the slave are read
and stored in the 31 bit devices %QX0.1~%QX3.7 in the master as shown in the following
variable table 2.
Variable table 2
Name Address Data type Initial value
Mng RS485_Link_Manage
Mng_En BOOL TRUE
Mng_Open BOOL FALSE
Mng_Valid
Mng_LOpen
Confg RS485_Link_Config
Confg _Ex BOOL FALSE
Confg _LN UINT 1
Confg _EL BOOL TRUE
Confg _Ncyc BOOL FALSE
Confg _SNI USINT 1
Confg _OT USINT 1
Confg _EFC17 BOOL FALSE
Confg _WBA %MW0 UINT
Confg _WBAO USINT 0
Confg _WDA UINT 16#0400
8_
Confg _WL UINT 31 8_
Confg _WFC USINT 16#0F
Confg _RBA %QW0 UINT
Confg_RBAO USINT 1
Confg _RDA UINT 16#0400
Confg _RL UINT 31
Confg _RFC USINT 1
Confg _TOut UINT 1000
Confg _Done
8- 2 4 7
DVP-50MC Series Motion Controller Operation Manual
Program
Mng
RS485_Link_Manage 1
Mng_En Enable Valid Mng_Valid
Mng_Open Open LinkOpened Mng_LOpen
Confg
RS485_Link_Config 2
Confg_Ex Execute Done Confg_Done
Confg_LN LinkNum Error Confg_Err
Confg_E L EnableLink ErrorID Confg_ErrID
Confg_Ncyc Noncyclic
Confg_SN I SlaveNodeID
Confg_OT ObjType
Confg_E FC17 En_FunCode17
Confg_W BA Write_Buffer_Address
Confg_WB AO Write_Buffer_Address_Offset
Confg_W DA Write_Destination_Address
Confg_W L Write_Length
Confg_W FC Write_FunCode
Confg_R BA Read_Buffer_Address
Confg_RB AO Read_Buffer_Address_Offset
_8 Confg_R DA Read_Destination_Address
Confg_R L Read_Length
Confg_R FC Read_FunCode
Confg_TOut TimeOut
LS tatus
RS485_Link_Status 3
LStatus_En Enable Valid LS tatus_Valid
LStatus_LN LinkNum RS485_Link_Error LS tatus_RLE
R S485_Link_ErrorID LS tatus_RLE ID
Error LS tatus_Err
ErrorID LS tatus_ErrID
8- 2 4 8
Chapter 8 Logic Instructions
RS485_RS
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
RS485_RS is used to configure RS485 free protocol
FB DVP50MC11P/DVP50MC11P-06
communication parameters for the motion controller.
DVP50MC11T-04S/DVP50MC11T-16S
RS485_R S_instance
RS485_R S
Execute Done
Abort Busy
CyclicRun Active
Send_Buffer_Address Aborted
Send_Length NewCycle
Receive_Buffer_Address Received
Receive_Length Receive_TimeOut
Add_ST X_E TX Receive_LengthOverMAX
ST X Receive_ActulLength
ET X1 Error
ET X2 ErrorID
Timeout
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when TRUE or FALSE
Execute BOOL
Execute changes from (FALSE)
FALSE to TRUE.
The free protocol
TRUE or FALSE When Execute
communication is
Abort BOOL changes from FALSE
aborted when Abort (FALSE) to TRUE
changes to TRUE.
Communication mode
setting for the TRUE or FALSE When Execute
CyclicRun instruction. BOOL changes from FALSE
(FALSE)
FALSE: Non-cyclic; to TRUE
TRUE: Cyclic
Specify the starting
When Execute
register of the master
Send_Buffer_Address USINT %MB0-%MB32767 changes from FALSE
where the sent data
to TRUE
are stored.
When Execute
Send_length
Set the length of sent
UINT
0-200(Byte)
changes from FALSE 8_
data. (0) to TRUE 8_
Specify the starting
When Execute
register of the master
Receive_Buffer_Address USINT %MB0-%MB32767 changes from FALSE
where the received
to TRUE
data are stored.
When Execute
Set the length of 0-200(Byte)
Receive_Length UINT changes from FALSE
received data. (0)
to TRUE
Set if the start and end
codes are added or not TRUE or FALSE When Execute
Add_STX_ETX in sent messages. BOOL changes from FALSE
(FALSE)
FALSE: Not add the to TRUE
start and end codes.
8- 2 4 9
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
TRUE: Add the start
and end codes.
When Execute
Set the start of 0-16#7F
STX USINT changes from FALSE
messages. (16#3A)
to TRUE
When Execute
Set the first end of 0-16#7F
ETX1 USINT changes from FALSE
messages. (16#0D)
to TRUE
When Execute
Set the second end of 0-16#7F
ETX2 USINT changes from FALSE
messages. (16#0A)
to TRUE
When Execute
Set the timeout time 0-32767
TimeOut UINT changes from FALSE
when receiving data. (0)
to TRUE
Output Parameters
Parameter name Function Data type Valid range
TRUE when the instruction execution is
Done BOOL TRUE / FALSE
completed.
8- 2 5 0
Chapter 8 Logic Instructions
8- 2 5 1
DVP-50MC Series Motion Controller Operation Manual
Execute
Abort
CyclicRun
Done
Aborted
Active
Busy
NewCycle
Received
Received_Timeout
Error
ErrorID
Case 1: In the one-single-cycle work state, Busy changes to TRUE when Execute changes from FALSE
to TRUE. When the instruction execution is completed, Busy changes to FALSE and Done
changes to TRUE. When Execute changes to FALSE, Done changes to FALSE.
Case 2: In the one-single-cycle work state, Busy and Active change to FALSE and Abort changes to
TRUE when the instruction is aborted by other instruction. Then Aborted changes to FALSE
when Execute changes to FALSE. If Execute changes to FALSE before the instruction is
aborted, Aborted changes to TRUE for one cycle.
Case 3: In the multi-cycle state where only the data-sending parameters are configured, when Execute
changes from FALSE to TRUE, Busy changes to TRUE. After a while, Newcycle changes
between TRUE and FALSE alternately. When Abort changes to TRUE, Busy changes to
FALSE and Aborted to TRUE. When Abort changes to FALSE, Aborted remains TRUE.
Aborted remains TRUE when Abort changes to TRUE again. Aborted changes to FALSE when
Execute changes from TRUE to FALSE.
Case 4: In the multi-cycle state where the parameters for receiving and sending data have been
_8 configured and Abort is TRUE, Busy changes to TRUE when Execute changes from FALSE to
TRUE. After a while, both of Newcycle and Received begin to change between TRUE and
FALSE alternately. When triggering Abort again after Execute changes from TRUE to FALSE,
Aborted changes to TRUE, one cycle later, changes to FALSE and others change to FALSE.
Case 5: If there is an error in the configured parameters of the instruction, Error changes to TRUE as
Execute changes from FALSE to TRUE. Error changes to FALSE as Execute changes to
FALSE.
Case 6: In the event that the timeout of receiving data occurs, when Execute changes from FALSE to
TRUE, Busy changes to TRUE and after a while, Receive_Timeout changes to TRUE. When
the communication is restored to normal, both of NewCycle and Received start to change
between TRUE and FALSE alternately.
8- 2 5 2
Chapter 8 Logic Instructions
Cas e 7 Ca se 8 Cas e 9
E xec ut e
A bort
Cy clic Ru n
Don e
Abort ed
Ac tiv e
Bu sy
NewCyc le
Rec eiv ed
Error
E rrorID
Case 1: In the multi-cycle state where Execute is TRUE, when the instruction is aborted by other
instruction, Aborted changes to TRUE, Execute changes to FALSE and Aborted changes to
FALSE.
Case 2: In the multi-cycle state where Execute is FALSE, when the instruction is aborted by other
instruction, Aborted changes to TRUE and one cycle later, changes to FALSE.
Case 3: When the instruction is aborted by other instruction, Busy changes to TRUE. After a while,
Active changes to TRUE and other outputs give corresponding output according to the cases
above.
Function
RS485_RS is used to configure RS485 free protocol communication parameters and watch the
communication status. The firmware of V1.01 and above supports the function.
Precaution
1. RS485_RS does not add the checksum automatically. In ASCll mode, the data sent out are required
to be the ASCll message which has been converted.
2. The total length of sent data is 200 Bytes. The length set in the instruction does not include that of
the start and end of sent messages.
3. Add_STX_ET sets if the header and footer codes are added or not in the sent message. The function
is only enabled when the header and footer codes of the sent message are identical to those of the
received message. Otherwise, the function can not be enabled if the header and footer codes of the
8_
sent message differ from those of the received message and in this case, an error will occur if the
function is enabled. 8_
a. The header code and footer code set in the instruction are for the sent messages. If the sent
message is correct but the header code and footer code in the received message are different
from those of the sent message, the controller will fail to receive the message and the timeout
will happen during receiving.
b. The header code and footer code set in the instruction are for the sent message. So the slave
will not give a response if the sent message does not conform to the slave message requirement.
Thus, the function could not be enabled when the header and footer codes of the sent message are
not identical to those of the received message.
8- 2 5 3
DVP-50MC Series Motion Controller Operation Manual
b) When Abort of RS485_RS instruction changes from FALSE to TRUE, the 485Link function
which is being performed will take effect again.
d) If there are several RS485_RS instructions in the program, only one of them, which is triggered
the last time will take effect.
e) For the message which is sent out via RS485_RS instruction, the address where received data
are stored must be set in the RS485_RS instruction if the slave sends the response message.
_8
8- 2 5 4
Chapter 8 Logic Instructions
Programming Example 1
Enabling the function of the start and end of messages
The free protocol is applied to send a standard Modbus message in ASCll mode with the starting
address %MB4000 where sent data are stored and %MB5000 where received data are stored and
receive the response data from the slave.
Message content: 01 10 15 00 00 01 02 00 08.
The checksum CF is calculated first. Then the message is converted into ASCll code.
Message content after conversion: 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43 46.
If the parameters of RS485_RS instruction are configured based on variable table 1, the data
in %MB4000~%MB4019 are 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43 46.
8- 2 5 5
DVP-50MC Series Motion Controller Operation Manual
8- 2 5 6
Chapter 8 Logic Instructions
Program
RS
R S485_RS 1
RS_Ex Execute Done R S_Done
RS_Abort Abort Busy R S_Bsy
RS _CyRun CyclicRun Active R S_Act
RS_S BA Send_Buffer_Address Aborted R S_Abt
RS_S L Send_Length NewCycle R S_NCyc
RS _R BA Receive_Buffer_Address Received R S_Rec
RS _R L Receive_Length Receive_TimeOut R S_RTO
R S_AddSE Add_S T X_ET X Receive_LengthOverMA X R S_RLOM
S TX Receive_ActulLength R S_RAL
E TX 1 Error R S_Err
E TX 2 ErrorID R S_ErrID
R S_Tout Timeout
8_
8_
8- 2 5 7
DVP-50MC Series Motion Controller Operation Manual
RS485_SetDelayTime
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
RS485_SetDelayTime sets the response-delay time at
FB DVP50MC11P/DVP50MC11P-06
the RS485 communication port of the controller.
DVP50MC11T-04S/DVP50MC11T-16S
RS485_Set De lay Time_Inst ance
RS485_ SetDelayTime
Ex ecut e Done
DelayTime Error
ErrorI D
Input Parameters
Valid range Validation
Parameter name Function Data type
(Default) timing
The instruction is executed TRUE or FALSE
Execute when Execute changes from BOOL -
FALSE to TRUE. (FALSE)
The response-delay time at the
RS485 communication port of When
the controller. It is valid no 0~65535 Execute
DelayTime UINT
matter whether the controller (0) changes to
serves as a master or a slave. TRUE
(Unit: ms)
Output Parameters
Parameter
Function Data type Valid range
name
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Error TRUE when there is an error. BOOL TRUE / FALSE
Contains error codes when an error occurs. Please
Error ID WORD
refer to section 12.2 for the corresponding error code.
Output Update Timing
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
8- 2 5 8
Chapter 8 Logic Instructions
Execute
Done
Er ror
Er ror ID
Case 1: When Execute changes from FALSE to TRUE, DONE changes from FALSE to
TRUE.
Case 2: When an error occurs as Execute changes from FALSE to TRUE, Error
changes to TRUE and ErrorID shows corresponding error codes. Error
changes to FALSE when Execute changes from TRUE to FALSE.
Function
The RS485_SetDelayTime instruction is used to set the response-delay time of the controller RS485
communication port. The setting time is valid when the RS485 communication port of the controller serves
as a master or slave.
When RS485 communication port works as a master, it will not send a next message until the set delay
time elapses after receiving the response data from the slave. When the RS485 communication port
works as a slave, it will not reply to the master until the set delay time elapses after receiving the data
from the master.
8_
8_
8- 2 5 9
DVP-50MC Series Motion Controller Operation Manual
RS232_Link_Config
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
RS232_Link_Config is used for configuration of 232
FB DVP50MC11P/DVP50MC11P-06
communication parameters of the controller.
DVP50MC11T-04S/DVP50MC11T-16S
RS232_Link_Config_instance
R S232_Link_Config
Execute Done
LinkNum Error
EnableLink ErrorID
Noncyclic
SlaveNodeID
ObjType
En_F unCode17
Write_B uffer_Address
Write_Buffer_Address_Offset
Write_Destination_Address
Write_Length
Write_FunCode
Read_Buffer_Address
Read_Buffer_Address_Offset
Read_Destination_Address
Read_Length
Read_FunCode
TimeOut
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
When Execute
Set the node ID of the 0~255
SlaveNodeID USINT changes from
232 slave (0)
FALSE to TRUE
8- 2 6 0
Chapter 8 Logic Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
Set the type of the slave
register to be read and 0~1 When Execute
ObjType written. USINT changes from
0: Word register (0)
FALSE to TRUE
1: Bit register
When Execute
Set if the function code TRUE or FALSE
En_FunCode17 BOOL changes from
17 is used or not. (FALSE)
FALSE to TRUE
The starting register of When Execute
%MW0 ~ %MW32767
Write_Buffer_Address the master where the UINT changes from
%QW0 ~ %QW63
data sent are stored FALSE to TRUE
Set the offset of the
starting register of the
master sending data.
The setting value 1
means the offset is 1 0~255 When Execute
Write_Buffer_Address word if the word
_Offset address of the slave is
USINT (0) changes from
FALSE to TRUE
written.
The setting value 1
means the offset is 1 bit
if the bit address of the
slave is written.
Set the starting address
When Execute
Write_Destination_Ad of the MODBUS slave Standard Modbus
UINT changes from
dress receiving the data from address
FALSE to TRUE
the master
When Execute
The length of data to be Word register: 0~100
Write_Length UINIT changes from
written Bit device: 0~256
FALSE to TRUE
Bit register: 05, 16#0F
Specify the function When Execute
Word register: 06,
Write_FunCode code for writing data in USINT changes from
16#10
registers. FALSE to TRUE
(16#10)
8- 2 6 1
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
Set the starting address
When Execute
Read_Destination_Ad of the MODBUS slave Standard Modbus
UINT changes from
dress to be read by the address
FALSE to TRUE
master
When Execute
The length of data to be Word register: 0~100
Read_Length UINT changes from
read Bit register: 0~256
FALSE to TRUE
Output Parameters
Parameter
Function Data type Valid range
name
TRUE When the configuration of Link parameters is
Done BOOL TRUE / FALSE
successful.
TRUE when an error occurs in execution of the
_8 Error
instruction.
BOOL TRUE / FALSE
8- 2 6 2
Chapter 8 Logic Instructions
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When the configuration of
parameters is correct and When Execute changes from TRUE to
Done
Execute changes from FALSE FALSE
to TRUE.
When Execute changes from TRUE to
When the configuration of
FALSE
parameters is incorrect and
Error When Execute is re-triggered after the
Execute changes from FALSE
parameter configuration is modified
to TRUE.
correctly.
Case 1 Case 2
E xecute
Done
E rror
E rrorI D
Case 1: When the configuration of parameters is correct and Execute changes from FALSE to TRUE,
Done changes from FALSE to TRUE.
Case 2: When the configuration of parameters is incorrect and Execute changes from FALSE to TRUE,
Done is FALSE and Error changes from FALSE to TRUE.
Function
RS232_Link_Config is used to configure parameters for 232 communication Link. The firmware of V1.01
and above supports the function.
Precaution
1. ObjType is the data type of the read and written parameter. When ObjType is 0, it means to read
and write the word register of the slave. The range of Write_Length and Read_Length is 0~100 and
the values of Write_Length and Read_Length can not be 0 at the same time. 8_
When ObjType is 1, it means to read and write the bit register of the slave. The range of Write_Length 8_
and Read_Length is 0~256 and the values of Write_Length and Read_Length can not be 0 at the
same time. For local addresses, you can directly fill addresses, variables combined with addresses,
arrays combined with the starting addresses.
2. For local address to fill the %MB address, you can only fill the low byte of the %MW address rather
than the high byte.
3. For the register address of the slave, you can directly fill the MODBUS address and variable.
4. For the offset in the word operation, the actual address is calculated by word. For the offset in the
bit operation, the actual address is calculated by bit.
For example:
Case 1: Actual address calculated via word offset :
8- 2 6 3
DVP-50MC Series Motion Controller Operation Manual
When the address is %MW0 and the offset is 15, the actual operation address
is %MW15=%MW (0+15).
Case 2: Actual address calculated via bit offset:
When the address is %QW0 and the offset is 7, the actual operation address is %QX0.7.
5. If you choose to read and write the word register of the slave, the %MW register of the local device
can be regarded as the storage register for reading and writing data. The range of the storage
register is %MW0~%MW32767. If the range is exceeded or other register is used, an error will
occur in the instruction.
6. If you choose to read and write the bit register of the slave, the %MW and %QW registers of the
local device can be regarded as the storage registers for reading and writing data. The ranges of
the storage register are %MW0~%MW32767 and %QW0~%QW63. If the ranges are exceeded or
other register is used, an error will occur in the instruction.
7. The set parameter values of this instruction are only valid during the operation of the PLC. When
the controller is repowered after the power off, the parameters configured before the power off are
all invalidated. The ETH_Link_Config instruction must be re-executed if the configuration before the
power off is needed to use.
8. Set the communication mode via the input parameter Noncyclic. The communication mode is the
cyclic communication mode if Noncyclic is set to FALSE. The communication mode is the non-
cyclic communication mode if Noncyclic is set to TRUE.
a. Cyclic Communication Mode: When the current Link is set as cyclic communication mode.
The configuration for the Link will be effective immediately and the data exchange between
the master and slave will be conducted cyclically after RS232 communication function is
enabled via RS232_Link_Manage instruction.
The configuration for the link will not be executed and the data exchange with the slave will
stop after RS232 communication function is disabled via RS232_Link_Manage instruction.
b. Non-Cyclic Communication Mode: When the current Link is set as non-cyclic communication
mode. The configuration for the Link will be effective immediately and the data exchange
between the master and slave will be conducted only once after RS232 communication
function is enabled via RS232_Link_Manage instruction.
If the data exchange between the master and the slave is to be made once again, re-enable
RS232 communication function after RS232 communication function is disabled via
RS232_Link_Manage instruction.
_8
8- 2 6 4
Chapter 8 Logic Instructions
RS232_Link_Manage
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
RS232_Link_Manage is used for switching on or off
FB DVP50MC11P/DVP50MC11P-06
RS232 communication.
DVP50MC11T-04S/DVP50MC11T-16S
R S232_Link_Manage_instance
RS232_Link_Manage
Enable Valid
Open LinkOpened
Input Parameters
Valid range Validation
Parameter name Function Data type
(Default) timing
The instruction is executed when TRUE or FALSE
Enable Enable changes from FALSE to BOOL -
(FALSE)
TRUE.
When
TRUE or FALSE Enable
232 communication is switched
Open BOOL changes
on or off. (FALSE) from FALSE
to TRUE
Output Parameters
Parameter name Function Data type Valid range
Valid TRUE when the outputs of the instruction are valid. BOOL TRUE / FALSE
LinkOpened TRUE when 232 communication is enabled. BOOL TRUE / FALSE
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
8- 2 6 5
DVP-50MC Series Motion Controller Operation Manual
Enable
O pen
Va lid
L inkOp ened
Case 1: When Enable changes from FALSE to TRUE, Open changes to FALSE, Valid changes to
TRUE and LinkOpened changes to FALSE.
Case 2: As Enable changes from FALSE to TRUE, Valid changes to TRUE. In this case, LinkOpened
changes to TRUE as Open changes from FALSE to TRUE. When Enable changes from TRUE
to FALSE, Valid and LinkOpened change to FALSE.
Case 3: As Open is TRUE and Enable changes from FALSE to TRUE, Valid and LinkOpened change
to TRUE. As Open changes to FALSE, LinkOpened changes to FALSE.
Function
RS232_Link_Manage is used to enable or disable the RS232 communication. The firmware of V1.01 and
above supports the function.
1. The input Enable is used to control the instruction to take effect or not. When Enable changes to
FALSE, the operation of other parameters of the instruction will be invalid. When Enable changes to
TRUE, the instruction takes effect and then the operation of other parameter of the instruction will
be valid.
2. In the case that Enable is TRUE, the RS232 communication is switched on as Open changes to
TRUE. The RS232 communication is switched off as Open is FALSE.
3. Before the RS232 communication function is switched on, the parameters of the
RS232_Link_Config instruction must have been configured.
Otherwise, the configured parameters will be not effective if the RS232 function is switched on
before the parameters of the RS232_Link_Config instruction are configured, unless the RS232
communication function is re-switched on.
4. After multiple LinkNum parameters are configured through RS232_Link_Config instructions, only
one RS232_Link_Manage instruction is enough to switch on the RS232 communication function.
_8 And all configurations specified by RS232_Link_Config instructions are for the exchange data with
the slave.
8- 2 6 6
Chapter 8 Logic Instructions
RS232_Link_Status
FB/FC Explanation Applicable model
RS232_Link_Status is used to watch if an error occurs DVP50MC11T/DVP50MC11T-06
FB in the 232 link which the number corresponds to or the DVP50MC11P/DVP50MC11P-06
slave replies with error codes. DVP50MC11T-04S/DVP50MC11T-16S
RS232_Link_Status_instance
R S232_Link_Status
Enable Valid
LinkNum R S232_Link_Error
RS232_Link_ErrorID
Error
ErrorID
Input Parameters
Parameter Valid range Validation
Function Data type
name (Default) timing
The instruction is validated when TRUE or FALSE
Enable BOOL
Enable changes from FALSE to TRUE. (FALSE)
1~24 When Enable
LinkNum The number of the link to be watched. UINT (The variable value changes from
must be set) FALSE to TRUE
Output Parameters
Parameter name Function Data type Valid range
Valid TRUE when the outputs of the instruction are valid. BOOL TRUE / FALSE
Error TRUE when an error occurs in the instruction inputs. BOOL TRUE / FALSE
8- 2 6 7
DVP-50MC Series Motion Controller Operation Manual
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When Enable changes from When Enable changes from
Valid FALSE to TRUE TRUE to FALSE.
The communication is
restored to normal. (Error is
FALSE.)
When an error occurs in the When Enable changes from
RS232_Link_Error communication as Enable is TRUE to FALSE.
TRUE. When Open of
RS232_Link_Manage
changes from TRUE to
FALSE. (Error is FALSE.)
When Enable changes from
When an error occurs in the
TRUE to FALSE.
Error instruction inputs as Enable is
When the correct parameter
TRUE.
value is filled.
E nable
Valid
Error
ErrorID
_8 Case 1: When Enable changes from FALSE to TRUE, Valid changes from FALSE to TRUE. (There is
no error both in the communication and instruction inputs.)
Case 2: If there is an error in the communication, as Enable changes from FALSE to TRUE, Valid
changes from FALSE to TRUE and after a while, RS232_Link_Error changes to TRUE.
Case 3: If there is an error in the instruction inputs, as Enable changes from FALSE to TRUE, Valid
changes from FALSE to TRUE and Error changes to TRUE.
Case 4: If there is an error both in the communication and in the instruction inputs, as Enable changes
from FALSE to TRUE, Valid changes from FALSE to TRUE, Error changes to TRUE and
RS232_Link_Error is still FALSE. After the input parameter values are modified correctly, Error
changes to FALSE and after a while, RS232_Link_Error changes to TRUE. When the input
parameter error occurs again, Error changes to TRUE. At the moment, there will be no change
in RS232_Link_Error no matter whether the communication works normally. When Enable is
TRUE and Error is TRUE, the state of RS232_Link_Error will not be refreshed and will be
invalid.
8- 2 6 8
Chapter 8 Logic Instructions
Function
RS232_Link_Status is used for watching the communication state of the corresponding link.
Precaution
1. The state of RS232_Link_Error will not be refreshed and will be invalid when Enable is TRUE and
Error is TRUE.
2. The input value of LinkNum can be a number or variable.
8_
8_
8- 2 6 9
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The node address of the slave DVP32ES2 is 1. The values in 10 word
registers %MW100~%MW109 of the master are written to D0~D9 in the slave. Then the values in
20 word registers D100~D119 of the slave are read and stored in %MW0~%MW19 in the master
as shown in the following variable table 1.
Variable table 1
Name Address Data type Initial value
Mng RS232_Link_Manage
Mng_En BOOL TRUE
Mng_Open BOOL FALSE
Mng_Valid BOOL
Mng_LOpen BOOL
Confg RS232_Link_Config
Confg _Ex BOOL FALSE
Confg _LN UINT 1
Confg _EL BOOL TRUE
Confg _Ncyc BOOL FALSE
Confg _SNI USINT 1
Confg _OT USINT 0
Confg _EFC17 BOOL FALSE
Confg _WBA %MW100 UINT
Confg _WBAO USINT 0
Confg _WDA UINT 16#1000
Confg _WL UINT 10
Confg _WFC USINT 16#10
Confg _RBA %MW0 UINT
Confg_RBAO USINT 0
Confg _RDA UINT 16#44C
8- 2 7 0
Chapter 8 Logic Instructions
After these parameter settings are done, set Confg _Ex to TRUE and then Mng_Open to TRUE. If the
configuration need be modified during the communication, the input Confg_Ex should be triggered on
the rising edge, Mng_Open should be set to FALSE and then to TRUE after the new configuration data
are set up.
The node address of the slave DVP32ES2 is 1. The values in 31 bit devices %MX0.0~%MX3.6 of
the master are written to Y0~Y30 in the slave. Then the values in Y0~Y30 of the slave are read
and stored in the 31 bit devices %QX0.1~%QX3.7 in the master as shown in the following variable
table 2.
Variable table 2
Name Address Data type Initial value
Mng RS232_Link_Manage
Mng_En BOOL TRUE
Mng_Open BOOL FALSE
Mng_Valid
Mng_LOpen
Confg RS232_Link_Config
Confg _Ex BOOL FALSE
Confg _LN UINT 1
Confg _EL BOOL TRUE
Confg _Ncyc BOOL FALSE
Confg _SNI USINT 1
Confg _OT USINT 1
Confg _EFC17 BOOL FALSE
Confg _WBA %MW0 UINT
Confg _WBAO USINT 0
Confg _WDA UINT 16#0400 8_
Confg _WL UINT 31 8_
Confg _WFC USINT 16#0F
Confg _RBA %QW0 UINT
Confg_RBAO USINT 1
Confg _RDA UINT 16#0400
Confg _RL UINT 31
Confg _RFC USINT 1
Confg _TOut UINT 1000
Confg _Done
8- 2 7 1
DVP-50MC Series Motion Controller Operation Manual
Program
Confg
RS232_Link_Config 1
Confg_Ex Execute Done Confg_Done
Confg_LN LinkNum Error Confg_Err
Confg_E L EnableLink ErrorID Confg_ErrID
Confg_Ncyc Noncyclic
Confg_SN I SlaveNodeID
Confg_OT ObjType
Confg_E FC17 En_FunCode17
Confg_W BA Write_Buffer_Address
Confg_WB AO Write_Buffer_Address_Offset
Confg_W DA Write_Destination_Address
Confg_W L Write_Length
Confg_W FC Write_FunCode
Confg_R BA Read_Buffer_Address
Confg_RB AO Read_Buffer_Address_Offset
Confg_R DA Read_Destination_Address
Confg_R L Read_Length
Confg_R FC Read_FunCode
Confg_Tout TimeOut
Mng
_8 Mng_En
RS 232_Link_Manage 2
Enable Valid Mng_Valid
Mng_Open Open LinkOpened Mng_LOpen
LS tatus
RS 232_Link_Status 3
LStatus_En Enable Valid LStatus_Valid
LStatus_LN LinkNum RS 232_Link_Error LStatus_RLE
R S232_Link_ErrorID LStatus_RLE ID
Error LStatus_Err
ErrorID LStatus_ErrID
8- 2 7 2
Chapter 8 Logic Instructions
RS232_RS
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
RS232_RS is used to configure RS232 free protocol
FB DVP50MC11P/DVP50MC11P-06
communication parameters for DVP50MC.
DVP50MC11T-04S/DVP50MC11T-16S
RS232_R S_instance
RS232_R S
Execute Done
Abort Busy
CyclicRun Active
Send_Buffer_Address Aborted
Send_Length NewCycle
Receive_Buffer_Address Received
Receive_Length Receive_TimeOut
Add_ST X_E TX Receive_LengthOverMAX
ST X Receive_ActulLength
ET X1 Error
ET X2 ErrorID
Timeout
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
The free protocol
TRUE or FALSE When Execute
communication is
Abort BOOL changes from FALSE
aborted when Abort (FALSE) to TRUE
changes to TRUE.
Communication mode
setting for the TRUE or FALSE When Execute
CyclicRun instruction. BOOL changes from FALSE
(FALSE)
FALSE: Non-cyclic; to TRUE
TRUE: Cyclic
Specify the starting
When Execute
register of the master
Send_Buffer_Address USINT %MB0-%MB32767 changes from FALSE
where the sent data
to TRUE
8_
are stored.
Send_length
Set the length of sent
UINT
0-200(Byte)
When Execute
changes from FALSE
8_
data. (0) to TRUE
Specify the starting
When Execute
register of the master
Receive_Buffer_Address USINT %MB0-%MB32767 changes from FALSE
where the received
data are stored. to TRUE
When Execute
Set the length of 0-200(Byte)
Receive_Length UINT changes from FALSE
received data. (0)
to TRUE
Set if the start and end TRUE or FALSE When Execute
Add_STX_ETX codes are added or not BOOL changes from FALSE
(FALSE)
in sent messages. to TRUE
8- 2 7 3
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
FALSE: Not add the
start and end codes.
TRUE: Add the start
and end codes.
When Execute
Set the start of 0-16#7F
STX USINT changes from FALSE
messages. (16#3A)
to TRUE
When Execute
Set the first end of 0-16#7F
ETX1 USINT changes from FALSE
messages. (16#0D)
to TRUE
When Execute
Set the second end of 0-16#7F
ETX2 USINT changes from FALSE
messages. (16#0A)
to TRUE
When Execute
Set the timeout time 0-32767
Timeout UINT changes from FALSE
when receiving data. (0)
to TRUE
Output Parameters
Parameter name Function Data type Valid range
TRUE when the instruction execution is
Done BOOL TRUE / FALSE
completed.
8- 2 7 4
Chapter 8 Logic Instructions
8- 2 7 5
DVP-50MC Series Motion Controller Operation Manual
Execute
Abort
CyclicRun
Done
Aborted
Active
Busy
NewCycle
Received
Received_Timeout
Error
ErrorID
Case 1: In the one-single-cycle work state, Busy changes to TRUE when Execute changes from FALSE
to TRUE. When the instruction execution is completed, Busy changes to FALSE and Done
changes to TRUE. When Execute changes to FALSE, Done changes to FALSE.
Case 2: In the one-single-cycle work state, Busy and Active change to FALSE and Abort changes to
TRUE when the instruction is aborted by other instruction. Then Aborted changes to FALSE
when Execute changes to FALSE. If Execute changes to FALSE before the instruction is aborted,
Aborted changes to TRUE for one cycle.
Case 3: In the multi-cycle state where only the data-sending parameters are configured, when Execute
changes from FALSE to TRUE, Busy changes to TRUE. After a while, Newcycle changes
between TRUE and FALSE alternately. When Abort changes to TRUE, Busy changes to
FALSE and Aborted to TRUE. When Abort changes to FALSE, Aborted remains TRUE.
Aborted remains TRUE when Abort changes to TRUE again. Aborted changes to FALSE when
Execute changes from TRUE to FALSE.
_8 Case 4: In the multi-cycle state where the parameters for receiving and sending data have been
configured and Abort is TRUE, Busy changes to TRUE when Execute changes from FALSE to
TRUE. After a while, both of Newcycle and Received begin to change between TRUE and
FALSE alternately. When triggering Abort again after Execute changes from TRUE to FALSE,
Aborted changes to TRUE, one cycle later, changes to FALSE and others change to FALSE.
Case 5: If there is an error in the configured parameters of the instruction, Error changes to TRUE as
Execute changes from FALSE to TRUE. Error changes to FALSE as Execute changes to
FALSE.
Case 6: In the event that the timeout of receiving data occurs, when Execute changes from FALSE to
TRUE, Busy changes to TRUE and after a while, Receive_Timeout changes to TRUE. When
the communication is restored to normal, both of NewCycle and Received start to change
between TRUE and FALSE alternately.
8- 2 7 6
Chapter 8 Logic Instructions
Case 7 Ca se 8 Case 9
E xecut e
A bort
CyclicRu n
Don e
Abort ed
Active
Bu sy
NewCycle
Received
Receive d_Timeou t
Error
E rrorID
Case 7: In the multi-cycle state where Execute is TRUE, when the instruction is aborted by other
instruction, Aborted changes to TRUE, Execute changes to FALSE and Aborted changes to
FALSE.
Case 8: In the multi-cycle state where Execute is FALSE, when the instruction is aborted by other
instruction, Aborted changes to TRUE and one cycle later, changes to FALSE.
Case 9: When the instruction is aborted by other instruction, Busy changes to TRUE. After a while,
Active changes to TRUE and other outputs give corresponding output according to the cases
above.
Function
RS232_RS is used to configure RS232 free protocol communication parameters and watch the
communication status.
Precaution
1. RS232_RS does not add the checksum automatically. In ASCll mode, the data sent out are required
to be the ASCll message which has been converted.
2. The total length of sent data is 200 Bytes. The length set in the instruction does not include the start
of end of sent messages.
3. Add_STX_ET sets if the header and footer codes are added or not in the sent message. The
function is only enabled when the header and footer codes of the sent message are identical to
those of the received message. Otherwise, the function can not be enabled if the header and footer
codes of the sent message differ from those of the received message and in this case, an error will
occur if the function is enabled.
8_
a. The header code and footer code set in the instruction are for the sent messages. If the sent 8_
message is correct but the header code and footer code in the received message are different
from those of the sent message, the controller will fail to receive the message and the timeout
will happen during receiving.
b. The header code and footer code set in the instruction are for the sent message. So the slave
will not give a response if the sent message does not conform to the slave message requirement.
Thus, the function could not be enabled when the header and footer codes of the sent message are
not identical to those of the received message.
8- 2 7 7
DVP-50MC Series Motion Controller Operation Manual
b. When Abort of RS232_RS instruction changes from FALSE to TRUE, the 232Link function
which is being performed will take effect again.
d. If there are several RS232_RS instructions in the program, only one of them, which is
triggered the last time will take effect.
e. For the message which is sent out via RS232_RS instruction, the address where received
data are stored must be set in the RS232_RS instruction if the slave sends the response
message.
_8
8- 2 7 8
Chapter 8 Logic Instructions
Programming Example 1
Enabling the function of the start and end of messages
1. The free protocol is applied to send a standard Modbus message in ASCll mode with the starting
address %MB4000 where sent data are stored and %MB5000 where received data are stored and
receive the response data from the slave.
Message content: 01 10 15 00 00 01 02 00 08.
The checksum CF is calculated first. Then the message is converted into ASCll code.
Message content after conversion: 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43 46.
2. If the parameters of RS232_RS instruction are configured based on variable table 1, the data
in %MB4000~%MB4019 are 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43 46.
8- 2 7 9
DVP-50MC Series Motion Controller Operation Manual
_8 RS_RLOM BOOL
RS_RAL UINT
RS_Err BOOL
RS_ErrID WORD
8- 2 8 0
Chapter 8 Logic Instructions
Program
RS
R S232_RS 1
RS_Ex Execute Done R S_Done
RS_Abort Abort Busy R S_Bsy
RS _CyRun CyclicRun Active R S_Act
RS_S BA Send_Buffer_Address Aborted R S_Abt
RS_S L Send_Length NewCycle R S_NCyc
RS _R BA Receive_Buffer_Address Received R S_Rec
RS _R L Receive_Length Receive_TimeOut R S_RTO
R S_AddSE Add_S TX_ETX Receive_LengthOverMA X R S_RLOM
S TX Receive_ActulLength R S_RAL
E TX 1 Error R S_Err
E TX 2 ErrorID R S_ErrID
R S_Tout Timeout
8_
8_
8- 2 8 1
DVP-50MC Series Motion Controller Operation Manual
RS232_SetDelayTime
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
RS232_SetDelayTime sets the response-delay time
FB DVP50MC11P/DVP50MC11P-06
at the RS485 communication port of the controller.
DVP50MC11T-04S/DVP50MC11T-16S
RS232_Set De lay Time_Inst ance
RS232_ SetDelayTime
Ex ecut e Done
DelayTime Error
ErrorI D
Input Parameters
Valid range Validation
Parameter name Function Data type
(Default) timing
The instruction is executed TRUE or FALSE
Execute when Execute changes from BOOL -
FALSE to TRUE. (FALSE)
The response-delay time at the
RS232 communication port of When
the controller. It is valid no 0~65535 Execute
DelayTime UINT
matter whether the controller (0) changes to
serves as a master or a slave. TRUE
(Unit: ms)
Output Parameters
Parameter
Function Data type Valid range
name
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Error TRUE when there is an error. BOOL TRUE / FALSE
Contains error codes when an error occurs. Please
Error ID WORD
refer to section 12.2 for the corresponding error code.
Output Update Timing
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
Done When the instruction execution is When Execute changes from TRUE
completed. to FALSE
_8 When an error occurs in the instruction
When Execute changes from TRUE
Error execution or the input parameters for
to FALSE
the instruction are illegal.
8- 2 8 2
Chapter 8 Logic Instructions
Execute
Done
Er ror
Er ror ID
Case 1: When Execute changes from FALSE to TRUE, DONE changes from FALSE to TRUE.
Case 2: When an error occurs as Execute changes from FALSE to TRUE, Error changes to TRUE
and ErrorID shows corresponding error codes. Error changes to FALSE when Execute
changes from TRUE to FALSE.
Function
The RS232_SetDelayTime instruction is used to set the response-delay time of the controller RS232
communication port. The setting time is valid when the RS232 communication port of the controller serves
as a master or slave.
When RS232 communication port works as a master, it will not send a next message until the set delay
time elapses after receiving the response data from the slave. When the RS232 communication port
works as a slave, it will not reply to the master until the set delay time elapses after receiving the data
from the master.
8_
8_
8- 2 8 3
DVP-50MC Series Motion Controller Operation Manual
CO NCAT
EN ENO
In1 Ou t
. .
. .
. .
InN
.
Parameters
Parameter
Meaning Input/ Output Description Valid range
name
The joined
parameter can be
added or removed
while the program
is being written.
Depends on the data type of the variable
In1 to InN Strings to join Input The maximum
that the input parameter is connected to.
number of joined
parameters is 8 and
the minimum
number is 2.
N=2~8.
Depends on the data type of the variable
String resulted from
Out Result of joining Output that the output parameter is connected
joining
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
_8 In1
to ●
InN
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
8- 2 8 4
Chapter 8 Logic Instructions
Function Explanation
The CONCAT instruction joins two or more strings to form a new string and the new string is output to
Out. The parameters from In1 to InN are joined in order as shown in the following figure.
In 1 : ABCD
CO NCAT
In 2 : abc d O ut: AB CDa bcde f123
In 3 : ef1 23
Programming Example
The data types of CONCAT_In1, CONCAT_In2 and Out1 are strings and the values of
CONCAT_In1 and CONCAT_In2 are ’Asasz’ and ’B1255’ respectively. When CONCAT_EN is
TRUE, the value of Out1 is ’AsaszB1255’.
The variable table and program
Variable name Data type Current value
CONCAT_EN BOOL TRUE
CONCAT_In1 STRING ‘Asasz’
CONCAT_In2 STRING ‘B1255’
Out1 STRING ‘AsaszB1255’
CONCAT 1
CO NCAT_EN EN ENO
CO NCAT_In1 I n1 O ut Out 1
CO NCAT_In2 I n2
8_
8_
8- 2 8 5
DVP-50MC Series Motion Controller Operation Manual
8.15.2 DELETE
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
DELETE deletes the specified-length string from the
FC DVP50MC11P/DVP50MC11P-06
specified position from the string variable or constant. DVP50MC11T-04S/DVP50MC11T-16S
DELE TE
EN ENO
In Ou t
L
P
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of the variable
In String for deletion Input String for deletion
that the input parameter is connected to.
Number of
Number of
L characters to Input 0~ maximum length of the string
delete characters to delete
Deletion start Deletion start
P position Input 1~ maximum length of the string
position
Depends on the data type of the variable
Out Deletion result Output String after deletion that the output parameter is connected
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ●
L ●
P ●
Out ●
Note:
_8 The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
8- 2 8 6
Chapter 8 Logic Instructions
Function Explanation
The DELETE instruction deletes L characters starting from the position specified by P of the In
string and the characters after deletion will be output to Out. The deletion way is illustrated as
below.
In= ABCDEFGH L= 3 P=2
DELE TE
ABCDEFGH O ut: A EFGH
Deletion st arts f ro m
the s eco nd c harac ter
Programming Example
DELETE_In is ’AaBbCcDd’, DELETE_L= 2 and DELETE_P = 3. When DELETE_EN is TRUE,
Out1 is’AaCcDd’.
The variable table and program
Variable name Data type Current value
DELETE_EN BOOL TRUE
DELETE_In STRING ‘AaBbCcDd’
DELETE_L UINT 2
DELETE_P UINT 3
Out1 STRING ‘AaCcDd’
DE LETE 1
DEL ETE_EN EN E NO
DE LETE_I n In Out Ou t1
DELETE_ L L
DELETE_ P P
8_
8_
8- 2 8 7
DVP-50MC Series Motion Controller Operation Manual
8.15.3 INSERT
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
INSERT inserts a string to the specified position in
FC DVP50MC11P/DVP50MC11P-06
the string variable or constant. DVP50MC11T-04S/DVP50MC11T-16S
Ins ert
EN ENO
In1 Ou t
In2
P
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of the variable
In1 Original string Input Original string
that the input parameter is connected to.
Depends on the data type of the variable
In2 String to insert Input String to insert
that the input parameter is connected to.
Insertion start Insertion start
P position Input 0~ maximum length of the string
position
Depends on the data type of the variable
Staring after
Out Insertion result Output that the output parameter is connected
insertion
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1 ●
In2 ●
P ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
_8
8- 2 8 8
Chapter 8 Logic Instructions
Function Explanation
The INSERT instruction inserts the In2 string into the In1 string and the new string is output to Out.
The insertion position is between the position specified by P and the position specified by P+1 of
the characters in In1. If P =0, the In2 string is inserted at the start of the In1 string. The insertion
way is illustrated as below.
INSERT
P=0 ABCDEFGH Out : abc ABCDEFGH
Ins ert I n2
INSERT
P=2 ABCDEFG H Out : ABab cCDEFGH
Ins ert I n2
Programming Example
Insert_In1 is ’AaBbCcDd’, Insert_In2 is ’Ee’ and Insert_P=2. When Insert_EN is TRUE, Out1
is ’AaEeBbCcDd’.
The variable table and program
Variable name Data type Current value
Insert_EN BOOL FALSE
Insert_In1 STRING ‘AaBbCcDd’
Insert_In2 STRING ‘Ee’
Insert_P UINT 2
Out1 STRING ‘AaEeBbCcDd’
Insert 1
In sert _EN EN ENO
In sert _In1 I n1 O ut Out 1
In sert _In2 I n2
Insert_P P
8_
8_
8- 2 8 9
DVP-50MC Series Motion Controller Operation Manual
LEFT RIG HT
EN ENO EN ENO
In Ou t In Ou t
L L
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of the variable
In Original string Input Original string
that the input parameter is connected to.
Number of Number of
L Input 0~maximum number of characters
characters to get characters to get
Depends on the data type of the variable
Out Extraction result Output Extraction result that the output parameter is connected
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ●
L ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
_8
8- 2 9 0
Chapter 8 Logic Instructions
Function Explanation
The LEFT/RIGHT instruction extracts a specified-length string from the string In and the extracted
string is output to Out. The LEFT instruction extracts characters from the left of the string In and the
RIGHT instruction extracts characters from the right of the string. The way of extracting characters
is illustrated as below.
In =ABCDEFGH L=4
LEFT LEFT
ABCDEFGH Out : ABCD
RIGHT RIGHT
ABCDEFGH Out : EFGH
Programming Example
When the LEFT_In string is ’AaBbCcDd’, LEFT_L=2 and LEFT_EN is TRUE, Out1 is ’Aa’ as shown
in the following table 1. When the RIGHT_In string is ’AaBbCcDd’, RIGHT_L=2 and RIGHT_EN is
TRUE, Out1 is ’Dd’ as shown in the following table 2.
The variable table and program 1
Variable name Data type Current value
LEFT_EN BOOL TRUE
LEFT_In STRING ‘AaBbCcDd’
LEFT_L UINT 2
Out1 STRING ‘Aa’
L EFT 1
L EFT_E N EN ENO
LEFT_ In In Ou t O ut1
LEFT_L L
8- 2 9 1
DVP-50MC Series Motion Controller Operation Manual
8.15.5 MID
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
MID extracts a specified-length string from the specified
FC DVP50MC11P/DVP50MC11P-06
character position of a string variable or constant.
DVP50MC11T-04S/DVP50MC11T-16S
MI D
EN ENO
In Ou t
L
P
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of the variable
In Original string Input Original string
that the input parameter is connected to.
Length of
Number of
L characters to Input 0~ maximum number of characters
characters to extract
extract
Extraction start Extraction start
P position Input 1~ maximum number of characters
position
Depends on the data type of the variable
Out Extraction result Output Extraction result that the output parameter is connected
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ●
L ●
P ●
Out ●
_8
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
8- 2 9 2
Chapter 8 Logic Instructions
Function Explanation
The MID instruction extracts L characters starting from the number-P character of the In string. The
extracted string is output to Out. The extraction way is illustrated as below.
In =A BCDE FG H L= 3 P=2
Extr act th re e cha ra cte rs
MID
A BCDE FGH O ut : BCD
Programming Example
The MID_In string is ’AaBbCcDd’, MID_L=2 and MID_LP=3. When MID_EN is TRUE, Out1 is ’Bb’.
The variable table and program
Variable name Data type Current value
MID_EN BOOL TRUE
MID_In STRING ‘AaBbCcDd’
MID_L UINT 2
MID_P UINT 3
Out1 STRING ‘Bb’
MID 1
MI D_ EN EN ENO
MI D_ In1 In O ut Out1
MID_L L
MID_P P
8_
8_
8- 2 9 3
DVP-50MC Series Motion Controller Operation Manual
8.15.6 REPLACE
FB/FC Explanation Applicable model
The REPLACE instruction replaces the specified- DVP50MC11T/DVP50MC11T-06
FC length string starting from the specified position with DVP50MC11P/DVP50MC11P-06
another string. DVP50MC11T-04S/DVP50MC11T-16S
REPLA CE
EN ENO
In1 Ou t
In2
L
P
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of the variable
In1 Original string Input Original string
that the input parameter is connected to.
Depends on the data type of the variable
In2 Insert string Input String to insert
that the input parameter is connected to.
Number of Number of
L characters Input 0~ maximum number of characters
characters to delete
Replacement start Replacement start
P position Input 1~ maximum number of characters
position
Depends on the data type of the variable
Out Replacement result Output Replacement result that the output parameter is connected
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1 ●
In2 ●
L ●
_8 P ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
8- 2 9 4
Chapter 8 Logic Instructions
Function Explanation
The REPLACE instruction replaces L characters starting from the number-P character of the In1 string
by inserting another string In2. And the replacement result is output to Out. The replacement process is
illustrated as below.
In1=ABCDEFGH In2=abcd L=3 P=2
REPLACE
Delet e 3 characte rs
Delete Insert
ABCDEFGH AEFGH Out : AabcdEFGH
Programming Example
The REPLACE_In1 string is ’AaBbCcDd’, the REPLACE_In2 string is ’DELTA’, REPLACE_L=2 and
REPLACE_LP=3. When REPLACE_EN is TRUE, Out1 is ’AaDELTACcDd’.
The variable table and program
Variable name Data type Current value
REPLACE_EN BOOL TRUE
REPLACE_In1 STRING ‘AaBbCcDd’
REPLACE_In2 STRING ‘DELTA’
REPLACE_L UINT 2
REPLACE_P UINT 3
Out1 STRING ‘AaDELTACcDd’
REPLA CE 1
REP LACE_E N EN ENO
REP LACE_I n1 In1 Out O ut1
REP LACE_I n2 In2
REPLA CE _L L
REPLA CE _P P
8_
8_
8- 2 9 5
DVP-50MC Series Motion Controller Operation Manual
8.15.7 LEN
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FC LEN calculates the number of characters in a string. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
LEN
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of the variable
In String Input String
that the input parameter is connected to.
Depends on the data type of the variable
Number of Number of
Out characters Output that the output parameter is connected
characters
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The LEN instruction finds the number of characters in a string and the result is output to Out. For example,
when the string is ABCDEFGH, the value of Out is 8.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if the
input variables are omitted. But the output variable is allowed to omit.
_8 Programming Example
The LEN_In string is ’AaBbCcDd’. As LEN_EN is TRUE, the value of Out1 is 8.
The variable table and program
Variable name Data type Current value
LEN_EN BOOL TRUE
LEN_In STRING AaBbCcDd
Out1 UINT 8
LEN 1
L EN_EN EN ENO
LEN_In In O ut Out 1
8- 2 9 6
Chapter 8 Logic Instructions
8.15.8 FIND
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FIND searches for the position of a specified string in
FC DVP50MC11P/DVP50MC11P-06
another string.
DVP50MC11T-04S/DVP50MC11T-16S
FI ND
EN ENO
In1 Ou t
In2
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type of the variable
In1 String Input String
that the input parameter is connected to.
Key characters to Key characters to Depends on the data type of the variable
In2 search for Input
search for that the input parameter is connected to.
Depends on the data type of the variable
Number of Number of
Out characters Output that the output parameter is connected
characters
to.
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In1 ●
In2 ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The Find instruction takes the characters in In2 as key characters and searches for the position of
key characters in the string In1. For example, as In1 is ABCDEFGH and In2 is DE, the value of Out
is 4. 8_
The search starts from the first character in the string In1. 8_
If multiple In2 strings exist in In1, the value of Out is the position of the first In2 from the beginning
of In1.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if the
input variables are omitted. But the output variable is allowed to omit.
8- 2 9 7
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The FIND_In1 string is ’AaBbCcDd’ and the FIND_In2 string is ’Cc’. As FIND_EN is TRUE, the
value of Out1 is 5.
The variable table and program
Variable name Data type Current value
FIND_EN BOOL TRUE
FIND_In1 STRING ‘AaBbCcDd’
FIND_In2 STRING ‘Cc’
Out1 UINT 5
FI ND 1
FIND_EN EN E NO
FIND_I n1 In1 Out O ut1
FIND_I n2 In2
_8
8- 2 9 8
Chapter 8 Logic Instructions
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Position range of left-
side module:
100~107
Position range of
right-side special
module: 0~7
The position of the
The position of the When Execute
extension module
StationID connected to the left side USINT first module at the left changes from
or right side of the motion side of the motion FALSE to TRUE
controller controller is 100 and
the position of the
first module at the
right side of the
controller is 0.
(The variable value
must be set)
The instruction is executed TRUE or FALSE
Execute when Execute changes BOOL (The variable value -
from FALSE to TRUE. must be set)
The number of the first CR 0~max. CR number When Execute
CR (Controlled Register) to be UINT (The variable value changes from
read must be set) FALSE to TRUE
8_
8_
1~64 When Execute
Number of CR registers
Num USINT (The variable value changes from
which are to be read
must be set) FALSE to TRUE
The range of the
data type of the When Execute
The CR values read by the INT or
DesPtr written CR value changes from
instruction DINT
(The variable value FALSE to TRUE
must be set)
Output Parameters
Parameter name Function Data type Valid range
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
8- 2 9 9
DVP-50MC Series Motion Controller Operation Manual
E xecute
Done
Busy
Active
Error
E rro rID
DesP tr
Case 1: When Execute changes from FALSE to TRUE, Busy and Active change to TRUE and one period
later, Done changes to TRUE. Meanwhile Busy and Active change to FALSE and DesPtr shows
the corrsponding data in CR registers of the extension module. When Execute changes from
_8 TRUE to FALSE, Done changes from TRUE to FALSE and the value of DesPtr is cleared to 0.
Case 2: When an error occurs as Execute is TRUE, Error changes from FALSE to TRUE and ErrorID
shows corresponding error codes. Error changes from TRUE to FALSE and the value in ErrorID
is cleared to 0 after Execute changes from TRUE to FALSE.
8- 3 0 0
Chapter 8 Logic Instructions
Function Explanation
The FROM instruction can be applied to read the values in the registers of the left-side and righ-side extension
modules.
The position of the left-side and right-side module is specified by StationID. The Station ID range of right-side
module is 0~7. 0 represents the first extension analog module at the right side and 7 means the eight extension
analog module at the right side. The Station ID range of left-side modules is 100~107. 100 represents the first
extension module at the left side and 107 means the eight extension module at the left side. If the Standard
ID range exceeds the specified range of the left-side and right side module, an error will occur in the instruction
execution.
If more than one CR register need be read by the instruction, the parameter DesPtr need be defined as the
Nth element of an array. The data in the first CR register will be read to the Nth element of the array, the data in
the second CR register will be read to the N+1th element and so on. By doing so, the data in mutiple CR
registers will be all read to the array. Refer to Programming Example 2 for details.
! Precaution
Maximum 8 extension modules are connectable to the left side and Maximum 8 special modules are
connectable to the right side of the motion controller. Digital modules have no position number. For example,
if DVP04AD-S, DVP16SP11T and DVP04DA-S are connected to the right side of the motion controller one
after another, the StationID value of DVP04AD-S is 0 and the StationID value of DVP04DA-S is 1.
Programming Example1
8- 3 0 1
DVP-50MC Series Motion Controller Operation Manual
DVP-04AD is connected to the right side of the motion controller. When FRM1_Ex changes from FALSE
to TRUE and FRM1_Bsy and FRM1_Act change to TRUE simultaneously, FROM instruction starts to
execute. When FRM1_Done changes to TRUE, the instruction execution is finished. The values read from
CR2, CR3, CR4 and CR5 are stored in the four elements FRM1_DP[1], FRM1_DP[2], FRM1_DP[3] and
FRM1_DP[4] of the FRM1_DP array.
_8
8- 3 0 2
Chapter 8 Logic Instructions
8.16.2 TO
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
The TO instruction writes data to the specified CR
FB DVP50MC11P/DVP50MC11P-06
registers of the left-side module and right-side module.
DVP50MC11T-04S/DVP50MC11T-16S
TO_ instance
TO
St ationID Done
Execute Busy
CR Active
Nu m Error
De sPt r ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Position range of left-
side module: 100~107
Position range of right-
side special module:
0~7
The position of the
extension module The position of the first When Execute
StationID connected to the left side USINT module at the left side of changes from
or right side of the motion the motion controller is FALSE to TRUE
controller 100 and the position of
the first module at the
right side of the
controller is 0.
(The variable value must
be set)
The instruction is executed
TRUE or FALSE
Execute when Execute changes BOOL
(FALSE)
from FALSE to TRUE.
The number of the first CR 0~ max. CR number When Execute
CR (Controlled Register) to be UINT (The variable value changes from
read must be set) FALSE to TRUE
1~64 When Execute
Number of CR registers
Num USINT (The variable value changes from
which are to be read
must be set) FALSE to TRUE
The range of the data
type of the written CR When Execute
DesPtr
The CR value written by INT or
value 8_
8_
changes from
the instruction DINT
(The variable value FALSE to TRUE
must be set)
Output Parameters
Parameter name Function Data type Valid range
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the instruction is being executed. BOOL TRUE / FALSE
Error TRUE while there is an error. BOOL TRUE / FALSE
Contains the error code when an error occurs. Please
ErrorID WORD -
refer to section 12.2 for the corresponding error ID.
8- 3 0 3
DVP-50MC Series Motion Controller Operation Manual
Case 1 Case 2
E xecute
Done
Busy
Active
Error
E rro rID
Case 1: When Execute changes from FALSE to TRUE, Busy and Active change to TRUE. One period
later, Done changes to TRUE. Meanwhile Busy and Active changes from TRUE to FALSE. After
Execute changes from TRUE to FALSE, Done changes from TRUE to FALSE.
Case 2: When an error occurs as Execute changes from FALSE to TRUE, Error changes from FALSE to
TRUE and ErrorID shows corresponding error codes. Error changes from TRUE to FALSE and
the value in ErrorID is cleared to 0 after Execute changes from TRUE to FALSE.
Function Explanation
_8 The TO instruction is used to write data to the specified CR registers of the left-side module and right-side
module.
The positions of left-side and right-side modules are specified by StationID. The StationID range of right-side
module is 0~7. 0 represents the first extension analog module at the right side. 7 is the eighth extension analog
module at the right side. The StationID range of left-side module is 100~107. 100 is the first extension module
at the left side. 107 is the eighth extension analog module at the left side. If StationID value exceeds the
specified range for left-side and right-side modules, an error will occur in execution of the instruction.
If the instruction is used to write values to multiple CR registers, DesPtr need be defined as the Nth element of
the array. Then multiple values will be written to multiple CR registers by writing the Nth element value to the
first CR, the N+1th element value to the second CR and so on after execution of the instruction.
Refer to the following program examples for more details on the usage.
Precaution
!
8- 3 0 4
Chapter 8 Logic Instructions
Maximum 8 extension modules are connectable to the left side and Maximum 8 special modules are
connectable to the right side of the motion controller. The right-side digital modules have no position number.
For example, if DVP04AD-S, DVP16SP11T and DVP04DA-S are connected to the right side of the motion
controller one after another, the StationID value of DVP04AD-S is 0 and the StationID value of DVP04DA-S is
1.
Programming Example 1
The variable table and program
Variable name Data type Current value
TO1 TO
TO1_ID USINT 0
TO1_Ex BOOL FALSE
TO1_CR UINT 2
TO1_Num USINT 1
TO1_DP INT 10
TO1_Done BOOL
TO1_Bsy BOOL
TO1_Act BOOL
TO1_Err BOOL
TO1_ErrID WORD
TO1
TO 1
TO1_ID S tationI D Done TO1_Done
TO1_E x Execut e Busy TO1_Bsy
TO 1_CR CR Active TO1_Act
TO1 _Num Num E rro r TO1_Err
TO1_DP DesP tr ErrorID TO1_ErrID
DVP-04AD is connected to the right side of the motion controller. When TO1_Ex changes from FALSE to
TRUE, TO1_Bsy and TO1_Act change to TRUE simultaneously and the TO instruction execution starts. When
TO1_Done changes to TRUE, the instruction execution is finished and the value which is written to CR2 in
DVP-04AD is 10.
8_
8_
8- 3 0 5
DVP-50MC Series Motion Controller Operation Manual
Programming Example 2
The variable table and program
Variable name Data type Current value
TO2 TO
TO2_ID USINT 0
TO2_Ex BOOL FALSE
TO2_CR UINT 2
TO2_Num USINT 4
TO2_DP Array[1..4] of INT
TO2_Done BOOL
TO2_Bsy BOOL
TO2_Act BOOL
TO2_Err BOOL
TO2_ErrID WORD
TO2
TO 1
TO2_ID St ationID Done TO2_Done
TO2_Ex Execute Busy TO2_Bsy
TO2_CR CR Active TO2_Act
TO2_Num Num Error TO2_Err
TO2 _DP[ 1] DesPt r ErrorID TO2_ErrID
DVP-04AD is connected to the right side of the motion controller. When TO2_Ex changes from FALSE to
TRUE, TO2_Bsy and TO2_Act change to TRUE simultaneously and the TO instruction execution starts. As
TO2_Done changes to TRUE, the instruction execution is completed and the values written in CR2, CR3, CR4
and CR5 in DVP-04AD are the values written in the four elements TO2_DP[1], TO2_DP[2], TO2_DP[3] and
TO2_DP[4] of the TO2_DP array respectively.
_8
8- 3 0 6
Chapter 8 Logic Instructions
8.16.3 ImmediateInput
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
ImmediateInput is used for the immediate refresh of
FC DVP50MC11P/DVP50MC11P-06
input points.
DVP50MC11T-04S/DVP50MC11T-16S
ImmediateInput
EN E NO
In put
Num
Parameters
Input/
Parameter name Meaning Description Valid range
Output
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
Input ●
Num ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The ImmediateInput instruction is used for refreshing external input point status to %IX0.0~%IX0.7
and %IX1.0~%IX1.7. If the ImmediateInput instruction does not exist, the controller refreshes
external input point status to %IX0.0~%IX0.7 and %IX1.0~%IX1.7.15 once every time the program
scan starts.
The Input parameter value 0~7 and 8~15 corresponds to %IX0.0~%IX0.7 and %IX1.0~%IX1.7. Num
8_
8_
represents the quantity of consecutive devices starting from the one specified by Input. E.g. when
Input value is 0 and Num is 2, it indicates that the external input point status is refreshed to %IX0.0
and %IX0.1.
8- 3 0 7
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The variable table and program
Variable name Data type Current value
ImdInput_EN BOOL FALSE
ImdInput_Input INT 2
ImdInput_NM USINT 2
ImdInput_ENO BOOL
ImmediateInput
ImdInput_E N EN E NO ImdInput_ENO
ImdInput_Input Input
ImdInput_NM Num
Program explanation
When the input variable ImdInput_EN is TRUE, the external hardware input points status will be
refreshed to %IX0.2 and %IX0.3.
_8
8- 3 0 8
Chapter 8 Logic Instructions
8.16.4 ImmediateOutput
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
ImmediateOutput is used for the immediate refresh of
FC DVP50MC11P/DVP50MC11P-06
output points.
DVP50MC11T-04S/DVP50MC11T-16S
Immediat eOutput
EN E NO
O utput
Num
Parameters
Input/
Parameter name Meaning Description Valid range
Output
Start output
Output Input Start output point 0~7
point
String
Real
Bit string Integer Time, date
number
DWORD
STRING
LWORD
WORD
LREAL
UDINT
USINT
ULINT
BOOL
DATE
BYTE
REAL
TIME
UINT
DINT
SINT
LINT
TOD
INT
DT
Outp
●
ut
Num ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The ImmediateOutput instruction is used for refreshing current status of internal output
point %QX0.0~%QX0.7 to external hardware output point. If the ImmediateOutput instruction does
not exist, the controller refreshes internal output point status to external hardware output point. The
status of %QX0.0~%QX0.7 is decided by other instructions. The ImmediateOutput instruction is only
used for refreshing the status of %QX0.0~%QX0.7 to external hardware output points. The 8_
ImmediateOutput instruction does not control the TRUE or FALSE of %QX0.0~%QX0.7. 8_
The Output parameter value 0~7 of the ImmediateOutput instruction corresponds
to %QX0.0~%QX0.7. Num represents the quantity of consecutive devices starting from the one
specified by Output. E.g. when Output value is 0 and Num is 2, it indicates that the status of %QX0.0
and %QX0.1 is refreshed to the external hardware output point.
8- 3 0 9
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The variable table and program
Variable name Data type Current value
ImdOput_EN BOOL FALSE
ImdOput_Oput INT 2
ImdOput_NM USINT 2
ImdOput_ENO BOOL
I mmediateOut put
ImdOput_E N EN ENO ImdOput_ENO
ImdOpu t_Oput Output
ImdOpu t_NM Num
Program Explanation
When the input variable ImdOput_EN is TRUE, the status of %QX0.2 and %QX0.3 will be
refreshed to the external hardware output point.
_8
8- 3 1 0
Chapter 8 Logic Instructions
8.16.5 Left_Manage
FB/FC Explanation Applicable model
The Left_Manage instruction is used to enable or DVP50MC11T/DVP50MC11T-06
FB disable the function of the left-side module device DVP50MC11P/DVP50MC11P-06
mapping. DVP50MC11T-04S/DVP50MC11T-16S
Input Parameters
Valid range Validation
Parameter name Function Data type
(Default) timing
The instruction is executed when TRUE or FALSE
Enable Enable changes from FALSE to BOOL -
(FALSE)
TRUE.
When
Enable the function of the left- TRUE or FALSE Enable
Open BOOL
side module device mapping. (FALSE) changes to
TRUE
Output Parameters
Parameter name Function Data type Valid range
Valid TRUE when the output of the instruction is valid. BOOL TRUE / FALSE
TRUE when the function of the left-side module device
LeftOpened BOOL TRUE / FALSE
mapping is enabled.
Output Update Timing
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
8- 3 11
DVP-50MC Series Motion Controller Operation Manual
Enable
Open
Valid
LinkOpened
Case 1: When Enable changes from FALSE to TRUE and Open is FALSE, Valid changes to TRUE
and LinkOpened is FALSE.
Case 2: In the situation that Enable changes from FALSE to TRUE and Valid changes to TRUE,
LinkOpened changes to TRUE as Open changes from FALSE to TRUE. Valid and
LinkOpened change to FALSE as Enable changes from TRUE to FALSE.
Case 3: When Open is TRUE and Enable changes from FALSE to TRUE, Valid and LinkOpened
change to TRUE. When Open changes to FALSE, LinkOpened changes to FALSE.
Function
1. The firmware of V1.11 major version and above as well as that of V1.04 minor version and above
support the instruction function.
2. When DVP04AD-SL and DVP04DA-SL modules are connected to the left side of DVP-50MC/15MC
series motion controller, the Left_Manage instruction can be used to enable or disable the function
of the left-side module device mapping. While Enable is TRUE, the function of the left-side module
device mapping is turned ON if Open is TRUE. The function of the left-side module device mapping
is turned OFF if Open is FALSE.
3. The function of the left-side module device mapping is disabled by default for one PLC. The
function of the left-side module device mapping can not be used until the Left_Manage instruction
is re-executed to enable the function after the function is enabled and the PLC is power ON again.
4. See the following input and output areas for the modules at different positions of the PLC when
DVP-50MC/15MC series PLC connects modules at its left side. The position of the first module at
the left-side of the PLC is 1 and the second one is 2 and so on. The positions of all modules at the
_8 left side of the PLC can be counted in order.
No matter whether the device mapping function is enabled or not by the instruction, the calculation
method for the left-side module position is identical.
The mapping device area for AD modules is the input mapping area and the mapping device area
for DA modules is the output mapping area
Mapping area
Output mapping area Input mapping area
Position
1 %MW6250~%MW6377 %MW6000~%MW6127
2 %MW6750~%MW6877 %MW6500~%MW6627
3 %MW7250~%MW7377 %MW7000~%MW7127
8- 3 1 2
Chapter 8 Logic Instructions
Mapping area
Output mapping area Input mapping area
Position
4 %MW7750~%MW7877 %MW7500~%MW7627
5 %MW8250~%MW8377 %MW8000~%MW8127
6 %MW8750~%MW8877 %MW8500~%MW8627
7 %MW9250~%MW9377 %MW9000~%MW9127
8 %MW9750~%MW9877 %MW9500~%MW9627
5. When the device mapping function is enabled by the instruction, the corresponding CR registers of
DVP04AD-SL and DVP04DA-SL modules are mapped to the input or output mapping area of the
PLC. The CR registers of DVP04AD-SL and DVP04DA-SL modules are not mapped to the input or
output mapping area of the PLC if the device mapping function is not enabled by the module and
the values in the CR registers can be read or written via FROM or TO instruction.
No matter whether the device mapping function is enabled or not by the instruction, the input and
output mapping areas for the network module (e.g. DVPPF02-SL) always exist.
6. When the device mapping function is enabled by the instruction, CR12-CR19 registers of the
DVP04AD-SL module is mapped to the first 8 Words of the input mapping area of the PLC. If
DVP04AD-SL module is the first one on the left, the CR registers of the AD module correspond to
the mapping areas of the PLC as shown in the following table. If the DVP04AD-SL module is the
second one on the left, CR12-CR19 registers of the AD module are mapped
to %MW6500-%MW6507 of the PLC. For the AD module located at other positions, the device
mapping relationship can be calculated orderly in the same way.
7. When the device mapping function is enabled by the instruction, CR16-CR19 registers of the
DVP04DA-SL module are mapped to the first 4 Words of the output mapping area of the PLC.
If DVP04DA-SL module is the first one on the left, the CR registers of the DA module correspond to
the mapping areas of the PLC in the following table.
8- 3 1 3
DVP-50MC Series Motion Controller Operation Manual
If the DVP04DA-SL module is the second one on the left, CR16-CR19 registers of the DA module
are mapped to %MW6750-%MW6753 of the PLC. For the DA module located at other positions,
the device mapping relationship can be calculated orderly in the same way.
_8
8- 3 1 4
Chapter 8 Logic Instructions
Parameters
Parameter Input/
Meaning Description Valid range
name Output
PID_RUN Enable PID operation Input Enable PID operation TRUE or FALSE
SV Target value Input Target value −3.402823e+38 ~
−1.175495e-38,
0,
PV Current value Input Current value
+1.175495e-38 ~
+3.402823e+38
0: Auto control, the output value
(MV) is involved in the automatic 8_
operation. 8_
1: Auto parameter-tuning
function; when the tuning of the
PID_MODE PID control mode Input parameters is completed, the 0、1
auto control mode is entered
automatically (PID_MODE is set
to 0) and appropriate parameters
Kc_Kp, Ti_Ki, Td_Kd and Tf are
filled.
TRUE: Manual mode
PID_MAN PID A/M mode Input TRUE or FALSE
FALSE: Auto mode
MOUT_AUTO Reserved Input - -
8- 3 1 5
DVP-50MC Series Motion Controller Operation Manual
Parameter Input/
Meaning Description Valid range
name Output
1~40,000
CYCLE Sampling time(TS) Input Sampling time(TS)
(Unit: ms)
Calculated proportional 0,
Kc_Kp Proportional Coefficient Input coefficient. If the P coefficient is +1.175495e-38 ~
less than 0, the Kc_Kp will be 0. +3.402823e+38
0,
If the calculated coefficient I is +1.175495e-38 ~
Ti_Ki Integral coefficient Input +3.402823e+38
less than 0, Ti_Ki will be 0.
(Unit: Ti = sec;
Ki = 1/sec)
If the calculated coefficient D is
Td_Kd Derivative Coefficient Input 0,
less than 0, Td_Kd will be 0.
If the derivative-action time +1.175495e-38 ~
Derivative-action time
Tf Input constant is less than 0, Tf will be +3.402823e+38
constant (Unit: sec)
0
PID_EQ Reserved Input - -
PID_DE Reserved Input - -
TRUE: Positive direction
PID forward/reverse (E=SV-PV)
PID_DIR Input TRUE or FALSE
direction FALSE: Negaitve direction
(E=PV-SV)
Range within which the
Range within which the error
ERR_DBW error value is counted as Input
value is counted as 0
0
The upper limt of MV −3.402823e+38 ~
MV_MAX Input The upper limt of MV output vlaue −1.175495e-38,
output vlaue
The lower limt of MV
MV_MIN Input The lower limt of MV output vlaue 0,
output vlaue
+1.175495e-38 ~
MOUT Manual output value Input Manual output value +3.402823e+38
BIAS Feedforward output value Input Feedforward output value
I_MV Reserved Input System parameter; DO not use it.
−3.402823e+38 ~
−1.175495e-38,
MV value is between MV_MAX
MV Output value Output 0,
and MV_MIN.
_8 +1.175495e-38 ~
+3.402823e+38
8- 3 1 6
Chapter 8 Logic Instructions
Boolean
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
PID_RUN ●
SV ●
PV ●
PID_MO
●
DE
PID_MAN ●
MOUT_A
●
UTO
CYCLE ●
Kc_Kp ●
Ti_Ki ●
Td_Kd ●
Tf ●
PID_EQ ●
PID_DE ●
PID_DIR ●
ERR_DB
●
W
MV_MAX ●
MV_MIN ●
MOUT ●
BIAS ●
I_MV ●
MV ●
Note:
The instruction is used to implement the PID operation. The PID operation is conducted only when PID
instruction is performed by PLC. PID stands for Proportion, Integral and Derivative. The PID control is widely
applied to mechanical equipment, pneumatic equipment and electronic equipment.
8_
Function Explanation 8_
There is no limit to how many times the instruction can be used. However, the variable specified by
I_MV can not be used by other program repeatedly.
PID instruction can only be used in the cyclic task.
As long as PID is scanned, according to the sampling time specified by CYCLE, the PID operation
is implemented and the MV value is output directly. The PLC will not calculate automatically
whether the scan time reaches the sampling time specified by CYCLE so as to output.
The present value (PV) of PID must be a steady value before PID operation is performed. If the
input values of special modules are to be captured for PID operation, users should notice the A/D
conversion time of modules.
8- 3 1 7
DVP-50MC Series Motion Controller Operation Manual
When the PV value is in the range of ERR_DBW, at the beginning, the present error will be brought
into the PID operation according to the normal processing and then the PLC module will check
whether the present error meets the cross status condition: PV (process value) passes by the SV
(target value). Once the condition is met, the present error will be counted as 0 for the PID operation.
And after the PV value is out of the ERR_DBW range, the present error will be brought into the PID
operation again.
If PID_DE is TRUE, that means using the the PV value to calculate the control value of the derivative
and after the cross status condition is met, the PLC will treat Δ PV as 0 to implement the PID
operation. (Δ PV= current PV – previous PV). As the example shown below, the present error will be
brought into the PID opeation according to the normal processing in the section A and the present
error or Δ PV will be counted as 0 to implement the PID operation in the section B.
PID Algorithm:
When PID_MODE is set to 0, the PID control mode is the automatic control mode
8- 3 1 8
Chapter 8 Logic Instructions
ERR_DBW
Kc_Kp
PID-P
>0 PID_MAN
BIAS
+ 0
<=0 +
0 +
Kc_Kp MV_LIMIT
1
MV
Ti_Ki
PID-I
>0
MV_MAX, MV_MIN
+
<=0 +
0 +
Ti_Ki MOUT_AUTO
+ MOUT
0
Td_Kd MOUT
PID-D PID_MAN
>0 1
0
<=0
0 1
Td_Kd, Tf MOUT
8_
8_
8- 3 1 9
DVP-50MC Series Motion Controller Operation Manual
Kc_Kp
ERR_DBW Kc_Kp
>0
<=0
0
PID_MAN
BIAS
+ 0
+
+
MV_LIMIT
1
Ti_Ki MV
PID-I
>0
MV_MAX, M V_MIN
<=0
0
Ti_Ki MOUT_AUTO
MOUT
0
Td_Kd MOUT PID_MAN
PID-D
>0 1
0
<=0
0 1
Td_Kd, Tf MOUT
Precaution and Suggestion:
Owing to the fact that the instruction PID can be used in a lot of controlled environments, users have
to choose the control function appropriately. For example, to prevent the improper control from
occurring, PID_MODE can not be used in the motor controlled environment because it is set to 1 and
MV value is switched between MAX and MIN.
When users tune the parameters Kc_Kp, Ti_Ki, and Td_Kd (PID_MODE is set to 0), they have to
tune Kc_Kp first (according to the experience), and then set the Ti_Ki and the Td_Kd to 0. When
users can handle the control, they can increase Ti_Ki and the Td_Kd. When the Kc_Kp is 1, it
means that the proportional gain is 100%. That is, the error value is increased by a factor of one.
When the proportional gain is less than 100%, the error value is decreased. When the proportional
gain is larger than 100%, the error value is increased.
To prevent the parameters which have been tuned automatically from disappearing after a power
_8 cut, we suggest users should store the parameters in the latched variables when PID_MODE =1 is
selected. The parameters which have been tuned automatically are not necessarily suitable for every
controlled environment. Therefore, users can modify the parameters which have been tuned
automatically. However, it is suggested that users only modify the Ti_Ki and the Td_Kd.
The instruction should be used with many parameters. To prevent the improper control from
occurring, please do not set the parameters randomly.
The steps of tuning the parameters used with the instruction PID
b
Suppose that the transfer function of G(s)the plant is the first-order function G(s) = , the SV is
s+a
1, the sampling time CYCLE is 10 milliseconds. It is suggested that the steps of tuning the parameters
are as follows.
8- 3 2 0
Chapter 8 Logic Instructions
Step 1: First, set the Ki and theKd to 0. Next, set the KP to 5, 10, 20 and 40 successively, and record the
target values and the process values. The results are shown in the diagram below.
1 .5
KP=4 0 S V=1
KP= 20 K P= 1 0
1
K P= 5
0 .5
Step 2: When the KP is 40, there is overreaction. Thus, the KP is not chosen. When the KP is 20, the reaction
curve of the PV is close to the SV, and there is no overreaction. However, due to the fast start-up,
the transient output value (MV) is very big. The KP is not chosen, either. When the KP is 10, the
reaction curve of the PV approaches the SV smoothly. Therefore, the KP is chosen. When the KP is
5, the reaction is too slow. Thus, the KP is not chosen.
Step 3: After the KP is set to 10, increase the KI. For example, the KI is set to 1, 2, 4, and 8 successively.
The KI should not be larger than the KP. Then, increase the KD. For example, the KD is set to 0.01,
0.05, 0.1, and 0.2 successively. The KD should not be larger than ten percent of the KP. Finally, the
relation between the PV and the SV is presented in the following diagram.
1 .5
PV =S V
0 .5
KP =1 0,K I =8 ,KD =0 .2
Note:
The example is only for reference. Users have to tune the parameters properly according to the practical condition of 8_
the control system 8_
Programming Example
Using the automatic tuning function to control the temperature
Purpose: Using the automatic tuning function to calcaulte the most appropriate parameters for the PID
temperature control
Explanation:
Due to the fact that users may not be familiar with the characteristics of the temperature environment which is
controlled for the first time, they can use the automatic tuning function to make an initial adjustment (PID_MODE
is set to 1). After the tuning of the parameter is complete, PID_MODE is set to 0. The controlled environment in
this sample is an oven. The program example is as below
8- 3 2 1
DVP-50MC Series Motion Controller Operation Manual
_8
8- 3 2 2
Chapter 8 Logic Instructions
3. The program
:
a. POU1(Cyclic Task)
PID0
PI D 1
D_RUN PI D_RUN MV D_MV
D_SV SV
D_PV PV
D_MODE P ID_MO DE
D_MAN PID_MA N
MOUT_AUTO
D_CYC CYCLE
D_Kc K c_Kp
D_Ki Ti_Ki
D_Kd Td_Kd
D_Tf Tf
P ID_EQ
P ID_DE
D_DIR P ID_DIR
D_DBW ERR_DBW
D_MAX MV_MAX
D_MIN MV_MIN
D_MO UT MO UT
D_BI AS B IAS
D_I_MV I_MV
:
b. POU2(Freewheeling Task)
GPWM1
GP WM 3
D_RUN E nable Out M2
G_In1 In1
4000 In2
8_
8_
8- 3 2 3
DVP-50MC Series Motion Controller Operation Manual
d. The experimental result of using the parameters which have been tuned to control the
temperature is shown below.
e. As the diagam above shows, after the parameters are tuned automatically, users can
get a good temperature control result. It only takes about twenty minutes to control the
temperature. When the target temperature changes from 80°C to100°C, the result is
as below
_8
f. As the diagam above shows, when the target temperature changes from 80°C to
100°C, the parameters tuned previously still can be used to control the temperature.
Besides, it does not take much time to control the temperature.
8- 3 2 4
Chapter 8 Logic Instructions
8.17.2 GPWM
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB The GPWM instruction is used in the pulse output. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
GPWM _ ins tanc e
GPWM
Ena ble Out
In1
I n2
Parameters
Parameter Input/
Meaning Description Valid range
name Output
The instruction execution starts when
Enable Enable Input TRUE or FALSE
Enable changes from FALSE to TRUE.
The width of When the instruction is executed, set the
In1 Input 0~32767
output pulse width of output pulse (ms).
Output cycle of When the instruction execution starts, set
In2 Input 1~32767
pulse the cycle of output pulse (ms).
Register for The output is TRUE within the width of
Out Output TRUE or FALSE
outputing pulse output pulse.
Boolean BOOL
String
Real
Bit string Integer Time, date
number
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
Enable ●
In1 ●
In2 ●
Out ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
The GPWM instruction is used in the pulse output.
Please use GPWM instruction in the freewheeling task. Otherwise the output of GPWM instruction 8_
may be inaccurate. 8_
The values of In1 and In2 can be modified while GPWM instruction is being executed.
When In1 ≤ 0, the pulse output register has no output. When In1 ≥ in2, the pulse output register is
always ON.
The output of GPWM instruction can use a variable or any bit register. For details, refer to “Section
3.1.2 Registers and Data Types”.
8- 3 2 5
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The variable table and program
Variable name Data type Initial value
GPWM0 GPWM
GPWM0_En BOOL FALSE
GPWM0_In1 INT 1000
GPWM0_In2 INT 2000
GPWM0
GP WM 1
GPWM0_En E nable Out %QX0. 0
GPWM0_In1 In1
GPWM0_In2 In2
Timing Chart
GPWM_E N
t= 1000ms
%Q X0.0
T=200 0ms
Additional Explanation:
When GPWM_EN changes to TRUE, the instruction works nornally.
When GPWM_EN changes to FALSE, the output of the instruction changes to FALSE.
_8
8- 3 2 6
Chapter 8 Logic Instructions
ADR
EN ENO
In Ou t
Parameters
Parameter Input/
Meaning Description Valid range
name Output
Depends on the data type
The variable of which the address is to be of the variable that the
In Input vlaue Input
ouput input parameter is
connected to.
Depends on the data type
Operation of the variable that the
Out Output Output variable address of IN
result output parameter is
connected to.
Boolean
Pointer
String
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
STRING
In ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● Pointer To xx
Out ●
Note:
1. The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data
type.
2. The data type xx of ‘Pointer To xx’ must be the same as that of IN. 8_
Function Explanation 8_
The ADR instruction is used to get the address of a variable. Get the variable address and then find the
value stored in the variable address by using the symbol ^.
Programming Example
The ADR instruction is used to get the address of input variable ADR_In and place it in the output
variable ADR1. The address of ADR_In is %MW0. After the ADR instruction is executed, ADR1
points to %MW0. After ADD is executed, ADR1 points to %MW1. ADR1^ means to get the value
from the address of ADR1. (ADR1 value is %MW1 and ADR1^ means to get the value in %MW1.)
The value in %MW1 is moved to the OUT1 variable through executing MOVE instruction.
8- 3 2 7
DVP-50MC Series Motion Controller Operation Manual
1 A DR_E N A DR
EN ENO
A DR_I N In Out AD R1
2
AD D_E N A DD
EN ENO
A D R1 In1 Out A DR1
1 In2
3
AD D_E N
MOV E
EN E NO
A DR1^ In Out O UT 1
_8
8- 3 2 8
Chapter 8 Logic Instructions
EtherC AT_SysDiag_instance
EtherC AT _SysDiag
Enable Done
DiagType Error
ErrorID
Node
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is executed TRUE or FALSE When Enable
Enable when Enable changes from BOOL
(FALSE) changes to TRUE
FALSE to TRUE.
1: Whether the axis has been
configured in the software;
2: Whether the axis has made
When Enable
DiagType the connection with the USINT 1, 2, 3
changes to TRUE
EtherCAT port;
3: Whether the axis has sent
Emergency message.
Output Parameters
Parameter
Function Data type Valid range
name
TRUE when the instruction execution is
Done BOOL TRUE / FALSE
completed.
TRUE when an error occurs in execution of the
Error BOOL TRUE / FALSE
instruction.
8_
Contains the error code when an error occurs.
ErrorID WORD -
8_
Please refer to section 12.2.
Outputs the corresponding states of all axes
Node Array[1..32]of BOOL -
based on the input value of DiagType.
Output Update Timing
Name Timing for changing to TRUE Timing for changing to FALSE
When Enable changes to FALSE
Done TRUE when the instruction execution is completed.
When Error changes to TRUE
When an error occurs in the instruction execution or When an abnormal situation is
Error
the input parameters for the instruction are illegal. cleared.
8- 3 2 9
DVP-50MC Series Motion Controller Operation Manual
Functions
EtherCAT_SysDiag is used for the diagnosis of the states of the slaves connected to the EtherCAT port.
Only the EtherCAT port embedded in the motion controller can use the instruction.
If the value of Node is a BOOL array, the states of 1~32 axes can be output. When the DiagType value
is different, the Node value represents different meaning.
When the DiagType value is 1, the Node state means whether the axis has been configured in the
software.
If Node is TRUE, it indicates that the axis has been configured in the software. If Node is FALSE, it
indicates that the axis has not been configured in the software.
When the DiagType value is 2, the Node state represents whether the axis has made the connection
with EtherCAT port.
If Node is TRUE, the axis has made the connection with EtherCAT port. If Node is FALSE, the axis has
not made the connection with EtherCAT port.
When the DiagType value is 3, the Node value represents whether the axis has sent Emergency
message.
If Node is TRUE, the axis has sent an alarm. If Node is FALSE, the axis alarm has been cleared.
If the DiagType value is 2 and Node corresponds to variable a, a[1] is TRUE when the No. 1 axis makes
the connection with EtherCAT port. a[1] is FALSE when the EtherCAT cable connected to axis1 is
removed.
Programming Example
1. The variable table
Variable name Data type Initial value
ECSD EtherCAT_SysDiag
ECSD _EN BOOL
ECSD _DT USINT 2
ECSD _Node ARRAY [1..32] OF BOOL
2. The program
E CSD
EtherCAT_SysDiag 1
EC SD_En Enable Done
E CS D_D T DiagType Error
ErrorID
Node E CS D_Node
_8
You can get to know whether the corresponding axis has made the connection with the EtherCAT port via
the values of ECSD_Node array members.
If ECSD_Node[1]=1, it means that the No.1 axis has made the connection with the EtherCAT port.
If ECSD_Node[1]=0, it means that the No.1 axis has not made the connection with the EtherCAT port. It
may be because the communication cable is not connected or is removed after being plugged. If you want
to judge whether the No. 2 axis has made the connection with the EtherCAT port, use the value of
ECSD_Node[2]. For other axes, the same way can be used to judge the state of the connection with the
EtherCAT port.
8- 3 3 0
Chapter 8 Logic Instructions
CANopen_SysDiag_instance
CANopen_SysDiag
Enable Done
DiagType Error
E rrorID
Node
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is executed
TRUE or FALSE When Enable
Enable when Enable changes from BOOL
(FALSE) changes to TRUE.
FALSE to TRUE.
1: Whether slaves are
configured in the
software. 1,2,3
2: Whether slaves and (The variable When Enable
DiagType CANopen port are made USINT
value must be changes to TRUE.
connection.
3: Whether slaves have set)
released Emergency
message.
Output Parameters
Parameter
Function Data type Valid range
name
Done TRUE when the instruction execution is completed. BOOL TRUE/FALSE
TRUE when there is an error in the execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please
ErrorID WORD
refer to section 12.2.
Outputs corresponding states of all slaves based on Array[1..32]of
Node
different values of DiagType. BOOL 8_
Output Update Timing 8_
Name Timing for changing to TRUE Timing for changing to FALSE
TRUE when the instruction When Error changes to TRUE.
Done
execution succeeds. When Enable changes to FALSE.
When an error occurs in the
instruction execution or the input
Error When the error is cleared.
parameters for the instruction are
illegal.
8- 3 3 1
DVP-50MC Series Motion Controller Operation Manual
Functions
CANopen_SysDiag is used for the diagnosis of the states of all slaves connected to CANopen port. (Only
the CANopen port built in the motion controller can use the instruction.)
The output Node is an array of BOOL for outputing the states of 1~32 axes. The value of Node has
different meaning when the value of the input DiagType varies.
When the value of the input DiagType is 1, the value of Node means whether slaves are configured in
the software. TRUE means that slaves are configured in the software. FALSE means slaves are not
configured in the software.
When the value of the input DiagType is 2, the value of Node means whether slaves make the connection
with CANopen port. TRUE means the connetion is made. FALSE means the connetion is not made.
When the value of the input DiagType is 3, the value of Node means whether slaves release Emergency
message. TRUE means Emergency message has been sent. FALSE means Emergency message has
not been sent.
E.g. if the value of DiagType is 2 and the variable of the output Node is a, the value of a[1] is TRUE when
slave 1 and CANopen port make the connection and the value of a[1] is FALSE when the CANopen cable
of slave 1 is removed.
Programming Example
1. The variable table
Variable name Data type Initial value
CSD CANOpen_SysDiag
CSD_EN BOOL
CSD_DT USINT 2
CSD_Node ARRAY [1..32] OF BOOL
2. The program
C SD
CA Nopen_SysDiag 1
C SD_En Enable Done
CS D_D T DiagType Error
ErrorID
Node CS D_Node
From the values of members of the CSD_Node array, you can figure out if the corresponding slave is
connected to CANopen communication port of the controller or not.
If CSD_Node[1]=1, it indicates that axis 1 and CANopen communication port have been connceted, if the
CSD_Node[1]=0, it indicates that axis 1 and CANopen communication port have not been connected.
The possible reason is that the communication cable between CANopen communication port and axis 1
_8 is not connected properly or the communication cable is unplugged after being plugged in.
For the connection of axis 2 to CANopen communication port, you can use the value of CSD_Node[2] to
judge whether the connection is successful or not.
For the connection of other axes to CANopen communication port, use the same way to judge whether
the connection is successful or not.
8- 3 3 2
Chapter 8 Logic Instructions
CANopen_NodeDiag
FB/FC Explanation Applicable model
CANopen_NodeDiag is used for the diagnosis of the DVP50MC11T/DVP50MC11T-06
FB state of the specified slave connected to CANopen DVP50MC11P/DVP50MC11P-06
port. DVP50MC11T-04S/DVP50MC11T-16S
CANopen_NodeDiag_ins tanc e
CANopen_NodeDiag
Enab le Done
Slav eNode Error
ErrorI D
InitSuc ces s
InitFailure
DeviceNotRight
AutoSDOFailure
ReceiveEmc y
Hearbeat Timeout
NodeNumSame
EMCY_Num
EMCY_Data
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Enable TRUE or FALSE When Enable
Enable changes from FALSE to BOOL
(FALSE) changes to TRUE.
TRUE.
1~32
(The variable When Enable
SlaveNode USINT
value must be changes to TRUE.
set)
Output Parameters
Parameter name Function Data type Valid range
TRUE when the instruction execution is
Done BOOL TRUE/FALSE
completed.
TRUE when there is an error in the execution
Error BOOL TRUE / FALSE
of the instruction.
Contains the error code when an error occurs.
ErrorID WORD
Please refer to section 12.2.
InitSuccess TRUE when the slave initializing succeeds. BOOL TRUE / FALSE 8_
InitFailure TRUE when the slave initializing fails. BOOL TRUE / FALSE
8_
DeviceNotRight TRUE when the slave register is incorrect. BOOL TRUE / FALSE
TRUE when the setting for Auto SDO of the
AutoSDOFailure BOOL TRUE / FALSE
slave fails.
TRUE when the slave receives the
ReceiveEmcy BOOL TRUE / FALSE
Emergency message.
TRUE when the heartbeat message timeout
HeartbeatTimeout BOOL TRUE / FALSE
occurs.
8- 3 3 3
DVP-50MC Series Motion Controller Operation Manual
_8
8- 3 3 4
Chapter 8 Logic Instructions
CANopen_State
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
CANopen_State is used for the diagnosis of the state
FB DVP50MC11P/DVP50MC11P-06
of CANopen port.
DVP50MC11T-04S/DVP50MC11T-16S
CANopen_State_inst ance
CA Nopen_St ate
Enab le Done
Error
ErrorI D
O perat ional
St opped
PreOperational
Bus Off
Bus Error
SlaveOfflin e
ParaErr
Tx BufferFull
Rx BufferFu ll
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Enable TRUE or FALSE When Enable
Enable changes from FALSE to BOOL
(FALSE) changes to TRUE.
TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
Done TRUE when the instruction execution is completed. BOOL TRUE/FALSE
TRUE when there is an error in the execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please
ErrorID WORD
refer to section 12.2.
Operational TRUE when the master is in the operational state. BOOL TRUE / FALSE
Stopped TRUE when the master is in Stop state. BOOL TRUE / FALSE
PreOperational TRUE when the master is in the preoperational state. BOOL TRUE / FALSE
BusOff
TRUE when the bus interference is too strong or the
BOOL TRUE / FALSE 8_
products of different baud rates exist in the network.
8_
BusError TRUE when the bus error occurs. BOOL TRUE / FALSE
SlaveOffline TRUE when some slave is offline. BOOL TRUE / FALSE
TRUE when the master and slave configuration
ParaError BOOL TRUE / FALSE
parameter error occurs.
TRUE when the buffer area for the master to send data
TxBufferFull BOOL TRUE / FALSE
is full.
TRUE when the buffer area for the master to receive data
RxBufferFull BOOL TRUE / FALSE
is full.
8- 3 3 5
DVP-50MC Series Motion Controller Operation Manual
_8
8- 3 3 6
Chapter 8 Logic Instructions
SetBitOffsetValue
EN E NO
StartRegister
Offset
Value
Parameters
Input/
Parameter name Meaning Description Valid range
Output
StartRegister Starting address Input Specify the starting address
Value Input value Input Input a specified bit value TRUE / FALSE
Boolean
Pointer
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
Pointer To XX
StartR
●
egister
8_
Offset ● ● 8_
Value ●
Note:
1. The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the
data type.
2. xx of the ‘Pointer To xx’ data type includes Bit string and Integer data types.
8- 3 3 7
DVP-50MC Series Motion Controller Operation Manual
Function Explanation
The SetBitOffsetValue instruction is used to set the value of the specific bit of the specified address to TRUE
or FALSE. The StartRegister parameter is a Pointer-type variable. The Offset parameter specifies the offset
value which regards the bit0 of the variable the StartRegister parameter points to as the reference. The Value
parameter shows the setting value of the specified bit, which is TRUE or FALSE. The bit which is specified
by StartRegister and Offset together can be set to TRUE or FALSE through this instruction.
If the specified offset value exceeds the range of the starting address of StartRegister, the operation will be
performed according to the corresponding offset address which regards the StartRegister as the starting
address.
See more in the following example.
Programming Example
The variable table and program
Variable name Device address Data type Present value
SetBOV_EN BOOL TRUE
SetBOV _StartR %MW0 UINT
SetBOV _Offset UINT
SetBOV _Value BOOL
SetBitOffsetValue
SetB OV_En EN E NO
ADR(SetBOV _StartR) StartRegister
SetB OV_Offset Offset
SetBOV _Value Value
Program Explanation
When the SetBOV_EN variable is TRUE, set the value of the specified bit to the value of SetBOV_Value
by changing the values of SetBOV_Offset and SetBOV_Value variables.
See the explanation below.
1. When SetBOV _Value is set to FALSE and the value of SetBOV _Offset is 2, the value of Bit2
of SetBOV _StartR(%MW0)is FALSE.
_8 2. When SetBOV _Value is set to TRUE and the value of SetBOV _Offset is 2, the value of Bit2
of SetBOV _StartR(%MW0)is TRUE.
3. When SetBOV _Value is set to FALSE and the value of SetBOV _Offset is 16 (which regards
Bit0 of the variable that StartRegister points to as the reference bit ), the value of Bit1
of %MW1 is FALSE.
4. When SetBOV _Value is set to TRUE and the value of SetBOV _Offset is 16 (which regards
Bit0 of the variable that StartRegister points to as the reference bit ), the value of Bit1
of %MW1 is TRUE.
8- 3 3 8
Chapter 8 Logic Instructions
8.20.2 GetBitOffsetValue
FB/FC Explanation Applicable model
GetBitOffsetValue is used to read the value of the DVP50MC11T/DVP50MC11T-06
FC specific bit of the specified address and display it in the DVP50MC11P/DVP50MC11P-06
output parameter. DVP50MC11T-04S/DVP50MC11T-16S
GetBitOffsetValue
EN E NO
StartRegister GetBitOffsetValue
Offset
Parameters
Parameter name Meaning Input/ Output Description Valid range
StartRegister Starting address Input Specify the starting address
Specify the offset value by
How many bits regarding the bit0 of the
Offset Input 0~1023
are offset variable that StartRegister
points to as the reference
GetBitOffsetValue The read bit value Output The read bit value TRUE / FALSE
Boolean BOOL
Pointer
Real
Bit string Integer Time, date
number
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
Pointer To XX
StartR
●
egister
Offset ● ●
GetBit
Offset ●
Value
Note: 8_
1. The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the 8_
data type.
2. xx of the ‘Pointer To xx’ data type includes Bit string and Integer data types.
Function Explanation
The GetBitOffsetValue instruction is used to read the value of the specified bit and the output
GetBitOffsetValue shows the read state value. The StartRegister parameter is a Pointer-type variable. The
Offset parameter specifies the offset value which regards the bit0 of the variable the StartRegister parameter
points to as the reference. The GetBitOffsetValue parameter shows the state value of the specified bit, which
is TRUE or FALSE.
If the specified offset value exceeds the range of the starting address of StartRegister, the operation will be
performed according to the corresponding offset address which regards the StartRegister as the starting
8- 3 3 9
DVP-50MC Series Motion Controller Operation Manual
address.
See more in the following example.
Precautions for Correct Use
The StartRegister parameter of the GetBitOffsetValue instruction is a Pointer-type variable and needs to use
the ADR instruction to gain the address.
Programming Example
The variable table and program
Variable name Device address Data type Present value
SetBOV_EN BOOL
SetBOV _StartR %MW5 UINT
SetBOV _Offset USINT
GBOValue BOOL
Program Explanation
When the SetBOV_EN variable is TRUE, read the state of the specified bit through changing the value of
the Offset parameter. See the explanation below.
1. When the value of SetBOV _StartR (%MW5) is 8 (2#0000,1000) and SetBOV _Offset is 3, the
value of GBOValue is TRUE, which is the value of Bit3 of %MW5.
2. When the value of SetBOV _StartR is 0 and SetBOV _Offset is 3, the value of GBOValue is
FALSE, which is the value of Bit3 of %MW5.
3. When the value of %MW6 is 8 (2#0000,1000) and SetBOV _Offset is 19 (which regards the
Bit0 of the variable that StartRegister points to as the reference), the value of GBOValue is
TRUE, which is the value of Bit3 of %MW6.
4. When the value of SetBOV _StartR is 0 and SetBOV _Offset is 19 (which regards the Bit0 of
the variable that StartRegister points to as the reference), the value of GBOValue is FALSE,
_8 which is the value of Bit3 of %MW6.
8- 3 4 0
Chapter 8 Logic Instructions
C RC16
EN E NO
Dat a CR C16
Length
OutOrder
Input Parameters
Parameter
Meaning Input/ Output Description Valid range
name
The starting
address of the The starting address of the data for
Data data for CRC Input CRC value calculation. The starting ——
value address can be got by ADR instruction
calculation
The length of How many bytes of data are for the
the data for CRC value calculation by counting
Length Input 1~255
CRC value from the starting address of the data
calculation with the unit: byte.
FALSE means that for the output CRC
Set the
value, its low byte is on the left of its
arrangement for
high byte.
OutOrder the bytes of the Input TRUE or FALSE
TRUE means that for the output CRC
output CRC
value its low byte is on the right of its
value
high byte.
Depends on the
data type of the
The CRC value got through calculation
CRC16 The CRC value Output variable that the
based on the parameter Data
output parameter
is connected to.
8_
8_
8- 3 4 1
DVP-50MC Series Motion Controller Operation Manual
POINTER
Boolean
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
BYTE
POINTERTO
Data ●
Length ●
OutOrder ●
CRC16 ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
CRC16 instruction is used to calculate the CRC value of the specified data.
The instruction performs the calculation of the CRC value according to the starting address specified by
Data and number of bytes specified by Length.
The calculation result is put in the output parameter CRC16. The arrangement for the bytes of the CRC
value is specified by OutOrder.
Precautions for Correct Use
The input variables are not allowed to omit. An error will occur during the compiling of the software if any
input variable is omitted.
1. Programming Example
The variable table and program
Variable name Address Data type Current value
CRC_EN BOOL TRUE
IN_Data %MB100 ARRAY[1..6] OF BYTE [16#01,16#03,16#10,16#01,16#00,16#02]
IN_Length UINT 6
IN_OutOrder BOOL FALSE
OUT_CRC WORD 16#910B
_8 When CRC_EN changes from FALSE to TRUE, the CRC16 instruction checks the 6 bytes
[16#01,16#03,16#10,16#01,16#00,16#02] in IN_Data.
The calculation result is 16#910B which is put in OUT_CRC.
CRC 16
CR C _ EN EN EN O
ADR (IN _Data[1]) Data CRC16 OUT_CR C
IN _Lengt h Length
IN_OutOrder OutOrder
8- 3 4 2
Chapter 8 Logic Instructions
8.21.2 LRC
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
LRC instruction is used to find the LRC value of the
FC DVP50MC11P/DVP50MC11P-06
specified data.
DVP50MC11T-04S/DVP50MC11T-16S
LRC
EN ENO
Data LR C
Length
Input Parameters
Parameter Input/
Meaning Description Valid range
name Output
The starting
The starting address of the data for LRC
address of the
Data Input value calculation. The starting address ——
data for LRC
can be got by ADR instruction
value calculation
How many bytes of data are for the LRC
Length of the data
value calculation by counting from the
Length for LRC value Input 1~255
starting address of the data with the
calculation
unit: byte.
Depends on the data
type of the variable
LRC The LRC value Output The LRC value of the specified data that the output
parameter is
connected to.
POINTER
Boolean
Real
Bit string Integer Time, date
number
BOOL
BYTE
WORD
DWORD
LWORD
USINT
UINT
UDINT
ULINT
SINT
INT
DINT
LINT
REAL
LREAL
TIME
DATE
TOD
DT
BYTE
POINTER
8_
8_
TO
Data ●
Length ●
LRC ●
Note:
The symbol ● indicates that the parameter is allowed to connect to the variable or constant of the data type.
Function Explanation
LRC instruction is used to find the LRC value of the specified data.
The instruction performs the calculation of the LRC value according to the starting address specified by
8- 3 4 3
DVP-50MC Series Motion Controller Operation Manual
When LRC_EN changes from FALSE to TRUE, the LRC instruction checks the 6 bytes
[16#01,16#03,16#10,16#01,16#00,16#02] in IN_Data.
The calculation result is 16#E9 which is put in OUT_LRC.
_8
8- 3 4 4
9
Introductions of Axis Parameters
Table of Contents
9.1 Description of Axis Parameters ................................................. 9-2
9- 1
DVP-50MC Series Motion Controller Operation Manual
Rotary Axis :
9- 2
Chapter 9 Introduction of Axis Parameters
Default
Serial No Parameter Name Function Data Type
Value
The cycle used for equally dividing the
4 Modulo LREAL 360
actual position of the terminal actuator.
Enables software limitation;
If the item is not selected, the maximum/
minimum position of the axis which
5 Software Limitation software limits is invalid. BOOL 0
If the item is selected, the maximum/
minimum position of the axis limited by
software is valid.
The maximum position of the axis limited
6 Maximum Position LREAL -
by software
The minimum position of the axis limited by
7 Minimum Position LREAL -
software
Maximum Maximum resolution for the number of
8 UDINT 1280000
Resolution servo pulses
To set the number of pulses needed when
9 Unit Numerator the motor runs one rotation by adjusting UINT 128
the parameter and Unit Denominator.
To set the number of pulses needed when
10 Unit Denominator the motor runs one rotation by adjusting UINT 1
Unit Numerator and the parameter.
How many pulses are needed when the
11 Pulses/rotation UINT 10000
servo motor runs one rotation.
Unit Numerator and Unit Denominator jointly set the electronic gear ratio of the servo drive. The electronic
gear ratio is used to set how many pulses the servo drive receives for one rotation that the servo motor
runs.
The resolution of the servo motor is 1,280,000 pulses/rotation. Suppose the value of parameter 11
(Pulses/rotation) is N. So N*(Unit Numerator / Unit Denominator) = 1,280,000.
9- 3
DVP-50MC Series Motion Controller Operation Manual
Default
Serial No Parameter Name Function Data Type
Value
Sc rew
Cou pl in g Cou p li ng
Se rvo mot or Sc rew pa rt s haft
Ou tpu t
In p ut 1 :2
Ge ar bo x
As mentioned above, UnitsPerRotation is set to 1 and the ball screw will move 50 mm at the velocity
1mm/s, acceleration 2mm/ s2 and change rate of acceleration 1mm/s3 after the following MC_MoveRelative
is executed.
The variable table and program
Variable name Data type Initial value
Rel MC_MoveRelative
Rel_Ex BOOL FALSE
Rel_BM MC_Buffer_Mode 0
Rel_Done BOOL
Rel_Bsy BOOL
Rel_Act BOOL
Rel_Abt BOOL
Rel_Err BOOL
Rel_ErrID WORD
Rel
MC_MoveRelative 1
Axis1 Axis Done Rel_Done
Rel_Ex Execute Busy Rel_Bsy
ContinuousUpdate Active Rel_Act
50. 0 Distance CommandAborted Rel_Abt
1. 0 Velocity Error Rel_Err
2. 0 Accelerat ion ErrorID Rel_ErrID
2. 0 Deceleration
1 Jerk
Rel_BM BufferMode
9- 4
10
Motion Control Function
Table of Contents
10.1 EN and ENO ............................................................................ 10-2
10.2 Relation among Velocity, Acceleration and Jerk ..................... 10-2
10.3 Introduction of BufferMode .................................................... 10-5
10.4 The State Machine ................................................................ 10-31
10- 1
DVP-50MC Series Motion Controller Operation Manual
Velocity: Indicates the maximum velocity in the motion of an axis with the unit of unit/second.
Acceleration: Indicates the maximum acceleration in the motion of an axis with the unit of unit/second2.
Jerk: Indicates the maximum change rate of the acceleration or deceleration in the motion of an axis with the
unit of unit/second3. The value of Jerk can be specified in the instruction and the value will be used for
the axis in the acceleration and deceleration. The smoothness of the velocity can be improved by
modifying the value of Jerk.
The relation among the velocity, acceleration (deceleration) and jerk:
𝑑𝑑𝑑𝑑
𝐴𝐴𝐴𝐴𝐴𝐴(𝐷𝐷𝐷𝐷𝐷𝐷) =
𝑑𝑑𝑑𝑑
𝑑𝑑𝑑𝑑𝑑𝑑𝑑𝑑
𝐽𝐽𝐽𝐽𝐽𝐽𝐽𝐽 =
𝑑𝑑𝑑𝑑
The acceleration (deceleration) is the variation of the velocity per unit time. The change rate of acceleration is
the variation of the acceleration per unit time. For example, one MC_MoveRelative instruction is be used to
express the relation among the three elements. The distance is 1300000 units; the velocity is
100000units/second; the acceleration is 20000units/second2 and the jerk is 10000units/second3.
See the following chart for the relation among these elements.
10
10- 2
Chapter 10 Motion Control Function
1 2 3 4 5 6 7
10 00 00
8 00 00
6 00 00
4 00 00
2 00 00
0 2 5 7 13 15 18 20 Ti me ( Se co nd )
Acce lera tion (Un it / se co nd 2 )
20 000
0
2 5 7 13 15 18 20 Time (Secon d)
-20 000
1 00 00
50 00
5 7 13 15
0
2 18 2 0 Time (Secon d)
-5 00 0
-1 00 00
The relations among Velocity, Acceleration and Jerk are explained in the following table.
Acceleration/
Stage Time Jerk Velocity
Deceleration Motion type
No. (second) (Unit/second3) (Unit/second)
(Unit/second2)
The acceleration
10000 Acceleration is increased motion with an
1 0~2 Increasing
units/second3 to 20000 units/second2 increasing
acceleration
The acceleration
Acceleration stays at motion with a
2 2~5 0 Increasing
20000 units/second2 constant
acceleration
The acceleration
Increases to
-10000 Acceleration is motion with an
3 5~7 100000
units/second3 decreased to 0. decreasing
unit/second
acceleration
Acceleration has been
decreased to
100000 The motion at a
4 7~13 0 0unit/second2 and it has
unit/second constant speed
0unit/second2
10
been
during this stage.
10- 3
DVP-50MC Series Motion Controller Operation Manual
Acceleration/
Stage Time Jerk Velocity
Deceleration Motion type
No. (second) (Unit/second3) (Unit/second)
(Unit/second2)
The deceleration
-10000 Deceleration is increased motion with an
5 13~15 Decreasing
units/second3 to 20000unit/second2. increasing
deceleration
Deceleration has been
increased to The deceleration
20000units/second2 and motion with a
6 15~18 0 Decreasing
it has been constant
20000units/second2 deceleration
during this stage.
The deceleration
10000 Deceleration is motion with a
7 18~20 Decreases to 0
units/second3 decreased to 0. decreasing
deceleration
10
10- 4
Chapter 10 Motion Control Function
3: mcBlendingPrevious The buffered instruction just starts to control the axis after the target
position of the current instruction is reached. The transit velocity is the
(Blend with previous)
target velocity of the current instruction.
4: mcBlendingNext The buffered instruction just starts to control the axis after the target
position of the current instruction is reached. The transit velocity is the
(Blend with next)
target velocity of the buffered instruction.
The buffered instruction just starts to control the axis after the target
5: mcBlendingHigh position of the current instruction is reached. The transit velocity is the
(Blend with high) higher of the target velocities of the current instruction and buffered
instruction.
Notes:
1. The same axis only supports one buffer mode. An error will occur if multiple buffer modes are
performed for the same axis.
For example, the BufferMode parameters of instruction 2 and instruction 3 are not mcAborting.
Instruction 2 (the buffered instruction) will be switched to from instruction 1 (current instruction).
Instruction 3 will report an error if instruction 3 is switched to from instruction 2 when the execution
of instruction 1 is not completed. If the BufferMode parameter of Instruction 3 is mcAborting,
instruction 1 and instruction 2 will be aborted immediately and instruction 3 will be executed right
away.
2. When the MC_MoveSuperimposed instruction controls the axis alone, the buffered instruction
excluding MC_MoveAdditive is executed and the MC_MoveSuperimposed instruction is aborted no
matter what the value of the BufferMode parameter is.
While the current instruction and MC_MoveSuperimposed or MC_HaltSuperimposed jointly control
the axis and then another motion instruction is executed, all the being executed previously
instructions will be aborted if BufferMode=mcAborting; if BufferMode=mcBuffered, mcBlendingLow,
mcBlendingPrevious, mcBlendingNext and mcBlendingHigh, the current instruction and buffered 10
10- 5
DVP-50MC Series Motion Controller Operation Manual
instruction will be blended according to the setting value of BufferMode without any impact on the
execution of MC_MoveSuperimposed or MC_HaltSuperimposed.
Example: Using two MC_MoveRelative instructions for explanation.
The maximum velocity of the first MC_MoveRelative instruction is V1 and distance is S1. The maximum velocity
of the second MC_MoveRelative instruction is V2 and distance is S2. Modifying the value of BufferMode of the
second MC_MoveRelative instruction, you can get different blending processes of the two instructions. See
details as below.
V V
V2 V2
Curr ent V1
ins truction The buffer ed ins tr uction is s tar ted Current
is s tarted and then starts to contr ol the ins tr uction The buffered i nstruction is s tarted
ax is im mediately. is s tar ted and then starts to control the
ax is i mmediately.
V1
Current
ins tr uction
is s tar ted
V2
V1 Curr ent
C urrent
ins truction
is s tarted instruc ti on
Buffered i nstruc ti on t
The buffered ins truction is s tarted
and then starts to contr ol the
ax is i mmediately.
Current
ins tr uction
Buffered ins truction t
V2
10
10- 6
Chapter 10 Motion Control Function
V T he buffer ed
V instruc tion
is s tarted
When current i ns truc tion ex ecution When c ur rent ins truction ex ec ution
is c ompleted, the buffered i nstruc tion V1 is c ompl eted, t he buffer ed i nstructio
Current
starts to c ontrol the axis . starts to c ontrol the ax is .
ins truc tion
i s s tarted
V2 S1
T he buffered
i nstruction Buffer ed ins truction
is s tarted
V1 Current
ins tr uction t
Cur rent S2
ins truction
is s tarted
S1 S2
Curr ent
ins truction Buffered instruc ti on t V2
V V
T he buffered i nstruction starts to control T he buffered
the ax is when c urrent ins truction exec uti on i nstruction
is c ompleted and the axis v eloc ity is the low er is s tarted T he buffered i nstruc tion s tar ts to c ontrol the axi s
of the tw o i nstruction vel ocities . when cur rent ins truc tion ex ecution is c ompleted
and the axis v eloc ity is the low er of the
V2 V1 tw o ins truction veloc ities .
T he buffered
i nstruction
is s tarted
V1 V2
Current S2 Curr ent
ins truc tion ins truction S1
is s tarted S1 is s tarted S2
Cur rent
i ns truction
Buffered ins truc tion t Curr ent
ins truction
Buffered instruction
t
3. When the velocity direction of the current instruction is opposite to that of the buffered
instruction.
T he buffer ed
i nstruction
is s tarted
V1
The moti on di rections of current instruc ti on
and buffered ins tr uction ar e oppos ite.
The buffered ins truc tion s tarts to control the
C urrent ax is w hen c urrent ins truction
S1 dec elerates till the veloc ity is 0.
instruc ti on
i s started
Buffer ed ins truction
Current
ins truc tion
t
S2
V2
10
10- 7
DVP-50MC Series Motion Controller Operation Manual
V V
T he buffered i nstruction starts to c ontrol the axi s
The buffered when cur rent ins tr uction exec uti on is c ompleted and
T he buffer ed ins truction starts to c ontr ol the axis ins tr uction the axi s vel ocity i s that of the pr evious i nstruction.
when curr ent ins truc tion ex ecution is c ompleted and is s tar ted
the axis v eloc ity is that of the prev ious ins truction.
V2 V1
T he buffered
i nstruction
is s tarted
V1 V2
Current S2 Current
ins truc tion ins truc tion
S1
is s tarted S1 is s tarted S2
C urrent
Cur rent
i ns truction
Buffered ins truc tion t i nstruction
Buffered instruction t
3. When the velocity direction of the current instruction is opposite to that of the buffered
instruction.
V
T he buffer ed
i nstruction
is s tarted
V1
T he motion direc tions of c urrent ins truction
and buffered i nstruc tion are opposite.
The buffered ins truc tion s tarts to control
C urrent the axis w hen current instruc ti on
S1 deceler ates til l the v eloci ty i s 0.
instruc ti on
i s started
Buffered instruc ti on
Current
ins truc tion
t
S2
V2
V1 V2
C urrent S2 Cur rent
i nstruction
ins t ruct ion S1
S1 is s t art ed S2
is s tarted
Current
ins tr uction Buffered ins truc ti on t Current Buff ered i nst ruct ion t
i ns truc ti on
10
10- 8
Chapter 10 Motion Control Function
3. When the velocity direction of the current instruction is opposite to that of the buffered
instruction
V
T he buffered
i nstruction
is s tarted
V1 T he buffer ed instruction s tarts to control th
ax is w hen the moti on dir ections of buffere
instruc ti on and curr ent instruc tion are
Current opposite and the v eloc ity of cur rent
ins truc tion ins tr uc tion i s decreas ed to 0.
is s tarted S1
Current
instruction t
S2
V2
V T he buffer ed ins truction starts to control the ax V T he buffered ins truction starts to control th
when current instruc ti on ex ecution is com plete T he buffered ax is w hen c urrent i ns truction exec uti on is
and the axi s vel ocity r eaches the higher of i nstruction c ompleted and the ax is v eloc ity is the
the two ins tr uction veloc ities . is s tarted higher of the tw o i nstruction vel ocities .
V 2 T he buffered V1
i nstruction
is s tarted
V1 V2
Current Current
S2 ins tr uc tion S1
instruc ti on
i s started S1 is s tar ted S2
t
Cur rent
Current
instruc ti on
Buffer ed ins truction t i nstruction
Buffered i nstruc tion t
3. When the velocity direction of the current instruction is opposite to that of the buffered
instruction
V
The buffered
ins tr uction
is s tar ted
T he buffered instruc ti on star ts to c ontrol the
V1 when the motion di rections of buffered
ins truc tion and cur rent ins tr uction ar e
opposi te and the veloc ity of c urrent
ins truction is decr eased to 0.
C urrent
instruc ti on S1
i s started
Buffered instruc ti on
Curr ent
ins truction t
S2
V2
10
10- 9
DVP-50MC Series Motion Controller Operation Manual
The buffer mode of the buffered instruction can be selected according to the current instruction as listed below.
The selectable BufferMode value of the buffered
Current instruction
instruction
【mcAborting, mcBuffered, mcBlendingLow,
MC_MoveAbsolute mcBlendingPrevious, mcBlendingNext,
mcBlendingHigh】*1
【mcAborting, mcBuffered, mcBlendingLow,
MC_MoveRelative mcBlendingPrevious, mcBlendingNext,
mcBlendingHigh】*1
【mcAborting, mcBuffered, mcBlendingLow,
MC_MoveAdditive mcBlendingPrevious, mcBlendingNext,
mcBlendingHigh】*1
MC_MoveSuperimposed mcAborting
MC_HaltSuperimposed mcAborting
MC_MoveVelocity mcAborting, mcBuffered
Only the MC_Stop instruction can abort the
MC_Home
MC_Home instruction.
MC_Halt mcAborting, mcBuffered
MC_ GearIn mcAborting, mcBuffered
MC_ GearOut mcAborting, mcBuffered
MC_CombineAxes mcAborting, mcBuffered
MC_ CamIn mcAborting, mcBuffered
MC_ CamOut mcAborting, mcBuffered
*1: The BufferMode parameter of the buffered instructions MC_GearIn, MC_CamIn and MC_CombineAxes
can only choose mcAborting and mcBuffered.
Whether the current instruction execution has been completed or not depends on the completion output
parameter of the instruction. As the completion output parameter is TRUE, it indicates that the instruction
execution is completed and the buffered instruction execution starts.
See the completion output parameters of instructions in the following table so as to judge the instruction
execution state in a buffer mode.
10
10- 1 0
Chapter 10 Motion Control Function
Can it be followed
Is it a buffered Completion output
by a buffered
Instruction name instruction? parameter of an
instruction?
(Yes or No) instruction
(Yes or No)
MC_Home No No Done
MC_Stop No No Done
MC_Halt Yes Yes Done
MC_MoveAbsolute Yes Yes Done
MC_MoveRelative Yes Yes Done
MC_MoveAdditive Yes Yes Done
MC_MoveSuperimposed No No ——
MC_HaltSuperimposed No No ——
MC_MoveVelocity Yes Yes InVelocity
MC_CamIn Yes Yes EndOfProfile
MC_CamOut No Yes Done
MC_GearIn Yes Yes InGear
MC_GearOut No Yes Done
MC_CombineAxes Yes Yes InSync
10- 11
DVP-50MC Series Motion Controller Operation Manual
Rel1
MC_MoveRelative 2
Axis1 Axis Done Rel1_Done
Rel1_Ex Execute Busy Rel1_Bsy
ContinuousUpdate Active Rel1_Act
5000. 0 Distance CommandAborted Rel1_A bt
300. 0 Velocity Error Rel1_E rr
100. 0 Accelerat ion ErrorID Rel1_E rrID
100. 0 Deceleration
15. 0 Jerk
Rel1_BM Buffe rMode
Rel2
MC_MoveRelative 3
Axis1 Axis Done Rel2_Done
Rel2_Ex Execute Busy Rel2_Bsy
ContinuousUpdate Active Rel2_Act
9000. 0 Distance CommandAborted Rel2_A bt
500. 0 Velocity Error Rel2_E rr
100. 0 Accelerat ion ErrorID Rel2_E rrID
100. 0 Deceleration
15. 0 Jerk
Rel2_BM Buffe rMode
10
10- 1 2
Chapter 10 Motion Control Function
Rel2_BM=mcAborting
Vel ocity
500
300
Time
Pos ition
13500
4500
2000
Time
Rel 1
Rel1_Ex
Rel1_ Do ne
Rel1_B sy
Rel1_ Act
Rel1_Abt
Rel 2
Rel2_Ex
Rel2_Don e
Rel2_B sy
Rel2 A ct
As Rel1_Ex changes from FALSE to TRUE, Rel1_Bsy changes to TRUE. One period later,
Rel1_Act changes to TRUE and the first MC_MoveRelative instruction execution starts. While
the target position is not reached yet, Rel2_Ex changes from FALSE to TRUE and Rel2_Bsy
changes to TRUE. One period later, Rel1_Abt and Rel2_Act change to TRUE and Rel1_Bsy
and Rel1_Act change to FALSE. Meanwhile the first MC_MoveRelative instruction is aborted
and the second MC_MoveRelative instruction execution starts. As the target position is
reached, Rel2_Done changes to TRUE and meanwhile Rel2_Bsy and Rel2_Act change to
FALSE.
As Rel2_Ex changes from TRUE to FALSE, Rel2_Done changes to FALSE.
10
10- 1 3
DVP-50MC Series Motion Controller Operation Manual
Rel2_BM =mcMcBuffered
Vel ocity
500
300
Time
Pos ition
16000
7000
4500
2000
Time
Rel 1
Rel1_Ex
Rel1_ Do ne
Rel1_B sy
Rel1_ Act
Rel1_Abt
Rel 2
Rel2_Ex
Rel2_Don e
Rel2_B sy
Rel2_A ct
As Rel1_Ex changes from FALSE to TRUE, Rel1_Bsy changes to TRUE. One period later,
Rel1_Act changes to TRUE and the first MC_MoveRelative instruction execution starts. While
the target position is not reached yet and Rel2_Ex changes from FALSE to TRUE, Rel2_Bsy
changes to TRUE, Rel1_Bsy and Rel1_Act remain TRUE and the first MC_MoveRelative
instruction execution continues. As the target position is reached, Rel1_Done changes to
TRUE, Rel1_Bsy and Rel1_Act change to FALSE. Rel2_Act changes to TRUE and the
second MC_MoveRelative instruction execution starts immediately. When the target position is
reached, Rel2_Done changes to TRUE and meanwhile Rel2_Bsy and Rel2_Act change to
FALSE.
As Rel1_Ex changes from TRUE to FALSE, Rel1_Done changes to FALSE. As Rel2_Ex
changes from TRUE to FALSE, Rel2_Done changes to FALSE.
10
10- 1 4
Chapter 10 Motion Control Function
Rel2_BM =mcBlendingLow
Vel ocity
500
300
Time
Pos ition
16000
7000
4500
2000
Time
Rel 1
Rel1_Ex
Rel1_ Do ne
Rel1_B sy
Rel1_ Act
Rel1_Abt
Rel 2
Rel2_Ex
Rel2_Don e
Rel2_B sy
Rel2_A ct
As Rel1_Ex changes from FALSE to TRUE, Rel1_Bsy changes to TRUE. One period later,
Rel1_Act changes to TRUE and the first MC_MoveRelative instruction execution starts. While
the target position is not reached yet and Rel2_Ex changes from FALSE to TRUE, Rel2_Bsy
changes to TRUE, Rel1_Bsy and Rel1_Act remain TRUE and the first MC_MoveRelative
instruction execution continues. As the target position is reached, Rel1_Done changes to
TRUE. At the moment, the velocity is 300 units /second which is the lower one of the target
velocities of the current instruction and buffered instruction, Rel1_Bsy and Rel1_Act change to
FALSE, Rel2_Act changes to TRUE and the second MC_MoveRelative instruction execution
starts immediately. As the target position is reached, Rel2_Done changes to TRUE and
meanwhile Rel2_Bsy and Rel2_Act change to FALSE.
As Rel1_Ex changes from TRUE to FALSE, Rel1_Done changes to FALSE. As Rel2_Ex
changes from TRUE to FALSE, Rel2_Done changes to FALSE.
10
10- 1 5
DVP-50MC Series Motion Controller Operation Manual
Vel ocity
500
300
Time
Pos ition
16000
7000
4500
2000
Time
Rel 1
Rel1_Ex
Rel1_ Do ne
Rel1_B sy
Rel1_ Act
Rel1_Abt
Rel 2
Rel2_Ex
Rel2_Don e
Rel2_B sy
Rel2_A ct
As Rel1_Ex changes from FALSE to TRUE, Rel1_Bsy changes to TRUE. One period later,
Rel1_Act changes to TRUE and the first MC_MoveRelative instruction execution starts. While
the target position is not reached yet and Rel2_Ex changes from FALSE to TRUE, Rel2_Bsy
changes to TRUE, Rel1_Bsy and Rel1_Act remain TRUE and the first MC_MoveRelative
instruction execution continues. As the target position is reached, Rel1_Done changes to
TRUE. At the moment, the velocity is 300 units /second which is the target velocity of the
current instruction, Rel1_Bsy and Rel1_Act change to FALSE, Rel2_Act changes to TRUE
and the second MC_MoveRelative instruction execution starts immediately. As the target
position is reached, Rel2_Done changes to TRUE and meanwhile Rel2_Bsy and Rel2_Act
change to FALSE.
As Rel1_Ex changes from TRUE to FALSE, Rel1_Done changes to FALSE. As Rel2_Ex
changes from TRUE to FALSE, Rel2_Done changes to FALSE.
10
10- 1 6
Chapter 10 Motion Control Function
Vel ocity
500
300
Time
Pos ition
16000
7000
4500
2000
Time
Rel 1
Rel1_Ex
Rel1_ Do ne
Rel1_B sy
Rel1_ Act
Rel1_Abt
Rel 2
Rel2_Ex
Rel2_Don e
Rel2_B sy
Rel2_A ct
As Rel1_Ex changes from FALSE to TRUE, Rel1_Bsy changes to TRUE. One period later,
Rel1_Act changes to TRUE and the first MC_MoveRelative instruction execution starts. While
the target position is not reached yet and Rel2_Ex changes from FALSE to TRUE, Rel2_Bsy
changes to TRUE, Rel1_Bsy and Rel1_Act remain TRUE and the first MC_MoveRelative
instruction execution continues. As the target position is reached, Rel1_Done changes to
TRUE. At the moment, the velocity is 500 units /second which is the target velocity of the
buffered instruction; Rel1_Bsy and Rel1_Act change to FALSE; Rel2_Act changes to TRUE
and the second MC_MoveRelative instruction execution starts. As the target position is
reached, Rel2_Done changes to TRUE and meanwhile Rel2_Bsy and Rel2_Act change to
FALSE.
As Rel1_Ex changes from TRUE to FALSE, Rel1_Done changes to FALSE. As Rel2_Ex
changes from TRUE to FALSE, Rel2_Done changes to FALSE.
10
10- 1 7
DVP-50MC Series Motion Controller Operation Manual
Vel ocity
500
300
Time
Pos ition
16000
7000
4500
2000
Time
Rel 1
Rel1_Ex
Rel1_ Do ne
Rel1_B sy
Rel1_ Act
Rel1_Abt
Rel 2
Rel2_Ex
Rel2_Don e
Rel2_B sy
Rel2_A ct
As Rel1_Ex changes from FALSE to TRUE, Rel1_Bsy changes to TRUE. One period later,
Rel1_Act changes to TRUE and the first MC_MoveRelative instruction execution starts. While
the target position is not reached yet and Rel2_Ex changes from FALSE to TRUE, Rel2_Bsy
changes to TRUE, Rel1_Bsy and Rel1_Act remain TRUE and the first MC_MoveRelative
instruction execution continues. As the target position is reached, Rel1_Done changes to
TRUE. At the moment, the velocity is 500 units /second which is the higher one of the target
velocities of the current instruction and buffered instruction; Rel1_Bsy and Rel1_Act change to
FALSE; Rel2_Act changes to TRUE and the second MC_MoveRelative instruction execution
starts. As the target position is reached, Rel2_Done changes to TRUE and meanwhile
Rel2_Bsy and Rel2_Act change to FALSE.
As Rel1_Ex changes from TRUE to FALSE, Rel1_Done changes to FALSE. As Rel2_Ex
changes from TRUE to FALSE, Rel2_Done changes to FALSE.
Example 2
The following example explains the axis states for different BufferMode values with a MC_MoveVelocity
instruction and a MC_MoveReltave instruction which is the buffered instruction.
The variable table and program
Variable name Data type Initial value
Pwr MC_Power
Axis1 USINT 1
Pwr_En BOOL FALSE
Pwr_BM MC_Buffer_Mode 0
10 Pwr_Sta BOOL
10- 1 8
Chapter 10 Motion Control Function
10
10- 1 9
DVP-50MC Series Motion Controller Operation Manual
Pwr1
MC_P ower 1
Axis1 Axis St atus Pwr_Sta
Pwr_E n Enable Busy Pwr_Bsy
True EnablePositive A ctive Pwr_Act
True EnableNegat ive Error Pwr_Err
Pwr_B M BufferMode ErrorID Pwr_ErrI D
Vel
MC_MoveVelocity 2
Axis1 Axis Invelocit y Vel_Invel
Vel_E x Execute Busy Vel_Bsy
ContinuousUpdate A ctive Vel_Act
Vel_Vel Velocity CommandA bort ed Vel_Abt
Vel_A cc Acceleration Error Vel_Err
Vel_Dec Decelerat ion ErrorID Vel_ErrI D
Vel_Jerk Jerk
Vel_Dir Direct ion
Vel_BM BufferMode
Rel
MC_MoveRelative 3
Axis1 Axis Done Re l_Done
Rel_E x Execute Busy Rel_Bsy
ContinuousUpdate A ctive Rel_Act
Rel_Dist Distance CommandA bort ed Rel_Abt
Rel_Vel Velocity Error Rel_Err
Rel_Acc Acceleration ErrorID Rel_ErrID
Rel_Dec Decelerat ion
Rel_Jerk Jerk
Rel_B M BufferMode
10
10- 2 0
Chapter 10 Motion Control Function
Rel_BM =mcAborting
Veloci ty
Rel _Vel
Vel_Vel
Time
Position
Rel_D ist
S2
S1
Ti me
Vel
Vel _Ex
Vel_Inv el
Vel_Bsy
Vel_Act
Vel _Abt
Rel
Rel _Ex
R el_Done
Rel_Bsy
Rel Act
As Vel_Ex changes from FALSE to TRUE, Vel_Bsy changes to TRUE. One period later,
Vel_Act changes to TRUE. Before the target velocity is reached, the axis moves at the velocity
and acceleration specified by the MC_MoveRelative instruction as Rel_Ex changes from
FALSE to TRUE. As Vel_Abt changes to TRUE, Vel_Bsy and Vel_Act change to FALSE, the
velocity instruction is aborted, the MC_MoveRelative instruction is executed and Rel_Bsy
changes to TRUE. One period later, Rel_Act changes to TRUE. As the positioning is
completed, Rel_Done changes to TRUE.
10
10- 2 1
DVP-50MC Series Motion Controller Operation Manual
Rel_BM =mcBuffered
Veloci ty
Rel _Vel
Vel_Vel
Time
Position
Rel_D ist
S2
S1
Ti me
Vel
Vel _Ex
Vel_Inv el
Vel_Bsy
Vel_Act
Vel _Abt
Rel
Rel _Ex
R el_Done
Rel_Bsy
Rel Act
As Vel_Ex changes from FALSE to TRUE, Vel_Bsy changes to TRUE. One period later,
Vel_Act changes to TRUE. Rel_Ex changes from FASLE to TRUE when the target velocity is
not reached. The axis will not execute the MC_MoveRelatvie instruction till the velocity
instruction execution is completed. At the moment, Rel_Bsy changes to TRUE. When the
velocity instruction execution is completed, Vel_Invel changes to TRUE and one period later,
the MC_MoveRelatvie instruction starts to control the axis. Vel_Abt changes to TRUE and the
velocity instruction is aborted. Rel_Act is TRUE, which means that the MC_MoveRelative
instruction starts to control the motion of the axis. Rel_Done changes to TRUE as the
positioning is completed.
(The effect of Rel_BM = mcBlendingLow, mcBlendingPrevious, mcBlendingNext or
mcBlendingHigh is the same as that of Rel_BM = mcBuffered.)
Example 3
The example explains the axis states for different BufferMode value with a MC_MoveRelative instruction and
a MC_MoveVelocity instruction which is the buffered instruction.
The variable table and program
Variable name Data type Initial value
Pwr MC_Power
Axis1 USINT 1
Pwr_En BOOL FALSE
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
10 Pwr_Act BOOL
10- 2 2
Chapter 10 Motion Control Function
10
10- 2 3
DVP-50MC Series Motion Controller Operation Manual
Pwr1
MC_P ower 1
Axis1 Axis St atus Pwr_Sta
Pwr_E n Enable Busy Pwr_Bsy
True EnablePositive A ctive Pwr_Act
True EnableNegat ive Error Pwr_Err
Pwr_B M BufferMode ErrorID Pwr_ErrI D
Rel
MC_MoveRelative 2
Axis1 Axis Done Re l_Done
Rel_E x Execute Busy Rel_Bsy
ContinuousUpdate A ctive Rel_Act
Rel_Dist Distance CommandA bort ed Rel_Abt
Rel_Vel Velocity Error Rel_Err
Rel_Acc Acceleration ErrorID Rel_ErrID
Rel_Dec Decelerat ion
Rel_Jerk Jerk
Rel_B M BufferMode
Vel
MC_MoveVelocity 3
Axis1 Axis Invelocit y Vel_Invel
Vel_E x Execute Busy Vel_Bsy
ContinuousUpdate A ctive Vel_Act
Vel_Vel Velocity CommandA bort ed Vel_Abt
Vel_A cc Acceleration Error Vel_Err
Vel_Dec Decelerat ion ErrorID Vel_ErrI D
Vel_Jerk Jerk
Vel_Dir Direct ion
Vel_BM BufferMode
10
10- 2 4
Chapter 10 Motion Control Function
Veloc ity
Vel_Vel
Rel_Vel
T ime
Pos ition
S2
S1
Time
Rel
Re l_ Ex
Rel_Done
Rel_Bs y
Rel_A ct
Rel_Abt
Vel
Ve l_ Ex
Vel_I nv el
Vel_Bs y
Vel A ct
As Rel_Ex changes from FALSE to TRUE, Rel_Bsy changes to TRUE. One period later,
Rel_Act changes to TRUE. When the target position is not reached, Vel_Ex changes from
FALSE to TRUE, the axis moves at the velocity and acceleration specified by the velocity
instruction. When Rel_Abt changes to TRUE, Rel_Bsy and Rel_Act change to FALSE, the
MC_MoveRelative instruction is aborted and the velocity instruction is executed. Vel_Bsy is
TRUE and one period later, Vel_Act changes to TRUE. As the velocity is reached, Vel_Invel
changes to TRUE.
10
10- 2 5
DVP-50MC Series Motion Controller Operation Manual
Veloc ity
Vel_Vel
R el_Vel
T ime
Pos ition
R el_Dis t
S2
S1
Tim e
Rel
Re l_ Ex
Rel_Done
Rel_Bs y
Rel_A ct
Rel_Abt
Vel
Ve l_ Ex
Vel_I nv el
Vel_Bs y
Vel_A ct
As Rel_Ex changes from FALSE to TRUE, Rel_Bsy changes to TRUE. One period later,
Rel_Act changes to TRUE. When the target position is not reached, Vel_Ex changes from
FALSE to TRUE. The axis decelerates to 0 when the execution of the MC_MoveRelative
instruction is completed. Then Rel_Done changes to TRUE, Rel_Bsy and Rel_Act change to
FALSE and the axis moves at the velocity and acceleration specified by the velocity
instruction. Vel_Bsy changes to TRUE and one period later, Vel_Act changes to TRUE.
Rel_Invel changes to TRUE as the target velocity is reached.
10
10- 2 6
Chapter 10 Motion Control Function
Veloci ty
Vel_Vel
Rel_Vel
Time
Position
Rel_Dist
S2
S1
Time
Rel
Rel_Ex
Rel_Done
Rel_Bsy
Rel_Act
Rel_Abt
Vel
Vel_Ex
Vel_Inv el
Vel_Bsy
Vel _Act
As Rel_Ex changes from FALSE to TRUE, Rel_Bsy changes to TRUE. One period later,
Rel_Act changes to TRUE. When the target position is not reached, Vel_Ex changes from
FALSE to TRUE and Vel_Bsy changes to TRUE. The axis will wait for the completion of
MC_MoveRelative execution. After MC_MoveRelative execution is completed, Rel_Done
changes to TRUE, Rel_Bsy changes to FALSE and Rel_Act changes to FALSE. Meanwhile
Vel_Act changes to TRUE. At the moment, the velocity is 10000units/second, which is the
lower one of the target speeds of the current instruction and the buffered instruction. The
velocity instruction execution starts after MC_MoveRelative instruction execution is completed.
Vel_Invel changes to TRUE when the target velocity is reached.
10
10- 2 7
DVP-50MC Series Motion Controller Operation Manual
Veloc ity
Vel_Vel
Rel_Vel
T ime
Pos ition
R el_Dis t
S2
S1
Time
Rel
Rel_Ex
Rel_Done
Rel_Bsy
Rel_A ct
Rel_Abt
Vel
Ve l_ Ex
Vel_I nvel
Vel_Bsy
Vel_A ct
As Rel_Ex changes from FALSE to TRUE, Rel_Bsy changes to TRUE. One period later,
Rel_Act changes to TRUE. When the target position is not reached, Vel_Ex changes from
FALSE to TRUE and Vel_Bsy changes to TRUE. The axis will wait for the completion of
MC_MoveRelative execution. After MC_MoveRelative execution is completed, Rel_Done
changes to TRUE, Rel_Bsy changes to FALSE, Rel_Act changes to FALSE and meanwhile
Vel_Act changes to TRUE. At the moment, the velocity is 10000units/second (which is the
target speed of the current instruction). Vel_Invel changes to TRUE when the target velocity is
reached.
10
10- 2 8
Chapter 10 Motion Control Function
Veloc ity
Vel_Vel
Rel_Vel
T ime
Pos ition
R el_Dis t
S2
S1
Time
Rel
Rel_Ex
Rel_Done
Rel_Bs y
Rel_A ct
Rel_Abt
Vel
Ve l_ Ex
Vel_I nv el
Vel_Bs y
Vel_A ct
As Rel_Ex changes from FALSE to TRUE, Rel_Bsy changes to TRUE. One period later,
Rel_Act changes to TRUE. When the target position is not reached, Vel_Ex changes from
FALSE to TRUE and Vel_Bsy changes to TRUE. The axis will wait for the completion of
MC_MoveRelative execution. After MC_MoveRelative execution is completed, Rel_Done
changes to TRUE, Rel_Bsy changes to FALSE, Rel_Act changes to FALSE and meanwhile
Vel_Act changes to TRUE. At the moment, the velocity is 20000units/second (which is the
target speed of the buffered instruction). Vel_Invel changes to TRUE when the target velocity
is reached.
10
10- 2 9
DVP-50MC Series Motion Controller Operation Manual
Veloc ity
Vel_Vel
Rel_Vel
T ime
Pos ition
R el_Dis t
S2
S1
Time
Rel
Rel_Ex
Rel_Done
Rel_Bs y
Rel_A ct
Rel_Abt
Vel
Ve l_ Ex
Vel_I nv el
Vel_Bs y
Vel_A ct
As Rel_Ex changes from FALSE to TRUE, Rel_Bsy changes to TRUE. One period later,
Rel_Act changes to TRUE. When the target position is not reached, Vel_Ex changes from
FALSE to TRUE and Vel_Bsy changes to TRUE. The axis will wait for the completion of
MC_MoveRelative execution. After MC_MoveRelative execution is completed, Rel_Done
changes to TRUE, Rel_Bsy changes to FALSE and Rel_Act changes to FALSE. At the moment,
the velocity is 20000units/second (which is the higher one of the target speeds of the current
instruction and the buffered instruction). And then the axis runs according to the velocity,
acceleration and deceleration specified by the velocity instruction. Vel_Invel changes to TRUE
when the target velocity is reached.
10
10- 3 0
Chapter 10 Motion Control Function
M C_ GearIn( Slav e)
M C_ Cam In(Sl av e)
M C_ Com bin eAx es (Slav e)
M C_ Mov eSu peri mpos ed (Slav e)
Sync hronized
Motion
M C _Cam In(Sl av e)
MC _Ge arIn(S lav e) M C_ Cam Out
M C _C omb ineAx es (Sl av e) M C_S to p M C _Gea rOut
M C_M ov eVeloc ity
M C_ Hal t
M C _Gear In(Sla ve )
MC _M ov eAbs olu te
M C _Mo ve Rel ativ e M C_C am In(Sl ave )
M C _C amIn( Slav e)
M C _Gear In (Sla ve ) M C _C ombi neAx es (Sl av e)
M C _Mo veS uperi mpo se d
M C _Ha ltSuper im pos ed M C _C om bineA xes (S lav e)
M C _Mo veA bso lute
M C _Mo veR el ativ e M C _Mov eAb so lute MC _M ov eR elativ e
M C _Mo veA dditiv e M C _Mo ve Vel oc ity
M C _Ha lt M C _Mo veA dditiv e M C _H alt M C _Mo veS uperi mpo se d
MC _M ov eVeloc ity
Continuous
Di screte M otion
Motion
MC
_S
to p
M C _Stop
MC _S to p
Do ne S topping
M C _Mov eVelo ci ty
Homing Note6
Do
ne
MC
_H
om
e
M C _Mov eAb so lute
M C_ Mov eR ela ti ve
M C _Mo veA dditiv e
StandStill
M C _M ove Super im pos ed
No N ote1
te 4
N ote5
t e2
No
Note1:The axis in any state will enter the ErrorStop state as long as an error occurs in the axis.
Note2:The axis enters the Disabled state when no axis error occurs in any state and Enable of
MC_Power is FALSE. 10
10- 3 1
DVP-50MC Series Motion Controller Operation Manual
Note3:When Status of MC_Power is FALSE, the MC_Reset instruction is used to reset the axis to the
Disabled state.
Note4:When Enable and Status of MC_Power are TRUE, the MC_Reset instruction is used to reset the
axis to the Standstill state.
Note5:The axis enters from Disabled to Standstill state when the MC_Power instruction is used to enable
the axis and Status of MC_Power is TRUE.
Note6:The axis enters from Stopping to Standstill state when Done of MC_Stop is TRUE and Execute
of MC_Stop is FALSE.
Note: Axis state can be judged according to the output parameters of the MC_ReadStatus instruction.
Refer to section 11.3.17 for details on the MC_ReadStatus instruction.
10
10- 3 2
11
Motion Instructions
Table of Contents
11.1 Table of Motion Control Instructions ...................................... 11-5
11.2 About Motion Control Instructions ......................................... 11-8
11.2.1 Composition of A Motion Control Instruction ............................ 11-8
11.2.2 Program Languages that Motion Control Instructions Support ... 11-8
11.2.3 Configuration of Motion Control Instructions ........................... 11-9
11.3 Single-axis Instructions ....................................................... 11-10
11.3.1 MC_Power ........................................................................ 11-10
11.3.2 MC_Home ........................................................................ 11-22
11.3.3 MC_MoveVelocity .............................................................. 11-28
11.3.4 MC_Halt ........................................................................... 11-37
11.3.5 MC_Stop .......................................................................... 11-44
11.3.6 MC_MoveRelative .............................................................. 11-50
11.3.7 MC_MoveAdditive .............................................................. 11-60
11.3.8 MC_MoveAbsolute ............................................................. 11-71
11.3.9 MC_MoveSuperimposed ..................................................... 11-83
11.3.10 MC_HaltSuperimposed ...................................................... 11-93
11.3.11 MC_SetPosition .............................................................. 11-100
11.3.12 MC_SetOverride ............................................................. 11-113
11.3.13 MC_Reset ...................................................................... 11-118
11.3.14 DMC_SetTorque ............................................................. 11-122
11.3.15 MC_ReadAxisError .......................................................... 11-127
11.3.16 MC_ReadActualPosition ................................................... 11-130
11.3.17 MC_ReadStatus.............................................................. 11-136
11.3.18 MC_ReadMotionState ...................................................... 11-143
11.3.19 DMC_ReadParameter_Motion ........................................... 11-150
11.3.20 DMC_WriteParameter_Motion .......................................... 11-156
11.3.21 DMC_TouchProbe ........................................................... 11-162
11.3.22 DMC_TouchProbeCyclically .............................................. 11-173
11- 1
DVP-50MC Series Motion Controller Operation Manual
11- 2
Chapter 11 Motion Control Instructions
11- 3
DVP-50MC Series Motion Controller Operation Manual
11
1
11- 4
Chapter 11 Motion Control Instructions
MC_MoveVelocity Velocity
MC_Stop Stop
MC_Reset Reset
DMC_Jog Jog
DMC_MoveVelocityStopByLine
Stop at a specified position
Pos
DMC_ChangeMechanismGearR
Modify axis parameter value
atio
11- 5
DVP-50MC Series Motion Controller Operation Manual
11- 6
Chapter 11 Motion Control Instructions
11- 7
DVP-50MC Series Motion Controller Operation Manual
The motion instructions support the following two types of program languages.
11- 8
Chapter 11 Motion Control Instructions
Motion instructions can only be added to the motion event task. Otherwise, they can not be executed if they
are added to other types of tasks.
11
The following table shows task types and whether motion instruction can be added to these tasks.
Cyclic No
Freewheeling No
11- 9
DVP-50MC Series Motion Controller Operation Manual
1 DVP50MC11T/DVP50MC11T-06
MC_Power is used to enable or disable the
FB DVP50MC11P/DVP50MC11P-06
corresponding servo axis.
DVP50MC11T-04S/DVP50MC11T-16S
MC_Power_ins tance
MC_Power
Ax is Status
Enable Busy
EnablePos it iv e Act iv e
EnableNegative Erro r
Bu fferMode ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions
Specify the number of the
of Section 2.2. When Enable
Axis axis which is to be USINT
(The variable changes to TRUE
controlled.
value must be set)
The instruction is
executed when Enable TRUE or FALSE When Enable
Enable BOOL
changes from FALSE to (FALSE) changes to TRUE
TRUE.
The specified axis is
allowed to move forward
EnablePositive only under the condition TRUE or FALSE When Enable
BOOL
that Enable is TRUE and (FALSE) changes to TRUE
EnablePositive is also
TRUE.
The specified axis is
allowed to move reversely
only under the condition TRUE or FALSE When Enable
EnableNegative BOOL
that Enable is TRUE and (FALSE) changes to TRUE
EnableNegative is also
TRUE.
0: mcAborting
Buffermode Specify the behavior of MC_Buffer When Enable
1: mcBuffered
11- 1 0
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
MC_Power when Enable Mode (0) changes to TRUE
changes to FALSE 11
Note:
Motion control instructions can control servo axes for corresponding motions only after Power ON. When
Power OFF, no motion control instructions can be executed.
Output Parameters
Parameter
Function Data type Valid range
name
Status TRUE when the axis is enabled. BOOL TRUE/FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
TRUE when an error occurs in execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please
ErrorID WORD
refer to section 12.2 for the corresponding error ID.
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When Enable changes to FALSE.
Status When the axis is enabled.
When Error changes to TRUE.
11- 11
DVP-50MC Series Motion Controller Operation Manual
Case 1 Case 2
En able
11 St atus
1 B usy
Active
Error
E rro r ID
Case 1: When MC_Power instruction is executed for the first time, Busy changes to TRUE and one
cycle later, Active changes to TRUE. After Enable changes from FALSE to TRUE and the axis
is enabled, Status changes to TRUE. After Enable changes from TRUE to FALSE and the axis
is disabled, Status changes from TRUE to FALSE.
Case 2: When an error occurs in the execution of the instruction, Error changes to TRUE, the
corresponding error code is contained in ErrorID and meanwhile Status, Busy and Active all
change to FALSE. Error changes to FALSE when the error is cleared.
Function
1. Status will not change to TRUE if the axis is not enabled yet after Enable is set to TRUE. Please
make sure that Status has already changed to TRUE before the axis is started to move.
2. When Enable and EnablePositive are both TRUE, the axis specified by a motion instruction is
allowed to move in the positive direction.
3. When Enable is TRUE and EnablePositive is FALSE, the axis specified by a motion instruction is
prohibited to move in the positive direction. In this case, there will be an error in existence if some
motion instruction is used to move the axis forward. If the axis moves from backward to forward,
the instruction which is controlling the motion of the axis will be aborted and the axis will stop
moving and enter the state of Standstill.
4. When Enable and EnableNegative are both TRUE, the axis specified by a motion instruction can
move in the negative direction.
5. When Enable is TRUE and EnableNegative is FALSE, the axis specified by a motion instruction is
prohibited to move in the negative direction. In this case, there will be an error in existence if some
motion instruction is used to move the axis backward. If the axis moves from forward to backward,
the instruction which is controlling the motion of the axis will be aborted and the axis will stop
moving and enter the state of Standstill.
11- 1 2
Chapter 11 Motion Control Instructions
6. When the axis moves in the positive direction and EnablePositive changes from TRUE to FALSE,
the axis will decelerate its speed at the deceleration rate specified by the current motion instruction
controlling the axis and finally stop at the velocity of 0. When the axis moves in the negative
direction and EnableNegative changes from TRUE to FALSE, the axis will decelerate its speed at 11
the deceleration rate specified by the current motion instruction controlling the axis and finally stop
at the velocity of 0.
7. In principle, only one MC_Power can be used for one axis. If there are two MC_Power instructions
in the program where the same axis is controlled, please refer to the execution result of the
MC_Power which is executed late.
8. While a motion instruction is controlling the axis, Enable of MC_Power changes from TRUE to
FALSE and whether the axis enters the Disable state depends on the value of Buffermode.
9. Buffermode
BufferMode specifies the behavior of MC_Power when Enable changes from TRUE to FALSE.
Input BufferMode
Function
selection
When Enable changes from TRUE to FALSE, the axis will stop
moving immediately and become disabled (The state machine enters
0:
mcAborting the state of Disabled).
(Interrupt)
Precaution: Be cautious during operation in case of any danger
When Enable changes from TRUE to FALSE, the axis will not enter
1: the Disabled state immediately. Only when the axis stops moving, the
mcBuffered
(Waiting) state machine goes to the Standstill state first and one cycle later, it
enters the Disabled state.
Programming Example 1
When Pwr_En is TRUE and Pwr_EnPs is FALSE, the axis specified by the motion instruction is
forbidden to move in the positive direction. While the axis is moving in the positive direction and
Pwr_EnPs changes from TRUE to FALSE, the axis will decelerate its speed at the deceleration rate
specified by the current motion instruction controlling the axis till the velocity of the axis reaches 0.
11- 1 3
DVP-50MC Series Motion Controller Operation Manual
P wr
MC_Power 1
Axis1 Ax is Stat us Pwr_Sta
Pwr_En E nable Busy Pwr_Bsy
Pwr_E nPs E nableP ositive Ac tive Pwr_Act
True E nableNegative Error Pwr_E rr
P wr_BM BufferMode ErrorI D Pwr_E rrID
Vel
MC_Mov eVeloc ity 2
Axis1 Ax is Invelocity Vel_I nvel
Vel_Ex E xec ute Busy Vel_Bsy
Con tinuous Update Ac tive Vel_Act
300.0 Velocity CommandAborted Vel_Ab t
100.0 Ac celeration Error Vel_Err
100.0 Dec eleration ErrorID Vel_ErrID
15.0 Jerk
Vel_Dir Direction
Vel_BM BufferMode
11- 1 4
Chapter 11 Motion Control Instructions
Veloc it y
300
P wr
Pwr_en
Time
11
Pwr_EnPs
Pwr_St a
Pwr_Bsy
Pwr_Act
Vel
Vel_Ex
Vel_I nvel
Vel_Bsy
Vel_Act
Vel_Abt
Vel_Err
When Vel _Ex changes to TRUE for the first time, Vel _Bsy changes to TRUE and one cycle later,
Vel _Err changes to TRUE. At this moment, the servo motor could not move because Pwr_EnPs
is FALSE.
When Pwr_EnPs is TRUE and Vel _Ex changes to TRUE for the second time, Vel _Bsy changes
to TRUE; one cycle later, Vel _Act changes to TRUE and the servo motor starts moving in the
positive direction. When the servo motor reaches the target velocity, Vel _Invel changes to TRUE.
When Pwr_EnPs changes to FALSE, MC_Velocity instruction is aborted and the servo motor
begins to decelerate its speed at the deceleration rate specified by MC_Velocity instruction. When
the velocity is decreased to 0, CommandAborted changes to TRUE.
Programming Example 2
11- 1 5
DVP-50MC Series Motion Controller Operation Manual
11- 1 6
Chapter 11 Motion Control Instructions
P wr
MC_Power 1
Axis1 Ax is Stat us Pwr_Sta
Pwr_En E nable Busy Pwr_Bsy
Pwr_E nPs Pwr_Act
11
E nableP ositive Ac tive
True E nableNegative Error Pwr_E rr
P wr_BM BufferMode ErrorI D Pwr_E rrID
Vel
MC_Mov eVeloc ity 2
Axis1 Ax is Invelocity Vel_I nvel
Vel_Ex E xec ute Busy Vel_Bsy
Con tinuous Update Ac tive Vel_Act
300.0 Velocity CommandAborted Vel_Ab t
100.0 Ac celeration Error Vel_Err
100.0 Dec eleration ErrorID Vel_ErrID
15.0 Jerk
Vel_Dir Direction
Vel_BM BufferMode
Stp
MC_Stop 3
Ax is1 Axis Done S tp_Don e
Stp_Ex Ex ecute Bus y Stp_Bsy
100.0 Deceleration Active Stp_Act
15.0 Jerk CommandAborted St p_Abt
E rror St p_Err
ErrorID St p_ErrI D
11- 1 7
DVP-50MC Series Motion Controller Operation Manual
Velocity
300
11
1 Pwr Time
Pwr_En
Pwr_St a
Pwr_Bsy
Pwr_Act
Vel
Vel_Ex
Vel_I nvel
Vel_Bsy
Vel_Act
Stp_Abt
When Vel _Ex changes to TRUE, the servo motor starts moving in the positive direction. When
the speed of the servo motor reaches target velocity, Vel _Invel changes to TRUE.
When Pwr_En changes to FALSE, the speed of the servo motor is decreased to 0 and the axis
enters the Standstill state right away. At the same time, Vel _Abt changes to TRUE and Vel _Bsy
and Vel _Act change to FALSE. Pwr_Sta changes to FALSE after the axis is disabled.
Programming Example 3
11- 1 8
Chapter 11 Motion Control Instructions
11- 1 9
DVP-50MC Series Motion Controller Operation Manual
P wr
MC_Power 1
Axis1 Ax is Stat us Pwr_Sta
Pwr_En E nable Busy Pwr_Bsy
11
Pwr_E nPs E nableP ositive Ac tive Pwr_Act
True E nableNegative Error Pwr_E rr
1 P wr_BM BufferMode ErrorI D Pwr_E rrID
Vel
MC_Mov eVeloc ity 2
Axis1 Ax is Invelocity Vel_I nvel
Vel_Ex E xec ute Busy Vel_Bsy
Con tinuous Update Ac tive Vel_Act
300.0 Velocity CommandAborted Vel_Ab t
100.0 Ac celeration Error Vel_Err
100.0 Dec eleration ErrorID Vel_ErrID
15.0 Jerk
Vel_Dir Direction
Vel_BM BufferMode
Stp
MC_Stop 3
Ax is1 Axis Done S tp_Don e
Stp_Ex Ex ecute Bus y Stp_Bsy
100.0 Deceleration Active Stp_Act
15.0 Jerk CommandAborted St p_Abt
E rror St p_Err
ErrorID St p_ErrI D
11- 2 0
Chapter 11 Motion Control Instructions
Velocity
300
11
Pwr Time
Pwr_E n
Pwr_S ta
Pwr_Bsy
Pwr_Ac t
Vel
Ve l_Ex
Vel_Inve l
Vel_Bs y
Vel_Ac t
Vel_A bt
Stp
Stp_Ex
Stp_Done
St p_Bsy
Stp_Ac t
When Vel _Ex changes to TRUE, Vel _Bsy changes to TRUE; one cycle later, Vel _Act changes
to TRUE and the servo motor starts moving in the positive direction. When the speed of the servo
motor reaches the target velocity, Vel _Invel changes to TRUE.
When Pwr_En changes to FALSE, the axis will not enter the Standstill state immediately. When
Stp _Ex changes to TRUE, Stp _Bsy changes to TRUE; one cycle later, Stp _Act changes to
TRUE and the servo motor begins to decelerate. When the speed of the servo motor drops to 0,
Stp _Done changes to TRUE. Meanwhile, the axis enters the Standstill state and Pwr_Sta
changes to FALSE. One cycle later, the axis goes to the Disabled state.
11- 2 1
DVP-50MC Series Motion Controller Operation Manual
11.3.2 MC_Home
MC_Home_instanc e
MC_Home
Ax is Done
Ex ecut e Busy
Pos ition Act iv e
Buf ferMode CommandAborted
Error
E rrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to
Functions of
Specify the number of When Execute
Section 2.2.
Axis the axis which is to be USINT changes from
(The variable
controlled. FALSE to TRUE
value must be
set)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
Negative
When Execute
The servo home point number, positive
Position LREAL changes from
offset, Unit: unit. number and 0
FALSE to TRUE
(0)
BufferMode Reserved - - -
Output Parameters
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
11- 2 2
Chapter 11 Motion Control Instructions
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
11- 2 3
DVP-50MC Series Motion Controller Operation Manual
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
parameters for the instruction are
illegal.
11
1 Output Update Timing Chart
Ex ec ute
Done
B usy
Ac tive
Co mma ndAbo rt ed
Error
E rro r ID
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle later,
Active changes to TRUE. When the positioning is completed, Done changes to TRUE and
meanwhile Busy and Active change to FALSE.
Case 2: When the instruction is aborted by other instruction after Execute changes from FALSE to
TRUE, CommandAborted changes to TRUE and meanwhile, Busy and Active change to
FALSE. When Execute changes from TRUE to FALSE, CommandAborted changes to
FALSE.
Case 3: When an error occurs such as axis alarms or Offline after Execute changes from FALSE to
TRUE, Error changes to TRUE and ErrorID shows corresponding error code. Meanwhile,
Busy and Active change to FALSE. Error changes to FALSE when Execute changes from
TRUE to FALSE.
Case 4: Done changes to TRUE when the instruction execution is completed after Execute changes
from TRUE to FALSE in the course of execution of the instruction. Meanwhile, Busy and
Active change to FALSE and one cycle later, Done changes to FALSE.
Function
1. According to the set homing mode, the MC_Home instruction is used for connecting the home
switch and positive limit switch or negative limit switch to the external input points of the servo drive
so as to achieve the homing function.
11- 2 4
Chapter 11 Motion Control Instructions
2. For real axes, the homing mode and phase-1 speed and phase-2 speed of the homing are set in
the software axis parameter setting. See Appendix D for details on homing modes. For virtual axes,
the homing mode can only be set to mode 35.
3. The instruction can be executed only while the axis is in Stanstill state. Otherwise, an error will 11
occur.
4. Position parameter defines the offset between the mechanical zero point and servo reference zero
point as the figure below:
Mechanical For different Position value, the servo will eventually stop at the
zero point, mechanical point A under the control of this instruction. But the reference
A where the zero point of the servo position will change as shown below.
photoelectric
sensor is. A
D B C
– +
The position 0 0 0
is where the
servo is after Position= -10000
execution of Position=10000
Position=-15000
the
instruction is As Position=10000, the reference zero point of the servo position is point
finished. D and point A position is 10000;
As Position=-15000, the reference zero point of the servo position is
point C and point A position is -15000;
As Position=-10000, the reference zero point of the servo position is
point B and point A position is -10000.
Programming Example
Select an appropriate homing mode via the positions of the mechanism and photoelectric switch. When
Hom _Ex changes from FALSE to TRUE, the motion controller controls the servo motor to rotate and drive
the mechanism to return to the mechanical zero point position A.
11- 2 5
DVP-50MC Series Motion Controller Operation Manual
Hardware wiring
11
1
Note:
1. Of the photoelectric switch, the brown terminal (24V+) is connected to VDD of CN7 and the
black terminal (Out) is connected to EDI13.
2. The EDI13 function of servo’s CN7 is set to the home switch, i.e. P2-36 is set to 124.
It can be seen from the hardware wiring figure that the mechanism regards the home switch
position as the mechanical zero point position A. The home switch is OFF before searching for the
home. While the mechanism is searching for the home point, the servo rotates reversely at
beginning and homing mode 21 can be selected to achieve the homing.
The settings for homing in the corresponding axis parameters are as follows.
Homing mode 21
The first-phase speed (the speed for finding the home switch, Unit: r/m) 100
The second-phase speed (The speed from finding the home switch to
10
reaching the mechanical zero point, Unit: r/m)
Note: The set axis parameters are valid after being downloaded.
Hom MC_Home
Axis1 USINT 1
Hom_Done BOOL
Hom_Bsy BOOL
11- 2 6
Chapter 11 Motion Control Instructions
Hom_Act BOOL
Hom_Abt BOOL
Hom_Err BOOL
11
Hom_ErrID WORD
Hom
MC_Home 1
Axis1 Ax is Don e Hom_Done
Hom_Ex Ex ecute Bus y Hom_Bsy
0.0 Pos it ion Activ e Hom_Ac t
Buff erMode CommandAborted Hom_Abt
E rror Hom_Err
ErrorID Hom_ErrID
When Hom_Ex changes from FALSE to TRUE, the motion controller controls the motion of the
servo motor. The mechanism starts to run reversely, rotates forward after reaching the home
switch and then stops at the mechanical zero point. And the mechanism is driven to return to
the mechanical zero point A by doing so.
When the home switch is met, the homing is completed and Hom_Done is set to ON.
11- 2 7
DVP-50MC Series Motion Controller Operation Manual
11.3.3 MC_MoveVelocity
MC_MoveVelocity_instance
MC_MoveVelocity
Axis I nvelocity
Execut e Busy
Cont inuousUpda te Active
Velocit y CommandAborted
Acceleration Error
Deceleration ErrorID
Jerk
Direction
Buf ferMode
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions of
Specify the number of the When Execute
Section 2.2.
Axis axis which is to be USINT changes from
(The variable value must
controlled. FALSE to TRUE
be set)
ContinuousUpdate Reserved - - -
11- 2 8
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
Notes:
1. MC_MoveVelocity instruction is executed when Execute changes from FALSE to TRUE. The
instruction can be re-executed when Execute of the instruction changes from FALSE to TRUE again
no matter whether the instruction execution is completed. At the moment, the parameters including
Velocity, Acceleration, Deceleration, Jerk and Direction are effective again and other parameters are
ineffective. When the velocity instruction has the BufferMode relationship with other motion
instruction, the parameters will be valid after the instruction parameters are changed and the
instruction is re-triggered. The previous buffermode relation remains and the transition speed will be
re-calculated.
2. Invelocity remains TRUE even if the target speed is changed through MC_SetOverride after the
velocity instruction execution is completed (that is, Invelocity changes from FALSE to TRUE.)
Invelocity will change from FALSE to TRUE when the new target speed is reached after the target
speed is changed through MC_SetOverride before the execution of MC_MoveVelocity is completed
(when Invelocity is FALSE.)
3. Refer to section 10.2 for the relation among Position, Velocity, Acceleration and Jerk.
4. Refer to section 10.3 for details on BufferMode.
Output Parameters
11- 2 9
DVP-50MC Series Motion Controller Operation Manual
Invelocity TRUE when the target velocity is reached. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
1
CommandAborted TRUE when the instruction is aborted. BOOL TRUE / FALSE
11- 3 0
Chapter 11 Motion Control Instructions
Ca se 1 Ca se 2 Ca se 3 Cas e 4
Ex ec ute
Inv eloc it y
B usy
Ac tive
Co mma ndAbo rt ed
Error
E rro r ID
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle later,
Active changes to TRUE. When the target velocity is reached, Invelocity changes to TRUE
and meanwhile, Busy and Active remain TRUE.
Case 2: When Execute is TRUE, the instruction is aborted by other instruction and CommandAborted
changes to TRUE. Meanwhile, Invelocity, Busy and Active change to FALSE. When Execute
changes from TRUE to FALSE, CommandAborted changes to FALSE.
Case 3: When an error occurs such as parameter error while Execute is TRUE, Error changes to
TRUE and ErrorID shows corresponding error code. Meanwhile, Invelocity, Busy and Active
change to FALSE. Error changes to FALSE when Execute changes from TRUE to FALSE.
Case 4: In the course of execution of the instruction, Invelocity changes to TRUE when the target
velocity is reached after Execute changes from TRUE to FALSE. Meanwhile, Busy and Active
remain TRUE.
Function
MC_MoveVelocity controls the axis to speed up or down according to the set acceleration, deceleration and
jerk till the set target velocity is reached and after that the axis moves at the target speed. The direction of
the uniform motion is determined by the input parameter Direction. The Direction value 1 indicates the
positive direction, 3 is the negative direction and 4 is the current direction. If Direction value is set to 4 and
the axis is in STOP state before the MC_MoveVelocity instruction is executed, the axis will move in the
positive direction.
11- 3 1
DVP-50MC Series Motion Controller Operation Manual
Programming Example 1
The programming example is as follows when one MC_ MoveVelocity instruction is used.
11 1. The variable table and program
1
Variable name Data type Initial value
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 1
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Vel MC_MoveVelocity
Vel_Dir MC_DIRECTION 1
Vel_BM MC_Buffer_Mode 0
Vel_Invel BOOL
Vel_Bsy BOOL
Vel_Act BOOL
Vel_Abt BOOL
Vel_Err BOOL
Vel_ErrID WORD
11- 3 2
Chapter 11 Motion Control Instructions
P wr
MC_Power 1
Axis1 Axis Stat us Pwr_Sta
True E nable Busy Pwr_Bsy
True E nableP ositive Active Pwr_Act 11
True E nableNegative Error Pwr_E rr
P wr_BM BufferMode ErrorI D Pwr_E rrID
Vel
MC_MoveVelocity 2
Axis1 Axis Invelocity Vel_I nvel
Vel_Ex E xecute Busy Vel_Bsy
Con tinuousUpdate Active Vel_Act
300.0 Velocity CommandAborted Vel_Ab t
100.0 Acceleration Error Vel_Err
100.0 Deceleration ErrorID Vel_ErrID
15.0 Jerk
Vel_Dir Direction
Vel_BM BufferMode
Velocity
300
Time
Vel
Vel_Ex
Vel_I nvel
Vel_Bsy
Vel_Act
Vel_Abt
Vel_Err
When Vel_Ex changes from FALSE to TRUE, Vel_Bsy changes to TRUE. One cycle later,
Vel_Act changes to TRUE and the execution of the velocity instruction starts. When the target
velocity is reached, Vel_Invel changes to TRUE and Vel_Bsy and Vel_Act remain TRUE.
When Vel_Ex changes from TRUE to FALSE, Vel_Inve, Vel_Bsy and Vel_Act remain TRUE.
Programming Example 2
Below is the example that one MC_MoveVelocity instruction aborts another MC_MoveVelocity
instruction.
11- 3 3
DVP-50MC Series Motion Controller Operation Manual
Pwr MC_Power
11
Axis1 USINT 1
1
Pwr_BM MC_Buffer_Mode 1
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Vel1 MC_MoveVelocity
Vel1_Dir MC_DIRECTION 1
Vel1_BM MC_Buffer_Mode 0
Vel1_Invel BOOL
Vel1_Bsy BOOL
Vel1_Act BOOL
Vel1_Abt BOOL
Vel1_Err BOOL
Vel1_ErrID WORD
Vel2 MC_MoveVelocity
Vel2_Dir MC_DIRECTION 1
Vel2_BM MC_Buffer_Mode 0
Vel2_Invel BOOL
Vel2_Bsy BOOL
Vel2_Act BOOL
Vel2_Abt BOOL
Vel2_Err BOOL
Vel2_ErrID WORD
11- 3 4
Chapter 11 Motion Control Instructions
Pwr
MC_Power 1
Axis1 Axis Stat us Pwr_Sta
True Enable Busy Pwr_B sy
11
True EnableP ositive Active Pwr_A ct
True EnableNegative Error Pwr_E rr
1 BufferMode ErrorI D Pwr_E rrID
Vel1
MC_MoveVelocit y 2
Axis1 Axis Invelocity Vel1_I nvel
Vel1_Ex Execute Busy Vel1_B sy
Co ntinuou sUpdate Active Vel1_A ct
300.0 Velocity CommandAborted Vel1_A bt
100.0 Acceleration Error Vel1_E rr
100.0 Deceleration Erro rI D Vel1_E rrID
15.0 Je rk
Vel1_Dir Direction
Vel1_BM BufferMode
Vel2
MC_MoveVelocit y 3
Axis1 Axis Invelocity Vel2_I nvel
Vel2_Ex Execute Busy Vel2_B sy
Co ntinuou sUpdate Active Vel2_A ct
600.0 Velocity CommandAborted Vel2_A bt
100.0 Acceleration Error Vel2_E rr
100.0 Deceleration Erro rI D Vel2_E rrID
15.0 Je rk
Vel2_Dir Direction
Vel2_BM BufferMode
11- 3 5
DVP-50MC Series Motion Controller Operation Manual
Velocity
11 600
1
200
Time
Vel1
Vel1_Ex
Vel1_I nvel
Vel1_Bsy
Vel1_Act
Vel1_Ab t
Vel1_Err
Vel2
Vel2_Ex
Vel2_I nvel
Vel2_Bsy
Vel2_Act
Vel2_Ab t
Vel2_Err
When Vel1_Ex changes from FALSE to TRUE, Vel1_Bsy changes to TRUE. One cycle later,
Vel1_Act changes to TRUE and the first MC_MoveVelocity instruction starts being executed.
When the target velocity is not reached, Vel2_Ex changes from FALSE to TRUE and
Vel2_Bsy changes to TRUE. One cycle later, Vel2_Act changes to TRUE, the first
MC_MoveVelocity instruction is aborted, Vel1_Abt changes to TRUE and the axis starts to
perform the second MC_MoveVelocity instruction. When the target velocity is reached,
Vel2_Invel changes to TRUE and meanwhile, Vel2_Bsy and Vel2_Act remain TRUE.
When Vel1_Ex changes from TRUE to FALSE, Vel1_Abt changes to FALSE. When Vel2_Ex
changes from TRUE to FALSE, Vel2_Invel, Vel2_Bsy and Vel2_Act remain TRUE.
11- 3 6
Chapter 11 Motion Control Instructions
11.3.4 MC_Halt
Input Parameters
Refer to Functions of
Specify the number of
Section 2.2. When Execute changes
Axis the axis which is to be USINT
(The variable value from FALSE to TRUE
controlled
must be set)
The instruction is
executed when TRUE or FALSE
Execute BOOL -
Execute changes from (FALSE)
FALSE to TRUE.
11- 3 7
DVP-50MC Series Motion Controller Operation Manual
Note:
1. MC_Halt instruction is executed when Execute changes from FALSE to TRUE. There is no impact
on the instruction execution when Execute of the instruction changes from TRUE to FALSE in the
course of the instruction execution.
2. While Execute changes from FALSE to TRUE once more in the course of execution of MC_Halt,
there is no impact on the instruction execution and the instruction will continue being executed in the
previous way. When Execute changes from FALSE to TRUE once again after the instruction
execution is completed, the instruction can be re-executed.
3. Refer to section10.2 for the relation between Deceleration and Jerk.
4. Refer to section10.3 for details on BufferMode.
Output Parameters
Parameter
Function Data type Valid range
name
CommandAbort
TRUE when the instruction is aborted. BOOL TRUE/FALSE
ed
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
When the deceleration ends and When Execute changes from TRUE to FALSE after
Done
the axis speed is decreased to 0. the instruction execution is completed.
11- 3 8
Chapter 11 Motion Control Instructions
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
When an error occurs in the When Execute changes from TRUE to FALSE.
instruction execution or the input
Error
parameters for the instruction are
illegal.
11- 3 9
DVP-50MC Series Motion Controller Operation Manual
11
1
Ex ec ute
Done
B usy
Ac tive
Co mma ndAbo rt ed
Error
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one period
later, Active changes to TRUE. When the deceleration ends and the axis speed is
decreased to 0, Done changes to TRUE and meanwhile Busy and Active change to
FALSE.
Case 2: After Execute changes from FALSE to TRUE and the instruction is aborted by other
instruction, CommandAborted changes to TRUE and meanwhile Busy and Active change
to FALSE. When Execute changes from TRUE to FALSE, CommandAborted changes to
FALSE.
Case 3: When an error occurs such as axis alarms or Offline after Execute changes from FALSE
to TRUE, Error changes to TRUE and ErrorID shows the corresponding error code.
Meanwhile, Busy and Active change to FALSE. Error changes to FALSE when Execute
changes from TRUE to FALSE.
Case 4: In the course of execution of the instruction, Done changes to TRUE when the instruction
execution is completed after Execute changes from TRUE to FALSE. Meanwhile, Busy
and Active change to FALSE and one period later, Done changes to FALSE.
Function
MC_Halt is used to make the axis decelerate at a given deceleration rate till it stops.
The state machine enters DiscreteMotion as MC_Halt starts being executed. When the axis speed
is decreased to 0, Done changes to TRUE and meanwhile, the state machine enters Standstill.
Compared to MC_Stop instruction, MC_Halt instruction can not make the axis locked and thus the
controller can perform other motion instruction on it.
MC_Halt can be aborted through performing other motion instruction when the axis is decelerated
during execution of MC_Halt. Other motion instruction can be executed by the controller to restart
the axis after MC_Halt execution is over and the axis has stopped.
11- 4 0
Chapter 11 Motion Control Instructions
Programming Example
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Vel MC_MoveVelocity
Vel_Dir MC_DIRECTION 1
Vel_BM MC_Buffer_Mode 0
Vel_Invel BOOL
Vel_Bsy BOOL
Vel_Act BOOL
Vel_Abt BOOL
Vel_Err BOOL
Vel_ErrID WORD
Hlt MC_Halt
Hlt_BM MC_Buffer_Mode 0
Hlt_Done BOOL
Hlt_Bsy BOOL
Hlt_Act BOOL
Hlt_Abt BOOL
Hlt_Err BOOL
Hlt_ErrID WORD
11- 4 1
DVP-50MC Series Motion Controller Operation Manual
11
1
Velocity
10000
11- 4 2
Chapter 11 Motion Control Instructions
When Vel_Ex changes to TRUE, Vel_Bsy changes to TRUE and one period later, Vel_Act
changes to TRUE and the servo motor starts to move forward. Vel_Invel changes to TRUE as
the servo motor reaches the target velocity.
When Hlt_Ex changes to TRUE, Hlt_Bsy changes to TRUE and one period later, Hlt_Act 11
changes to TRUE. Meanwhile, Vel_Invel changes to FALSE and Vel_Abt changes to TRUE
and then the servo motor starts to decelerate.
When the axis velocity is decreased to 0, Hlt_Done changes to TRUE and meanwhile, Hlt_Bsy
and Hlt_Act change to FALSE.
11- 4 3
DVP-50MC Series Motion Controller Operation Manual
11.3.5 MC_Stop
MC_Stop_instan ce
MC_Stop
Ax is Done
Ex ecut e Busy
Deceleration Act iv e
Jerk CommandAborted
Error
E rrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions
Specify the number of the When Execute
of Section 2.2.
Axis axis which is to be USINT changes from
(The variable value
controlled FALSE to TRUE
must be set)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
Note:
1. MC_Stop instruction is executed when Execute changes from FALSE to TRUE. There is no impact
on the instruction execution when Execute of the instruction changes from TRUE to FALSE in the
course of the instruction execution.
2. While Execute changes from FALSE to TRUE once more in the course of execution of MC_Halt,
there is no impact on the instruction execution and the instruction will continue being executed in the
previous way. When Execute changes from FALSE to TRUE once again after the instruction
execution is completed, the instruction can be re-executed.
11- 4 4
Chapter 11 Motion Control Instructions
3. Refer to section 10.2 for the relation between Deceleration and Jerk.
Output Parameters
Parameter
name
Function Data type Valid range 11
CommandAbort
TRUE when the instruction is aborted. BOOL TRUE/FALSE
ed
Parameter name Timing for changing to TRUE Timing for changing to FALSE
11- 4 5
DVP-50MC Series Motion Controller Operation Manual
Parameter name Timing for changing to TRUE Timing for changing to FALSE
11 FALSE.
Ex ec ute
Done
B usy
Ac tive
Co mma ndAbo rt ed
Error
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one period later,
Active changes to TRUE. When the deceleration ends and the axis speed is decreased to 0,
Done changes to TRUE and Busy and Active remain TRUE.
Case 2: When the MC_Stop instruction is aborted by another MC_Stop instruction after Execute
changes from FALSE to TRUE, CommandAborted changes to TRUE and meanwhile Busy
and Active change to FALSE. When Execute changes from TRUE to FALSE,
CommandAborted changes to FALSE.
Case 3: When an error occurs such as axis alarm or Offline after Execute changes from FALSE to
TRUE, Error changes to TRUE and ErrorID shows the corresponding error code. Meanwhile,
11- 4 6
Chapter 11 Motion Control Instructions
Busy and Active change to FALSE. Error changes to FALSE when Execute changes from
TRUE to FALSE.
Case 4: In the course of execution of the instruction, Done changes to TRUE and Busy and Active
remain TRUE when the instruction execution is completed after Execute changes from 11
TRUE to FALSE. One period later, Done, Busy and Active all change to FALSE.
Function
MC_Stop is used to make the axis decrease its speed at a given deceleration rate till it stops.
As long as Execute is TRUE after execution of MC_Stop is completed and the axis velocity is
decreased to 0, the axis state will be in the Stopping state all the time. And during that period, other
motion instruction can not be executed.
If there are two MC_Stop instructions in the program for controlling the same axis, the previously
being executed MC_Stop will be aborted by the later executed MC_Stop instruction.
Compared to MC_Halt instruction, MC_Stop instruction will make the axis locked and thus the
controller cannot perform other motion instruction excluding MC_Stop during MC_Stop execution.
The controller still cannot perform other motion instructions when the execution of MC_Stop is
finished and the axis has stopped. Other motion instruction can not be executed until Execute of
MC_Stop changes from TRUE to FALSE.
Programming Example 1
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Vel MC_MoveVelocity
11- 4 7
DVP-50MC Series Motion Controller Operation Manual
Vel_Dir MC_DIRECTION 1
Vel_BM MC_Buffer_Mode 0
11
Vel_Invel BOOL
1
Vel_Bsy BOOL
Vel_Act BOOL
Vel_Abt BOOL
Vel_Err BOOL
Vel_ErrID WORD
Stp MC_Stop
Stp_Done BOOL
Stp_Bsy BOOL
Stp_Act BOOL
Stp_Abt BOOL
Stp_Err BOOL
Stp_ErrID WORD
Pwr
MC_Power 1
Axis1 A xis Stat us Pwr_Sta
Pwr_En Enable Busy Pwr_Bsy
True EnableP ositive Active Pwr_Act
True EnableNegative Error Pwr_Err
Pwr_BM BufferMode ErrorI D Pwr_ErrID
Vel
MC_MoveVelocit y 2
Axis1 A xis Invelocity Vel_I nvel
Vel_Ex Execute Busy Vel_Bsy
ContinuousUpdate Active Vel_Act
10000.0 Velocity CommandAborted Vel_A bt
5000.0 A cceleration Error Vel_E rr
5000.0 Decelerat ion ErrorI D Vel_E rrID
2000.0 Jerk
Vel_Dir Direction
Vel_BM BufferMode
Stp
MC_Stop 3
A xis1 Axis Done S tp_Done
Stp_Ex Execute Busy Stp_Bsy
20000.0 Deceleration Active Stp_Act
20000.0 Jerk CommandAborted St p_Abt
Error S tp_Err
ErrorID St p_ErrI D
11- 4 8
Chapter 11 Motion Control Instructions
Veloc ity
10000
11
Vel Time
Vel_Ex
Vel_Inv el
Vel_Bs y
Vel_Ac t
Vel_A bt
Vel_Err
Stp
St p_Ex
Stp_Done
Stp_Bs y
St p_Act
Stp_Abt
S tp_Err
As Vel_Ex changes to TRUE, Vel_Bsy changes to TRUE. One period later, Vel_Act changes
to TRUE and the servo motor starts to move forward. Vel_Invel changes to TRUE when the
servo motor reaches the target velocity.
As Stp_Ex changes to TRUE, Stp_Bsy changes to TRUE. One period later, Stp_Act changes
to TRUE, meanwhile Vel_Invel changes to FALSE, Vel_Abt changes to TRUE and the servo
motor starts to decelerate.
When the axis velocity is decreased to 0, Stp_Done changes to TRUE and meanwhile
Stp_Bsy, Stp_Act remain TRUE.
11- 4 9
DVP-50MC Series Motion Controller Operation Manual
11.3.6 MC_MoveRelative
MC_MoveRelative_inst ance
MC_Mov eRelat iv e
Ax is Done
Ex ecut e Busy
Cont inuous Upda te Ac tiv e
Distanc e CommandAborted
Veloc it y Error
Ac celeration ErrorID
Deceleration
Jerk
Buf ferMode
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions of
Specify the number of the When Execute
Section 2.2.
Axis axis which is to be USINT changes from
(The variable value
controlled FALSE to TRUE
must be set)
ContinuousUpdate Reserved - - -
11- 5 0
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
0: mcAborting
Specify the behavior when
1: mcBuffered
executing two instructions.
2: mcBlendingLo
0: Aborting w
When Execute
1: Buffered MC_Buffer 3: mcBlending
BufferMode _Previous changes from
2: BlendingLow _Mode
4: mcBlending FALSE to TRUE
3: BlendingPrevious _Next
4: BlendingNext 5: mcBlending
_High
5: BlendingHigh
(0)
Notes:
1. MC_MoveRelative instruction is executed when Execute changes from FALSE to TRUE. There is no
impact on the instruction execution when Execute of the instruction changes from TRUE to FALSE in the
course of execution.
2. While the instruction is being executed and Execute changes from FALSE to TRUE again, there will be
no impact on the instruction execution and the instruction will continue being executed in the previous
way. When Execute changes from FALSE to TRUE again after the instruction execution is completed, the
instruction can be re-executed and started in the conventional way.
3. Refer to section 10.2 for the relation among Velocity, Acceleration and Jerk.
4. Refer to section 10.3 for details on BufferMode.
Output Parameters
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
TRUE when the axis is being controlled by the
Active BOOL TRUE / FALSE
instruction.
CommandAborted TRUE when the instruction execution is aborted. BOOL TRUE / FALSE
11- 5 1
DVP-50MC Series Motion Controller Operation Manual
11
Contains error codes when an error occurs. Please
ErrorID refer to the section 12.2 for corresponding error WORD
1 codes.
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
11- 5 2
Chapter 11 Motion Control Instructions
Ex ec ute 11
Done
B usy
Ac tive
Co mma ndAbo rt ed
Error
E rro r ID
Case 1: Busy changes to TRUE when Execute changes from FALSE to TRUE and one cycle later,
Active changes to TRUE. When the positioning is finished, Done changes to TRUE and
meanwhile, Busy and Active change to FALSE.
Case 2: When Execute changes from FALSE to TRUE and the instruction is aborted by other
instruction, CommandAborted changes to TRUE and meanwhile, Busy and Active change to
FALSE. CommandAborted changes to FALSE when Execute changes from TRUE to FALSE.
Case 3: When an error occurs such as axis alarm or Offline after Execute changes from FALSE to
TRUE, Error changes to TRUE and ErrorID shows the corresponding error code. Meanwhile,
Busy and Active change to FALSE. Error changes to FALSE when Execute changes from
TRUE to FALSE.
Case 4: In the course of execution of the instruction, Done changes to TRUE when the instruction
execution is completed after Execute changes from TRUE to FALSE. Meanwhile, Busy and
Active change to FALSE and one cycle later, Done changes to FALSE.
Function
MC_MoveRelative is used to make the axis move for a given distance by starting from the command
current axis position at a given speed, acceleration, deceleration and Jerk.
11- 5 3
DVP-50MC Series Motion Controller Operation Manual
Distance
Distance and the start position for reference jointly determine the target position which the axis will
reach under control of the instruction. The target position= the start position for reference + Distance.
When Distance is set to 0, the target position for the axis motion is set as current position. The
11 instruction execution is finished in the next cycle since its execution and Done changes to TRUE.
1 As illustrated in the following left figure, the start position for reference is 10000. The axis moves in the
positive direction and the target position is 20000 (10000+10000) when Distance>0 (10000).
In the following right figure, the axis moves in the negative direction and the target position is 0 (10000-
10000) when Distance<0(-10000).
Star t Po sitio n
10000 100 00
S ta rt P osi ti on
Ta rg et Po siti on
0
Time Time
Programming Example 1
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Rel MC_MoveRelative
11- 5 4
Chapter 11 Motion Control Instructions
Pwr
MC_Power 1
Ax is 1 Axis S tatus P wr_Sta
Pwr_En Enable Busy Pwr_Bsy
True EnablePos itiv e Activ e Pwr_Act
True EnableNegative Error Pwr_Err
Pwr_BM Buffe rMode E rrorID Pwr_ErrID
Rel
MC_Mov eRelative 2
Ax is1 Axis Done Rel_Done
Rel_Ex Ex ecute Busy Rel_Bsy
ContinuousUpdate Activ e Rel_Ac t
5000. 0 Dis tanc e CommandAborted Rel_Abt
300. 0 Velocity Error Rel_Err
100. 0 Acc elerat ion ErrorID Rel_ErrID
100. 0 Deceleration
15. 0 Jerk
Rel_BM BufferMode
Velocity
300
Position Time
12000
7000
2000
Time
Rel
Rel_Ex
Rel_Done
Rel_B sy
Rel_Act
Rel_Abt
Rel_Err
11- 5 5
DVP-50MC Series Motion Controller Operation Manual
MC_MoveRelative instruction is executed for the first time when Rel_Ex changes from FALSE
to TRUE for the first time. At the moment, the current position of the axis is 2000 and the target
position is 7000 (7000=2000+5000).
11 When the axis position of 7000 is reached, the instruction execution is finished and Done
1 changes to TRUE.
MC_MoveRelative instruction starts its second-time execution when Rel_Ex changes from
FALSE to TRUE for the second time. At the moment, the current position of the axis is 7000 and
the target position is 12000 (12000=7000+5000).
When the axis position of 12000 is reached, the second-time execution of the instruction is
completed and Done changes to TRUE for the second time.
Programming Example 2
The example is shown below when MC_MoveRelative which is being executed is aborted.
11- 5 6
Chapter 11 Motion Control Instructions
Pwr MC_Power
11
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Rel1 MC_MoveRelative
Rel2 MC_MoveRelative
11- 5 7
DVP-50MC Series Motion Controller Operation Manual
Pwr
MC_Power 1
Axis1 Axis S tatus P wr_Sta
Pwr_En Enable Busy Pwr_Bsy
Rel1
MC_MoveRelative 2
Axis1 Axis Done Rel1_Done
Rel1_Ex Execute Busy Rel1_Bsy
ContinuousUpdate Active Rel1_Act
5000. 0 Distance CommandAborted Rel1_A bt
300. 0 Velocity Error Rel1_E rr
100. 0 Accelerat ion ErrorID Rel1_E rrID
100. 0 Deceleration
15. 0 Jerk
Rel1_BM Buffe rMode
Rel2
MC_MoveRelative 3
Axis1 Axis Done Rel2_Done
Rel2_Ex Execute Busy Rel2_Bsy
ContinuousUpdate Active Rel2_Act
9000. 0 Distance CommandAborted Rel2_A bt
500. 0 Velocity Error Rel2_E rr
100. 0 Accelerat ion ErrorID Rel2_E rrID
100. 0 Deceleration
15. 0 Jerk
Rel2_BM Buffe rMode
11- 5 8
Chapter 11 Motion Control Instructions
Velocity
500
11
300
Time
Position
13500
4500
2000
Time
Rel 1
Rel1_Ex
Rel1_Done
Rel1_ Bsy
Rel1_Act
Rel1_Abt
Rel1_Err
Rel 2
Rel2_Ex
Rel2_Done
Rel2_B sy
Rel2_Act
Rel2_Abt
Rel2 Err
The first MC_MoveRelative instruction starts being executed when Rel1_Ex changes from
FALSE to TRUE. At the moment, the current position of the axis is 2000 and the target
position is 7000 (7000=2000+5000).
When the axis position of 4500 is reached, Rel2_Ex changes from FALSE to TRUE, the
second MC_MoveRelative instruction starts being executed and the execution of the first
MC_MoveRelative is aborted and Rel1_Abt changes to TRUE.
When the axis position of 13500 (13500=4500+9000) is reached, the execution of the second
MC_MoveRelative instruction is completed and Rel2_Done changes to TRUE.
11- 5 9
DVP-50MC Series Motion Controller Operation Manual
11.3.7 MC_MoveAdditive
MC_MoveAdditive_instance
MC_MoveAdditive
Axis Done
Execut e Busy
Cont inuousUpda te Active
Distance CommandAborted
Velocit y Error
Acceleration ErrorID
Deceleration
Jerk
Buf ferMode
Input Parameters
Refer to Functions of
Specify the number of the When Execute
Section 2.2.
Axis axis which is to be USINT changes from
(The variable value
controlled FALSE to TRUE
must be set)
ContinuousUpdate Reserved - - -
When Execute
Specify the target velocity. Positive number or 0
Velocity LREAL changes from
(Unit: Unit/s) (0)
FALSE to TRUE
11- 6 0
Chapter 11 Motion Control Instructions
0: Aborting 2: mcBlendingLow
3: mcBlending When Execute
1: Buffered MC_Buffer_ _Previous
BufferMode changes from
2: BlendingLow Mode 4: mcBlending
_Next FALSE to TRUE
3: Blending Previous
5: mcBlending
4: BlendingNext _High
5: Blending High (0)
Notes:
1. MC_MoveAdditive instruction is executed when Execute changes from FALSE to TRUE. There is no
impact on the instruction execution when Execute of the instruction in the course of execution changes
from TRUE to FALSE.
2. When Execute of the being executed instruction changes from FALSE to TRUE again, there is no
impact on the instruction execution and the instruction will go on being executed in the previous way.
When Execute changes from FALSE to TRUE again after the instruction execution is completed, the
instruction can be re-executed and started in the conventional way.
3. Refer to section 10.2 for the relation among Position, Velocity, Acceleration and Jerk.
4. Refer to section 10.3 for details on BufferMode.
Output Parameters
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
11- 6 1
DVP-50MC Series Motion Controller Operation Manual
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When Execute changes from TRUE to
11 FALSE after the instruction execution is
done.
1
Done changes to TRUE when the
When additive positioning is
Done instruction execution is completed after
completed.
Execute changes from TRUE to FALSE
during the instruction execution. One
period later, Done changes to FALSE.
When Done changes to TRUE.
When Error changes to TRUE.
Busy When Execute changes to TRUE. When CommandAborted changes to
TRUE.
When Done changes to TRUE.
When the instruction starts When Error changes to TRUE.
Active When CommandAborted changes to
controlling the axis.
TRUE.
11- 6 2
Chapter 11 Motion Control Instructions
11
Ex ec ute
Done
B usy
Ac tive
Co mma ndAbo rt ed
Error
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one period later,
Active changes to TRUE. When positioning is finished, Done changes to TRUE and
meanwhile, Busy and Active change to FALSE.
Case 2: When Execute changes from FALSE to TRUE and the instruction execution is aborted by
some other instruction, CommandAborted changes to TRUE and meanwhile, Busy and
Active change to FALSE. When Execute changes from TRUE to FALSE, CommandAborted
changes to FALSE.
Case 3: When Execute changes from FALSE to TRUE and an error occurs such as axis alarm or
Offline, Error changes to TRUE and ErrorID shows corresponding error codes. Meanwhile,
Busy and Active change to FALSE. Error changes to FALSE when Execute changes from
TRUE to FALSE.
Case 4: In the course of execution of the instruction, Done changes to TRUE when the instruction
execution is completed after Execute changes from TRUE to FALSE. Meanwhile, Busy and
Active change to FALSE and one period later, Done changes to FALSE.
Function
MC_MoveAdditive can control the actuator to move an additive distance at a given speed and
acceleration.
The execution of the former instruction related with positioning has not been finished yet and the
distance which the terminal actuator will move includes the uncompleted distance left by the former
instruction and the given distance of this instruction when MC_MoveAdditive is executed. When the
execution of MC_MoveAdditive is completed, the final position of the terminal actuator is the sum of
the given distances of the former instruction and current instruction MC_MoveAdditive.
If the former instruction is a velocity instruction, MC_MoveAdditive will abort the execution of the
velocity instruction and the terminal actuator will stop after moving a given distance of
MC_MoveAdditive at a given speed, acceleration and deceleration.
11- 6 3
DVP-50MC Series Motion Controller Operation Manual
11- 6 4
Chapter 11 Motion Control Instructions
Whether
MC_MoveSuperimposed
BufferMode of
is being executed in Description 11
MC_MoveAdditive
conjunction with other
position instruction
The execution of
MC_MoveSuperimposed and other
position instruction will be aborted
immediately.
When MC_MoveAdditive is executed,
the distance that the terminal actuator
Yes will travel is the set distance of
MC_MoveAdditive plus the
uncompleted distance left by
MC_MoveSuperimposed plus the
0(Abort) uncompleted distance left by the
position instruction in conjunction with
MC_MoveSuperimposed.
MC_MoveSuperimposed is aborted
immediately.
When MC_MoveAdditive is executed,
the terminal actuator will travel the
No
distance which is the sum of the
uncompleted distance left by
MC_MoveSuperimposed and the set
distance of MC_MoveAdditive.
The execution of
MC_MoveSuperimposed will continue.
No
MC_MoveAdditive will report an error
immediately.
11- 6 5
DVP-50MC Series Motion Controller Operation Manual
Programming Example 1
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Addt MC_MoveAdditive
Addt_BM MC_Buffer_Mode 0
Addt_Done BOOL
Addt_Bsy BOOL
Addt_Act BOOL
Addt_Abt BOOL
Addt_Err BOOL
Addt_ErrID WORD
11- 6 6
Chapter 11 Motion Control Instructions
Pwr
MC_ Power 1
Ax is 1 Axis St atus Pwr_Sta
Pwr_E n Enable Bus y Pwr_Bsy
11
True EnablePositive A ctive Pwr_Act
True EnableNegat iv e Error Pwr_Err
Pwr_B M BufferMode ErrorID Pwr_ErrI D
Addt
MC_Mov eAdditiv e 2
Ax is 1 Axis Done A ddt_Done
Addt_E x Exec ute Bus y Addt_Bsy
ContinuousUpdate A ctive Addt_Act
5000.0 Dis tance CommandA bort ed A ddt_Abt
500.0 Velocity Error A ddt_Err
20.0 Acc eleration ErrorID A ddt_ErrID
20.0 De celerat ion
20.0 J erk
Addt_ BM BufferMode
Veloc it y
500
12000
7000
2000
Time
Addt
Addt _Ex
Addt_ Done
Addt_Bs y
Addt_A ct
A ddt_Abt
Addt _Err
When Addt_Ex changes from FALSE to TRUE, the motion controller controls the motion of the servo
motor by taking current position as the reference point. Meanwhile, Addt_Bsy changes to TRUE and
one period later, Addt_Act changes to TRUE. After the set distance is reached by the servo motor,
Addt_Done changes from FALSE to TRUE and meanwhile Addt_Bsy and Addt_Act change from
TRUE to FALSE.
When Addt_Ex changes from TURE to FALSE, Addt_Done is reset.
When Addt_Ex changes from FALSE to TRUE again after the servo motor reaches the set distance,
the motion controller controls the motion of the servo motor and Addt_Done changes from FALSE to
TRUE once again after the servo motor reaches the set distance.
11- 6 7
DVP-50MC Series Motion Controller Operation Manual
Programming Example 2
Below is an example on the execution of two MC_MoveAdditive instructions in the same task list.
11
1 1. The variables and program
11- 6 8
Chapter 11 Motion Control Instructions
Pwr
MC_Power 1
Axis1 Axis St atus Pwr_Sta
Pwr_E n Enable Busy Pwr_Bsy
EnablePositive A ctive Pwr_Act
11
True
True EnableNegat ive Error Pwr_Err
Pwr_B M BufferMode ErrorID Pwr_ErrI D
Addt1
MC_MoveAdditive 2
Axis1 Axis Done A ddt1_Done
Addt1_ Ex Execute Busy Addt1_Bsy
ContinuousUpdate A ctive Addt1_Act
5000.0 Distance CommandA bort ed A ddt1_Abt
500.0 Velocity Error A ddt1_Err
20.0 Acceleration ErrorID A ddt1_ErrID
20.0 Decelera tion
20.0 Jerk
Addt1 _BM BufferMode
Addt2
MC_MoveAdditive 3
1 Axis Done A ddt2_Done
Addt2_ Ex Execute Busy Addt2_Bsy
ContinuousUpdate A ctive Addt2_Act
10000.0 Distance CommandA bort ed A ddt2_Abt
600.0 Velocity Error A ddt2_Err
15.0 Acceleration ErrorID A ddt2_ErrID
15.0 Decelera tion
15.0 Jerk
Ad dt2_BM BufferMode
11- 6 9
DVP-50MC Series Motion Controller Operation Manual
Velocity
600
11 500
1
Time
P osition
17000
3500
2000
Time
Addt1
Addt 1_Ex
Addt 1_Done
Addt1_Bsy
Addt1_A ct
A ddt1_Abt
A ddt1_Abt
Addt2
Addt 2_Ex
Addt2 _Done
Addt2_Bsy
Addt2_A ct
A ddt2_Abt
Addt 2 Err
When Addt1_Ex changes from FALSE to TRUE, the motion controller controls the motion of the
servo motor taking current position as the reference point. When Addt2_Ex changes from FALSE to
TRUE, Addt2_Bsy changes from FALSE to TRUE and one period later, the first MC_MoveAdditive
instruction is aborted and Addt1_Abt changes from FALSE to TRUE. Meanwhile, the servo motor
moves according to the parameters of the second MC_MoveAdditive instruction. Addt2_Done
changes from FALSE to TRUE when the servo motor completes the set distance which is the total
sum of the two set distances of the two instructions.
When Addt2_Ex changes from TRUE to FALSE, Addt2_Done is reset.
11- 7 0
Chapter 11 Motion Control Instructions
11.3.8 MC_MoveAbsolute
Input Parameters
Refer to Functions of
Specify the number of the When Execute
Section 2.2.
Axis axis which is to be USINT changes from
(The variable value
controlled FALSE to TRUE
must be set)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
ContinuousUpdate Reserved - - -
11- 7 1
DVP-50MC Series Motion Controller Operation Manual
11- 7 2
Chapter 11 Motion Control Instructions
way. When Execute changes from FALSE to TRUE again after the instruction execution is
completed, the instruction can be re-executed.
3. When the axis is a rotary axis, Position can be the value within the range of 0~the value of modulo
excluding the value of modulo. An error will occur in the instruction if the absolute value of Position
is greater than or equal to the value of modulo. The value of Position is irrelevant to the value of
modulo and it can be set to any constant if the axis is a linear axis. 11
4. Direction is valid only when the axis is the rotary axis. Refer to Direction in the following Function
section for more details on Direction.
5. Refer to section 10.2 for the relation among Position, Velocity, Acceleration and Jerk.
6. Refer to section 10.3 for details on BufferMode.
Output Parameters
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
TRUE when the axis is being controlled by the
Active BOOL TRUE / FALSE
instruction.
CommandAborted TRUE when the instruction execution is aborted. BOOL TRUE / FALSE
TRUE while there is an error in the execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please
ErrorID WORD
refer to section 12.2 for corresponding error codes.
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When Execute changes from TRUE to FALSE
after the instruction execution is done.
Done changes to TRUE when the instruction
When absolute positioning is execution is completed after Execute changes
Done
completed from TRUE to FALSE during the instruction
execution. One period later, Done changes to
FALSE.
11- 7 3
DVP-50MC Series Motion Controller Operation Manual
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When Execute changes from TRUE to FALSE.
CommandAborted is set to TRUE when the
11 When the instruction execution
instruction execution is aborted after Execute
1 CommandAborted is aborted by some other
changes from TRUE to FALSE during the
motion control instruction.
instruction execution. One period later,
CommandAborted changes to FALSE.
Ex ec ute
Done
B usy
Ac tive
Co mma ndAbo rt ed
Error
E rro r ID
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one period later,
Active changes to TRUE. When positioning is completed, Done changes to TRUE and
meanwhile, Busy and Active change to FALSE.
Case 2: When the instruction execution is aborted by some other motion instruction after Execute
changes from FALSE to TRUE, Abort changes to TRUE and meanwhile, Busy and Active
change to FALSE. When Execute changes from TRUE to FALSE, CommandAborted
changes to FALSE.
Case 3: When Execute changes from FALSE to TRUE and an error occurs such as axis alarm or
Offline, Error changes to TRUE and ErrorID shows the corresponding error code. And
Meanwhile, Busy and Active change to FALSE. Error changes to FALSE when Execute
changes from TRUE to FALSE.
Case 4: In the course of execution of the instruction, Done changes to TRUE when the instruction
execution is completed after Execute changes from TRUE to FALSE. Meanwhile, Busy and
Active change to FALSE and one period later, Done changes to FALSE.
11- 7 4
Chapter 11 Motion Control Instructions
Function
MC_MoveAbsolute is used to make the axis move to the specified absolute target position at the set
speed, acceleration and deceleration.
The start axis position is 10000 when MC_MoveAbsolute instruction is executed. The axis will move 11
reversely when Position >0 (5000). See the figure below when Position is 5000.
The axis will move reversely when Position<0 (-5000). See the figure below when Position is -5000.
10000 10000
5000
Targ et pos iti on
0 Time 0 Time
-5000
Target p os ition
Note: As long as MC_MoveAbsolute instruction which is being executed is aborted, its uncompleted
distance will be discarded and the new instruction will be executed.
11- 7 5
DVP-50MC Series Motion Controller Operation Manual
Direction
Direction is valid when the axis is a rotary axis and different motion directions of the axis are listed in the
following table based on different Direction value. (Modulo: 360)
11
Direction: 1 (Positive direction) Direction: 3 (Negative direction)
11- 7 6
Chapter 11 Motion Control Instructions
Programming Example 1
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Abs MC_MoveAbsolute
11- 7 7
DVP-50MC Series Motion Controller Operation Manual
Abs_Dir MC_DIRECTION 0
Abs_BM MC_Buffer_Mode 0
11
Abs_Done BOOL
1
Abs_Bsy BOOL
Abs_Act BOOL
Abs_Abt BOOL
Abs_Err BOOL
Abs_ErrID WORD
Pwr
MC_Power 1
Ax is 1 Axis S tatus P wr_Sta
Pwr_En Enable Busy Pwr_Bsy
True EnablePos itiv e Activ e Pwr_Act
True EnableNegative Error Pwr_Err
Pwr_BM Buffe rMode E rrorID Pwr_ErrID
Abs
MC_MoveAbs olute 2
Ax is1 Axis Done Abs_Done
Abs _Ex Ex ecute Busy Abs _Bs y
ContinuousUpdate Activ e Abs _Ac t
7000. 0 Pos it ion CommandAborted Abs_Abt
300. 0 Velocity Error Abs_Err
100. 0 Acc elerat ion ErrorID Abs_ErrID
100. 0 Deceleration
15. 0 Jerk
Abs _Dir Direc tio n
Abs _BM BufferMode
11- 7 8
Chapter 11 Motion Control Instructions
Veloc it y
300
11
Time
P osition
7000
2000
Time
Abs
Abs_Ex
Abs_Done
Abs _Bsy
Abs _Ac t
Abs_Abt
Abs _Err
When Abs_Ex changes from FALSE to TRUE, MC_MoveAbsolute instruction starts being
executed and at the moment, the current position of the axis is 2000 and target position is
7000.
The execution of the instruction is completed when the axis reaches 7000.
Programming Example 2
The example on how one MC_MoveAbsolute instruction aborts the execution of another
MC_MoveAbsolute instruction is shown below.
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
11- 7 9
DVP-50MC Series Motion Controller Operation Manual
Pwr_ErrID WORD
Abs1_BM MC_Buffer_Mode 0
Abs1_Done BOOL
Abs1_Bsy BOOL
Abs1_Act BOOL
Abs1_Abt BOOL
Abs1_Err BOOL
Abs1_ErrID WORD
Abs2_Dir MC_DIRECTION 0
Abs2_BM MC_Buffer_Mode 0
Abs2_Done BOOL
Abs2_Bsy BOOL
Abs2_Act BOOL
Abs2_Abt BOOL
Abs2_Err BOOL
Abs2_ErrID WORD
11- 8 0
Chapter 11 Motion Control Instructions
Pwr
MC_Power 1
Ax is 1 Axis S tatus P wr_Sta
Pwr_En Enable Busy Pwr_Bsy
True EnablePos itiv e Activ e Pwr_Act
True EnableNegative Error Pwr_Err 11
Pwr_BM Buff erMode E rrorID Pwr_ErrID
Abs1
MC_MoveAbs olute 2
Ax is1 Axis Done Abs1_Done
Abs 1_Ex Ex ecute Busy Abs 1_Bs y
ContinuousUpdate Activ e Abs 1_Ac t
7000. 0 Pos it ion CommandAborted Abs1_A bt
300. 0 Veloc ity Error Abs1_E rr
100. 0 Acc elerat ion ErrorID Abs1_E rrID
100. 0 Deceleration
15. 0 Jerk
Abs 1_Dir Direc tion
Abs 1_BM Buffe rMode
Abs2
MC_MoveAbs olute 3
1 Axis Done Abs2_Done
Abs 2_Ex Ex ecute Busy Abs 2_Bs y
ContinuousUpdate Activ e Abs 2_Ac t
13500. 0 Pos it ion CommandAborted Abs2_A bt
500. 0 Veloc ity Error Abs2_E rr
100. 0 Acc elerat ion ErrorID Abs2_E rrID
100. 0 Deceleration
15. 0 Jerk
Abs 2_Dir Direc tion
Abs 2_BM Buffe rMode
11- 8 1
DVP-50MC Series Motion Controller Operation Manual
Velocity
500
11
1
300
Time
Position
13500
4500
2000
Time
Abs1
Ab s1_Ex
Abs 1_Done
Abs 1_Bsy
Abs 1_Act
Abs1_Abt
Abs 1_Err
Abs2
Abs 2_Ex
Abs 2_Don e
Abs2_B sy
Abs 2_Act
A bs2_Abt
Abs 2 Err
When Abs1_Ex changes from FALSE to TRUE, the first MC_MoveAbsolute instruction starts
being executed and at the moment, the current position of the axis is 2000 and target position
is 7000.
When the axis reaches 4500, Abs2_Ex changes from FALSE to TRUE; the second
MC_MoveAbsolute instruction starts being executed and the first MC_MoveAbsolute
instruction is aborted with its output parameter Abs1_Abt changing to TRUE.
When the axis reaches 13500, the execution of the second MC_MoveAbsolute instruction is
completed and its output parameter Abs2_Done changes to TRUE.
11- 8 2
Chapter 11 Motion Control Instructions
11.3.9 MC_MoveSuperimposed
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions
Specify the number of the When Execute
of Section 2.2.
Axis axis which is to be USINT changes from
(The variable value
controlled. FALSE to TRUE
must be set)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
ContinuousUpdate Reserved - - -
Negative number,
The distance to When Execute
positive number and
Distance superimpose(Unit: LREAL changes from
0
Unit) FALSE to TRUE
(0)
When Execute
Specify the target velocity.
Velocity LREAL Positive number changes from
(Unit: Unit/second)
FALSE to TRUE
11- 8 3
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
(The variable value
11 must be set)
1 Specify the target Positive number When Execute
Acceleration acceleration rate. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE
Output Parameters
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE/FALSE
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
CommandAborted TRUE when the instruction is aborted. BOOL TRUE / FALSE
TRUE when an error occurs in execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please
ErrorID WORD -
refer to section 12.2 for the corresponding error ID.
Negative
The totally superimposed distance since the instruction number,
CoveredDistance LREAL
is started. positive number
and 0
11- 8 4
Chapter 11 Motion Control Instructions
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When Execute changes from
TRUE to FALSE after the
11
instruction execution is completed.
Done changes to TRUE when the
When the superimposed positioning is
Done instruction execution is completed
completed.
after Execute changes from TRUE
to FALSE during the instruction
execution. One cycle later, Done
changes to FALSE.
11- 8 5
DVP-50MC Series Motion Controller Operation Manual
Ex ec ute
11 Done
1 B usy
Ac tive
Co mma ndAbo rt ed
Error
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. One cycle later, Active
changes to TRUE. When the instruction execution is completed, Done changes to TRUE and
Busy and Active change to FALSE.
Case 2: When Execute changes to TRUE and the instruction is aborted by other instruction,
CommandAborted changes to TRUE and meanwhile, Busy and Active change to FALSE.
CommandAborted changes to FALSE when Execute changes from TRUE to FALSE.
Case 3: When an error occurs such as disabled axis as Execute is TRUE, Error changes to TRUE and
ErrorID shows corresponding error code. Meanwhile, Busy and Active change to FALSE. Error
changes to FALSE and the value of ErrorID is cleared to 0 when Execute changes from TRUE
to FALSE.
Case 4: Done changes to TRUE when the instruction execution is completed after Execute changes
from TRUE to FALSE during execution of the instruction. Meanwhile, Busy and Active change
to FALSE and one cycle later, Done changes to FALSE.
Function
The MC_MoveSuperimposed instruction controls the axis to independently superimpose the set
distance on the current motion state according to the set velocity, acceleration and deceleration.
11- 8 6
Chapter 11 Motion Control Instructions
2. If MC_MoveSuperimposed instruction is executed when the axis is in Standstill state, the execution
effect of MC_MoveSuperimposed instruction is equivalent to that of MC_MoveRelative instruction.
3. Execute another motion instruction excluding MC_MoveSuperimposed and MC_HaltSuperimposed
instructions when MC_MoveSuperimposed instruction and one motion instruction jointly control the 11
axis. If the Buffermode value of the lately executed motion instruction is 0, both of the
MC_MoveSuperimposed instruction and the previously executed motion instruction will be aborted.
If the Buffermode value of the lately executed motion instruction is another number except 0, the
MC_MoveSuperimposed instruction and the previously executed motion instruction will not be
aborted.
4. If another MC_MoveSuperimposed instruction is executed when one MC_MoveSuperimposed
instruction and another motion instruction jointly control the axis, the previous
MC_MoveSuperimposed instruction will be aborted but other motion instruction will not be affected.
5. If another MC_MoveSuperimposed instruction is executed when one MC_MoveSuperimposed
instruction controls the axis independently, the previous MC_MoveSuperimposed instruction will be
aborted.
6. If the MC_HaltSuperimposed instruction is executed in the course of execution of
MC_MoveSuperimposed instruction, the MC_MoveSuperimposed instruction will be aborted.
7. MC_MoveSuperimposed can be executed on the slave axis specified by MC_GearIn instruction and
MC_ CamIn instruction.
Programming Example 1
The programming example is as follows when one MC_MoveSuperimposed instruction is used.
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
11- 8 7
DVP-50MC Series Motion Controller Operation Manual
Sup MC_MoveSuperimposed
Sup_Act BOOL
Sup_Abt BOOL
Sup_Err BOOL
Sup_ErrID WORD
Sup_Distan LREAL
Pwr
MC_Power 1
Axis1 Axis Status Pwr_St a
Pwr_En Enable Busy Pwr_Bsy
True EnablePosit ive Act ive Pwr_Act
True EnableNegative Error P wr_Err
Pwr_BM Buff erMode ErrorID P wr_ErrID
Sup
MC_MoveSuperimposed 2
A xis1 Axis Done Sup _Done
Sup_Ex Execute Busy Sup_Bsy
ContinuousUpdat e Act ive Sup_Act
5 000.0 Distance CommandAborted Sup _Abt
300.0 Velocity Error Sup _Err
100.0 Accelerat ion E rrorID Sup _ErrID
100.0 Deceleration CoveredDistance Sup _Dist an
15.0 Jerk
11- 8 8
Chapter 11 Motion Control Instructions
Veloc it y
300
11
Pos it ion Time
12000
7000
2000
Time
Sup
Sup_Ex
Sup_Done
Sup_B sy
Sup_Ac t
Sup_Abt
Sup_ Err
When Sup_Ex changes to TRUE, Sup_Bsy changes to TRUE. One cycle later, Sup_Act
changes to TRUE and the motion controller controls the servo motor to run by using current
position as the reference point.
After the servo motor completes the superimposed positioning, Sup_Done changes to TRUE
and meanwhile Sup_Bsy and Sup_Act change to FALSE.
11- 8 9
DVP-50MC Series Motion Controller Operation Manual
Programming Example 2
Below is the example that MC_MoveSuperimposed and MC_MoveRelative instructions are matched.
11 1. The variable table and program
1
Variable name Data type Initial value
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Rel MC_MoveRelative
Rel_Done BOOL
Rel_Bsy BOOL
Rel_Act BOOL
Rel_Abt BOOL
Rel_Err BOOL
Rel_ErrID WORD
Sup MC_MoveSuperimposed
Sup_Done BOOL
Sup_Bsy BOOL
Sup_Act BOOL
Sup_Abt BOOL
Sup_Err BOOL
Sup_ErrID WORD
Sup_Distan LREAL
11- 9 0
Chapter 11 Motion Control Instructions
Pwr
MC_P ower 1
Axis1 Axis St atus Pwr_Sta
Pwr_E n Enable Busy Pwr_Bsy
True EnablePositive Active Pwr_Act 11
True EnableNegat ive Error Pwr_Err
Pwr_BM BufferMode ErrorID Pwr_ErrI D
Rel
MC_MoveRelative 2
Axis1 Axis Done Rel_Done
Rel_Ex Execute Busy Rel_Bsy
ContinuousUpdate Active Rel_Act
10000.0 Distance CommandA bort ed Rel_Abt
600.0 Velocity Error Rel_Err
100.0 Acceleration ErrorI D Rel_ErrID
100.0 Decelerat ion
15.0 Jerk
BufferMode
Sup
MC_MoveS uperimposed 3
Axis1 Axis Done Sup_Done
Sup_E x Execute Busy Sup_Bsy
ContinuousUpdate Active Sup_Act
5000.0 Distance CommandA bort ed Sup_Abt
500.0 Velocity Error Sup_Err
90.0 Acceleration ErrorI D Sup_ErrID
90.0 Decelerat ion CoveredDistance Sup_Distan
15.0 Jerk
11- 9 1
DVP-50MC Series Motion Controller Operation Manual
Velocity
11 1100
1 600
Time
Position
17 000
2 000
Time
Rel
Rel_Ex
Rel_Done
Rel_Bsy
Rel_Act
Rel_Abt
Sup
Sup_Ex
Sup_Done
Sup _Bsy
Sup_A ct
Sup Abt
When Rel_Ex changes to TRUE, Rel_Bsy changes to TRUE. One period later, Rel_Act
changes to TRUE and the motion controller controls the servo motor rotation by using the
current position as the reference point.
When Sup_Ex changes to TRUE, Sup_Bsy changes to TRUE. One cycle later, Sup_Act
changes to TRUE and the the MC_MoveSuperimposed instruction starts to control the axis.
The velocity and acceleration (0 at the moment) for the servo motor are the sums of the
velocities and accelerations of the two instructions respectively.
When Rel_Ex changes to FALSE, Rel_Done changes to FALSE. When Sup_Ex changes to
FALSE, Sup_Done changes to FALSE.
11- 9 2
Chapter 11 Motion Control Instructions
11.3.10 MC_HaltSuperimposed
MC_HaltSuperimpos ed_instanc e
MC_Halt Superimpos ed
Ax is Done
Ex ecut e Busy
Deceleration Ac tiv e
Jerk CommandAborted
Error
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions
Specify the number of the When Execute
of Section 2.2.
Axis axis which is to be USINT changes from
(The variable value
controlled. FALSE to TRUE
must be set)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
11- 9 3
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
11
Busy TRUE when the instruction is being executed. BOOL TRUE/FALSE
1
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
CommandAborted TRUE when the instruction is aborted. BOOL TRUE / FALSE
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
11- 9 4
Chapter 11 Motion Control Instructions
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
CommandAborted changes to
FALSE.
Ex ec ute
Done
B usy
Ac tive
Co mma ndAbo rt ed
Error
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. One cycle later,
Active changes to TRUE. When the instruction execution is completed, Done changes to
TRUE and Busy and Active change to FALSE.
Case 2: When Execute changes to TRUE and the instruction is aborted by other instruction,
CommandAborted changes to TRUE and meanwhile, Busy and Active change to FALSE.
CommandAborted changes to FALSE when Execute changes from TRUE to FALSE.
Case 3: When an error occurs such as axis disabled as Execute is TRUE, Error changes to TRUE and
ErrorID shows corresponding error code. Meanwhile, Busy and Active change to FALSE.
Error changes to FALSE when Execute changes from TRUE to FALSE.
Case 4: Done changes to TRUE when the instruction execution is completed after Execute changes
from TRUE to FALSE in the course of execution of the instruction. Meanwhile, Busy and
Active change to FALSE and one cycle later, Done changes to FALSE.
Function
11- 9 5
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The programming example is as follows when one MC_HaltSuperimposed instruction is used.
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Rel MC_MoveRelative
Rel_Done BOOL
Rel_Bsy BOOL
Rel_Act BOOL
Rel_Abt BOOL
Rel_Err BOOL
Rel_ErrID WORD
Sup MC_MoveSuperimposed
Sup_Done BOOL
Sup_Bsy BOOL
Sup_Act BOOL
Sup_Abt BOOL
11- 9 6
Chapter 11 Motion Control Instructions
Sup_Err BOOL
Sup_ErrID WORD
Sup_Distan LREAL
11
HltSup MC_HaltSuperimposed
HltSup_Done BOOL
HltSup_Bsy BOOL
HltSup_Act BOOL
HltSup_Abt BOOL
HltSup_Err BOOL
HltSup_ErrID WORD
11- 9 7
DVP-50MC Series Motion Controller Operation Manual
Pwr
MC_Power 1
Axis1 Ax is Status Pwr_S ta
P wr_En En able Busy Pwr_Bs y
11
True En ablePos itiv e Ac tiv e Pwr_Ac t
True En ableNegative Error Pwr_Err
1 P wr_BM B ufferMode ErrorID Pwr_ErrID
Rel
MC_MoveRelat iv e 2
Axis1 Ax is Done Rel_Do ne
Rel_Ex Ex ecut e Busy Rel_Bsy
Cont inuous Update Ac tiv e Rel_Act
10000.0 Distanc e CommandAborted Rel_Abt
500.0 Veloc it y Error Rel_Err
100.0 Ac celeration ErrorID Rel_ErrI D
100.0 Dec eleration
15.0 Jerk
B ufferMode
Sup
MC_MoveSuperimposed 3
Axis1 Ax is Done Sup_Don e
Sup_Ex Ex ecut e Busy Sup_Bsy
Cont inuous Update Ac tiv e Sup_Act
5000.0 Distanc e CommandAborted Sup_Abt
600.0 Veloc it y Error Sup_Err
90.0 Ac celeration ErrorID Sup_ErrI D
90.0 Dec eleration Cov eredDistanc e Sup_Dis tan
15.0 Jerk
Hlts up
MC_Halt Superimpos ed 4
A xis1 Ax is Done HltSup_Done
HltSup_Ex Ex ecut e Busy HltSup_Bsy
80.0 Dec eleration Ac tiv e HltSup_Act
15.0 Jerk CommandAborted HltSup_Abt
Error HltSup_Err
ErrorID HltSup_ErrID
11- 9 8
Chapter 11 Motion Control Instructions
Velocit y
1100
11
500
Time
Rel
Rel_Ex
Rel_Done
Rel_Bsy
Rel_ Act
Rel_A bt
S up
Sup_Ex
Sup_Done
Sup_Bsy
Sup_A ct
Sup_Abt
HltSup
HltSup_Ex
HltSup_Done
Hlt Sup_Bsy
HltSup _Act
Hlt Sup_Abt
When Rel_Ex changes to TRUE, Rel_Bsy changes to TRUE. One cycle later, Rel_Act
changes to TRUE and the motion controller controls the servo motor rotation by using the
current position as the reference point. When Sup_Ex changes to TRUE, Sup_Bsy changes to
TRUE. One cycle later, Sup_Act changes to TRUE, the execution of the
MC_MoveSuperimposed instruction starts and the velocities and accelerations (0 at the
moment) for the servo motor will be added up respectively.
When Hltsup_Ex changes to TRUE, Hltsup_Bsy changes to TRUE. One cycle later,
Hltsup_Act changes to TRUE, the execution of the MC_HaltSuperimposed instruction starts,
the MC_MoveSuperimposed instruction is aborted and Sup_Bsy and Sup_Act change to
FALSE and meanwhile, Sup_Abt changes to TRUE. The execution of the
MC_MoveSuperimposed instruction is halted by the MC_HaltSuperimposed instruction.
11- 9 9
DVP-50MC Series Motion Controller Operation Manual
11.3.11 MC_SetPosition
MC_S etPosition_instanc e
MC_SetP osition
Ax is Done
Ex ecut e Busy
Pos ition Erro r
Relative ErrorID
Referenc eType
Ex ecut ionMode
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions of
Specify the number of When Execute
Section 2.2.
Axis the axis which is to be USINT changes from
(The variable value
controlled FALSE to TRUE
must be set)
The instruction is
executed when TRUE or FALSE
Execute BOOL -
Execute changes from (FALSE)
FALSE to TRUE.
0: mcCommand
MC_ When Execute
Specify the position Position
ReferenceType ReferenceType changes from
type for reference. 1: mcActual Position
FALSE to TRUE
(0)
ExecutionMode Reserved
11- 1 00
Chapter 11 Motion Control Instructions
Output Parameters
Parameter
Function Data type Valid range
name
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
When Execute changes from TRUE to
FALSE after the instruction execution is
finished.
Done changes to TRUE when the
Done When positioning is completed instruction execution is completed after
Execute changes from TRUE to FALSE
during the instruction execution. One
period later, Done changes to FALSE.
When Done changes to TRUE.
Busy When Execute changes to TRUE
When Error changes to TRUE.
Case 1 Cas e2
E xec ute
Done
Bus y
E rro r
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one period
later, Done changes to TRUE and meanwhile, Busy changes to FALSE.
11- 1 01
DVP-50MC Series Motion Controller Operation Manual
Case 2: When an error occurs as Execute is TRUE, Error changes to TRUE and ErrorID shows
the corresponding error code. And meanwhile, Busy changes to FALSE. Error changes to
FALSE when Execute changes from TRUE to FALSE.
11
1
Function
MC_SetPosition is used to set the position of the axis to a given value and no actual motion of the axis
is incurred. MC_SetPosition execution does not affect the current motion. However, it has an impact on
the actual execution effect of the instruction which is executed after MC_SetPosition execution is
completed.
Po sition
6000
5000
Relative is used to define the relationship between Position and reference position. When Relative
is set to TRUE, it is a relative relationship between Position and reference position and the position
setting value= reference position+ Position. When Relative is FALSE, it is an absolute relationship
between Position and reference position and the position setting value equals Position.
As shown in the following figures, the reference position is set to10000 and the value of Position is
6000 for the instruction execution. The corresponding execution results are respectively illustrated
for different Relative values as below.
11- 1 02
Chapter 11 Motion Control Instructions
After e xecuti on
16 000 11
Before execution
10 000 10 000
Befor e e xe cuti on
6000
Afte r e xe cuti on
0 Time 0 Time
ReferenceType
ReferenceType is used to select the command position or actual position as the reference position.
When ReferenceType is 0, the reference position is the command position of the axis. When
ReferenceType is 1, the reference position is the actual position of the axis.
When the command position is taken as the reference position, the instruction calculates the target
command position based on the current command position and the value of Position and it revises the
command position value into the target position value. Meantime, the actual position of the axis will
change accordingly. The law of the change is that the variation amount of the actual position is the
same as that of the command position. That is to say that the deviation between the command position
and actual position remains unchanged at the time when the instruction is executed and the instruction
execution ends.
The solution for the actual position which is taken as the reference position is the same as that for the
command position which is taken as the reference position.
There will be no difference in execution effect between the command position and actual position as
the reference position if the axis is in Standstill state as MC_SetPosition is executed. That is because
the difference is 0 between command position and actual position as the axis is still.
The differences in execution effect between command position and actual position as the reference
position exist as illustrated below if the axis is in motion as MC_SetPosition is executed. If not zero, the
difference between command position and actual position is caused by the command response time.
When MC_SetPosition is executed in absolute mode with Position set to 6000 while the axis is
positioning with the target position of 5000, the command position and actual position of the axis are
3000 and 2300 respectively (difference value △P =700). The command position changes to 6000 and
actual position becomes 5300 (5300=6000-△P) after the instruction is executed if the reference position
is the command position as the following left figure shows.
The actual position of the axis changes to 6000 and command position becomes 6700
(6700=6000+△P) after the instruction is executed if the reference position is the actual position as the
following right figure shows.
11- 1 03
DVP-50MC Series Motion Controller Operation Manual
Po si tio n=60 00
Rel ati ve =FALSE
3000 3000
P P
2300 2300
1000 1000
0 Time 0 Time
Different axis types are applicable to different reference types as shown in the following table.
Reference Type
Axis type
Command Position Actual Position
Real axis YES YES
Programming Example 1
The following example shows the impact of MC_SetPosition execution on the positioning instruction
when Relative of MC_SetPosition instruction is TRUE.
Rel MC_MoveRelative
11- 1 04
Chapter 11 Motion Control Instructions
Axis1 USINT 1
Rel_Done BOOL
11
Rel_Bsy BOOL
Rel_Act BOOL
Rel_Abt BOOL
Rel_Err BOOL
Rel_ErrID WORD
Tn TON
SRe SR
SRe_Q BOOL
SetPos SetPosition
SetPos_Done BOOL
SetPos_Bsy BOOL
SetPos_Err BOOL
SetPos_ErrID WORD
11- 1 05
DVP-50MC Series Motion Controller Operation Manual
Rel
MC_MoveRelative 1
Axis1 Axis Done Rel_Done
Rel_Ex Execute Busy Rel_Bsy
11 10000.0
ContinuousUpdate
Distance CommandAborted
Active Rel_Act
Rel_Abt
1 3000.0 Velocity Error Rel_Err
3000.0 Acceleration ErrorID Rel_ErrID
3000.0 Deceleration
3000.0 Jerk
BufferMode
Tn S Re
T ON 2 SR 3
True EN E NO EN ENO
Tn_In In Q SE T Q S Re_Q
3000 PT ET Reset
SetPos
MC_SetPosition 4
Axis1 Axis Done SetPos_Done
SetPos_Ex Execute Busy SetPos_Bsy
5000.0 Position Error SetPos_Err
True Relative ErrorID SetPos_ErrID
SetPos_RefTp ReferenceType
ExecutionMode
3000
Time
Position
15000
11000
6000
Rel Time
Rel_Ex
Rel_Done
Rel_B sy
Rel_Act
Rel_A bt
Rel_Err
SetP os
SetPos _Ex
SetPos _Done
SetPos _Bs y
S etPos E rr
11- 1 06
Chapter 11 Motion Control Instructions
The command position is 6000 as MC_SetPosition starts being executed and 11000
(11000=6000+5000) after the instruction execution ends. The position is 15000 as 11
MC_MoveRelative execution ends.
MC_SetPosition does not affect the motion which is being performed through observing the
above velocity change curve.
Programming Example 2
The following example describes the impact of MC_SetPosition execution on the axis position when
Relative of MC_SetPosition instruction is FALSE (the absolute mode is chosen for MC_SetPosition).
Rel MC_MoveRelative
Axis1 USINT 1
Rel_Done BOOL
Rel_Bsy BOOL
Rel_Act BOOL
Rel_Abt BOOL
Rel_Err BOOL
Rel_ErrID WORD
Tn TON
SRe SR
SRe_Q BOOL
SetPos SetPosition
SetPos_RefTp MC_REFERECNETYPE 0
SetPos_Done BOOL
SetPos_Bsy BOOL
SetPos_Err BOOL
SetPos_ErrID WORD
11- 1 07
DVP-50MC Series Motion Controller Operation Manual
Rel
11 MC_MoveRelative 1
Axis1 Axis Done Rel_Done
1 Rel_Ex Execute Busy Rel_Bsy
ContinuousUpdate Active Rel_Act
10000.0 Distance CommandAborted Rel_Abt
3000.0 Velocity Error Rel_Err
3000.0 Acceleration ErrorID Rel_ErrID
3000.0 Deceleration
3000.0 Jerk
BufferMode
Tn S Re
TON 2 SR 3
True EN EN O EN EN O
Tn_In In Q SE T Q S Re_Q
3000 PT ET Reset
SetPos
MC_SetPosition 4
Axis1 Axis Done SetPos_Done
SetPos_Ex Execute Busy SetPos_Bsy
4000.0 Position Error SetPos_Err
False Relative ErrorID SetPos_ErrID
SetPos_RefTp ReferenceType
ExecutionMode
11- 1 08
Chapter 11 Motion Control Instructions
Velocity
3000
11
Time
P osition
8000
6000
4000
Rel Time
Rel_Ex
Rel_Done
Rel_Bsy
Rel_Act
Rel_Abt
Rel_Err
SetPos
SetPos_Ex
SetPos_Done
SetPos_Bsy
S etPos E rr
As Rel_Ex changes from FALSE to TRUE, MC_MoveRelative instruction execution starts and
MC_SetPosition is executed 3 seconds later after MC_MoveRelative is executed.
The command position is 6000 as MC_SetPosition starts being executed and 4000 after the
instruction execution is completed. The position is 8000 as MC_MoveRelative execution ends.
MC_SetPosition does not affect the motion which is being performed through observing the
above velocity change curve.
Programming Example 3
The following example shows how MC_SetPosition execution affects MC_MoveAbsolute instruction
which is being executed. The actual execution effect of MC_MoveAbsolute which is being executed is
not be impacted by MC_SetPosition.
11- 1 09
DVP-50MC Series Motion Controller Operation Manual
Abs MC_MoveAbsolute
Axis1 USINT 1
11
Abs_Ex BOOL FALSE
1
Abs_Dir MC_DIRECTION 1
Abs_Done BOOL
Abs_Bsy BOOL
Abs_Act BOOL
Abs_Abt BOOL
Abs_Err BOOL
Abs_ErrID WORD
Tn TON
SRe SR
SRe_Q BOOL
SetPos SetPosition
SetPos_RefTp MC_REFERECNETYPE 0
SetPos_Done BOOL
SetPos_Bsy BOOL
SetPos_Err BOOL
SetPos_ErrID WORD
11- 11 0
Chapter 11 Motion Control Instructions
Abs
MC_MoveAbsolute 1
Axis1 Axis Done Abs_Done
Abs_Ex Execute Busy Abs_Bsy 11
ContinuousUpdate Active Abs_Act
10000.0 Position CommandAborted Abs_Abt
3000.0 Velocity Error Abs_Err
3000.0 Acceleration ErrorID Abs_ErrID
3000.0 Deceleration
3000.0 Jerk
Abs_Dir Direction
BufferMode
Tn S Re
TON 2 SR 3
True EN EN O EN EN O
Tn_In In Q SE T Q S Re_Q
3000 PT ET Reset
SetPos
MC_SetPosition 4
Axis1 Axis Done SetPos_Done
SetPos_Ex Execute Busy SetPos_Bsy
5000.0 Position Error SetPos_Err
True Relative ErrorID SetPos_ErrID
SetPos_RefTp ReferenceType
ExecutionMode
11- 111
DVP-50MC Series Motion Controller Operation Manual
Velocity
11 3000
Time
Position
15000
11000
6000
Abs Time
Abs_Ex
Abs_Done
Abs_B sy
Abs_Act
Abs_Abt
Abs_Err
SetP os
SetPos_Ex
SetPos_Done
SetPos_Bsy
S etPos E rr
The command position is 6000 as MC_SetPosition starts being executed and 11000 after the
instruction execution is completed. The position is 15000 as MC_MoveAbsolute execution
ends.
It can be seen that MC_SetPosition does not affect the actual execution effect of
MC_MoveAbsolute which is being executed through observing the above velocity change
curve.
11- 11 2
Chapter 11 Motion Control Instructions
11.3.12 MC_SetOverride
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions
Specify the number of the
of Section 2.2. When Enable
Axis axis which is to be USINT
(The variable changes to TRUE
controlled.
value must be set)
The instruction is
executed when Enable TRUE or FALSE
Enable BOOL -
changes from FALSE to (FALSE)
TRUE.
AccFactor Reserved - - -
JerkFactor Reserved - - -
Output Parameters
Enabled TRUE when the instruction is controlling the axis. BOOL TRUE / FALSE
11- 11 3
DVP-50MC Series Motion Controller Operation Manual
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When Enable changes to FALSE.
11 Enabled When the instruction starts.
When Error changes to TRUE.
1
When Enable changes to FALSE.
Busy When Enable is TRUE.
When Error changes to TRUE.
Ca se 1 Cas e 2 Cas e 3
E nable
E nabled
Bu sy
Error
E rror ID
Case 1: When Enable changes from FALSE to TRUE, Busy changes to TRUE. Enabled changes
to TRUE when the instruction execution is completed.
Case 2: When Enable changes from TRUE to FALSE, Enabled and Busy change to FALSE.
Case 3: When an error occurs after Enable changes from FALSE to TRUE, Error changes to TRUE
and ErrorID shows corresponding error code. Meanwhile, Enabled and Busy change to
FALSE. Error changes to FALSE when Enable changes from TRUE to FALSE.
Function
11- 11 4
Chapter 11 Motion Control Instructions
MC_MoveAbsolute(Absolute MC_MoveRelative(Relative
positioning) positioning)
MC_MoveAdditive(Additive MC_MoveVelocity(Velocity
positioning) instruction) 11
MC_MoveSuperimposed
(Superimposed positioning)
6. An error will occur when the target velocity after modification exceeds the maximum velocity in axis
parameters.
7. If VelFactor value is set to 0, the target velocity changes to 0, the axis decelerates till the velocity is
0. If the axis operation state need be kept and axis operation need pause, set VelFactor value to 0.
At the moment, the axis state will not change.
8. When motion instructions are executed or buffered, the VelFactor value can be modified to set the
new target velocity.
9. If VelFactor value is modified when Enable is TRUE, the value will be effective immediately without
restarting the MC_SetOverride instruction.
10. If VelFactor value is modified when Enable is TRUE and VelFactor value exceeds the valid range,
an error will occur in MC_SetOverride and the target velocity will return to that as VelFactor value is
100%.
11. When Enable changes to FALSE, the axis will accelerate or decelerate by taking VelFactor=100 as
the target.
12. If another MC_SetOverride instruction is started while one MC_SetOverride instruction is being
executed on the axis, the execution result of the later executed MC_SetOverride instruction will be
regarded as the reference result. The Enabled of the two instructions is TRUE.
13. If the MC_SetOverride instruction is used in the course of execution of the MC_MoveVelocity
instruction, InVelocity remains TRUE even if MC_SetOverride is executed after Invelocity of
MC_MoveVelocity changes to TRUE.
11- 11 5
DVP-50MC Series Motion Controller Operation Manual
Programming Example
The example of how MC_MoveVelocity is affected by the execution of the MC_SetOverride instruction
11 is described as below.
1 1. The variable table and program
SetOv MC_SetOverride
Axis1 USINT 1
SetOv_Ena BOOL
SetOv_Bsy BOOL
SetOv_Err BOOL
SetOv_ErrID WORD
Vel MC_MoveVelocity
Vel_Dir MC_DIRECTION 1
Vel_Invel BOOL
Vel_Bsy BOOL
Vel_Act BOOL
Vel_Abt BOOL
Vel_Err BOOL
Vel_ErrID WORD
SetOv
MC_SetO verride 1
Axis1 A xis Enabled SetO v_Ena
Set Ov_E n Enable Busy SetOv_Bsy
SetO v_Velf VelFactor Error SetO v_Err
A ccFactor ErrorI D SetO v_ErrID
JerkFactor
Vel
MC_Mo veVelocit y 2
Axis1 A xis Invelocity Vel_I nvel
Vel_Ex Execute Busy Vel_Bsy
ContinuousUpdate Active Vel_Act
10000.0 Velocity CommandAborte d Vel_A bt
10000.0 A cce leration Error Vel_E rr
10000.0 Decelerat ion ErrorI D Vel_E rrID
10000.0 Jerk
Vel_Dir Direction
BufferMode
11- 11 6
Chapter 11 Motion Control Instructions
Velocit y
20000
11
15000
10000
5000
Time
Vel
Vel_Ex
Vel_Invel
Vel_Bsy
Vel_A ct
Vel_Abt
Vel_Err
SetOv
SetOv_En
SetOv_Velf 150 50 200
SetOv_Ena
SetOv_Bsy
SetO v Err
When Vel_Ex changes to TRUE, Vel_Bsy changes to TRUE. One cycle later, Vel_Act
changes to TRUE and the axis starts to run forward. When the target velocity is not reached
(Vel_Invel is not TRUE), SetOv_En is set to TRUE, MC_SetOverride is effective and the target
velocity of MC_MoveVelocity changes to the new target velocity. When the new target velocity
of MC_MoveVelocity is reached, Vel_Invel changes to TRUE. After Vel_Invel changes to
TRUE, Vel_Invel remains TRUE even if VelFactor value (SetOv_Velf) is modified.
When SetOv_En changes to FALSE, it means the axis starts to decelerate with the velocity of
when Vel_Invel value is 100 as the target velocity.
SetOv_Velf value will come to effect immediately if SetOv_Velf value is modified in the course
of execution of MC_SetOverride. And the target velocity of MC_MoveVelocity will change
accordingly.
11- 11 7
DVP-50MC Series Motion Controller Operation Manual
11.3.13 MC_Reset
MC_Reset_inst ance
MC_Reset
Ax is Done
Ex ecut e Busy
Erro r
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions of
Specify the number of When Execute
Section 2.2.
Axis the axis which is to be USINT changes from
(The variable value
controlled. FALSE to TRUE
must be set)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 11 8
Chapter 11 Motion Control Instructions
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
Case 1 Ca se 2
E xec ute
Done
Bus y
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. When the instruction
execution is completed, Done changes to TRUE and Busy changes to FALSE. When Execute
changes to FALSE, Done changes to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
When Execute changes from TRUE to FALSE, Error changes to FALSE and the value of ErrorID
is cleared to 0.
Function
MC_Reset clears the error state and axis alarm information about the real axis or virtual axis inside
the motion controller. The axis state can be observed via MC_ReadStatus.The MC_Reset instruction
can be executed to clear the errors when the axis configured in the motion controller enters the
ErrorStop state. The instruction can be executed no matter whether the axis enters the ErrorStop
state or not. When the errors such as axis alarms, axis offline or state machine switch problems
11- 11 9
DVP-50MC Series Motion Controller Operation Manual
occur, the axis enters the ErrorStop state and the motion instructions which are being executed stop.
When the axis alarms, the execution of the instruction can clear the axis alarm information. After the
execution of MC_Reset instruction is completed, the axis state will be determined by MC_Power
11 instruction and the axis will be in Disabled or Standstill state.
1 Refer to chapter 9 for explanation of axis states.
After the axis alarm occurs, excluding the alarm which occurs when the axis meets the limit swtich in
the course of homing, the alarm axis enters the ErrorStop state inside the motion controller. The axis
alarm can be eliminated if Done is TRUE after the instruction is executed. If Error is TRUE, the axis
alarm cannot be eliminated and users should check if the cause of the error still exists.
Programming Example
When ReadSt_En is TRUE, the MC_ReadStatus instruction will detect the status of axis 1. When axis 1
enters the ErrorStop state due to axis offline or alarm, ErrorStop of the MC_ReadStatus instruction will
change to TRUE and the MC_Reset instruction will be executed.
ReadSt MC_ReadStatus
Axis1 USINT 1
ReadSt_Vald BOOL
ReadSt_Bsy BOOL
ReadSt_Err BOOL
ReadSt_ErrID WORD
ReadSt_Disbl BOOL
ReadSt_Stpin BOOL
ReadSt_Homi BOOL
ReadSt_Stans BOOL
ReadSt_Dism BOOL
ReadSt_Conm BOOL
ReadSt_Sym BOOL
Rset MC_Reset
Rset_Done BOOL
11- 1 20
Chapter 11 Motion Control Instructions
Rset_Bsy BOOL
Rset_Err BOOL
Rset_ErrID WORD
11
ReadSt
MC_ReadStat us 1
Axis1 A xis Valid ReadS t_Vald Rset
ReadSt_E n Enable Busy ReadSt_Bs y A ND 2 MC_Reset 3
Error ReadS t_Err TRUE EN ENO Axis1 Ax is Done Rset _Done
ErrorI D ReadS t_ErrID AND1_In1 In1 Ou t Ex ecut e Busy Rset_Bsy
ErrorStop I n2 Error Rset _Err
Dis abled ReadS t_Dis bl ErrorID Rset _ErrI D
S topping ReadS t_Stopi
Homing ReadS t_Homi
S tandst ill ReadS t_Stans
Disc reteMotio n ReadS t_Dis m
Cont inuous Motio n ReadS t_Conm
Sync Motio n ReadS t_Sym
2. Timing Chart
ReadSt_E n
ReadSt_Valid
ReadSt_B sy
ReadSt_E rrStp
ReadSt _Stans
AND_In1
Rset _Done
Rset_B sy
When ReadSt_En changes from FALSE to TRUE after the servo axis is enabled,
ResdSt_Vald and ResdSt_Bsy change to TRUE and the axis is in Standstill state.
AND_In1 is set from FALSE to TRUE when the axis enters the ErrorStop state and MC_Reset
is executed. Rset_Busy is TRUE in the first cycle and Rset_Done is TRUE in the second
cycle. Meanwhile, the axis enters the Standstill state from the ErrorStop state.
11- 1 21
DVP-50MC Series Motion Controller Operation Manual
11.3.14 DMC_SetTorque
1 FB The servo axis will work under the torque mode when DVP50MC11P/DVP50MC11P-06
the instruction is executed. DVP50MC11T-04S/DVP50MC11T-16S
DMC_S etTorque_instan ce
DMC_Set Torque
Axis InTorque
Enable Busy
TargetTorque Act ive
CommandAborted
Erro r
ErrorI D
Input Parameters
Refer to Functions
Specify the number of the axis of Section 2.2. When Enable
Axis USINT
which is to be controlled. (The variable changes to TRUE
value must be set)
11- 1 22
Chapter 11 Motion Control Instructions
2. When Enable is TRUE, the instruction is always valid and the torque changes accordingly as the
torque value is modified. The instruction cannot be aborted by other instructions excluding
MC_Stop. When Enable of the instruction is reset to FALSE, the instruction execution stops and
other instruction can be executed.
11
Output Parameters
InTorque TRUE when the target torque is reached. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed.该 BOOL TRUE / FALSE
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
11- 1 23
DVP-50MC Series Motion Controller Operation Manual
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
Ca se 1 Case 2 Cas e 3
E nable
I nTorque
Bus y
A ct iv e
Co mma ndAbo rt ed
Error
Error ID
Case 1: When Enable changes from FALSE to TRUE, Busy changes to TRUE in the same cycle.
Active changes to TRUE in the next cycle and InTorque changes to TRUE in the 3rd cycle.
When Enable changes from TRUE to FALSE, Busy, Active and InTorque change to FALSE in
the same cycle.
Case 2: When the DMC_SetTorque instruction is aborted by MC_Stop after Enable changes from
FALSE to TRUE, CommandAborted changes to TRUE and meanwhile, InTorque, Busy and
Active change to FALSE. When Enable changes from TRUE to FALSE, CommandAborted
changes to FALSE.
Case 3: The input parameter value is illegal such as the axis number: 0 before the DMC_SetTorque
instruction is executed. Busy changes to TRUE when Enable changes from FALSE to TRUE.
One cycle later, Error changes to TRUE, Busy changes to FALSE and ErrorID shows
corresponding error codes. When Enable changes from TRUE to FALSE, Error changes from
TRUE to FALSE and the content of ErrorID is cleared to 0.
Function
DMC_SetTorque sets the torque of the servo axis. The servo axis will work under the torque mode
when the instruction is executed.
Programming Example
The example of executing the DMC_SetTorque instruction is decribed as follows.
11- 1 24
Chapter 11 Motion Control Instructions
Pwr MC_Power
11
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
SetTq DMC_SetTorque
SetTq_InTorque BOOL
SetTq_Bsy BOOL
SetTq_Act BOOL
SetTq_Abt BOOL
SetTq_Err BOOL
SetTq_ErrID WORD
Pwr
MC_Power 1
Ax is 1 Axis S tatus P wr_Sta
True Enable Bus y Pwr_Bsy
True EnablePositive Active Pwr_Act
Tru e EnableNegativ e E rror Pwr_Err
Pwr_BM BufferMode ErrorID Pwr_ErrID
SetTq
DMC_SetTorque 2
Ax is 1 Axis InTorque S etTq_I nTorque
SetTq_En Enable Bus y SetTq_Bsy
20 0 TargetTorque Active SetTq_Act
CommandAborted Set Tq_Abt
E rror Set Tq_Err
ErrorID Set Tq_ErrID
11- 1 25
DVP-50MC Series Motion Controller Operation Manual
Torque
11
1 200
Time
S etTq
SetTq_En
SetTq_InTorque
Set Tq_Bs y
S etTq_A ct
S etTq_ Err
SetTq_ErrID
When SetTq_En changes from FALSE to TRUE after the servo axis is enabled, SetTq_Bsy
changes to TRUE. One cycle later, SetTq_Act changes to TRUE and the DMC_SetTorque
instruction starts. When the torque is reached, SetTq_InTorque changes to TRUE and
SetTq_Bsy and SetTq_Act remain TRUE.
SetTq_InTorque, SetTq_Bsy and SetTq_Act change to FALSE when SetTq_En changes from
FALSE to TRUE.
11- 1 26
Chapter 11 Motion Control Instructions
11.3.15 MC_ReadAxisError
MC_ReadAxisError_instance
MC_ReadAxisError
Axis Valid
Enable Busy
Error
E rrorID
AxisE rrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions of
Specify the number of
Section 2.2. When Enable is
Axis the axis which is to be USINT
(The variable value TRUE
controlled
must be set)
The instruction is
executed when Enable TRUE or FALSE
Enable BOOL -
changes from FALSE to (FALSE)
TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
Valid TRUE when the output of the instruction is valid. BOOL TRUE / FALSE
Busy TRUE while the instruction is being executed. BOOL TRUE / FALSE
TRUE while there is an error in the execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please
ErrorID WORD
refer to section 12.2.
11- 1 27
DVP-50MC Series Motion Controller Operation Manual
Parameter
Function Data type Valid range
name
is the alarm code that the servo drive reports. For
11 example, AL303 of the servo drive means the value of
1 ErrorID is 303 (hex).
Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
Cas e 1 Case 2
En able
Valid
Bus y
Error
E rro r ID
Case 1: When Enable changes from FALSE to TRUE, Valid and Busy change to TRUE. When Enable
changes to FALSE, Valid and Busy change to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
Meanwhile Busy changes to FALSE. When Enable changes from TRUE to FALSE, Error
changes to FALSE and the value of ErrorID is cleared.
11- 1 28
Chapter 11 Motion Control Instructions
Function
MC_ReadAxisError is used to read error information of a servo axis such as the alarm code which will
show up on the panel of the servo drive and servo axis offline. The instruction is triggered by the high
level. Axis errors will be read when Valid is TRUE. 11
11- 1 29
DVP-50MC Series Motion Controller Operation Manual
11.3.16 MC_ReadActualPosition
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions of
Specify the number of
Section 2.2. When Enable
Axis the axis which is to be USINT
(The variable value changes to TRUE
controlled
must be set)
The instruction is
TRUE or FALSE
Enable executed when Enable BOOL -
(FALSE)
changes to TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
Valid TRUE when the output of the instruction is valid. BOOL TRUE / FALSE
Busy TRUE while the instruction is being executed. BOOL TRUE / FALSE
11- 1 30
Chapter 11 Motion Control Instructions
Cas e1 Case 2
En able
Valid
Bus y
Error
E rro r ID
Case 1: When Enable changes from FALSE to TRUE, Valid and Busy change to TRUE
simultaneously. When Enable changes to FALSE, Valid and Busy change to FALSE.
Case 2: As an error occurs, Error changes to TRUE and ErrorID shows the corresponding error code.
Meanwhile, Busy and Valid change to FALSE. When Enable changes from TRUE to FALSE,
Error changes to FALSE and the value of ErrorID is cleared.
Function
MC_ReadActualPosition is used to read the actual position of an axis including the real axis, virtual axis
and encoder axis.
Actual Position
The unit of the actual position read by MC_ReadActualPosition is Unit and the unit of the feedback
position that the servo drive gives to the controller is Pulse. Thus the actual position is acquired
through conversion of the number of position feedback pulses of the servo drive. The servo gear
ratio, mechanical gear ratio and units per output rotation among axis parameters are needed in the
conversion.
11- 1 31
DVP-50MC Series Motion Controller Operation Manual
If the axis is a rotary axis, its output Position equals ActualPosition % modulo when the instruction
is executed. (Position is the remainder got through dividing ActualPosition by the set modulo
among the axes parameters) . So the value of Position varies between 0 and modulo.
For the reasons mentioned above, please use the position capturing function to acquire the more
highly real-time position since the instruction reads the less highly real-time actual position of the
axis than the position capturing function does.
The actual position that MC_ReadActualPosition reads should also include the position offset
caused by MC_SetPosition after MC_SetPosition is executed.
Pos it ion off set Units per ou tput rot ation The number of se rv o pos it ion
A ct ualPos ition = caus ed by + * feeddbac k puls es
MC_S etPo sition (The number of pulses / rot ation)
* mechanic al gear ratio
Programming Example
This example shows the impact that MC_SetPosition has on the execution of MC_ReadActualPosition.
Rel MC_MoveRelative
11- 1 32
Chapter 11 Motion Control Instructions
Axis1 USINT 1
Rel_Done BOOL
11
Rel_Bsy BOOL
Rel_Act BOOL
Rel_Abt BOOL
Rel_Err BOOL
Rel_ErrID WORD
TON1 TON
SR1 SR
SetPos SetPosition
SetPos_RefTp MC_REFERECNETYPE 0
SetPos_Done BOOL
SetPos_Bsy BOOL
SetPos_Err BOOL
SetPos_ErrID WORD
ReadAtPos ReadActualPosition
ReadAtPos_Vald BOOL
ReadAtPos_Bsy BOOL
ReadAtPos_Err BOOL
ReadAtPos_ErrID WORD
ReadAtPos_Pst LREAL
11- 1 33
DVP-50MC Series Motion Controller Operation Manual
Rel
MC_MoveRelative 1
Ax is 1 Axis Done Rel_Done
Rel_Ex Exec ute Bus y Rel_Bs y
11
ContinuousUpdate Ac tive Rel_Act
10000.0 Dis tance CommandA bort ed Rel_Abt
1 3000.0 Velocity Error Rel_Err
3000.0 Acc eleration ErrorI D Rel_ErrID
3000.0 Dec elerat ion
3000.0 J erk
BufferMode
TO N1 SR 1
TO N 2 SR 3
True EN ENO EN ENO
Rel_Ex In Q SET Q Set Pos_Ex
T#3s PT ET Reset
S etPos
MC_SetPos ition 4
Axis1 Axis Done SetP os_Done
Set Pos_Ex Exec ute Busy SetPos_Bsy
5000.0 Position Error SetP os_Err
True Relative ErrorI D SetP os_ErrID
0 Ref erenc eType
ReadAt Pos
MC_ReadA ctualPos ition 5
Ax is 1 A xis Valid Re adAtPos _Vald
Rel_Ex Enable Bus y ReadAtPos_Bsy
Error Re adAtPos _Err
ErrorID ReadAtPos _ErrI D
P osition ReadAtPos _Pst
11- 1 34
Chapter 11 Motion Control Instructions
Velocity
3000
11
Time
P osition
15000
11 000
ActualPosition
6000 (D32)
Rel Time
Rel_Ex
Rel_Done
Rel_Bsy
Rel_ Act
Rel_Abt
Rel_E rr
SetPos
SetPos_Ex
Se tPos_Done
SetPos_Bsy
Set Pos_Err
ReadAtPos
ReadAtPo s_En
ReadAtP os_Vald
ReadAtPos_Bsy
ReadAt Pos Err
When Rel_Ex changes from FALSE to TRUE, the execution of MC_MoveRelative and
MC_ReadActualPosition is started simultaneously. MC_SetPosition is executed 3 seconds
later after MC_MoveRelative is executed.
The actual position is 6000 as MC_SetPosition starts being executed and 11000
(11000=6000+5000) after the execution is completed. The actual position is 15000 after
MC_MoveRelative execution is completed.
It can be seen from the above velocity curve chart that MC_SetPosition does not affect the
ongoing motion. But the ActualPosition curve chart reflects that the actual position that
MC_ReadActualPosition reads is affected by MC_SetPosition.
11- 1 35
DVP-50MC Series Motion Controller Operation Manual
11.3.17 MC_ReadStatus
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions
Specify the number of the
of Section 2.2. When Enable
Axis axis which is to be USINT
(The variable changes to TRUE
controlled
value must be set)
The instruction is
TRUE or FALSE
Enable executed when Enable BOOL -
(FALSE)
changes to TRUE.
Output Parameters
Valid TRUE when the output of the instruction is valid. BOOL TRUE / FALSE
Busy TRUE while the instruction is being executed. BOOL TRUE / FALSE
TRUE while there is an error in the execution of the
Error BOOL TRUE / FALSE
instruction.
Contains error codes when an error occurs. Please
ErrorID WORD
refer to section 12.2 for the corresponding error code.
ErrorStop BOOL TRUE / FALSE
Refer to section 10.4.
Disabled BOOL TRUE / FALSE
11- 1 36
Chapter 11 Motion Control Instructions
When the axis enters Disabled When the axis is not in Disabled
Disabled
state state
When the axis enters Stopping When the axis is not in Stopping
Stopping
state state
When the axis enters Homing When the axis is not in Homing
Homing
state state
11- 1 37
DVP-50MC Series Motion Controller Operation Manual
E nable
Valid
B usy
Error
ErrorI D
Dis abled
Case 1: When Enable changes from FALSE to TRUE, Valid and Busy change to TRUE simultaneously
and ErrorStop, Disabled, Stopping, Homing, Standstill, DiscreteMotion, ContinuousMotion and
SyncMotion will change to TRUE or FALSE according to the axis status.
Case 2: When Enable changes from TRUE to FALSE, Valid and Busy change to FALSE
simultaneously and the outputs of ErrorStop, Disabled, Stopping, Homing, Standstill,
DiscreteMotion, ContinuousMotion and SyncMotion will keep the same state as Enable is
TRUE.
Case 3: When the value of the input parameter Axis is out of the valid range and Enable changes from
FALSE to TRUE, Busy changes from FALSE to TRUE, one cycle later, Error changes from
FALSE to TRUE and ErrorID shows corresponding error codes and Busy changes from TRUE
to FALSE. When Enable changes from TRUE to FALSE, Error changes from TRUE to FALSE
and meanwhile ErrorID changes to 0.
Function
MC_ReadStatus is used to read the servo axis state in the controller. For the details on axis states,
please refer to section 10.4.
11- 1 38
Chapter 11 Motion Control Instructions
Programming Example
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Rel MC_MoveRelative
Rel_BM MC_Buffer_Mode 0
Rel_Done BOOL
Rel_Bsy BOOL
Rel_Act BOOL
Rel_Abt BOOL
Rel_Err BOOL
Rel_ErrID WORD
ReadSt MC_ReadStatus
ReadSt_Vald BOOL
ReadSt_Bsy BOOL
ReadSt_Err BOOL
ReadSt_ErrID WORD
ReadSt_ErrStp BOOL
ReadSt_Disbl BOOL
ReadSt_Stpin BOOL
ReadSt_Homi BOOL
11- 1 39
DVP-50MC Series Motion Controller Operation Manual
ReadSt_Stans BOOL
ReadSt_Dism BOOL
11
ReadSt_Conm BOOL
1
ReadSt_Sym BOOL
Pwr
MC_Power 1
Ax is 1 Axis S tatus P wr_Sta
Pwr_En Enable Bus y Pwr_Bsy
True EnablePositive Active Pwr_Act
True EnableNegativ e E rror Pwr_Err
Pwr_BM BufferMode ErrorID Pwr_ErrID
Rel
MC_Mov eRelative 2
Ax is 1 Axis Don e Rel_Done
Rel_Ex Ex ecute Bus y Rel_Bsy
ContinuousUpdate Activ e Rel_Ac t
5000. 0 Dis tanc e CommandAborted Rel_Abt
300. 0 Velocity E rror Rel_Err
100. 0 Acc ele rat ion ErrorID Rel_ErrID
100. 0 Deceleration
J erk
Rel_BM BufferMode
ReadSt
MC_ReadSt atus 3
Ax is 1 Axis Va lid ReadSt_Vald
ReadSt _En Enable Bus y ReadSt_Bsy
E rror ReadSt_Err
ErrorID ReadSt_ErrID
ErrorStop ReadSt_ErrStp
Disabled ReadSt_Dis bl
Stopping ReadSt_Stpin
Homing ReadSt_Homi
Stands till ReadSt_Stan s
Dis creteMotion ReadSt_Dis m
Contin uousMotion ReadSt_Conm
Sy ncMotion ReadSt_Sy m
11- 1 40
Chapter 11 Motion Control Instructions
Veloc ity
300
11
Time
Position
7000
2000
Time
Pw r
Pwr_En
Pwr_S ta
Pwr_B sy
Pwr_Ac t
Rel
Rel_Ex
Rel_Done
Rel_B sy
Rel_Act
ReadSt
ReadSt_En
ReadSt_Vald
ReadSt_Bs y
ReadSt_Err
ReadSt_Dis bl
ReadSt_S tans
ReadSt Dism
The motion controller controls the servo motor to move by starting from current position as
Rel_Act changes from FALSE to TRUE. Meanwhile ReadSt_Stans changes to FALSE and
ReadSt_Dism changes to TRUE. When the servo motor moves the target distance, Rel_Done
and ReadSt_Stans change to TRUE; Rel_Bsy, Rel_Act and ReadSt_Dism change to FALSE.
11- 1 41
DVP-50MC Series Motion Controller Operation Manual
11 When ReadSt_En changes to FALSE, ReadSt_Vald and ReadSt_Bsy change to FALSE and
1 ReadSt_Disbl remains TRUE.
11- 1 42
Chapter 11 Motion Control Instructions
11.3.18 MC_ReadMotionState
Input Parameters
Refer to Functions of
Specify the number of When Enable
Section 2.2.
Axis the axis which is to be USINT changes to
(The variable value
controlled TRUE
must be set)
The instruction is
TRUE or FALSE
Enable executed when Enable BOOL -
(FALSE)
changes to TRUE.
Source Reserved - - -
Notes:
1. When Enable changes from FALSE to TRUE, the execution of MC_ReadStatus starts.
2. When MC_ReadStatus is being executed and Enable changes from TRUE to FALSE, the instruction
execution stops and the outputs of ConstantVelocity, Accelerating, Decelerating, DirectionPositive
and DirectionNegative keep the status as Enable is TRUE.
11- 1 43
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
Valid TRUE when the output of the instruction is valid. BOOL TRUE / FALSE
11
Busy TRUE while the instruction is being executed. BOOL TRUE / FALSE
1
TRUE while there is an error in the execution of the
Error BOOL TRUE / FALSE
instruction.
Contains error codes when an error occurs. Please
ErrorID WORD
refer to section 12.2 for the corresponding error code.
ConstantVelocity TRUE when the axis moves at a constant speed BOOL TRUE / FALSE
TRUE when the absolute value of the axis velocity is
Accelerating BOOL TRUE / FALSE
increased.
DirectionPositive TRUE when the current position value is increased. BOOL TRUE / FALSE
DirectionNegative TRUE when the current position value is decreased. BOOL TRUE / FALSE
When the axis velocity is not When the axis velocity is changed
ConstantVelocity
changed and Enable is still TRUE
11- 1 44
Chapter 11 Motion Control Instructions
Enab le
Valid
B usy
Error
ErrorID
Ac celera ting
Dece le ra ting
Case 1: When Enable changes from FALSE to TRUE, Valid and Busy change to TRUE and
ConstantVelocity, Accelerating, Decelerating, DirectionPositive and DirectionNegative change
to TRUE or FALSE according to the axis state.
Case 2: When Enable changes from TRUE to FALSE, Valid and Busy change to FALSE and
ConstantVelocity, Accelerating, Decelerating, DirectionPositive and DirectionNegative remain
the state for when Enable is TRUE.
Case 3: When the value of Axis is out of the valid range and Enable changes from FALSE to TRUE,
Busy changes from FALSE to TRUE, one period later, Error changes from FALSE to TRUE and
ErrorID shows corresponding error codes. Meanwhile, Busy changes from TRUE to FALSE.
Error changes from TRUE to FALSE and the value of ErrorID becomes 0 as Enable changes
from TRUE to FALSE.
Function
MC_ReadMotionState is used to read current motion state of the servo axis. The motion state of the
servo axis includes the constant motion, acceleration or deceleration, positive rotation and negative
rotation.
11- 1 45
DVP-50MC Series Motion Controller Operation Manual
Programming Example
Pwr MC_Power
Axis1 USINT 1
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Rel1 MC_MoveRelative
Rel1_Done BOOL
Rel1_Bsy BOOL
Rel1_Act BOOL
Rel1_Abt BOOL
Rel1_Err BOOL
Rel1_ErrID WORD
Rel2 MC_MoveRelative
Rel2_Done BOOL
Rel2_Bsy BOOL
Rel2_Act BOOL
Rel2_Abt BOOL
Rel2_Err BOOL
Rel2_ErrID WORD
ReadMoSt MC_ReadMotionState
ReadMoSt_Vald BOOL
ReadMoSt_Bsy BOOL
11- 1 46
Chapter 11 Motion Control Instructions
ReadMoSt_Err BOOL
ReadMoSt_ErrID WORD
ReadMoSt_ConstVel BOOL
11
ReadMoSt_Accet BOOL
ReadMoSt_Decet BOOL
ReadMoSt_DirtPos BOOL
ReadMoSt_DirtNg BOOL
Pwr
MC_Power 1
A xis1 Axis Status Pwr_St a
Pwr_En Enable Busy Pwr_Bsy
True EnablePosit ive Act ive Pwr_Act
True EnableNegative Error P wr_Err
Buff erMode ErrorID P wr_ErrID
Rel1
MC_MoveRelat ive 2
A xis1 Axis Done Rel1_Done
Rel1_Ex Execut e Busy Rel1_Bsy
ContinuousUpdat e Act ive Rel1_Act
7 000.0 Distance CommandAborted Rel1_Abt
300.0 Velocit y Error Rel1_Err
100.0 Acceleration E rrorID Rel1_ErrID
100.0 Deceleration
15.0 Jerk
Buff erMode
Rel2
MC_MoveRelat ive 3
A xis1 Axis Done Rel2_Done
Rel2_Ex Execut e Busy Rel2_Bsy
ContinuousUpdat e Act ive Rel2_Act
-5 000.0 Distance CommandAborted Rel2_Abt
300.0 Velocit y Error Rel2_Err
100.0 Acceleration E rrorID Rel2_ErrID
100.0 Deceleration
15.0 Jerk
Buff erMode
ReadMoS t
MC_Read Mot ionSt ate 4
Axis1 Axis Valid ReadMoS t_Vald
ReadMoSt_En Enable Busy ReadMoSt_Bsy
Source E rror ReadMoS t_Err
ErrorID ReadMoS t_ErrID
ConstantVelocit y ReadMoS t_ConstVel
Accelerating ReadMoS t_Accet
Decelerating ReadMoS t_Decet
DirectionPositive ReadMoS t_DirtPos
Direct ionNegative ReadMoS t_DirtNg
11- 1 47
DVP-50MC Series Motion Controller Operation Manual
Velocity
300
11
1 0
Time
-300
Pos it ion
5500
500
0
Time
Rel 1
Rel1_Ex
Rel1_ Bsy
Rel1_Act
Rel1_Abt
Rel 2
Rel2_Ex
Rel2_Done
Rel2_Bsy
Rel2_Act
ReadMoSt
ReadMoSt_E n
Re adMoS t_Vald
ReadMoS t_Err
ReadMoSt_Const vel
ReadMoSt_Ac cet
ReadMoSt_Decet
ReadMoSt _DirtPos
ReadMoSt DirtNg
When Rel1_Act changes from FALSE to TRUE, the axis starts accelerating in the positive
direction and meanwhile, ReadMoSt_Accet and ReadMoSt_DirtPos change to TRUE.
When Rel2_Act changes from FALSE to TRUE, ReadMoSt_Decet changes from FALSE to
TRUE and the axis starts decelerating in the positive direction.
11- 1 48
Chapter 11 Motion Control Instructions
When Rel2_Done changes from FALSE to TRUE, the axis stops moving and both of 11
ReadMoSt_Decet and ReadMoSt_DirtNg change to FALSE.
11- 1 49
DVP-50MC Series Motion Controller Operation Manual
11.3.19 DMC_ReadParameter_Motion
DMC_ReadP arameter_Motion_instance
DMC_ReadParameter_Motion
Axis Done
Execut e Busy
Index Active
SubIndex Error
ErrorI D
Dat aType
Data
Input Parameters
Refer to Functions of
Specify the station When Execute
Section 2.2.
Axis address of the slave to USINT changes from
(The variable value
control. FALSE to TRUE
must be set)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
When Execute
Index of the parameter
Index UINT 0 changes from
to read
FALSE to TRUE
When Execute
Subindex of the
SubIndex USINT 0 changes from
parameter to read
FALSE to TRUE
Output Parameters
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
11- 1 50
Chapter 11 Motion Control Instructions
ReadPm_M
DMC_ReadParameter_Motion 1
A xis1 Ax is Done ReadPm_M_Done
ReadPm_M_Ex Ex ecute Busy ReadPm_M_Bs y
16#260A Index Ac tive ReadPm_M_Ac t
0 S ubIndex Error ReadPm_M_Err
ErrorID ReadPm_M_ErrID
Dat aType ReadPm_M_DaTy
Data ReadPm_M_Dat
2. For the index and subindex of other slave parameters, refer to the product manual related to CANopen
function.
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
11- 1 51
DVP-50MC Series Motion Controller Operation Manual
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When Error changes to TRUE.
When Execute changes to When Done changes from FALSE
11 Busy
TRUE. to TRUE and Busy changes to
1 FALSE.
Case 1 Case 2
E xecut e
Don e
Busy
Active
Error
E rrorID
Dat aType
Dat a
Case 1: When Execute changes from FALSE to TRUE, Busy and Active change to TRUE. One cycle
later, Done changes to TRUE and DataType and Data show corresponding data values. After
Done changes to TRUE, Busy and Active change to FALSE in the same cycle. When Execute
changes from TRUE to FALSE, Done changes from TRUE to FALSE and DataType and Data
retain original values. If Error changes to TRUE, the values of DataType and Data will be
cleared to 0.
Case 2: The input parameter value is illegal such as axis number: 0 before the
DMC_ReadParameter_Motion instruction is executed. When Execute changes from FALSE to
TRUE, Error changes to from FALSE to TRUE and ErrorID shows corresponding error code.
11- 1 52
Chapter 11 Motion Control Instructions
When Execute changes from TRUE to FALSE, Error changes from TRUE to FALSE and the
content of ErrorID is cleared to 0.
Function
11
DMC_ReadParameter_Motion reads a slave parameter value. Users can specify the index and
subindex of the parameter which is to be read.
Programming Example
The example of executing the DMC_ReadParameter_ Motion instruction is described as follows.
Axis1 USINT 1
ReadPm_M1_DaTy USINT 2
WritePm_M DMC_WriteParameter_Motion
11- 1 53
DVP-50MC Series Motion Controller Operation Manual
ReadPm_M2_DaTy USINT 2
11
1 ReadPm_M2_Dat UDINT 1000
ReadPm_M1
DMC_ReadParameter_Motion 1
Axis1 Axis Done ReadPm_M1_Done
ReadPm_M1_Ex Execute Busy ReadPm_M1_Bsy
16#2137 I ndex A ctive ReadPm_M1_Act
0 SubIndex E rror ReadPm_M1_Err
ErrorID ReadPm_M1_ErrID
DataType ReadPm_M1_DaTy
Data ReadPm_M1_Dat
WritePm_M
DMC_WriteParameter_Motion 2
Axis1 Axis Done WritePm_M_Done
ReadPm_M1_Done Execute Busy WritePm_M_Bsy
16#2137 I ndex A ctive WritePm_M_Act
0 SubIndex E rror WritePm_M_Err
2 Dat aType ErrorID WritePm_M_ErrID
16#03E8 Dat a
ReadPm_M2
DMC_ReadParameter_Motion 3
Axis1 Axis Done ReadPm_M2_Done
WritePm_M_Done Execute Busy ReadPm_M2_Bsy
16#2137 I ndex A ctive ReadPm_M2_Act
0 SubIndex E rror ReadPm_M2_Err
ErrorID ReadPm_M2_ErrID
DataType ReadPm_M2_DaTy
Data ReadPm_M2_Dat
2. Timing Chart
ReadPm _M1
ReadPm_M1_Ex
ReadPm_M1_Done
ReadPm_M1_Bsy
ReadPm_M1_Act
ReadPm_M1_DaTy
ReadPm_M1_Dat
Wr itePm_M
ReadPm_M1_Done
WritePm_M_Done
WritePm_M_Bsy
WritePm_M_Act
ReadPm _M2
WritePm_M_Done
ReadPm_M2_Done
ReadPm_M2_Bsy
ReadPm_M2_Act
ReadPm_M2_DaTy
ReadPm_M2_Dat
11- 1 54
Chapter 11 Motion Control Instructions
11- 1 55
DVP-50MC Series Motion Controller Operation Manual
11.3.20 DMC_WriteParameter_Motion
DMC_WriteParameter_Motion_in stanc e
DMC_WriteParameter_Motion
Ax is Done
Ex ecut e Busy
Index Ac tive
SubIndex Error
DataTy pe ErrorI D
Data
Input Parameters
Refer to
Functions of
When Execute
Section 2.2.
Axis Specify the slave to control. USINT changes from
(The variable
FALSE to TRUE
value must be
set)
Notes:
11- 1 56
Chapter 11 Motion Control Instructions
1. DataType must be the data type of the parameter to write. An error will occur if the filled value is
incorrect.
2. Refer to Chapter 9 for the calculation of the index and subindex of servo parameters.
Output Parameters
11
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
TRUE when there is an error in the execution of the
Error BOOL TRUE / FALSE
instruction.
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
11- 1 57
DVP-50MC Series Motion Controller Operation Manual
11
1
E xec ute
Done
Bus y
Ac tive
Error
E rro rID
Case 1: When Execute changes from FALSE to TRUE, Busy and Active change to TRUE. One cycle
later, Done changes to TRUE. After Done changes to TRUE, Busy and Active change to
FALSE in the same cycle. When Execute changes from TRUE to FALSE, Done changes from
TRUE to FALSE.
Case 2: The input parameter value is illegal such as axis number: 0 before the
DMC_WriteParameter_Motion instruction is executed. When Execute changes from FALSE to
TRUE, Error changes to from FALSE to TRUE and ErrorID shows corresponding error code.
When Execute changes from TRUE to FALSE, Error changes from TRUE to FALSE and the
content of ErrorID is cleared to 0.
Function
DMC_WriteParameter_Motion sets a slave parameter value. Users can specify the index and subindex
of the parameter which is to be set.
Programming Example
The example of executing the DMC_WriteParameter_ Motion instruction is described as follows.
ReadPm_M1 DMC_ReadParameter_Motion
Axis1 USINT 1
11- 1 58
Chapter 11 Motion Control Instructions
ReadPm_M1_DaTy USINT 2
11
ReadPm_M1_Dat UDINT 5000
WritePm_M DMC_WriteParameter_Motion
ReadPm_M2 DMC_ReadParameter_Motion
ReadPm_M2_DaTy USINT 2
11- 1 59
DVP-50MC Series Motion Controller Operation Manual
ReadPm_M1
DMC_ReadParameter_Motion 1
Axis 1 Ax is Done ReadPm_M1_Done
ReadPm_M1_Ex Exec ute Bus y ReadPm_M1_Bs y
11 16#2137
0
I ndex
SubIndex
A ctive
E rror
ReadPm_M1_Ac t
ReadPm_M1_Err
1 ErrorID ReadPm_M1_ErrID
DataType ReadPm_M1_DaTy
Data ReadPm_M1_Dat
WritePm_M
DMC_WriteParameter_Motion 2
Ax is1 Ax is Done WritePm_M_Done
ReadPm_M1_Done Exec ute Bus y WritePm_M_Bsy
16#2137 I ndex A ctive WritePm_M_Act
0 SubIndex E rror WritePm_M_Err
2 Dat aType ErrorID WritePm_M_ErrID
16#03E8 Dat a
ReadPm_M2
DMC_ReadParameter_Motion 3
Axis 1 Ax is Done ReadPm_M2_Done
WritePm_M_Done Exec ute Bus y ReadPm_M2_Bs y
16#2137 I ndex A ctive ReadPm_M2_Ac t
0 SubIndex E rror ReadPm_M2_Err
ErrorID ReadPm_M2_ErrID
DataType ReadPm_M2_DaTy
Data ReadPm_M2_Dat
11- 1 60
Chapter 11 Motion Control Instructions
2. Timing Chart
ReadPm _M1
ReadPm_M1_Ex
ReadPm_M1_Done 11
ReadPm_M1_Bsy
ReadPm_M1_Act
ReadPm_M1_DaTy
ReadPm_M1_Dat
Wr itePm_M
ReadPm_M1_Done
WritePm_M_Done
WritePm_M_Bsy
WritePm_M_Act
ReadPm _M2
WritePm_M_Done
ReadPm_M2_Done
ReadPm_M2_Bsy
ReadPm_M2_Act
ReadPm_M2_DaTy
ReadPm_M2_Dat
11- 1 61
DVP-50MC Series Motion Controller Operation Manual
11.3.21 DMC_TouchProbe
Input Parameters
When
Refer to Functions Execute
Specify the number of the axis which is of Section 2.2. changes
Axis USINT
to be controlled. (The variable value from
must be set) FALSE to
TRUE
Windowonly Reserved - - -
11- 1 62
Chapter 11 Motion Control Instructions
Firstops Reserved - - -
Lastops Reserved - - -
11
Mode 0: The trigger signal comes from
the rising edge of the input
points: I0~I7 and I10~I17 of the
motion controller. The input point
which is used is specified by
TriggerInput. The position is
captured through the rising edge
of the trigger bit. The captured
position is converted from the
number of pulses that the
external encoder port of the
controller receives through axis
parameters.
Mode 1: The trigger signal comes from
the falling edge of one of the
input points: I0~I7 and I10~I17 of
Mode the controller, which is specified INT
by TriggerInput. The captured
position is converted from the
number of pulses that the
external encoder port of the
controller receives through axis
parameters.
Mode 5: The trigger signal comes from
the rising edge of the input point
of the servo drive. The captured
position is converted from the
number of pulses which the
servo motor feeds back to the
servo drive through axis
parameters.
Mode 6: The trigger signal comes from
the falling edge of the input point
11- 1 63
DVP-50MC Series Motion Controller Operation Manual
Servo
drive A2-E B3-E A3-E
model
Input
DI13 DI1 DI1
point
Mask Reserved - - -
11- 1 64
Chapter 11 Motion Control Instructions
Notes:
1. In Mode 0 and mode 1, the same input point cannot be used for the position capture simultaneously.
2. In Mode 5, mode 6, mode 7 and mode 8, the position capture cannot be performed for the same axis
simultaneously. 11
Output Parameters
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
11- 1 65
DVP-50MC Series Motion Controller Operation Manual
Ex ec ute
Done
B usy
Ac tive
Co mma ndAbo rt ed
Error
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one period later,
Active changes to TRUE. When positioning is completed, Done changes to TRUE and meanwhile
Busy and Active change to FALSE.
Case 2: When Execute changes from FALSE to TRUE and the instruction is aborted by other instruction,
Commandaborted changes to TRUE and meanwhile Busy and Active change to FALSE. When
Execute changes from TRUE to FALSE, CommandAborted changes to FALSE.
Case 3: After Execute changes from FALSE to TRUE, Error changes to TRUE and ErrorID shows
corresponding error codes when an error occurs such as axis alarm or Offline. Meanwhile, Busy
and Active change to FALSE. Error changes to FALSE when Execute changes from TRUE to
FALSE.
Case 4: During execution of the instruction, Done changes to TRUE when the instruction execution is
completed after Execute changes from TRUE to FALSE. Meanwhile, Busy and Active change to
FALSE and one period later, Done changes to FALSE.
Function
(RecordedPosition) the position that DMC_TouchProbe captures is converted from other value
based on axis parameters. The data sources for conversion are listed in the following table.
11- 1 66
Chapter 11 Motion Control Instructions
Mode 0 and mode The number of pulses that the external encoder port of the controller
1 receives
Mode 5 The number of pulses that the servo motor feeds back to the servo drive 11
Mode 6 The number of pulses that the servo motor feeds back to the servo drive
Mode 7 The number of pulses that the servo motor feeds back to the servo drive
Mode 8 The number of pulses that the servo motor feeds back to the servo drive
The range of the data source value is -2147483648~2147483647. When the data source value
exceeds 2147483647, it will become -2147483648. With the changing + or – sign of the data
source value, the + or - sign of the value of RecordedPosition will not change but the value of
RecordedPosition will continue to increase.
When Mode=0 or 1 in DMC_TouchProbe, the captured position can be calculated according to the
method mentioned above as well. In actual application, the position capture is generally performed
by building an external encoder axis. When the number of pulses received at the external encoder
interface of the motion controller is 638, the position captured by DMC_TouchProbe is 95.4. The
calculation formula: 638×(3×1000)÷(2×10000)=95.4. In the formula, 1000 is Units per output
rotation, 2 is Input rotations of gear; 3 is Output rotations of gear and 10000 is number of pulses
per rotation). When I0 changes from FALSE to TRUE once, the position capture is performed once.
Wiring Figure
11- 1 67
DVP-50MC Series Motion Controller Operation Manual
DV P50MC11T
DV P50 M C11 T PWR CANope n RS23 2
RUN 0 0 0 1 02 03 04 0 5 0 6 0 7
RUN RS48 5
ERR
1 0 11 12 13 14 1 5 1 6 1 7
ERR Ether CAT
SD Etherne t 0 0 0 1 02 03 04 0 5 0 6 0 7
00 10
01 11
02 12
-
P ho to el ectric switch
03 13
04 14 Out
05 15
24V
+ -
06 16
07 17 L
S0 S1
+
E t h e rC A T E t h er n et CANo p e n
00 10
Encoder
01 11
EtherC AT
02 12
03 13
UP ZP
AS D A-A2-E
Mode 5, 6 and 7
Mode 5: The trigger signal comes from the rising edge of DI13 of servo drive CN7’s extension
DIs. The captured position is converted from the number of pulses which the servo
motor feeds back to the servo drive through axis parameters.
Mode 6: The trigger signal comes from the falling edge of DI13 of servo drive CN7’s extension
DIs. The captured position is converted from the number of pulses which the servo
motor feeds back to the servo drive through axis parameters.
Mode 7: The trigger signal comes from the rising edge and falling edge of DI13 of servo drive
CN7’s extension DIs. The captured position is converted from the number of pulses
which the servo motor feeds back to the servo drive through axis parameters. The
position captured on the falling edge is acquired via the variable FallingPosition of the
instance name. The form is “Instance name. FallingPosition”.
11- 1 68
Chapter 11 Motion Control Instructions
DV P50MC11T
DVP 50MC 1T CAN
o p e n
P WR RS2
3 2 0 0 1 0 2 0 3 0 4 0 5 6
0 7
0
RUN RUN RS4
8 5
ERR
0
1 1 1 1 2 1 3 1 4 1 5 6
1 7
1
ERR E th e rC A T
Photoelectric switch
SD E th e rn e
t 0 0 1 0 2 0 3 0 4 0 5 6
0 7
0
A SDA-A2-E -
Cn 7
24 V
11
Ou t
+ -
L
+
Et h
e r CAT Et he
r ne t CANo p e n
EtherCAT
Mode 8
The trigger signal comes from the rising edge of phase Z of the servo drive. The captured position is
converted from the number of pulses which the servo motor feeds back to the servo drive through axis
parameters.
Programming Example 1
Capture the position of the external encoder axis by using the rising edge of I0 under mode 0.
1. The variable table and program
Variable name Data type Initial value
NOT_ENO BOOL
Touch DMC_TouchProbe
Axis1 USINT 3
Touch_Tri MC_Triggerinput 0
Touch_Mode INT 0
Touch_Done BOOL
Touch_Bsy BOOL
Touch_Act BOOL
Touch_Abt BOOL
Touch_Err BOOL
Touch_ErrID UINT
Touch_Pos LREAL
11- 1 69
DVP-50MC Series Motion Controller Operation Manual
NO T 1
NOT_EN EN ENO NOT_E NO
Touc h_Done In Ou t Touc h_Ex
Touc h
11 DMC_TouchProbe 2
1 A xis1
Touch_ Ex
Ax is
Ex ecut e
Done
Busy
Touch_Done
Touc h_Bsy
Touch_Tri Trigge rIn put Act iv e Touc h_Act
Win dowonly CommandAborted Touc h_Abt
Firs tpos Error Touc h_Err
Las tpos ErrorID Touc h_ErrID
Touc h_Mode Mode Rec ordedPosition Touc h_Pos
Mas k
2. Timing Chart
o ntroller ' s I0
To uch_ Ex
Touc h_Done
Touc h_Bs y
Tou ch_A ct
Touc h_Ab t
Touch _Err
To uch _ErrID
Touc h_Pos
When Touch_Ex changes from FALSE to TRUE, Touch_Bsy changes from FALSE to TRUE in
the first cycle and Touch_Act changes from FALSE to TRUE in the second cycle.
When the external signal triggers controller’s I0, DMC_TouchProbe starts to execute. When
Touch_Done changes from FALSE to TRUE, the position Touch_Pos outputs is converted from
the number of pulses that the externam encoder port of the controller receives through axis
parameters. Meantime Touch_Bsy and Touch_Act change from TRUE to FALSE. When
Touch_Ex changes from TRUE to FALSE, Touch_Done changes from TRUE to FALSE and the
position that Touch_Pos captures will not be cleared to 0.
Programming Example 2
The external signal triggers DI13 of servo drive CN7’s extension DIs under mode 5. Capture the position
which is converted from the number of pulses which the servo motor feeds back to the servo drive
through axis parameters.
NOT_ENO BOOL
11- 1 70
Chapter 11 Motion Control Instructions
Touch1 DMC_TouchProbe
Axis2 USINT 1
11
Touch1_Ex BOOL FALSE
Touch1_Tri MC_Triggerinput
Touch1_Mode INT 5
Touch1_Done BOOL
Touch1_Bsy BOOL
Touch1_Act BOOL
Touch1_Abt BOOL
Touch1_Err BOOL
Touch1_ErrID UINT
Touch1_Pos LREAL
NO T 1
NOT_EN EN ENO NOT_E NO
Touc h1_Done In Ou t Touc h1_Ex
Touc h1
DMC_TouchProbe 2
A xis2 Ax is Done Touch1_Done
Touc h1_Ex Ex ecut e Busy Touc h1_Bsy
Touch1_Tri Trigg erI nput Act iv e Touc h1_Act
Windowonly CommandAborted Touc h1_Abt
Firs tpos Erro r Touc h1_Err
Las tpos ErrorID Touc h1_ErrID
Touc h1_Mode Mode Rec ordedPosition Touc h1_Pos
Mas k
2. Timing Chart
When Touch1_Ex changes from FALSE to TRUE, Touch1_Bsy changes from FALSE to TRUE
in the first cycle and Touch1_Act changes from FALSE to TRUE in the second cycle.
11- 1 71
DVP-50MC Series Motion Controller Operation Manual
When the execution of DMC_TouchProbe is finished after the external signal triggers DI13 of
servo’s CN7 extension DI, Touch1_Done changes from FALSE to TRUE and Touch1_Pos
outputs the position converted from the number of pulses which the servo motor feeds back to
11 the servo drive according to the axis parameters. Meantime Touch1_Bsy and Touch1_Act
1 change from TRUE to FALSE. When Touch1_Ex changes from TRUE to FALSE, Touch1_Done
changes from TRUE to FALSE and the position that Touch1_Pos captures will not be cleared to
0.
11- 1 72
Chapter 11 Motion Control Instructions
11.3.22 DMC_TouchProbeCyclically
DVP50MC11T/DVP50MC11T-06
DMC_TouchProbeCyclically is used for capturing 11
FB DVP50MC11P/DVP50MC11P-06
the position of an axis cyclically.
DVP50MC11T-04S/DVP50MC11T-16S
DMC_TouchProbeCyclically_ instance
DMC_Tou chProb eCyclically
Axis Valid
En able Busy
Trigg erInput Active
Win dowonly CommandA borted
Firstpos Error
Lastpo s E rrorI D
Mod e Touched
Mask RecordedP osition
Input Parameters
Windowonly Reserved - - -
11- 1 73
DVP-50MC Series Motion Controller Operation Manual
11 Firstops Reserved - - -
1
Lastops Reserved - - -
11- 1 74
Chapter 11 Motion Control Instructions
Servo
drive A2-E B3-E A3-E
model
Input
DI13 DI1 DI1
point
11- 1 75
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
CommandA When the instruction execution is aborted When Execute changes from TRUE to
borted by some other motion control instruction. FALSE
11- 1 76
Chapter 11 Motion Control Instructions
Case1 Case2
Enable
Valid
Busy
Active
CommandA borted
Error
Error ID
Touched
Case 1: When Enable changes from FALSE to TRUE, Valid and Busy change to TRUE. One period later,
Active changes to TRUE. When one capture is completed, Touched changes to TRUE and the
TRUE state will last for one period. When Enable changes from TRUE to FALSE, Valid, Busy and
Active change to FALSE.
Case 2: When an error exists in input parameters and Enable changes from FALSE to TRUE, Busy and
Valid change to TRUE. One period later, Error changes to TRUE and ErrorID shows
corresponding error codes and meanwhile Busy and Valid change to FALSE. When Enable
changes from TRUE to FALSE, Error changes to FALSE and the value of ErrorID will be cleared.
Function Explanation
DMC_TouchProbeCyclically is used for capturing the position of an axis cyclically. The function is similar to
that of DMC_TouchProbe. The difference is that the axis position can be captured cyclically by the instruction
as Enable changes to TRUE. That is, as an external signal is detected, the instruction performs the position
capture immediately without having to be re-triggered.
Refer to DMC_TouchProbe for details on the functions.
11- 1 77
DVP-50MC Series Motion Controller Operation Manual
11.3.23 DMC_Jog
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions of
Specify the number of When JogForward
Section 2.2.
Axis the axis which is to be USINT or JogBackward is
(The variable value
controlled. TRUE
must be set)
The instruction is
executed when TRUE or FALSE
JogForward BOOL
JogForward changes (FALSE)
from FALSE to TRUE.
The instruction is
executed when TRUE or FALSE
JogBackward BOOL
JogBackward changes (FALSE)
from FALSE to TRUE.
11- 1 78
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
Output Parameters
11- 1 79
DVP-50MC Series Motion Controller Operation Manual
11 Jog Fward or
Case 1: When JogForward or JogBackward changes from FALSE to TRUE, Busy changes to TRUE.
When the jogging stops, the velocity of the axis is decreased to 0, Done changes to TRUE and
Busy changes to FALSE.
Case 2: When JogForward or JogBackward changes from FALSE to TRUE, CommandAborted
changes to TRUE and meanwhile, Busy changes to FALSE after the instruction is aborted by
other motion instruction. CommandAborted changes to FALSE when JogForward or
JogBackward changes from TRUE to FALSE.
Case 3: After JogForward or JogBackward changes from FALSE to TRUE, Error will change to TRUE
and ErrorID will show corresponding error codes if any error occurs such as axis alarm or
Offline. Meanwhile, Busy will change to FALSE. Error will change to FALSE and the value of
ErrorID will be cleared to 0 when JogForward or JogBackward changes from TRUE to FALSE.
Function
DMC_Jog jogs an axis. The JogForward parameter controls the axis to run forward and the
JogBackward parameter controls the axis to run backward. When the jogging stops, Done changes to
TRUE and one cycle later, it changes to FALSE. Meawhile, Busy changes to FALSE.
11- 1 80
Chapter 11 Motion Control Instructions
11.3.24 DMC_MoveVelocityStopByPos
D MC_MoveVelocityStopByPos_ instance
DMC_MoveVelocityS topByPos
Axis InVelocity
Ex_Move Stop_Done
Ex_Stop Busy
Velocity Active
Acceleration CommandAbort
Deceleration Error
Jerk ErrorID
Direction
RoundPhase
StopPhase
BufferMode
Input Parameters
Refer to Functions of
Specify the number of the When Ex_Move
Section 2.2.
Axis axis which is to be USINT changes to
(The variable value
controlled. TRUE.
must be set)
11- 1 81
DVP-50MC Series Motion Controller Operation Manual
11- 1 82
Chapter 11 Motion Control Instructions
Output Parameters
Invelocity TRUE when the target velocity is reached. BOOL TRUE / FALSE
11
Stop_Done TRUE when the stop position is reached. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 1 83
DVP-50MC Series Motion Controller Operation Manual
Ex_Move
Ex_Sto p
Invelocit y
S top_Don e
B usy
A ct ive
Co mma ndAbo rt ed
Error
Error ID
Case 1: When Ex_Move changes from FALSE to TRUE, Busy changes to TRUE. When the axis starts
being controlled by the instruction, Active changes to TRUE. When Ex_Stop changes from
FALSE to TRUE, Invelocity changes to FALSE. When the position is reached, Stop_Done
changes to TRUE and meanwhile, Busy and Active change to FALSE. When Ex_Move and
Ex_Stop change from TRUE to FALSE, Stop_Done changes to FALSE.
Case 2: When Ex_Move changes to TRUE, the instruction is aborted by other instruction and
CommandAborted changes to TRUE. Meanwhile, Invelocity, Busy and Active change to
FALSE. When Ex_Move changes from TRUE to FALSE, CommandAborted changes to
FALSE.
Case 3: When an error occurs while Ex_Move is TRUE, Error changes to TRUE and ErrorID shows
corresponding error code. Meanwhile, Invelocity, Busy and Active change to FALSE. Error
changes to FALSE when Ex_Move changes from TRUE to FALSE.
11- 1 84
Chapter 11 Motion Control Instructions
Function
The pitch (UnitsPerRotation) is 10000, RoundPhase is set to 360 and StopPhase is set to 90 as
shown in the figure below. And the axis can be controlled to stop at the phase specified by
StopPhase via the DMC_MoveVelocityStopByPos instruction.
The terminal actuator may stop at the position of 12500 units, 22500 units, 32500 units or 42500
units.
0°
StopPhase
270° 90°
180°
11- 1 85
DVP-50MC Series Motion Controller Operation Manual
11.3.25 DMC_MoveVelocityStopByLinePos
DMC_MoveVelocityStopByLinePos_ instance
DMC_MoveVelocitySt opByLinePos
Axis InVelocity
Ex_Mo ve S top_Done
Ex_Stop Busy
Velocity Active
A cceleration CommandAbort
Deceleration E rror
Jerk ErrorI D
Direction
RoundPhase
StopPhase
BufferMode
Input Parameters
Refer to Functions of
Specify the number of the When Ex_Move
Section 2.2.
Axis axis which is to be USINT changes to
(The variable value
controlled. TRUE.
must be set)
11- 1 86
Chapter 11 Motion Control Instructions
Output Parameters
Invelocity TRUE when the target velocity is reached. BOOL TRUE / FALSE
Stop_Done TRUE when the stop position is reached. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 1 87
DVP-50MC Series Motion Controller Operation Manual
11- 1 88
Chapter 11 Motion Control Instructions
Ex _Mov e
Ex _Sto p
Inv eloc it y
S top_Don e
B usy
A ct iv e
Co mma ndAbo rt ed
Error
Error ID
Case 4: When Ex_Move changes from FALSE to TRUE, Busy changes to TRUE. When the axis starts
being controlled by the instruction, Active changes to TRUE. When Ex_Stop changes from
FALSE to TRUE, Invelocity changes to FALSE. When the position is reached, Stop_Done
changes to TRUE and meanwhile, Busy and Active change to FALSE. When Ex_Move and
Ex_Stop change from TRUE to FALSE, Stop_Done changes to FALSE.
Case 5: When Ex_Move changes to TRUE, the instruction is aborted by other instruction and
CommandAborted changes to TRUE. Meanwhile, Invelocity, Busy and Active change to
FALSE. When Ex_Move changes from TRUE to FALSE, CommandAborted changes to
FALSE.
Case 6: When an error occurs while Ex_Move is TRUE, Error changes to TRUE and ErrorID shows
corresponding error code. Meanwhile, Invelocity, Busy and Active change to FALSE. Error
changes to FALSE when Ex_Move changes from TRUE to FALSE.
Function
11- 1 89
DVP-50MC Series Motion Controller Operation Manual
As Ex_Move changes from FALSE to TRUE, the axis is controlled to run by the instruction. As
Ex_Stop changes from FALSE to TRUE, the axis is controlled to stop at the position specified by
StopPhase. The final position where the axis stops is the position of an integral multiple of
11 RoundPhase value+StopPhase value.
1 RoundPhase is set to 10000 and StopPhase is set to 4000 as shown in the figure below. And the
terminal actuator can be controlled to stop at the position specified by StopPhase via the
DMC_MoveVelocityStopByLinePos instruction.
The terminal actuator may stop at the position of 4000 units, 14000 units, 24000 units or 34000 units.
11- 1 90
Chapter 11 Motion Control Instructions
11.3.26 DMC_ReadPositionLagStatus
DMC_ReadPositionLagStat us_instance
DMC_Re adPositionLagStatus
Axis Out OfRange
Enable Busy
E rror
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions
Specify the number of the
of Section 2.2. When Enable is
Axis axis which is to be USINT
(The variable TRUE.
controlled.
value must be set)
The instruction is
executed when Enable TRUE or FALSE When Enable is
Enable BOOL
changes from FALSE to (FALSE) TRUE.
TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
OutOfRange TRUE when the position lag is out of the valid range. BOOL TRUE/FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 1 91
DVP-50MC Series Motion Controller Operation Manual
Function
11- 1 92
Chapter 11 Motion Control Instructions
Programming Example
1. The variable table and program
Variable name Data type Initial value
11
DWPLS DMC_WritePositionLagSetting
DWPLS_Ex BOOL
DWPLS_Lag LREAL
DWPLS_H_Time LREAL
DWPLS_Done BOOL
DWPLS_Bsy BOOL
DWPLS_Err BOOL
DWPLS_ErrID WORD
DRPLS DMC_ReadPositionLagStatus
DRPLS_OutfRge BOOL
DRPLS_Bsy BOOL
DRPLS_Err BOOL
DRPLS_ErrID WORD
MStop MC_Stop
Mstop_DEC LREAL
Mstop_Jerk LREAL
Mstop_Done BOOL
Mstop_Bsy BOOL
Mstop_Act BOOL
Mstop_Abt BOOL
Mstop_Err BOOL
Mstop_ErrID WORD
11- 1 93
DVP-50MC Series Motion Controller Operation Manual
DWP LS
DMC_WritePositionLagSetting
1 Axis Done DW PLS _Done
D WP LS_Ex Execute Busy DW PLS _Bsy
11 DWP LS_Lag
DW PLS _HTime
Lag
HoldTime
Error
ErrorID
DW PLS _Err
DW PLS _ErrID
1
D RP LS
DMC_ReadPositionLagStatus
1 Axis OutOfRange DR PLS_OutfRge
DRP LS_En Enable Busy DR PLS_Bsy
Error DR PLS_Err
ErrorID DR PLS_ErrID
MStop
MC_Stop
1 Axis Done MStop_Done
D RPLS _OutfRge Execute Busy MStop_Bsy
MStop_Dec Deceleration Active MStop_Act
MStop_Jerk Jerk CommandAborted MStop_Abt
Error MStop_Err
ErrorID MStop_ErrID
When DWPLS_Ex changes from FALSE to TRUE, set the position difference
value specified by Lag and the duration value specified by HoldTime for the
specified axis. When DWPLS_Done changes to TRUE, it indicates that the
parameters writing is completed.
11- 1 94
Chapter 11 Motion Control Instructions
11.3.27 DMC_WritePositionLagSetting
DMC_WriteP ositionLagSetting_instance
DMC_WriteP ositionLagSetting
Axis Done
Execut e Busy
Lag Error
HoldTime ErrorID
Input Parameters
Refer to
Functions of
When Execute
Specify the number of the axis which Section 2.2.
Axis USINT changes from
is to be controlled. (The variable
FALSE to TRUE.
value must be
set)
Output Parameters
Parameter
Function Data type Valid range
name
11- 1 95
DVP-50MC Series Motion Controller Operation Manual
Parameter
Function Data type Valid range
name
Busy When the instruction is being executed. When Error changes to TRUE.
Function
11- 1 96
Chapter 11 Motion Control Instructions
11.3.28 DMC_ChangeMechanismGearRatio
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions
When Execute
Specify the number of the axis of Section 2.2.
Axis USINT changes from
which is to be controlled. (The variable
FALSE to TRUE.
value must be set)
11- 1 97
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
Output Parameters
Parameter
Function Data type Valid range
name
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 1 98
Chapter 11 Motion Control Instructions
Case 1 Ca se 2
11
E xec ute
Done
Bus y
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. When the instruction
execution is completed, Done changes to TRUE and Busy changes to FALSE. When Execute
changes to FALSE, Done changes to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
When Execute changes from TRUE to FALSE, Error changes to FALSE and the value of
ErrorID is cleared to 0.
Function
DMC_ChangeMechanismGearRatio is used for modifying parameter values for the terminal actuator.
The instruction can change axis parameter values so as to make them consistent with actual
parameter values, which is more convenient for users to operate.
The instruction can be executed only when the axis is in Disabled or Standstill state.
11- 1 99
DVP-50MC Series Motion Controller Operation Manual
11.3.29 DMC_TorqueControl
DMC_TorqueControl_inst ance
DMC_TorqueControl
Ax is InTorqu e
Enable Busy
Cont inuous Upda te Ac tiv e
Torque CommandAborted
TorqueRamp Error
Veloc it y ErrorID
Ac celeration
Deceleration
Jerk
Direc tion
Buf ferMode
Input Parameters
Refer to Functions of
Specify the number of the When Enable
Section 2.2.
Axis axis which is to be USINT changes to
(The variable value
controlled. TRUE.
must be set)
ContinuousUpdate Reserved - - -
11- 2 00
Chapter 11 Motion Control Instructions
11- 2 01
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
11- 2 02
Chapter 11 Motion Control Instructions
Ca se 1 Case 2 Cas e 3
E nable 11
I nTorque
Bus y
A ct iv e
Co mma ndAbo rt ed
Error
Error ID
Case 1: When Enable changes from FALSE to TRUE, Busy changes to TRUE. When the instruction
starts to control the axis, Active changes to TRUE. InTorque changes to TRUE when the set
target torque is reached. When Enable changes from TRUE to FALSE, Busy, Active and
Intorque change to FALSE.
Case 2: When the instruction is aborted by MC_Stop after Enable changes from FALSE to TRUE,
CommandAborted changes to TRUE and meanwhile InTorque, Busy and Active change to
FALSE. When Enable changes from TRUE to FALSE, CommandAborted changes to FALSE.
Case 3: The input parameter is illegal (such as axis number: 0) before the instruction is executed. When
Enable changes from FALSE to TRUE, Busy changes to TRUE and one cycle later, Error
changes to TRUE, Busy changes to FALSE and ErrorID shows corresponding error codes.
When Enable changes from TRUE to FALSE, Error changes from TRUE to FALSE and the value
of ErrorID is cleared to 0.
Function
DMC_TorqueControl controls an axis to work under torque mode and carry out the torque output.
Based on the set change rate of the torque, axis motion will change in the process from current toque
to target torque. If the torque value is modified during the execution of the instruction, the torque of the
servo will immediately change according to the change rate of the torque and then the servo will keep
the torque value for motion. During the execution of the instruction, the instruction will control the
velocity of the axis not to exceed the set maximum velocity.
To stop the instruction, change Enable to FALSE or use MC_Stop to make the instruction aborted.
When Enable changes from TRUE to FALSE, the axis will exit from the torque mode and the torque will
change immediately (the change rate of the torque will be invalid). If the axis needs to stop gradually
according to the change rate of the torque, just set the target torque to 0, wait for the actual output
torque of the axis to change to 0 and then change Enable to FALSE.
11- 2 03
DVP-50MC Series Motion Controller Operation Manual
Programming Example
1. The variable table and program
11
Variable name Data type Initial value
1
Pwr MC_Power
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
TC DMC_TorqueControl
TC_Tor INT 30
TC_Dir MC_Direction 1
TC_InTor BOOL
TC_Bsy BOOL
TC_Act BOOL
TC_Abt BOOL
TC_Err BOOL
TC_ErrID WORD
11- 2 04
Chapter 11 Motion Control Instructions
Pwr
MC_Power 1
Axis1 Axis Status Pwr_S ta
Pwr_En Enab le Busy Pwr_Bsy
Pwr_EnPs
True
Enab lePosit ive
Enab leNegative
Act ive
Error
Pwr_Act
Pwr_Err
11
Pwr_BM Bu fferMode ErrorID Pwr_ErrID
TC
DMC_To rqueControl 2
A xis1 Axis InTorqu e TC_InTor
TC_En Enab le Busy TC_Bsy
Cont inuousUpd ate Active TC_Act
TC_Tor Torque CommandAborted TC_Abt
TC_TorRa TorqueRamp Error TC_Err
100000.0 Velocit y ErrorID TC_ErrID
100.0 Acceleration
100.0 Dece leration
15.0 Jerk
TC_Dir Direction
TC_BM Bu fferMode
Torqu e
30
TC_En
TC_InTor
TC_Bu
TC_Ac
TC_Err
TC_ErrID
When TC_En changes from FALSE to TRUE, DMC_TorqueControl is executed. Meanwhile TC_Bsy
changes from FALSE to TRUE. When TC_Act changes to TRUE, the instruction starts to control the axis
and the torque value will be increased according to the set change rate of the torque.
After the value of TC_Tor is set to 0, the torque value is decreased to 0 according to the set change rate
of the torque.
When TC_En changes from TRUE to FALSE, TC_InTor, TC_Bsy and TC_Act change from FALSE to
TRUE and the servo exits from the torque mode.
11- 2 05
DVP-50MC Series Motion Controller Operation Manual
11.3.30 DMC_MoveVelocity
Function
DMC_MoveVelocity changes the velocity and makes the axis velocity valid immediately during execution of
the velocity instruction. The function of the instruction is similar to MC_MoveVelocity instruction. The only
difference between the two instructions is that changing the values of Velocity, Acceleration, Deceleration,
Jerk and Direction of the instruction will take effect immediately as Enable is TRUE.
For details on parameters and data types, refer to MC_MoveVelocity.
11- 2 06
Chapter 11 Motion Control Instructions
11.3.31 DMC_SwitchSoftLimit
DVP50MC11T/DVP50MC11T-06
11
FB DMC_SwitchSoftLimit controls the software limit switch. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
Input Parameters
Refer to Functions of
When Enable
Specify the number of the axis Section 2.2.
Axis USINT changes to
which is to be controlled. (The variable value
TRUE.
must be set)
The instruction is executed When Enable
TRUE or FALSE
Enable when Enable changes from BOOL changes to
(FALSE)
FALSE to TRUE. TRUE.
FALSE: Turn the software limit
When Enable
switch OFF. TRUE or FALSE
Switch BOOL- changes to
TRUE: Turn the software limit (FALSE)
TRUE.
switch ON.
Output Parameters
Parameter
Function Data type Valid range
name
Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
11- 2 07
DVP-50MC Series Motion Controller Operation Manual
Function
DMC_SwitchSoftLimit controls the software limit switch. When Switch is TRUE and the instruction execution
is completed, the software limit switch turns ON. When Switch is FALSE and the instruction execution is
completed, the software limit switch turns OFF.
Also, users could set the switch by clicking Network Configuration-> Motion->Axis Configuration->General in
the software without using the instruction.
The maximum position and minimum position need be set through the software.
After the software limit switch is ON, an error will occur if the axis position which is being controlled by
motion instructions exceeds the software limit range.
Programming Example
The variable table and program
SSL DMC_SwitchSoftLimit
Axis1 USINT 1
SSL_Done BOOL
SSL_Err BOOL
SSL_ErrID WORD
S SL
DMC_Swit chS oftLimit 1
Ax is 1 Ax is Done SS L_Done
SS L_En Enable Error SS L_Err
SSL_Swh Swit ch E rrorI D SS L_ErrI D
11- 2 08
Chapter 11 Motion Control Instructions
When SSL_Swh is TRUE and SSL_En changes from FALSE to TRUE, the instruction is
executed. When the instruction execution is completed, SSL_Done changes to TRUE and the
number 1 software limit switch is enabled.
When SSL_Swh is FALSE and SSL_En changes from FALSE to TRUE, the instruction is 11
executed.
11- 2 09
DVP-50MC Series Motion Controller Operation Manual
MC_G earIn_instance
MC_GearIn
Master InGear
Slave Busy
Execute Act ive
Cont inuousUpd ate CommandAborted
RatioNumerato r Error
RatioDenominator E rrorID
Mast erValueSource
Acceleration
Dece leration
Jerk
Bu fferMode
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions
Specify the number of the When Execute
of Section 2.2.
Master master axis which is to be USINT changes from
(The variable value
controlled by the instruction FALSE to TRUE
must be set)
Refer to Functions
Specify the number of the When Execute
of Section 2.2.
Slave slave axis which is to be USINT changes from
(The variable value
controlled by the instruction FALSE to TRUE
must be set)
ContinuousUpdate Reserved - - -
11- 2 10
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
Positive number
and negative When Execute 11
RatioNumerator Gear ratio Numerator LREAL number changes from
(The variable value FALSE to TRUE
must be set)
Notes:
1. The execution of MC_GearIn is started when Execute changes from FALSE to TRUE. No matter
whether the execution of the instruction is completed or not, the instruction can be re-executed
when Execute changes from FALSE to TRUE once again. After re-execution, only RatioNumerator,
RatioDenominator, MasterValueSource, Acceleration, Deceleration and Jerk parameters will be
effective again.
2. The slave axis specified by MC_GearIn instruction can execute other motion instruction while
MC_GearIn is being executed. While other motion instruction aborts the MC_GearIn instruction, the
gear relationship between the master axis and slave axis will disconnected. MC_Halt or MC_Stop
can abort the motion of the slave axis.
3. Refer to section 10.2 for the relation among Acceleration, Deceleration and Jerk.
11- 211
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
Active TRUE when the axis is being controlled. BOOL TRUE / FALSE
11- 2 12
Chapter 11 Motion Control Instructions
Execute
I nGea r
B usy
Active
Co mma ndAbo rt ed
Error
E rro r ID
Case 1. Busy changes to TRUE as Execute changes from FALSE to TRUE. One period later, Active
changes to TRUE. When the synchronous state is reached, InGear changes to TRUE and
meanwhile Busy and Active remain TRUE.
Case 2. When Execute changes to TRUE and the slave axis is controlled by other instruction,
MC_GearIn instruction is aborted by other instruction and CommandAborted changes to TRUE.
Meanwhile Busy and Active change to FALSE. When Execute changes from TRUE to FALSE,
CommandAborted changes to FALSE.
Case 3. When Execute changes from FALSE to TRUE and an error such as a parameter mistake occurs,
Error changes to TRUE and ErrorID shows corresponding error codes. Meanwhile InGear, Busy
and Active change to FALSE. As Execute changes from TRUE to FALSE, Error changes to
FALSE.
11- 2 13
DVP-50MC Series Motion Controller Operation Manual
Case 4. After Execute changes from TRUE to FALSE in the process of execution of MC_GearIn, InGear
changes to TRUE and meanwhile Busy and Active remain TRUE.
Function
11
1. MC_GearIn is used for establishing an electronic gear relationship between two axes. After the
1
MC_GearIn instruction is executed, the slave axis performs the gear operation with the master axis
according to the parameters, RatioNumerator, RatioDenominator, Acceleration, Deceleration, Jerk
and BufferMode. The master axis can be a real axis, virtual axis or encoder axis. The salve axis can
be a real axis or virtual axis.
2. In the instruction execution, the slave axis need be enabled and the master axis can be enabled or
disabled.
3. If the MC_GearIn instruction is executed when the e-gear relationship between two axes has not
been built yet, the velocity of the slave axis will reach the target velocity according to the values of
RatioNumerator, RatioDenomenator, Acceleration, Deceleration and Jerk specified by the instruction.
RatioNumerator
Ac c elera ti on (or D ec eler ation)o f Sl av e axi s= Ac ce lerati on (or D ec eler ati on) of M aster a xi s x
R atioD enom inator
After the e-gear relationship between two axes has been built (when InGear of the instruction
changes to TRUE), the relationship among the velocity of the slave axis, gear ratio numerator, gear
ratio denominator and the velocity of the master axis is shown as below.
G ear rat io n umeberat or
Target veloc it y of Slave axis = Veloc ity of Mast er axis x
G ear rati o denomi nat or
4. E-gear ratio
Ra tio Num er ato r
E -g ea r r ati o=
Ra tio Den o min ato r
If the e-gear ratio is a positive number, the motion directions of the slave axis and master axis are
same.
If the e-gear ratio is a negative number, the motion directions of the slave axis and master axis are
opposite.
Programming Example
11- 2 14
Chapter 11 Motion Control Instructions
Vel MC_MoveVelocity
Axis1 USINT 1
Axis2 USINT 2
11
Vel_Ex BOOL FALSE
Vel_Dir MC_DIRECTION 1
Vel_BM MC_Buffer_Mode 0
Vel_Invel BOOL
Vel_Bsy BOOL
Vel_Act BOOL
Vel_Abt BOOL
Vel_Err BOOL
Vel_ErrID WORD
GearIn1 MC_GearIn
GearIn1_BM MC_Buffer_Mode 0
GearIn1_InGear BOOL
GearIn1_Bsy BOOL
GearIn1_Act BOOL
GearIn1_Abt BOOL
GearIn1_Err BOOL
GearIn1_ErrID WORD
GearIn2 MC_GearIn
GearIn2_BM MC_Buffer_Mode 0
GearIn2_InGear BOOL
GearIn2_Bsy BOOL
GearIn2_Act BOOL
GearIn2_Abt BOOL
GearIn2_Err BOOL
GearIn2_ErrID WORD
11- 2 15
DVP-50MC Series Motion Controller Operation Manual
Vel
MC_MoveVelocity 1
Axis1 Axis Inve locit y Vel_Invel
Vel_E x Execute Busy Vel_Bsy
11 ContinuousUpdate A ctive Vel_Act
1 40000.0
10000.0
Velocity
Acceleration
CommandA bort ed
Error
Vel_Abt
Vel_Err
10000.0 Decelerat ion ErrorID Vel_ErrID
10000.0 Jerk
Vel_Dir Direct ion
Vel_BM BufferMode
GearIn1
MC_Gea rIn 2
Axis1 Master I nGear GearIn1_I nGear
Axis2 Slave Busy GearIn1_Bsy
GearIn1_Ex Execute Active GearIn1_Act
ContinuousUpdate CommandAbo rt ed GearIn1_Abt
1 Rat ioNumerator Error GearIn1_Err
1 Rat ioDenominator ErrorI D GearIn1_ErrID
0 MasterValueSource
10000.0 Acceleration
20000.0 Decelerat ion
8000 Jerk
GearIn1_BM BufferMode
GearIn2
MC_Gea rIn 3
Axis1 Master I nGear GearIn2_I nGear
Axis2 Slave Busy GearIn2_Bsy
GearIn2_Ex Execute Active GearIn2_Act
ContinuousUpdate CommandAbo rt ed GearIn2_Abt
2 Rat ioNumerator Error GearIn2_Err
1 Rat ioDenominator ErrorI D GearIn2_ErrID
0 MasterValueSource
10000.0 Acceleration
20000.0 Decelerat ion
8000 Jerk
GearIn2_BM BufferMode
11- 2 16
Chapter 11 Motion Control Instructions
Ve locit y
M aster a xis (Axis1)
400 00
11
Time
Ve locit y
S lave axis(Axis2)
80000
400 00
G earI n1_Ex
GearIn1_InGear
GearIn1_Bsy
GearIn1_A ct
G earIn1_Abt
GearIn 1_Err
Gear In2
G earI n2_Ex
GearIn2_InGear
GearIn2_B sy
GearIn2_A ct
G earIn2_Abt
GearIn 2_Err
Vel
Vel_Ex
Vel_Invel
Vel_B sy
Vel_A ct
Vel_Abt
Vel Err
Vel_Ex changes from FALSE to TRUE after the e-gear relationship between the master axis
and slave axis is built. One period later, Vel_Act changes to TRUE, the master axis performs
the velocity instruction and the slave axis follows the master axis for motion.
11- 2 17
DVP-50MC Series Motion Controller Operation Manual
11- 2 18
Chapter 11 Motion Control Instructions
11.4.2 MC_GearOut
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
Notes:
1. The slave axis will continue to move at the speed of disconnection if the slave axis disconnects
from the e-gear relationship through the MC_GearOut instruction after the two axes has built the e-
gear relationship through the MC_GearIn instruction.
2. The slave axis can execute other motion instructions after the MC_GearOut instruction execution is
completed.
3. The relationship between the master axis and slave axis is disconnected through the MC_GearOut
instruction. To stop the motion of the slave axis, MC_Halt or MC_Stop instruction can be used.
Output Parameters
11- 2 19
DVP-50MC Series Motion Controller Operation Manual
11- 2 20
Chapter 11 Motion Control Instructions
Execute
Done
B usy
Co mma ndAbo rt ed
Error
E rro r ID
Case 1. Busy changes to TRUE as Execute changes from FALSE to TRUE. One period later, Done
changes to TRUE. Busy and Done remain TRUE after Execute changes from TRUE to
FALSE.
Case 2. If the MC_GearOut instruction is aborted by other instruction as Execute changes to TRUE,
CommandAborted changes to TRUE and meanwhile Busy and Done change to FALSE.
CommandAborted changes to FALSE as Execute changes from TRUE to FALSE.
Case 3. When an error occurs (e.g. the axis is disabled), Error changes to TRUE and ErrorID shows
corresponding error codes after Execute changes from FALSE to TRUE. Meanwhile, Busy and
Done change to FALSE. As Execute changes from TRUE to FALSE, Error changes to FALSE.
Case 4. Execute changes from TRUE to FALSE before a period is reached during execution of the
MC_GearOut instruction. Done changes to TRUE and Busy remains TRUE as a period is
reached.
Programming Example
Vel MC_MoveVelocity
Axis1 USINT 1
Axis2 USINT 2
Vel_Dir MC_DIRECTION 1
11- 2 21
DVP-50MC Series Motion Controller Operation Manual
Vel_BM MC_Buffer_Mode 0
Vel_Invel BOOL
11
Vel_Bsy BOOL
1
Vel_Act BOOL
Vel_Abt BOOL
Vel_Err BOOL
Vel_ErrID WORD
GearIn_BM MC_Buffer_Mode 0
GearIn_InGear BOOL
GearIn_Bsy BOOL
GearIn_Act BOOL
GearIn_Abt BOOL
GearIn_Err BOOL
GearIn_ErrID WORD
GearOut_Done BOOL
GearOut_Bsy BOOL
GearOut_Act BOOL
GearOut_Abt BOOL
GearOut_Err BOOL
GearOut_ErrID WORD
11- 2 22
Chapter 11 Motion Control Instructions
Vel
MC_MoveVelocit y 1
Axis1 A xis Invelocity Vel_I nvel
Vel_Ex Execute Busy Vel_Bsy
11
Continu ousUpdate Active Vel_Act
40000.0 Velocity CommandAborted Vel_A bt
10000.0 A cceleration Error Vel_E rr
10000.0 Deceleration ErrorI D Vel_E rrID
10000.0 Jerk
Vel_Dir Direction
Vel_B M BufferMode
GearIn
MC_GearIn 2
Axis1 Master InG ear GearIn_InG ear
Axis2 Slave Busy GearIn_Bsy
GearIn_Ex Exe cute Active GearIn_Act
Contin uousUpdate CommandAborted GearIn_Abt
1 Rat ioNumerator Error GearIn_Err
1 Rat ioDenominat or ErrorID GearIn_ErrID
0 MasterValueSource
10000.0 A cceleration
20000.0 Deceleration
8000 Jerk
G earI n_BM BufferMode
GearOut
MC_GearOut 3
Axis2 Slave Done Gea rO ut_Do ne
GearOut_Ex Execute Busy GearO ut_Bsy
Co mmandAborted GearOut _Abt
Error GearOut _Err
ErrorI D GearOut _ErrI D
11- 2 23
DVP-50MC Series Motion Controller Operation Manual
Velocity
Velocity of Ma st er axis
40000
11
1
Time
Velocity
GearI n Time
GearIn_Ex
G earI n_InGear
GearIn_Bsy
GearIn_Act
GearIn _Abt
GearIn_Err
GearO ut
GearOut_Ex
GearOut_Done
G earOut_Bsy
GearOut_ Abt
GearOut_Err
Vel
Vel_Ex
Vel_ Invel
Vel_Bsy
Vel_Act
Vel_ Abt
Ve l Err
As GearIn_Ex changes from FALSE to TRUE, GearIn_Bsy changes to TRUE. And one period
later, GearIn_InGear changes to TRUE and the gear relationship between the master axis and
slave axis is built.
After the gear relationship between the two axes is built, Vel_Ex changes from FALSE to
TRUE. One period later, Vel_Act changes to TRUE. The master axis executes the velocity
instruction and the slave axis moves by following the motion of the master axis.
While the master axis is executing the velocity instruction, GearOut_Ex changes from FALSE
to TRUE and GearOut_Bsy changes to TRUE. One period later, GearOut_Done and
GearIn_Abt change to TRUE. And the slave axis will continue to move at the current speed.
11- 2 24
Chapter 11 Motion Control Instructions
11.4.3 MC_CombineAxes
MC_CombineAxes_instance
MC_Combin eAxe s
Master1 InSync
Master2 Busy
Slave Active
Execute CommandA borted
Cont inuousUpd ate Error
CombineMode E rrorI D
G earRatioNumerat orM1
G earRatioDenominato rM1
G earRatioNumerat orM2
GearRatioDe nominatorM2
MasterValueSourceM1
MasterVa lueSourceM2
Acc
Dec
Jerk
B ufferMode
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions of
When Execute
The position source of Section 2.2.
Master1 USINT changes from FALSE
axis 1 (The variable value
to TRUE
must be set)
Refer to Functions of
When Execute
The position source of Section 2.2.
Master2 USINT changes from FALSE
axis 2 (The variable value
to TRUE
must be set)
Refer to Functions of
When Execute
Section 2.2.
Slave The controlled slave USINT changes from FALSE
(The variable value
to TRUE
must be set)
11- 2 25
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
11 executed when Execute TRUE or FALSE
1 Execute
changes from FALSE to
BOOL
(FALSE)
--
TRUE.
ContinuousUpdate Reserved - - -
Combining method
selection.
0: Sum of two master 0: mcAddAxes、1: When Execute
MC_Combi
CombineMode axis position variations mcSubAxes changes from FALSE
neMode
1: Difference of two (0) to TRUE
master axis position
variations
Positive number or
When Execute
GearRatioNumerat Specify the master axis1 negative number
LREAL changes from FALSE
orM1 gear ratio numerator. (The variable value
to TRUE
must be set)
Positive number or
When Execute
GearRatioDenomin Specify the master axis1 negative number
LREAL changes from FALSE
atorM1 gear ratio denominator. (The variable value
to TRUE
must be set)
Positive number or
When Execute
GearRatioNumerat Specify the master axis2 negative number
LREAL changes from FALSE
orM2 gear ratio numerator. (The variable value
to TRUE
must be set)
Positive number or
When Execute
GearRatioDenomin Specify the master axis2 negative number
LREAL changes from FALSE
atorM2 gear ratio denominator. (The variable value
to TRUE
must be set)
Specify the
synchronization position 0:mcSetValue When Execute
MasterValueSourc MC_SOUR
source of master axis 1. 1:mcActualValue changes from FALSE
eM1 CE
0:Command position (0) to TRUE
1:Actual position
11- 2 26
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
Specify the
synchronization position 0:mcSetValue When Execute
11
MasterValueSourc MC_SOUR
source of master axis 2. 1:mcActualValue changes from FALSE
eM2 CE
0:Command position (0) to TRUE
1:Actual position
Output Parameters
11- 2 27
DVP-50MC Series Motion Controller Operation Manual
11- 2 28
Chapter 11 Motion Control Instructions
11
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. One cycle later, Active
changes to TRUE. When the slave axis has synchronized with the two master axes, InSync
changes to TRUE and Busy and Active remain TRUE.
Case 2: When Execute is TRUE, Busy is TRUE and Active is TRUE. When the slave have synchronized
with the two master axes, InSync is TRUE. At the moment, the instruction is aborted by another
instruction, CommandAborted changes to TRUE and meanwhile Invelocity, Busy and Active
change to FALSE. When Execute changes from TRUE to FALSE, CommandAborted changes
to FALSE.
Case 3: When Execute changes from FALSE to TRUE, Error changes to TRUE and ErrorID shows
corresponding error codes when an error occurs such as axis alarms or offline. Meanwhile,
InSync, Busy and Active change to FALSE. When Execute changes from TRUE to FALSE, Error
changes to FALSE.
Case 4: The instruction is still executed and the states of Busy and Active do not change after Execute
changes from TRUE to FALSE during execution of the instruction. When the slave axis has
been synchronized with the two master axes, InSync changes to TRUE and Busy and Active
remain TRUE.
Function
MC_CombineAxes outputs the sum or difference of the position variations of two master axes as the
slave position variation.
Combine modes: Addition or Subtraction
The addition or subtraction of the position variations of master axis 1 and master axis 2 are
conducted and the calculation result is output as slave axis position variation.
CombineMode is set to 0
11- 2 29
DVP-50MC Series Motion Controller Operation Manual
11
1
Velocit y
Slav e ax is
Time
CombineMode is set to 1
Veloc it y
Mas ter a xis 1
Slav e ax is
Time
The master gear ratio numerator and denominator are the factors to adjust the position variations
of two master axes. See the formula above.
MasterValueSource can be set to 0 (command position) and 1 (actual position) so as to specify the
source of the position variation. If the value is set to 0, add up the master axis command position
variations. If the value is set to 1, subtract one master axis actual position variation from another
master axis actual position variation.
The Acc, Dec and Jerk indicate that the master axis has been in motion before the instruction is
executed. If the instruction is executed at the moment, the slave axis will speed up or down
according to the set acceleration, deceleration and jerk so as to realize the synchronization with the
11- 2 30
Chapter 11 Motion Control Instructions
master position variations. When the synchronization is achieved, InSync is TRUE and the
instruction execution is completed.
Use other motion instruction (such as MC_Stop instruction) for the control over the slave axis so as
to end the master-slave axis relationship in the instruction. Set the value of BufferMode of other 11
motion instruction which has the Buffermode parameter to 0 in order to abort the
MC_CombineAxes instruction and disconnect the master-slave axis relationship.
If the master axis gear ratio is to be switched during the motion, use another MC_CombineAxes
instruction to abort the MC_CombineAxes instruction which is being executed.
Programming Example
The example of executing the MC_CombineAxes instruction is described as below.
Pwr1 MC_Power
Axis1 USINT 1
Pwr1_BM MC_Buffer_Mode 1
Pwr1_Sta BOOL
Pwr1_Bsy BOOL
Pwr1_Act BOOL
Pwr1_Err BOOL
Pwr1_ErrID WORD
Pwr2 MC_Power
Axis2 USINT 1
Pwr2_BM MC_Buffer_Mode 1
Pwr2_Sta BOOL
Pwr2_Bsy BOOL
Pwr2_Act BOOL
Pwr2_Err BOOL
Pwr2_ErrID WORD
Pwr3 MC_Power
Axis3 USINT 1
Pwr3_BM MC_Buffer_Mode 1
Pwr3_Sta BOOL
Pwr3_Bsy BOOL
11- 2 31
DVP-50MC Series Motion Controller Operation Manual
Pwr3_Act BOOL
Pwr3_Err BOOL
11
Pwr3_ErrID WORD
1
CombinA MC_CombineAxes
CombinA_BM MC_Buffer_Mode 1
CombinA_InSync BOOL
CombinA_Bsy BOOL
CombinA_Act BOOL
CombinA_Abt BOOL
CombinA_Err BOOL
CombinA_ErrID WORD
Rel1 MC_MoveRelative
Rel1_Dir MC_DIRECTION 1
Rel1_BM MC_Buffer_Mode 0
Rel1_Done BOOL
Rel1_Bsy BOOL
Rel1_Act BOOL
Rel1_Abt BOOL
Rel1_Err BOOL
Rel1_ErrID WORD
Rel2 MC_MoveRelative
Rel2_Dir MC_DIRECTION 1
Rel2_BM MC_Buffer_Mode 0
Rel2_Done BOOL
Rel2_Bsy BOOL
Rel2_Act BOOL
Rel2_Abt BOOL
Rel2_Err BOOL
Rel2_ErrID WORD
11- 2 32
Chapter 11 Motion Control Instructions
Pwr1 CombinA
MC_Power 1 MC_CombineAxes 4
Axis1 Axis Status Pwr1_Sta Axis1 Master1 InSync CombinA_InSync
11
Pwr1_En Enable Busy Pwr1_Bsy Axis2 Master2 Busy CombinA_Bsy
True EnablePositive Active Pwr1_Act Axis3 Slave Active CombinA_Act
True EnableNegative Error Pwr1_Err CombinA_Ex Execute CommandAborted CombinA_Abt
Pwr1_BM BufferMode ErrorID Pwr1_ErrID FA LSE ContinuousUpdate Error CombinA_Err
0 CombineMode ErrorID CombinA_ErrID
Pwr2
1.0 GearRatioNumeratorM1
MC_Power 2
1.0 GearRatioDenominatorM1
Axis2 Axis Status Pwr2_Sta 1.0 GearRatioNumeratorM2
Pwr2_En Enable Busy Pwr2_Bsy 1.0 GearRatioDenominatorM2
True EnablePositive Active Pwr2_Act 0 MasterValueSourceM1
True EnableNegative Error Pwr2_Err 0 MasterValueSourceM2
Pwr2_BM BufferMode ErrorID Pwr2_ErrID 10000.0 Acc
Pwr3 10000.0 Dec
10000.0. Jerk
MC_Power 3
CombinA_BM BufferMode
Axis3 Axis Status Pwr3_Sta
Pwr3_En Enable Busy Pwr3_Bsy
True EnablePositive Active Pwr3_Act
True EnableNegative Error Pwr3_Err
Pwr3_BM BufferMode ErrorID Pwr3_ErrID
Rel1
MC_MoveRelative 5
Axis1 Axis Done Rel1_Done
Rel1_Ex Execute Busy Rel1_Bsy
ContinuousUpdate Active Rel1_Act
100000.0 Distance CommandAborted Rel1_Abt
10000.0 Velocity Error Rel1_Err
10000.0 Acceleration ErrorID Rel1_ErrID
10000.0 Deceleration
10000.0 Jerk
Rel1_B M BufferMode
Rel2
MC_MoveRelative 6
Axis2 Axis Done Rel2_Done
Rel2_Ex Execute Busy Rel2_Bsy
ContinuousUpdate Active Rel2_Act
70000.0 Distance CommandAborted Rel2_Abt
8000.0 Velocity Error Rel2_Err
6000.0 Acceleration ErrorID Rel2_ErrID
6000.0 Deceleration
4000.0 Jerk
Rel2_B M BufferMode
11- 2 33
DVP-50MC Series Motion Controller Operation Manual
Veloc ity
Slav e ax is
11
1
Mas ter ax is 1
Time
Com bi nA
Comb in A_Ex
CombinA_I nSy nc
CombinA_B sy
CombinA _Ac t
Rel 1 / Rel2
Rel1_E x / Rel2_Ex
Rel1_Don e / Re l2 _Done
When CombinA_Ex change from FALSE to TRUE, the execution of the MC_CombineAxes
instruction starts. After a period of time, the instruction execution succeeds, CombinA_InSync
changes to TRUE and three axes can go into the synchronized motion as required. At the
moment, Executes of MC_MoveRelatives for the two master axes are set to TRUE and then
the two master axes start to run and meanwhile the slave also starts to run according to the
sum of two master axis position variations. The slave axis position variation is the sum of the
two master axis position variations in the unit time.
After the instructions executed for the master axes are completed, the three axes remain in
the synchronized state. To abort the synchronization state of the three axes, use MC_Stop
instruction to abort the slave axis motion and disconnect the synchronization state.
11- 2 34
Chapter 11 Motion Control Instructions
The cam is the component with the curve profile or grooves. It transmits the motion to the follower near its
edge and the rack will turn periodically following the follower. The cam mechanism consists of a cam,
follower and rack. The following figure shows the cam profile made up of point A, B, C, and D. AB' is a 11
follower which is connected to the rack. δ4 is an inner angle of repose; δ2 is an external angle of repose.
The radius of the base circle is r0 and S is the cam curve.
Figure 11.4.4.1
The electronic cam is an analog cam of the mechanical cam through applying computer technology.
Compared with the mechanical cam, the electronic cam has many advantages of being easy to design and
modify; cost saving; higher efficiency and preciseness. Because the electronic cam is an analog cam, the
defects of a mechanical cam like being easy to be damaged and not fit for high-speed rotation and
transmission can be avoided for the electronic cam.
the motion controller controller supports the function of the electronic cam. User can edit the cam curve in
the corresponding cam editor software.
The cam curve need be called in the motion control program after being edited. The motion control program
can call the cam curve by using the MC_CamIn instruction.
11- 2 35
DVP-50MC Series Motion Controller Operation Manual
11.4.5 MC_CamIn
MC_CamIn_instance
MC_CamIn
Master InSync
Slave EndOfProfile
Execute Busy
ContinuousUpdate Active
CamTable CommandAborted
Periodic Error
MasterAbsolute ErrorID
SlaveAbsolute
MasterOffset
SlaveOffset
MasterScaling
SlaveScaling
MasterStartDistance
MasterSyncPosition
ActivationPosition
ActivationMode
StartMode
Velocity
Acceleration
Deceleration
Jerk
MasterValueSource
BufferMode
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Refer to Functions of
Specify the number of the When Execute
Section 2.2.
Master master axis in the USINT changes from
(The variable value must
electronic cam operation. FALSE to TRUE
be set)
Refer to Functions of
Specify the number of the When Execute
Section 2.2.
Slave slave axis in the electronic USINT changes from
(The variable value must
cam operation. FALSE to TRUE
be set)
11- 2 36
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
ContinuousUpdate Reserved
11- 2 37
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
Positive number or
11 When Execute
Specify the scaling of the negative number
1 SlaveScaling LREAL changes from
slave axis position. (The variable value must
FALSE to TRUE
be set)
MasterStartDistanc
Reserved
e
MasterSyncPositio
Reserved
n
0: mcRelative
(Relative axis position)
1: mcAbsolute
(Absolute axis
Specify the mode of the MC_ACTI When Execute
position)
ActivationMode position where to start the VATION_ changes from
2: mcPhase_Axis
engagement MODE FALSE to TRUE
(Absolute axis phase)
3: mcPhase_CAM
(Absolute cam phase)
(0)
0: mcRampInShortest
(The shortest way)
11- 2 38
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
Jerk Reserved - - -
Note:
1. The MC_CamIn instruction execution starts when Execute changes from FALSE to TRUE. Changing
Execute from TRUE to FALSE does not influence the instruction execution during execution of the
instruction.
2. Changing Execute from FALSE to TRUE again does not influence the instruction execution during
execution of the instruction. The instruction will keep going in the previous way.
3. Refer to Section 10.3 for details on BufferMode.
11- 2 39
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
When the cam motion reaches the end One period after EndOfProfile changes
EndOfProfile
point in the cam table. to TRUE
11- 2 40
Chapter 11 Motion Control Instructions
11- 2 41
DVP-50MC Series Motion Controller Operation Manual
11
1
Case 1: Busy changes to TRUE as Execute changes from FALSE to TRUE. And one period later,
Active changes to TRUE. When the slave axis and master axis are in the synchronous
motion, InSync changes from FALSE to TRUE. When the final point of the cam cycle is
reached, EndOfProfile changes from FALSE to TRUE and changes to FALSE one cycle
later. When the cam relationship between the slave axis and master axis is disconnected
(e.g. by executing the MC_CamOut instruction), CommandAborted changes from FALSE to
TRUE and InSync, Busy and Active all change from TRUE to FALSE. After that,
CommandAborted changes from TRUE to FALSE as Execute changes from TRUE to
FALSE.
Case 2: As an error occurs in the execution of the instruction, Error changes from FALSE to TRUE,
ErrorID shows corresponding error codes and InSync, Busy and Active all change from
TRUE to FALSE. After that, Error changes from TRUE to FALSE and the value of ErrorID
changes to 0 as Execute changes from TRUE to FALSE.
Case 3: The instruction execution still continues after Execute changes from TRUE to FALSE during
execution of the instruction. The timing for changing the state of InSync, EndOfProfile, Busy
and Active is consistent with what state they are in as Execute is TRUE. After that, InSync,
Busy and Active all change from TRUE to FALSE after the cam relationship between the
slave axis and master axis is disconnected. Meanwhile CommandAborted changes from
FALSE to TRUE and changes to FALSE one cycle later.
Case 4: If the cam motion is performed in the acyclic way (Periodic=FALSE), EndOfProfile changes
from FALSE to TRUE when the end point of the cam cycle is reached. Meanwhile InSync,
Busy and Active all change from TRUE to FALSE and EndOfProfile changes from TRUE to
FALSE one cycle later.
Function
The MC_CamIn instruction is used for making the slave axis and master axis move synchronously
according to the planned cam relationship. The MC_CamOut instruction is used for disconnecting the
cam relationship between the two axes.
11- 2 42
Chapter 11 Motion Control Instructions
1 3 5
NOTE: If ActivationPosition=0 and ActivationMode=0 (relative axis position), the slave axis
will move from current speed to SYNC speed. Except in the case above, the slave axis will
stop moving immediately! All set input parameters of the MC_CamIn instruction will be read
and retained for use in the execution.
11- 2 43
DVP-50MC Series Motion Controller Operation Manual
Stage 3: The slave axis starts to perform the engagement action when the master axis
passes the position specified by ActivationPosition. The parameters, MasterAbsolute,
SlaveAbsolute, MasterOffset, SlaveOffset, MasterScaling and SlaveScaling will work at the
11 moment for making sure of the corresponding relationship between the master axis position
1 and slave axis position and the cam phase.
NOTE: In the figure above, the set master axis position at the time when the engagement
begins is greater than the master position at the time when the MC_CamIn instruction
execution starts. The similar way is also applied to the circumstance that the set master
axis position at the time when the engagement begins is less than or equal to the master
position at the time when the MC_CamIn instruction execution starts.
ActivationPosition
The ActivationPosition parameter is the start position of the cam engagement, (which is the master
axis position). In other words, the slave axis starts to perform the engagement when the master
axis reaches the position specified by ActivationPosition after the MC_CamIn instruction is
triggered and executed.
ActivationPosition can be the master axis position, master axis phase, master axis cam phase,
which can be selected through the ActivationMode parameter.
11- 2 44
Chapter 11 Motion Control Instructions
For example: The master axis position is 100 and ActivationPosition 1000 at the time when the
MC_CamIn instruction execution starts. The master axis position is 1100 (1100=100+1000) as the
actual engagement begins.
10 0 1100
1 3 5
Stage 1: Trigger and execute the MC_CamIn instruction. The master axis absolute position is
100 at the moment.
Stage 2: Wait for the start of the engagement.
Stage 3: The master axis reaches the position for starting the engagement (1100) and the
slave axis starts to perform the engagement action.
Stage 4: The engagement is ongoing.
Stage 5: The engagement is completed and the master axis and slave axis achieve the
synchronization.
Stage 6: The master axis and slave axis are in the synchronous motion.
When ActivationMode =1, ActivationPosition is an axis position which is absolute to the master
axis position at the time when the MC_CamIn instruction is executed. The master axis position as
the actual engagement starts is ActivationPosition.
For example: The master axis position is 100 and ActivationPosition 1000 at the time when the
MC_CamIn instruction execution starts. The master axis position is 1000 (1000=
ActivationPosition) as the actual engagement begins.
10 0 1000
1 3 5
Stage 1: Trigger and execute the MC_CamIn instruction. The master axis absolute position is
100 at the moment.
Stage 2: Wait for the start of the engagement.
11- 2 45
DVP-50MC Series Motion Controller Operation Manual
Stage 3: The master axis reaches the position for starting the engagement (1000) and the
slave axis starts to perform the engagement action.
Stage 4: The engagement is being conducted.
Stage 5: The engagement is completed and the master axis and slave axis achieve the
11 synchronization.
Stage 6: The master axis and slave axis are in the synchronous motion.
1
ActivationPosition: Absolute axis phase
When ActivationMode =2, ActivationPosition is an absolute axis phase which is the remainder got
by dividing the axis absolute position by modulo. The slave axis starts to perform the engagement
action as the master axis absolute phase is ActivationPosition.
The absolute axis phase is cyclic. Its absolute axis phase may be equal to ActivationPosition
many times in the motion of the master axis. But the slave axis starts to perform the engagement
action only when the absolute axis phase of the master axis is equal to ActivationPosition for the
first time after the MC_CamIn instruction is executed.
For example, the master axis modulo is 400, ActivationPosition=100 and the master axis position
is 1000 at the time when the MC_CamIn instruction is executed. The slave axis will not perform
the engagement action because the absolute axis phase of the master axis is 200
(200=1000%400) at the time when the MC_CamIn instruction is executed. The slave axis starts to
perform the engagement action as the master axis position is 1300 (Absolute axis phase is
100=1300%400) or 900 (Absolute axis phase is 100=900%400). (% means the mathematic
operation to find the remainder)
10 00 1300
Mas ter ax is po sition
2 4 6
1 3 5
Ca se 2
S lave a xis p osition
900 10 00
5 3 1
Stage 1: Trigger and execute the MC_CamIn instruction. The master axis absolute position is
1000 at the moment. (The absolute axis phase is 200)
11- 2 46
Chapter 11 Motion Control Instructions
NOTE: As ActivationPosition is the absolute axis phase, the range of the ActivationPosition
parameter value is 0~modulo (excluding modulo). If the value of ActivationPosition exceeds
the valid range, an error will occur and the instruction execution will fail as the MC_CamIn
instruction is executed.
When ActivationMode =3, ActivationPosition is the absolute cam phase which is the remainder
got by dividing the axis absolute position by its cam cycle. The slave axis starts to perform the
engagement action as the cam phase of the master axis is ActivationPosition.
The cam phase is cyclic. Its cam phase may be equal to ActivationPosition many times in the
motion of the master axis. But the slave axis starts to perform the engagement action only when
the cam phase of the master axis is equal to ActivationPosition for the first time after the
MC_CamIn instruction is executed.
For example, the maximum position of the master axis in the cam table is 360,
ActivationPosition=100 and the master axis position is 1000 at the time when the MC_CamIn
instruction is executed. The slave axis will not perform the engagement action because the
absolute cam phase of the master axis is 280 (280=1000%360) at the time when the MC_CamIn
instruction execution begins. Then the slave axis starts to perform the engagement action as the
master axis position is 1180 (Absolute cam phase is 100=1180%360) or 820 (Absolute cam
phase is 100=820%360).
11- 2 47
DVP-50MC Series Motion Controller Operation Manual
11
1
100 0 1180
Mas te r a xis posit io n
2 4 6
1 3 5
Case 2
Slav e axis pos it ion
820 1000
5 3 1
Stage 1: Trigger and execute the MC_CamIn instruction. The master axis absolute position is
1000 at the moment. (The absolute cam phase is 280)
Stage 2: Wait for the start of the engagement.
Stage 3: The master axis reaches the position for starting the engagement (The master axis
position is 1180 in circumstance 1 and 820 in circumstance 2) and the slave axis starts to
perform the engagement action.
Stage 4: The engagement is being conducted.
Stage 5: The engagement is completed and the master axis and slave axis achieve the
synchronization.
Stage 6: The master axis and slave axis are in the synchronous motion.
Note: As ActivationPosition is the absolute cam phase, the range of the ActivationPosition
parameter value is 0~ cam cycle value (excluding the cam cycle value). If the value of
ActivationPosition exceeds the valid range, an error will occur and the execution will fail as the
MC_CamIn instruction is executed.
Relationship between the master axis position and slave axis position
The cam relationship which is planned in the software is the position relationship between the
master axis and slave axis. The “position” mentioned here is the cam phase of the master axis /
slave axis instead of the actual axis position. If the cam relationship which is planned is seen as the
function CAM as below, the input of the function CAM is the master axis cam phase and the output
is the slave axis cam phase. The formula is shown as below.
y = CAM(x)
x:The master axis cam phase
y:The slave axis cam phase
11- 2 48
Chapter 11 Motion Control Instructions
The cam phase comes from the axis positions and there is a conversion between them. The
conversion between the axis position and cam phase is related with the MasterAbsolute,
SlaveAbsolute, MasterOffset, SlaveOffset, MasterScaling and SlaveScaling parameters.
The MasterAbsolute parameter is used for specifying the corresponding relationship between the
master axis position and the cam phase. As MasterAbsolute is TRUE, the master axis position and the
cam phase are in an absolute relationship. As MasterAbsolute is FALSE, the master axis position and
the cam phase are in a relative relationship. For SlaveAbsolute, the explanation is similar to that of
MasterAbsolute.
MasterAbsolute and SlaveAbsolute work at the moment when the engagement starts. That is to say
that the corresponding relationship between the axis position and cam phase is built at the beginning
of the engagement. (NOTE: The corresponding relationship is not built at the time when the
MC_CamIn instruction execution begins but when the engagement begins.) After that, the cam phase
is calculated according to the corresponding relationship.
Relative mode
The master axis position and its cam phase are in the relative relationship as the MasterAbsolute
parameter is FALSE. That is to say, the master axis position corresponds to its cam phase 0 at
the time when the engagement starts. After that, the master cam phase will be calculated
according to the corresponding relationship. For example, the master axis is in relative mode, the
maximum value of the master axis cam phase in the cam relationship is 360 and the master axis
position is 180 at the time when the engagement starts. So the master axis position 180
corresponds its cam phase 0; the master axis position 200 corresponds to its cam phase 20 (20=
(200-180) %360) and so on.
In this circumstance, the master axis position corresponds to its cam phase as shown in the
following figure.
11- 2 49
DVP-50MC Series Motion Controller Operation Manual
360
11
1
0 Master a xis p ositi on
-540 -180 180 54 0 9 00
As the SlaveAbsolute parameter is FALSE, the slave axis position and its cam phase are in the
relative relationship. That is to say, the slave axis cam phase and the master axis cam phase
meet the planned cam relationship at the time when the engagement starts. If the slave axis is in
relative mode, the method of being sure of the slave axis cam phase is different from the master
axis. When the slave axis cam phase is sure, it should meet the condition that the slave axis cam
phase and the master axis cam phase meet the planned cam relationship at the time when the
engagement starts.
For example, the slave axis is in relative mode, the maximum value of the slave axis cam phase
in the cam relationship is 360 and the slave axis position is 100 at the time when the engagement
starts. If the master axis cam phase is 0 at the moment (and the slave axis cam phase is 0 as
required in the cam relationship), the slave axis position 100 will correspond to its cam phase 0 as
shown in the following circumstance 1. If the slave axis cam phase is 200 as required in the cam
relationship, the slave axis position 100 will correspond to its cam phase 200 as shown in the
following circumstance 2.
Cas e1
Planned cam cu rve
Sl ave axis ca m phase
Slave axi s phase
30 0 360
360
200
200
0 360 Master 0
- 46 0 - 100 100 260 Slave axis positio n
a xis p hase
Absolute mode
11- 2 50
Chapter 11 Motion Control Instructions
When the MasterAbsolute parameter is TRUE, the master axis position and its cam phase are in
the absolute relationship. At any time, the master axis cam phase is equal to the remainder got by
dividing the master axis position at that time by the maximum value of the master axis cam phase
in the cam relationship. 11
For example, the master axis is in absolute mode and the maximum value of the master axis in
the cam relationship is 360. So its cam phase is 100 as the master axis position is 100
(100=100%360); its cam phase is 140 (140=500%360) as the master axis position is 500 and so
on. The master axis position corresponds to its cam phase as shown in the figure below.
3 60
The cam relationship between the master axis and slave axis is preplanned. But as the cam motion is
executed, the position offset or scaling based on the preplanned cam relationship can be performed
through setting the Offset and Scaling parameters. For example, there are various sizes for the same
product which is processed. Just one cam relationship need be planned and then changing the values
of Offset and Scaling fits the processing of products of different sizes.
The MasterOffset parameter is valid only when the master axis is in absolute or relative mode.
(MasterAbsolute=TRUE or FALSE). The SlaveOffset parameter is valid only as the slave axis is in
absolute mode (SlaveAbsolute=TRUE). The SlaveOffset parameter is invalid as the slave axis is in
relative mode (SlaveAbsolute=FALSE).
The position offset and scaling of the master axis and slave axis determine the actually executed cam
relationship. The effect is described in the following example. The planned cam relationship is shown
as the figure below.
11- 2 51
DVP-50MC Series Motion Controller Operation Manual
12 0
11
1
0
0 360
Ma ster axis cam phase
When the master axis and slave axis are both in absolute mode and the engagement begins, the
master axis position and slave axis position are both 0. When there is no position offset and scaling
(the offset and scaling are default values), the actual master axis position correspond to the actual
slave axis position in the execution of the cam motion as shown in the following figure.
Slave axis po siti on
12 0
0 3 60
Maste r axi s position
When the offset and scaling are not default values, the corresponding relationship between the actual
master axis position and actual slave axis position are affected in the execution of the cam motion as
below.
Cas e1 Cas e2
MasterScalin g=1 Ma sterScaling =1
Slave axis p ositi on SlaveScaling =1 Slave axis po siti on Slave Sca ling=2
240
12 0
0 360 0 360
Maste r axi s position Maste r axi s posi tion
11- 2 52
Chapter 11 Motion Control Instructions
Cas e3 C ase4
MasterScali ng=1 Maste rScal ing=0.5
Slave axis p osi ti on SlaveScalin g=0.5 Sla ve axis position SlaveScali ng=1
11
1 20
60
0 36 0 0 180 360
Master axis position Maste r axi s position
C ase5
Slave axis p osi ti on
Maste rScal ing=2
SlaveScali ng=1
12 0
0 36 0 720
Master axis position
Case 1. The actual cam relationship is consistent with the preplanned one as the values of
MasterScaling and SlaveScaling are 1 and their offsets are 0.
Case 2. The slave position corresponding to the master axis position is two times what is
planned in the cam relationship as the value of MasterScaling is 1, SlaveScaling is 2
and their offsets are 0.
Case 3. The slave position corresponding to the master axis position is 1/2 that in the planned
cam relationship as the value of MasterScaling is 1, SlaveScaling is 0.5 and their
offsets are 0.
Case 4. The master axis position corresponding to the slave axis position is 1/2 what is
planned as the value of MasterScaling is 0.5, SlaveScaling is 1 and their offsets are 0.
If it is observed from the perspective of the cam phase, the master axis cam phase is
1/2 what is preplanned. That is, the master cam cycle changes from 360 to 180
(180=360*0.5) and the slave axis cam phase is unchanged.
Case 5. The master axis position corresponding to the slave axis position is 2 times what is
planned as the value of MasterScaling is 2, SlaveScaling is 1 and their offsets are 0. If
it is observed from the perspective of the cam phase, the master axis cam phase is
two times the original. That is, the master axis cam cycle changes from 360 to 720
(720=360*2) and the slave axis cam phase is unchanged.
11- 2 53
DVP-50MC Series Motion Controller Operation Manual
MasterOffset means to make the actual axis position curve shifted horizontally in execution
11 of the cam motion. SlaveOffset indicates to make the axis position curve shifted vertically in
1 execution of the cam motion.
Cas e1 Case2
Sla ve axi s position Sl ave axis position
MasterOffset=0 MasterOffset=90
SlaveOffset=60 Sl aveOffset=0
18 0
180
60
Case 1. The slave axis position corresponding to the master axis position will add by 60 based
on the planned position as MasterScaling and SlaveScaling are both 1, MasterOffset is
0 and SlaveOffset is 60.
For example, in the planned cam relationship, the master axis position 180
corresponds to the slave axis position 180 and in the actual execution, the
corresponding slave axis position is 240 (240=180+60).
Case 2. The master axis position corresponding to the slave axis position will shift (add) by 90
based on the planned position as MasterScaling and SlaveScaling are 1, MasterOffset
is 90 and SlaveOffset is 0.
For example, in the planned cam relationship, the master axis position 180
corresponds to the slave axis position 180 and in the actual execution, the master axis
position 90 corresponds to the slave axis position 180 which is the slave axis position
corresponded to by the master axis position 180 (180=90+90) in the planned cam
relationship.
StartMode
In the engagement, the way how the slave axis moves is specified by the StartMode parameter. That is,
StartMode works at stage 4 in the execution of the MC_CamIn instruction as shown in the following
figure.
11- 2 54
Chapter 11 Motion Control Instructions
11
1 3 5
Planne d Ca m Curve
180 (180) o
Maste r axi s posi tion
4 0(4 0) A (Ma ster axis pha se)
0 0(0) 80 3 60
180 36 0 Master
axi s phase (80) (3 60)
There are three modes of StartMode for selection: the shortest way (mcRamplnShortest), positive
direction (mcRamplnPositive) and negative direction (mcRamplnNegative). Users can select the right
engagement mode according to actual need.
StartMode=0(The shortest way)
11- 2 55
DVP-50MC Series Motion Controller Operation Manual
As StartMode=0, in the execution of the engagement action, the slave axis moves toward the
position for synchronization by taking the shortest way. At the moment, the motion of the
slave axis is affected by the Velocity, Acceleration Deceleration and Jerk parameters.
11 StartMode=1(Positive direction)
1
As StartMode=1, in the execution of the engagement action, the slave axis moves toward the
position for synchronization in the positive direction. At the moment, the motion of the slave
axis is affected by the Velocity, Acceleration Deceleration and Jerk parameters.
StartMode=-1(Negative direction)
As StartMode=-1, in the execution of the engagement action, the slave axis moves toward
the position for synchronization in the negative direction. At the moment, the motion of the
slave axis is affected by the Velocity, Acceleration Deceleration and Jerk parameters.
For example, as the engagement begins, the master axis cam phase and slave axis cam phase
are 80 and 180 respectively (as point O below). According to the defined cam relationship, the
master axis cam phase is 80 and the slave axis cam phase is 40 (as point A or B below). If the
value of StartMode is different, the way the slave axis moves is different in the engagement
process.
StartMode=0:The slave axis moves from point O to point A and the synchronization is achieved
at point A since the distance from point O to point A is less than that from point O
to point B.
StartMode=1: The slave axis gradually moves from point O to point B in the positive direction.
StartMode=-1: The slave axis gradually moves from point O to point A in the negative direction.
11- 2 56
Chapter 11 Motion Control Instructions
StartMode=0
S lave ax is pos iti on
( Slave a xis phase)
660 (300)
11
400 (40) B
360 (0)
180 (180) o
400 (40) B
360 (0)
180 (180) o
40(40) A
0(0) 80 360 Mas ter axi s posi ti on
(80) (360) ( Master axis phase)
StartMode=-1
Slav e axis position
(S lave ax is phas e)
660(300)
400(40) B
360(0)
180(180) o
40(40) A
0(0) 80 360 Master axis position
(80) (360) (Mas ter axis phase)
11- 2 57
DVP-50MC Series Motion Controller Operation Manual
11
1
300
Periodic m otion
Per iodic =TR UE
0
Sl ave a xis position Time
300
0
Time
MC_CamOut
The MC_CamOut instruction can be used to end the cam operation which is being carried
out.
MC_SetPosition
The MC_SetPosition instruction has no impact on the being executed motion instructions.
Thus, during cam operation, the execution of MC_SetPosition instruction for the master axis
and slave axis will not affect the cam operation. If the cam operation is triggered after the
MC_SetPosition instruction is executed, the cam will be affected by the axis position change
which is incurred by using the MC_SetPosition instruction.
As the MC_Stop and MC_Halt instructions are executed on the slave axis, the MC_CamIn
instruction is aborted, the cam relationship is disconnected and the slave axis decelerates till
it stops.
11- 2 58
Chapter 11 Motion Control Instructions
MC_Home
The MC_Home instruction cannot be executed on the slave axis but the master axis. As the
MC_Home instruction is executed on the master axis, the master axis position may have a
great change in a very short time, which may cause the vibration of the slave axis. Therefore, 11
the MC_Home instruction is recommended to execute after the synchronous relationship
between the two axes is disconnected.
Other precautions
See the rule for different types of axes working as the master axis or slave axis in the cam relationship
in the following table.
Axis type As cam master axis As cam slave axis
Servo real axis OK OK
Encoder OK NO
Virtual axis OK OK
Programming Example
The execution effect of the MC_CamIn instruction is described in the following example.
The cam curve is planned as below.
11- 2 59
DVP-50MC Series Motion Controller Operation Manual
Explanation:
Cam period of the master 360
axis and slave axis
Master Scaling and 1
11 SlaveScaling
1 MasterOffset and 0
SlaveOffset
MasterAbsolute Relative
SlaveAbsolute Relative
Periodic Periodic
ActivationPosition Relative axis position:100
StartMode The shortest way
CamIn MC_CamIn
CamIn_Ex BOOL
CamIn_InSync BOOL
CamIn_EndOP BOOL
CamIn_Bsy BOOL
CamIn_Act BOOL
CamIn_Abt BOOL
CamIn_Err BOOL
CamIn_ErrID WORD
Vel MC_MoveVelocity
Vel _Ex BOOL
11- 2 60
Chapter 11 Motion Control Instructions
CamIn
MC_CamIn 1
Axis1 Master InSync CamIn_InSync
Axis2 Slave EndOfProfile CamIn_EndOP
CamIn_Ex Execute Busy CamIn_Bsy
ContinuousUpdate Active CamIn_Act 11
1 CamTable CommandA borted CamIn_Abt
T RUE Periodic Error CamIn_Err
FA LSE MasterAbsolute ErrorID CamIn_ErrID
FA LSE SlaveAbsolute Vel
0 MasterOffset MC_MoveVelocity 2
0 SlaveOffset Axis1 Axis Invelocity Vel_Invel
1 MasterScaling Vel_Ex E xecute Busy Vel_Bsy
1 SlaveScaling ContinuousUpdate Active Vel_Act
MasterStartDistance 100.0 Velocity CommandAborted Vel_Abt
MasterS yncPosition 100.0 Acceleration Error Vel_Err
100.0 ActivationP osition 100.0 Deceleration ErrorID Vel_ErrID
0 ActivationMode 100.0 Jerk
1 StartMode Direction
100.0 Velocity BufferMode
100.0 Acceleration
100.0 Deceleration
100.0 Jerk
MasterValueSource
BufferMode
820
460
100
0
Sla ve a xi s position Time
300
0
t1 t2 t3 t4 t5 t6 Time
Vel
Vel_Ex
Cam In
CamIn_Ex
CamIn_InSync
CamIn_EndOP
CamIn_Bsy
CamIn_Act
Cam_A bt
11- 2 61
DVP-50MC Series Motion Controller Operation Manual
As CamIn_Ex changes from FALSE to TRUE, the MC_CamIn instruction is executed and at
the moment of t1, both of the master axis and slave axis positions are 0. The value of
11 ActivationPosition is 100 and ActivationMode is 0, so the slave will not start to execute the
1 engagement action until the master axis position is 100 (the master axis position at the time of
t1 + ActivationPosition).
As Vel_Ex changes from FALSE to TRUE, the MC_MoveVelocity instruction is executed and
at the moment of t2, the master axis position is 0 and slave axis continues waiting for the start
of the engagement. After that, the master axis will move from 0 in the positive direction under
the control of the MC_MoveVelocity instruction.
When the master axis passes 100, the position where the engagement begins is reached at
the time of t3. The slave axis starts to perform the engagement action according to StartMode
at the moment of t3. The synchronization is achieved at t4 and the InSync output parameter
(CamIn1_InSync) changes from FALSE to TRUE.
Whenever the synchronous motion reaches the end point in a cam period as shown at t5 and
t6, the EndOfProfile output parameter (CamIn1_EndPro) will change to TRUE and it will
change to FALSE after a program period.
11- 2 62
Chapter 11 Motion Control Instructions
11.4.6 MC_CamOut
MC_CamOut_ins tance
MC_CamOut
Slave Done
Ex ecut e Busy
CommandAborted
Erro r
ErrorI D
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
Specify the number of When Execute
Refer to Functions
the slave axis which is
of Section 2.2.
Slave to be disconnected USINT changes from
(The variable value
from the cam
must be set) FALSE to TRUE
relationship.
The instruction is
executed when TRUE or FALSE
Execute BOOL -
Execute changes from (FALSE)
FALSE to TRUE.
Output Parameters
11- 2 63
DVP-50MC Series Motion Controller Operation Manual
1 Done TRUE.
axis and master axis is
When Error changes to TRUE.
disconnected.
Ex ec ute
Done
B usy
Co mma ndAbo rt ed
Error
E rro r ID
Case 1: Busy changes to TRUE as Execute changes from FALSE to TRUE. One period later, Done
changes to TRUE. Busy and Done remain TRUE after Execute changes from TRUE to
FALSE.
Case 2: When Execute is TRUE, CommandAborted changes to TRUE and meanwhile Busy and Done
change to FALSE if the instruction is aborted by other instruction. When Execute changes
from TRUE to FALSE, CommandAborted changes to FALSE.
11- 2 64
Chapter 11 Motion Control Instructions
Case 3: As Execute changes from FALSE to TRUE and an error occurs (e.g. an axis is disabled), Error
changes to TRUE and ErrorID shows corresponding error codes. Meanwhile Busy and Done
change to FALSE. As Execute changes from TRUE to FALSE, Error changes to FALSE.
Case 4: Execute changes from TRUE to FALSE as the instruction execution lasts for less than one 11
period. After that, Done changes to TRUE and Busy remain TRUE as one period is reached.
Functions
MC_CamOut is used for disconnecting the established electronic cam relationship. The instruction
works on the slave axis in the cam operation and the slave axis will continue moving at the speed of
when it is disconnected from the cam relationship.
MC_Halt or MC_Stop instructions can be executed on the slave axis so as to stop the slave axis motion.
The slave axis will stop moving and the cam relationship will be disconnected after the execution of the
MC_Halt instruction or MC_Stop instruction is completed.
Programming Example
11- 2 65
DVP-50MC Series Motion Controller Operation Manual
Explanation:
Cam period of the master 360
axis and slave axis
11 MasterScaling and 1
1 SlaveScaling
MasterOffset and 0
SlaveOffset
MasterAbsolute Relative
SlaveAbsolute Relative
Periodic Periodic
CamIn MC_CamIn
CamIn_Ex BOOL
CamIn_InSync BOOL
CamIn_EndOP BOOL
CamIn_Bsy BOOL
CamIn_Act BOOL
CamIn_Abt BOOL
CamIn_Err BOOL
CamIn_ErrID WORD
Vel MC_MoveVelocity
Vel_Ex BOOL
Vel_InVel BOOL
Vel_Bsy BOOL
Vel_Act BOOL
Vel_Abt BOOL
Vel_Err BOOL
Vel_ErrID WORD
CamOut MC_CamOut
CamOut_Ex BOOL
CamOut_Done BOOL
11- 2 66
Chapter 11 Motion Control Instructions
CamOut_Abt BOOL
CamOut_Err BOOL
11
CamOut_ErrID WORD
CamIn
MC_CamIn 1 Vel
Axis1 Mas ter InSy nc CamIn_I nSync MC_Mov eVeloc ity 2
Ax is 2 S lav e EndOfProfile CamIn_EndOP Axis1 Ax is I nvelocity Vel_Inv el
CamIn_E x E xec ute Bu sy CamIn_Bsy Vel_Ex E xecut e Busy Vel_Bs y
ContinuousUpdate Ac tive CamIn_Ac t Cont inuous Update Ac tiv e Vel_Act
1 CamTable Abort CamIn_Abt 100.0 Veloc ity CommandAborted Vel_Abt
TRUE Periodic E rror CamIn_Err 100.0 Ac celeration Error Vel_Err
FA LSE Mas terAbsolute Erro rI D CamIn_ErrID 100.0 Dec eleration ErrorID Vel_ErrID
FA LSE S lav eAbsolute 100.0 Jerk
0 Mas terOffs et Direction
0 Slav eOffs et B ufferMo de
1 Mas terScaling
1 SlaveSc aling
Mas terStartDis tanc e CamOut
Mas terSync Position MC_CamOut 3
100.0 Act iv ationPosition Axis2 Ax is Done CamO ut_Done
0 Act iv ationMode SetTq_En E nable Busy CamOut _Bs y
1 StartMode CommandAborted CamOut_Abt
100.0 Veloc it y Error CamOut _Err
100. 0 Ac celeration ErrorI D CamOut _ErrI D
100. 0 Dec elerat ion
100. 0 J erk
Mas terValueSource
BufferMode
11- 2 67
DVP-50MC Series Motion Controller Operation Manual
Master
axis pos ition
820
11
1
460
100
0
Sl ave
Time
axis pos ition
300
0
t1 t2 t3 t4 t5 t6 Time
Vel
Vel_Ex
Cam In
CamIn_E x
Ca mIn_I nSy nc
CamIn_E ndOP
CamIn_B sy
CamIn_A ct
CamI n_Abt
Ca mI n_Err
CamIn_ ErrID
CamO ut
CamO ut_Ex
CamO ut_Don e
CamOu t_Bs y
Ca mOut_ Abort
CamOu t_Err
CamO ut E rrID
As CamIn_Ex changes from FALSE to TRUE at t1, the MC_CamIn instruction is executed and
at the moment, both of the master axis and slave axis positions are 0. The value of
ActivationPosition is 100 and ActivationMode is 0, so the slave axis will not start to execute the
engagement action until the master axis position is 100 (the master axis position at t1 +
ActivationPosition).
11- 2 68
Chapter 11 Motion Control Instructions
As Vel_Ex changes from FALSE to TRUE at t2, the MC_MoveVelocity instruction execution
starts. At the moment, the master axis position is 0 and the slave axis continues waiting for the
execution of the engagement action. After that, the master axis moves from 0 in the positive
direction under the control of the MC_MoveVelocity instruction. 11
The position where the engagement starts is reached as the master axis passes 100 at t3.
The slave axis starts to perform the engagement action according to StartMode at t3. The
synchronization is achieved at t4 and the InSync output parameter (CamIn1_InSync) changes
from FALSE to TRUE.
During the synchronous cam motion in which the slave axis follows the motion of the master
axis, by executing the MC_CamOut instruction, the cam relationship is disconnected at t6.
After the MC_CamOut instruction is executed, the slave axis will keep moving at the speed it
has when the slave axis is disconnected from the cam relationship.
11- 2 69
DVP-50MC Series Motion Controller Operation Manual
11.4.7 DMC_CamReadPoint
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
If CamChangedPoint is
FALSE, the instruction reads
the cam point information
which is before the cam point
When Execute
has been modified.
CamChangedPoint BOOL TRUE/FALSE changes from
If CamChangedPoint is
FALSE to TRUE.
TRUE, the instruction reads
the cam point information
which is after the cam point
has been modified.
11- 2 70
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
When Execute
CamPointNum
The number of the cam point
UINT
1~2048
changes from 11
which is to be selected. (0)
FALSE to TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 2 71
DVP-50MC Series Motion Controller Operation Manual
Case 1 Ca se 2
E xec ute
Done
11 Bus y
E rror
1 Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. When the instruction
execution is completed, Done changes to TRUE and Busy changes to FALSE. When Execute
changes to FALSE, Done changes to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
When Execute changes from TRUE to FALSE, Error changes to FALSE and the value of
ErrorID is cleared to 0.
Functions
Programming Example
CamWr DMC_CamWritePoint
CamWr_CT USINT 1
CamWr_CP UINT 2
CamWr_Done BOOL
CamWr_Bsy BOOL
CamWr_Err BOOL
11- 2 72
Chapter 11 Motion Control Instructions
CamWr_ErrID WORD
CamRe DMC_CamReadPoint
11
CamRe_Ex BOOL FALSE
CamRe_CT USINT 1
CamRe_CPN UINT 2
CamRe_Done BOOL
CamRe_Bsy BOOL
CamRe_Err BOOL
CamRe_ErrID WORD
CamRe_MP LREAL
CamRe_SP LREAL
CamRe_SV LREAL
CamRe_SA LREAL
CamWr
DMC_CamWritePoint 1
CamWr_E x Execute Done CamWr_Done
CamWr_CT CamTable Busy CamWr_Bsy
CamWr_CP CamPointNum E rror CamWr_Err
CamWr_MP Mast erPos ErrorID CamWr_ErrID
CamWr_SP SlavePos
CamWr_SV SlaveVel
CamWr_SA SlaveAcc
CamRe
DMC_CamReadPoint 2
CamRe_Ex Execut e Done CamRe_Done
CamRe_CT CamTable Busy CamRe_Bsy
CamRe_CHP CamChangedP oin t Error CamRe_Err
CamRe_CPN CamPoint Num ErrorID CamRe_ErrID
Mast erPos CamRe_MP
S lavePos CamRe_SP
SlaveVel CamRe_SV
Slave Acc CamRe_SA
11- 2 73
DVP-50MC Series Motion Controller Operation Manual
11
1 C1’
540
C1
360
1 80 360 18 0 36 0
There are three cam points in the cam curve. When CamWr_Ex changes to TRUE,
DMC_CamWritePoint is executed. When CamWr_Done changes to TRUE, it indicates that writing
cam point information is finished. It is the second cam point of which the information is written.
When the parameter CamChangedPoint (variable: CamRe_CHP ) changes to TRUE, the cam
point information that the instruction reads is the cam point information after writing is done as
shown in the following table.
Master axis Slave axis
No. Velocity Acceleration
position position
2 180.0 540.0 0.0 0.0
11- 2 74
Chapter 11 Motion Control Instructions
11.4.8 DMC_CamWritePoint
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
When Execute
The number of the cam point 1~2048
CamPointNum UINT changes from
which is set. (0)
FALSE to TRUE.
11- 2 75
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
Output Parameters
Parameter
Function Data type Valid range
name
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Case 1 Ca se 2
E xec ute
Done
Bus y
E rror
Error I D
Case 1. When Execute changes from FALSE to TRUE, Busy changes to TRUE. When the instruction
execution is completed, Done changes to TRUE and Busy changes to FALSE. When Execute
changes to FALSE, Done changes to FALSE.
11- 2 76
Chapter 11 Motion Control Instructions
Case 2. When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
When Execute changes from TRUE to FALSE, Error changes to FALSE and the value of
ErrorID is cleared to 0.
Functions 11
DMC_CamWritePoint is used for setting parameters of a cam point in an electronic cam table. The
new cam curve will not be effective immediately after the setting is over until the DMC_CamSet
instruction is executed. Refer to Programming Example in section 11.4.9 DMC_CamSet for the
example on how to use the instruction.
11- 2 77
DVP-50MC Series Motion Controller Operation Manual
11.4.9 DMC_CamSet
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
TRUE when there is an error in the execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please
ErrorID WORD
refer to section 12.2.
11- 2 78
Chapter 11 Motion Control Instructions
Case 1 Ca se 2
E xec ute
Done
Bus y
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. When the instruction
execution is completed, Done changes to TRUE and Busy changes to FALSE. When Execute
changes to FALSE, Done changes to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
When Execute changes from TRUE to FALSE, Error changes to FALSE and the value of
ErrorID is cleared to 0.
Functions
DMC_CamSet is used for making the set cam point information effective. At first, use the
DMC_CamWritePoint instruction to set corresponding cam point information in an electronic cam
table. Then execute the DMC_CamSet instruction to make the new cam point information effective.
If the DMC_CamSet instruction is executed after the DMC_CamIn instruction is executed, the cam
curve after being modified will be effective in the next cycle.
If the DMC_CamSet instruction is executed before the DMC_CamIn instruction is executed, the cam
curve after being modified will take effect immediately.
Precaution
If DMC_CamSet is used for making a modified cam curve effective, make sure that the cam curve is
called for use by one MC_CamIn instruction at most. If the cam curve is called for use by multiple
MC_CamIn instructions, the timing for making the set cam curve effective is not sure after
DMC_CamSet is executed.
11- 2 79
DVP-50MC Series Motion Controller Operation Manual
Programming Example
CamWr DMC_CamWritePoint
CamWr_CT USINT 1
CamWr_CP UINT 2
CamWr_Done BOOL
CamWr_Bsy BOOL
CamWr_Err BOOL
CamWr_ErrID WORD
CamSe DMC_CamSet
CamSe_CT USINT 1
CamSe_Done BOOL
CamSe_Bsy BOOL
CamSe_Err BOOL
CamSe_ErrID WORD
11- 2 80
Chapter 11 Motion Control Instructions
CamWr
DMC_CamWritePoint 1
CamWr_E x Execute Done CamWr_Done
CamWr_CT CamTable Bus y CamWr_Bs y
CamWr_CP CamPointNum E rror CamWr_Err 11
CamWr_MP Mast erPos ErrorID CamWr_ErrID
CamWr_SP SlavePos
CamWr_SV SlaveVel
CamWr_SA Slav eA cc
CamSe
DMC_CamSet 2
CamWr_Done Exec ute Done CamSe_Done
CamSe_CT CamTable Bus y CamSe_Bsy
Error CamSe_Err
ErrorID CamSe_ErrI D
2. Cam Curve
C1’
540
C1
360
1 80 360 18 0 36 0
There are three cam points in the cam curve. Change curve C1 into curve C1’.
It can be seen from the curve above that the second cam point is modified. The cam curve is
changed by executing DMC_CamWritePoint first and then executing DMC_CamSet in the program
above.
11- 2 81
DVP-50MC Series Motion Controller Operation Manual
3. Sequence Chart:
S lave ax is
pos ition
540. 0
360. 0
Mas te r ax is
pos ition
CamWr_Ex
Ca mWr_Don e
CamSe_Don e
CamSe_B sy
CamS e_Err
CamSe _ErrID
When CamWr_Done changes from FALSE to TRUE, DMC_CamSet is executed. When CamSe_Done
changes to TRUE, the execution of DMC_CamSet is finished. The cam curve after being modified will
take effect in the next cycle after current cam cycle is over.
11- 2 82
Chapter 11 Motion Control Instructions
11.4.10 DMC_CamReadTappetStatus
DMC_CamReadTappet Status_instance
DMC_CamReadTappet Status
Enab le Vaild
CamTable Busy
TappetNum1 Error
Tappet Num2 ErrorID
TappetNum3 Status1
TappetNum4 Status2
TappetNum5 St atus3
TappetNum6 St atus4
TappetNum7 Status5
TappetNum8 St atus6
Stat us7
Status8
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Enable TRUE or FALSE When Enable is
Enable BOOL
changes from FALSE to (FALSE) TRUE.
TRUE.
1~128
The number of the first When Enable is
TappetNum1 UINT (The variable
tappet point TRUE.
value must be set)
1~128
The number of the second When Enable is
TappetNum2 UINT (The variable
tappet point TRUE.
value must be set)
11- 2 83
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
1~128
The number of the third
11 TappetNum3 UINT (The variable
When Enable is
1 tappet point
value must be set)
TRUE.
1~128
The number of the forth When Enable is
TappetNum4 UINT (The variable
tappet point TRUE.
value must be set)
1~128
The number of the fifth When Enable is
TappetNum5 UINT (The variable
tappet point. TRUE.
value must be set)
1~128
The number of the sixth When Enable is
TappetNum6 UINT (The variable
tappet point TRUE.
value must be set)
1~128
The number of the When Enable is
TappetNum7 UINT (The variable
seventh tappet point. TRUE.
value must be set)
1~128
The number of the eighth When Enable is
TappetNum8 UINT (The variable
tappet point. TRUE.
value must be set)
Output Parameters
Parameter
Function Data type Valid range
name
Valid TRUE when the output of the instruction is valid. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
TRUE when there is an error in the execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please
ErrorID WORD
refer to section 12.2.
Status1 The status of the first tappet point. BOOL TRUE/FALSE
11- 2 84
Chapter 11 Motion Control Instructions
Parameter
Function Data type Valid range
name
Cas e 1 Case 2
En able
Valid
Bus y
Error
E rro r ID
Case 1: When Enable changes from FALSE to TRUE, Valid and Busy change to TRUE. When Enable
changes to FALSE, Valid and Busy change to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
Meanwhile Busy changes to FALSE. Error changes to FALSE when Enable changes from
TRUE to FALSE and then the value of ErrorID is cleared to 0.
Functions
The DMC_CamReadTappetStatus instruction is executed to read the status of the tappet points when
the master axis passes the tappet points in the positive direction or in the negative direction. The
status of every tappet point is determined by the setting of every tappet point. The status of every
tappet point will change to FALSE when the master axis passes the final cam point in the positive
direction or when the master axis passes the initial cam point in the negative direction.
11- 2 85
DVP-50MC Series Motion Controller Operation Manual
Programming Example
RTS DMC_CamReadTappetStatus
RTS_CT USINT 1
RTS_TN1 UINT 1
RTS_TN2 UINT 2
RTS_TN3 UINT 3
RTS_TN4 UINT 4
RTS_TN5 UINT 5
RTS_TN6 UINT 6
RTS_TN7 UINT 7
RTS_TN8 UINT 8
RTS_Va BOOL
RTS_Bsy BOOL
RTS_Err BOOL
RTS_ErrID WORD
RTS_Sta1 BOOL
RTS_Sta2 BOOL
RTS_Sta3 BOOL
RTS_Sta4 BOOL
RTS_Sta5 BOOL
RTS_Sta6 BOOL
RTS_Sta7 BOOL
RTS_Sta8 BOOL
11- 2 86
Chapter 11 Motion Control Instructions
RTS
DMC_CamReadTappet Status 1
RTS_En E nable Vaild RTS _Va
RTS_CT CamTable Busy RTS _Bsy
RTS _TN1 TappetNum1 Error RTS _Err 11
RTS_TN2 Tappet Num2 ErrorID RTS _ErrID
RTS_TN3 TappetNum3 Stat us1 RTS _Sta1
RTS_TN4 TappetNum4 Stat us2 RTS _Sta2
RTS_TN5 TappetNum5 St atus3 RTS _Sta3
RTS_TN6 TappetNum6 St atus4 RTS _Sta4
RTS_TN7 TappetNum7 Status5 RTS _Sta5
RTS_TN8 TappetNum8 S tatus6 RTS _Sta6
Stat us7 RTS _Sta7
Stat us8 RTS _Sta8
11- 2 87
DVP-50MC Series Motion Controller Operation Manual
Sl av e ax i s po si ti o n
( U ni t)
11
360
1 250
180
150
100
RTS_En
RT S_Va
RTS_Bsy
RT S_Er r
R TS_ErrID
RT S_Sta1
RT S_Sta2
RT S_Sta3
RT S_Sta4
Add tappet points in the established cam curve as shown in the above figure. Tappet point 1 is set to
PositiveOn when it is passed in the positive direction. Tappet point 2 is set to PositiveDisable when it is
passed in the positive direction. Tappet point 3 is set to PositiveOff when it is passed in the positive
direction. Tappet point 4 is set to PositiveInvert when it is passed in the positive direction.
When the axis runs forward and RTS_En changes from FALSE to TRUE,
DMC_CamReadTappetStaus is executed. (Because the first tappet point selects PositiveOn,)
RTS_Sta1 changes from FALSE to TRUE when the axis passes the first tappet point in the cam curve.
(Because the second tappet point selects PositiveDisable,) RTS_Sta2 is FALSE when the second
tappet point is passed. (Because the third tappet point selects PositiveOff,) RTS_Sta3 is FALSE when
the third tappet point is passed. (Because the forth tappet point selects PositiveInvert,) RTS_Sta4
changes from FALSE to TRUE when the forth tappet point is passed.
RTS_Sta1 and RTS_Sta4 change to FALSE when the master axis passes the final point of the cam
curve.
11- 2 88
Chapter 11 Motion Control Instructions
11.4.11 DMC_CamReadTappetValue
DMC_CamReadTappet Value_instance
DMC_CamReadTappet Value
Enab le Vaild
CamTable Busy
TappetNum Error
ErrorID
Mast erPo s
P ositiveMode
NegativeMode
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Enable TRUE or FALSE When Enable is
Enable BOOL
changes from FALSE to (FALSE) TRUE.
TRUE.
The number of the cam
table based on which the 1~64
When Enable is
CamTable cam relationship between USINT (The variable
TRUE.
the master axis and slave value must be set)
axis is built.
1~128
The number of the tappet When Enable is
TappetNum UINT (The variable
point to read TRUE.
value must be set)
Output Parameters
Parameter
Function Data type Valid range
name
TRUE when the output of the instruction is
Valid BOOL TRUE / FALSE
valid.
TRUE when the instruction is being
Busy BOOL TRUE / FALSE
executed.
11- 2 89
DVP-50MC Series Motion Controller Operation Manual
Parameter
Function Data type Valid range
name
TRUE when there is an error in the
Error BOOL TRUE / FALSE
11 execution of the instruction.
Contains the error code when an error
1 ErrorID
occurs. Please refer to section 12.2.
WORD
Cas e 1 Case 2
En able
Valid
Bus y
Error
E rro r ID
Case 1: When Enable changes from FALSE to TRUE, Valid and Busy change to TRUE. When Enable
changes to FALSE, Valid and Busy change to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
Meanwhile Busy changes to FALSE. Error changes to FALSE when Enable changes from
TRUE to FALSE and then the value of ErrorID is cleared to 0.
11- 2 90
Chapter 11 Motion Control Instructions
Functions
The tappet point information includes the master axis position and the modes when the tappet point is
passed in the positive direction and in the negative direction. When the axis runs forward, a tappet
point can select PositiveDisable, PositiveOn, PositiveOff or PositiveInvert. When the axis runs 11
reversely, a tappet point can select NegativeDisable, NegativeOn, NegativeOff or NegativeInvert. The
meanings of modes are listed in the following table.
When the master axis passes the tappet point in the positive direction,
PositiveOff OFF
the status of the tappet point which is read is OFF.
When the master axis passes the tappet point in the positive direction,
the status of the tappet point which is read will be OFF if the status of
the tappet point is ON before the tappet point is passed in the positive
PositiveInvert Invert
direction. Otherwise, the status of the tappet point which is read will be
ON if the status of the tappet point is OFF before the tappet point is
passed in the positive direction.
When the master axis passes the tappet point in the negative
NegativeDisable Disabled
direction, the status of the tappet point which is read has no change.
When the master axis passes the tappet point in the negative
NegativeOn ON
direction, the status of the tappet point which is read is ON.
When the master axis passes the tappet point in the negative
NegativeOff OFF
direction, the status of the tappet point which is read is OFF.
When the master axis passes the tappet point in the negative
direction, the status of the tappet point which is read will be OFF if the
status of the tappet point is ON before the tappet point is passed in the
NegativeInvert Invert
negative direction. Otherwise, the status of the tappet point which is
read will be ON if the status of the tappet point is OFF before the
tappet point is passed in the negative direction.
Programming Example
11- 2 91
DVP-50MC Series Motion Controller Operation Manual
RTV DMC_CamReadTappetValue
RTV_TN UINT 2
RTV_Va BOOL
RTV_Bsy BOOL
RTV_Err BOOL
RTV_ErrID WORD
RTV_MP LREAL
RTV_PM PositiveMode_Type
RTV_NM NegativeMode_Type
RTV
DMC_CamReadTappet Value 1
RTV_En E nable Vaild RTV _Va
RTV_CT CamTable Busy RTV _Bsy
RTV _TN TappetNum Error RTV _Err
ErrorID RTV _ErrID
Mast erP os RTV _MP
PositiveMode RTV _PM
NegativeMode RTV _NM
Master axis Slave axis Passed in the positive Passed in the negative
Index
position position direction direction
11- 2 92
Chapter 11 Motion Control Instructions
11.4.12 DMC_CamWriteTappetValue
DMC_CamWrit eTappetValue_instance
DMC_CamWrit eTappetValue
Execut e Done
CamTable Busy
TappetNum Error
MasterPos ErrorID
PositiveMode
Negat iveMode
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is executed
TRUE or FALSE
Execute when Execute changes BOOL -
(FALSE)
from FALSE to TRUE.
The number of the cam
table based on which the 1~64 When Execute
CamTable cam relationship between USINT (The variable value changes from
the master axis and slave must be set) FALSE to TRUE.
axis is built.
1~128 When Execute
The number of the tappet
TappetNum UINT (The variable value changes from
point
must be set) FALSE to TRUE.
When Execute
Master position of the
MasterPos LREAL 0, positive number changes from
tappet point
FALSE to TRUE.
0:PositiveDisable
The mode of the tappet When Execute
PositiveMo 1:PositiveOn
PositiveMode point when the axis runs changes from
de_Type 2:PositiveOff
forward and passes it. FALSE to TRUE.
3:PositiveInvert
0:NegativeDisable
The mode of the tappet When Execute
NegativeMo 1:NegativeOn
NegativeMode point when the axis runs changes from
de_Type 2:NegativeOff
backward and passes it. FALSE to TRUE.
3:NegativeInvert
11- 2 93
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
Case 1 Ca se 2
E xec ute
Done
Bus y
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. When the instruction
execution is completed, Done changes to TRUE and Busy changes to FALSE. When Execute
changes to FALSE, Done changes to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
When Execute changes from TRUE to FALSE, Error changes to FALSE and the value of
ErrorID is cleared to 0.
11- 2 94
Chapter 11 Motion Control Instructions
Functions
DMC_CamWriteTappetValue is used for setting the parameters for a tappet point including the master
axis position and the status mode of the tappet point when the tappet point is passed in the positive
direction and in the negative direction. 11
Generally, the setting for a tappet point is conducted in the cam built on the software.For a dynamic
change of the tappet point setting, use the DMC_CamWriteTappetValue instruction.
After the setting for a tappet point is over, use DMC_CamReadTappetStatus to read the status of the
tappet point when the master axis passes the tappet point.
When the axis runs forward, the tappet point can select such a mode as PositiveDisable, PositiveOn,
PositiveOff or PositiveInvert. When the axis runs backward, the tappet point can select such a mode as
NegativeDisable, NegativeOn, NegativeOff or NegativeInvert.
11- 2 95
DVP-50MC Series Motion Controller Operation Manual
Please make sure that the cam curve is called for use by one MC_CamIn instruction at most if
DMC_CamWriteTappetValue is used to set the parameters for one tappet point in the cam curve.
If the cam curve is called by multiple MC_CamIn instructions, the tappet point to be modified which is
used in the programs will be changed when DMC_CamWriteTappetValue is used to change the
parameters of one tappet point.
Programming Example
WTV DMC_CamWriteTappetValue
WTV_CT USINT 1
WTV_TN UINT 2
WTV_Done BOOL
WTV_Bsy BOOL
WTV_Err BOOL
WTV_ErrID WORD
RTV DMC_CamReadTappetValue
RTV_CT USINT 1
RTV_TN UINT 2
RTV_Va BOOL
RTV_Bsy BOOL
11- 2 96
Chapter 11 Motion Control Instructions
RTV_Err BOOL
RTV_ErrID WORD
11
RTV_MP LREAL
RTV_PM PositiveMode_Type
RTV_NM NegativeMode_Type
WTV
DMC_CamWriteTappetValue 1
WTV _Ex Execute Done WTV_ Done
WTV_CT CamTable Busy WTV_ Bsy
WTV_TN TappetNum Error WTV_ Err
WTV_MP MasterPos E rrorID WTV_ ErrID
WTV_PM Po sitiveMode
WTV _NM NegativeMode
RTV
DMC_CamRead TappetValue 2
RTV_En Enable Vaild RTV_Va
RTV_CT CamTable Busy RTV_Bsy
RTV_TN TappetNum Error RTV_Err
E rrorID RTV_ErrID
MasterPos RTV_MP
Posit iveMode RTV_PM
NegativeMode RTV_NM
Master axis
Index Passed in the positive direction Passed in the negative direction
position
11- 2 97
DVP-50MC Series Motion Controller Operation Manual
11- 2 98
Chapter 11 Motion Control Instructions
11.4.13 DMC_CamAddTappet
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is executed
TRUE or FALSE
Execute when Execute changes BOOL -
(FALSE)
from FALSE to TRUE.
The number of the cam
table based on which the 1~64 When Execute
CamTable cam relationship between USINT (The variable value changes from
the master axis and slave must be set) FALSE to TRUE.
axis is built.
When Execute
Master axis position of the
MasterPos LREAL 0, positive number changes from
tappet point
FALSE to TRUE.
0: PositiveDisable
Status mode of the tappet When Execute
PositiveMode 1: PositiveOn
PositiveMode point when the axis runs changes from
_Type 2: PositiveOff
forward. FALSE to TRUE.
3: PositiveInvert
0: NegativeDisable
Status mode of the tappet When Execute
NegativeMode 1: NegativeOn
NegativeMode point when the axis runs changes from
_Type 2: NegativeOff
backward. FALSE to TRUE.
3: NegativeInvert
11- 2 99
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
E xec ute
Done
Bus y
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. When the instruction
execution is completed, Done changes to TRUE and Busy changes to FALSE. When Execute
changes to FALSE, Done changes to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
When Execute changes from TRUE to FALSE, Error changes to FALSE and the value of
ErrorID is cleared to 0.
Functions
DMC_CamAddTappet is used for adding a tappet point by setting the master axis position and the
status mode of the tappet point when the tappet point is passed in the positive direction and in negative
direction. The number of the added tappet point is accumulated on the basis of the numbers of existing
tappet points. For example, if the largest number of tappet points is 3 previously, the largest number of
tappet points is 4 after the instruction is executed.
11- 3 00
Chapter 11 Motion Control Instructions
When the axis runs forward, the added tappet point can select such a mode as PositiveDisable,
PositiveOn, PositiveOff or PositiveInvert. When the axis runs backward, the added tappet point can
select such a mode as NegativeDisable, NegativeOn, NegativeOff or NegativeInvert.
The meanings of modes are shown in the following table. 11
Mode Function Explanation
When the master axis passes the tappet point in the positive
PositiveDisable Disabled
direction, the status of the tappet point which is read has no change.
When the master axis passes the tappet point in the positive
PositiveOn ON
direction, the status of the tappet point which is read is ON.
When the master axis passes the tappet point in the positive
PositiveOff OFF
direction, the status of the tappet point which is read is OFF.
When the master axis passes the tappet point in the positive
direction, the status of the tappet point which is read will be OFF if
the status of the tappet point is ON before the tappet point is passed
PositiveInvert Invert
in the positive direction. Otherwise, the status of the tappet point
which is read will be ON if the status of the tappet point is OFF before
the tappet point is passed in the positive direction.
When the master axis passes the tappet point in the negative direction,
NegativeDisable Disabled
the status of the tappet point which is read has no change.
When the master axis passes the tappet point in the negative
NegativeOn ON
direction, the status of the tappet point which is read is ON.
When the master axis passes the tappet point in the negative
NegativeOff OFF
direction, the status of the tappet point which is read is OFF.
When the master axis passes the tappet point in the negative
direction, the status of the tappet point which is read will be OFF if
the status of the tappet point is ON before the tappet point is passed
NegativeInvert Invert
in the negative direction. Otherwise, the status of the tappet point
which is read will be ON if the status of the tappet point is OFF before
the tappet point is passed in the negative direction.
Precaution
Make sure that the cam curve is called for use by one MC_CamIn instruction at most if
DMC_CamAddTappet is used to add one tappet point in the cam curve.
If the cam curve is called by multiple MC_CamIn instructions, the added tappet point can be used in
the programs when DMC_CamAddTappet is used to add one tappet point.
11- 3 01
DVP-50MC Series Motion Controller Operation Manual
Programming Example
CAT DMC_CamAddTappet
CAT_CT USINT 1
CAT_Done BOOL
CAT_Bsy BOOL
CAT_Err BOOL
CAT_ErrID WORD
CAT_TN UINT
RTV DMC_CamReadTappetValue
RTV_CT USINT 1
RTV_TN UINT 4
RTV_Va BOOL
RTV_Bsy BOOL
RTV_Err BOOL
RTV_ErrID WORD
RTV_MP LREAL
RTV_PM PositiveMode_Type
RTV_NM NegativeMode_Type
11- 3 02
Chapter 11 Motion Control Instructions
CAT
DMC_Ca mAdd Tappet 1
CAT_Ex Exec ute Done CAT_Done
CAT_CT CamTable Bus y CAT_B sy
CAT_MP MasterPos E rror CAT_E rr 11
CAT_PM Pos it iv eMode ErrorID CAT_E rrID
CAT_NM NegativeMode TappetNum CAT_TN
RTV
DMC_CamReadTappetValue 2
RTV_En Enable Vaild RTV_Va
RTV_CT CamTable Bus y RTV_Bs y
RTV_TN Tappet Num E rror RTV_Err
ErrorID RTV_ErrID
Mas terPos RTV_MP
Pos itiv eMode RTV_PM
Neg ativ eMode RTV_NM
There are three tappet points which have been added in the established cam curve. Now add the forth
tappet point using DMC_CamAddTappet instruction.
When CAT_Ex changes from FALSE to TRUE, DMC_CamAddTappet is executed. When CAT_Done
changes to TRUE, the instruction execution is finished and the information of the forth tappet point
which is added is shown as below.
11- 3 03
DVP-50MC Series Motion Controller Operation Manual
11.4.14 DMC_CamDeleteTappet
DMC_CamDeleteTappet_instance
DMC_CamDeleteTappet
Execut e Done
CamTable Busy
Error
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
The number of the cam
table based on which the 1~64 When Execute
CamTable cam relationship USINT (The variable changes from
between the master axis value must be set) FALSE to TRUE.
and slave axis is built.
Output Parameters
Parameter
Function Data type Valid range
name
TRUE when the instruction execution is
Done BOOL TRUE / FALSE
completed.
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
TRUE when there is an error in the execution
Error BOOL TRUE / FALSE
of the instruction.
Contains the error code when an error occurs.
ErrorID WORD
Please refer to section 12.2.
11- 3 04
Chapter 11 Motion Control Instructions
E xec ute
Done
Bus y
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. When the instruction
execution is completed, Done changes to TRUE and Busy changes to FALSE. When Execute
changes to FALSE, Done changes to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error code.
When Execute changes from TRUE to FALSE, Error changes to FALSE and the value of
ErrorID is cleared to 0.
Functions
DMC_CamDeleteTappet is used for deleting a tappet point which is the tappet point of the largest
number. Whenever the instruction is executed one time, one tappet point of the largest number will be
deleted.
Precaution
Make sure that the cam curve is called for use by one MC_CamIn instruction at most if
DMC_CamDeleteTappet is used to delete one tappet point in the cam curve. If the cam curve is called
by multiple MC_CamIn instructions, the tappet point to be deleted which is used in the programs will be
deleted when DMC_CamDeleteTappet is used to delete one tappet point.
Programming Example
CDT DMC_CamDeletTappet
CDT_CT USINT 1
11- 3 05
DVP-50MC Series Motion Controller Operation Manual
CDT_Done BOOL
CDT_Bsy BOOL
11
1 CDT_Err BOOL
CDT_ErrID WORD
RTV DMC_CamReadTappetValue
RTV_CT USINT 1
RTV_TN UINT 3
RTV_Va BOOL
RTV_Bsy BOOL
RTV_Err BOOL
RTV_ErrID WORD
RTV_MP LREAL
RTV_PM PositiveMode_Type
RTV_NM NegativeMode_Type
CDT
DMC_CamDeleteTappet 1
CDT_E x Ex ecute Done CDT_Done
CDT_CT CamTable Bus y CDT_Bsy
Error CDT_Err
ErrorID CDT_ErrID
RTV
DMC_CamReadTappetValue 2
RTV_En Enable Vaild RTV_Va
RTV _CT CamTable Bus y RTV_Bs y
RTV_TN Tappet Num Error RTV_Err
ErrorID RTV_ErrID
Mas terPos RTV_MP
Pos it iv eMo de RTV_PM
NegativeMode RTV_NM
11- 3 06
Chapter 11 Motion Control Instructions
When RTV_En changes from FALSE to TRUE, DMC_CamReadTappetValue is executed. Since the
third tappet point does not exist, the instruction alerts the error code 16#5505 (indicating no such a
tappet point exists).
11- 3 07
DVP-50MC Series Motion Controller Operation Manual
11 Rotary cut is the technology to cut the material in transmission vertically. The knife conducts cutting on the
1 cut surface periodically with the rotation of the rotary cut axis.
D V P50MC11T
C A N ope n
D VP5 0 MC 11 T P WR R s 232
00 0 1 02 0 3 04 0 5 06 07
RUN RUN R s 485
10 11 12 1 3 14 1 5 16 17
ERR
E RR E th er C AT 00 0 1 02 0 3 04 0 5 06 07
SD E th er ne t
IN
00 1 0
5
1
1 0
5
01 1 1
C O M/ S SI
02 1 2
03 1 3
04 1 4
1
1
6
05 1 5
06 1 6
07 1 7
S0 S 1
O UT
1 5
2 4 V
EN C O DE R
1 0
00 0 4
V
0
01 0 5
02 0 6
1 1
1
6
03 0 7
UP ZP
Feed roller
(F or feeding material)
Note: The feed axis is to control the feed roller; the rotary cut axis is to control rotary cut roller with the
knife mounted on the rotary cut roller. The rotary cut function is usually used for cutting of the thin
material or the material of medium thinness and can be applied in packaging machine, cutting machine,
punching machine, printing machine etc.
11- 3 08
Chapter 11 Motion Control Instructions
11
11- 3 09
DVP-50MC Series Motion Controller Operation Manual
Features
1. Users can set the cutting length freely according to the technological requirement and the cutting
length could be less or more than the circumference of the cutter.
2. In the SYNC area, the rotary cut axis and feed axis move at a certain speed rate. (Their velocities
are usually equal.) And the cutting of material is conducted in the SYN area.
3. The motion controller supports the rotary roller with multiple knives.
4. The feed axis is able to make the constant motion, acceleration, deceleration and irregular motion
because the rotary cut axis moves according to the phase of the feed axis after the rotary cut function
is enabled.
5. When rotary cut relation is broken off, the knife stops at the zero point of the system, i.e. the entry
position for rotary cutting.
11- 3 10
Chapter 11 Motion Control Instructions
When cutting length is less than the knife roller circumference, the rotary-cut curve for any cycle is
shown below.
For the cutting of short material, rotary cut axis must accelerate first in the adjustment area, and then
decelerate to the synchronous speed.
11- 311
DVP-50MC Series Motion Controller Operation Manual
2. Equal-length cutting
When the cutting length is equal to the knife roller circumference, the rotary-cut curve for any cycle is
shown below.
11
1
In this situation, the feed axis and rotary cut axis in SYNC area and non-SYNC area keep synchronous
in speed. The rotary cut axis does not need to make any adjustment.
When the cutting length is greater than the knife roller circumference, the rotary-cut curve for any
cycle is shown below.
11- 3 12
Chapter 11 Motion Control Instructions
11
In this situation, the rotary cut axis should decelerate first in the adjustment area and then accelerate to
the synchronous speed. If the cutting length is far greater than rotary cut roller circumference, the roller
may decelerate to 0 and stay still for a while; and then accelerate up to the synchronous speed. The
greater the cutting length is, the longer the roller stays.
Additionally, when rotary cut function is started or broken off, the cam curves used are different.
11- 3 13
DVP-50MC Series Motion Controller Operation Manual
11
1
The curve is the rotary cut function entry curve. When the rotary cut function is started up, the rotary cut
axis will follow the feed axis to rotate according to the curve. The entry position is based on the rotary
cut axis. For the single knife, the cutting position is directly below the rotary cut roller if the entry position
is over the rotary cut roller in the following figure. Before the rotary cut function is started up, the knife
must be turned to the upper of the rotary roller. Otherwise, the cutting may happen in the adjustment
area.
11- 3 14
Chapter 11 Motion Control Instructions
When the rotary roller is mounted with multiple knives, the distances between knives should be the
same and the cutting position is at the center of the distance between knives. See the two-knife figure
below.
11
It is the rotary-cut curve when the rotary cut function is broken away.
After the instruction “APF_RotaryCut_Out” is started up, the system will use the curve to make the
rotary cut axis break away from the rotary cut state. Eventually, the knife stops at the end position as
shown in the figure above.
The end position is based on the rotary cut axis. For the single knife, the end position is the entry
position and it is also right above the rotary cut roller.
11- 3 15
DVP-50MC Series Motion Controller Operation Manual
APF_RotaryCut_Init
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
11- 3 16
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
Positive number
The radius of the feed
(The variable
When Execute 11
FeedAxisRadius axis; i.e. the radius LREAL changes from FALSE
value must be
length of the feed roller to TRUE
set)
Positive number
When Execute
The cutting length of (The variable
CutLength LREAL changes from FALSE
material value must be
to TRUE
set)
RotStartPos Reserved - - -
FedStartPos Reserved - - -
Notes:
1. The value of "SyncStartPos" in SYNC area is always greater than that of "SyncStopPos" in SYNC
area. As shown in the figure below, the cutting length is 320; "SyncStartPos" is 310 and
"SyncStopPos" is 10.
11- 3 17
DVP-50MC Series Motion Controller Operation Manual
11
1
2. The limit for SYNC area is that it must not be greater than the half of cutting length. In above figure,
SYNC area is 20, and the half of the cutting length is 160.
3. The length parameters in the function are RotaryAxisRadius, FeedAxisRadius, CutLenth,
SyncStartPos, and SyncStopPos with the same unit. For example, if the unit for one of the parameters
is CM (centimeter), the units for other parameters must be CM as well.
Output Parameters
Parameter
Function Data type Valid range
name
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 3 18
Chapter 11 Motion Control Instructions
Function
Before the rotary-cut relationoship is established, the instruction is used for initializing the radius of the
rotary-cut axis and feed axis, cutting length, SYNC area and other parameters. After the instruction
execution succeeds, relevant parameters will be downloaded so as to call for use in the established
rotary-cut relationship.
After the rotary-cut relationship is established, the instruction can be used to modify the rotary-cut
parameters. After the instruction execution is completed, the new parameters will be taken into effect in
the next cycle.
11- 3 19
DVP-50MC Series Motion Controller Operation Manual
APF_RotaryCut_In
Input Parameters
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
Refer to Functions
When Execute
The axis No. of the of Section 2.2.
RotaryAxis USINT changes from
rotary-cut axis (The variable
FALSE to TRUE
value must be set)
11- 3 20
Chapter 11 Motion Control Instructions
Output Parameters
Parameter
Function Data type Valid range
name
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 3 21
DVP-50MC Series Motion Controller Operation Manual
Function
APF_RotaryCut_In is used for building a rotary cut relationship and specifying the axis No. of the
rotary-cut axis and feed axis according to the application requirement. The rotary cut axis will follow
11 the feed axis for motion based on the rotary-cut curve after the instruction execution succeeds.
1
11- 3 22
Chapter 11 Motion Control Instructions
APF_RotaryCut_Out
Input Parameters
Refer to
Functions of
When Execute
The axis number of the Section 2.2.
RotaryAxis USINT changes from
rotary axis (The variable
FALSE to TRUE
value must be
set)
Output Parameters
Parameter
Function Data type Valid range
name
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 3 23
DVP-50MC Series Motion Controller Operation Manual
Parameter
Function Data type Valid range
name
Notes:
1. Control Sequence Chart of Rotary Cut Function
2. When the rotary cut function is performed, the rotary cut axis can only execute APF_RotaryCut_Out
and MC_Stop instruction and other instructions are invalid.
11- 3 24
Chapter 11 Motion Control Instructions
Function
APF_RotaryCut_Out is used for disconnecting the already established rotary-cut relationship between
the rotary-cut axis and feed axis. After the rotary-cut relationship is disconnected, the knife of the
rotary-cut axis will stop at the entry position and will not follow the feed axis for motion any more.
The instruction has no impact on the motion of the feed axis.
11- 3 25
DVP-50MC Series Motion Controller Operation Manual
The section explains the setting of rotary cut parameters, establishment and disconnection of rotary cut
relationship. The following is the programing example.
11
See the key parameters in the example as shown in the table below
1
Parameter name Current value
RotaryAxis 2
FeedAxis 1
RotaryAxisKnifeNum 1
Programming Example
1. As Pwr1_En is TRUE, the servo of node address 1 turns "Servo On"; as Pwr2_En is TRUE, the
servo of node address 2 turns "Servo On".
Pwr1 MC_Power
Axis1 USINT 1
Pwr1_BM MC_Buffer_Mode 0
Pwr1_Bsy BOOL
Pwr1_Act BOOL
Pwr1_Err BOOL
Pwr1_ErrID WORD
Pwr2 MC_Power
Axis2 USINT 1
11- 3 26
Chapter 11 Motion Control Instructions
Pwr2_BM MC_Buffer_Mode 0
11
Pwr2_Sta BOOL TRUE
Pwr2_Bsy BOOL
Pwr2_Act BOOL
Pwr2_Err BOOL
Pwr2_ErrID WORD
Pwr1
MC_Power 1
Axis1 Axis Status Pwr1_S ta
P wr1_En Ena ble Busy Pwr1_Bsy
True Ena blePositive Active Pwr1_Act
True Ena bleNegative Error Pwr1_Err
Pwr1_BM B ufferMode ErrorID Pwr1_ErrID
Pwr2
MC_Power 2
Axis2 Axis Status Pwr2_St a
P wr2_En Ena ble Busy Pwr2_Bsy
True Ena blePositive Active Pwr2_Act
True Ena bleNegative Error Pwr2_Err
Pwr2_BM B ufferMode ErrorID Pwr2_ErrID
2. Set the rotary cut technology parameters. The radius of the rotary-cut axis is 10, knife quantity of the
rotary-cut axis is 1, radius of the feed axis is 20 and cutting length of the feed axis is 30. The start
position of SYNC area is 19, end position of SYNC area is 1, and the rotary cut group number is 1.
When RotyCut_Init_Ex is TRUE, rotary cut technology parameters will be initialized.
RotyCut_Init APF_RotaryCut_Init
11- 3 27
DVP-50MC Series Motion Controller Operation Manual
Roty Cu t_Init
A PF_ Rot aryCut_ Init 3
Roty Cut _Init_Ex Exec ute Done Rot yCut_Init_Done
10 Rot aryRadius Busy RotyCut_Init_Bsy
11 2 K nife Num Error RotyCut_Init_Err
1
20 Feed Radius E rrorI D Roty Cut_Init_ErrID
30 Cut Length
19 Sync StartPos
1 S yncS topPos
RotSt artPos
FedStartP os
1 RotaryCutI D
3. When RotyCut_In_Ex is TRUE, the rotary-cut relationship starts being established. When
RotyCut_In _Done is TRUE, it indicates the rotary-cut relationship between the rotary-cut axis and
feed axis is made successfully. Servo 1 is the feed axis and servo 2 is the rotary-cut axis.
RotyCut_In APF_RotaryCut_In
Rot yCut_ In
APF_Rotary Cut _In 4
Roty Cut _In_Ex Exec ute Done RotyCut_I n_Done
2 Rot ary Ax is Bus y Roty Cut_In_Bs y
1 FeedAx is Error RotyCut_In_Err
1 RotaryCutID ErrorID RotyCut_In_E rrID
4. When Vel _Ex is TRUE, the feed axis starts to execute the velocity instruction. At the moment, the
rotary-cut axis executes the rotary cut action based on the phase of the feed axis.
Vel MC_MoveVelocity
Axis1 USINT 1
11- 3 28
Chapter 11 Motion Control Instructions
Vel
MC_Mo veVelocit y 5
Axis1 A xis Invelocity Vel_I nvel
Vel_Ex Execute Busy Vel_Bsy
ContinuousUpdate Active Vel_Act
10000.0 Velocity CommandAborte d Vel_A bt
10000.0 A cce leration Error Vel_E rr
10000.0 Decelerat ion ErrorI D Vel_E rrid
10000.0 Jerk
Vel_Dir Direction
Vel_BM BufferMode
5. When RotyCut_Out_Ex is TRUE, the rotary-cut axis starts to break away from the feed axis. When
RotyCut_Out_Done is TRUE, it indicates that the rotary-cut axis breaks away successfully. After the
rotary-cut axis breaks away from the feed axis, it will return to the entry point and the motion of the
feed axis will not impact the rotary-cut axis any more.
RotyCut_Out APF_RotaryCut_Out
RotyCut_Out_Bsy BOOL
RotyCut_Out_Err BOOL
RotyCut_Out_ErrID WORD
11- 3 29
DVP-50MC Series Motion Controller Operation Manual
11- 3 30
Chapter 11 Motion Control Instructions
As a multi-axis motion controller, the motion controller supports the standard CNC function and can execute 11
G codes statically to achieve the simple numerical control of machine tools and robot control. Beyond that,
it could also be applied to the occasions where G codes are used for positioning and path planning.
CANopen Builder software provides CNC G code editing function; user could edit G codes in the CNC
editor or import the G codes converted by other design software into this editor. When G codes are input in
the code list, the three-dimension chart of G codes is output in the preview window.
All G codes will be downloaded to the controller during the program download.
G codes need be called in the motion control program after being edited. Using DMC_CartesianCoordinate
instruction, the servo axis can be controlled for position interpolation.
11.6.2 G Code Input Format
The G code formats that the motion controller supports are listed in the following table.
Number of
G code Function axes Format
supported
Format 1: G2 X_ Y_ Z_ A_ B_ C_ P_ Q_ I_ J_ (I_
Clockwise circular
K_ / J_ K_) T_ E_ F_
G2 arc /helical 8
Format 2: G2 X_ Y_ Z_ A_ B_ C_ P_ Q_ R_ T_
interpolation
E_ F_
Format 1: G3 X_ Y_ Z_ A_ B_ C_ P_ Q_ I_ J_ (I_
Anticlockwise circular
K_ / J_ K_) T_ E_ F_
G3 arc /helical 8
Format 2: G3 X_ Y_ Z_ A_ B_ C_ P_ Q_ R_ T_
interpolation
E_ F_
11- 3 31
DVP-50MC Series Motion Controller Operation Manual
Number of
G code Function axes Format
supported
11
1 G19
YZ plane for circular
-- Format 1: G19
interpolation
Smooth path
G52 -- Format 1: G52
transition
Note:
When one G code need be input in the CNC program in the CANopen Builder, N_ must be put to the left of
G code. N_ means the row number of the G code in the NC program.
N0 G0 X100 Y100
G code Unit
The position unit of axis X_, Y_, Z_, A_, B_, C_, P_, Q_ in G code is consistent with that of axis
parameter. Please set the same physical unit for each axis.
For example, the unit is set as mm. And thus G0 X100.5 Y300 Z30.6 indicates that axis X, Y, Z
move to the place of 100.5mm, 300mm, and 30.6mm respectively.
11- 3 32
Chapter 11 Motion Control Instructions
3. One or more items among X_, Y_, Z_, A_, B_, C_, P_, Q_, E_, E_, F_ in G2 and G3
instruction can be omitted except I_, J_, K_, R_.
4. The parameters on the right of G4, G51 instruction can not be omitted.
5. D_ can be omitted for M code. 11
6. Only one G code can be written in the same row in CNC editing area in the CANopen
Builder software.
G code transition
G code transition mode can be changed via G50/G51/G52. See the transition modes which are
usable to G0/G1/G2/G3 as follows.
11- 3 33
DVP-50MC Series Motion Controller Operation Manual
Defaults
1. Relative, absolute default: The default mode is absolute mode and could be set via G90/G91.
2. Plane default: The default plane is XY plane and could be switched via G17/G18/G19.
11 3. Transition mode: The default plane is an accurate stop mode and could be switched via
1 G50/G51/G52.
4. G0-related defaults: The velocity, acceleration, deceleration and jerk are the velocity,
acceleration, deceleration and jerk of each axis in the axis group parameters. They can be set via
DMC_SetG0Para instruction.
5. G1/G2/G3 defaults: The velocity, acceleration, deceleration and jerk are the velocity,
acceleration, deceleration and jerk of terminal actuator. They can be set via DMC_SetG1Para
instruction and modified via E, F parameter. E+ and E- can be input in G code to set the different
acceleration and deceleration rate.
Function: After G90 is executed, the terminal position of each axis in G code is based on 0 unit and
G91 can be used to switch into the relative mode in the process. It is absolute mode for NC program
by default.
Format: N_G90
Parameter Explanation:
11- 3 34
Chapter 11 Motion Control Instructions
Y
Position
6000 P2
11
3000 P1
X
O Position
3000 6000
Function: After G91 is executed, the terminal position of each axis in G code is counted in incremental
method beginning from the current position and G90 can be used to switch into the absolute mode in
the process.
Format: N_G91
Parameter Explanation:
N_: The row number of G code in NC program
Example:
The initial positions of axis X and Y are both 3000 units and the axis parameters are both default
values. The G codes to be executed are as follows:
N0 G91
N1 G0 X6000 Y6000
After G codes are executed, the Y/X curve for the whole movement process is shown below:
11- 3 35
DVP-50MC Series Motion Controller Operation Manual
Y
Position
9000 P2
11
1
3000
P1
X
O Position
3000 9000
G0 (Rapid Positioning)
Function:
Each axis moves from current position to the terminal position at the given speed. Maximum 8 axes
can be controlled and each axis is independent with each other in motion.
And the motion path figure is displayed below.
11- 3 36
Chapter 11 Motion Control Instructions
Instruction explanation:
1. G0 can control one or more axes and other axis can be omitted.
2. The speed, acceleration, deceleration and jerk of each axis in motion depend on axis-related
parameters in axis group parameters. They can be set via DMC_SetG0Para instruction.
3. Absolute mode decided by G90: The terminal position of G0 is based on 0 unit.
4. Relative mode decided by G91: The terminal position of G0 is an incremental value beginning
from the current position.
After G codes are executed, the Y/X curve for the whole movement process is shown
below:
11- 3 37
DVP-50MC Series Motion Controller Operation Manual
Y
Position
100000
11
1
10000
Position
O 10000 50000 X
After G codes are executed, the Position/Time curve for the whole movement process is
shown below:
Position Y
100000
X
50000
10000
t
O
Relative mode example:
The initial positions of axis X, Y are both 10000 units and their axis parameters are both default
values. The G codes to be executed are:
N0 G91
11- 3 38
Chapter 11 Motion Control Instructions
N1 G0 X50000 Y100000
After G codes are executed, the Y/X curve for the whole movement process is shown
below:
11
Y
Position
110000
10000
Position
O 10000 60000 X
After G codes are executed, the Position/Time curve for the whole movement process is
shown below:
Position Y
110000
X
60000
10000
t
11- 3 39
DVP-50MC Series Motion Controller Operation Manual
G1 (Linear Interpolation)
Function:
11
The cutter starts off from one point and moves straight to the target position at a given speed. The
1 instruction can control up to 8 axes and all axes start up or stop simultaneously. Three axes control
the position of the cutter together as the figure shows below.
11- 3 40
Chapter 11 Motion Control Instructions
F_:Specify the feed speed of the cutter, unit: unit/second, data type: LREAL.
When the cutter moves at a constant speed, the combined speed of all axes in G code is equal to F
value.
The method of calculation is shown as below.
F
When two axes exist,= V12 + V2 2 .
F= V12 + V2 2 + V32
When three axes exist, .
For more axes, F value could be calculated in the same way as above.
Instruction explanation:
1. G1 can control one or more axes and other axis can be omitted.
2. Both of E and F can be omitted.
If there is only one row of code in the CNC editing area and E, F are omitted, the velocity,
acceleration, deceleration and jerk are decided by the axis group parameters. They can be set
via DMC_SetG1Para. If there are multiple rows of codes and E and F in G1 code are omitted,
the velocity, acceleration, deceleration of the cutter are based on valid E and F in the previous
rows of codes. If the previous rows of G codes have not specified E and F, the axis group
parameters will prevail.
3. Absolute mode decided by G90: The terminal position of G1 is based on 0 unit.
4. Relative mode decided by G91: The terminal position of G1 is an incremental value beginning
from the current position.
11- 3 41
DVP-50MC Series Motion Controller Operation Manual
70000
20000
20000 20000
60000
X 50000
Y
After G codes are executed, the Position/Time curve for the whole movement process is
shown below:
Position
Z
70000
Y
60000
X
50000
20000
t
O
11- 3 42
Chapter 11 Motion Control Instructions
90000
20000
20000 20000
80000
X 70000
Y
After G codes are executed, the Position/Time curve for the whole movement process is
shown below:
Position
Z
90000
80000 Y
X
70000
20000
t
O
Function:
Circular interpolation: The cutter conducts the cutting of the processed object in the clockwise direction
at the feed speed given by parameter F on the circular arc with the fixed radius or the fixed center of a
11- 3 43
DVP-50MC Series Motion Controller Operation Manual
Format:
Format 1: N_G2 X_Y_Z_A_B_C_P_Q_I_J_(I_K_/J_K_)T_ E_E_F_
Format 2: N_G2 X_Y_Z_A_B_C_P_Q_R_T_ E_E_F_
Parameter explanation:
N_: The row number of G code in NC program
X_Y_Z_: Specify the terminal positions of axis X, Y and Z corresponding to the terminal point of
circular arc; Unit: unit, data type: LREAL.
A_B_C_P_Q_: Specify the terminal position of each added axis, Unit: unit, data type: LREAL.
I_J_: Specify the coordinate position of the center of a circle of XY plane, Unit: unit, data type: LREAL.
I_K_: Specify the coordinate position of the center of a circle of XZ plane, Unit: unit, data type: LREAL.
J_K_: Specify the coordinate position of the center of a circle of YZ plane, Unit: unit, data type:
LREAL.
T_: Specify the quantity of full circles, Unit: circle, data type: ULINT.
E_: Specify the acceleration and deceleration of the cutter. The positive number refers to the
acceleration; the negative number refers to the deceleration; Unit: unit/second2; data type: LREAL.
F: Specify the feed speed of the cutter, Unit: unit/second, data type: LREAL.
Instruction explanation:
1. Two axes among axis X, Y and Z make the circular interpolation on the plane specified by
instruction G17/G18/G19. The 3rd axis makes the linear interpolation in the direction vertical on
the specified plane.
11- 3 44
Chapter 11 Motion Control Instructions
2. The added axis A, B, C, P and Q make the linear interpolation. The linear interpolation and
circular interpolation start up or stop simultaneously.
3. Both of E and F can be omitted. If there is only one row of code in the CNC editing area and E,
F are omitted, the velocity, acceleration, deceleration are decided by axis group parameters. 11
They can be set via DMC_SetG1Para instruction.
If there are multiple rows of codes and E and F in G2 code are omitted, the velocity,
acceleration, deceleration of the cutter are based on valid E and F in the previous rows of codes
above the row where G2 is. If the previous rows of G codes have not specified E and F,
“maximum velocity”, “maximum acceleration” and “maximum deceleration” among axis group
parameters will prevail.
4. In absolute mode for G90, the terminal point of circular arc is the absolute coordinate value
regarding 0 unit in their own directions as reference. In relative mode for G91, the terminal point
of circular arc is the incremental value relative to the start point of circular arc.
5. No matter whether in the absolute mode or in relative mode, the coordinates of the center of a
circle I_J_(I_K_/J_K_) are always relative coordinates with the start point as reference
6. T is the number of full circles; the path is a length of arc when T=0; it is the circle number of full
circles plus the arc length when T is a constant.
7. Different from format 1, format 2 decides a circular arc via the start point, terminal point and
radius. If the input value on the right of R parameter is a positive number (R+), the circular arc is
the minor arc less than 180 degrees; if the input value on the right of R parameter is a negative
number (R-), the circular arc is the major arc more than 180 degrees.
8. The following full lines are the motion path when G2 selects R+ and R- and the arrows on the
arc indicate the motion direction.
Terminal point
R-
R+
Start point
Clockwise motion
11- 3 45
DVP-50MC Series Motion Controller Operation Manual
Y Z Z
Star t po int Start po int St art p oin t
I I J
11 R R R
1 O
Cente r of a circle
X O
Ce nter of a circle
X O
Cente r of a circle
Y
aa) XY pla ne ci rcul ar a rc ba) XZ p lan e circula r arc ca ) YZ p lane circula r arc
Please note the relations among the coordinate planes and I, J, K. Only two of I, J and K exist in
one circular arc instruction. Which two exist depends on corresponding plane, e.g. on XY plane,
only I and J show up.
The coordinate plane can be set by G17, G18 and G19. The circular and helical motion paths for G2
on different coordinate planes are shown as below.
Otherwise, it is
helical
interpolation.
11- 3 46
Chapter 11 Motion Control Instructions
terminal point
sR
diu
corresponding to
Ra
Circular interpolation Terminal point
Center(I,K) (X,Y,Z)
Y axis
R
Start point
G18 Y
us
di
coordinates, the
Ra
Terminal
Center(I,K)point(X,Z)
motion path is Y=0
circular
Start point
interpolation.
X
Otherwise, it is
helical
interpolation.
YZ plane:
When there is no
variation for the
start point and
Z Helical interpolation
terminal point
corresponding to Circular interpolation
Start point
Terminal point Terminal
X axis (X,Y,Z)
Center (J,K)
point (Y,Z)
Rad
Ra
R
motion path is
d iu
sR
X=0
circular
X
interpolation. Y
Otherwise, it is
helical
interpolation.
Example 1
Specify the center of a circle and conduct a circular interpolation in absolute mode
Current position (1000, 3000), axis parameters: default values, the G codes to be executed:
N00 G90
N01 G17
11- 3 47
DVP-50MC Series Motion Controller Operation Manual
11
Y Start point
1
3000
1000 Cente
I=1000
X
(0,0) 1000 2000 4000
Example 2:
Specify the center of a circle and conduct a circular interpolation in relative mode
Current position (1000, 3000), axis parameters: default values, the G codes to be executed:
N00 G91
N01 G17
N02 G2 X3000 Y-1000 I1000 J-2000
After G codes are executed, the Y/X curve for the whole movement process is shown below:
Y Start
3000
-1000
1000 Center
I = 1000
3000
X
(0, 0) 1000 2000 4000
11- 3 48
Chapter 11 Motion Control Instructions
Example 3:
Specify the center of a circle and conduct a circular interpolation with T in relative mode
11
Current position (2000, 0), axis parameters: default values, the G codes to be executed:
N00 G91
N01 G17
N02 G2 X-2000 Y2000 I0 J2000 T3
After G codes are executed, the path of the circular arc is 3 circles plus thick 1/4 of a circle.
The Y/X curve for the whole movement process is shown below:
Y
4000
X
(0, 0) 2000 4000
Example 4:
The helical interpolation with the center specified by XY plane
Current position (0, 0), axis parameters: default values, the G codes to be executed:
N00 G17
N01 G91
Instruction explanation:
While G2 is being executed, axis regards 0 as the start point and axis coordinate parameters as the
end points; the circular arc is drawn in clockwise direction; the final motion path is a helical curve.
The projection on XY plane is an half of the circle with the center (100,100).
11- 3 49
DVP-50MC Series Motion Controller Operation Manual
11
1
Example 5:
Omission format
N00 G0 X0 Y0 Z0
N03 G91
Y
Z
(10 0, 10 0,1 00)
(150 ,1 50)
Y X (10 0, 100)
Instruction explanation:
1. The axis position is (100, 100, 100) after execution of N01 row of instruction is finished;
2. In N02 row of instruction, there are only I and J parameters and for other omitted parameter
values, they are based on those valid in the last instruction. In other words, the N02 instruction is
equivalent to: N02 X100 Y100 Z100 I100 J100. So both of the start point and end point are (100,
100, 100) and the motion path is a full circle.
3. N03 row of instruction is G91 and the following coordinates are relative.
Since X, Y and Z are omitted in N04 row of instruction, the terminal position are an absolute
position (100, 100, 100). Thus the N04 path is a full circle with the start point (100,100,100) and
11- 3 50
Chapter 11 Motion Control Instructions
Example 6:
11
Helical interpolation with the radius specified by XY plane (Current position: 0)
N01 G0 X0 Y0 Z0
Instruction explanation:
The motion path is a major arc while the first G2 code is executed and it is a minor arc while the
second G2 code is executed.
200
(200,200)
0
X
Example 7:
The helical interpolation with T and the center specified on XY plane (Current position: 0)
Instruction explanation:
The motion path is a helical curve and the projection on XY plane is a full circle with the center (50,
50).
11- 3 51
DVP-50MC Series Motion Controller Operation Manual
11
1
Function explanation:
Circular interpolation: The cutter conducts the arc cutting of the processed object in the anticlockwise
direction at the feed speed given by parameter F on the circular arc with the fixed radius or the fixed
center on the specified plane.
Helical interpolation: The cutter moves in the anticlockwise direction on the circular arc of the specified
plane, which is a circular interpolation and simultaneously moves in the direction vertical to the
specified plane at the feed speed given by parameter F, which is linear interpolation.
Format:
Format1: N_G3 X_Y_Z_A_B_C_P_Q_I_J_(I_K_/J_K_)T_ E_E_F_
Format2: N_G3 X_Y_Z_A_B_C_P_Q_R_T_ E_E_F_
Parameter explanation:
N_: The row number of G code in NC program
X_Y_Z_: Specify the terminal positions of axis X, Y and Z corresponding to the terminal point of
circular arc; Unit: unit, data type: LREAL.
A_B_C_P_Q_: Specify the terminal positions of added axes, Unit: unit, data type: LREAL.
I_J_: Specify the coordinate position of the specified center on XY plane, Unit: unit, data type: LREAL.
11- 3 52
Chapter 11 Motion Control Instructions
I_K_: Specify the coordinate position of the specified center on XZ plane, Unit: unit, data type: LREAL.
J_K_: Specify the coordinate position of the specified center on YZ plane, Unit: unit, data type:
LREAL.
T_: Specify the circle number of full circles, Unit: circle, data type: ULINT. 11
E_: Specify the acceleration and deceleration of the cutter. The positive number indicates the
acceleration; the negative number indicates the deceleration, Unit: unit/second2, data type: LREAL.
F: Specify the feed speed of the cutter, Unit: unit/second, data type: LREAL.
Instruction explanation:
Two axes among axis X, Y and Z make the circular interpolation on the plane specified by
G17/G18/G19. The 3rd axis makes the linear interpolation in the direction vertical to the
specified plane.
The added axis A, B, C, P and Q make the linear interpolation. The linear interpolation
and circular interpolation start up or stop simultaneously.
Both of E and F can be omitted. If there is only one row of code in the CNC editing area
and E, F are omitted, the velocity, acceleration and deceleration are decided by the axis
group parameters.
If there are multiple rows of codes and E and F in G3 code are omitted, the velocity,
acceleration and deceleration of the cutter are based on valid E and F in the previous
rows of codes above the row where G3 is. If the previous rows of G codes have not
specified E and F, “maximum velocity”, “maximum acceleration” and “maximum
deceleration” among axis group parameters will prevail.
In absolute mode for G90, the terminal point of a circular arc is of absolute coordinate
values regarding 0 unit in their respective directions as reference. In relative mode for
G91, the terminal point of a circular arc is of incremental values relative to the start point
of the circular arc.
No matter whether in the absolute mode or in relative mode, the coordinates of the center
of a circle I_J_(I_K_/J_K_) are always the relative coordinates with the start point as
reference.
T is the number of full circles; the path is a length of arc when T=0; the path is the
corresponding full circles plus the arc length when T is a constant.
Different from format 1, format 2 determines a length of circular arc via the start point,
terminal point and radius. If the input value on the right of R parameter is a positive
number (R+), the circular arc is a minor arc less than 180 degrees; if the input value on
the right of R parameter is a negative number (R-), the circular arc is a major arc more
than 180 degrees.
The following full lines are the motion paths when G3 selects R+ and R- and the arrows
on the arcs refer to the motion direction.
11- 3 53
DVP-50MC Series Motion Controller Operation Manual
11 Y
Terminal point
Z
Terminal point
Z
Terminal point
1 Start point Start point Start point
R R R
Ce nter of
Ce nter of
Ce nter of
J K K
a c ir cl e
a c ir cl e
a c ir cl e
I l J
O X O X O Y
Please note the relations among the coordinate planes and I, J, K. Only two of I, J and K exist in
one circular arc instruction. Which two exist depends on the corresponding plane, e.g. on XY plane,
only I and J exist.
The coordinate plane can be set by G17, G18 and G19. The circular and helical motion paths for G3
on different coordinate planes are shown as below.
G
Function Path figure
code
XY plane: When
there is some
variation for the
Z Terminal point(X,Y,Z)
start point and
terminal point
corresponding
to Z axis
G17 Y
coordinates, the Terminal point(X,Y)
11- 3 54
Chapter 11 Motion Control Instructions
G
Function Path figure
code
XZ plane:
When there is 11
variation for the
Z
Helical interpolation
start point and
Terminal point(X,Y,Z)
terminal point
ius R
corresponding Circular interpolation Ra d
Center (I,K)
t
Terminal
to Y axis
o in
point(X,Z)
G18
rt p
)
coordinates, the Y=0 (I, K
Sta
t er Y
Ce n
Ra
motion is helical
di u
sR
Start point
interpolation.
Otherwise, it is
circular X
interpolation on
XZ plane.
YZ plane:
When there is
variation for the Z
Helical interpolation
start point and
terminal point Circular interpolation
R
ad
corresponding
iu
R
s
ad
R
iu
to X axis Start
s
Center(J,K)
R
Example 1
Specify the center of a circle and circular interpolation in absolute mode
Current position (4000, 2000), axis parameters: default values, the G codes to be executed are:
N0 G90
11- 3 55
DVP-50MC Series Motion Controller Operation Manual
N1 G17
11 After G codes are executed, the Y/X curve for the whole movement process is shown below:
1
Y
End point
3000
2000
Start point
J=-1000
Center
1000
I=-2000
X
(0,0) 1000 2000 4000
Example 2
Specify the center of a circle and circular interpolation in relative mode
Current position (4000, 2000), axis parameters: default values, the G codes to be executed are:
N0 G91
N1 G17
N2 G3 X-3000 Y1000 I-2000 J-1000
After G codes are executed, the Y/X curve for the whole movement process is shown below:
Y End
3000
1000
Start point
2000
J=-1000
Center
1000
I=-2000
-3000
X
(0,0) 1000 2000 4000
11- 3 56
Chapter 11 Motion Control Instructions
Example 3
Specify the center of a circle and circular interpolation with T in relative mode
11
Current position (2000, 0), axis parameters: default values, the G codes to be executed are:
N0 G91
N1 G17
Instruction explanation:
After G codes are executed, the motion path is the arc on XY plane and the arc length is (3+3/4)
times the circumference of a circle.
4000
2000
End
终点point
S起点
tart point
0 2000 4000
X
Example 4
The helical interpolation with the center of a circle specified
Current position (0, 0), axis parameters: default values, the G codes to be executed are:
N0 G17
11- 3 57
DVP-50MC Series Motion Controller Operation Manual
11
Since the variation of Z axis is 100, the motion path is helical curve and the projection on XY plane is a
1 full circle.
If there is no variation for Z axis, the motion path is the circular arc on XY plane with the center (50,50)
and the arc length of 2.5 times the circumference of a full circle.
Function:
The three instructions are used for deciding the selection of circular interpolation or helical
interpolation plane and have no impact on the linear interpolation.
While the program is being executed, the three work planes can be switched with each other. If no
plane option is set, the initial state of system is XY plane (G17).
Format: N_G17
N_G18
N_G19
Parameter Explanation:
N_: The row number of G code in NC program
The figure of planes is shown as follows:
11- 3 58
Chapter 11 Motion Control Instructions
11
11- 3 59
DVP-50MC Series Motion Controller Operation Manual
G4 (Dwell Instruction)
1 Parameter explanation:
N_: The row number of G code in NC program
K_: Specify the delay time, unit: second. Range: 0.001 second ~100000 seconds
Instruction explanation:
After the lathe completes the processing for some phase, the cutter need be stopped moving
temporarily. At this moment, G4 can be utilized to make the cutter stop for a period of time.
Instruction example:
N00 G1 X10000
N01 G4 K10
N02 G1 X20000
Position
20000
10000
10 sec
After execution of the instruction of number N0 is finished, the program will be delayed for 10 seconds
and afterwards, the instruction of number N2 will continue to be executed.
Function: Change the transition mode into precise stop. And the following transition modes are always
precise stop. G51/G52 can be used for the switch in the execution process. The terminal actuator will
reduce its speed to 0 between G codes.
Format: N_ G50
Parameter Explanation:
N_: The row number of G code in NC program
11- 3 60
Chapter 11 Motion Control Instructions
Example
N0 G50
N1 G1 X100 Y100 11
N2 G1 X300 Y100
100
0 100 300 X
Function: To change the transition mode into arc transition. The following transition modes are always
arc transition. G50/G52 can be used for the switch of transition modes in the execution process. The
terminal actuator will not reduce its speed between G codes and the transition curve is an arc. In this
mode, the speed of the first G code prevails as the entire motion speed and F can not be used for
changing the speed in the motion. VelOverride parameter of DMC_CartesianCoordinate instruction
can be set to control the speed of terminal actuator.
Format: N_ G51 D_
Parameter Explanation:
Example 1
N0 G51 D40
N1 G1 X100 Y100
N2 G1 X300 Y100
11- 3 61
DVP-50MC Series Motion Controller Operation Manual
40
100
11
40
0 100 300 X
Example 2
N0 G1 X100 Y100
N1 G51 D50
N2 G1 X200 Y100
N3 G1 X200 Y0
50
100
50
0 100 200 X
Function: To change the transition mode into smooth path transition. The following transition modes
are always smooth path transition. G50/G51 can be used for the switch of transition modes in the
execution process. The terminal actuator will not reduce its speed between G codes. It is suitable for
continual interpolation of small segments. In this mode, the speed of the first G code prevails as the
entire motion speed and F can not be used for changing the speed in the motion. VelOverride
parameter of DMC_CartesianCoordinate instruction can be set to control the speed of terminal
actuator.
Format: N_ G52
Parameter Explanation:
N_:The row number of G code in NC program
11- 3 62
Chapter 11 Motion Control Instructions
Example
Draw a part of a sin curve.
11
N0 G52 N1 G1 X0 Y0 E5 E-5 F5
11- 3 63
DVP-50MC Series Motion Controller Operation Manual
11
N60 G1 X5.9 Y1.920587371 N61 G1 X6 Y1.902113033
0 5 10 X
11- 3 64
Chapter 11 Motion Control Instructions
M Code
Example
N0 G1 X100 Y50
N1 M20
N2 G1 X200 Y50 M21 D3.14
N3 G1 X300 Y150
11- 3 65
DVP-50MC Series Motion Controller Operation Manual
DMC_ReadMFunc tion1
DMC_Read MFunct ion 1
1 Axe sGroup Valid
Read M20 Enable Busy
20
11
MFun ctionID Error
ErrorID
1
M f un ction State of M20
MFunc tionValue Data from M20
DMC_ResetMFunction1
DMC_Res etMFunc tion 2
1 Axe sGroup Done
Reset M20 Ex ecute Busy
20 MFun ctionID Error
ErrorID
DMC_ReadMFunc tion2
DMC_Read MFunct ion 3
1 Axe sGroup Valid
Read M21 Enable Busy
21 MFun ctionID Error
ErrorID
M f un ction S tate of M21
MFunc tionValue Data from M21
150
50
When the two variables “Read M20” and “Read M21” are TRUE, G code execution starts and the terminal
actuator stops at the position (100,50). At the moment, the variable “State of M20” is TRUE. After the
execution of other actions is finished, the variable “Reset M20” changes to TRUE and M code is reset.
Then G code execution continues. The terminal actuator starts to move to (200, 50). Meanwhile, the
variable “state of M21” changes to TRUE and the value of “Data from M21” variable is 3.14. The terminal
actuator will not stop at that time. After reaching the position (200, 50), it will keep moving till the poition
(300, 150) is reached and the execution is completed.
11- 3 66
Chapter 11 Motion Control Instructions
DMC_CartesianCoordinate
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
When Execute
VelOverride Velocity override LREAL 0~500
changes from
11- 3 67
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
(%) (0) FALSE to TRUE.
11 When Execute
1 Depth
Fill 1 for internal
UINT 1 changes from
reservation
FALSE to TRUE.
When Execute
Fill 0 for internal
Mode INT 0 changes from
reservation
FALSE to TRUE.
Res Reserved
Output Parameters
11- 3 68
Chapter 11 Motion Control Instructions
11- 3 69
DVP-50MC Series Motion Controller Operation Manual
11
1 Execute
Done
B usy
Active
Co mma ndAbo rt ed
Error
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle later,
Active changes to TRUE. When positionging is done, Done changes to TRUE. Meanwhile
Busy and Active change to FALSE.
Case 2: If the instruction is aborted by MC_Stop or MC_Halt after Execute changes from FALSE to
TRUE, CommandAborted changes to TRUE and meanwhile Busy and Active change to
FALSE. When Execute changes from TRUE to FALSE, CommandAborted changes to FALSE.
Case 3: When an error occurs after Execute changes from FALSE to TRUE, Error changes to TRUE
and ErrorID shows corresponding error code. Meanwhile, Busy and Active change to FALSE.
Error changes to FALSE when Execute changes from TRUE to FALSE.
Case 4: When the instruction execution is finished after Execute changes from TRUE to FALSE during
the instruction execution, Done changes to TRUE and meanwhile, Busy and Active change to
FALSE. One cycle later, Done changes to FALSE.
Function
2. Stop is used to terminate the execution of G code. Once Stop is set to TRUE, the terminal actuator
will stop immediately and meanwhile Done of the instruction changes to TRUE and the G code
execution is terminated.
11- 3 70
Chapter 11 Motion Control Instructions
3. VelOverride is used for changing the velocity of the terminal actuator ranging from 0~500 with the
unit: %. “100” means “100%”. The velocity of the terminal actuator after modification= The velocity
of the terminal actuator before modification x override value.
The axis will accerate or decelerate till the target velocity after modification is reached according to 11
the acceration rate and deceleration rate of the G code which is being executed currently.
4. NCFile is used to specify the NC file number for execution. The number is the ID of the CNC file
built in the programming software.
5. AxesGroup is to specify the number of the axes group which is to perform G code.
6. Before using the DMC_CartesianCoordinate instruction, the axes in the axes group must be in
standstill. Otherwise, there will be an error in the instruction execution.
7. Before the instruction controls axes motion, axes should be adjusted with single-axis instructions to
the position where G code execution starts first. Then DMC_ AddAxisToGroup is used to add
individual axes to the axes group. Afterwards, DMC_SetG0Para and DMC_SetG1Para are used to
set relevant parameters of G0 and G1/G2/G3. Finally the DMC_CartesianCoordinate instruction is
executed to control axes for interpolation along the path planned via G codes.
Programming Example
Axis1 USINT 1
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Pwr1 MC_Power
Axis2 USINT 2
11- 3 71
DVP-50MC Series Motion Controller Operation Manual
Pwr1_Sta BOOL
11 Pwr1_Bsy BOOL
1
Pwr1_Act BOOL
Pwr1_Err BOOL
Pwr1_ErrID WORD
ATG DMC_AddAxisToGroup
Axes1 USINT 1
ATG_Done BOOL
ATG_Bsy BOOL
ATG_Err BOOL
ATG_ErrID WORD
ATG1 DMC_AddAxisToGroup
ATG1_Done BOOL
ATG1_Bsy BOOL
ATG1_Err BOOL
ATG1_ErrID WORD
SG1 DMC_SetG1Para
SG1_AG USINT 1
SG1_Done BOOL
SG1_Bsy BOOL
SG1_Err BOOL
SG1_ErrID WORD
CC DMC_CartesianCoordinate
11- 3 72
Chapter 11 Motion Control Instructions
CC_Bsy BOOL
CC_Act BOOL
CC_Abt BOOL
CC_Err BOOL
CC_ErrID WORD
CC_CL UDINT
G code:
N0 G1 X1000 Y1000
N1 G1 X5200 Y3500
Pwr Pwr1
MC_Power 1 MC_Power 2
Axis 1 A xis Stat us Pwr_Sta Axis2 A xis Stat us Pwr1_Sta
Pwr_En Enable Busy Pwr_Bsy P wr_Sta Enable Busy Pwr1_Bs y
True EnableP ositive Ac tive Pwr_Act True EnableP ositive Ac tive Pwr1_Ac t
True EnableNegativ e Error Pwr_ Err True EnableNegativ e Error Pwr1 _Err
Pwr_BM BufferMode ErrorI D Pwr_ ErrID Pwr1_BM BufferMode ErrorI D Pwr1 _ErrID
ATG ATG 1
DMC_AddAx is ToGroup 3 DMC_AddAx is ToGroup 4
A xes1 A xesG roup Done ATG_Done Ax es1 A xesG ro up Done ATG1_Done
A xis1 Axis Busy ATG_Bs y A xis2 Axis Busy ATG1_Bs y
ATG _Ex Exec ute Error ATG_Err ATG 1_Ex Exec ute Error ATG1_Err
1 I denthGroup ErrorID ATG_ErrID 2 I denthGroup ErrorID ATG1_ErrID
SG 1 CC
DMC_SetG1P ara 5 DMC_Cartes ianCoordinate 6
A xes1 A xesG roup Done SG1_Done CC_Ex E xecut e Done CC_Done
SG 1_Ex Exec ute Busy SG1_Bs y CC_P a Pause Bus y CC_Bs y
SG1_Vel Velocity Error SG1_Err CC_St Stop A ctive CC_Ac t
SG1_Ac c A cceleration ErrorID SG1_ErrID 10 0 VelOverride CommandAborted CC_Abt
SG1_Dec Dec eleration 1 Depth Error CC_Err
SG1_Jer Jerk 1 NCFile ErrorI D CC_ErrID
A xes 1 A xesG ro up CurrentLine CC_CL
0 Mode
Res
11- 3 73
DVP-50MC Series Motion Controller Operation Manual
2. Motion Curve
Y axi s
11 3500
1
1000
0
1000 5200 X a xis
C C_Ex
CC_Done
CC_Bs y
CC_Ac t
CC_Err
When Pwr_En is set to TRUE, MC_Power instruction is executed to enable two axes. Then
ATG_Ex and ATG1_Ex are set to TRUE and DMC_AddAxisToGroup instruction is executed to
add Axis1 and Axis2 to the axes group Axes1. Afterwards, set SG1_Ex to TRUE to execute
DMC_SetG1Para instruction and set the default velocity of G1/G2/G3. At last, CC_Ex is set to
TRUE and DMC_ CartesianCoordinate instruction is executed to control axis 1 and axis 2 for
the interpolation based on the path planned via G codes.
When CC_Ex changes from TRUE to FALSE, CC_Done changes from TRUE to FALSE.
11- 3 74
Chapter 11 Motion Control Instructions
DMC_ReadMFunction
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
1~8
The number of the axes When Enable
AxesGroup USINT (The variable value
group changes to TRUE
must be set)
The instruction is
executed when Enable TRUE or FALSE
Enable BOOL -
changes from FALSE to (FALSE)
TRUE.
0~99
The number of a M When Enable
MFunctionID USINT (The variable value
code changes to TRUE
must be set)
Output Parameters
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
TRUE when an error occurs in execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs.
ErrorID WORD -
Please refer to section 12.2.
MFunction TRUE when the M code is reached during G BOOL TRUE / FALSE
11- 3 75
DVP-50MC Series Motion Controller Operation Manual
1
Output Update Timing
Cas e1 Case 2
En able
Valid
Bus y
Error
E rro r ID
Case 1: When Enable changes from FALSE to TRUE, Valid and Busy change to TRUE
simultaneously. When Enable changes to FALSE, Valid and Busy both change to FALSE.
Case 2: When an error occurs, Error changes to TRUE and ErrorID shows corresponding error codes.
Meanwhile Busy and Valid change to FALSE. When Enable changes from TRUE to FALSE,
Error changes to FALSE and the value in ErrorID is cleared.
Function
DMC_ReadMFunction is used for reading the state of M code and the data from it. When the G code
execution reaches where the M code set by the instruction is, MFunction changes to TRUE and
meanwhile MFunctionValue outputs the parameter value after M code. The firmware of V1.01 and
above supports the function.
11- 3 76
Chapter 11 Motion Control Instructions
Programming Example
RMF DMC_ReadMFunction
Axes1 USINT 1
RMF_MID USINT 0
RMF_Va BOOL
RMF_Bsy BOOL
RMF_Err BOOL
RMF_ErrID WORD
RMF_MF BOOL
RMF_MFV LREAL
RMF
DMC_ReadMFunction 1
Axes1 AxesG roup Valid RMF_Va
RMF_En E nable Busy RMF_Bsy
RMF_MID MFunct ionI D Error RMF_Err
ErrorID RMF_ErrID
MF unct ion RMF_MF
MFunctionValue RMF_MFV
11- 3 77
DVP-50MC Series Motion Controller Operation Manual
2. Timing Chart
Case1 Case 2
11
1 RMF_En
RMF_ Va
RMF_ Bsy
RMF_Err
RMF_ErrID
RMF_ MF
RMF_MFV
When RMF_En changes from FALSE to TRUE, an error in the instruction parameter input
occurs, RMF_Bsy changes from FALSE to TRUE in the first cycle and the M code parameter
value which was executed last time is cleared. In the second cycle, RMF_Err changes from
FASLE to TRUE, meanwhile RMF_Bsy changes from TRUE to FALSE and RMF_ErrID outputs
corresponding error codes. When RMF_En changes from TRUE to FALSE, RMF_Err changes
from TRUE to FALSE and meanwhile the value in RMF_ErrID is cleared.
11- 3 78
Chapter 11 Motion Control Instructions
DMC_ResetMFunction
DVP50MC11T/DVP50MC11T-06
11
FB DMC_ResetMFunction instruction resets the state of M code. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-16S
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
1~8
When Execute
The number of the axes (The variable
AxesGroup USINT changes from
group value must be
FALSE to TRUE.
set)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
0~99
When Execute
The number of the M (The variable
MFunctionID USINT changes from
code value must be
FALSE to TRUE.
set)
Output Parameters
11- 3 79
DVP-50MC Series Motion Controller Operation Manual
Case 1 Ca se2
E xecute
Done
Busy
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle later,
Done changes to TRUE and Busy changes to FALSE.
Case 2: When an error occurs during the instruction execution, Error changes to TRUE and ErrorID
shows corresponding error code. Meanwhile, Busy changes to FALSE. Error changes to
FALSE when Execute changes from TRUE to FALSE.
Function
DMC_ResetMFunction instruction resets the state of M code. When G code execution reaches where
M code set by the intruction is, the output state of M code is TRUE and DMC_ResetMFunction
instruction is executed. The output state of M code is reset to FALSE and G code execution will
continue. The firmware of V1.01 and above supports the function.
11- 3 80
Chapter 11 Motion Control Instructions
Programming Example
RMF DMC_ReadMFunction
Axes1 USINT 1
RMF_MID USINT 0
RMF_Va BOOL
RMF_Bsy BOOL
RMF_Err BOOL
RMF_ErrID WORD
RMF_MF BOOL
RMF_MFV LREAL
REM DMC_ResetMFunction
REM_MID USINT 0
REM_Done BOOL
REM_Bsy BOOL
REM_Err BOOL
REM_ErrID WORD
11- 3 81
DVP-50MC Series Motion Controller Operation Manual
REM
DMC_ResetMFunction 1
Axe s1 AxesGroup Do ne REM_Done
REM_Ex Execute Busy REM_Bsy
2. Timing Chart
Case
RMF_E n
RMF_Va
RMF_B sy
RMF_MF
RMF_MFV
REM_Ex
REM_ Do ne
REM_B sy
RE M_Err
REM_ ErrID
11- 3 82
Chapter 11 Motion Control Instructions
DMC_SetG0Para
DMC_S etG0Para_instance
DMC_S etG0Para
AxesGroup Done
Execut e Busy
Velocity Error
Acceleration ErrorI D
Deceleration
Jerk
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
1~8 When Execute
The number of the axes
AxesGroup USINT (The variable value changes from
group
must be set) FALSE to TRUE.
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
11- 3 83
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
When the setting is When Execute changes from TRUE to FALSE after
Done
completed. the instruction execution is completed.
Case 1 Ca se2
E xecute
Done
Busy
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle later,
Done changes to TRUE and meanwhile Busy changes to FALSE.
Case 2: When an error occurs during the instruction execution, Error changes to TRUE and ErrorID
shows corresponding error code. Meanwhile, Busy changes to FALSE. Error changes to
FALSE when Execute changes from TRUE to FALSE.
Function
DMC_SetG0Para is used for setting the velocity, acceleration, deceleration and jerk of G0. When G0 of
11- 3 84
Chapter 11 Motion Control Instructions
G codes is executed, the velocity, acceleration, deceleration and jerk will be performed according to the
parameters set by DMC_SetG0Para instruction.
Programming Example 11
SG0 DMC_SetG0Para
Axes1 USINT 1
SG0_Done BOOL
SG0_Bsy BOOL
SG0_Err BOOL
SG0_ErrID WORD
SG 0
DMC_SetG0P ara 1
A xes1 A xesG roup Done SG0_Done
SG 0_Ex Execute Busy SG0_Bsy
SG0_Vel Velocity Error SG0_Err
SG0_Acc A cceleration ErrorID SG0_ErrID
SG0_Dec Deceleration
SG0_Jer Jerk
2. Timing Chart
Case
SG 0_Ex
SG0_ Do ne
S G0_B sy
SG 0_Err
SG0_ ErrID
11- 3 85
DVP-50MC Series Motion Controller Operation Manual
When SG0_Ex changes from FALSE to TRUE, DMC_SetG0Para instruction is executed. In the
same cycle, SG0_Bsy changes from FALSE to TRUE. In the second cycle, SG0_Done changes
from FALSE to TRUE and meanwhile SG0_Bsy changes from TRUE to FALSE. So G0 among G
11 codes will be executed according to the velocity, acceleration, deceleration and jerk which are set
1 by the instruction.
When SG0_Ex changes from TRUE to FALSE, SG0_Done changes from TRUE to FALSE.
11- 3 86
Chapter 11 Motion Control Instructions
DMC_SetG1Para
DMC_S etG1Para_instanc e
DMC_S etG1Para
Ax esGroup Done
Ex ecut e Busy
Velocity Error
Ac celeration ErrorI D
Deceleration
J erk
Input Parameters
11- 3 87
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
When the setting is When Execute changes from TRUE to FALSE after the
Done
completed. instruction execution is completed.
Case 1 Ca se 2
E xecute
Done
Busy
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle later,
Done changes to TRUE and Busy changes to FALSE.
Case 2: When an error occurs during the instruction execution, Error changes to TRUE and ErrorID
shows corresponding error code. Meanwhile, Busy changes to FALSE. Error changes to
FALSE when Execute changes from TRUE to FALSE.
11- 3 88
Chapter 11 Motion Control Instructions
Function
DMC_SetG1Para instruction sets the default velocity, acceleration, deceleration and jerk for G1/G2/G3.
When G codes execution reaches G1/G2/G3, G1/G2/G3 will be performed accoridng to the velocity,
acceleration and deceleration set by the instruction if E and F vaues are not specified. Otherwise, they 11
will run based on the filled E and F values in G codes.
Programming Example
SG1 DMC_SetG1Para
Axes1 USINT 1
SG1_Done BOOL
SG1_Bsy BOOL
SG1_Err BOOL
SG1_ErrID WORD
SG 1
DMC_SetG1P ara 1
A xes1 A xesG roup Done SG1_Done
SG 1_Ex Exec ute Busy SG1_Bs y
SG1_Vel Velocity Error SG1_Err
SG1_Ac c A cceleration ErrorID SG1_ErrID
SG1_Dec Dec eleration
SG1_Jer Jerk
11- 3 89
DVP-50MC Series Motion Controller Operation Manual
2. Timing Chart
Case
11 SG 1_Ex
1 SG1_ Do ne
S G1_B sy
SG 1_Err
SG1_ ErrID
When SG1_Ex changes from FALSE to TRUE, DMC_SetG1Para instruction is executed. In the
same cycle, SG1_Bsy changes from FALSE to TRUE. In the second cycle, SG1_Done changes
from FALSE to TRUE and meanwhile SG1_Bsy changes from TRUE to FALSE. So G1 among
G codes will be executed according to the velocity, acceleration, deceleration and jerk which are
set by the instruction.
When SG1_Ex changes from TRUE to FALSE, SG1_Done changes from TRUE to FALSE.
11- 3 90
Chapter 11 Motion Control Instructions
DMC_SetStartPosition
DMC_SetSta rt Position_instance
DMC_SetSta rt Position
AxesGroup Done
Execut e Busy
X_S tartPos Error
Y_St art Pos ErrorI D
Z_Sta rt Pos
A_S tartPos
B_St art Pos
C_StartP os
P_S tartPos
Q _StartPos
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
1~8 When Execute
The number of the axes
AxesGroup USINT (The variable value changes from
group
must be set) FALSE to TRUE.
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL -
changes from FALSE to (FALSE)
TRUE.
11- 3 91
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
Positive number, 0, When Execute
11 A_StartPos
Specify the start
LREAL negative number changes from
1 positionof A axis.
(0) FALSE to TRUE.
Output Parameters
When the setting is When Execute changes from TRUE to FALSE after
Done
completed. the instruction execution is completed.
11- 3 92
Chapter 11 Motion Control Instructions
Case 1 Ca se 2
11
E xec ute
Done
Bus y
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle later,
Done changes to TRUE and Busy changes to FALSE.
Case 2: When an error occurs during the instruction execution, Error changes to TRUE and ErrorID
shows corresponding error code. Meanwhile, Busy changes to FALSE. Error changes to
FALSE when Execute changes from TRUE to FALSE.
Function
DMC_SetStartPosition instruction sets the start positions of 8 axes of G code. After the instruction is
executed, the motion begins from the start positions of X, Y, Z, A, B, C, P and Q axes specified by the
instruction. For example, the start position of X axis is set to 10000 and G code is G0 X1000. So if G
code is to be executed, for X axis, the motion will begin from the position 10000 and get to 1000.
The start positions need not be set with the instructon if the DMC_CartesianCoordinate instruction is
used to perform G code. The DMC_CartesianCoordinate instruction will set the start positions
automatically.
Programming Example
SSP DMC_SetStartPosition
Axes1 USINT 1
11- 3 93
DVP-50MC Series Motion Controller Operation Manual
SSP_Done BOOL
SSP_Bsy BOOL
SSP_Err BOOL
SSP_ErrID WORD
S SP
DMC_S etStartPosition 1
Axes1 AxesGroup Do ne SS P_Done
SSP_Ex Execute Busy SS P_Bsy
SSP _X X_St art Pos Error SS P_Err
SSP_ Y Y_StartP os ErrorID SS P_ErrI D
SSP_Z Z_StartPos
SSP _A A_St art Pos
SSP _B B_St art Pos
SSP_C C_StartPos
SSP _P P_St art Pos
SSP_Q Q_St art Pos
2. Timing Chart
Case
SS P_Ex
SSP_ Do ne
S SP_B sy
SSP _Err
SSP_ ErrID
When SSP_Ex changes from TRUE to FALSE, SSP_Done changes from TRUE to FALSE.
11- 3 94
Chapter 11 Motion Control Instructions
D MC_AddA xisToGroup_instance
DMC_AddAxisToGroup
AxesGroup Done
Axis Busy
Execute Error
IdentInGroup ErrorID
Input Parameters
Refer to Functions
The axis number of the axis When Execute
of Section 2.2.
Axis which is added to the axes USINT changes from
(The variable value
group FALSE to TRUE.
must be set)
11- 3 95
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
Parameter
Function Data type Valid range
name
11
1 Done TRUE when the instruction execution is completed. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
When adding the axis to the axes When Execute changes from TRUE to
Done
group is finished. FALSE
Case 1 Ca se 2
E xec ute
Done
Bus y
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle
later, Done changes to TRUE and Busy changes to FALSE. When Execute changes
from TRUE to FALSE, Done changes to FALSE.
Case 2: When an error occurs during the instruction execution, Error changes to TRUE and
ErrorID shows corresponding error code. Meanwhile, Busy changes to FALSE. Error
11- 3 96
Chapter 11 Motion Control Instructions
changes to FALSE and the value in ErrorID is cleared to 0 when Execute changes from
TRUE to FALSE.
Function 11
DMC_AddAxisToGroup is used to add an axis to an axes group and set the number of the axis in the
axes group.
1. When Done of DMC_AddAxisToGroup changes to TRUE, it means the axis is added to the axes
group successfully. Changing Execute to FALSE can not remove the axis from the axis group. To
remove the axis from the axes group, DMC_RemoveAxisFromGroup instruction is needed. Refer to
section 11.7.2 for more details about explanation of DMC_RemoveAxisFromGroup instruction.
2. IdentInGroup is the identity number of an axis in the axes group. Range:1~8. 1: X axis, 2: Y axis, 3:
Z axis, 4: A axis, 5: B axis, 6: C axis, 7: P axis and 8: Q axis.
3. DMC_AddAxisToGroup instruction can be executed only before the axes group is enabled. If the
instruction is executed after the axes group is enabled, an error will occur in the instruction.
11- 3 97
DVP-50MC Series Motion Controller Operation Manual
11.7.2 DMC_RemoveAxisFromGroup
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
Output Parameters
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 3 98
Chapter 11 Motion Control Instructions
When the axis is removed from the When Execute changes from TRUE to
Done
axes group. FALSE
Case 1 Ca se 2
E xec ute
Done
Bus y
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle later,
Done changes to TRUE and Busy changes to FALSE. When Execute changes from TRUE
to FALSE, Done changes to FALSE.
Case 2: When there is an error in the input parameters of the instruction or the axes group is not
disabled and Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle
later, Error changes to TRUE and ErrorID shows error codes and meawhile Busy changes to
FALSE. When Execute changes from TRUE to FALSE, Error changes to FALSE and the
value in ErrorID is cleared to 0.
11- 3 99
DVP-50MC Series Motion Controller Operation Manual
Function
DMC_RemoveAxisFromGroup is used to remove an axis from an axes group. The value of the input
parameter IdentlnGroup should be within the ranges of 1~8. If the range is exceeded, an error will occur.
11 As the instruction is executed, an error in the instruction will occur immedately if the axes group is
1 enabled. The instruction can be used only when the axes group is not enabled.
11- 4 00
Chapter 11 Motion Control Instructions
11.7.3 DMC_UngroupAllAxes
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Enable TRUE or FALSE
Execute BOOL
changes from FALSE (FALSE)
to TRUE.
Output Parameters
Parameter
Function Data type Valid range
name
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 4 01
DVP-50MC Series Motion Controller Operation Manual
1 FALSE
Case 1 Ca se 2
E xecute
Done
Busy
E rror
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle later,
Done changes to TRUE and Busy changes to FALSE. When Execute changes from TRUE to
FALSE, Done changes to FALSE.
Case 2: When there is an error in the input parameters of the instruction or the axes group is not
disabled and Execute changes from FALSE to TRUE, Busy changes to TRUE and one cycle
later, Error changes to TRUE and ErrorID shows error codes and meawhile Busy changes to
FALSE. When Execute changes from TRUE to FALSE, Error changes to FALSE and the value
in ErrorID is cleared to 0.
Function
DMC_UngroupAllAxes is used to remove all axes in an axes group. Whe the axes group is enabled, an
error will occur immediately after the instruction is used.
11- 4 02
Chapter 11 Motion Control Instructions
11.7.4 DMC_GroupEnable
DMC_GroupEnable_instance
DMC_GroupEnable
AxesGroup Status
Enable Busy
MoveDirectVelocity CommandAborted
MoveDirectAcceleration Error
MoveDirectDeceleration ErrorID
MoveDirectJerk
Input Parameters
Positive number
ARRAY
MoveDirectV The velocities of axes for quick (The variable When Enable
[1..8] OF
elocity positioning value must be changes to TRUE.
LREAL
set)
Positive number
ARRAY
MoveDirectA The accelerations of axes for (The variable When Enable
[1..8] OF
cceleration quick positioning value must be changes to TRUE.
LREAL
set)
Positive number
ARRAY
MoveDirectD The decelerations of axes for (The variable When Enable
[1..8] OF
eceleration quick positioning value must be changes to TRUE.
LREAL
set)
11- 4 03
DVP-50MC Series Motion Controller Operation Manual
Note: An axes group can not be controlled to make corresponding action unless it has been enabled.The
quick positioning, linear interpolation and circular interpolation could not be conducted when the axes
group is not enabled.
Output Parameter
Parameter
Function Data type Valid range
name
Status TRUE when the axes group is enabled. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
CommandAb
TRUE when the instruction execution is aborted. BOOL TRUE/FALSE
orted
CommandAbort When the instruction execution is When Enable changes from TRUE to
ed aborted. FALSE
11- 4 04
Chapter 11 Motion Control Instructions
Cas e1 Cas e 2
En able
St atus
Bus y
Error
E rro r ID
Case 1: When Enable changes from FALSE to TRUE, Busy changes to TRUE. After the axes group is
enabled successfully, Status changes to TRUE. After Enable changes from TRUE to FALSE
and the axes group is disabled, Busy and Status change from TRUE to FALSE.
Case 2: When the DMC_GroupEnable instruction is aborted during the execution, CommandAborted
changes to TRUE, meanwhile Status and Busy change to FALSE and the axes group is
disabled. When Enable changes to FALSE, CommandAborted changes to FALSE.
Case 3: When an error occurs during the instruction execution, Error changes to TRUE and ErrorID
shows corresponding error codes and meawhile Status and Busy change to FALSE. When
Enable changes to FALSE, Error changes to FALSE and the value in ErrorID is cleared to 0.
Function
2. When axes are in StandStill state, Status changes to TRUE after Enable is set to TRUE. Please
make sure that Status has changed to TRUE before the axes group motion is controlled.
After Status changes to TURE, axes enter the Discrete Motion state. Enable need be set to FALSE
in order to execute other motion instructions which can be executed only when axes are in
StandStill state.
11- 4 05
DVP-50MC Series Motion Controller Operation Manual
3. After Enable changes from TRUE to FALSE, the axes group is disabled and axes are in the
StandStill state. If Enable changes from TRUE to FALSE as an axes group instruction such as
DMC_MoveDirectAbsolute is being executed, the axes group instruction will report an error, all
11 axes in the axes group will stop running and axes will be in the StandStill state.
1
4. If a single-axis instruction is executed during the execution of the axes group instruction and the
value of BufferMode of the single-axis instruction is set to 0 (mcAbroting), the single-axis instruction
will abort the axes group instruction and the axes group will be disabled. If the value of BufferMode
of the single-axis instruction is set to a non-zero number (1~5), the single-axis instruction will not
be executed.
5. Before the DMC_GroupEnable instruction is executed, all axes in an axes group must be in the
StandStill state so that the DMC_GroupEnable instruction can be executed normally.
11- 4 06
Chapter 11 Motion Control Instructions
DMC_GroupStop_instance
D MC_GroupStop
AxesGroup Done
Execute Busy
Deceleration Active
Jerk CommandAborted
BufferMode Error
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
1~8
Specify the number of the When Execute
(The variable
AxesGroup axes group which is to be USINT changes from
value must be
controlled FALSE to TRUE
set)
Deceleration Reserved - - -
Jerk Reserved - - -
Note:
1. Deceleration and Jerk are reserved and their setting values are invalid.
2. BufferMode does not support any mode except mode 0 (mcAborting). If any mode else is selected,
an error will occur during the execution of the instruction.
11- 4 07
DVP-50MC Series Motion Controller Operation Manual
Output Parameters
11 Done
TRUE when the instruction execution is
BOOL TRUE/FALSE
1 completed.
Active TRUE when the axes group is being controlled. BOOL TRUE/FALSE
11- 4 08
Chapter 11 Motion Control Instructions
Execute
Done
Busy
A ctive
CommandA bort
Error
Error ID
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE and one period later,
Active changes to TRUE. When the motion of the axes group is stopped successfully, Done
changes to TRUE and Busy and Active remain TRUE. When Execute changes from TRUE to
FALSE, Done, Busy and Active change to FALSE.
Case 2: When the DMC_GroupStop instruction is aborted during the execution, CommandAborted
changes to TRUE and meanwhile Busy and Active change to FALSE. When Execute changes
to FALSE, CommandAborted changes to FALSE.
Case 3: When an error occurs in the course of the instruction execution, Error changes to TRUE and
ErrorID shows the corresponding error code. Meanwhile, Busy and Active change to FALSE.
Error changes to FALSE and the value in ErrorID is cleared to 0 when Execute changes to
FALSE.
Function
1. The input parameters Deceleration and Jerk of the DMC_GroupStop instruction are reserved and
the input values for them are invalid. When the DMC_GroupStop instruction is executed, all axes in
the axes group will stop running immediately.
2. The DMC_GroupStop instruction can be executed only while the axes group instructions such as
DMC_MoveDirectAbsolute, DMC_MoveDirectRelative, DMC_MoveLinearAbsolute,
DMC_MoveLinearRelative, DMC_MoveCircularAbsolute and DMC_MoveCircularRelative are being
11- 4 09
DVP-50MC Series Motion Controller Operation Manual
executed. After the instruction execution is completed, all axes in the axes group will stop running
and the axis status will still be the Discrete Motion state. Before other motion instructions which can
be executed only when axes are in StandStill state are executed, Enable of the DMC_ GroupEnable
11 instruction must be set to FALSE.
1
3. When Execute of the DMC_GroupStop instruction changes from FALSE to TRUE, the instruction is
executed. After the instruction execution is completed, the axes group instructions
DMC_MoveDirectAbsolute, DMC_MoveDirectRelative, DMC_MoveLinearAbsolute,
DMC_MoveLinearRelative, DMC_MoveCircularAbsolute and DMC_MoveCircularRelative all can not
be executed. These instructions can be executed only after Execute of the DMC_GroupStop
instruction changes into FALSE.
Programming Example
11- 4 10
Chapter 11 Motion Control Instructions
11- 411
DVP-50MC Series Motion Controller Operation Manual
DMC_AddA xisToGroup0
D MC_AddAxisToGroup 1
1 AxesGroup Done AD DAX IS_Done
1 Axis Busy AD DAX IS_Bsy
11 A DDA XIS _Ex Execute Error AD DAX IS_Err
1 1 IdenthGroup ErrorID AD DAX IS_ErrID
DMC_AddA xisToGroup1
D MC_AddAxisToGroup 2
1 AxesGroup Done AD DAX IS_Done1
2 Axis Busy AD DAX IS_Bsy1
A DDA XIS _Ex Execute Error AD DAX IS_Err1
2 IdenthGroup ErrorID AD DAX IS_ErrID 1
DMC_GroupEnable0
DMC_GroupEnable 3
1 AxesGroup Status GE_Status
GE_En Enable Busy GE_Bsy
GE_Vel MoveDirectVelocity CommandAborted GE_Abt
GE _Acc MoveDirectAcceleration Error GE_Err
GE_Dec MoveDirectDeceleration ErrorID GE_ErrID
GE_Jerk MoveDirectJerk
DMC_MoveLinearAbsolute0
DMC_MoveLinearAbsolute 4
1 AxesGroup Done LA _Done
LA_Ex Execute Busy LA _Bsy
LA_Pos Position Active LA _Act
20000 Velocity CommandAborted LA _Abt
10000 Acceleration Error LA _Err
10000 Deceleration ErrorID LA _ErrID
10000 Jerk
CoordSystem
1 BufferMode
0 TransitionMode
0 TransitionParameter
D MC_GroupStop0
DMC_GroupStop 5
1 AxesGroup Done GS_Done
G S_Ex Execute Busy GS_Bsy
Deceleration Active GS_Act
Jerk CommandAborted GS_Abt
mcAborting BufferMode Error GS_Err
ErrorID GS_ErrID
11- 4 12
Chapter 11 Motion Control Instructions
Velocity
11
20000
LA_Done
LA_Bs y
LA_Act
LA_Abt
LA_Er r
GS _E x
GS_Done
GS_Bs y
G S_Act
11- 4 13
DVP-50MC Series Motion Controller Operation Manual
11.7.6 DMC_GroupInterrupt
DMC_GroupInterrupt_instance
DMC_GroupInterrupt
AxesGroup Done
Execute Busy
Deceleration CommandAborted
Jerk Error
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
1~8
Specify the number of the When Execute
(The variable
AxesGroup axes group which is to be USINT changes from
value must be
enabled FALSE to TRUE
set)
Deceleration Reserved - - -
Jerk Reserved - - -
Note:
Deceleration and Jerk are reserved and their setting values are invalid.
Output Parameter
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 4 14
Chapter 11 Motion Control Instructions
When the axes group is paused When Execute changes from TRUE to
Done
successfully. FALSE.
Execute
Done
Busy
CommandA bort
Error
Error ID
11- 4 15
DVP-50MC Series Motion Controller Operation Manual
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. When the axes
group is paused successfully, Done changes to TRUE and Busy changes to FALSE. When
Execute changes from TRUE to FALSE, Done changes to FALSE.
11 Case 2: When the instruction execution is aborted, CommandAborted changes to TRUE and Busy
changes to FALSE. When Execute changes to FALSE, CommandAborted changes to
1 FALSE.
Case 3: When an error occurs in the course of the instruction execution, Error changes to TRUE and
ErrorID shows the corresponding error code. Meanwhile, Busy changes to FALSE. Error
changes to FALSE and the value in ErrorID is cleared to 0 when Execute changes to FALSE.
Function
DMC_GroupInterrupt is used to pause the motion of the current axes group for a period of time.
1. The input parameters Deceleration and Jerk of the DMC_GroupInterrupt instruction are reserved
and the input values for them are invalid. When the DMC_GroupInterrupt instruction is executed,
the PLC will decelerate at the deceleration rate of the axes group instruction controlling the motion
of the axes group until the axes group stops running.
2. The DMC_GroupInterrupt instruction can be executed only while the axes group instructions
DMC_MoveDirectAbsolute, DMC_MoveDirectRelative, DMC_MoveLinearAbsolute,
DMC_MoveLinearRelative, DMC_MoveCircularAbsolute and DMC_MoveCircularRelative are being
executed normally.
3. DMC_GroupContinue can be used to restore the axes group to the state before being paused after
DMC_GroupInterrupt is executed.
4. The execution results are consistent when several DMC_GroupInterrupt instructions are executed
simultaneously.
Programming Example
M1 BOOL TRUE
DMC_AddAxisToGroup0 DMC_AddAxisToGroup
ADDAXIS_Ex BOOL
11- 4 16
Chapter 11 Motion Control Instructions
ADDAXIS_Done BOOL
ADDAXIS_Bsy BOOL
11
ADDAXIS_Err BOOL
ADDAXIS_ErrID WORD
DMC_AddAxisToGroup1 DMC_AddAxisToGroup
ADDAXIS_Done1 BOOL
ADDAXIS_Bsy1 BOOL
ADDAXIS_Err1 BOOL
ADDAXIS_ErrID1 WORD
DMC_GroupEnable0 DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Buy BOOL
GE_Abt BOOL
GE_Err BOOL
GE_ErrID WORD
DMC_MoveLinearAbsolute0 DMC_MoveLinearAbsolute
LINABS_Ex BOOL
LINABS_Done BOOL
LINABS_Bsy BOOL
LINABS_Act BOOL
LINABS_Abt BOOL
LINABS_Err BOOL
LINABS_ErrID WORD
DMC_GroupInterrupt0 DMC_GroupInterrupt
11- 4 17
DVP-50MC Series Motion Controller Operation Manual
GI_Ex BOOL
GI_Done BOOL
11
1 GI_Bsy BOOL
GI_Abt BOOL
GI_Err BOOL
GI_ErrID WORD
DMC_GroupContinue0 DMC_GroupContinue
GC_Ex BOOL
GC_Done BOOL
GC_Bsy BOOL
GC_Abt BOOL
GC_Err BOOL
GC_ErrID WORD
11- 4 18
Chapter 11 Motion Control Instructions
DMC_AddA xisToGroup0
D MC_AddAxisToGroup 1
1 AxesGroup Done AD DAX IS_Done
1 Axis Busy AD DAX IS_Bsy
A DDA XIS _Ex Execute Error AD DAX IS_Err
1 IdenthGroup ErrorID AD DAX IS_ErrID 11
DMC_AddA xisToGroup1
D MC_AddAxisToGroup 2
1 AxesGroup Done AD DAX IS_Done1
2 Axis Busy AD DAX IS_Bsy1
A DDA XIS _Ex Execute Error AD DAX IS_Err1
2 IdenthGroup ErrorID AD DAX IS_ErrID 1
DMC_GroupEnable0
DMC_GroupEnable 3
1 AxesGroup Status GE_Status
GE_En Enable Busy GE_Bsy
GE_Vel MoveDirectVelocity CommandAborted GE_Abt
GE _Acc MoveDirectAcceleration Error GE_Err
GE_Dec MoveDirectDeceleration ErrorID GE_ErrID
GE_Jerk MoveDirectJerk
D MC_MoveLinearAbsolute0
DMC_MoveLinearAbsolute 4
1 AxesGroup Done LA_Done
LA _Ex Execute Busy LA_Bsy
LA_Pos Position Active LA_Act
20000 Velocity CommandAborted LA_Abt
10000 Acceleration Error LA_Err
10000 Deceleration ErrorID LA_ErrID
10000 Jerk
CoordSystem
1 BufferMode
0 TransitionMode
0 TransitionParameter
DMC_GroupInterrupt0
D MC_GroupInterrupt 5
1 AxesGroup Done GI_Done
GI_Ex Execute Busy GI_Bsy
Deceleration CommandAborted GI_Abt
Jerk Error GI_Err
ErrorID GI_ErrID
DMC_GroupContinue0
DMC_GroupContinue 6
1 AxesGroup Done GC_Done
GC_Ex Execute Busy GC_Bsy
CommandAborted GC_Abt
Error GC_Err
ErrorID GC_ErrID
11- 4 19
DVP-50MC Series Motion Controller Operation Manual
11 Velocity
1
20000
Time
DMC_MoveL inearAbsolu te0
LINABS_Ex
LINABS_Done
LINABS_Bsy
LINABS_Act
LINABS_Abt
LINABS_Err
DMC_Gro upInterrupt0
GI_Ex
GI_Done
GI_Bsy
GI_Abt
GI_Err
DMC_Group Co ntinue0
GC_Ex
GC_Done
GC_Bsy
11- 4 20
Chapter 11 Motion Control Instructions
11.7.7 DMC_GroupContinue
DMC_GroupContinue_instance
D MC_GroupContinue
AxesGroup Done
Execute Busy
CommandAborted
Error
ErrorID
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
1~8
Specify the number of the When Execute
(The variable
AxesGroup axes group which is to be USINT changes from
value must be
enabled FALSE to TRUE
set)
Output Parameter
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 4 21
DVP-50MC Series Motion Controller Operation Manual
When the axes group continues to When Execute changes from TRUE to
Done
run. FALSE.
Case 1 Case 2
E xecute
Done
Busy
Error
E rror ID
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. One period
later, Done changes to TRUE, Busy changes to FALSE and the axes group motion is
not paused. When Execute changes from TRUE to FALSE, Done changes to
FALSE.
Case 2: When an error occurs during the instruction execution and Execute changes from
FALSE to TRUE, Busy changes to TRUE. One period later, Error changes to TRUE,
11- 4 22
Chapter 11 Motion Control Instructions
ErrorID shows corresponding error codes and Busy changes to FALSE. When
Execute changes from TRUE to FALSE, Error changes to FALSE and the value in
ErrorID is cleared to 0.
Function
11
DMC_GroupContinue is used to make the paused axes group continue to run.
2. After DMC_GroupContinue is executed, the axes group will not be paused and continue to perform
the the action before being paused.
11- 4 23
DVP-50MC Series Motion Controller Operation Manual
11.7.8 DMC_MoveDirectAbsolute
Input Parameters
1~8
When Execute
(The variable
AxesGroup The axes group number USINT changes from
value must be
FALSE to TRUE.
set)
Positive number,
When Execute
ARRAY [1..8] 0, negative
Position The end positions of axes changes from
OF LREAL number
FALSE to TRUE.
(0)
CoordSyste
Reserved
m
11- 4 24
Chapter 11 Motion Control Instructions
Note:
1. The execution of DMC_MoveDirectAbsolute instruction starts when Execute changes from FALSE
to TRUE. Changing Execute from TRUE to FALSE during the instruction execution will have no
impact on the instruction execution.
2. The value of input parameter Position[1] ~ Position[8] means the end positions for quick positioning.
3. The input BufferMode of DMC_MoveDirectAbsolute only supports mcBuffered mode. If other mode
is selected, an error will occur when the instruction is executed. For details on BufferMode, refer to
section 10.3.
Output Parameters
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the instruction is controlling axes. BOOL TRUE / FALSE
CommandAborted TRUE when the instruction execution is aborted. BOOL TRUE / FALSE
11- 4 25
DVP-50MC Series Motion Controller Operation Manual
11- 4 26
Chapter 11 Motion Control Instructions
Execu te 11
Done
Bu sy
A ct ive
Co mma ndAbo rt
E rro r
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. Two cycles later,
Active changes to TRUE. When the axes group reaches the end position, Done changes to
TRUE, Busy and Active change to FALSE.
Case 2: When Execute changes from FALSE to TRUE and an error occurs (such as error in state
machine of the axes group), Error changes to TRUE and ErrorID shows corresponding error
codes and meanwhile Active and Busy change to FALSE. When Execute changes from TRUE
to FALSE, Error changes to FALSE.
Case 3: After Execute changes from TRUE to FALSE in the instruction execution, Done changes to
TRUE when the instruction execution is completed. Meantime Busy and Active change to
FALSE. One cycle later, Done changes to FALSE.
Function
DMC_MoveDirectAbsolute is used for an axes group to conduct quick positioning and one or more axes
in the axes group can be controlled.
Axes are relatively independent with each other during the motion. The velocities, accelerations,
decelerations and jerks of axes depend on the input values of DMC_GroupEnable: MoveDirectVelocity,
MoveDirectAcceleration, MoveDirectDeceleration and MoveDirectJerk.
Programming Example
The example in which one DMC_MoveDirectAbsolute instruction is executed is as follows.
ADDAXIS1 DMC_AddAxisToGroup
ADDAXIS1_Ex BOOL
ADDAXIS1_Done BOOL
11- 4 27
DVP-50MC Series Motion Controller Operation Manual
ADDAXIS1_Bsy BOOL
ADDAXIS1_Err BOOL
11
1 ADDAXIS1_ErrID WORD
ADDAXIS2 DMC_AddAxisToGroup
ADDAXIS2_Done BOOL
ADDAXIS2_Bsy BOOL
ADDAXIS2_Err BOOL
ADDAXIS2_ErrID WORD
DMC_GroupEnable0 DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Bsy BOOL
GE_Abt BOOL
GE_Err BOOL
GE_ErrID WORD
DIRABS DMC_MoveDirectAbsolute
DIRABS_Ex BOOL
DIRABS_Done BOOL
DIRABS_Bsy BOOL
DIRABS_Act BOOL
DIRABS_Abt BOOL
DIRABS_Err BOOL
DIRABS_ErrID WORD
11- 4 28
Chapter 11 Motion Control Instructions
A DDAX IS1
DMC_AddAxi sToGr oup 1
1 Ax esGroup Done ADDAXIS1_Done
1 Ax is Busy ADDAXIS1_Bsy
ADDAXIS1_Ex Ex ecute Er ror ADDAXIS1_Er r
1 IdenthGr oup Error ID ADDAXIS1_Er rID
11
ADDAXIS2
DMC_AddAxi sToGr oup 2
1 Ax esGroup Done ADDAXIS2_Done
2 Ax is Busy ADDAXIS2_Bsy
ADDAXIS1_Ex Ex ecute Er ror ADDAXIS2_Er r
2 IdenthGr oup Error ID ADDAXIS2_Er rID
DMC_GroupEnable0
DMC_GroupEnable 3
1 AxesGroup Status GE_Status
GE_En Enable Busy GE_Bsy
GE_Vel MoveDirectVelocity CommandAborted GE_Abt
GE_Acc MoveDirectAcceleration Error GE_Err
GE_Dec MoveDirectDeceleration ErrorID GE_ErrID
GE_Jerk MoveDirectJerk
DIRABS
DMC_MoveDirectA bsolute 4
1 AxesGroup Done DIRABS_Done
DIRABS_E x Execute Busy DIRABS_Bs y
DIRABS_Pos Pos ition Active DIRABS_Ac t
CoordS ystem CommandAborted DIRABS_Abt
mcBuffered BufferMode Err or DIRABS_Err
TransitionMode E rror ID DIRABS_Err ID
TransitionPar ameter
11- 4 29
DVP-50MC Series Motion Controller Operation Manual
Pos ition
11 100000
Y
1
X
50000
10000
0
DIRABS T
DIRABS_Ex
D IR ABS_Done
DIRABS_Bs y
DIR ABS_Act
DIRABS_Abt
D IR ABS_Err
The start positions of X axis and Y axis are both 10,000. The inputs DIRABS_Pos[1] and
DIRABS_Pos[2] of DMC_MoveDirectAbsolute are set to 50,000 and 100,000 respectively.
When DIRABS_Ex changes to TRUE, DIRABS_Bsy changes to TRUE. Two cycles later,
DIRABS_Act changes to TRUE and the axes group starts to run.
X axis and Y axis are operating according to the set velocities, accelerations and decelerations of
DMC_GroupEnable. When X axis moves to 50,000, X axis stops running. At the moment, Y axis
keeps going. When Y axis gets to 100,000, the instruction execution is completed.
11- 4 30
Chapter 11 Motion Control Instructions
11.7.9 DMC_MoveDirectRelative
Input Parameters
The instruction is
executed when TRUE or FALSE
Execute BOOL
Execute changes from (FALSE)
FALSE to TRUE.
CoordSystem Reserved
11- 4 31
DVP-50MC Series Motion Controller Operation Manual
Note:
1. The execution of DMC_MoveDirectRelative instruction starts when Execute changes from FALSE to
TRUE. Changing Execute from TRUE to FALSE during the instruction execution will have no impact on
the instruction execution.
2. The value of input parameter Distance[1] ~ Distance[8] means the motion distances from start positions
to end positions for axes.
3. The input BufferMode of DMC_MoveDirectRelative only supports mcBuffered mode. If other mode is
selected, an error will occur when the instruction is executed. For details on BufferMode, refer to section
10.3.
4. The input TransitionMode of DMC_ MoveDirectRelative only supports mcTMNone mode. If other mode
is selected, an error will occur when the instruction is executed.
5. The value of the input TransitionParameter of DMC_ MoveDirectRelative instruction is invalid.
Output Parameters
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the instruction is controlling axes. BOOL TRUE / FALSE
CommandAborted TRUE when the instruction execution is aborted. BOOL TRUE / FALSE
11- 4 32
Chapter 11 Motion Control Instructions
11- 4 33
DVP-50MC Series Motion Controller Operation Manual
1
Execu te
Done
Bu sy
A ct ive
Co mma ndAbo rt
E rro r
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. Two cycles later,
Active changes to TRUE. When the axes group reaches the end position, Done changes to
TRUE, Busy and Active change to FALSE.
Case 2: When Execute changes from FALSE to TRUE and an error occurs (such as error in state
machine of the axes group), Error changes to TRUE and ErrorID shows corresponding error
codes and meanwhile Busy and Active change to FALSE. When Execute changes from TRUE
to FALSE, Error changes to FALSE.
Case 3: After Execute changes from TRUE to FALSE in the instruction execution, Done changes to
TRUE when the instruction execution is completed. Meantime Busy and Active change to
FALSE. One cycle later, Done changes to FALSE.
Function
DMC_MoveDirectRelative is used for an axes group to conduct quick positioning and one or more axes
in the axes group can be controlled.
Axes are relatively independent with each other during the motion. The velocities, accelerations,
decelerations and jerks of axes depend on the input values of DMC_GroupEnable: MoveDirectVelocity,
MoveDirectAcceleration, MoveDirectDeceleration and MoveDirectJerk.
Programming Example
The example in which one DMC_MoveDirectRelative nstruction is executed is as follows.
1. The variable table and program
ADDAXIS1 DMC_AddAxisToGroup
11- 4 34
Chapter 11 Motion Control Instructions
ADDAXIS1_Ex BOOL
ADDAXIS1_Done BOOL
11
ADDAXIS1_Bsy BOOL
ADDAXIS1_Err BOOL
ADDAXIS1_ErrID WORD
ADDAXIS2 DMC_AddAxisToGroup
ADDAXIS2_Done BOOL
ADDAXIS2_Bsy BOOL
ADDAXIS2_Err BOOL
ADDAXIS2_ErrID WORD
DMC_GroupEnable0 DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Bsy BOOL
GE_Abt BOOL
GE_Err BOOL
GE_ErrID WORD
DIRREL DMC_MoveDirectRelative
DIRREL_Ex BOOL
DIRREL_Done BOOL
DIRREL_Bsy BOOL
DIRREL_Act BOOL
DIRREL_Abt BOOL
DIRREL_Err BOOL
DIRREL_ErrID WORD
11- 4 35
DVP-50MC Series Motion Controller Operation Manual
A D DA X IS1
DMC_A ddAxisTo Group 1
1 Axe sGro up Done ADDAXIS 1_ Do ne
1 Axis Busy ADDAXIS 1_ Bsy
11 A DDA XI S1_Ex
1
Execu te
IdenthGroup
Erro r
Erro rID
ADDAXIS 1_ Err
ADDAXIS 1_ ErrID
1 A DDA XIS2
DMC_A ddAxisTo Group 2
1 Axe sGro up Done ADDAXIS 2_ Do ne
2 Axis Busy ADDAXIS 2_ Bsy
A DDA XI S1_Ex Execu te Erro r ADDAXIS 2_ Err
2 IdenthGroup Erro rID ADDAXIS 2 ErrID
DMC_GroupEnable0
DMC_GroupEnable 3
1 AxesGroup Status GE_Status
GE_En Enable Busy GE_Bsy
GE_Vel MoveDirectVelocity CommandAborted GE_Abt
GE_Acc MoveDirectAcceleration Error GE_Err
GE_Dec MoveDirectDeceleration ErrorID GE_ErrI D
GE_Jerk MoveDirectJerk
D IRREL
D MC_Mo veDir ectRela tive 4
1 Axe sGro up Done DI RR EL _Done
DI RR EL _Ex Execu te Busy DI RR EL _Bsy
D IRREL_Dis Distan ce Active DI RR EL _Act
Co ord Syst em Co mmand Aborted DI RR EL _Ab t
mcBuffered Bu fferMode Error DI RR EL _Err
Tra nsitionMode Erro rID DI RR EL _Err ID
Tra nsitionPar ameter
11- 4 36
Chapter 11 Motion Control Instructions
Pos iti on
11
Y
110000
X
60000
10000
0
D MC_Mov eDirec t Rel ativ e0 T
DIRREL_Exe
DIRREL_Done
DIRREL_Bsy
DIRREL_Act
D IR REL_Abt
DIRREL_Err
The start positions of X axis and Y axis are both 10,000. The inputs DIRREL_Dis[1] and
DIRREL_Dis[2] of DMC_MoveDirectRelative are set to 50,000 and 100,000 respectively.
When DIRREL_Ex changes to TRUE, DIRREL_Bsy changes to TRUE. Two cycles later,
DIRREL_Act changes to TRUE and the axes group starts to run.
X axis and Y axis are operating according to the set velocities, accelerations and decelerations of
DMC_GroupEnable. When X axis moves to 60,000, the axis stops running. At the moment, Y axis
keeps going. When Y axis gets to 110,000, the instruction execution is completed.
11- 4 37
DVP-50MC Series Motion Controller Operation Manual
11.7.10 DMC_MoveLinearAbsolut
DMC_Mov eLinearAbsolute_instan ce
DMC_Mov eLinearAbsolute
Ax esGroup Done
Ex ecut e Busy
Pos ition Ac tive
Veloc it y CommandAb ort ed
Acc eleration Error
Deceleration ErrorID
J erk
CoordSys tem
Buff erMode
Trans it ionMode
Trans it ionPa rameter
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when TRUE or FALSE
Execute BOOL
Execute changes from (FALSE)
FALSE to TRUE.
11- 4 38
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
When Execute
Set the maximum
Positive number 11
Acceleration resultant acceleration LREAL changes from
(0)
(Unit: Unit/second2) FALSE to TRUE.
CoordSystem Reserved
11- 4 39
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
When Execute
11 Set the transition
Positive number, 0
1 TransitionParameter parameter for specific LREAL
(0)
changes from
transition mode FALSE to TRUE.
Note:
1. DMC_MoveLinearAbsolute instruction starts being executed when Execute changes from FALSE to
TRUE. Changing Execute from TRUE to FALSE during the instruction execution will have no impact on
the instruction execution.
2. The value of input parameter Position[1] ~ Position[8] means the end positions for linear interpolation.
3. Refer to section 10.2 for the relationship among Velocity, Acceleration, Deceleration and Jerk .
5. The value of the input TransitionParameter of DMC_ MoveLinearAbsolute instruction is invalid unless
mcTMCornerDistance is selected as TransitionMode.
Output Parameters
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the instruction is controlling axes. BOOL TRUE / FALSE
CommandAborted TRUE when the instruction execution is aborted. BOOL TRUE / FALSE
11- 4 40
Chapter 11 Motion Control Instructions
Ca se 1 Case 2 Case 3
Ex ecu te
Done
Bu sy
A ct iv e
Co mma ndAbo rt
E rro r
Error I D
11- 4 41
DVP-50MC Series Motion Controller Operation Manual
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. Two cycles later,
Active changes to TRUE. When the axes group reaches the end position, Done changes to
TRUE, Busy and Active change to FALSE.
11 Case 2: When Execute changes from FALSE to TRUE and an error occurs (such as error in state
1 machine of the axes group), Error changes to TRUE and ErrorID shows corresponding error
codes and meanwhile Busy and Active change to FALSE. When Execute changes from TRUE
to FALSE, Error changes to FALSE.
Case 3: After Execute changes from TRUE to FALSE in the instruction execution, Done changes to
TRUE when the instruction execution is completed. Meantime Busy and Active change to
FALSE. One cycle later, Done changes to FALSE.
Function
1. DMC_ MoveLinearAbsolute is used for an axes group to conduct linear interpolation and one or
more axes in the axes group can be controlled.
The input Velocity of DMC_MoveLinearAbsolute is the target velocity of the terminal actuator. The
velocity of the terminal actuator and velocities of axes have the following relationship.
Square of terminal actuator’s velocity= Sum of squares of velocities of axes
The inputs Acceleration and Deceleration of DMC_ MoveLinearAbsolute are the target acceleration
and target deceleration of the terminal actuator. The acceleration and deceleration of the terminal
actuator and acceleration and deceleration of axes have the following relationship.
Terminal actuator’s acceleration(deceleration)= Sum of squares of acceleration
(deceleration)of axes
2. The Jerk of DMC_MoveLinearAbsolute instruction is reserved.
3. See the relationship among BufferMode, TransitionMode and TransitionParameter as follows. If
mcBuffered is selected as BufferMode, TransitionMode supports mcTMNone only. If
mcBlendingPrevious is selected as BufferMode, TransitionMode supports the two modes:
mcTMConstantVelocity and mcTMCornerDistance.
BufferMode TransitionMode
Description
value value
11- 4 42
Chapter 11 Motion Control Instructions
BufferMode TransitionMode
Description
value value
smooth transition and then makes the linear motion as
illustrated in the following example 2. 11
Corner-distance transition: Wait till the previous
interpolation instruction execution is completed and then
execute current instruction immediately. When the
distance between the terminal actuator position and the
final position of the previous interpolation instruction
equals the value of TransitionParameter during the
execution of the previous interpolation instruction, the
mcTMCorner-
previous interpolation instruction execution is completed
Distance(3)
immediately and then current instruction execution starts.
During the execution of the current instruction, the terminal
actuator moves for a circular path and then makes a linear
interpolation.The distance between the end point of the
circular arc and the end point of the previous interpolation
instruction is still equal to the value of TransitionParameter
as illustrated in the following example 3.
Programming Example 1
The example in which one DMC_MoveLinearAbsolute instruction is executed is as follows.
1. The variable table and program
ADDAXIS1 DMC_AddAxisToGroup
ADDAXIS1_Ex BOOL
ADDAXIS1_Done BOOL
ADDAXIS1_Bsy BOOL
ADDAXIS1_Err BOOL
ADDAXIS1_ErrID WORD
ADDAXIS 2 DMC_AddAxisToGroup
ADDAXIS2_Done BOOL
ADDAXIS2_Bsy BOOL
11- 4 43
DVP-50MC Series Motion Controller Operation Manual
ADDAXIS2_Err BOOL
ADDAXIS2_ErrID WORD
11
ADDAXIS3 DMC_AddAxisToGroup
1
ADDAXIS3_Done BOOL
ADDAXIS3_Bsy BOOL
ADDAXIS3_Err BOOL
ADDAXIS3_ErrID WORD
DMC_GroupEnable0 DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Bsy BOOL
GE_Abt BOOL
GE_Err BOOL
GE_ErrID WORD
LINABS DMC_MoveLinearAbsolute
LINABS_Ex BOOL
LINABS_Done BOOL
LINABS_Bsy BOOL
LINABS_Act BOOL
LINABS_Abt BOOL
LINABS_Err BOOL
LINABS_ErrID WORD
11- 4 44
Chapter 11 Motion Control Instructions
A DD AX IS 1
D MC_AddAxisToGroup 1
1 AxesGroup Done AD DAX IS1_Done
1 Axis Busy AD DAX IS1_Bsy
ADD AX IS1_Ex Execute Error AD DAX IS1_Err 11
1 IdenthGroup ErrorID AD DAX IS1_ErrID
A DD AX IS 2
D MC_AddAxisToGroup 2
1 AxesGroup Done AD DAX IS2_Done
1 Axis Busy AD DAX IS2_Bsy
ADD AX IS1_Ex Execute Error AD DAX IS2_Err
1 IdenthGroup ErrorID AD DAX IS2_ErrID
AD DA X IS3
D MC_AddAxisToGroup 3
1 AxesGroup Done AD DAX IS3_Done
2 Axis Busy AD DAX IS3_Bsy
ADD AX IS1_Ex Execute Error AD DAX IS3_Err
2 IdenthGroup ErrorID AD DAX IS3_ErrID
DMC_GroupEnable0
DMC_GroupEnable 4
1 AxesGroup Status GE_Status
GE _En Enable Busy GE_Bsy
GE _Vel MoveDirectVelocity CommandAborted GE_Abt
GE _Acc MoveDirectAcceleration Error GE_Err
GE_Dec MoveDirectDeceleration ErrorID GE_ErrID
GE_Jerk MoveDirectJerk
LINAB S
DMC_MoveLinearAbsolute 5
1 AxesGroup Done LINA BS _Done
LINA BS_Ex Execute Busy LINA BS _Bsy
LIN AB S_Pos Position Active LINA BS _Act
20000 Velocity CommandAborted LINA BS _Abt
10000 Acceleration Error LINA BS _Err
10000 Deceleration ErrorID LINA BS _ErrID
10000 Jerk
CoordSystem
mcBuffered BufferMode
TransitionMode
TransitionParameter
11- 4 45
DVP-50MC Series Motion Controller Operation Manual
11 70000
20000
20000 20000
60000
X
50000 Y
Position
Z
70000
Y
60000
X
50000
20000
0
D MC_Mov eLinearAbs olute0 T
LINABS_Ex e
LINABS_Done
LINABS_Bsy
LINABS_Ac t
LIN ABS_Abt
LINABS_Err
The start positions of X axis, Y axis and Z axis are all 20,000. LINABS_Pos[1], LINABS_Pos[2] and
LINABS_Pos[3] of DMC_MoveLinearAbsolute are set to 50,000, 60,000 and 70,000 respectively.
11- 4 46
Chapter 11 Motion Control Instructions
When LINABS_Ex changes to TRUE, LINABS_Bsy changes to TRUE. Two cycles later,
LINABS_Act changes to TRUE and the axes group starts to run.
X axis, Y axis and Z axis reach respecitve target positions simultaneously, LINABS_Done changes
to TRUE and LINABS_Bsy and LINABS_Act change to FALSE when the execution of 11
DMC_MoveLinearAbsolute instruction is completed.
Programming Example 2
The example in which there are two DMC_MoveLinearAbsolute instructions and the transition mode
between them is mcTMConstantVelocity is as follows.
ADDAXIS1 DMC_AddAxisToGroup
ADDAXIS1_Ex BOOL
ADDAXIS1_Done BOOL
ADDAXIS1_Bsy BOOL
ADDAXIS1_Err BOOL
ADDAXIS1_ErrID WORD
ADDAXIS2 DMC_AddAxisToGroup
ADDAXIS2_Done BOOL
ADDAXIS2_Bsy BOOL
ADDAXIS2_Err BOOL
ADDAXIS2_ErrID WORD
DMC_GroupEnable0 DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Bsy BOOL
GE_Abt BOOL
GE_Err BOOL
11- 4 47
DVP-50MC Series Motion Controller Operation Manual
GE_ErrID WORD
LINABS1 DMC_MoveLinearAbsolute
11
LINABS1_Ex BOOL
1
LINABS1_Pos ARRAY [1..8] OF LREAL
LINABS1_Done BOOL
LINABS1_Bsy BOOL
LINABS1_Act BOOL
LINABS1_Abt BOOL
LINABS1_Err BOOL
LINABS1_ErrID WORD
LINABS2 DMC_MoveLinearAbsolute
LINABS2_Done BOOL
LINABS2_Bsy BOOL
LINABS2_Act BOOL
LINABS2_Abt BOOL
LINABS2_Err BOOL
LINABS2_ErrID WORD
11- 4 48
Chapter 11 Motion Control Instructions
AD DA X IS1
DMC_AddAxisToGroup 1
1 AxesGroup Done ADD AX IS1_Done
1 Axis Busy ADD AX IS1_Bsy
A DDA XIS 1_Ex Execute Error ADD AX IS1_Err
1 IdenthGroup ErrorID ADD AX IS1_ErrID
11
AD DA X IS2
DMC_AddAxisToGroup 2
1 AxesGroup Done ADD AX IS2_Done
2 Axis Busy ADD AX IS2_Bsy
A DDA XIS 1_Ex Execute Error ADD AX IS2_Err
2 IdenthGroup ErrorID ADD AX IS2_ErrID
D MC_GroupE nable0
DMC_GroupEnable 3
1 AxesGroup Status GE_Status
GE_En Enable Busy GE_Bsy
GE_Vel MoveDirectVelocity CommandAborted GE_Abt
GE_Acc MoveDirectAcceleration Error GE_Err
G E_Dec MoveDirectDeceleration ErrorID GE_ErrID
GE_Jerk MoveDirectJerk
LINA BS 1
DMC_MoveLinearAbsolute 4
1 AxesGroup Done LINA BS1_Done
LINA B S1_Ex Execute Busy LINA BS1_Bsy
LINA BS1_Pos Position Active LINA BS1_Act
20000 Velocity CommandAborted LINA BS1_Abt
10000 Acceleration Error LINA BS1_Err
10000 Deceleration ErrorID LINA BS1_ErrID
10000 Jerk
CoordSystem
mcBuffered BufferMode
TransitionMode
TransitionParameter
LINA BS 2
DMC_MoveLinearAbsolute 5
1 AxesGroup Done LINA BS2_Done
LINAB S1_Act Execute Busy LINA BS2_Bsy
LINA BS2_Pos Position Active LINA BS2_Act
20000 Velocity CommandAborted LINA BS2_Abt
10000 Acceleration Error LINA BS2_Err
10000 Deceleration ErrorID LINA BS2_ErrID
10000 Jerk
CoordSystem
mcBlendingPrevious BufferMode
mcTMConstantVelocity TransitionMode
TransitionParameter
11- 4 49
DVP-50MC Series Motion Controller Operation Manual
2. See the motion curve and timing chart of the terminal actuator.
Y axis
11
( 250000, 100000 )
1 ( 100000 ,100000 )
0
LINABS1 X ax is
LINAB S1_Ex
LINABS 1_Done
LINABS1_Bs y
LINA BS1_Act
LINABS1_Abt
LINABS1_Er r
LINABS2
LINABS 2_Done
LINABS2_Bs y
LINA BS2_Act
LINABS2_Abt
LINABS2_Er r
The values of LINABS1_Pos [1] and LINABS1_Pos [2] of LINABS1 are both set to 100,000. And
the values of LINABS2_Pos [1] and LINABS2_Pos [2] of LINABS2 are set to 250,000 and 100,000
respectively.
ADDAXIS1 and ADDAXIS2 are executed first and then DMC_GroupEnable0 is executed. When
the axes group is enabled, LINABS1 is excecuted and then LINABS2 is executed immediately.
When the terminal actuator gets to the coordinates (100,000, 100,000), LINABS1_Done changes to
TRUE. Meanwhile LINABS2_Act changes to TRUE and LINABS2 starts to execute. At the moment,
the speed of the termnial actuator is the target speed 20, 000 of the previous instruction.
11- 4 50
Chapter 11 Motion Control Instructions
The terminal actuator conducts the smooth transition and then makes a linear motion after
LINABS2 is executed. The instruction execution is completed once the terminal actuator reaches
the coordinates (250,000, 100,000).
11
Programming Example 3
The example in which there are two DMC_MoveLinearAbsolute instructions and the transition mode
between them is mcTMCornerDistance is as follows.
ADDAXIS1 DMC_AddAxisToGroup
ADDAXIS1_Ex BOOL
ADDAXIS1_Done BOOL
ADDAXIS1_Bsy BOOL
ADDAXIS1_Err BOOL
ADDAXIS1_ErrID WORD
ADDAXIS2 DMC_AddAxisToGroup
ADDAXIS2_Done BOOL
ADDAXIS2_Bsy BOOL
ADDAXIS2_Err BOOL
ADDAXIS2_ErrID WORD
DMC_GroupEnable0 DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Bsy BOOL
GE_Abt BOOL
GE_Err BOOL
GE_ErrID WORD
LINABS1 DMC_MoveLinearAbsolute
11- 4 51
DVP-50MC Series Motion Controller Operation Manual
LINABS1_Ex BOOL
LINABS1_Act BOOL
LINABS1_Abt BOOL
LINABS1_Err BOOL
LINABS1_ErrID WORD
LINABS2 DMC_MoveLinearAbsolute
LINABS2_Done BOOL
LINABS2_Bsy BOOL
LINABS2_Act BOOL
LINABS2_Abt BOOL
LINABS2_Err BOOL
LINABS2_ErrID WORD
11- 4 52
Chapter 11 Motion Control Instructions
ADD AXIS 1
DMC _Ad dAx isToGroup 1
1 Ax esG rou p D one ADDAX IS1_D one
1 Axi s Busy ADDAX IS1_Bsy
11
AD DAXIS1 _Ex Exe cute Error ADDAX IS1_Err
1 I denthGroup Erro rID ADDAX IS1_ErrID
AD D AX IS2
DMC _Ad dAx isToGroup 2
1 Ax esG rou p D one ADDAX IS2_D one
2 Axi s Busy ADDAX IS2_Bsy
AD DAXIS1 _Ex Exe cute Error ADDAX IS2_Err
2 I denthGroup Erro rID ADDAX IS2 ErrID
D MC _Grou pEnable 0
D MC_Group Ena ble 3
1 AxesGroup Status GE_Status
GE_En Enab le Busy GE_Bsy
GE_Ve l MoveDi rectVelocity Comma ndAborte d GE_Abt
GE_Acc MoveDi rectAcce leration Erro r GE_Err
G E_ Dec MoveDi rectDeceleratio n Erro rI D GE_ErrID
GE_Jerk MoveDi rectJe rk
LINABS1
DMC _MoveL in earAbso lute 4
1 AxesG roup Do ne LI NA BS1 _Do ne
LI NABS1_Ex E xecut e Busy LI NA BS1 _Bsy
LI NABS1_Po s P osi ti on Ac ti ve LI NA BS1 _Act
20000 Veloci ty C ommandA bort ed LI NA BS1 _Abt
10000 Acce leratio n Error LI NA BS1 _Err
10000 D ece leratio n ErrorID LI NA BS1 _ErrID
10000 Jerk
C oordSystem
mcBuffered B uffe rMode
T ra nsi tionMode
T ra nsi tionP ara mete r
LINABS2
DMC _MoveL in earAbso lute 5
1 AxesG roup Do ne LI NA BS2 _Do ne
LI NABS1_Act E xecut e Busy LI NA BS2 _Bsy
LI NABS2_Po s P osi ti on Ac ti ve LI NA BS2 _Act
20000 Veloci ty C ommandA bort ed LI NA BS2 _Abt
10000 Acce leratio n Error LI NA BS2 _Err
10000 D ece leratio n ErrorID LI NA BS2 _ErrID
10000 Jerk
C oordSystem
mcBle ndi ngPre vi ous B uffe rMode
mcTMC ornerD istance T ra nsi tionMode
10000 T ra nsi tionP ara mete r
11- 4 53
DVP-50MC Series Motion Controller Operation Manual
2. See the motion curve and timing chart of the terminal actuator.
Y axis
11
1
A C
100000 D
B
( 0,0 )
100000 250000
L INABS1 X ax is
LINAB S1_Ex
LINABS 1_Done
LINABS1_Bs y
LINA BS1_Act
LINABS1_Abt
LINABS1_Er r
L INABS2
LINABS 2_Done
LINABS2_Bs y
LINA BS2_Act
LINABS2_Abt
LINABS2_Er r
The values of LINABS1_Pos [1] and LINABS1_Pos [2] of LINABS1 are both set to 100,000. And
the values of LINABS2_Pos [1] and LINABS2_Pos [2] of LINABS2 are set to 250,000 and 100,000
respectively.
ADDAXIS1 and ADDAXIS2 are executed first and then DMC_GroupEnable0 is executed. When
the axes group is enabled, LINABS1 is excecuted and then LINABS2 is executed immediately.
When the terminal actuator gets to point B in the coordinate system, LINABS1_Done changes to
TRUE. Meanwhile LINABS2_Act changes to TRUE and LINABS2 starts to execute.
After LINABS2 is executed, the terminal actuator moves along an arc path till it reaches point C.
Afterward it continues to make the linear interpolation.
11- 4 54
Chapter 11 Motion Control Instructions
The distance from point B to point A equals that from point C to point A. It is also equal to 10,000,
the value of the input TransitionParameter of LINABS2.
11
11- 4 55
DVP-50MC Series Motion Controller Operation Manual
11.7.11 DMC_MoveLinearRelative
DMC_MoveLinearRelat ive_instance
DMC_MoveLinearRelat ive
AxesGroup Done
Execut e Busy
Distance Active
Velocit y CommandAb ort ed
Acceleration Error
Deceleration ErrorID
Jerk
CoordSystem
Buff erMode
Transit ionMode
Transit ionPa rameter
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.
Negative number,
When Execute
Set the distances that ARRAY [1..8] Positive number, 0,
Distance changes from
axes move OF LREAL (0)
FALSE to TRUE.
11- 4 56
Chapter 11 Motion Control Instructions
Valid range
Parameter name Function Data type Validation timing
(Default)
When Execute
Set the maximum
Positive 11
Acceleration resultant acceleration LREAL changes from
(0)
(Unit: Unit/second2) FALSE to TRUE.
CoordSystem Reserved
11- 4 57
DVP-50MC Series Motion Controller Operation Manual
Valid range
Parameter name Function Data type Validation timing
(Default)
When Execute
11 TransitionParamet
Set the transition
Positive, 0
1 er
parameter for specific LREAL
(0)
changes from
transition mode FALSE to TRUE.
Note:
1. DMC_MoveLinearRelative instruction starts being executed when Execute changes from FALSE to
TRUE. Changing Execute from TRUE to FALSE during the instruction execution will have no impact on
the instruction execution.
2. The value of input parameter Distance[1] ~ Distance[8] means the end positions for linear interpolation.
3. Refer to section 10.2 for the relationship among Velocity, Acceleration, Deceleration and Jerk .
4. For details on BufferMode, refer to section 10.3.
5. The value of the input TransitionParameter of DMC_MoveLinearRelative instruction is invalid unless
mcTMCornerDistance is selected as TransitionMode .
Output Parameters
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the instruction is controlling axes. BOOL TRUE / FALSE
CommandAborted TRUE when the instruction execution is aborted. BOOL TRUE / FALSE
11- 4 58
Chapter 11 Motion Control Instructions
Execu te
Done
Bu sy
A ct ive
Co mma ndAbo rt
E rro r
Error I D
11- 4 59
DVP-50MC Series Motion Controller Operation Manual
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. Two cycles later,
Active changes to TRUE. When the axes group reaches the end position, Done changes to
TRUE, Busy and Active change to FALSE.
11 Case 2: When Execute changes from FALSE to TRUE and an error occurs (such as error in state
1 machine of the axes group), Error changes to TRUE and ErrorID shows corresponding error
codes and meanwhile Busy and Active change to FALSE. When Execute changes from TRUE
to FALSE, Error changes to FALSE.
Case 3: After Execute changes from TRUE to FALSE in the instruction execution, Done changes to
TRUE when the instruction execution is completed. Meantime Busy and Active change to
FALSE. One cycle later, Done changes to FALSE.
Function
DMC_MoveLinearRelative is used for an axes group to conduct linear interpolation and one or more
axes in the axes group can be controlled.
1. The input Velocity of DMC_MoveLinearRelative instruction is the target velocity of the terminal
actuator. The velocity of the terminal actuator and velocities of axes have the following relationship.
TransitionMode
BufferMode value Description
value
11- 4 60
Chapter 11 Motion Control Instructions
TransitionMode
BufferMode value Description
value
instruction switch, the terminal actuator conducts the
smooth transition and then makes the linear motion as 11
illustrated in the following example 2.
Programming Example 1
The example in which one DMC_MoveLinearRelative instruction is executed is as follows.
1. The variable table and program
ADDAXIS1 DMC_AddAxisToGroup
ADDAXIS1_Ex BOOL
ADDAXIS1_Done BOOL
ADDAXIS1_Bsy BOOL
ADDAXIS1_Err BOOL
ADDAXIS1_ErrID WORD
ADDAXIS2 DMC_AddAxisToGroup
11- 4 61
DVP-50MC Series Motion Controller Operation Manual
ADDAXIS2_Done BOOL
ADDAXIS2_Bsy BOOL
11
ADDAXIS2_Err BOOL
1
ADDAXIS2_ErrID WORD
ADDAXIS3 DMC_AddAxisToGroup
ADDAXIS3_Done BOOL
ADDAXIS3_Bsy BOOL
ADDAXIS3_Err BOOL
ADDAXIS3_ErrID WORD
DMC_GroupEnable DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Bsy BOOL
GE_Abt BOOL
GE_Err BOOL
GE_ErrID WORD
LINREL DMC_MoveLinearRelative
LINREL_Ex BOOL
LINREL_Done BOOL
LINREL_Bsy BOOL
LINREL_Act BOOL
LINREL_Abt BOOL
LINREL_Err BOOL
LINREL_ErrID WORD
11- 4 62
Chapter 11 Motion Control Instructions
A DD A X I S 1
D MC _Ad dA xis ToG roup 1
1 A xes Gr ou p Done AD DA X I S 1_Done
1 A xis B us y AD DA X I S 1_Bs y
AD DA X I S1 _Ex E xec ut e E rror AD DA X I S 1_Err 11
1 I den thGroup Er ror I D AD DA X I S 1_Err ID
A DD A X I S 2
D MC _Ad dA xis ToG roup 2
1 A xes Gr ou p Done AD DA X I S 2_Done
2 A xis B us y AD DA X I S 2_Bs y
AD DA X I S1 _Ex E xec ut e E rror AD DA X I S 2_Err
2 I den thGroup Er ror I D AD DA X I S 2_Err ID
AD D A X I S3
D MC _Ad dA xis ToG roup 3
1 A xes Gr ou p Done AD DA X I S 3_Done
3 A xis B us y AD DA X I S 3_Bs y
AD DA X I S1 _Ex E xec ut e E rror AD DA X I S 3_Err
3 I den thGroup Er ror I D AD DA X I S 3_Err ID
DM C_GroupEnable0
DM C_GroupEnable 4
1 A xesGroup St atus GE _Status
G E_E n E nable Busy GE _Bsy
GE _Vel MoveDirectVelocity CommandAborted GE _Abt
GE _Ac c MoveDirectA ccelerat ion Error GE _Err
G E _D ec MoveDirectDeceleration ErrorI D GE _ErrI D
GE _Jerk MoveDirectJerk
LI N R EL
DMC _Move LinearRe lative 5
1 Ax esG rou p D one L IN RE L_ Done
L I NR E L _E x Ex ecut e Bus y L IN RE L_ B sy
LI N R E L_Dis Dist an ce Ac tiv e L IN RE L_ A ct
20000 Ve loc it y Co mma ndA bor ted L IN RE L_ A bt
10000 Ac cele ra tion E rro r L IN RE L_ E rr
10000 Dec ele rat ion E rro rI D L IN RE L_ E rrI D
10000 Jer k
CoordS ys te m
mcB uff ered Bu fferMod e
Tra ns it ionMode
Tra ns it ionPa ramet er
11- 4 63
DVP-50MC Series Motion Controller Operation Manual
11 Z
1 70000
20000
20000 20000
60000
X 50000
Y
Pos ition
Z
70000
Y
60000
X
50000
20000
0
D MC_Mov eLinearRelative0 T
LINREL_Exe
LIN REL_Bs y
LINR EL_Ac t
LINREL_Abt
LINR EL_Err
The start positions of X axis, Y axis and Z axis are all 20,000. LINREL_Dis[1], LINREL_Dis[2] and
LINREL_Dis[3] of DMC_MoveLinearRelative are set to 30,000, 40,000 and 50,000 respectively.
11- 4 64
Chapter 11 Motion Control Instructions
When LINREL_Ex changes to TRUE, LINREL_Bsy changes to TRUE. Two cycles later,
LINREL_Act changes to TRUE and the axes group starts to run.
X axis, Y axis and Z axis reach respecitve target positions simultaneously, LINREL_Done changes
to TRUE and LINREL_Bsy and LINREL_Act change to FALSE when the execution of 11
DMC_MoveLinearRelative instruction is completed.
Programming Example 2
See the following example in which there are two DMC_MoveLinearRelative instructions and the
transition mode between them is mcTMConstantVelocity.
ADDAXIS1 DMC_AddAxisToGroup
ADDAXIS1_Ex BOOL
ADDAXIS1_Done BOOL
ADDAXIS1_Bsy BOOL
ADDAXIS1_Err BOOL
ADDAXIS1_ErrID WORD
ADDAXIS2 DMC_AddAxisToGroup
ADDAXIS2_Done BOOL
ADDAXIS2_Bsy BOOL
ADDAXIS2_Err BOOL
ADDAXIS2_ErrID WORD
DMC_GroupEnable0 DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Bsy BOOL
GE_Abt BOOL
GE_Err BOOL
11- 4 65
DVP-50MC Series Motion Controller Operation Manual
GE_ErrID WORD
LINREL1 DMC_MoveLinearRelative
11
LINREL1_Ex BOOL
1
LINREL1_Dis ARRAY [1..8] OF LREAL
LINREL1_Done BOOL
LINREL1_Bsy BOOL
LINREL1_Act BOOL
LINREL1_Abt BOOL
LINREL1_Err BOOL
LINREL1_ErrID WORD
LINREL2 DMC_MoveLinearRelative
LINREL2_Done BOOL
LINREL2_Bsy BOOL
LINREL2_Act BOOL
LINREL2_Abt BOOL
LINREL2_Err BOOL
LINREL2_ErrID WORD
11- 4 66
Chapter 11 Motion Control Instructions
ADD AXI S1
DMC_AddAxis ToGr oup 1
1 Ax esG roup Done ADDAXIS1_Done
1 A xis Busy ADDAXIS1_Bsy
ADDAXIS1_E x E xecu te E rror ADDAXIS1_Err
1 Iden thGr oup Err or ID ADDAXIS1_Err ID
11
ADDAXI S2
DMC_AddAxis ToGr oup 2
1 Ax esG roup Done ADDAXIS2_Done
2 A xis Busy ADDAXIS2_Bsy
ADDAXIS1_E x E xecu te E rror ADDAXIS2_Err
2 Iden thGr oup Err or ID ADDAXIS2_Err ID
DMC_GroupEnable0
DM C_Gr oupEnable 3
1 Axes Group Status GE _Status
G E_En Enable Busy GE _Bs y
G E_Vel MoveDirectVeloc ity CommandAborted GE _Abt
G E_Acc MoveDirectAcceler ation Er ror GE _Er r
GE _Dec MoveDirectDeceleration Er rorID GE _Er rID
G E_Jerk MoveDirectJer k
LINRE L1
DMC_MoveLinear Relativ e 4
1 Ax esGr oup Done LI NREL1_Done
LINRE L1_Ex Ex ecute Busy LI NREL1_Bsy
LINREL1_Di s Di stanc e Active LI NREL1_Act
20000 Veloc ity CommandAbo rted LI NREL1_Abt
10000 Acc eler ati on Er ror LI NREL1_Err
10000 Decel er ati on Err orID LI NREL1_Err ID
10000 J erk
CoordSys tem
mcBuffer ed Buff erMode
Trans itionMode
Trans itionParameter
LINRE L2
DMC_MoveLinear Relativ e 5
1 Ax esGr oup Done LI NREL2_Done
LINREL1_Ac t Ex ecute Busy LI NREL2_Bsy
LINREL2_Di s Di stanc e Active LI NREL2_Act
20000 Veloc ity CommandAbo rted LI NREL2_Abt
10000 Acc eler ati on Er ror LI NREL2_Err
10000 Decel er ati on Err orID LI NREL2_Err ID
10000 J erk
CoordSys tem
m cBlendingPrevi ous Buff erMode
mc TMConsta ntVeloc ity Trans itionMode
Trans itionParameter
11- 4 67
DVP-50MC Series Motion Controller Operation Manual
Y a xis
11 (250000 ,100000)
1 (100000,100000)
0
LINREL1 X axis
LINREL1_Ex
LINREL1_Done
LINREL1_Bsy
LINREL1_Ac t
LINREL1_Abt
LINREL1_E rr
L INREL 2
LINREL2_Done
LINREL2_Bsy
LINREL2_Ac t
LINREL2_Abt
LINREL2_E rr
LINREL1_Dis [1] and LINREL1_Dis [2] of LINREL1 are both set to 100,000. LINREL2_Dis [1] and
LINREL2_Dis [2] of LINREL2 are set 150,000 and 0.
ADDAXIS1 and ADDAXIS2 are executed first and then DMC_GroupEnable0 is executed. When
the axes group is enabled, LINREL1 is excecuted and then LINREL2 is executed immediately.
When the terminal actuator gets to (100,000, 100,000) in the coordinate system, LINREL1_Done
changes to TRUE. Meanwhile LINREL2_Act changes to TRUE and LINREL2 starts to execute. At
the moment the velocity of the terminal actuator is the target velocity of the previous instruction,
20,000.
After LINREL2 is executed, the terminal actuator conducts the smooth transition and then makes
the linear motion. The instruction execution is completed when the terminal actuator reaches the
coordinates (250,000,100,000).
11- 4 68
Chapter 11 Motion Control Instructions
Programming Example 3
The example in which there are two DMC_MoveLinearRelative instructions and the transition mode
between them is mcTMCornerDistance is as follows. 11
1. The variable table and program
ADDAXIS1 DMC_AddAxisToGroup
ADDAXIS1_Ex BOOL
ADDAXIS1_Done BOOL
ADDAXIS1_Bsy BOOL
ADDAXIS1_Err BOOL
ADDAXIS1_ErrID WORD
ADDAXIS2 DMC_AddAxisToGroup
ADDAXIS2_Done BOOL
ADDAXIS2_Bsy BOOL
ADDAXIS2_Err BOOL
ADDAXIS2_ErrID WORD
DMC_GroupEnable0 DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Bsy BOOL
GE_Abt BOOL
GE_Err BOOL
GE_ErrID WORD
LINREL1 DMC_MoveLinearRelative
LINREL1_Ex BOOL
LINREL1_Done BOOL
LINREL1_Bsy BOOL
11- 4 69
DVP-50MC Series Motion Controller Operation Manual
LINREL1_Act BOOL
LINREL1_Abt BOOL
11
LINREL1_Err BOOL
1
LINREL1_ErrID WORD
LINREL2 DMC_MoveLinearRelative
LINREL2_Done BOOL
LINREL2_Bsy BOOL
LINREL2_Act BOOL
LINREL2_Abt BOOL
LINREL2_Err BOOL
LINREL2_ErrID WORD
11- 4 70
Chapter 11 Motion Control Instructions
ADDAXIS1
DMC_AddAxisToGr oup 1
1 Ax esG roup Done ADDAX IS1_Done
1 Axis Busy ADDAX IS1_Bs y
ADDAXIS 1_Ex Exec ute Er ror ADDAX IS1_Er r
1 I denthGroup Err orID ADDAX IS1_Er rID
11
ADDAX IS2
DMC_AddAxisToGr oup 2
1 Ax esG roup Done ADDAX IS2_Done
2 Axis Busy ADDAX IS2_Bs y
ADDAXIS 1_Ex Exec ute Er ror ADDAX IS2_Er r
2 I denthGroup Err orID ADDAX IS2_Er rID
DMC_GroupEnable0
DM C_GroupEnable 3
1 AxesGr oup Status GE_Status
G E_En Enable Busy GE_Bsy
GE_Vel MoveDirectVelocity CommandAborted GE_Abt
GE_Acc MoveDirectAcceleration Error GE_Err
G E_Dec MoveDirectDeceler ation Err or ID GE_Err ID
GE _Jerk MoveDirectJer k
LINREL1
DMC_MoveL inearRelat iv e 4
1 AxesG roup Done LINREL1_Done
LINREL1_Ex E xecut e Busy LINREL1_Bsy
LINREL1 _Di s Distanc e Ac ti ve LINREL1_Act
20000 Veloc ity CommandA borted LINREL1_Abt
10000 Acc elerati on Error LINREL1_Err
10000 Dec elerati on Er ror ID LINREL1_Err ID
10000 J erk
Coor dSy stem
mcBuff ered B ufferMode
T rans itionMode
T rans itionP arameter
LINREL2
DMC_MoveL inearRelat iv e 5
1 AxesG roup Done LINREL2_Done
LINREL1_Act E xecut e Busy LINREL2_Bsy
LINREL2 _Di s Distanc e Ac ti ve LINREL2_Act
20000 Veloc ity CommandA borted LINREL2_Abt
10000 Acc elerati on Error LINREL2_Err
10000 Dec elerati on Er ror ID LINREL2_Err ID
10000 J erk
Coor dSy stem
mcBl endingPr evious B ufferMode
mc TMCor nerDi stanc e T rans itionMode
10000 T rans itionP arameter
11- 4 71
DVP-50MC Series Motion Controller Operation Manual
11
1
Y a xis
A C
100000 D
B
(0, 0)
100000 250000
LINREL1 X axis
LINREL1_Ex
LINREL1_Done
LINREL1_Bsy
LINREL1_Ac t
LINREL1_Abt
LINREL1_E rr
L INREL 2
LINREL2_Done
LINREL2_Bsy
LINREL2_Ac t
LINREL2_Abt
LINREL2_E rr
LINREL1_Dis [1] and LINREL1_Dis [2] of LINREL1 are both set to 100,000. LINREL2_Dis [1] and
LINREL2_Dis [2] of LINREL2 are set 150,000 and 0.
ADDAXIS1 and ADDAXIS2 are executed first and then DMC_GroupEnable0 is executed. When
the axes group is enabled, LINREL1 is excecuted and then LINREL2 is executed immediately.
When the terminal actuator gets to point B in the coordinate system, LINREL1_Done changes to
TRUE. Meanwhile LINREL2_Act changes to TRUE and LINREL2 starts to execute.
11- 4 72
Chapter 11 Motion Control Instructions
After LINREL2 is executed, the terminal actuator moves along an arc and then continues to make
the linear interpolation after passing by point C.
The distance from point B to point A equals that from point C to point A. It is also equal to 10,000,
11
the value of TransitionParameter of LINREL2.
11- 4 73
DVP-50MC Series Motion Controller Operation Manual
11.7.12 DMC_MoveCircularAbsolute
Input Parameters
11- 4 74
Chapter 11 Motion Control Instructions
When Execute
Set the number of turns for Positive number, 0
MultiTurn UINT changes from
helical interpolation (0)
FALSE to TRUE.
When Execute
Set the maximum velocity Positive number
Velocity LREAL changes from
(Unit: unit/second) (0)
FALSE to TRUE.
11- 4 75
DVP-50MC Series Motion Controller Operation Manual
When Execute
Set the maximum jerk Positive number
Jerk LREAL changes from
(Unit: Unit/second3) (0)
FALSE to TRUE.
CoordSyste
Reserved
m
When Execute
TransitionPar Set the transition parameter Positive number, 0
LREAL changes from
ameter for specific transition mode (0)
FALSE to TRUE.
11- 4 76
Chapter 11 Motion Control Instructions
Note:
1. DMC_MoveCircularAbsolute instruction starts being executed when Execute changes from FALSE
to TRUE. Changing Execute from TRUE to FALSE during the instruction execution will have no
impact on the instruction execution. 11
2. When drawing an arc by adopting the center method, the values of AuxPoint[1] and AuxPoint[2] are
the coordinate differences between the center and start point of an circular arc. When drawing an
arc by adopting the radius method, the value of the input AuxPoint[1] is the radius. The value of
AuxPoint[2] is meaningless.
3. The value of input parameter EndPoint[1]~EndPoint[8] means the coordinates for the end point of
an arc on axes.
4. Refer to section 10.2 for the relationship among Velocity, Acceleration, Deceleration and Jerk .
5. For details on BufferMode, refer to section 10.3.
Output Parameters
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
Active TRUE when the instruction is controlling axes. BOOL TRUE / FALSE
CommandAborted TRUE when the instruction execution is aborted. BOOL TRUE / FALSE
11- 4 77
DVP-50MC Series Motion Controller Operation Manual
Execu te
Done
Bu sy
A ct ive
Co mma ndAbo rt
E rro r
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. Three cycles later,
Active changes to TRUE. When the axes group reaches the end position, Done changes to
TRUE, Busy and Active change to FALSE.
Case 2: When Execute changes from FALSE to TRUE and an error occurs (such as error in state
machine of the axes group), Error changes to TRUE and ErrorID shows corresponding error
codes and meanwhile Busy and Active change to FALSE. When Execute changes from
TRUE to FALSE, Error changes to FALSE.
11- 4 78
Chapter 11 Motion Control Instructions
Case 3: After Execute changes from TRUE to FALSE in the instruction execution, Done changes to
TRUE when the instruction execution is completed. Meantime Busy and Active change to
FALSE. One cycle later, Done changes to FALSE.
Function 11
DMC_MoveCircularAbsolute is used for axes to perform the circular interpolation.
CirMode (Circular interpolation mode)
There are six CirMode modes as follows.
CirMode
Description
value
Draw an arc via the center on XY plane. AuxPoint[1] is the offset value of the center
on basis of the start point on X-aixs. AuxPoint[2] is the offset value of the center on
basis of the start point on Y-aixs.
Z
E nd point (X, Y,Z )
0
Y
Draw an arc via the center on ZX plane. AuxPoint[1] is the offset value of the center
1
on basis of the start point on X-aixs. AuxPoint[2] is the offset value of the center on
basis of the start point on Z-aixs.
11- 4 79
DVP-50MC Series Motion Controller Operation Manual
CirMode
Description
value
Z
11
1
Helica l
int erpolation End po in t
(X ,Y,Z )
Center ( I,K )
Start point
( X1, Y1,Z1 )
Y
Draw an arc via the center on YZ plane. AuxPoint[1] is the offset value of the center
on basis of the start point on Y-aixs. AuxPoint[2] is the offset value of the center on
basis of the start point on Z-aixs.
Z
Helic al int erpolation
Draw an arc via the radius on XY plane. The value of AuxPoint[1] is the radius of the
circle on XY plane and the value of AuxPoint[2] is meaningless.
11- 4 80
Chapter 11 Motion Control Instructions
CirMode
Description
value
11
Z
E nd point ( X,Y, Z)
Ra dius: R
Helic al
int erpolation
X St art point
(X1, Y1,Z1)
Draw an arc via the radius on ZX plane. The value of AuxPoint[1] is the radius of the
circle on ZX plane and the value of AuxPoint[2] is meaningless.
Z
R
int erpolation
d iu
Ra
4 S tart point
( X1, Y1, Z1 )
Y
Draw circles via the radius on ZY plane. The value of AuxPoint[1] is the radius of the
5 circle on ZY plane and the value of AuxPoint[2] is meaningless.
11- 4 81
DVP-50MC Series Motion Controller Operation Manual
CirMode
Description
value
Z
11 Helic al interp olation
Ra d
En d point St art po int
( X, Y,Z )
( X1, Y1,Z1 )
iu s
R :
X
PathChoice
The parameter determines the direction for circular interpolation. See the details as follows.
PathChoice
Description
Value
The axes group conducts circular interpolation in the clockwise direction on the arcs
of the specified plane. Take the radius method for example, the path for the circular
motion is shown as below.
E nd point
R-
0 R+
St art point
The axes group conducts circular interpolation in the anticlockwise direction on the
1 arcs of the specified plane. Take the radius method for example, the path for the
circular motion is shown as below.
11- 4 82
Chapter 11 Motion Control Instructions
PathChoice
Description
Value
En d point 11
R+ R-
Start point
BufferMode
Specify the buffer mode between current instruction and previous interpolation instruction. See the
details as follows.
Programming Example
The example of executing one DMC_MoveCircularAbsolute instruction is shown as follows.
1. The variable table and program
ADDAXIS1 DMC_AddAxisToGroup
ADDAXIS1_Ex BOOL
ADDAXIS1_Done BOOL
ADDAXIS1_Bsy BOOL
ADDAXIS1_Err BOOL
11- 4 83
DVP-50MC Series Motion Controller Operation Manual
ADDAXIS2 DMC_AddAxisToGroup
ADDAXIS2_Done BOOL
11
ADDAXIS2_Bsy BOOL
1
ADDAXIS2_Err BOOL
ADDAXIS2_ErrID WORD
DMC_GroupEnable0 DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Bsy BOOL
GE_Abt BOOL
GE_Err BOOL
CIRABS DMC_MoveCircularAbsolute
CIRABS_Ex BOOL
CIRABS_Mode INT 0
CIRABS_T UINT 0
CIRABS_PC INT 0
CIRABS_Done BOOL
CIRABS_Bsy BOOL
CIRABS_Act BOOL
CIRABS_Abt BOOL
CIRABS_Err BOOL
CIRABS_ErrID WORD
11- 4 84
Chapter 11 Motion Control Instructions
A DD A XIS 1
DM C_AddAxisToGroup 1
1 Ax esG roup Done AD DA XIS1_Done
1 Axis Bus y AD DA XIS1_Bsy
ADDAX IS1 _Ex
1
Exec ute
IdenthGroup
Error
ErrorID
AD DA XIS1_Er r
AD DA XIS1_Er rID
11
A DD AXIS 2
DM C_AddAxisToGroup 2
1 Ax esG roup Done AD DA XIS2_Done
2 Axis Bus y AD DA XIS2_Bsy
ADDAX IS1 _Ex Exec ute Error AD DA XIS2_Er r
2 IdenthGroup ErrorID AD DA XIS2_Er rID
DMC_GroupEnable0
DMC_GroupEnable 3
1 AxesGroup Status GE_Status
G E_En Enable Busy GE_Bsy
G E_Vel MoveDirectVelocity CommandAbor ted GE_Abt
G E_Acc MoveDirectAcceleration Error GE_Er r
GE_Dec MoveDirectDeceleration ErrorID GE_Er rID
G E_Jerk MoveDirectJerk
CIRABS
DMC_M oveCi rc ularAbsol ute 4
1 Ax esG roup Done C IRAB S_Done
CIRA BS _Ex Ex ecute Busy C IRAB S_Bsy
CIRA BS _Mode Circ Mode Ac tive C IRAB S_Act
CIR ABS_Au xp AuxPoint Comma ndAborte d C IRAB S_Abt
CIR AB S_Endp End Point Error C IRAB S_Err
C IRAB S_T MultiTurn ErrorID C IRAB S_ErrID
CIRA BS _P C PathChoic e
20000 Veloc ity
10000 Ac cel eration
10000 Decele ration
10000 Jerk
CoordSys tem
mcBuffered Bu fferM ode
Tra nsitionMode
TransitionParam eter
11- 4 85
DVP-50MC Series Motion Controller Operation Manual
11
1 3 000
B
2 000 C
1 000
A
X
0
10 00 2 000 400 0
C IRA BS
CIRABS_Ex
C IRABS_Do ne
CIR ABS_Bsy
CIRABS_Act
CIR ABS_Abt
The value of CIRABS_ Auxp[1] is set to 1000, the value of CIRABS_Auxp[2] is set to -2000, the
value of CIRABS_Endp[1] is set to 4000, the value of CIRABS_Endp[2] is set to 2000 and the
value of CIRABS_Mode is set to 0.
Point B is the start point of the arc with coordinates (1000, 3000). Point A is the center of the circle
where the arc is with the coordinates (1000+CIRABS_Auxp[1]=2000,
3000+CIRABS_Auxp[2]=1000). Point C is the end point of the arc with coordinates
(CIRABS_Endp[1]=4000, CIRABS_Endp[2]=2000).
11- 4 86
Chapter 11 Motion Control Instructions
11.7.13 DMC_MoveCircularRelative
Input Parameters
The instruction is
executed when TRUE or FALSE
Execute BOOL
Execute changes from (FALSE)
FALSE to TRUE.
11- 4 87
DVP-50MC Series Motion Controller Operation Manual
11 center on ZX plane.
Coordinate differences
Positive number, 0, When Execute
on axes between the ARRAY [1..8]
EndPoint negative number changes from
end point and start OF LREAL
(0) FALSE to TRUE.
point of an arc
11- 4 88
Chapter 11 Motion Control Instructions
When Execute
Set the maximum
Positive number 11
Acceleration acceleration (Unit: LREAL changes from
(0)
Unit/second2) FALSE to TRUE.
When Execute
Set the maximum jerk Positive number
Jerk LREAL changes from
(Unit: Unit/second3) (0)
FALSE to TRUE.
CoordSyste
Reserved
m
11- 4 89
DVP-50MC Series Motion Controller Operation Manual
Note:
1. DMC_MoveCircularRelative instruction starts being executed when Execute changes from FALSE
to TRUE. Changing Execute from TRUE to FALSE during the instruction execution will have no
11 impact on the instruction execution.
1 2. When drawing an arc by adopting the center method, the values of AuxPoint[1] and AuxPoint[2] are
the coordinate differences between the center and start point of an circular arc. When drawing an
arc by adopting the radius method, the value of the input AuxPoint[1] is the radius. The value of
AuxPoint[2] is meaningless.
3. The value of input parameter EndPoint[1]~EndPoint[8] means the coordinate diferences between
end point and start point on axes.
4. Refer to section 10.2 for the relationship among Velocity, Acceleration, Deceleration and Jerk .
5. For details on BufferMode, refer to section 10.3.
Output Parameters
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
CommandAborted TRUE when the instruction execution is aborted. BOOL TRUE / FALSE
11- 4 90
Chapter 11 Motion Control Instructions
11
FALSE during the instruction execution. One cycle later,
Done changes to FALSE.
Ca se 1 Case 2 Case 3
Execu te
Done
Bu sy
A ct ive
Co mma ndAbo rt
E rro r
Error I D
Case 1: When Execute changes from FALSE to TRUE, Busy changes to TRUE. Three cycles later,
Active changes to TRUE. When the axes group reaches the end position, Done changes to
TRUE, Busy and Active change to FALSE.
11- 4 91
DVP-50MC Series Motion Controller Operation Manual
Case 2: When Execute changes from FALSE to TRUE and an error occurs (such as error in state
machine of the axes group), Error changes to TRUE and ErrorID shows corresponding error
codes and meanwhile Busy and Active change to FALSE. When Execute changes from TRUE
11 to FALSE, Error changes to FALSE.
1 Case 3: After Execute changes from TRUE to FALSE in the instruction execution, Done changes to
TRUE when the instruction execution is completed. Meantime Busy and Active change to
FALSE. One cycle later, Done changes to FALSE.
Function
CirMode
Description
value
Draw an arc via the center on XY plane. AuxPoint[1] is the offset
value of the center on basis of the start point on X-aixs. AuxPoint[2]
is the offset value of the center on basis of the start point on Y-aixs.
Z
Y
0
X=X1+EndPoint[1], Y=Y1+EndPoint[2],Z=Z1+EndPoint[3].
11- 4 92
Chapter 11 Motion Control Instructions
CirMode
Description
value
11
Z
Helica l
End po in t
int erpolation
(X ,Y,Z )
Center ( I,K )
Start point
( X1, Y1,Z1 )
Y
X=X1+EndPoint[1],Y=Y1+EndPoint[2],Z=Z1+EndPoint[3]。
11- 4 93
DVP-50MC Series Motion Controller Operation Manual
CirMode
Description
value
Draw an arc via the radius on XY plane. The value of AuxPoint[1] is
11 the radius of the circle on XY plane and here the value of AuxPoint[2]
1 is meaningless.
If the value of AuxPoint[1] is greater than 0, it is a minor arc.
If the value of AuxPoint[1] is less than 0, it is a major arc.
E nd point ( X,Y, Z)
Ra dius: R
Helical
int erpolation
X St art point
(X1, Y1,Z1)
11- 4 94
Chapter 11 Motion Control Instructions
CirMode
Description
value
11
Z
R
Helical End po in t ( X,Y, Z)
s:
int erpolation
d iu
Ra
S tart point
( X1, Y1, Z1 )
Y
Z=Z1+EndPoint[3]。
Z
Helical interp olation
Ra d
5
R :
11- 4 95
DVP-50MC Series Motion Controller Operation Manual
PathChoice
The parameter determines the direction for circular interpolation. See the details as follows.
PathChoice
11 value
Description
1
The axes group conducts circular interpolation in the clockwise
direction on the arcs of the specified plane. Take the radius method
for example, the path for the circular motion is shown as below.
E nd point
R-
0 R+
St art point
En d point
1 R+ R-
Start point
BufferMode
Specify the buffer mode between current instruction and previous interpolation instruction. See the
details as follows.
11- 4 96
Chapter 11 Motion Control Instructions
Programming Example
The example of executing one DMC_MoveCircularRelative instruction is shown as follows.
1. The variable table and program
M1 BOOL
ADDAXIS1 DMC_AddAxisToGroup
ADDAXIS1_Ex BOOL
ADDAXIS1_Done BOOL
ADDAXIS1_Bsy BOOL
ADDAXIS1_Err BOOL
ADDAXIS1_ErrID WORD
ADDAXIS2 DMC_AddAxisToGroup
ADDAXIS2_Done BOOL
ADDAXIS2_Bsy BOOL
ADDAXIS2_Err BOOL
DMC_GroupEnable0 DMC_GroupEnable
GE_En BOOL
GE_Status BOOL
GE_Bsy BOOL
GE_Abt BOOL
GE_Err BOOL
11- 4 97
DVP-50MC Series Motion Controller Operation Manual
GE_ErrID WORD
CIRREL DMC_MoveCircularRelative
11
CIRREL_Ex BOOL
1
CIRREL_Mode INT 0
CIRREL_T UINT 0
CIRREL_PC INT 0
CIRREL_Done BOOL
CIRREL_Bsy BOOL
CIRREL_Act BOOL
CIRREL_Abt BOOL
CIRREL_Err BOOL
CIRREL_ErrID WORD
11- 4 98
Chapter 11 Motion Control Instructions
ADDAX IS1
DM C_Add AxisToG roup 1
1 Ax esGr oup D one A DDAXIS 1_Done
1 Ax is Busy A DDAXIS 1_Bsy
ADDA XIS1_Ex Ex ecute Err or A DDAXIS 1_Err 11
1 IdenthG r oup Er rorID A DDAXIS 1_ErrID
ADDAXI S2
DM C_Add AxisToG roup 2
1 Ax esGr oup D one A DDAXIS 2_Done
2 Ax is Busy A DDAXIS 2_Bsy
ADDA XIS1_Ex Ex ecute Err or A DDAXIS 2_Err
2 IdenthG r oup Er rorID A DDAXIS 2_ErrID
DMC_GroupEnable0
DMC_Gr oupEnable 3
1 AxesGroup Status GE_Status
GE_En Enable Busy GE_Bsy
GE_Vel MoveDir ectVelocity CommandAborted GE_Abt
G E_Acc MoveDir ectAcceler ation Error GE_Err
G E_Dec MoveDir ectDeceleration ErrorID GE_ErrID
GE_Jerk MoveDir ectJerk
CI RREL
DMC_MoveCi rc ularRel ative 4
1 Axes Gr oup Done CIRRE L_Done
CIRREL_Ex Execute Busy CIRRE L_Bsy
CIRR EL_Mode Cir cMode Active CIRRE L_Act
CI RREL_Aux p AuxP oint Comm andAborted CIRRE L_Abt
CIRREL_Endp EndP oint Err or CIRRE L_Err
CIRREL_T Mult iT urn Er rorID CIRRE L_ErrID
CIRREL_PC PathChoice
20000 Velocity
10000 Acceler ation
10000 Deceler ation
10000 Jer k
Coor dSys tem
mc Buffer ed Buffer Mode
Transi ti onM ode
Trans itionPar am eter
11- 4 99
DVP-50MC Series Motion Controller Operation Manual
11
1 3 00 0
B
2 00 0 C
1 00 0
A
X
0
10 00 200 0 40 00
C IRREL
CIRR EL_Ex
C IRR EL _D one
CIRR EL_Act
CIR REL_ Ab t
The value of CIRREL_Mode is set to 0. The value of CIRREL_ Auxp[1] is set to 1000. The value of
CIRREL_Auxp[2] is set to -2000. The value of CIRREL_Endp[1] is set to 3000. The value of
CIRREL_Endp[2] is set to -1000. The value of CIRREL_Mode is set to 0.
Point B is the start point of the arc with coordinates (1000, 3000). Point A is the center of the circle
where the arc is with the coordinates (1000+CIRREL_Auxp[1]=2000,
3000+CIRREL_Auxp[2]=1000). Point C is the end point of the arc with coordinates
(1000+CIRREL_Endp[1]=4000, 3000+CIRREL_Endp[2]=2000).
11- 5 00
Chapter 11 Motion Control Instructions
11.7.14 DMC_GroupSetOverride
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
1~8
When Enable
AxesGroup The axes group number USINT (The variable value
changes to TRUE.
must be set)
0~500
Override value, unit: %, When Enable
VelFactor LREAL (The variable value
e.g.“100” means 100%. changes to TRUE.
must be set)
AccFactor Reserved - - -
JerkFactor Reserved - - -
Output Parameters
Parameter
Function Data type Valid range
name
Enabled TRUE when the axes group is being controlled. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 5 01
DVP-50MC Series Motion Controller Operation Manual
Parameter
Function Data type Valid range
name
11 Error
TRUE when an error occurs in execution of the
BOOL TRUE / FALSE
1 instruction.
Case 1 Case 2
E nable
E nabled
Bu sy
Error
Error ID
Case 1: When Enable changes from FALSE to TRUE, Busy changes to TRUE. One cycle later,
Enabled changes to TRUE. When Enable changes from TRUE to FALSE, Enabled and Busy
change to FALSE.
Case 2: When an error occurs in the instruction execution, Error changes to TRUE and ErrorID shows
corresponding error codes and meanwhile Busy changes to FALSE. When Enable changes to
FALSE, Error changes to FALSE and the value in ErrorID is cleared to 0.
Function
DMC_GroupSetOverride instruction is used to set the value of override for the coordinated motion of a
11- 5 02
Chapter 11 Motion Control Instructions
axes group.
2. The unit of VelFactor is %. “100” means “100%”. The valid range of VelFactor value is 0~500. If the
range is exceeded, an error will occur in the instruction execution.
3. The target velocities of axes in the axes group = target velocities of current axes * override value if
the instruction DMC_MoveDirectAbsolute or DMC_MoveDirectRelative is being executed after the
DMC_GroupSetOverride instruction is executed.
The new maximum velocity of the axes group = current maximum velocity of the axes group*
override value if the instruction DMC_MoveLinearAbsolute, DMC_MoveLinearRelative,
DMC_MoveCircularAbsolute or DMC_MoveCircularRelative is being executed after the
DMC_GroupSetOverride instruction is executed.
4. After DMC_GroupSetOverride instruction is executed, the axes group will accelerate or decelerate
according to the acceleration rate or deceleration rate of currently being executed instruction till the
target velocity after modification is reached.
5. An error will occur in axes if the target velocity after modification exceeds the maximum rotation
velocity.
6. The target velocity becomes 0 and the axes group acts at the velocity 0 when the value of VelFactor
is set 0.
7. When Enable changes to TRUE, the newly modified VelFactor value will take effect immediately and
users do not need to restart the instruction. When Enable changes to TRUE, an errror will occur in
the instruction and the target velocity will return to 100% if the value of VelFactor exceeds valid
range.
8. When Enable changes to TRUE, the modified value of Velfactor will take effect immediately and
there will be no need to restart the instruction. When Enable changes to TRUE, an error will be
alerted immediately in the instruction and the target velocity will return to 100% if the modified value
of Velfactor exceeds valid range.
9. When Enable changes to FALSE, the axes group will speed up or slow down regarding
VelFactor=100 as the target.
11- 5 03
DVP-50MC Series Motion Controller Operation Manual
Programming Example
11 The example of executing DMC_GroupSetOverride instruction is as follows.
1 1. The variable table and program
SetOv DMC_GroupSetOverride
SetOv_En BOOL
SetOv_Velf LREAL
SetOv_Ena BOOL
SetOv_Bsy BOOL
SetOv_Err BOOL
SetOv_ErrID WORD
LINABS DMC_MoveLinearAbsolute
LINABS_Ex BOOL
LINABS_Done BOOL
LINABS_Bsy BOOL
LINABS_Act BOOL
LINABS_Abt BOOL
LINABS_Err BOOL
LINABS_Eid WORD
11- 5 04
Chapter 11 Motion Control Instructions
S etOv
DMC_GroupSetOverride 1
1 AxesGroup Enabled SetOv_Ena
S etOv_En Enable Busy SetOv_Bsy
SetOv_VelF VelF actor Error SetOv_Err
AccF actor
JerkFactor
ErrorID SetOv_ErrID
11
LINAB S
DMC_MoveLinearAbsolute 2
1 AxesGroup Done LINA BS _Done
LINA BS_Ex Execute Busy LINA BS _Bsy
LIN AB S_Pos Position Active LINA BS _Act
10000 Velocity CommandAborted LINA BS _Abt
10000 Acceleration Error LINA BS _Err
10000 Deceleration ErrorID LINA BS _ErrID
10000 Jerk
CoordSystem
1 BufferMode
TransitionMode
TransitionParameter
Velocity
(Maxi mum veloc ity
of ax es group)
20 000
15 000
10000
5 000
Time
LINABS
LINABS_Ex
LINABS_Done
LI NAB S_Bsy
LINABS_Ac t
LINABS _Abt
LINABS_Err
SetOv
SetOv _En
Se tOv_Velf 150 50 200
S etOv _Ena
SetOv _Bsy
SetOv _Err
When LINABS_Ex changes to TRUE, LINABS_Bsy changes to TRUE. Two cycles later,
LINABS_Act changes to TRUE and the axes group starts to move. When the axes group has not
11- 5 05
DVP-50MC Series Motion Controller Operation Manual
reached the target velocity and SetOv_En is set to TRUE , the DMC_GroupSetOverride instruction
takes effect and the target velocity of the axes group becomes the new target velocity.
When SetOv_En changes to FALSE, the target velocity of the axes group becomes10,000.
11 If the value of SetOv_Velf is modified in the execution of DMC_GroupSetOverride instruction, the
1 value of SetOv_Velf will take effect immediately. The target velocity of the
DMC_MoveLinearAbsolute instruction will change accordingly.
11- 5 06
Chapter 11 Motion Control Instructions
11.7.15 DMC_GroupReadActualPosition
Input Parameters
Valid range
Parameter name Function Data type Validation timing
(Default)
1~8
When Enable
AxesGroup The axes group number USINT (The variable value
changes to TRUE.
must be set)
The instruction is
executed when Enable TRUE or FALSE
Enable BOOL
changes from FALSE to (FALSE)
TRUE.
CoorSystem Reserved - - -
Output Parameters
Parameter
Function Data type Valid range
name
Valid TRUE when the output of the instruction is valid. BOOL TRUE / FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
11- 5 07
DVP-50MC Series Motion Controller Operation Manual
Parameter
Function Data type Valid range
name
11 ErrorID
Contains the error code when an error occurs. Please
WORD
1 refer to section 12.2.
ARRAY [1..8]
Position Positions of axes in an axis group
OF LREAL
Cas e1 Cas e 2
En able
Valid
Bus y
Error
E rro r ID
Case 1: When Enable changes from FALSE to TRUE, Busy changes to TRUE. One cycle later, Valid
changes to TRUE. When Enable changes from TRUE to FALSE, Valid and Busy change to
FALSE simultaneously.
Case 2: When there is an input error in the instruction and Enable changes from FALSE to TRUE,
Busy changes to TRUE, one cycle later, Error changes to TRUE and ErrorID shows error
11- 5 08
Chapter 11 Motion Control Instructions
codes and meanwhile Busy changes to FALSE. When Enable changes from TRUE to FALSE,
Error changes to FALSE and the value in ErrorID is cleared to 0.
Function
11
DMC_GroupReadActualPosition instruction is used to read current positions of axes in the axes group.
The value of the output Position is an array. Every member of the array corresponds to one axis
position. E.g. Position[1] corresponds to the position on X-axis, Position[2] corresponds to the position
on Y-axis and so on.
11- 5 09
DVP-50MC Series Motion Controller Operation Manual
DMC_Con trolAxisByPos
Axis InControl
Velocity Erro r
Acceleration ErrorID
Decel eratio n
Jerk
Input Parameters
11- 5 10
Chapter 11 Motion Control Instructions
Positive number
Specify the target 11
Acceleration LREAL (The variable
acceleration.
value must be set)
Positive number
Specify the target (The variable
Deceleration LREAL
deceleration.
value must be set)
Positive number
Specify the change rate of
Jerk target acceleration or LREAL (The variable
deceleration. value must be set)
Output Parameters
Parameter name Function Data type Valid range
TRUE when the axis is under control of the
InControl BOOL TRUE/FALSE
instruction.
11- 511
DVP-50MC Series Motion Controller Operation Manual
Parameter Name Timing for changing to TRUE Timing for changing to FALSE
When an error occurs in the
instruction execution or the When Execute changes from TRUE to
Error
input parameters for the FALSE.
11 instruction are illegal.
1
Output Update Timing Chart
Case 1 Case 2 Case 3
Execute
InControl
Busy
Active
CommandAborted
Error
ErrorI D
Case 1: Busy changes to TRUE when Execute changes to TRUE. Several cycles later, Active and
InControl change to TRUE.
Case 2: When Execute changes from FALSE to TRUE and the instruction is aborted by other instruction,
CommandAborted changes to TRUE and meanwhile Busy and Active change to FALSE.
CommandAborted changes to FALSE when Execute changes from TRUE to FALSE.
Case 3: When an error occurs such as axis alarm or Offline after Execute changes from FALSE to TRUE,
Error changes to TRUE and ErrorID shows corresponding error codes. Meanwhile, Busy and
Active change to FALSE and InControl changes to FALSE. Error changes to FALSE when
Execute changes from TRUE to FALSE.
Function
11- 5 12
Chapter 11 Motion Control Instructions
2. While Execute changes from FALSE to TRUE once more during the execution of
DMC_ControlAxisByPos, there is still no impact on the instruction execution.
3. The velocity, acceleration and deceleration must be greater than 0. None of them are used in the
calculation of the position control. 11
4. The Position in this instruction means a relative incremental position. The reference position for the
incremental position is what the value of Postion is when Execute of the instruction changes from
FALSE to TRUE.
For example, the value of Position is 5000 and the axis position is 500. Change Execute of the instruction
from FALSE to TRUE. Then the axis remains motionless and the axis position remains unchanged.
Change the value of Position to 6000 (which has increased by 1000), the axis completes the motion in
one SYNC cycle. The axis position is 1500 ( which has increased by 1000) after the travel is completed.
4. Programming Example
Axis1 USINT 1
Pwr_ErrID WORD 0
CAByPos DMC_ControlAxisByPos
CAByPos_Ex_Pos LREAL
CAByPos_Ex_Vel LREAL 1
CAByPos_Ex_Acc LREAL 1
CAByPos_Ex_Dec LREAL 1
CAByPos_Ex_Jerk LREAL 1
11- 5 13
DVP-50MC Series Motion Controller Operation Manual
11
1 Pwr
M C_Power
Axis 1 Ax is Status Pwr_Sta
T RUE Enable Busy Pwr_Bsy
C AByPos
CAByPos_Ex changes to TRUE after the axis is power on. Meanwhile CAByPos_Bsy is TRUE in the same
cycle. CAByPos_Act is TRUE in the next cycle. Then increase the value of CAByPos_Ex_Pos by 10 per
cycle. Suppose the SYNC cycle is 2ms, there are 500 SYNC cycles within 1 second and the axis command
velocity is 10*500=5000 units/second.
11- 5 14
Chapter 11 Motion Control Instructions
11.8.2 DMC_NC
DVP50MC11T/DVP50MC11T-06
DMC_NC Instruction is used to parse out the position of 11
FB DVP50MC11P/DVP50MC11P-06
each axis in the CNC file every SYNC cycle.
DVP50MC11T-16S
DMC _NC_instance
DMC_N C
Execute Done
Pause Busy
Stop Active
Veloverride Error
Depth ErrorID
NcFile Bypass
AxesGroup CurrentLine
Mode Pos_X
Res Pos_Y
Pos_Z
Pos_A
Pos_B
Pos_C
Pos_P
P os_Q
Input Parameters
TRUE.
VelOverride Velocity override,Unit: %, LREAL Negative, 0-500 When Execute
11- 5 15
DVP-50MC Series Motion Controller Operation Manual
1 1-50
When Execute
changes from
Depth Enter 1 here; Reserved. LREAL
(0) FALSE to
TRUE
When Execute
1-64 changes from
NCFile CNC file Number LREAL
(0) FALSE to
TRUE
When Execute
1-8 changes from
AxesGroup The number of an axes group LREAL
(0) FALSE to
TRUE
Mode Enter 0 here; Reserved.
Res Reserved
Output Parameters
Data
Parameter name Function Valid range
type
Done TRUE when parsing the CNC file is complete. BOOL TRUE/FALSE
11- 5 16
Chapter 11 Motion Control Instructions
Data
Parameter name Function Valid range
type
E xecute
Stop
Pause
Done
Busy
A ctive
Error
E rrorID
11- 5 17
DVP-50MC Series Motion Controller Operation Manual
Case 1: Busy changes to TRUE when Execute changes to TRUE. Several cycles later, Active changes
to TRUE. When parsing the CNC file is complete, Done changes to TRUE. Meanwhile Busy and
Active change to FALSE. When Execute changes to FALSE, Done changes to FALSE.
11
1 Case 2: Busy changes to TRUE when Execute changes to TRUE. Several cycles later, Active changes
to TRUE. Change the state of Stop to TRUE while the CNC file is being parsed. In the next cycle,
Done changes to TRUE, meanwhile Busy and Active change to FALSE, the CNC file parsing
ends and CurrentLine and axis position outputs stop. Changing the state of Stop to FALSE,
Done remains TRUE. When Execute changes to FALSE, Done changes to FLASE.
Case 3: Busy changes to TRUE when Execute changes to TRUE. Several cycles later, Active changes
to TRUE. change the state of Pause to TRUE while the CNC file is being parsed. The instruction
stops parsing the CNC file temporarily and CurrentLine and axis position outputs stop. Changing
the state of Pause to FALSE, the parsing of the CNC file continues and CurrentLine and axis
position outputs are recovered. When the parsing is complete, Done changes to TRUE.
Meanwhile Busy and Active change to FALSE. Done changes to FALSE by changing Execute
to FALSE.
Case 4: When Execute changes to TRUE and one of the parameter values for the instruction is incorrect,
Busy changes to TRUE. One cycle later, Error changes to TRUE, ErrorID outputs error ID and
Busy changes to FALSE. When Execute changes to FALSE, Error changes to FALSE and the
vlaue of ErrorID changes to 0.
Function
DMC_NC Instruction is used to parse the CNC file.
The instruction analyzes the position of each axis and outputs each axis position to corresponding output
parameters of the instruction (e.g. Pos_X, Pos_Y, etc.) every SYNC cycle. Actually the values of Pos_X and
Pos_Y do not control the axes and they are only the positions which are parsed out. If you want to control
any axis through this instruction, the position which is parsed out by the instruction can be assigned to
Position of the DMC_ControlAxisByPos instruction by using the DMC_NC instruction together with the
DMC_ControlAxisByPos instruction. By doing so, the axis motion can be controlled according to the path
planned in the CNC file.
1. The DMC_NC Instruction is executed by changing Execute from FALSE to TRUE. There is no impact on
the instruction execution by changing Execute of the instruction from TRUE to FALSE in the course of
the instruction execution.
2. Changing Execute from FALSE to TRUE once more during the execution of DMC_NC Instruction does
not affect the instruction execution.
11- 5 18
Chapter 11 Motion Control Instructions
3. By setting Stop to TRUE during the DMC_NC instruction execution, the CNC file parsing will end and
Done changes to TRUE.
4. By setting Pause to TRUE during the DMC_NC instruction execution, the CNC file parsing will stop for
a while and will continue after Pause is set to FALSE. 11
5. The NCFile input specifies the number of the CNC file to be executed, i.e. it is the ID of the CNC file
created in the programming software.
6. The AxesGroup input specifies the number of the axes group which is to execute the CNC file.
5. Programming Example
Axes are controlled to move according to the path planned in the CNC file by using DMC_NC and
DMC_ControlBypos instructions. Axis 1 and axis 2 are configured in the program. The initial positions of
the two axes are both 10000 units. Axis 1 is X axis and axis 2 is Y axis.
A new CNC file is created in the program with the file ID set to 1.
See the program as follows.
N00 G91
N01 G0 X40000 Y90000
CAByPos DMC_ControlAxisByPos
Axis1 USINT 1
CAByPos_Ex_Vel LREAL 1
CAByPos_Ex_Acc LREAL 1
CAByPos_Ex_Dec LREAL 1
CAByPos_Ex_Jerk LREAL 1
11- 5 19
DVP-50MC Series Motion Controller Operation Manual
CAByPos1 DMC_ControlAxisByPos
Axis2 USINT 2
CAByPos1_Ex_Vel LREAL 1
CAByPos1_Ex_Acc LREAL 1
CAByPos1_Ex_Dec LREAL 1
CAByPos1_Ex_Jerk LREAL 1
CAByPos1_ErrID WORD 0
NC DMC_NC
NC_Dep UINT 1
NC_File UINT 1
NC_Axes UINT 1
NC_Mode INT 0
NC_Res LREAL 0
NC_ErrID WORD 0
NC_Bys BOOL 0
NC_Cur UDINT 0
11- 5 20
Chapter 11 Motion Control Instructions
NC_Px LREAL 0
NC_Py LREAL 0 11
NC_Pz LREAL 0
NC_Pa LREAL 0
NC_Pb LREAL 0
NC_Pc LREAL 0
NC_Pp LREAL 0
NC_Pq LREAL 0
NC
D MC_N C
N C_Ex Execute Done NC _Done
NC _P au Pause Busy NC _B sy
P os_Z NC _P z
P os_A NC _P a
Pos_B NC _P b
Pos_C NC _P c
Pos_P NC _P p
Pos_Q NC _P q
11- 5 21
DVP-50MC Series Motion Controller Operation Manual
C AByPos
C AByPos1
When CAByPos_Ex and CAByPos1_Ex are set to TRUE after axis 1 and axis 2 are power on, Busy and
Active of CAByPos and CAByPos1 instructions change to TRUE.
After the NC_Ex variable changes to TRUE, NC_Bsy changes to TRUE, NC_Act changes to TRUE,
NC_Cur displays the number of the row in which the CNC file is being parsed currently. NC_Px, NC_Py,
NC_Pz, NC_Pa, NC_Pb, NC_Pc, NC_Pp and NC_Pq output the positions of axes respectively after the
CNC file is parsed in the current cycle.
CAByPos controls X axis to move according to the value of NC_Px which is parsed out and CAByPos1
controls Y axis to move according to the value of NC_Py which is parsed out.
After the program is executed, the Position/Time curve for the whole motion process is shown
as below.
11- 5 22
Chapter 11 Motion Control Instructions
Position Y
100000
11
X
50000
10000
t
11- 5 23
DVP-50MC Series Motion Controller Operation Manual
MEMO
11
1
11- 5 24
12
Troubleshooting
Table of Contents
12.1 Explanation of LED Indicators ................................................ 12-2
12.2 Table of Error IDs in Motion Instructions ............................... 12-6
12.3 System Trouble Diagnosis through System Error Codes ....... 12-16
12- 1
DVP-50MC Series Motion Controller Operation Manual
ERR LED
ERR LED indicates the error state of the motion controller.
LED state Explanation How to deal with
The motion controller is in the state
LED OFF No correction
of normal work.
Red light Errors in the program or Get the detailed error information through the
blinking configuration. error diagnosis function.
Red light ON Mistakes in hardware Contact local technicians.
OFF
OF F
1 00ms
SD LED
SD LED is used for displaying the state of the SD card in the motion controller.
LED state Explanation How to deal with
1. No SD card is inserted to the
motion controller. Insert the SD card or not according to
LED OFF
2. An error occurs in reading and the actual demand
writing the document
Green light The SD card in the motion controller is
No correction
blinks quickly. exchanging data
Green light No data exchange for the SD card in
ON the motion controller.
12- 2
Chapter 12 Troubleshooting
EtherCAT LED
EtherCAT LED displays the state of the EtherCAT port of the motion controller.
LED state Explanation How to deal with
Yellow light EtherCAT port is exchanging data with
No correction
blinks a slave.
EtherCAT port makes the connection
Add at least one slave to the master in
Yellow light ON with other slave in hardware. But no
the software.
slave is added to the master.
EtherCAT port does not make the Ensure that the EtherCAT port makes
Light OFF connection with other slave in the connection with other slave in
hardware. hardware.
12
EtherNet LED
EtherNet LED displays the network state of the EtherNet port of the motion controller.
LED state Explanation How to deal with
The EtherNet port of the motion controller has not sent or received
ON
Yellow data.
light The EtherNet port of the motion controller has not been connected
OFF
to the EtherNet network.
CANopen LED
RUN LED
CANopen
Green light PC is downloading the network configuration data.
communication port is in
single flash Wait till downloading is completed.
STOP state.
12- 3
DVP-50MC Series Motion Controller Operation Manual
ON
200ms
Gr ee n li gh t
sin gl e flash 1000 ms
2 00ms
OFF
ON
20 0ms
12 Gr ee n l ig ht
bl in ks
1
200 ms
OF F
ERR LED
LED state Explanation How to deal with
PLC module is in the state of
LED OFF No correction
normal work.
1. Check if the CANopen bus cable is Delta
standard cable.
2. Check if the two ends of CANopen bus have
Red light double connected a terminal resistor respectively.
Some slave is offline.
flashes 3. Check if configured slaves have been
actually connected to the network.
4. Check if the interference around CANopen
bus cable is too strong.
Red light single The bus error is out of the alert 1. Check if the CANopen bus cable connection
flash level. is correct.
2. Check if the CANopen bus cable is Delta
standard cable.
3. Check if the two ends of CANopen bus have
connected a terminal resistor respectively.
Red light ON Bus-off
4. Check if the baud rate of CANopen port is
the same as that of other slaves.
5. Check if the interference around CANopen
bus cable is too strong.
ERR LED: Red light is in a single flash and double flashes as below.
ON
200m s
Red light
single flas h 1000ms
OFF
ON
200m s 200m s
Red light
double flashes 2 00ms 10 00ms
O FF
12- 4
Chapter 12 Troubleshooting
RS232 LED
The RS-232 communication indicator of the motion controller indicates the communication state of RS-232
port of the motion controller.
LED state Indication
Yellow light blinking There are response data via RS-232 port.
LED OFF There are no response data via RS-232 port.
RS485 LED
12
The RS-485 communication indicator of the motion controller indicates the communication state of RS-485
port of the motion controller.
LED state Indication
Yellow light blinking There are response data via RS-485 port.
LED OFF There are no response data via RS-485 port.
12- 5
DVP-50MC Series Motion Controller Operation Manual
The change rate of the acceleration Make sure that the value of the input variable, Jerk
1004 4100
exceeds the valid range. is a positive number.
12- 6
Chapter 12 Troubleshooting
ErrorID
Meaning How to deal with
Hex Decimal
3. Check if the baud rates of CANopen port or
EtherCAT port and the accessed slave are
same.
Check if the input parameter settings of the SDO
instruction are reasonable. For example, see
The input parameter error of the SDO
1016 4118 whether the accessed Index and Subindex exist or
instruction
not and whether the value of DataType is legal or
not.
1017 4119
Other faults in SDO in CANopen
network (or EtherCAT network).
Check if slaves are in normal work. 12
The value of TriggerInput of the Modify the value of the input variable, TriggerInput.
1018 4120 position-capture instruction The value can be set within the range of 0~15
DMC_TouchProbe is wrong. respectively representing I0~I7 and I10~I15.
The input point specified by
TriggerInput of the instruction Modify the value of TriggerInput of the instruction
1019 4121
DMC_TouchProbe has been used in into one value which has not been used yet.
another DMC_TouchProbe.
Windowonly of DMC_TouchProbe is Modify the values of Firstops and Lastops into
101A 4122
abnormal. those within the valid range.
Two DMC_TouchProbe instructions
Prevent two DMC_TouchProbe instructions from
are performed for capturing the
101B 4123 capturing the position of the same axis at the same
position of the same axis at the same
time.
time.
The setting value of Mode of Modify the value of the input variable, Mode into
101C 4124
DMC_TouchProbe is incorrect. that which can be set in the instruction.
The axis specified by Modify the value of the input variable, Axis into the
101D 4125 DMC_TouchProbe is not an encoder axis No. of the encoder axis which has been
axis. configured.
Modify the value of the input variable,
The value of ActivationPosition of
101E 4126 ActivationPosition into that which can be set in the
MC_CamIn is incorrect.
instruction.
The used axis is not configured to the Modify the value of the input variable, Axis into the
1020 4128 EtherCAT network in the software or axis No. which has been configured in the
the axis type is incorrect. EtherCAT network.
The radius of the rotary-cut axis is Modify the value of the input variable,
1021 4129
incorrect. RotaryAxisRadius. It should be greater than 0.
Modify the value of the input variable,
1022 4130 The radius of the feed axis is incorrect.
FeedAxisRadius. It should be greater than 0.
Modify the value of the input variable, CutLenth of
1023 4131 The cutting length is incorrect.
APF_RotaryCut_Init. It should be greater than 0.
Modify the value of the input variable,
The value of SyncStartPos is SyncStartPos of APF_RotaryCut_Init. It should be
1024 4132 between 0 and the cutting length.
incorrect.
12- 7
DVP-50MC Series Motion Controller Operation Manual
ErrorID
Meaning How to deal with
Hex Decimal
Since APF_RotaryCut_Init has not been executed,
103A 4154 Rotary cut initializing fails. please execute APF_RotaryCut_Init first and then
execute APF_RotaryCut_In.
The axis is offline and the capture Execute the capture instruction after the axis is
103B 4155
function can not be performed connected normally.
Modify the value of MasterOffset into that between
The value of MasterOffset of the negative number and positive number of the
103C 4156 MC_CamIn is greater than the master master axis cam cycle range. (The master axis
axis cam cycle range. cam cycle range= Maximum master axis cam
12 cycle- Mimimum master axis cam cycle)
1 The value of SlaveOffset of
Modify the value of SlaveOffset into that between
the negative number and positive number of the
103D 4157 MC_CamIn is greater than the slave slave axis cam cycle range. (The slave axis cam
axis cam cycle range. cycle range= Maximum slave axis cam cycle-
Minimum slave axis cam cycle)
The Depth value of the instruction is Modify the value of the input Depth in order not to
103E 4158
out of the range. exceed the range.
The VelOverride value range of the Modify the value of the input VelOverride in order
103F 4159
instruction is illegal. not to exceed the range.
Modify the value of the input NCFile into a proper
1040 4160 The file code is illegal.
code value.
DMC_SetTorque is executed when Make sure that DMC_SetTorque is executed when
1041 4161
the axis is not in Standstill state. the axis is in Standstill state.
1. Check if the axis specified by MC_Reset exists.
1042 4162 The execution of MC_Reset fails. 2. MC_Reset is executed after the servo alarm is
cleared.
The execution of an instruction leads
Modify the instruction to make sure that the final
1043 4163 to the result that the axis position
position does not exceed the software limit range.
exceeds the range set in the software.
The cam curve specified by Check if the CamTable value of MC_CamIn can
1044 4164
MC_CamIn is not built in the software. correspond to the cam curve built in the software.
Check if the value of GroupID is within the range
1045 4165 Axis group ID error
of 1~8.
1046 4166 Mode input value error The value of Mode for the instruction can only be
set to 0
The number of the From/To instruction Check the value of Station and the number of the
1047 4167
is wrong. instruction are correct.
An error in the number of CR registers
Check if the value of Num is within the range of
1048 4168 which are read and written by
1~64.
From/To.
The variable is not set for an
1049 4169 Set an variable for the input pin.
instruction input pin
No response transmitted to From/To Check if the connection between modules is
104A 4170
instruction proper and if the extension module works normally.
Check if the value of NCFile is correct and the
104B 4171 Empty CNC file
corresponding CNC file is empty.
Ensure that the G codes or axes group instructions
104C 4172 Path resolution error
settings for the path are correct.
The position capture instruction did
not receive the capture signal within
104D 4173 Ensure that the window range is set properly.
the window range and the capture
failed.
104E 4174 G code identifying error Ensure that G code file writing is proper.
104F 4175 Incorrect pre-read G code format Ensure that G code file writing is proper.
1050 4176 G-code pre-reading error Ensure that G code file writing is proper.
12- 8
Chapter 12 Troubleshooting
ErrorID
Meaning How to deal with
Hex Decimal
1051 4177 Path writing error Ensure that path writing is proper.
The setting for Position of the axis
drive specified in MC_Home
1052 4178 Check if the drive supports the parameter Position.
instruction failed. Perhaps the drive
does not support the parameter.
MC_Home instruction does not
support the encoder axis which takes
1053 4179 Modify the axis type into other axis type.
data sources as the encoder mode
and SSI absolute encoder axis.
1054 4180
Too many levels of G26 nesting in G Check if the number of levels of G26 nesting 12
codes exceeds 16.
The number of axes which execute
Keep the number of axes which execute multi-axis
multi-axis instructions exceeds the
1057 4183 instructions within the range of axis number for the
max. number of axes for the specific
specific model.
model.
The axis is disabled by means of
Make the axis disabled by using MC_Power
2001 8193 MC_Power instruction when it is not in
instruction when the axis is in Standstill state.
Standstill state.
The instruction cannot be executed Set EnablePositive and EnableNegative of
2002 8194 due to the limitation of the motion MC_Power to TRUE to cancel the limitation of the
direction. motion direction of the axis.
Modify the sequence of execution of
MC_HaltSuperimposed cannot be
MC_HaltSuperimposed. The execution of
performed when
2004 8196 MC_HaltSuperimposed should be conducted in
MC_MoveSuperimposed is not
the process of performing
executed yet.
MC_MoveSuperimposed.
Modify the timing for execution of the instruction.
The state machine limits that the
2100 8448 Refer to the state machine in section 10.4 for the
function cannot be performed.
execution of motion instructions.
The BufferMode of a motion control instruction only
supports one switch for changing the time to
execute current instruction and avoiding the
2101 8449 The buffer register is full. circumstance that another instruction is also
waiting to execute (BufferMode is not 0) while one
instruction is waiting to execute (BufferMode is not
0).
Buffer function cannot be performed in
2102 8450 The instruction cannot be operated in BufferMode.
the instruction.
Modify the axis type on the axis configuration
3001 12289 An error in axis type setting
window.
Have the control over the servo after clearing the
3002 12290 Servo alarm
servo alarm.
Check if the connection between the controller and
3003 12291 Servo Timeout
servo is OK.
The command position exceeds the Check if the set software limit position is proper or
3004 12292
limit position set in the software. disable the software limit position.
The process from RUN to STOP
Clear the error with the MC_Reset instruction and
3005 12293 occurs in the controller (during the
then execute other motion instruction.
execution of a motion instruction)
600D 24589 Connection error Check if the communication cable is proper.
Check if the TCP remote IP address format is
6200 25088 TCP remote IP error
correct.
Check if the TCP remote port setting is out of the
6201 25089 TCP remote port error
valid range.
TCP data-sending register address Check if the data-sending register address is within
6203 25091
error the valid range.
12- 9
DVP-50MC Series Motion Controller Operation Manual
ErrorID
Meaning How to deal with
Hex Decimal
TCP data-receiving register address Check if the data-receiving register address is
6206 25094
error within the valid range.
The data that TCP master actually
6208 25096 Modify the specified length of received data.
receives exceed the set length.
Check if the UDP remote IP address format is
6209 25097 UDP remote IP address error
correct.
620A 25098 UDP communication port error Modify UDP communication port.
12- 1 0
Chapter 12 Troubleshooting
ErrorID
Meaning How to deal with
Hex Decimal
Socket function exceeds the allowed Socket function as a value within 0~200.
maximum value.
The length of received data
Modify the length of received data configured for
9006 36870 configured for Socket function
Socket function as 0~200.
exceeds the allowed maximum value.
Communication timeout time setting in
9007 36871 Ethernet link configuration is Modify the timeout time as a value greater than 0.
improper.
The lengths of sent data and received Modify either of the lengths of sent data and 12
9008 36872 data configured for the Socket received data configured for the Socket function as
function are both 0. a value which is not 0.
RS485 PLC Link number exceeds the Modify PLC Link number as a value within the
9010 36880
range of 1-24. range of 1-24.
The written-data length configured for Modify written data length configured for RS485
9011 36881 RS485 PLC link exceeds the allowed PLC link as a value which is within the allowed
maximum value. range.
The read data length configured for
Modify read data length configured for RS485 PLC
9012 36882 RS485 PLC link exceeds the allowed
link as a value within the allowed range.
maximum value.
The length of sent data configured for Modify the length of sent data configured for
9013 36883 RS485 free protocol function exceeds RS485 free protocol function as a value within the
the allowed maximum value. allowed range.
The length of received data
Modify the length of received data configured for
configured for RS485 free protocol
9014 36884 RS485 free protocol function as a value within the
function exceeds the allowed
allowed range.
maximum value.
The number of the RS232 PLC Link Modify the number of the RS232 PLC Link as a
9015 36885
exceeds the range of 1~24. value within the range of 1-24.
The written-data length configured for Modify the written-data length configured for
9016 36886 RS232 PLC link exceeds the allowed RS232 PLC link as a value within the allowed
maximum value. range.
The read-data length configured for
Modify the read-data length configured for RS232
9017 36887 RS232 PLC link exceeds the allowed
PLC link as a value within the allowed range.
maximum value.
The length of sent data configured for Modify the length of sent data configured for
9018 36888 RS232 free protocol function exceeds RS232 free protocol function as a value within the
the allowed maximum value. allowed range.
The length of received data
Modify the length of received data configured for
configured for RS232 free protocol
9019 36889 RS232 free protocol function as a value within the
function exceeds the allowed
allowed range.
maximum value.
Communication timeout time setting in
901A 36890 RS485/RS232 PLC link configuration Modify the timeout time as a value greater than 0.
is improper.
The lengths of read data and written
data configured for the Modify either of the lengths of read data and
901B 36891
Ethernet/RS485/RS232 link are both written data configured as a value which is not 0.
0.
The lengths of sent data and received
Modify either of the lengths of sent data and
901C 36892 data configured for the RS485/RS232
received data configured as a value which is not 0.
free protocol function are both 0.
12- 11
DVP-50MC Series Motion Controller Operation Manual
ErrorID
Meaning How to deal with
Hex Decimal
The local buffer of word type for data
writing has no enough space to meet Modify the start address of the local buffer to make
9020 36896 the specified length of data. it have enough space to meet the specified data
(Valid range: %MW0~%MW32767) length.
The start address of the local buffer of
word type for data writing is out of the Modify the start address of the local buffer within
9021 36897 allowed word register area. the allowed word register area.
(Valid range: %MW0~%MW32767)
The start address of the local buffer of
12 word type for data writing is within the
1 9022 36898
allowed word register area but can not
meet the alignment of word register
Modify the start address of the local buffer or offset
length.
addresses.
(Valid range: %MW0~%MW32767)
The local buffer of word type for the
data reading has no enough space to Modify the start address of the local buffer to make
9023 36899 meet the specified length of data. it have enough space to meet the specified data
(Valid range: %MW0~%MW32767) length.
The start address of the local buffer of
word type for data writing is out of the Modify the start address of the local buffer within
9024 36900 allowed word register area. the allowed word register area.
(Valid range: %MW0~%MW32767)
The start address of the local buffer of
word type for data reading is within the
allowed word register area but can not Modify the start address of the local buffer or offset
9025 36901 meet the alignment of word register length.
addresses.
(Valid range: %MW0~%MW32767)
The local buffer of bit type for data
writing has no enough space to meet Modify the start address of the local buffer to make
9026 36902 the specified length of data. it have enough space to meet the specified data
(Range: %QX0.0~%QX127.7,%MX0. length.
0~%MX65535.7)
The start address of the local buffer of
bit type for data writing is out of the
allowed area. Modify the start address of the local buffer within
9027 36903
( Range: %QX0.0~%QX127.7,%MX the allowed area.
0.0~%MX65535.7)
The local buffer of bit type for data
reading has no enough space to meet Modify the start address of the local buffer to make
9028 36904 the specified length of data. it have enough space to meet the specified data
(%QX0.0~%QX127.7,%MX0.0~%MX length.
65535.7)
The start address of the local buffer of
bit type for data reading is out of the
allowed area. Modify the start address of the local buffer within
9029 36905
(%QX0.0~%QX127.7,%MX0.0~%MX the allowed area.
65535.7)
9030 36912 Object type error Modify the value of the input parameter ObjType.
The specified function code for data Specify a new function code which is within the
9031 36913
reading exceeds the allowed range. allowed range.
The local buffer for data sending has
no enough space to meet the Modify the start address of the local buffer or
9040 36928 specified length of data. specified data length.
(%MW0~%MW32767)
12- 1 2
Chapter 12 Troubleshooting
ErrorID
Meaning How to deal with
Hex Decimal
The start address of the local buffer for
data sending is out of the allowed
9042 36930 word register area. Modify the start address of the local buffer.
(Valid range: %MW0~%MW32767)
The local buffer specified for data
receiving has no enough space to Modify the start address of the local buffer or
9043 36931 meet the specified length of data. specified data length.
(%MW0~%MW32767)
The start address of the local buffer
specified for data receiving is out of 12
9045 36933 the allowed word register area. Modify the start address of the local buffer.
(Valid range: %MW0~%MW32767)
Socket instruction parameter value Modify the Socket instruction parameter values
9100 37120
exceeds the allowed range. within the allowed range.
Ethernet physical connection is
9101 37121 Check if the network cable connection is proper.
disconnected.
9102 37122 TCP remote IP address error Modify the setting for the remote IP address.
9103 37123 TCP port error Modify the remote port setting.
An error occurs in the register
9105 37125 Modify register address for sending TCP data.
addresses for TCP data sending.
The last data receiving has not been completed
9106 37126 TCP/UDP data receiving is in process.
and thus the new receiving can not be triggered.
9107 37127 TCP receiving register address error Modify the register address for receiving TCP data.
Set the length of received data to the length which
The length of received data exceeds
9108 37128 is greater than or equal to the number of bytes of
the set length in TCP server mode.
the first received data.
Set the length of received data to the length which
The length of received data exceeds
9109 37129 is greater than or equal to the number of bytes of
the set length in UDP transmission.
the first piece of received data.
910A 37130 UDP remote IP address error Modify the remote IP address setting.
Local port and remote port can not be 0 at the
910B 37131 UDP port error
same time.
An error occurs in the register
910C 37132 Modify the register addresses for sent data.
addresses for sent UDP data.
An error occurs in the register Modify the register addresses for storing the
910D 37133
addresses for received UDP data. received data.
Check if the Socket configuration is proper or the
910E 37134 TCP connection timeout
remote device works normally.
Set the length of received data to the length which
The length of received data exceeds
910F 37135 is greater than or equal to the number of bytes of
the set length in TCP client mode.
the first piece of received data.
TCP link is declined by the remote Check if the remote device is normal or retry the
9110 37136
device. link to the remote device.
9111 37137 TCP/UDP link has not been enabled. Make sure that the link has been enabled.
The link is being built and thus the link building can
9112 37138 TCP/UDP link has been triggered.
not be re-triggered.
TCP/UDP data sending has been The last data sending has not been completed and
9113 37139
triggered. thus the sending can not be re-triggered.
The link has been built and thus the repeated
9114 37140 TCP/UDP link has been built.
trigger can not build a link.
12- 1 3
DVP-50MC Series Motion Controller Operation Manual
ErrorID
Meaning How to deal with
Hex Decimal
The link is being disabled and thus the link
9115 37141 TCP/UDP link is being disabled.
disabling can not be re-triggered.
The configuration of Socket parameters can be
9116 37142 TCP/UDP link is not disabled.
conducted only when the link is disabled.
The parameter value for the length of Modify the length of sent data within the allowed
9117 37143
sent TCP/UDP data exceeds the limit. range.
The parameter value for the length of
Modify the length of received data within the
12
9118 37144 received TCP/UDP data exceeds the
allowed range.
limit.
1 A000 40960 Cam point number error Modify the cam table number.
A001 40961 Tappet point number error Modify tappet point number.
A008 40968 M code number error Modify M code number.
A010 40976 Axes group state machine error Modify the timing for the instruction execution.
The axes group number exceeds the
A011 40977 Modify the axes group number.
allowed range.
The value of the input parameter
A012 40978 Modify the input value.
TransitionMode is incorrect.
The value of the input parameter
A013 40979 Modify the input value.
TransitionParameter is incorrect.
The setting value of BufferMode does
A014 40980 Modify the input value.
not match that of TransitionMode.
A015 40981 The value of CircMode is incorrect. Modify the input value.
A016 40982 The value of PathChoice is incorrect. Modify the input value.
The mechanical gear ratio can not be
A800 43008 Modify the mechanical gear ratio.
0 or a negative number.
The UnitsPerRotation value can not
A801 43009 Modify the UnitsPerRotation value.
be 0 or a negative number.
A802 43010 Axis type error Modify the axis type.
The value of the modulo can not be a
A803 43011 Modify the value of the modulo.
non-positive number.
Ex_Move is executed again when the
A808 43016 instruction execution has not been Modify the timing of the instruction execution.
completed yet.
Ex_Move need be executed first
A809 43017 Modify the timing of the instruction execution.
before Ex_Stop is executed.
The RoundPhase value should be Modify the RoundPhase value as a value which is
A80A 43018
greater than 0. greater than 0.
The StopPhase value should be Modify the StopPhase value as a value which is
A80B 43019 greater than 0 and less than the greater than 0 and less than the RoundPhase
RoundPhase value. value.
The TorqueRamp value is 0 or a
A810 43024 Modify the TorqueRamp value.
negative number.
A818 43032 The Lag value is a negative number. Modify the Lag value as a non-negative number.
The HoldTime value is a negative Modify the HoldTime value as a non-negative
A819 43033
number. number.
The tappet point count reaches the Make sure that the tappet point count does not
A820 43040
maximum value. exceed the maximum value.
A821 43041 The MasterPos value exceeds the Be sure that the master position of the tappet point
12- 1 4
Chapter 12 Troubleshooting
ErrorID
Meaning How to deal with
Hex Decimal
allowable range. is within the range for the master axis set in the
software.
The identity number in the axes group
A830 43056 Modify the identity number.
has been used.
The axis has been configured as an
A831 43057 Change the axis number.
axis in the current axes group.
The operation state of the axes group
A838 43064 Modify the timing for the instruction execution.
is interrupted.
When the instruction is executed,
12
A839 43065 Modify the timing for the instruction execution.
Pause and Stop must be FALSE.
A83A 43066 No axes allocated in the axes group. Modify the timing for the instruction execution.
Axes in the axes group are not in
A83B 43067 Modify the timing for the instruction execution.
Standstill state.
12- 1 5
DVP-50MC Series Motion Controller Operation Manual
12- 1 6
Chapter 12 Troubleshooting
12
EIP configuration data upload Contact local technicians if the problem still
101C 4124
failed. exists after re-downloading the program.
Contact local technicians if the problem still
101D 4125 Cam table reading failed.
exists after re-downloading the program.
Contact local technicians if the problem still
1020 4128 Illegal configuration file type
exists after re-downloading the program.
Contact local technicians if the problem still
1021 4129 File storage failure
exists after re-downloading the program.
Contact local technicians if the problem still
1022 4130 File reading failed
exists after re-downloading the program.
Contact local technicians if the problem still
1023 4131 File check failure
exists after re-downloading the program.
Contact local technicians if the problem still
1024 4132 File size exceeds allowed range.
exists after re-downloading the program.
Contact local technicians if the problem still
1025 4133 Program file reading failed.
exists after re-downloading the program.
CANopen configuration file Contact local technicians if the problem still
1026 4134
reading failed exists after re-downloading the program.
Motion configuration file reading Contact local technicians if the problem still
1027 4135
failed exists after re-downloading the program.
System configuration file reading Contact local technicians if the problem still
1028 4136
failed exists after re-downloading the program.
Task configuration file reading Contact local technicians if the problem still
1029 4137
failed exists after re-downloading the program.
Extension configuration file Contact local technicians if the problem still
102A 4138
reading failed exists after re-downloading the program.
Contact local technicians if the problem still
102B 4139 Cam file reading failed.
exists after re-downloading the program.
Contact local technicians if the problem still
102C 4140 RETAIN file reading failed.
exists after re-downloading the program.
Contact local technicians if the problem still
102D 4141 ID file reading failed.
exists after re-downloading the program.
Contact local technicians if the problem still
102E 4142 Encrypted file reading failed.
exists after re-downloading the program.
Contact local technicians if the problem still
102F 4143 CNC file reading failed.
exists after re-downloading the program.
1030 4144 Hardware does not match. Contact local technicians.
1031 4145 Position parser processing fault Contact local technicians.
12- 1 7
DVP-50MC Series Motion Controller Operation Manual
12- 1 8
Chapter 12 Troubleshooting
12- 1 9
DVP-50MC Series Motion Controller Operation Manual
12- 2 0
Chapter 12 Troubleshooting
12- 2 1
DVP-50MC Series Motion Controller Operation Manual
12- 2 2
Chapter 12 Troubleshooting
12- 2 3
DVP-50MC Series Motion Controller Operation Manual
MEMO
12
1
12- 2 4
A
Modbus Communication
Table of Contents
A.1 Message Format in ASCII Mode .................................................................... A-2
A.2 Message Format in RTU Mode ........................................................................ A-5
A.3 Modbus Function Codes Supported ............................................................. A-7
A.4 Modbus Exception Response Code Supported........................................ A-7
A.5 Introduction to Modbus Function Codes ................................................... A-7
A.6 Table of Registers and Corresponding Modbus Addresses ............. A-16
A- 1
DVP- 50MC Ser ies Motion Contr oller O per ation Manual
Communication ADR 1
Communication address consists of two ASCII codes.
address ADR 0
CMD 1
Function code Function code consists of two ASCII codes.
CMD 0
DATA (0)
DATA (1)
Data Data content consists of 2n ASCII codes, n≤205.
A ……….
DATA (n-1)
LRC CHK 1
LRC Check LRC check consists of two ASCII codes.
LRC CHK 0
END1 End character consists of two ASCII codes.
End character END1 = CR (16#0D),
END0
END0 = LF (16#0A)
Hexadecimal
“0” “1” “2” “3” “4” “5” “6” “7”
character
ASCII code 16#30 16#31 16#32 16#33 16#34 16#35 16#36 16#37
Hexadecimal
“8” “9” “A” “B” “C” “D” “E” “F”
character
ASCII code 16#38 16#39 16#41 16#42 16#43 16#44 16#45 16#46
A- 2
Appendix A Modbus Communication
Request message:
ASCII code corresponding to field
Field name Field character
character
Start character “:” 3A
A- 3
DVP- 50MC Ser ies Motion Contr oller O per ation Manual
A- 4
Appendix A Modbus Communication
Data (n-1)
Data content
…….
n × 8 bit binary data, n<=202
Data 0
A- 5
DVP- 50MC Ser ies Motion Contr oller O per ation Manual
Response message:
Field name Character
Start No input data for more than 10ms
Communication address 01
Function code 03
Read data number(Counted by bytes) 04
Read high byte of data content 00
Read low byte of data content 01
Read high byte of data content 00
Read low byte of data content 02
Low byte of CRC check sum 2A
A- 6
Appendix A Modbus Communication
}
return reg_crc; // the value that sent back to the CRC register finally
}
A- 7
DVP- 50MC Ser ies Motion Contr oller O per ation Manual
Byte2 Read the start address of word registers in the High byte
A- 8
Appendix A Modbus Communication
A- 9
DVP- 50MC Ser ies Motion Contr oller O per ation Manual
A- 10
Appendix A Modbus Communication
Example
Write 16#0100 and 16#0200 to the addresses 16#0000 and 16#0001 in the motion controller
respectively via function code 16#10. 16#0000 and 16#0001 are Modbus addresses of %MW0
and %MW1 in the motion controller respectively.
Request message: 01 10 00 00 00 02 04 01 00 02 00 F3 33
Response message: 01 10 00 00 00 02 41 C8
Function code 16#01 reads multiple output bit register values
Data structure of a request message:
Byte NO. Name Byte
Byte0 Modbus ID Single byte
Byte1 Function code Single byte
Byte2 The start address of Controller’s bit registers to be High byte
Byte3 read Low byte
A_
Byte4 High byte
The number of Controller’s bit registers to be read
Byte5 Low byte
Byte6 Low byte of CRC check sum Low byte
Byte7 High byte of CRC check sum High byte
Data structure of a response message:
Byte NO. Name Byte
A- 11
DVP- 50MC Ser ies Motion Contr oller O per ation Manual
Byte3 Read the state value of the bit register. Single byte
… Read the state value of the bit register. Single byte
Byte n Read the state value of the bit register. Single byte
Byte n+1 Low byte of CRC check sum Low byte
Byte n+2 High byte of CRC check sum High byte
Data structure of an exception response message:
Byte NO. Name Byte
A- 12
Appendix A Modbus Communication
A by 8 produces B. If the quotient is an integer, the number of bytes of bit registers in the response
message is B. Otherwise the number of bytes will be B+ 1.
See the example below for details.
Example
Read the state value of %QX2.0~%QX3.4 in the motion controller via function code 02. The address
of %QX2.0 is 16#A010. Suppose %QX2.0~%QX2.7=1000 0001, %QX3.0~%QX3.4=1 0001.
Request message: 01 02 A0 10 00 0D 9A 0A
Response message: 01 02 02 81 11 19 E4
Function code 16#05 writes one single bit register value
Data structure of a request message:
Byte NO. Name Byte
Byte0 Modbus ID Single byte
A- 13
DVP- 50MC Ser ies Motion Contr oller O per ation Manual
Byte6 The number of bytes of bit registers where to write values Single byte
A- 14
Appendix A Modbus Communication
A- 15
DVP- 50MC Ser ies Motion Contr oller O per ation Manual
A- 16
B
Modbus TCP Communication
Table of Contents
B.1 Modbus TCP Message Structure ................................................. B-3
B.2 Modbus Function Codes Supported in Modbus TCP .................... B-3
B.3 Exception Response Code in Modbus TCP .................................. B-4
B.4 Modbus Function Codes in Modbus TCP ..................................... B-4
B.5 Registers and Corresponding Modbus Addresses ..................... B-13
B- 1
DVP-50MC Series Motion Controller Operation Manual
B 3 Rx+
Positive pole for receiving
data
4 Reserved Reserved
5 Reserved Reserved
Negative pole for receiving
6 Rx-
data
7 Reserved Reserved
8 Reserved Reserved
DVP1 5
M C1 T
DVP1 5
MC 1 1 T
1
3 4 4
1 2 3 4 5 6 7 8
2 2
5
2
Register no. and the corresponding register name in above figure are listed below.
Register
1 2 3 4 5
no.
Register Ethernet Communication
Concentrator the controller Computer
name master cable
Note:
Please use the shielded twisted-pair cable as Ethernet communication cable.
B- 2
Appendix B Modbus TCP Communication
Delta Ethernet equipment such as DVPEN01-SL, IFD9506, IFD9507 and the touch panel with
Ethernet port can be used as the master of an Ethernet network which contains the motion controller.
The equipment supplied from other vendors, which supports Modbus TCP protocol (and master
function) can serve as the master of the motion controller as well.
Function
Function Register
code
Read bit register value; maximum 256 bits of data could
16#02 %IX and %QX
be read at a time.
Read one single or multiple word register values;
16#03 %IW, %QW and %MW
maximum 100 words of data could be read at a time.
16#05 Write one single bit register value. % QX
16#06 Write one single word register value. %QW and %MW
Write multiple bit register values; maximum 256 bits of
16#0F % QX
data could be written at a time.
Write multiple word register values; maximum 100 words
16#10 %QW and %MW
of data could be written at a time.
B- 3
DVP-50MC Series Motion Controller Operation Manual
B- 4
Appendix B Modbus TCP Communication
… High byte
The content value in a word register
Byte n Low byte
Exception response message data structure:
Byte NO. Name Byte
Request message: 00 00 00 00 00 06 01 03 00 00 00 02
Response message: 00 00 00 00 00 07 01 03 04 01 00 02 00
Function code: 06 to write one single word register value
Request message data structure:
Byte NO. Name Byte
B- 5
DVP-50MC Series Motion Controller Operation Manual
B- 6
Appendix B Modbus TCP Communication
To write the value 16#0100 to the address 16#0000 in the motion controller via function code 06
Request message: 00 00 00 00 00 06 01 06 00 00 01 00
Response message: 00 00 00 00 00 06 01 06 00 00 01 00
Byte10 The number of word registers where to write values High byte
… High byte
The value written in a word register
Byte n Low byte
Response message data structure:
Byte NO. Name Byte
B- 7
DVP-50MC Series Motion Controller Operation Manual
Byte10 The number of word registers where to write values. High byte
Note:
How many bytes of data in a response message depend on the number of read register addresses
in the motion controller in the request message. So the value of n in Byte n in the response message
can be calculated through reading the number of register addresses in the motion controller.
Example
To write 16#0100 and 16#0200 to the addresses 16#0000 and 16#0001 in the motion controller via
function code 06.
16#0000 and 16#0001 are the Modbus addresses of %MW0 and %MW1 in the motion controller
respectively.
Request message: 00 00 00 00 00 0B 01 10 00 00 00 02 04 01 00 02 00
Response message: 00 00 00 00 00 06 01 10 00 00 00 02
Function code: 16#02 to read multiple bit register values
Request message data structure:
B- 8
Appendix B Modbus TCP Communication
Byte8 How many bytes for the read bit registers Single byte
Byte9 The status value of a bit register which is read Single byte
Byte n The status value of a bit register which is read Single byte
Exception response message data structure:
Byte NO. Name Byte
B- 9
DVP-50MC Series Motion Controller Operation Manual
Example
To read the state value of %QX2.0~%QX3.4 in the motion controller via function code 02.
16#A010 is the address of %QX2.0. Suppose that %QX2.0~%QX2.7=1000 0001
and %QX3.0~%QX3.4=10001.
Request message: 00 00 00 00 00 06 01 02 A0 10 00 0D
Response message: 00 00 00 00 00 06 01 02 02 81 11
B
Byte2 High byte
Protocol identifier
Byte3 Low byte
B- 10
Appendix B Modbus TCP Communication
B- 11
DVP-50MC Series Motion Controller Operation Manual
B- 12
Appendix B Modbus TCP Communication
Register
Register no. Explanation Address (hex) Attribute
name
I %IX0.0~%IX127.7 6000 ~ 63FF Read only
Bit register
Q %QX0.0~%QX127.7 A000 ~ A3FF Read/write
B- 13
DVP-50MC Series Motion Controller Operation Manual
MEMO
B- 14
C
CANopen Protocol
Table of Contents
C.1 Node States .............................................................................. C-4
C.2 Network Management (NMT) ................................................... C-6
C.3 PDO (Process Data Object) ....................................................... C-6
C.4 SDO (Service Data Object) ....................................................... C-8
C-1
DVP-50MC Series Motion Controller Operation Manual
The CAN (controller area network) fieldbus only defines the physical layer and data link layer. (See
ISO11898 standard.) It does not define the application layer. In the practical design, the physical
layer and the data link layer are realized by the hardware. The CAN fieldbus itself is not complete. It
needs the superior protocol to define the use of 11/29-bit identifier and 8-byte data.
The CANopen protocol is the CAN-based superior protocol. It is one of the protocols defined and
maintained by CiA (CAN-in-Automation). It is developed on the basis of the CAL (CAN application
layer) protocol, using a subset of the CAL communication and service protocols.
The CANopen protocol covers the application layer and the communication profile (CiA DS301). It
also covers a framework for programmable registers (CiA 302), the recommendations for cables and
connectors (CiA 303-1), and SI units and prefix representations (CiA 303-2).
In the OSI model, the relation between the CAN standard and the CANopen protocol is as follows.
Device profile CiA Device profile CiA Device profile CiA
DSP-401 DSP-404 DSP-xxx
OSI seventh layer
Communication profile CiA DS-301
Application layer
C
+ -
OSI first layer ISO 11898
Physical layer + -
CAN network
C-2
Appendix C CANopen Protocol
C-3
DVP-50MC Series Motion Controller Operation Manual
(1)
Initializing
(15)
Reset application
(16)
Reset communication
(11)
(2)
(14)
Pre-operational (7) (10)
(3) (4)
(5)
(13) Stopped
(6)
C (8)
(12) (9)
Operational
(1) After the power is supplied, the device automatically enters the initialization state.
(2) After the initialization is complete, the device automatically enters the Pre-operational state.
(3)(6) The remote node is started.
(4)(7) The device enters the Pre-operational state.
(5)(8) The remote node is stopped.
(9)(10)(11) The application layer is reset.
(12)(13)(14) The communication is reset.
(15) After the initializing is complete, the device automatically enters the “reset application” state.
(16) After the “reset application” state is complete, the device automatically enters the “reset
communication” state.
The relation between the communication object and the state is shown below. The communication
object service can be executed only in a proper state. For example, SDO can be executed only in the
operational state and in the pre-operational state.
C-4
Appendix C CANopen Protocol
The error control service is used to detect the disconnection of the node in the network. The error
control services can be classified into two types, Heartbeat and Node Guarding. The PLC only
supports Heartbeat. For example, the master can detect the disconnection of the slave only after the
slave enables the Heartbeat service.
The Heartbeat principle is illustrated as follows. The Heartbeat producer transmits the Heartbeat C_
message according to the Heartbeat producing time which is set. One or more Heartbeat consumers
detect the message transmitted by the Heartbeat producer. If the consumer does not receive the
message transmitted by the producer within the timeout period, the heartbeat event generated
indicates that the CANopen communication is abnormal.
C-5
DVP-50MC Series Motion Controller Operation Manual
Boot-up services
After the slave completes entering the pre-operational state, it will transmit a Boot-up message, which
C indicates the initializing is completed.
C-6
Appendix C CANopen Protocol
Include the COB-ID which will be used by PDO, transmission type, prohibition time and the cycle
of the counter.
The PDO mapping parameters:
Contain the object list in an object dictionary. These objects are mapped into the PDO, including
the data length (in bits). To explain the contents of the PDO, the producer and the consumer
have to understand the mapping.
The PDO transmission modes: synchronous and asynchronous
Synchronous: Synchronous periodic and synchronous non-periodic
Asynchronous: The PDO is transmitted when the data change, or it is transmitted after an event
trigger.
The transmission modes supported by PDO are as follows.
Type PDO transmission
Periodic Non-periodic Synchronous Asynchronous RTR
0 X X
1 – 240 X X
254 X
255 X
Mode 0: The PDO information is transmitted only when the PDO data change and the
synchronous signal comes.
Modes 1~240: One piece of PDO information is transmitted every 1~240 synchronous signals.
Mode 254: The event trigger transmission is defined the manufacturer. For the PLC, the definition
is the same as mode 255.
Mode 255: PDO is transmitted when the data change, or it is transmitted after an event trigger.
All the data in the PDO has to be mapped from the object dictionary. The following is an C_
example of the PDO mapping.
Application object B
PDO_1 Application object C Application object A
C-7
DVP-50MC Series Motion Controller Operation Manual
C-8
D
Explanation of Homing Modes
Table of Contents
D.1 Explanation of Homing Modes ................................................... D-2
D- 1
DVP-50MC Series Motion Controller Operation Manual
Mode 1 Homing which depends on the negative limit switch and Z pulse.
Circumstance 1: MC_Home instruction is executed when the negative limit switch is OFF and
the axis moves in the negative direction at the first-phase speed. The motion
direction changes and the axis moves at the second-phase speed when the
axis encounters that the negative limit switch is ON. Where the first Z pulse is
met is the home position when the negative limit switch is OFF.
Circumstance 2: MC_Home instruction is executed when the negative limit switch is ON and
the axis moves in the positive direction at the second-phase speed. Where the
first Z pulse is met is the home position when the negative limit switch is OFF.
St art point
Z pulse
Homing depending on the negative limit switch and Z pulse (: mode 1)
D Mode 2 Homing which depends on the positive limit switch and Z pulse
Circumstance 1: MC_Home instruction is executed when the positive limit switch is OFF and
the axis moves in the positive direction at the first-phase speed. The motion
direction changes and the axis moves at the second-phase speed when the
axis encounters that the positive limit switch is ON. Where the first Z pulse is
met is the home position while the positive limit switch is OFF.
Circumstance 2: MC_Home instruction is executed when the positive limit switch is ON and the
axis moves in the negative direction at the second-phase speed. Where the
first Z pulse is met is the home position while the positive limit switch is OFF.
D- 2
Appendix D Explanation of Homing Modes
Negativ e 2
direct io n
Z pulse
Po sitiv e limit
switc h
Homing depending on the positive limit switch and Z pulse (: mode 2)
Mode 3 and mode 4 Homing which depends on the home switch and Z pulse
Mode 3
Circumstance 1: When the home switch is OFF, MC_Home instruction is executed and the axis
moves in the positive direction at the first-phase speed. When the axis
encounters that the home switch is ON, the motion direction changes and the
axis moves at the second-phase speed. Where the first Z pulse is met is the
home position when the home switch is OFF.
Circumstance 2: When the home switch is ON, MC_Home instruction is executed and the axis
directly moves in the negative direction at the second-phase speed. Where the
first Z pulse is met is the home position while the home switch is OFF.
Mode 4
Circumstance 1: When the home switch is OFF, MC_Home instruction is executed and the axis
moves in the positive direction at the first-phase speed. The axis moves at the
second-phase speed when the axis encounters that the home switch is ON.
Where the first Z pulse is met is the home position.
Circumstance 2: When the home switch is ON, MC_Home instruction is executed and the axis
moves in the negative direction at the second-phase speed. When the axis
encounters that the home switch is OFF, the motion direction changes and the
D_
axis moves at the second-phase speed. Where the first Z pulse is met is the
home position.
D- 3
DVP-50MC Series Motion Controller Operation Manual
Negat ive 3
direction
Circumstance 2 Negat ive 3 St art point
direction
4 Positive
direction
Z p ulse
Home swit ch
Homing depending on the home switch and Z pulse (: mode 3; : mode 4)
Mode 5 and mode 6 Homing which depends on the home switch and Z pulse
Mode 5
Circumstance 1: When the home switch is ON, MC_Home instruction is executed and the axis
moves in the positive direction at the second-phase speed. Where the first Z
pulse is met is the home position while the home switch is OFF.
Circumstance 2: When the home switch is OFF, MC_Home instruction is executed and the axis
moves in the negative direction at the first-phase speed. When the home
switch is ON, the motion direction changes and the axis moves at the second-
phase speed. Where the first Z pulse is met is the home position when the
home switch is OFF.
Mode 6
Circumstance 1: When the home switch is ON, MC_Home instruction is executed and the axis
D
moves in the positive direction at the second-phase speed. When the home
switch is OFF, the motion direction changes and the axis moves at the second-
phase speed. Where the first Z pulse is met is the home position.
Circumstance 2: When the home switch is OFF, MC_Home instruction is executed and the axis
moves in the negative direction at the first-phase speed. While the home
switch is ON, the axis moves at the second-phase speed and where the first
Z pulse is met is the home position.
D- 4
Appendix D Explanation of Homing Modes
Z puls e
Home s witc h
Homing depending on the home switch and Z pulse (: mode 5, : mode 6)
Mode 7~ mode 10 Homing which depending on the home switch, positive limit switch and Z pulse
Mode 7
Circumstance 1: When the home switch is OFF, MC_Home instruction is executed and the axis
moves in the positive direction at the first-phase speed. The motion direction
changes and the axis moves at the second-phase speed when the home
switch is ON. Where the first Z pulse is met is the home position when the
home switch is OFF.
Circumstance 2: When the home switch is ON, MC_Home instruction is executed and the axis
moves in the negative direction at the second-phase speed. Where the first Z
pulse is met is the home position when the home switch is OFF.
Circumstance 3: When the home switch is OFF, MC_Home instruction is executed and the axis
moves in the positive direction at the first-phase speed. The motion direction D_
changes and the axis moves at the first-phase speed when the home switch
is OFF and the positive limit switch is ON. The axis starts to move at the
second-phase speed when the home switch is ON. Where the first Z pulse is
met is the home position when the home switch is OFF.
D- 5
DVP-50MC Series Motion Controller Operation Manual
Nega tive 7
direc tion
Ne gativ e
7
dire ct io n
Z pu ls e
Home s witc h
Homing depending on the home switch, positive limit switch and Z pulse (: mode 7)
Mode 8
Circumstance 1: When the home switch is OFF, MC_Home instruction is executed and the axis
moves in the positive direction at the first-phase speed. The axis moves at the
second-phase speed when the home switch is ON and where the first Z pulse
is met is the home position.
Circumstance 2: MC_Home instruction is executed and the axis moves in the negative direction
D at the second-phase speed when the home switch is ON. The motion direction
changes and the axis moves at the second-phase speed when the home
switch is OFF. And where the first Z pulse is met is the home position.
Circumstance 3: When the home switch is OFF, MC_Home instruction is executed and the axis
moves in the positive direction at the first-phase speed. The motion direction
changes and the axis moves at the first-phase speed when the home switch
is OFF and the positive limit switch is ON. The axis still moves at the first-
phase speed when the home switch is ON. The motion direction changes and
the axis moves at the first-phase speed when the home switch is OFF. The
axis moves at the second-phase speed and where the first Z pulse is met is
the home position when the home switch is ON.
D- 6
Appendix D Explanation of Homing Modes
8 P os it iv e dire ct ion
Z puls e
Home s wit ch
Homing depending on the home switch, positive limit switch and Z pulse (: mode 8)
Mode 9
Circumstance 1: MC_Home instruction is executed and the axis moves in the positive direction
at the first-phase speed when the home switch is OFF. The axis moves at the
second-phase speed when the home switch is ON. The motion direction
changes and the axis moves at the second-phase speed when the home
switch is OFF. And where the first Z pulse is met is the home position.
Circumstance 2: When the home switch is ON MC_Home instruction is executed and the axis D_
moves in the positive direction at the second-phase speed. The motion
direction changes and the axis moves at the second-phase speed when the
home switch is OFF. And where the first Z pulse is met is the home position.
Circumstance 3: MC_Home instruction is executed and the axis moves in the positive direction
at the first-phase speed when the home switch is OFF. The motion direction
changes and the axis moves at the first-phase speed when the home switch
is OFF and the positive limit switch is ON. The axis moves at the second-
phase speed and where the first Z pulse is met is the home position when the
home switch is ON.
D- 7
DVP-50MC Series Motion Controller Operation Manual
Negat ive 9
direction
Circumstance 2 Start
point
Negat ive 9
direction
Sta rt
Circumstance 3 point
Negat ive 9
direction
Z pulse
Home switch
Homing depending on the home switch, positive limit switch and Z pulse (: mode 9)
Mode 10
Circumstance 1: MC_Home instruction is executed and the axis moves in the positive direction
at the first-phase speed when the home switch is OFF. The axis moves at the
second-phase speed when the home switch is ON. And where the first Z pulse
is met is the home position while the home switch is OFF.
D Circumstance 2: MC_Home instruction is executed and the axis moves in the positive direction
at the second-phase speed when the home switch is ON. And where the first
Z pulse is met is the home position while the home switch is OFF.
Circumstance 3: MC_Home instruction is executed and the axis moves in the positive direction
at the first-phase speed when the home switch is OFF. The motion direction
changes and the axis moves at the first-phase speed when the home switch
is OFF and the positive limit switch is ON. The motion direction changes again
and the axis moves at the second-phase speed when the home switch is ON.
Where the first Z pulse is met is the home position while the home switch is
OFF.
D- 8
Appendix D Explanation of Homing Modes
10 P osit iv e direct io n
Z puls e
Ho me s wit ch
Homing depending on the home switch, positive limit switch and Z pulse (: mode 10)
Mode 11~ mode 14 Homing which depends on the home switch, negative limit switch and Z pulse
Mode 11
Circumstance 1: MC_Home instruction is executed and the axis moves in the negative direction
at the first-phase speed when the home switch is OFF. The motion direction
changes and the axis moves at the second-phase speed when the home
switch is ON. And where the first Z pulse is met is the home position while the D_
home switch is OFF.
Circumstance 2: MC_Home instruction is executed and the axis moves in the positive direction
at the second-phase speed while the home switch is ON. And where the first
Z pulse is met is the home position while the home switch is OFF.
Circumstance 3: MC_Home instruction is executed and the axis moves in the negative direction
at the first-phase speed while the home switch is OFF. The motion direction
changes and the axis moves at the first-phase speed while the home switch is
OFF and the negative limit switch is ON. The axis moves at the second-phase
speed when the home switch is ON. Where the first Z pulse is met is the home
position while the home switch is OFF.
D- 9
DVP-50MC Series Motion Controller Operation Manual
St art point
Circ umst anc e 1
St art
Circ umst anc e 3 point
Z pulse
Home s wit ch
Homing depending on the home switch, negative limit switch and Z pulse (○
11: mode 11)
Mode 12
Circumstance 1: MC_Home instruction is executed and the axis moves in the negative direction
at the first-phase speed when the home switch is OFF. The axis moves at the
second-phase speed when the home switch is ON. And where the first Z pulse
is met is the home position.
Circumstance 2: MC_Home instruction is executed and the axis moves in the positive direction
at the second-phase speed while the home switch is ON. The motion direction
D changes and the axis moves at the second-phase speed while the home
switch is OFF. And where the first Z pulse is met is the home position.
Circumstance 3: MC_Home instruction is executed and the axis moves in the negative direction
at the first-phase speed while the home switch is OFF. The motion direction
changes and the axis moves at the first-phase speed while the home switch is
OFF and the negative limit switch is ON. The axis still moves at the first-phase
speed when the home switch is ON. The motion direction changes and the
axis moves at the first-phase speed while the home switch is OFF. The axis
moves at the second-phase speed while the home switch is ON. And where
the first Z pulse is met is the home position.
D- 1 0
Appendix D Explanation of Homing Modes
Neg ative 12
d irec tion
Negat iv e 12
direc tion
Z pulse
Home
s wit ch
Nega tive
limit s wit ch
Homing depending on the home switch, negative limit switch and Z pulse (○
12: mode 12)
Mode 13
Circumstance 1: MC_Home instruction is executed and the axis moves in the negative direction
at the first-phase speed while the home switch is OFF. The axis moves at the
second-phase speed while the home switch is ON. The motion direction
changes and the axis moves at the second-phase speed while the home
switch is OFF. And where the first Z pulse is met is the home position.
D_
Circumstance 2: MC_Home instruction is executed and the axis moves in the negative direction
at the second-phase speed while the home switch is ON. The motion direction
changes and the axis moves at the second-phase speed while the home
switch is OFF. And where the first Z pulse is met is the home position.
Circumstance 3: MC_Home instruction is executed and the axis moves in the negative direction
at the first-phase speed while the home switch is OFF. The motion direction
changes and the axis moves at the first-phase speed while the home switch is
OFF and the negative limit switch is ON. The axis moves at the second-phase
speed and where the first Z pulse is met is the home position when the home
switch is ON.
D- 11
DVP-50MC Series Motion Controller Operation Manual
13 Positive direction
Circumstan ce 3 St art
point
13 Positive direction
Z pulse
Home
swit ch
Nega tive
limit swit ch
Homing depending on the home switch, negative limit switch and Z pulse (○
13: mode 13)
Mode 14
Circumstance 1: MC_Home instruction is executed and the axis moves in the negative direction
at the first-phase speed while the home switch is OFF. The axis moves at the
D second-phase speed once the home switch is ON. And where the first Z pulse
is met is the home position while the home switch is OFF.
Circumstance 2: MC_Home instruction is executed and the axis moves in the negative direction
at the second-phase speed while the home switch is ON. Where the first Z
pulse is met is the home position while the home switch is OFF.
Circumstance 3: MC_Home instruction is executed and the axis moves in the negative direction
at the first-phase speed while the home switch is OFF. The motion direction
changes and the axis moves at the first-phase speed while the home switch is
OFF and the negative limit switch is ON. The motion direction changes again
and the axis moves at the second-phase speed when the home switch is ON.
Where the first Z pulse is met is the home position while the home switch is
OFF.
D- 1 2
Appendix D Explanation of Homing Modes
Circumstan ce 3 S tart
po in t
Negat ive 14
direct ion
Z pulse
Home
swit ch
Nega tive
limit swit ch
Homing depending on the home switch, negative limit switch and Z pulse (○
14: mode 14)
D- 1 3
DVP-50MC Series Motion Controller Operation Manual
Negat ive
limit s wit ch
○
Homing depending on the negative limit switch (17: mode 17)
Circums tan ce 1
Start point
P ositiv e
limit swit ch
○
Homing depending on the positive limit switch (18: mode 18)
D- 1 4
Appendix D Explanation of Homing Modes
Mode 19
Circumstance 1: MC_Home instruction is executed and the axis moves in the positive direction
at the first-phase speed while the home switch is OFF. The motion direction
changes and the axis moves at the second-phase speed once the home switch
becomes ON. And where the axis stands is the home position at the moment
the home switch becomes OFF.
Circumstance 2: MC_Home instruction is executed and the axis directly moves in the negative
direction at the second-phase speed while the home switch is ON. And where
the axis stands is the home position at the moment when the home switch
becomes OFF.
St art
Circumst ance 1 point
Nega tive 19
direction
Home swit ch
Mode 20
Circumstance 1: MC_Home instruction is executed when the home switch is OFF and the axis
moves in the positive direction at the first-phase speed. Where the servo is is
the home position when the home switch is ON.
Circumstance 2: MC_Home instruction is executed when the home switch is ON and the axis
moves in the negative direction at the second-phase speed. The motion
direction changes and the axis moves at the second-phase speed when the
home switch becomes OFF. Where the servo is is the home position when the
home switch is ON.
D_
Start
Circ umstanc e 1 poi nt
Negative 20
19
direction
Home s witch
○
Homing depending on the home switch (20: mode 20)
Mode 21
D- 1 5
DVP-50MC Series Motion Controller Operation Manual
Circumstance 1: MC_Home instruction is executed and the axis moves in the negative direction
at the first-phase speed while the home switch is OFF. The motion direction
changes and the axis moves at the second-phase speed once the home switch
becomes ON. And where the axis stands is the home position at the moment
the home switch becomes OFF.
Circumstance 2: MC_Home instruction is executed and the axis moves in the positive direction
at the second-phase speed while the home switch is ON. And where the axis
stands is the home position at the moment the home switch becomes OFF.
Sta rt
Circ ums tanc e 1 point
21 Pos it ive direct ion
Home switc h
Mode 22
Circumstance 1: MC_Home instruction is executed while the home switch is ON and the axis
moves in the positive direction at the second-phase speed. The motion
direction changes and the axis moves at the second-phase speed once the
home switch becomes OFF. Where the axis stands is the home position when
the home switch is ON.
Circumstance 2: MC_Home instruction is executed while the home switch is OFF and the axis
moves in the negative direction at the first-phase speed. Where the axis stands
is the home position when the home switch becomes ON.
D
Start
Cir cums tanc e 1
poi nt
21
22 Pos iti ve di rection
Home switc h
○
Homing depending on the home switch ( 22: mode 22)
Mode 23
Circumstance 1: MC_Home instruction is executed while the home switch is OFF and the axis
moves in the positive direction at the first-phase speed. The motion direction
changes and the axis moves at the second-phase speed once the home switch
D- 1 6
Appendix D Explanation of Homing Modes
becomes ON. Where the axis stands is the home position when the home
switch is OFF.
Circumstance 2: MC_Home instruction is executed while the home switch is ON and the axis
moves in the negative direction at the second-phase speed. And where the
axis stands is the home position when the home switch becomes OFF.
Circumstance 3: MC_Home instruction is executed while the home switch is OFF. The axis
moves in the positive direction at the first-phase speed. The motion direction
changes and the axis moves at the first-phase speed when the home switch
is OFF and the positive limit switch is ON. When the home switch is ON, the
axis starts to move at the second-phase speed. Where the axis stands is the
home position when the home switch is OFF.
S tart point
Circumst ance 3
Ho me
switch
Posit ive
limit switch
○
Homing depending on the home switch and positive limit switch (23: mode 23)
D_
Mode 24
Circumstance 1: MC_Home instruction is executed while the home switch is OFF and the axis
starts to move in the positive direction at the first-phase speed. Where the axis
stands is the home position when the home switch is ON.
Circumstance 2: MC_Home instruction is executed while the home switch is ON and the axis
moves in the negative direction at the second-phase speed. The motion
direction changes and the axis moves at the second-phase speed when the
home switch is OFF. Where the axis stands is the home position when the
home switch is ON.
Circumstance 3: MC_Home instruction is executed while the home switch is OFF. The axis
moves in the positive direction at the first-phase speed. The motion direction
changes and the axis moves at the first-phase speed when the home switch
is OFF and the positive limit switch is ON. When the home switch is ON, the
axis still moves at the first-phase speed. The motion direction changes and the
axis moves at the first-phase speed when the home switch is OFF. Where the
axis stands is the home position when the home switch is ON.
D- 1 7
DVP-50MC Series Motion Controller Operation Manual
S ta rt p oin t
Circ u mst a nc e 3
Ho me
sw itc h
Po sit ive
li m it sw it ch
○
Homing depending on the home switch and positive limit switch (24: mode 24)
Mode 25
Circumstance 1: MC_Home instruction is executed while the home switch is OFF and the axis
starts to move in the positive direction at the first-phase speed. The axis moves
at the second-phase speed when the home switch is ON. The motion direction
changes and the axis moves at the second-phase speed when the home
switch is OFF. Where the axis stands is the home position when the home
switch is ON.
Circumstance 2: MC_Home instruction is executed while the home switch is ON and the axis
moves in the positive direction at the second-phase speed. The motion
D
direction changes and the axis moves at the second-phase speed when the
home switch is OFF. Where the axis stands is the home position when the
home switch is ON.
Circumstance 3: MC_Home instruction is executed while the home switch is OFF. The axis
moves in the positive direction at the first-phase speed. The motion direction
changes and the axis moves at the first-phase speed when the home switch
is OFF and the positive limit switch is ON. Where the axis stands is the home
position when the home switch is ON.
D- 1 8
Appendix D Explanation of Homing Modes
Circ um st a nc e 1 P os it ive
Sta rt po in t 25
26
d ire c tio n
P os it ive
Circ um st a nc e 2 St art p oi nt 25
26
d ire c tio n
C ircum s ta n ce 3 St a rt p oin t
26 P osit iv e
25
d irec tio n
H om e
sw i tch
Po sit ive
li m it sw i tch
Homing depending on the home switch and positive limit switch (25: mode 25) ○
Mode 26
Circumstance 1: MC_Home instruction is executed while the home switch is OFF and the axis
starts to move in the positive direction at the first-phase speed. The axis moves
at the second-phase speed when the home switch is ON. Where the axis
stands is the home position when the home switch is OFF.
Circumstance 2: MC_Home instruction is executed while the home switch is ON and the axis
moves in the positive direction at the second-phase speed. Where the axis
stands is the home position when the home switch is OFF.
Circumstance 3: MC_Home instruction is executed while the home switch is OFF. The axis
moves in the positive direction at the first-phase speed. The motion direction
changes and the axis moves at the first-phase speed when the home switch D_
is OFF and the positive limit switch is ON. The motion direction changes again
and the axis moves at the second-phase speed when the home switch is ON.
Where the axis stands is the home position when the home switch is OFF.
D- 1 9
DVP-50MC Series Motion Controller Operation Manual
26 Pos itiv e
Circ umst anc e 2 Start point direc tion
26 P osit iv e
d irec tion
Home
s witc h
Pos it ive
limit switc h
○
Homing depending on the home switch and positive limit switch (26: mode 26)
Mode 27
Circumstance 1: MC_Home instruction is executed while the home switch is OFF and the axis
starts to move in the negative direction at the first-phase speed. The motion
direction changes and the axis moves at the second-phase speed when the
home switch is ON. Where the axis stands is the home position when the home
switch is OFF.
Circumstance 2: MC_Home instruction is executed while the home switch is ON and the axis
moves in the positive direction at the second-phase speed. Where the axis
D
stands is the home position when the home switch is OFF.
Circumstance 3: MC_Home instruction is executed while the home switch is OFF. The axis
moves in the negative direction at the first-phase speed. The motion direction
changes and the axis moves at the first-phase speed when the home switch
is OFF and the negative limit switch is ON. When the home switch is ON, the
axis starts to move at the second-phase speed. Where the axis stands is the
home position when the home switch is OFF.
D- 2 0
Appendix D Explanation of Homing Modes
27 Positive direction
27 Positive direction
Home
swit ch
Negat ive
limit swit ch
○
Homing depending on the home switch and negative limit switch (27: mode 27)
Mode 28
Circumstance 1: MC_Home instruction is executed while the home switch is OFF and the axis
starts to move in the negative direction at the first-phase speed. Where the
axis stands is the home position when the home switch is ON.
Circumstance 2: MC_Home instruction is executed while the home switch is ON and the axis
moves in the positive direction at the second-phase speed. The motion
direction changes and the axis moves at the second-phase speed when the
home switch is OFF. Where the axis stands is the home position when the
home switch is ON.
Circumstance 3: MC_Home instruction is executed while the home switch is OFF. The axis
moves in the negative direction at the first-phase speed. The motion direction
changes and the axis moves at the first-phase speed when the home switch D_
is OFF and the negative limit switch is ON. When the home switch is ON, the
axis still moves at the first-phase speed. The motion direction changes and the
axis moves at the first-phase speed when the home switch is OFF. Where the
axis stands is the home position when the home switch is ON.
D- 2 1
DVP-50MC Series Motion Controller Operation Manual
27
28 Pos iti ve di rec tion
27
28 Pos iti ve di rec tion
Home
switch
Negative
limit s witch
○
Homing depending on the home switch and negative limit switch (28: mode 28)
Mode 29
Circumstance 1: MC_Home instruction is executed while the home switch is OFF and the axis
starts to move in the negative direction at the first-phase speed. When the
home switch is ON, the axis starts to move at the second-phase speed. The
motion direction changes and the axis moves at the second-phase speed
when the home switch is OFF. Where the axis stands is the home position
when the home switch is ON.
Circumstance 2: MC_Home instruction is executed while the home switch is ON and the axis
moves in the negative direction at the second-phase speed. The motion
direction changes and the axis moves at the second-phase speed when the
home switch is OFF. Where the axis stands is the home position when the
home switch is ON.
D Circumstance 3: MC_Home instruction is executed while the home switch is OFF. The axis
moves in the negative direction at the first-phase speed. The motion direction
changes and the axis moves at the first-phase speed when the home switch
is OFF and the negative limit switch is ON. Where the axis stands is the home
position when the home switch is ON.
D- 2 2
Appendix D Explanation of Homing Modes
Negative 30 Start
Circumstance 1 29
direction point
Circumstance 2 Negative 30
29 Start
direction poi nt
Start
Circums tance 3 po in t
Negative 29
30
dir ectio n
Home
switch
Negati ve
limit switch
○
Homing depending on the home switch and negative limit switch (29: mode 29)
Mode 30
Circumstance 1: MC_Home instruction is executed while the home switch is OFF and the axis
starts to move in the negative direction at the first-phase speed. When the
home switch is ON, the axis starts to move at the second-phase speed. Where
the axis stands is the home position when the home switch is OFF.
Circumstance 2: MC_Home instruction is executed while the home switch is ON and the axis
moves in the negative direction at the second-phase speed. Where the axis
stands is the home position when the home switch is OFF.
Circumstance 3: MC_Home instruction is executed while the home switch is OFF. The axis D_
moves in the negative direction at the first-phase speed. The motion direction
changes and the axis moves at the first-phase speed when the home switch
is OFF and the negative limit switch is ON. When the home switch is ON, the
motion direction changes again and the axis moves at the second-phase
speed. Where the axis stands is the home position when the home switch is
OFF.
D- 2 3
DVP-50MC Series Motion Controller Operation Manual
Negat iv e St art
Circu mst ance 1 30
direc tion point
St art
Circums ta nce 3 po in t
Negativ e
30
direct io n
Home
s wit ch
Nega tive
limit swit ch
○
Homing depending on the home switch and negative limit switch (30: mode 30)
D
33
34
Z p u lse
D- 2 4
E
List of Accessories
Table of Contents
E.1 Accessories for EtherCAT Communication ................................. E-2
E.2 Accessories for CANopen Communication .................................. E-3
E.3 Accessories for PROFIBUS DP Communication .......................... E-6
E.4 Accessories for DeviceNet Communication ................................ E-7
E-1
DVP-50MC Series Motion Controller Operation Manual
E-2
Appendix E. List of Accessories
Notes:
1. The maximum cable length for purchase is 305M per reel and mimimum length is 1M with metre as
the unit.
2. UC-DN01Z-01A and UC-DN01Z-02A can be used as the main-line cable as well as the branch-line
cable. The maximum communication distances that they support are different.
The maximum communication distances the two cables support at different CANopen transmission
speed are displayed as follows.
CANopen transmission speed(bit/s) 125K 250K 500K 1M
Max. communication distance for UC-
500 250 100 40
DN01Z-01A(m)
Max. communication distance for UC-
100 100 100 40
DN01Z-02A(m)
E
3. The maximum communication distance at a transmission speed is regulated in the CANopen
protocol. The relationships between maximum communication distances and transmission speeds
are shown in the following table.
Transmission speed
10K 20K 50K 125K 250K 500K 800K 1M
(bit/s)
Max. communication
5000 2500 1000 500 250 100 50 40
distance(m)
E-3
DVP-50MC Series Motion Controller Operation Manual
Distribution box
Model Circuit figure
V+ V+
Thick Cable
Thick Cable
H H
TB2
TB1
S S
L L
V- V-
TAP-CN01
121Ώ
V- L S H V+
TB3
Thin Cable
TB1 TB2
V- L S H V+ V- L S H V+
121Ώ
V+ V+ V+
TAP-CN02
H H H
S S S
L L L
V- V- V-
V+ V+
H H
TB 1
TB 2
S S
L L
Th ic k C ab le
Th ic k C ab le
V- V-
E
12 1Ω
TAP-CN03
8 76 5 4 3 2 1 8765 43 21 8765 43 2 1
Terminal resistor
E-4
Appendix E. List of Accessories
As suggested in the CANopen protocol, the two ends of the CANopen communication cable should
connect a terminal resistor of 120Ω (1/4W) respectively in order to match the impedance of the
communication signal and reduce the signal reflection interference in normal signal transmission.
The terminal resistor connected to the start of the cable:
The terminal resistor on the distribution box can be used just by setting the terminal resistor switch
to ON.
The terminal resistor connected to the terminal end of the cable:
A terminal resistor TAP-TR01 is needed for connecting to the other end of the cable.
The model of a terminal resistor: TAP-TR01, resistance value: 120Ω (1/4W) as shown below
TAP-TR01
E-5
DVP-50MC Series Motion Controller Operation Manual
○1 ○2 ○3
Model
Cable
Model Length Diameter
UC-PF01Z-01A 305M 1PR #22 AWG FRFPE FRPE
Note:
The maximum cable length for purchase is 305M per reel and mimimum length is 1M with Metre as the unit.
E-6
Appendix E. List of Accessories
Notes:
1. The maximum cable length for purchase is 305M per reel and mimimum length is 1M with metre as
the unit.
2. UC-DN01Z-01A and UC-DN01Z-02A can be used as the main-line cable as well as the branch-line
cable. The maximum communication distances that they support are different.
The maximum communication distances the two cables support at different DeviceNet transmission
speed are displayed as follows.
DeviceNet transmission speed(bit/s) 125K 250K 500K
Max. communication distance for UC-
500 250 100
DN01Z-01A(m)
Max. communication distance for UC-
100 100 100
DN01Z-02A(m)
E-7
DVP-50MC Series Motion Controller Operation Manual
Distribution box
Model Circuit figure
V+ V+
Thick Cable
Thick Cable
H H
TB2
TB1
S S
L L
V- V-
TAP-CN01
121Ώ
V- L S H V+
TB3
Thin Cable
TB1 TB2
V- L S H V+ V- L S H V+
121Ώ
V+ V+ V+
TAP-CN02
H H H
S S S
L L L
V- V- V-
V- V-
Thick/Thin Cable
E
Thick/Ttin C able
L L
TB1
TB2
S S
TAP-CP01
H H
(Power V+ V+
box )
121
V+ V- S
J1
E-8
Appendix E. List of Accessories
Terminal resistor
As required in the DeviceNet protocol, the two ends of the DeviceNet communication cable should
connect a terminal resistor of 120Ω (1/4W) respectively.
1. The terminal resistor connected to the start of the cable:
The terminal resistor on the distribution box can be used by setting the terminal resistor switch to ON.
2. The terminal resistor connected to the terminal end of the cable:
A terminal resistor of 120Ω (1/4W) is needed for connecting to the terminal end of the cable.
E-9
DVP-50MC Series Motion Controller Operation Manual
MEMO
E-10