0% found this document useful (0 votes)
56 views1,081 pages

PLC Dvp50mc

Uploaded by

nariman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
56 views1,081 pages

PLC Dvp50mc

Uploaded by

nariman
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 1081

DVP-50MC Series Motion Controller Operation Manual

Industrial Automation Headquarters


Delta Electronics, Inc.
Taoyuan Technology Center
No.18, Xinglong Rd., Taoyuan City,
Taoyuan County 33068, Taiwan
TEL: 886-3-362-6301 / FAX: 886-3-371-6301

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

Delta Greentech (China) Co., Ltd.


238 Min-Xia Road, Pudong District,
ShangHai, P.R.C. 201209
TEL: 86-21-58635678 / FAX: 86-21-58630003

Delta Electronics (Japan), Inc.


Tokyo Office
2-1-14 Minato-ku Shibadaimon,
Tokyo 105-0012, Japan
TEL: 81-3-5733-1111 / FAX: 81-3-5733-1211

Delta Electronics (Korea), Inc.


1511, Byucksan Digital Valley 6-cha, Gasan-dong,

DVP-50MC Series
Geumcheon-gu, Seoul, Korea, 153-704
TEL: 82-2-515-5303 / FAX: 82-2-515-5302

Delta Electronics Int’l (S) Pte Ltd.

Motion Controller
4 Kaki Bukit Ave 1, #05-05, Singapore 417939
TEL: 65-6747-5155 / FAX: 65-6744-9228

Delta Electronics (India) Pvt. Ltd.

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

Delta Greentech (Brasil) S.A.


Sao Paulo Office
Rua Itapeva, 26 - 3° andar Edificio Itapeva One-Bela Vista
01332-000-São Paulo-SP-Brazil
TEL: 55 11 3568-3855 / FAX: 55 11 3568-3865

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

1.1 Explanation of Symbols in This Manual .................................................. 1-2

1.2 Revision History..................................................................................... 1-2

Chapter 2 Overview

2.1 Product Description ............................................................................... 2-2

2.2 Functions ............................................................................................... 2-2

2.3 Profile and Components ......................................................................... 2-3

Chapter 3 Specifications

3.1 Functional Specifications ....................................................................... 3-2


3.1.1 Specifications ..................................................................................... 3-2
3.1.2 Devices and Data Types ....................................................................... 3-3
3.1.2.1 Devices ....................................................................................... 3-3
3.1.2.2 Valid Ranges of Devices ................................................................. 3-4
3.1.2.3 Latched Devices ............................................................................ 3-5
3.1.2.4 Data Types and Valid Ranges Supported .......................................... 3-5

3.2 Electrical Specifications ......................................................................... 3-7

Chapter 4 System Constitution

4.1 System Constitution .............................................................................. 4-2

4.2 Introduction to EtherCAT Fieldbus ......................................................... 4-3


4.2.1 Features of EtherCAT Fieldbus .............................................................. 4-3
4.2.2 EtherCAT Communication between the Controller and Slaves ................... 4-3
4.2.3 Initialization of EtherCAT Network ......................................................... 4-4
4.2.4 How to handle the Mismatch between EtherCAT Configuration and Actually
Connected Devices in Quantity ...................................................................... 4-4
4.2.5 EtherCAT Slave Offline and Recovery Mechanism .................................... 4-5
4.2.6 Servos Connectable to EtherCAT Port ..................................................... 4-5

4.3 Power Supply ......................................................................................... 4-7

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

4.5 Right-side Extension .............................................................................. 4-8


4.5.1 Connectable Right-side Extension Modules ............................................. 4-8
4.5.2 Allocation of Right-side Extension Module Addresses ............................... 4-8

4.6 SD Memory Card .................................................................................... 4-9


4.6.1 Model and Specification ....................................................................... 4-9

Chapter 5 Installation

5.1 Dimensions ............................................................................................ 5-2


5.1.1 Profile and Dimensions ........................................................................ 5-2
5.1.2 Dimensions of Left-side and Right-side Extension Modules ....................... 5-2
5.1.3 Connecting to the Left-side Extension Module ......................................... 5-3
5.1.4 Connecting to the Right-side Extension Module ....................................... 5-4
5.1.5 SD Card Installing and Removing .......................................................... 5-5

5.2 Installing the Module in the Control Cabinet.......................................... 5-7


5.2.1 Installing the Module to DIN rail ........................................................... 5-7
5.2.2 Illustration of Installation Inside the Control Cabinet ............................... 5-7
5.2.3 Environmental Temperature in the Control Cabinet .................................. 5-8
5.2.4 Measures for Anti-interference .............................................................. 5-8
5.2.5 Dimension Requirement in the Control Cabinet ....................................... 5-8

Chapter 6 Wiring, Communication Setting and Network Construction

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
6.2.3.1 Output Point Wiring for DVP50MC11T and DVP50MC11T-06................ 6-9
6.2.3.2 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

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

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.8.3 Network Connection of EtherCAT Communication Port ........................... 6-21
6.8.4 EtherCAT Communication Distance ...................................................... 6-21

6.9 CANopen Communication Port ............................................................. 6-22


6.9.1 Function that CANopen Communication Ports Support ........................... 6-22
6.9.2 Pins of CANopen Communication Port .................................................. 6-23
6.9.3 PDO Mapping at CANopen Communication Port ..................................... 6-23
6.9.4 Network Connection at CANopen Communication Port ........................... 6-23
6.9.5 CANopen Communication Rate and Communication Distance .................. 6-24

Chapter 7 Execution Principle

7.1 Tasks ................................................................................................. 7-2


7.1.1 Task Types .................................................................................... 7-2
7.1.2 Priority levels of Tasks .................................................................... 7-4
7.1.3 Watchdog for a Task ....................................................................... 7-6
7.1.4 Motion and Communication Instructions for Each Task Type................. 7-7

7.2 The Impact of PLC RUN or STOP on Variables and Devices .............. 7-10

7.3 Synchronization Cycle Period Setting .............................................. 7-10

iii
Chapter 8 Logic Instructions

8.1 Table 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.9 Math Instructions ............................................................................ 8-61

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

8.10 Bit String Instructions ................................................................... 8-118


8.10.1 AND .......................................................................................... 8-118
8.10.2 OR ............................................................................................ 8-121
8.10.3 NOT .......................................................................................... 8-124
8.10.4 XOR .......................................................................................... 8-126
8.10.5 XORN ........................................................................................ 8-129

8.11 Shift Instructions........................................................................... 8-132


8.11.1 SHL ........................................................................................... 8-132
8.11.2 SHR .......................................................................................... 8-134
8.11.3 ROL ........................................................................................... 8-136
8.11.4 ROR .......................................................................................... 8-138

8.12 Selection Instructions.................................................................... 8-140


8.12.1 MAX .......................................................................................... 8-140
8.12.2 MIN ........................................................................................... 8-142
8.12.3 SEL ........................................................................................... 8-144

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

8.13 Data Type Conversion Instructions ................................................ 8-154


8.13.1 BOOL_TO_*** ............................................................................ 8-154
8.13.2 Bit strings_TO_*** ..................................................................... 8-157
8.13.3 Integers_TO_*** ........................................................................ 8-164
8.13.4 Real numbers_TO_*** ................................................................ 8-173
8.13.5 Times,dates_TO_*** ................................................................... 8-176
8.13.6 Strings_TO_***.......................................................................... 8-178

8.14 Communication Instructions ......................................................... 8-181


8.14.1 CANopen Communication Instructions ........................................... 8-181
8.14.1.1 DMC_ReadParameter_CANopen ................................................. 8-181
8.14.1.2 DMC_WriteParameter_CANopen ................................................. 8-186
8.14.2 Ethernet Instructions................................................................... 8-191
8.14.2.1 ETH_Link_Config...................................................................... 8-191
8.14.2.2 ETH_Link_Manage .................................................................... 8-196
8.14.2.3 ETH_Link_Status...................................................................... 8-198
8.14.2.4 MODBUS TCP Data Exchange Example ........................................ 8-201
8.14.2.5 ETH_Link_Config_Ext ............................................................... 8-207
8.14.2.6 ETH_ SetServerlinkkeeptime ..................................................... 8-209
8.14.2.7 ETH_Socket_Manage ................................................................ 8-210
8.14.2.8 ETH_Socket_Config .................................................................. 8-213
8.14.2.9 ETH_Socket_Open ................................................................... 8-216
8.14.2.10 ETH_Socket_Send .................................................................. 8-218
8.14.2.11 ETH_Socket_Receive .............................................................. 8-222
8.14.2.12 ETH_Socket_Close.................................................................. 8-226
8.14.2.13 ETH_Socket_Status ................................................................ 8-228
8.14.2.14 Ehternet Free Protocol Example ............................................... 8-231
8.14.3 RS485 Communication Instructions ............................................... 8-236
8.14.3.1 RS485_Link_Config .................................................................. 8-236
8.14.3.2 RS485_Link_Manage ................................................................ 8-241
8.14.3.3 RS485_Link_Status .................................................................. 8-243
8.14.3.4 RS485 Data Exchange Example ................................................. 8-246
8.14.3.5 RS485_RS............................................................................... 8-249
8.14.3.6 RS485 Free Protocol Example .................................................... 8-255
8.14.3.7 RS485_SetDelayTime ............................................................... 8-258
8.14.4 RS232 Communication Instructions ............................................... 8-260

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

8.15 String Processing Instructions ...................................................... 8-284


8.15.1 CONCAT ..................................................................................... 8-284
8.15.2 DELETE ...................................................................................... 8-286
8.15.3 INSERT ...................................................................................... 8-288
8.15.4 LEFT / RIGHT ............................................................................. 8-290
8.15.5 MID ........................................................................................... 8-292
8.15.6 REPLACE .................................................................................... 8-294
8.15.7 LEN ........................................................................................... 8-296
8.15.8 FIND ......................................................................................... 8-297

8.16 Immediate Refresh Instructions .................................................... 8-299


8.16.1 FROM ........................................................................................ 8-299
8.16.2 TO ............................................................................................ 8-303
8.16.3 ImmediateInput .......................................................................... 8-307
8.16.4 ImmediateOutput........................................................................ 8-309
8.16.5 Left_Manage .............................................................................. 8-311

8.17 PID-related Instructions ................................................................ 8-315


8.17.1 PID ........................................................................................... 8-315
8.17.2 GPWM ....................................................................................... 8-325

8.18 Address Instruction ....................................................................... 8-327


8.18.1 ADR .......................................................................................... 8-327

8.19 Network Diagnosis ........................................................................ 8-329


8.19.1 EtherCAT Diagnosis ..................................................................... 8-329
8.19.1.1 EtherCAT_SysDiag.................................................................... 8-329
8.19.2 CANopen Diagnosis ..................................................................... 8-331
8.19.2.1 CANopen_SysDiag .................................................................... 8-331
8.19.2.2 CANopen_NodeDiag ................................................................. 8-333
8.19.2.3 CANopen_State........................................................................ 8-335

8.20 Read and Write Offset Bit Value .................................................... 8-337


8.20.1 SetBitOffsetValue ........................................................................ 8-337
8.20.2 GetBitOffsetValue ........................................................................ 8-339

8.21 FCS Instructions ............................................................................ 8-341

vi i
8.21.1 CRC16 ....................................................................................... 8-341
8.21.2 LRC ........................................................................................... 8-343

Chapter 9 Introductions of Axis Parameters


9.1 Description of Axis Parameters ........................................................ 9-2

Chapter 10 Motion Control Function


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

Chapter 11 Motion Instructions

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-51
11.3.7 MC_MoveAdditive........................................................................ 11-61
11.3.8 MC_MoveAbsolute ....................................................................... 11-72
11.3.9 MC_MoveSuperimposed ............................................................... 11-84
11.3.10 MC_HaltSuperimposed................................................................. 11-94
11.3.11 MC_SetPosition......................................................................... 11-101
11.3.12 MC_SetOverride ....................................................................... 11-114
11.3.13 MC_Reset ................................................................................ 11-119
11.3.14 DMC_SetTorque ........................................................................ 11-123
11.3.15 MC_ReadAxisError .................................................................... 11-128
11.3.16 MC_ReadActualPosition .............................................................. 11-131
11.3.17 MC_ReadStatus ........................................................................ 11-137
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

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

11.4 Multi-axis Instructions ................................................................ 11-210


11.4.1 MC_GearIn ............................................................................... 11-210
11.4.2 MC_GearOut............................................................................. 11-219
11.4.3 MC_CombineAxes ..................................................................... 11-225
11.4.4 Introduction of Electronic Cam .................................................... 11-236
11.4.5 MC_CamIn ............................................................................... 11-263
11.4.6 MC_CamOut ............................................................................. 11-265
11.4.7 DMC_CamReadPoint .................................................................. 11-272
11.4.8 DMC_CamWritePoint.................................................................. 11-277
11.4.9 DMC_CamSet ........................................................................... 11-280
11.4.10 DMC_CamReadTappetStatus ....................................................... 11-286
11.4.11 DMC_CamReadTappetValue ........................................................ 11-292
11.4.12 DMC_CamWriteTappetValue ........................................................ 11-296
11.4.13 DMC_CamAddTappet ................................................................. 11-302
11.4.14 DMC_CamDeleteTappet .............................................................. 11-307

11.5 Application Instructions .............................................................. 11-311


11.5.1 Rotary Cut Technology ............................................................... 11-311
11.5.2 Rotary Cut Parameters ............................................................... 11-312
11.5.3 Control Feature of Rotary Cut Function ........................................ 11-313
11.5.4 Introduction to Cam Curve with Rotary Cut Function ..................... 11-314
11.5.5 Rotary-cut Instructions .............................................................. 11-319
11.5.5.1 APF_RotaryCut_Init ................................................................ 11-319
11.5.5.2 APF_RotaryCut_In .................................................................. 11-323
11.5.5.3 APF_RotaryCut_Out ................................................................ 11-326
11.5.6 Application Example of Rotary Cut Instructions ............................. 11-329

11.6 G Code Instructions ..................................................................... 11-334


11.6.1 CNC Introduction ...................................................................... 11-334
11.6.2 G Code Input Format ................................................................. 11-334
11.6.3 Explanation of G Code Formats ................................................... 11-335
11.6.4 G Code Functions ...................................................................... 11-337
11.6.4.1 G90 (Absolute Mode) .............................................................. 11-337
11.6.4.2 G91 (Relative Mode) ............................................................... 11-338

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

11.7 Axes Group Instructions .............................................................. 11-399


11.7.1 DMC_AddAxisToGroup ............................................................... 11-399
11.7.2 DMC_RemoveAxisFromGroup ..................................................... 11-402
11.7.3 DMC_UngroupAllAxes ................................................................ 11-405
11.7.4 DMC_GroupEnable .................................................................... 11-407
11.7.5 DMC_ GroupStop ...................................................................... 11-411
11.7.6 DMC_GroupInterrupt ................................................................. 11-418
11.7.7 DMC_GroupContinue ................................................................. 11-425
11.7.8 DMC_MoveDirectAbsolute .......................................................... 11-428
11.7.9 DMC_MoveDirectRelative ........................................................... 11-435
11.7.10 DMC_MoveLinearAbsolut ............................................................ 11-442
11.7.11 DMC_MoveLinearRelative ........................................................... 11-460
11.7.12 DMC_MoveCircularAbsolute ........................................................ 11-478
11.7.13 DMC_MoveCircularRelative ......................................................... 11-491
11.7.14 DMC_GroupSetOverride ............................................................. 11-505
11.7.15 DMC_GroupReadActualPosition ................................................... 11-511

11.8 Cordination Instructions.............................................................. 11-514


11.8.1 DMC_ControlAxisByPos .............................................................. 11-514
11.8.2 DMC_NC .................................................................................. 11-519

Chapter 12 Troubleshooting

12.1 Explanation of LED Indicators ......................................................... 12-2

x
12.2 Table of Error IDs in Motion Instructions......................................... 12-6

12.3 System Trouble Diagnosis through System Error Codes ................ 12-16

Appendix A Modbus Communication

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

Appendix B Modbus TCP Communication

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

Appendix C CANopen Protocol

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

Appendix D Explanation of Homing Modes

D.1 Explanation of Homing Modes........................................................... D-2

Appendix E List of Accessories

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

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.

1.1 Explanation of Symbols in This Manual


 Precautions before operation
Before operation, please read relevant safety instructions carefully so as to prevent an injury to personnel
and damage to products.

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


DVP-50MC series operation manual revision history:
Version Revision Release Date

1st The first version was released Jul. 10, 2018

1. The contents about DVP50MC11T-06, DVP50MC11P-06 and


DVP50MC11P are added.
2. Function that Ethernet Communication port Supports in
Section 6.7.1 is added.
3. Communication instructions in Section 8.14 are added.
4. PID-related instructions in Section 8.17 are added.
5. Network Diagnosis instructions in Section 8.19 are added.
6. Read and Write Offset Bit Value instructions in Section 8.20
are added.
7. FCS instructions in Section 8.21 are added.
2nd Jan. 17, 2020
8. The instructions with the name starting with DMC in Section
11.3 are added.
9. G code instructions in Section 11.6 are added.
10. Axes group instructions in Section 11.7 are added.
11. Coordination instructions in Section 11.8 are added.
12. Communication instructions in section 8.14 are added.
13. The contents about error IDs in motion instructions in Section
12.2 are modified and added.
14. The contents about system error codes in Section 12.3 are
modified and added.

1-2
Chapter 1 Pr ef ac e

Version Revision Release Date


1. Added new models DVP50MC11T-16S and 1_
DVP50MC11T-04S and related description.
3rd Dec. 25, 2020
2. Added Write_FunCode inputs of Config instructions in
section 8.14 and related description.

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.1 Product Description


DVP-50MC series motion controllers are multi-axis motion controllers researched and produced by
Delta autonomously on the basis of EtherCAT field bus. The bus transmission rate is 100Mbps, adopting the
distribution clock for the high-speed, precise and high-efficiency data transmission and the convenient
synchronization of multiple axes.
In addition, it also supports standard motion control instruction libraries defined by international organizations.
_2 It brings users great convenience to learn and develop projects quickly. Multiple axes can be controlled via
EtherCAT port. The single-axis motion instructions including velocity, position, torque and homing instructions
are all supported. Multi-axis instructions such as electronic gear, electronic cam, rotary cut and G code are
supported by most of DVP-50MC series models.
Multiple communication ports are built in the motion controller. And thus various communication functions can
be realized without adding modules. The motion controller has left-side and right-side extension ports for
adding DVP-S series modules to its left and right sides. (The left-side port is a high-speed parallel extension
port.)
DVP-50MC series motion controller also has a built-in EtherCAT master communication port. The wiring is
easy and convenient. Thanks to the high-speed reliable EtherCAT bus and 1GHz high-speed floating point
processor, the motion controller can be widely applied to a variety of automation control industries such as
packaging, printing, encapsulating, wire cutting, drug manufacturing and so on.
DVP-50MC series motion controllers include six models: DVP50MC11T, DVP50MC11T-06, DVP50MC11T-16S,
DVP50MC11T-04S, DVP50MC11P and DVP50MC11P-06. For the six models, the number of local output
points, maximum number of axes they can control respectively and multi-axis instructions supported are all
different, which is described in Chapter 3 Specification. The local output points of DVP50MC11T and
DVP50MC11T-06, DVP50MC11T-16S and DVP50MC11T-04S are of NPN transistor outputs and the local
output points of DVP50MC11P and DVP50MC11P-06 are of PNP transistor outputs. But they have the same
specifications in communication ports, left-side and right-side extensions and program capacity.

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.3 Profile and Components


14
1 CANopen
00 01 02 03 04 05 06 07
8
RUN
ERR 10 11 12 13 14 15 16 17

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

3.1 Functional Specifications


3.1.1 Specifications
Specification
Item DVP50MC DVP50MC DVP50MC DVP50MC
11T/P 11T/P-06 11T-04S 11T-16S
Size 20M
Program
capacity Number
Quantity 1024
of POU
Memory Latched Size 128K
capacity for
Non-latched Size 20M
_3 Programming variables
One single G
code Size 256K
G code program
G code
Quantity 64
programs
Number of real axes 24 6 4 16

Max. number of Number of virtual axes+


32 16 4 32
axes for single- encoders
axis control Number of real axes+ virtual
32 16 4 32
axes + encoders
Axis number range 1~32 1~16 1~4 1~32
Motion control Max. number of axes supporting multi-axis 2
32 16 0
instructions (*1) (*2)
Max. number of axes for linear interpolation 8 8 0 2
Max. number of axes for circular interpolation 3 3 0 2
Number of
Size Quantity 64
cams
Key points of
Cam key points Quantity 2048
one single cam
EtherCAT 1 Transmission speed: 100Mbps
EtherNet 1 Works as master or slave
CAN 1 Works as CANopen master or slave
RS-232 1 Works as master or slave
RS485 1 Works as master or slave
Incremental Builds an encoder axis. Z signal can trigger an
2
encoder interrupt program.
SSI absolute
1 Builds an encoder axis.
Built-in ports encoder
16 points (External interrupt trigger is
Input points Quantity
supported.)
Output points Quantity 8 points
Left-side
1 DVP-S series left-side extension module
extension port

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.

3.1.2 Devices and Data Types


Devices
 Device Name Explanation

% I X 0 .0
Digital point number
P refix 2 s ymbo l
P refix 1 s ymbo l
A fixed chara ct er

 Relevant Devices of DVP-50MC Series Motion Controller Used in the Software


No. Item Content
1 Prefix 1 symbol I Q M

3- 3
DVP-50MC Series Motion Controller Operation Manual

No. Item Content


Input Output Intermediate
2 Prefix 1 name
device device device
3 Prefix 2 symbol X B W D L
4 Data type of prefix 2 BIT BYTE WORD DWORD QWORD
5 %IX0.0 %IB0 %IW0 %ID0 %IL0
6 Device example %QX0.0 %QB0 %QW0 %QD0 %QL0
7 %MX0.0 %MB0 %MW0 %MD0 %ML0

 The Corresponding Relationships of Devices


%ML0 includes %MB0~%MB7, %MD0 includes %MB0~%MB3 and %MW0 includes %MB0~%MB1 as
shown in the following table.
_3 Corresponding relationships
Device The 1st WORD The 2nd WORD The 3rd WORD The 4th 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
%MX %MX0.0~0.7 %MX1.0~1.7 %MX2.0~2.7 %MX3.0~3.7 %MX4.0~4.7 %MX5.0~5.7 %MX6.0~6.7 %MX7.0~7.7
%MB %MB0 %MB1 %MB2 %MB3 %MB4 %MB5 %MB6 %MB7
%MW %MW0 %MW1 %MW2 %MW3
%MD %MD0 %MD1
%ML %ML0

%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

Valid Ranges of Devices


 The table of valid ranges of the register in the motion controller
Register name Expression Range
%IX %IX0.0~%IX0.7 %IX0.0~%IX127.7
%QX %QX0.0~%QX0.7 %QX0.0~%QX127.7
%MX %MX0.0 %MX0.0~%MX131071.7
%IB %IB0 %IB0~%IB127
%QB %QB0 %QB0~%QB127
%MB %MB0 %MB0~%MB131071
%IW %IW0 %IW0~%IW63
%QW %QW0 %QW0~%QW63
%MW %MW0 %MW0~%MW65535
%ID %ID0 %ID0~%ID31

3-4
Chapter 3 Specifications

Register name Expression Range


%QD %QD0 %QD0~%QD31
%MD %MD0 %MD0~%MD32767
%IL %IL0 %IL0~%IL15
%QL %QL0 %QL0~%QL15
%ML %ML0 %ML0~%ML16383

 The table of Modbus register addresses


The Modbus addresses which are within the range of 16#0000~16#FFFF can be accessed via the standard
MODBUS function code 01, 02, 03, 05, 06, 16#0F and 16#10. When a MODBUS function code is used to
access bit devices, please access QX and IX bit devices. If MX bit devices need be accessed, the MW device
is accessed and then the values in the MX bit devices can be got through the MW device.
See Section 3.1.2.1 for details on the corresponding relationship between MW and MX devices.
Register Register Modbus 3_
Range Modbus address
area type address type
%IX0.0~%IX0.7 16#6000~16#6007
%IX1.0~%IX1.7 16#6008~16#600F
I Bit
(Input) …… ……
%IX127.0~%IX127.7 16#63F8~16#63FF
Word %IW0~%IW63 16#8000~16#803F Standard Modbus
%QX0.0~%QX0.7 16#A000~16#A007 address

%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

No. Data type Valid range Initial value


10 SINT -128 ~ +127 0
11 INT -32768 ~ +32767 0
12 DINT -2147483648 ~ +2147483647 0
13 LINT -9223372036854775808 ~ +9223372036854775807 0
-3.402823e+38 ~ -1.175495e-38, 0,
14 REAL 0.0
+1.175495e-38 ~ +3.402823e+38
-1.79769313486231e+308 ~ -2.22507385850721e-308, 0,
15 LREAL 0.0
+2.22507385850721e−308 ~ +1.79769313486231e+308,
T#XXXXXXdXXhXXmXXsXXXms, Unit: ns.
16 TIME T#0ms
Range:T#0ns~213503d23h34m33s709.551ms
_3 17 DATE D#Y-M-D. Range: D#1970-01-01~D#2106-02-07. Unit: s. D#1970-01-01
TOD#H:M:S:MS, Range:TOD#00:00:00~23:59:59.999. Unit: ms.
If 0 is written, TOD#00:00:00 is displayed. If 1 is written,
TOD#00:00:00.001 is displayed. If 86399999 is written,
18 TOD TOD#00:00:00
TOD#23:59:59.999 is displayed. If 86400000 is written,
TOD#00:00:00 is displayed. If 4294967295 is written,
TOD#17:2:47.295 is displayed.
DT#Y-M-D-H-M-S. Range: DT#1970-01-01-0:0:0~2106-02-07- DT#1970-01-01-
19 DT
6:28:15. Unit: s. 0:0:0
20 STRING 0~32000 characters ‘’

3-6
Chapter 3 Specifications

3.2 Electrical Specifications


 Electrical specification
Item Content
Power voltage 24 VDC (-15% ~ +20%)
Fuse capacity 3 A/30 VDC, Polyswitch
Isolation voltage 500 VAC (Secondary-PE)
Consumption power 8W Max
Standard: IEC61131-2,IEC 68-2-6 (TEST Fc)/IEC61131-2 & IEC 68-2-27
Vibration/shock immunity
(TEST Ea)
Static electricity: 8KV Air Discharge, 4KV Contact Discharge
EFT: Power Line: ±2KV, Digital Input: ±1KV,
Interference immunity
Communication I/O: ±1KV 3_
RS: 80MHz ~ 1000MHz, 10V/m.
Conducted Susceptibility Test: 150kHz ~ 80MHz, 3V/m
Surge Test: Power line 0.5KV DM/CM
Work: 0°C ~ 55°C (Temperature), 5 ~ 95% (Humidity), pollution level 2
Environment
Storage: -25°C ~ 70°C (Temperature), 5 ~ 95% (Humidity).
Weight About 425g
 Electrical specification for input points
Item Content
Number of input channels 16 channels
Channel type High-speed digital input type for the 16 channels
Input terminals Terminal I0~I7,I10~I17
Common terminal for input
Terminal S0/S1
points
Input type Sink or Source mode
Input delay 2.5µS (OFF ->ON), 5 µS (ON -> OFF)
Input current 24 VDC, 5mA
The shielded cable: 500m
Max. cable length
The unshielded cable: 300m
 Electrical specification for output points
Item Content
Number of output channels 8 transistors for output (N-MOS)
Channel type High-speed digital output type for 8 channels

Output terminals Terminal Q0~Q7


Common terminal for output
Terminal UP/ZP (Used for connection of anode or cathode of supply power)
points
Power voltage for output
24 VDC(-15% ~ +20%)#1
points
Output delay 2µS ( OFF -> ON), 3µS ( ON -> OFF)
Max. switch frequency 1KHZ
Resistance: 0.5A/1point (2A/ZP)
Max. loading Inductance: 13W(24VDC)
Bulb: 2.5W(24VDC)

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.2.1 Features of EtherCAT Fieldbus ......................................................4-3


4.2.2 EtherCAT Communication between the Controller and Slaves ...........4-3
4.2.3 Initialization of EtherCAT Network ................................................4-4
4.2.4 How to handle the Mismatch between EtherCAT Configuration and
Actually Connected Devices in Quantity .........................................4-4
4.2.5 EtherCAT Slave Offline and Recovery Mechanism ............................4-5
4.2.6 Servos Connectable to EtherCAT Port ............................................4-5

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

4.5.1 Connectable Right-side Extension Modules ....................................4-8


4.5.2 Allocation of Right-side Extension Module Addresses .......................4-8

4.6.1 Model and Specification ...............................................................4-9

4- 1
DVP-50MC Series Motion Controller Operation Manual

4.1 System Constitution


A multi-layer industrial network can be built via the motion controller. By using the motion controller, the
network can consist of top-layer Ethernet and EtherCAT, middle-layer CANopen and Profibus bus as well as
bottom-layer RS-485 bus which supports Modbus as follows.

DVP5 0M C11 T CAN open

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

ASDA-A 2- E ASDA- A2-E ASDA- A2-E


Temperature AC motor driv e PLC
controller

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

4.2 Introduction to EtherCAT Fieldbus


4.2.1 Features of EtherCAT Fieldbus
The EtherCAT bus is the Ethernet-based fieldbus. The communication rate of the EtherCAT network is
100Mbps and the distance between two adjacent nodes is not over 50 metres. Obviously different from general
Ethernet network, one EtherCAT network has just one EtherCAT master and EtherCAT slaves contain ESC
chips (EtherCAT Slave Controller) specially used for processing EtherCAT communication data and inserting
the data which slaves need to transmit to the master into the EtherCAT frame. The last EtherCAT slave in the
network will return the data which have been handled to the master in order. The illustration of data
transmission is shown as below.

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_

4.2.2 EtherCAT Communication between the Controller and Slaves


Since the EtherCAT bus is the EtherNet-based fieldbus, the EtherCAT data frame still adopts the UDP/IP
Ethernet data frame structure.
EtherCAT data frame structure is displayed as below. EtherCAT data field includes 2 bytes of EtherCAT data
header and 44~1498 bytes of EtherCAT data. EtherCAT Data field consists of one or more EtherCAT
datagrams. EtherCAT Data can be defined and analyzed in a protocol as long as the master and slaves comply
with the protocol. Currently the two protocols mostly used are COE (CANopen Over EtherCAT) and SOE
(Sercos Over EtherCAT). The motion controller uses the COE protocol.

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

4.2.3 Initialization of EtherCAT Network


The EtherCAT slave that the EtherCAT master controls need be configured to the master in the software. As
the EtherCAT master, the controller will initialize the slave configured in the software after power ON. The
initialization includes following procedures.

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.2.4 How to handle the Mismatch between EtherCAT Configuration


and Actually Connected Devices in Quantity
After the master initializes slaves, all slaves which are configured successfully can be controlled by the master
no matter whether the quantity of the slaves configured in the software are same as that of the devices actually
connected to EtherCAT port or not. For instance, if there are two EtherCAT slaves configured in the software,
but actually only one of them is connected, the actually connected one can be controlled via motion instructions.
The slave which has been configured in the software is connected to the network after the master has made
a connection with the slave which has been connected to the network. In this case, the master will not make
the connection with the slave which is connected to the network later.

4-4
Chapter 4 System Architecture

4.2.5 EtherCAT Slave Offline and Recovery Mechanism


The master will not make a connection with the offline slaves again if some of EtherCAT slaves are offline due
to communication cable removal after the EtherCAT slaves and the master make a connection. The offline
slaves can not be controlled via motion control instructions and the rest slaves which are not offline will not be
affected.

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.

4.2.6 Servos Connectable to EtherCAT Port


There are many models for ASDA-A2, ASDA-B3 and ASDA-A3 series servo drives. ASDA-A2-XXXX-E,
ASDA-A2-XXXX-EN, ASDA-B3-XXXX-E and ASDA-A3-XXXX-E models support EtherCAT communication.
Only these models of servo drives can be used to build EtherCAT motion control network through the
4_
connection to the EtherCAT port of the motion controller.

 Illustration of the servo drive model

 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

E t herC A T E t her net C A Nopen

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

4.3 Power Supply


Delta power modules are recommended as the power supply for the motion controller. Delta power modules
are listed in the following table.
Module Input Output Output International
No. Phase Power
name voltage voltage current Standard
1 DVPPS02 Single 48W 2A
85~264VAC 24VDC
2 DVPPS05 phase 120W 5A
4.4 Left-side Extension
4.4.1 Connectable Left-side Extension Module
Max. 8 high-speed extension modules can be connected to the left side of the motion controller and the
connectable modules are listed in the following table.
No. Module name Module type Description
1 DVP04AD-SL Analog module Analog input
2 DVP04DA-SL Analog module Analog output
Profibus
3 DVPPF02-SL Network module
communication 4_
4.4.2 Allocation of Left-side Network Module Addresses
 About Input and Output Mapping Areas of Left-side Network Modules
The input and output mapping areas of different positions of the left side of the PLC are listed as follows when
the network modules connected to the left side of the motion controller serve as a slave. The position 1 is for
the first module connected to the left side of the PLC; the position 2 is for the second one connected to the left
side of the PLC and so on.
Mapping
area Output mapping area Input mapping area
Position
1 %MW6250~%MW6377 %MW6000~%MW6127
2 %MW6750~%MW6877 %MW6500~%MW6627
3 %MW7250~%MW7377 %MW7000~%MW7127
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

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.4.3 Method of Reading/Writing of Left-side Modules


The motion controller can read and write data in CR registers of the left-side extension modules via FROM/TO
instruction. For instance, the modules such as DVP04AD-SL and DVP04DA-SL may use FROM/TO to read
and write data in CR.

4- 7
DVP-50MC Series Motion Controller Operation Manual

4.5 Right-side Extension


4.5.1 Connectable Right-side Extension Modules
DVP-S series extension modules including digital modules, analog modules and temperature modules can be
connected to the right side of the motion controller. Digital modules can connect maximum 240 input points
and 240 output points. Maximum 8 analog modules can be connected. The connectable right-side extension
modules are listed in the following table.
Input data Output data
No. Module name Extension type
length length
1 DVP08SM11N 8 bits -
Input point extension
2 DVP16SM11N 16 bits -
3 DVP06SN11R - 6 bits
4 DVP08SN11R/T - 8 bits Output point extension
5 DVP16SN11T - 16 bits
6 DVP08SP11R/T 4 bits 4 bits
Combination of input extension and
7 DVP16SP11R/T 8 bits 8 bits
output extension
_4 8 DVP16SP11TS(PNP) 8 bits 8 bits
9 DVP32SM11N 32 bits - Pin-connector input
10 DVP32SN11TN - 32 bits Pin-connector output
11 DVP08ST11N 8 bits - Digital switch
12 DVP04AD-S 4 words -
Analog input
13 DVP06AD-S 6 words -
14 DVP04DA-S - 4 words
Analog output
15 DVP02DA-S - 2 words
16 DVP06XA-S 4 words 2 words Analog input and analog output
17 DVP04PT-S 4 words - Sensor
18 DVP06PT-S 6 words - (Model: PT100)
Sensor
19 DVP04TC-S 4 words -
(Model: J, K, R, S, T thermocouples)
Pulse output
Three modes using the differential
20 DVP01PU-S - -
output way: Pulse/Dir, FP (CW)/RP
(CCW), A/B

4.5.2 Allocation of Right-side Extension Module Addresses


The motion controller can connect DVP-S series extension modules to its right side and max. 240 digital input
points and 240 digital output points are connectable. Max. 8 special modules are connectable such as analog
modules, temperature modules and pulse modules. Up to 14 digital modules and special modules at most are
connectable to the right side of the motion controller.
 Digital numbers of right-side digital extension modules
1. The digital point number of the digital extension modules connected to the right of the motion
controller starts from 2.0. For example, the input point for the first digital module starts from %IX2.0
and the output point starts from %QX2.0. It is counted as 8 points if the number is less than 8.
2. Digital input points and output points are numbered in decimal system as below.
%IX2.0 ~%IX2.7,......, %IX8.0 ~%IX8.7,......, %IX31.0 ~ %IX31.7
%QX2.0 ~ %QX2.7,......, %QX8.0 ~ %QX8.7,......, %QX31.0 ~ %QX31.7

4-8
Chapter 4 System Architecture

 About the right-side special module and serial number


1. The right-side extension modules such as analog modules, temperature modules and pulse
modules are regarded as special modules.
2. The serial number of the first special module to the right side of the motion controller is 0; the serial
number of the second one is 1, and so on. Maximum 8 special modules can be connected. The
start address for input of the right-side special module is %MW10000 and the start address for
output of the right-side special module is %MW10500.

4.6 SD Memory Card


4.6.1 Model and Specification
 Model and Appearance

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

CLASS 2 (Min. 2MB/Sec.) CLASS 2 (Min. 2MB/Sec.)


SD speed CLASS 4 (Min. 4MB/Sec.) CLASS 4 (Min. 4MB/Sec.)
N/A
level CLASS 6 (Min. 6MB/Sec.) CLASS 6 (Min. 6MB/Sec.)
CLASS 10 (Min. 10MB/Sec.) CLASS 10 (Min. 10MB/Sec.)

* 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

 Before use of SD card


 Write-protection function of the memory card
There is a write-protection switch for general SD cards. The data can not be written into SD card if the
switch is moved to the Lock position. Hence, please ensure that the write-protection switch of SD card
has been released correctly before SD card is used and then the write-into function can be executed in
the controller.

Released

Write-
protected

_4

4-10
5
Installation

Table of Contents

5.1.1 Profile and Dimensions ...............................................................5-2


5.1.2 Dimensions of Left-side and Right-side Extension Modules ..............5-2
5.1.3 Connecting to the Left-side Extension Module ................................5-3
5.1.4 Connecting to the Right-side Extension Module ..............................5-4
5.1.5 SD Card Installing and Removing .................................................5-5

5.2.1 Installing the Module to DIN rail ..................................................5-7


5.2.2 Illustration of Installation Inside the Control Cabinet ......................5-7
5.2.3 Environmental Temperature in the Control Cabinet.........................5-8
5.2.4 Measures for Anti-interference ....................................................5-8
5.2.5 Dimension Requirement in the Control Cabinet ..............................5-8

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

 Installing the motion controller and DVPDNET-SL into DIN rail


 Use standard 35mm DIN rail.
 Pull open DIN rail clips of the motion controller and DVPDNET-SL and then insert the two
modules into DIN rail.
 Press the DIN rail clips into the motion controller and DVPDNET-SL to fix the two modules in DIN
rail as figure 5.1.3.2.

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

 Installing DVP-50MC Series Controller and DVP16SP11T in DIN Rail


 Use standard 35mm DIN rail.
 Pull open DIN rail clips of the motion controller and DVP16SP11T and then insert the two
modules into DIN rail.
 Press the DIN rail clips into the motion controller and DVP16SP11T to fix the two modules in DIN
rail as figure 5.1.4.2.

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

5.2 Installing the Module in the Control Cabinet


5.2.1 Installing the Module to DIN rail
Pull down the clips at the bottom of the motion controller. Then have the horizontal slots at the rear of the
module sticked on the DIN rail. Finally, push up the clips to fix the module inside the control cabinet.

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.2.2 Illustration of Installation Inside the Control Cabinet

5_

5- 7
DVP-50MC Series Motion Controller Operation Manual

5.2.3 Environmental Temperature in the Control Cabinet


 Requirements

 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.2.4 Measures for Anti-interference

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

5.2.5 Dimension Requirement in the Control Cabinet


 Installation Figure

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.8.3 Network Connection of EtherCAT Communication Port .................. 6-21


6.8.4 EtherCAT Communication Distance ............................................ 6-21
6.9 CANopen Communication Port .................................................6-22
6.9.1 Function that CANopen Communication Ports Support .................. 6-22
6.9.2 Pins of CANopen Communication Port ........................................ 6-23
6.9.3 PDO Mapping at CANopen Communication Port ........................... 6-23
6.9.4 Network Connection at CANopen Communication Port .................. 6-23
6.9.5 CANopen Communication Rate and Communication Distance ........ 6-24

6- 2
Chapter 6 Wiring, Communication Setting and Network Construction

6.1 Wiring

6.1.1 Power Supply


The power input of the motion controller is 24V DC. Please notice the following points during use.

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

P ower supply for


Controller’s input po int s

Power supply for


Controller’s outpu t points

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

 AC power supply: 100~240VAC; 50/60Hz.


 Power supply circuit protection fuse
 System circuit isolation device: The electromagnetic contactor, relay and other switch can be used as
the isolation device to prevent the system from becoming unstable when the power supply is
discontinuous.
 Power indicator
 Emergency stop button: The button cuts off the system power supply when an accidental situation
takes place.
 Delta power module DVPPS05/24VDC (DVPPS05 is recommended for the motion controller)
 The motion controller
 Ground
6
 Safety circuit

6- 5
DVP-50MC Series Motion Controller Operation Manual

6.2 Input Point and Output Point Wiring


6.2.1 Function that Input Points Support
There are 16 input points which support external interrupt and filter functions in the motion controller. In addition,
the input points can be used to capture the encoder position.
Refer to the explanation of the DMC_TouchProbe instruction for details on position capture.

 The work principle of the input filter


The input filter filters short pulse signals via the 16 I points, I0~I7 and I10~I17 to reduce the influence of
the input interference signals. Increasing the filter value can decrease the vibration of input signals or the
influence from external interference.
Input filter time: t=31us *(0~255). So the filter time is a multiple of 31us and 0 is the default value. The
input filter time can be set through the software.

 When there is the set filter:


When the filter time is set to t (us), the signal is valid if the ON or OFF time of the input signal is
greater than t (us). If the ON or OFF time of input signal is less than t (us), the signal will be eliminated.
The input signal left after being filtered will be input after being delayed by t (us).

Input
signals t(us) t(us)
Input signal s
after being filte re d

 When there is no filter set:


The input signals have no change when no filter time is set.
6

Inp ut

In put signa ls
withou t filter set

6- 6
Chapter 6 Wiring, Communication Setting and Network Construction

6.2.2 Input Point Wiring


There are two types of DC inputs, SINK and SOURCE. See the details for the wiring in the following two
modes.
 Sink Mode
Under Sink mode, the simplified model is shown below and the current flows into the common ports S0 and
S1.
Motio n Contro ller Mo tion Con troller

S0 S1
Sinking Sinking
24VDC

24VDC
00 10

See relevant wiring circuits in the following figures.


 The input points of the motion controller, 00~07 correspond to S0 as shown below.
Motio n Contro ller

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

Motion Contr oller Motio n Contro ller

00 10
24VDC

24VDC
S0 S1
So urc ing So urc ing

See the wiring circuit below:


 The input points of the motion controller, 00~07 correspond to S0 as shown below.
Motion Contr oller

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

6.2.3 Output Point Wiring


Output Point Wiring for DVP50MC11T and DVP50MC11T-06
All local output points of DVP50MC11T and DVP50MC11T-06 motion controllers are of transistor output. The
wiring circuit is shown as below.
Moti on C ontrol ler
UP
L oad

Q0 5~30V DC
0 .5A

ZP

Output Point Wiring for DVP50MC11P and DVP50MC11P-06


All local output points of DVP50MC11P and DVP50MC11P-06 motion controllers are of transistor output. The
wiring circuit is shown as below.

Motio n Con tr oll er


C0

5~30V DC
0 .5A
Load

Q0

6- 9
DVP-50MC Series Motion Controller Operation Manual

6.3 RS-485 Communication Port


6.3.1 Function that RS-485 Port Supports
The RS-485 communication port of the motion controller can function as Modbus master or slave. HMI, PLC
or other Modbus master device can read and write data in the devices inside the motion controller. The interval
time when the Modbus master accesses the motion controller should exceed 5ms.
The progrom can not be downloaded via RS-485 port. RS-485 supports Modbus protocol, ASCII as well as
RTU mode. The function codes which RS-485 port supports include 16#01, 16#02, 16#03, 16#05, 16#06,
16#0F and 16#10. The station addresses that RS-485 port supports are 1~255. The broadcast function is not
supported.
Refer to appendix A for details on Modbus communication and Modbus device addresses.
6.3.2 Definitions of RS-485 Port Pins
The motion controller’s COM/SSI port consists of 15 pins. The external port is commonly used for RS-485
communication and SSI absolute encoder. See the table below for definitions of respective RS-485
communication port pins.
Pin
Signal Definition
No.
11 D+ Positive pole

12 D- Negtive pole

5 SG Signal ground COM/SSI

6.3.3 RS-485 Hardware Connection


 Example on Connection of DVP-50MC Series Controller into Modbus Network
The motion controller is connected to Modbus network via RS-485.

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.

 Communication Format that RS-485 Supports


RS-485 communication port supports ASCII or RTU communication formats and the supported baud rate can
be up to 115200bps.
Baud rate 9600;19200;38400;57600;115200
Mode ASCII RTU
7,E,1 7,E,2 7,N,1 7,N,2 8,E,1 8,E,2
Communication
7,O,1 7,O,2 8,E,1 8,E,2 8,N,1 8,N,2
format
8,N,1 8,N,2 8,O,1 8,O,2 8,O,1 8,O,2

6.3.4 Supported Function Codes and Exception Function Codes


 Modbus Function Codes:
 The function codes that RS-485 port of the motion controller supports are listed in the following
table.
Max. number of
Function Available
Indication writable/readable
code register
registers
6
16#01 Read output bit register values. 256 Bit register
16#02 Read bit register values. 256 Bit register
Read one single or multiple word Word
16#03 100
register values. register
16#05 Write one single bit register value. 1 Bit register
Write one single word register Word
16#06 1
value. register
16#0F Write multiple bit register values. 256 Bit register
Word
16#10 Write multiple word register values. 100
register
 The exception codes that RS-485 port of the motion controller supports are listed in the following
table.
Exception
response Indication
code
16#01 Unsupportive function code
16#02 Unsupportive Modbus address
16#03 The data length is out of the valid range.

6- 11
DVP-50MC Series Motion Controller Operation Manual

6.4 RS-232 Communication Port


6.4.1 Function that RS-232 Port Supports
The RS-232 communication port of the motion controller can function as Modbus master or slave. HMI, PLC
or other Modbus device can read and write data in the devices inside the motion controller. The progrom can
not be downloaded through RS-232 port. RS-232 supports Modbus protocol, ASCII mode as well as RTU
mode. The function codes which RS-232 port supports include 16#01, 16#02, 16#03, 16#05, 16#06, 16#0F
and 16#10. The station addresses that RS-232 port supports are 1~255. The broadcast function is not
supported.
Refer to appendix A for details on Modbus communication and Modbus device addresses.

6.4.2 Definitions of RS-232 Port Pins


The motion controller’s COM/SSI port consists of 15 pins. See the table below for definitions of respective
RS-232 communication port pins.
Pin
Signal Definition
No.
3 Tx Transmitting data

9 Rx Receiving data

5 GND Signal ground


COM/SSI

6.4.3 RS-232 Hardware Connection

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 communication format that RS-232 supports


Baud rate 9600;19200;38400;57600;115200
Mode ASCII RTU
7,E,1 7,E,2 7,N,1 7,N,2 8,E,1 8,E,2
Communication
7,O,1 7,O,2 8,E,1 8,E,2 8,N,1 8,N,2
format
8,N,1 8,N,2 8,O,1 8,O,2 8,O,1 8,O,2
6.4.4 Supported Function Codes and Exception Codes
 Modbus Function Codes:
 The function codes that RS-232 port of the motion controller supports are listed in the following
table.
Max. number of
Available
Function code Indication writable/readable
register
registers
16#01 Read output bit register values. 256 Bit register
16#02 Read bit register values. 256 Bit register
Read one single or multiple word register
16#03 100 Word register
values.
16#05 Write one single bit register value. 1 Bit register
16#06 Write one single word register value. 1 Word register
16#0F Write multiple bit register values. 256 Bit register
16#10 Write multiple word register values. 100 Word register

 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.5 SSI Absolute Encoder Port


6.5.1 Function of SSI Absolute Encoder
The motion controller’s COM/SSI port is a 15-pin D-SUB interface which can be used to connect SSI encoder.
In addition, the port also includes the 5V (400mA) power output which provides the power supply to the encoder.
Users can create an SSI encoder axis to control the motion of slave axes according to the number of pulses
received via the encoder port.

6.5.2 Definitions of SSI Port Pins


The motion controller’s COM/SSI port is a 15-pin D-SUB interface. See the table below for definitions of
respective SSI communication port pins.
Pin
Signal Definition
No.
1 DATA+ Positive pole of absolute encoder data
2 DATA- Negative pole of absolute encoder data
6 CLK+ Positive pole of absolute encoder clock
14 CLK- Negative pole of absolute encoder clock
8 GND Power ground of the absolute encoder
15 5V Absolute encoder power COM/SSI

6.5.3 SSI Absolute Encoder Hardware Connection


 Illustration of SSI Absolute Encoder Wiring
DVP50MC11T

6
Et h e r C AT Et h e r ne t C A N op en
Encoder

EtherCAT

ASDA-A2-E

 Specification for SSI Absolute Encoder Interface Wiring


SSI encoder interface of the motion controller and the wiring method are shown below.
5 1
10 6
15 11

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.

 Specification for SSI Absolute Encoder Communication Cable


Please use the shielded pair-twisted cable for CLK+, CLK-, DATA+ and DATA- signal transmission.

6- 1 5
DVP-50MC Series Motion Controller Operation Manual

6.6 Incremental Encoders


6.6.1 Function of Incremental Encoder
The motion controller’s incremental encoder port is a 15-pin D-SUB interface which can connect two
independent incremental encoders. Both of the two encoder ports support differential signal input with
maximum work frequency of 1MHz (250Kx 4 = 1MHz) per one. Additionally, the port integrates two 5V (400mA)
power outputs to supply power to the two encoders. Users can create an incremental encoder axis for either
of the two encoders to control the motion of slave axes according to the number of pulses received at the
encoder port.

6.6.2 Definition of Incremental Encoder Port Pins


The motion controller’s incremental encoder port is a 15-pin interface. See the table below for definitions of
respective encoder communication port pins.
Pin No. Signal Definition
1 A1+
2 A1-
10 B1+ Differential signals of the first
11 B1- incremental encoder

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

Et herCAT tEhernet CANopen


Enc oder

EtherCAT

ASDA-A 2- E

6- 1 6
Chapter 6 Wiring, Communication Setting and Network Construction

 Specification for Incremental Encoder Port Wiring


The incremental encoder interface of the motion controller and the wiring method are shown below.

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.

6.7 Ethernet Communication Port


6.7.1 Function that Ethernet Communication Port Supports
Ethernet communication port in the motion controller supports Modbus TCP protocol and can work as a master
as well as slave.

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

Communication protocol MODBUS TCP, Socket, EtherNet/IP

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

6.7.2 Pins of Ethernet Communication Port


The default IP address for Ethernet communication port is 192.168.1.1.
See the table below for definitions of Ethernet communication port pins.
Pin No. Signal Definition
Positive pole for transmiting
1 Tx+
data
Negative pole for transmitting
2 Tx-
data
3 Rx+ Positive pole for receiving data 8 7 6 5 43 21

4 Reserved Reserved
5 Reserved Reserved
Ethernet
Negative pole for receiving
6 Rx-
data
7 Reserved Reserved
8 Reserved Reserved

6.7.3 Network Connection of Ethernet Communication Port

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

6.7.4 Function Codes that Ethernet Communication Port Supports


Below is the list of the function codes and exception response codes which are supported when the motion
controller’s Ethernet communication port uses Modbus TCP protocol.
Max. number of
Available
Function code Indication writable/readable
register
registers
16#01 Read output bit register values. 256 Bit register

16#02 Read bit register values. 256 Bit register


Read one single or multiple word register
16#03 100 Word register
values.
16#05 Write one single bit register value. 1 Bit register

16#06 Write one single word register value. 1 Word register

16#0F Write multiple bit register values. 256 Bit register

16#10 Write multiple word register values. 100 Word register

Exception
response Indication
code
16#01 Unsupportive function code

16#02 Unsupportive Modbus address

16#03 The data length is out of the valid range.

6- 2 0
Chapter 6 Wiring, Communication Setting and Network Construction

6.8 EtherCAT Communication Port


6.8.1 Function that EtherCAT Communication Port Supports
The EtherCAT port is used for the motion control. Motion control instructions control the servos via the
EtherCAT port.
6.8.2 Pins of EtherCAT Communication Port
The EtherCAT port is used for the motion control.
See the table below for definitions of EtherCAT communication port pins.
Pin No. Signal Definition
Positive pole for transmiting
1 Tx+
data
Negative pole for transmitting
2 Tx-
data
3 Rx+ Positive pole for receiving data 8 7 6 5 43 21

4 Reserved Reserved
5 Reserved Reserved
Negative pole for receiving EtherCAT
6 Rx-
data
7 Reserved Reserved
8 Reserved Reserved

6.8.3 Network Connection of EtherCAT Communication Port

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.9 CANopen Communication Port


6.9.1 Function that CANopen Communication Ports Support
CANopen communication ports can be used as CANopen network master or as a slave of other master.

 As a master, the communication ports support following functions.


 Standard CANopen protocol DS301V4.02;
 NMT (Network Management Object) Master service;
 NMT Error control;
NMT error control is used to watch if some slave is offline. NMT error control includes Heartbeat and
Node Guarding. The module supports Heartbeat function.
 Connects max. 32 slaves.
 PDO (Process Data Object) service.
The number of RxPDOs: max. 200, data length: max. 1000 bytes
The number of TxPDOs: max. 200, data length: max. 1000 bytes
Maximum 8 TxPDOs and 8 RxPDOs are configured for each slave.
PDO transmission type: supporting event trigger, time trigger, synchronous and cyclic, synchronous
and acyclic
PDO mapping: every PDO can map 32 parameters at most.
The data type that the communication port supports
Storage capacity Data type
1bit BOOL
8bit SINT USINT BYTE
16bit INT UINT WORD
32bit DINT UDINT REAL DWORD
64bit LINT ULINT LREAL LWORD
6
 Supports SDO service
Supports standard expedited SDO transmission mode;
Supports Auto SDO function; capable of sending a maximum of 30 Auto SDOs to each slave;
Supports reading and writing of slave data by using SDO service in PLC ladder diagram program.
 SYNC producer, range 0-65535ms
Multiple devices perform an action synchronously through SYNC message.
 As the connection interface between Delta CANopen Builder configuration software and
CANopen network, the configuration software can be directly used to configure the network through
DVPCOPM-SL module
 Supports the CANopen communication speeds: 20K, 50K, 125K, 250K, 500K, 1Mbps

 As a slave, the communication ports support following functions.


 Standard CANopen protocol DS301V4.02
 NMT slave service
 NMT Error control
Supporting Heartbeat Protocol error control instead of Node Guarding error control
 PDO service
The number of RxPDOs: max. 8, data length: max. 64 bytes
The number of TxPDOs: max .8, data length: max. 64 bytes
PDO transmission type: event trigger, time trigger, synchronous and cyclic, synchronous and acyclic
 SDO service
Supporting standard expedited SDO transmission mode.

6- 2 2
Chapter 6 Wiring, Communication Setting and Network Construction

6.9.2 Pins of CANopen Communication Port


The motion controller’s CANopen communication ports are used in the standard CANopen communication and
the pin descriptions are listed in the following table.
Pin No. Signal Definition
1 CAN_H Signal+
2 CAN_L Signal-
3 CAN_GND 0 VDC 8 7 6 5 43 21 87 6 5 43 21

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.

6.9.3 PDO Mapping at CANopen Communication Port


The input mapping area is %MW5000~%MW5499 and output mapping area is %MW5500~%MW5999 when
the motion controller works as CANopen master.
The input mapping area is %MW5000~%MW5031 and output mapping area is %MW5500~%MW5531 when
the motion controller works as CANopen slave.

6.9.4 Network Connection at CANopen Communication Port


 CANopen Bus Terminals and Network Topology
Both of the two ends of a CANopen network need be connected with the terminal resistors of 120Ω to enhance
the stability of CANopen communication. See the illustration of a basic CANopen network topology below.
CAN node1 CAN node2

CAN_H
6
120Ω 120 Ω

CAN_L

CAN node3

6- 2 3
DVP-50MC Series Motion Controller Operation Manual

 CANopen Bus Network Topology


DVP50MC11T

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.9.5 CANopen Communication Rate and Communication Distance


The transmission distance of CANopen bus network depends on the transmission speed of CANopen bus.
Below is the table where the maximum communication distances correspond to different transmission speeds.
Transmission speed
20K 50K 125K 250K 500K 1M
(Bit/second)
Max. communication
2500 1000 500 250 100 25
distance (Meter)

6- 2 4
7
Execution Principle

Table of Contents

7.1.1 Task Types ................................................................................7-2


7.1.2 Priority levels of Tasks ................................................................7-4
7.1.3 Watchdog for a Task ...................................................................7-6
7.1.4 Motion and Communication Instructions for Each Task Type ............7-7

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.

7.1.1 Task Types


 Three task types that the motion controller supports
1. Cyclic
2. Freewheeling
3. Triggered by event

 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

S ystem Sys tem S ystem


proces sing pr ocess ing proc essing
Low

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

S ystem System System


processing processing
pr oc essing
Low

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.

 Task triggered by event

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

Prior ity Task exec ution time

Hi gh
E ven t Task IO User progr am

S ystem S ys tem
pr oc essing pr ocessi ng
Low

 The event tasks for option contain following few types.


7_
- Motion event (Motion control task)
- Rising edge or falling edge of local input points (I0~I7 and I10~I17)
- CANopen SYNC signal
- Z pulse rising edge of incremental encoder 1 or encoder 2

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.

 Rising edge or falling edge of local input points (I0~I7,I10~I17)

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)

P riority Time interval between tasks Time interval between tasks

High Cyclic task User User


(Priority 1 ) IO IO
program program
1 2 5 6

_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

S ys tem S ystem S ystem Sy stem


pr ocessing proces sing proc es sing proces sing
Low

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

P riority Task execution time

Hig h Event Task User


( Priority 1 ) T he event task has not been triggered IO
program
8 9
Task ex ecut ion Ta sk exe cut io n
co ndition met fin is hed
Tas k execution time Task execution ti me
Task ex ecution time
Task execution time

Free wheeling t ask U ser Us er Use r U ser Us er


( Priority 2 )
IO IO prog ram IO Pause p rogr am IO pro gram
pr ogra m progr am
1 2 4 5 6 10 12
Tas k e xec ution E xec ution Ta sk exe cut io n E xe cut io n Ex ec ution E x ecut ion finis hed Ta sk exe cut io n
c ondit io n met finis hed con dition me t finishe d c ond it io n met con dition me t

Time interval between tasks Time inter val between tas ks Time i nter val between task s

Cyclic task Us er U ser


(Priority 3) Pause IO Pause IO pr ogram
prog ram
3 7 11
Ta sk exe cut ion E x ecut ion E xe cut io n
Task ex ecu tion
co ndition me t finish ed finishe d
c ondition met

System Syst em Syst em System


processing processing processing p rocessing
Low

① 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.1.3 Watchdog for a Task


Every task can be given a watchdog. When the task execution time exceeds the set watchdog time, the
controller will enter Error state and the user program execution will stop.
Watchdog time: The longest time allowed for the execution of a task

_7

7- 6
Chapter 7 Introduction of Axis Parameters

7.1.4 Motion and Communication Instructions for Each Task Type


Here is the table of motion instructions for different task types. “V” means the motion instruction can be
executed for the task type and “–” means the motion instruction can not be executed for the task type.
Task type
Event-triggered
Classification Instruction name Cyclic Freewheeling task
task task Motion Motion
task task
MC_Power - - V -
MC_Home - - V -
MC_MoveVelocity - - V -
MC_Halt - - V -
MC_Stop - - V -
MC_MoveRelative - - V -
MC_MoveAdditive - - V -
MC_MoveAbsolute - - V -
MC_MoveSuperimposed - - V -
MC_Haltsuperimposed - - V -
MC_SetPosition - - V -
MC_SetOverride - - V -
MC_Reset - - V -
DMC_SetTorque - - V -
MC_ReadAxisError V V V V

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 -

Axes group DMC_GroupInterrupt - - V -


instructions DMC_GroupContinue - - V -
DMC_MoveDirectAbsolute - - V -
DMC_MoveDirectRelative - - V -
DMC_MoveLinearAbsolute - - V -
DMC_MoveLinearRelative - - V -
DMC_MoveCircularAbsolute - - 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

7.2 The Impact of PLC RUN or STOP on Variables and


Devices
When the motion controller is switched from RUN to STOP, variables and devices keep current values. When
the motion controller is switched from STOP to RUN, users can select one option that the values of variables
and non-latched devices are cleared or retained as below.
 The values of variables and non-latched devices are cleared.
When the motion controller is switched from STOP to RUN, the values of variables and non-latched
devices are cleared and restored to the initial values. If variables and non-latched devices have no initial
values, the values of variables and non-latched areas will be restored to the default value 0.
 The values of variables and devices are retained.
When the motion controller is switched from STOP to RUN, variables and devices keep current values.

7.3 Synchronization Cycle Period Setting


The synchronization cycle is a very important parameter for the bus motion control. If the synchronization
period is not set properly, the servo may display AL3E1/AL3E2 fault alarm in communication or the servo
could not run normally.
The constitution of the synchronization period is introduced first here.
The motion control program is scanned at the very beginning of the synchronization period, and then the
control messages got through calculation are sent to all axes. So we can regard the synchronization period
as the time for execution of motion control program plus the time for communication between DVP50MC and
all servos. Since the communication time for the motion controller and all servos is too short, it can be
neglected. Therefore, the SYNC cycle time mainly refers to the time for execution of motion control programs.

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.9 Math Instructions ...................................................................8-61


8.9.1 ADD ...................................................................................... 8-61
8.9.2 SUB ....................................................................................... 8-65
8.9.3 MUL ....................................................................................... 8-65
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
8.10 Bit String Instructions ..........................................................8-118
8.10.1 AND .................................................................................. 8-118
8.10.2 OR .................................................................................... 8-121
8.10.3 NOT .................................................................................. 8-124
8.10.4 XOR .................................................................................. 8-126
8.10.5 XORN ................................................................................ 8-129
8.11 Shift Instructions ..................................................................8-132
8.11.1 SHL .................................................................................. 8-132
_8 8.11.2 SHR .................................................................................. 8-134
8.11.3 ROL .................................................................................. 8-136
8.11.4 ROR .................................................................................. 8-138
8.12 Selection Instructions ...........................................................8-140
8.12.1 MAX .................................................................................. 8-140
8.12.2 MIN .................................................................................. 8-142
8.12.3 SEL................................................................................... 8-144
8.12.4 MUX ................................................................................. 8-146
8.12.5 LIMIT ................................................................................ 8-148
8.12.6 BAND ................................................................................ 8-150
8.12.7 ZONE ................................................................................ 8-152
8.13 Data Type Conversion Instructions .......................................8-154

8- 2
Chapter 8 Logic Instructions

8.13.1 BOOL_TO_*** .................................................................... 8-154


8.13.2 Bit strings_TO_*** ............................................................. 8-157
8.13.3 Integers_TO_*** ................................................................ 8-164
8.13.4 Real numbers_TO_*** ........................................................ 8-173
8.13.5 Times,dates_TO_*** ........................................................... 8-176
8.13.6 Strings_TO_*** .................................................................. 8-178
8.14 Communication Instructions ................................................ 8-181
8.14.1 CANopen Communication Instructions ................................... 8-181
DMC_ReadParameter_CANopen ...................................... 8-181
DMC_WriteParameter_CANopen...................................... 8-186
8.14.2 Ethernet Instructions ........................................................... 8-191
ETH_Link_Config .......................................................... 8-191
ETH_Link_Manage ........................................................ 8-196
ETH_Link_Status .......................................................... 8-198
MODBUS TCP Data Exchange Example ............................ 8-201
ETH_Link_Config_Ext .................................................... 8-207
ETH_ SetServerlinkkeeptime .......................................... 8-209
ETH_Socket_Manage ..................................................... 8-210
ETH_Socket_Config ....................................................... 8-213
ETH_Socket_Open ........................................................ 8-216
ETH_Socket_Send ....................................................... 8-218
ETH_Socket_Receive ................................................... 8-222
ETH_Socket_Close ...................................................... 8-226
ETH_Socket_Status ..................................................... 8-228
Ehternet Free Protocol Example .................................... 8-231
8.14.3 RS485 Communication Instructions ....................................... 8-236
RS485_Link_Config ....................................................... 8-236
RS485_Link_Manage ..................................................... 8-241
RS485_Link_Status ....................................................... 8-243
RS485 Data Exchange Example ...................................... 8-246
RS485_RS ................................................................... 8-249
RS485 Free Protocol Example ......................................... 8-255
RS485_SetDelayTime .................................................... 8-258
8.14.4 RS232 Communication Instructions ....................................... 8-260
RS232_Link_Config ....................................................... 8-260
RS232_Link_Manage ..................................................... 8-265 8_
RS232_Link_Status ....................................................... 8-267 8_
RS232 Data Exchange Example ...................................... 8-270
RS232_RS ................................................................... 8-273
RS232 Free Protocol Example ......................................... 8-279
RS232_SetDelayTime .................................................... 8-282
8.15 String Processing Instructions ............................................. 8-284
8.15.1 CONCAT ............................................................................. 8-284
8.15.2 DELETE.............................................................................. 8-286
8.15.3 INSERT .............................................................................. 8-288
8.15.4 LEFT / RIGHT ..................................................................... 8-290
8.15.5 MID................................................................................... 8-292

8- 3
DVP-50MC Series Motion Controller Operation Manual

8.15.6 REPLACE ........................................................................... 8-294


8.15.7 LEN .................................................................................. 8-296
8.15.8 FIND ................................................................................. 8-297
8.16 Immediate Refresh Instructions ...........................................8-299
8.16.1 FROM ................................................................................ 8-299
8.16.2 TO .................................................................................... 8-303
8.16.3 ImmediateInput ................................................................. 8-307
8.16.4 ImmediateOutput ............................................................... 8-309
8.16.5 Left_Manage ...................................................................... 8-311
8.17 PID-related Instructions .......................................................8-315
8.17.1 PID ................................................................................... 8-315
8.17.2 GPWM ............................................................................... 8-325
8.18 Address Instruction ..............................................................8-327
8.18.1 ADR .................................................................................. 8-327
8.19 Network Diagnosis ................................................................8-329
8.19.1 EtherCAT Diagnosis............................................................. 8-329
EtherCAT_SysDiag ........................................................ 8-329
8.19.2 CANopen Diagnosis ............................................................. 8-331
CANopen_SysDiag ........................................................ 8-331
CANopen_NodeDiag...................................................... 8-333
CANopen_State ............................................................ 8-335
8.20 Read and Write Offset Bit Value ............................................8-337
8.20.1 SetBitOffsetValue ............................................................... 8-337
8.20.2 GetBitOffsetValue ............................................................... 8-339
8.21 FCS Instructions ...................................................................8-341
8.21.1 CRC16 .............................................................................. 8-341
8.21.2 LRC .................................................................................. 8-343

_8

8- 4
Chapter 8 Logic Instructions

8.1 Table of Logic Instructions

Instruction set Instruction code Function

R_TRIG Rising Edge Trigger

F_TRIG Falling Edge Trigger


Sequence Input/Output
RS Reset–Priority Instruction
Instructions
SR SET–Priority Instruction

SEMA Claim-Priority Instruction


Sequence Control
JMP Jump
Instructions
MOVE Move

MoveBit Move One Bit

Data Movement TransBit Move Bits


Instructions MoveDigit Move Digits

Exchange Data Exchange

Swap Swap Bytes

LT Less Than

LE Less Than or Equal to

Comparison GT Greater Than


Instructions GE Greater Than or Equal to

EQ Equal to

NE Not Equal to

TON On-Delay Timer

TOF Off-Delay Timer

TP Pulse-type Timer

Timer Instructions Sys_ReadTime Read Real-Time Clock’s Time

Sys_ReadTotalWorkTime Read Total Work Time 8_


8_
Sys_ReadPowerOnTime Read Power-On Time

Sys_WdgStatus Read Task Timeout Status

CTU Up-Counter

Counter Instructions CTD Down-Counter

CTUD Up-Down Counter

ADD Addition
Math Instructions
SUB Subtraction

8- 5
DVP-50MC Series Motion Controller Operation Manual

Instruction set Instruction code Function

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

DegToRad Degrees to Radians

RadToDeg Radians to Degrees

SIN Sine

COS Cosine

TAN Tangent

ASIN Arc sine

ACOS Arc cosine

ATAN Arc tangent

LN Natural Logarithm

LOG Base-10 Logarithm

SQRT Square Root

EXP Natural Exponential Operation

EXPT Exponentiation

RAND Random Number

TRUNC Truncate

FLOOR Real-Number Floor

_8 FRACTION Real-Number Fraction

AND Logical AND

OR Logical OR

Bit String Instructions NOT Bit Reversal

XOR Logical Exclusive OR

XORN Logical Exclusive NOR

SHL Shift Bits Left

Shift Instructions SHR Shift Bits Right

ROL Rotate Bits Left

8- 6
Chapter 8 Logic Instructions

Instruction set Instruction code Function

ROR Rotate Bits Right

MAX Maximum

MIN Minimum

SEL Selection

Selection Instructions MUX Multiplexer

LIMIT Limiter

BAND Deadband Control

ZONE Dead Zone Control

BOOL_TO_*** Bool Conversion Group

Bit strings_TO_*** Bit String Conversion Group

Data Type Conversion Integers_TO_*** Integer Conversion Group


Instructions Real numbers_TO_*** Real Number Conversion Group

Times,dates_TO_*** Time and Data Conversion Group

Text strings_TO_*** String Conversion Group

DMC_ReadParameter_CANopen Read a parameter value

DMC_WriteParameter_CANopen Write a parameter value

ETH_Link_Config Configure MODBUS TCP data exchange


Enable/disable MODBUS TCP data
ETH_Link_Manage
exchange
Watch MODBUS TCP data exchange
ETH_Link_Status
status
Configure the extension parameters for
ETH_Link_Config_Ext
MODBUS TCP exchange
Set the connection duration time as the
ETH_ SetServerlinkkeeptime
controller works as a slave
ETH_Socket_Manage Manage Socket TCP/UDP
Communication Configure Socket data exchange
Instructions ETH_Socket_Config
parameters
ETH_Socket_Open Enable Socket 8_
8_
ETH_Socket_Send Send Socket data

ETH_Socket_Receive Receive Socket data

ETH_Socket_Close Disable Socket

ETH_Socket_Status Read Socket status

RS485_Link_Manage Manage RS485 communication


Configure RS485 communication
RS485_Link_Config
parameters
RS485_Link_Status Watch RS485 communication status

8- 7
DVP-50MC Series Motion Controller Operation Manual

Instruction set Instruction code Function

RS485_RS Configure RS485 free protocol parameters


Set RS485 communication response delay
RS485_SetDelayTime
time
RS232_Link_Manage Manage RS232 communication
Configure RS232 communication
RS232_Link_Config
parameters
RS232_Link_Status Watch RS232 communication status

RS232_RS Configure RS232 free protocol parameters


Set RS232 communication response delay
RS232_SetDelayTime
time
CONCAT Concatenate String

DELETE Delete String

INSERT Insert String

String Processing LEFT / RIGHT Get String Left/Right


Instructions MID Get String

REPLACE Replace String

LEN String Length

FIND Find String

FROM Read CR value

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

Address Instruction ADR Get Address

_8 EtherCAT_SysDiag EtherCAT system diagnosis

CANopen_SysDiag CANopen system diagnosis


Network Diagnosis
CANopen_NodeDiag CANopen Slave Diagnosis

CANopen_State CANopen Master Diagnosis

SetBitOffsetValue Set the value of the specified bit


Read and Write Offset
Bit Value GetBitOffsetValue Read the value of the specified bit

CRC16 Calculate CRC Value


FCS Instructions
LRC Calculate LRC Value

8- 8
Chapter 8 Logic Instructions

8.2 Explanation of Logic Instructions


8.2.1 EN and ENO
If the used instruction has EN and ENO inputs and the value of EN is FALSE (0), the function of the instruction
will not be performed and the output of the instruction will not be updated. However, if the value of EN of the
instruction is TRUE (1), the function of the instruction will be performed and the output will be updated.
The output state of ENO is consistent with that of EN. When EN is TRUE, ENO changes to TRUE. When EN
is FALSE, ENO changes to FALSE.
When the instruction is a function block (FB) and its EN changes from TRUE to FALSE after the FB instruction
is executed, the execution of the FB instruction will continue, but the output values of the FB instruction will
not be updated.

8.3 Sequence Input /Output Instructions


8.3.1 R_TRIG
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB R_TRIG is used for the rising edge trigger. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
R_TRI G_ins tan ce
R_TRIG
EN E NO
CL K Q

 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

 The variable table and program


Variable name Data type Initial value
R_TRG R_TRIG
R_TRG_EN BOOL FALSE
R_TRG_CLK BOOL FALSE
R_TRG_Q BOOL

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

8.4 Sequence Control Instructions


8.4.1 JMP
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
JMP is used for jumping to any position specified by a
FC DVP50MC11P/DVP50MC11P-06
label in the LD program.
DVP50MC11T-04S/DVP50MC11T-16S

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

8.5 Data Movement Instructions


8.5.1 MOVE
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FC Move is used for moving data. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S

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

Mov Bit_InPos=U IN T#2


bit7 bit0
MovBit_In 0 0 0 1 1 1 1 1

bit7 bit0
M ovBit_InOut 0 0 0 0 1 0 0 0

MovBi t_InOutPos=U IN T#3

_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

Trs Bi t_InOutPos= UINT#2

_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

Bi t15 ...... B it1 2 Bi t11 ...... Bi t8 Bi t7 ...... B it4 B i t3 ...... Bi t0

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

D igit 3 Di git 2 Di git 1 Digit 0


InOutPos= 2
Bi t15 ...... B it1 2 Bi t11 ...... Bi t8 Bi t7 ...... B it4 B i t3 ...... Bi t0

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

In1 Ex c hg_I n1 Ex c hg_In 2 I n1

In2 Ex c hg_I n2 Ex c hg_In 1 I n2

The v alues of In 1 a nd In2 are ex c hanged .

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

Hig h b yte Lo w byte

_8

8- 3 0
Chapter 8 Logic Instructions

8.6 Comparison Instructions


8.6.1 LT
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
LT is used for a less-than comparison of two or more
FC DVP50MC11P/DVP50MC11P-06
variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S

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.

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

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

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

 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

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

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

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

 Precautions for Correct Use

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  The variable table and program


Variable name Data type Current value
GE_EN BOOL TRUE
GE_In1 TIME T#100ms
GE_In2 TIME T#50ms
Out1 BOOL TRUE
GE 1
G E_E N EN ENO
GE_I n1 In1 Out O ut1
GE_I n2 In2

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.

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

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

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

 The variable table and program


Variable name Data type Current value
NE_EN BOOL TRUE
NE _In1 TIME T#10ms
NE _In2 TIME T#50ms
Out1 BOOL TRUE
NE 1
_8 NE_ EN EN ENO
NE_ In1 In 1 O ut Out1
NE_ In2 In2

8- 4 2
Chapter 8 Logic Instructions

8.7 Timer Instructions


8.7.1 TON
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB TON is used for the ON delay. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
TO N_in st ance
TON
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
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

 The variable table and program


Variable name Data type Initial value
TOF1 TOF
TOF1_EN BOOL FALSE
TOF1_In BOOL FALSE
TOF1_PT TIME
TOF1_Q BOOL
TOF1_ET TIME
TO F1
TOF 1
TO F1 _EN EN ENO
TOF1_I n In Q TOF1_Q
TO F1_PT PT ET TOF1_ET

 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

Sys _ReadTotalWork Time_ins tance


Sys _ReadTotalWorkTime
Enable Done
Tota lWorkTime

 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

Sys _ReadP owerOnTime_insta nce


Sys _ReadPowerO nTime
Enable Done
PowerOnTime

 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

The Sys_WdgStatus instruction is used to read whether DVP50MC11T/DVP50MC11T-06


FB or not the execution time of the specified task exceeds DVP50MC11P/DVP50MC11P-06
the allowed setting time (watchdog time). DVP50MC11T-04S/DVP50MC11T-16S

Sys_WdgStat us_instance
Sys_WdgStat us
Enable Valid

TaskP riority Error

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

_8  When Enable changes from TRUE to


FALSE.
Valid  When Enable changes to TRUE
 When Error changes from FALSE to
TRUE.

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

 Output Update Timing Chart


Case 1 Case 2 Case 3

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

8.8 Counter Instructions


8.8.1 CTU
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB CTU is used as an up counter. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
CTU_insta nce
CTU
EN E NO
CU Q
Rese t CV
PV

 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

 Precautions for Correct Use


 While Reset is TRUE, the counter will not count up.
 When CV equals PV, the counter stops counting.

 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

Case 1: If CTU counts up normally, the value of CTU1_CV is increased by 1 whenever


CTU1_CU is triggered once.
Case 2: When CTU1_CV equals CTU1_PV, CTU1_Q is TRUE and CTU stops counting.
Case 3: When CTU1_Reset is TRUE, CTU1_CV is cleared to 0, CTU1_Q is FALSE. And the
counter will not count when CTU1_CU is triggered. 8_
8_

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

Case 1: If CTUD counts up normally, the value of CTUD1_CV is increased by 1 whenever


CTUD1_CU is triggered once.
Case 2: When CTUD1_Reset is TRUE, CTUD1_CV is cleared to 0, CTUD1_QU changes to FALSE
and CTUD1_QD changes to TRUE.

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

8.9 Math Instructions


8.9.1 ADD
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
ADD is used for the addition operation of two or more
FC DVP50MC11P/DVP50MC11P-06
variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S

ADD
EN ENO
In1 Ou t
. .
. .
. .
InN

 Parameters

Parameter Input/
Meaning Description Valid range
name Output

Depends on the data type of


In1 Augend Input Augend the variable that the input
parameter is connected to.

The maximum number of


addends is 7, which means
that N can be 2~8 and the Depends on the data type of
In2 to InN Addend Input number can be increased or the variable that the input
reduced via the programming parameter is connected to.
software in creating a
program.
Depends on the data type of
The addition result of In1 to
Out Sum Output the variable that the output
InN
parameter is connected to.
Boolean

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.

In put pa rameter Addition


In 1
Out put
paramet er
In2 Res ult
a ss ignment O ut

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.

I nput p aramete r Ou tput


Su btraction
parame ter
Result
In1 In2 assig nment
Out

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

1. In1 is TIME, In2 is TIME and Out is TIME;


2. In1 is TOD, In2 is TIME and Out is TOD;
3. In1 is TOD, In2 is TOD and Out is TIME;
4. In1 is DATE, In2 is DATE and Out is TIME;
5. In1 is DT, In2 is DT and Out is TIME;
6. In1 is DT, 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 difference between In1 and In2 may be out of the valid range of the data type of Out.
For example, the data types of “SUB _In1” and “SUB _In2” are both INT with their respective values,
-32768 and 1. If the data type of the output variable is INT, the output variable value will be 32767
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 -32769 as shown in the following table, variable 2.

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

In put pa rameter Multiplicat ion

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.

 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 multiplication result of In1 ~ In2 may be out of the valid range of the data type of Out.
For example, the data types of “MUL _In1” and “MUL _In2” are both INT with their respective values,
20000 and 2. If the data type of the output variable is INT, the output variable value will be -25536
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 40000 as shown in the following table, Variable 2.

 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

 The variable table and program


Variable name Data type Initial value
MUL_EN BOOL TRUE
MUL _In1 INT 10
MUL _In2 INT 50
Out1 INT 500

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.

 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.
 The division result of In1 and In2 may be out of the valid range of the data type of Out.
For example, the data types of “DIV _In1” and “DIV _In2” are both INT with their respective values, -
32768 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.

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

Divis ion res ult


I n1 10 / In2 3 = 3 Ou t1 3 INT

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.

The variable table and program


Variable name Data type Initial value
DIV_EN BOOL TRUE
DIV_In1 INT 100
DIV_In2 INT 20
Out1 INT 5

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

 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.
 Programming Example
 The data types of variables MOD _In1, MOD _In2 and Out1 are all INT. The values of MOD _In1
and MOD _In2 are 10 and 4 respectively. The value of Out1 is 2 when MOD _EN changes to
TRUE.
The Variable and program
Variable name Data type Current value
MOD_EN BOOL TRUE
MOD _In1 INT 10
MOD _In2 INT 4
Out1 INT 2

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

 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.
 Programming Example
 The data types of variables MODTURNS _In1, MODTURNS _In2 are both REAL and Out1 is
DINT. The values of MODTURNS _In1 and MODTURNS _In2 are 800.23 and 360.0 respectively.
The value of Out1 is 2 when MODTURNS _EN changes to TRUE.

The variable table and program


Variable name Data type Current value
MODTURNS_EN BOOL TRUE
MODTURNS _In1 REAL 800.23
MODTURNS _In2 REAL 360.0
Out1 DINT 2

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

 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.
 Programming Example
 The data types of variables MODABS _In1 and MODABS _In2 are both REAL and the data type of
Out1 is LREAL. The values of MODABS _In1 and MODABS _In2 are 400.23 and 360.0
respectively. The value of Out1 is 40.2300109863281 when MODABS _EN changes to TRUE. The
values of MODABS _In1 and MODABS _In2 are -400.23 and 360.0 respectively. The value of Out1
is 319.769989013672 when MODABS _EN changes to TRUE.
 Variable 1
Variable name Data type Current value
MODABS_EN BOOL TRUE
MODABS _In1 REAL 400.23
MODABS _In2 REAL 360.0
Out1 LREAL 40.2300109863281
 Variable 2
Variable name Data type Current value
MODABS_EN BOOL TRUE
MODABS _In1 REAL -400.23
MODABS _In2 REAL 360.0
Out1 LREAL 319.769989013672
 The program
MO DABS
MO DA BS_E N EN ENO
MO DABS_ In1 In1 Ou t O ut1
MO DABS_ In2 In2

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.

 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 ABS _In and Out1 are both INT and the value of ABS _In is -10. The
value of Out1 is 10 when ABS _EN changes to TRUE. The value of Out1 is 20 as ABS_In is 20.
 Variable 1

8- 8 2
Chapter 8 Logic Instructions

Variable name Data type Current value


ABS_EN BOOL TRUE
ABS _In INT -10
Out1 INT 10
 Variable 2
Variable name Data type Current value
ABS_EN BOOL TRUE
ABS _In INT 20
Out1 INT 20
 The program
A BS 1
AB S_E N EN EN O
A BS _In In Out Out1

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.

Out In :Angle (i n radi ans ) data


Out : Result ( Sine )
_8 1

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

 Precautions for Correct Use


 The input variable setting is not allowed to omit. An error will occur during the compiling of the
software if any input variable setting is omitted. But the output variable setting is allowed to omit.
 Programming Example
 The data types of variables SIN _In and Out1 are INT and LREAL respectively. The value of Out1
is -0.54402111088937 if the value of SIN _In is 10 when SIN _EN changes to TRUE. The value of
Out1 is 0.54402111088937 as SIN _In is -10.
 Variable 1
Variable name Data type Current value
SIN_EN BOOL TRUE
SIN_In INT 10
Out1 LREAL -0.54402111088937
 Variable 2
Variable name Data type Current value
SIN_EN BOOL TRUE
SIN_In INT -10
Out1 LREAL 0.54402111088937
 The program
SIN 1
SIN_E N EN ENO
SI N_ In In Out O ut1

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.

Out In: Angle ( in radians ) data


_8 Out: Result ( Cosine )
1

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

 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 COS _In and Out1 are INT and LREAL respectively. The value of Out1
is -0.839071529076452 if the value of COS _In is 10 when COS _EN changes to TRUE. The value
of Out1 is -0.839071529076452 as COS _In is -10.
 Variable 1
Variable name Data type Current value
COS_EN BOOL TRUE
COS_In INT 10
Out1 LREAL -0.839071529076452
 Variable 2
Variable name Data type Current value
COS_EN BOOL TRUE
COS_In INT -10
Out1 LREAL -0.839071529076452
 The program
COS 1
CO S_E N EN ENO
COS_ In In Out O ut1

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

In : Input data ( Sine )

_8 Out: As ine ( in r adians )

π
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

 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 value of Out varies between -π/2 and π/2 when the value of In changes between -1.0 and 1.0.
The instruction will not go to the error state if the value of In is out of -1.0 ~1.0 and the value of Out
is nonnumeric as shown in the following table and program.

The variable table and program


Variable name Data type Current value
ASIN_EN BOOL TRUE
ASIN_In REAL 2.0
Out1 LREAL 1.#QNAN
ASI N 1
AS IN_EN EN E NO
A SIN_I n In Out Ou t1

 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

In: Input data ( C osi ne )


Out:Ar c co si ne ( i n radians )

_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

 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 value of Out varies between 0 and π when the value of In changes between -1.0 and 1.0. The
instruction will not go to the error state if the value of In is out of -1.0 ~1.0 and the value of Out is
nonnumeric.

The variable table and program


Variable name Data type Current value
ACOS_EN BOOL TRUE
ACOS_In REAL 2.0
Out1 LREAL 1.#QNAN

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

 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 -π/2 if the input value of In is -∞. The output value of Out is π/2 if the
input value of In is +∞.
 Programming Example
 The data types of variables ATAN_In and Out1 are REAL and LREAL respectively. The value of
Out1 is 0.785398163397448 if the value of ATAN_In is 1.0 when ATAN_EN changes to TRUE. The
value of Out1 is -0.785398163397448 as ATAN_In is -1.0.
 Variable 1
Variable name Data type Current value
ATAN_EN BOOL TRUE
ATAN_In REAL 1.0
Out1 LREAL 0.785398163397448
 Variable 2
Variable name Data type Current value
ATAN_EN BOOL TRUE
ATAN_In REAL -1.0
Out1 LREAL -0.785398163397448
 The program

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.

The variable table and program


Variable name Data type Current value
LOG_EN BOOL TRUE
LOG_In REAL -2.0
Out1 LREAL 1.#QNAN

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

8.10 Bit String Instructions


8.10.1 AND
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
AND is used for performing a logical AND operation of
FC DVP50MC11P/DVP50MC11P-06
two or more variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S

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

 The variable table and program


Variable name Data type Current value
AND_EN BOOL TRUE
AND_In1 BYTE 255
AND_In2 WORD 256
Out1 WORD 0

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

 The data type of Out must be the same as In.


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

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

Variable name Data type Current value


XOR_EN BOOL TRUE
XOR _In1 BYTE 10
XOR _In2 BYTE 50
Out1 BYTE 56
 Variable 2
Variable name Data type Current value
XOR_EN BOOL TRUE
XOR_In1 BYTE 255
XOR_In2 WORD 256
Out1 WORD 511
 The program
X OR 1
XO R_ EN EN ENO
XO R_In1 In 1 O ut Out 1
XO R_In2 In2

_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

8.11 Shift Instructions


8.11.1 SHL
FB/FC Explanation Applicable model
SHL is used to shift all bits of a variable or constant by DVP50MC11T/DVP50MC11T-06
FC the specified number of bits to the left and the result is DVP50MC11P/DVP50MC11P-06
output to Out. DVP50MC11T-04S/DVP50MC11T-16S

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

Num=2, shifte d by t wo bits t oward t he le ft


Bit 7 Bit0
In 1 0 1 1 0 1 0 1

Discarded

fill 0

Out 1 1 0 1 0 1 0 0

 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 value of Out is the same as In when the value of Num is 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

 Illustration of the example


B it15 Bit0
SHL_In 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0

3 bit s dis carde d


SHL_Num= 3,
s hifte d by t hree bits left 0 f or 3 sup plementa ry
bit s

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

Num= 2, shif ted by two bits to wa rd th e right


B it 7 Bit0
In 1 0 1 1 0 1 0 1

Disc arded

Fill 0

Out 0 0 1 0 1 1 0 1

 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.
 When the value of Num is 0, the value of Out is the same as In.

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

 The variable table and program


Variable name Data type Current value
SHR_EN BOOL TRUE
SHR_In UINT 300
SHR_Num USINT 3
Out1 UINT 37
SHR 1
SHR_EN EN E NO
SHR_I n In Out Ou t1
SHR_Num Num

 Illustration of the example


Bit 15 B it 0
SHR_In 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0

SH R_ N um =3 , 3 bits disc arded


sh i fted by 3 bi ts righ t

0 fo r 3 supp le mentary bits

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

 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 value of Out is the same as In when the value of Num is 0.
 The number of bits by which the bits of original data are rotated left is equal to the value of Num
MOD In when the value of Num is greater than the number of bits of the value of In.
For example, if the data type of In is BYTE, the value of out when Num=USINT#1 is the same for
when Num=USINT#9.

 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

 Illustration of the example


B it 15 B it0
RO L_In 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0

Bit1 5 Bit 0
Out 1 0 0 0 0 1 0 0 1 0 1 1 0 0 0 0 0

ROL_Num= 3 , rotat ed by three b it s t o the lef t

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

B it 7 B it0 Bit 7 Bit 0


In 1 0 1 1 0 1 0 1 0 1 1 0 1 1 0 1 Out

8- 1 3 8
Chapter 8 Logic Instructions

 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 value of Out is the same as In when the value of Num is 0.
 The number of bits by which the bits of data are rotated to the right is equal to the value of Num
MOD In when the value of Num is greater than the number of bits of the value of In.
For example, if the data type of In is BYTE, the value of out when Num=USINT#1 is the same for
when Num=USINT#9.

 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

 Illustration of the example


Bit15 Bit0
ROR_I n 0 0 0 0 0 0 0 1 0 0 1 0 1 1 0 0

B it 15 B it0
Out 1 1 0 0 0 0 0 0 0 0 0 1 0 0 1 0 1

ROR_Num= 3 , rotat ed by three b it s t o the right

8_
8_

8- 1 3 9
DVP-50MC Series Motion Controller Operation Manual

8.12 Selection Instructions


8.12.1 MAX
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
Max is used for finding the largest value of two or more
FC DVP50MC11P/DVP50MC11P-06
variables or constants.
DVP50MC11T-04S/DVP50MC11T-16S

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.

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

The value of K The value of Out


0 In0
1 In1
2 In2
3 In3
4 In4
5 In5
6 In6
7 In7
 When the data types of input variables are not BOOL, TIME, DATE, TOD or STRING, the input
parameters In0~InN 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 In0
is TIME, the data types of the variables connected to In1~InN 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 ~ InN connect. Otherwise, an error will occur during the compiling of the
software.

 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

8.13 Data Type Conversion Instructions


8.13.1 BOOL_TO_***
FB/FC Explanation Applicable model
BOOL_TO_*** instructions convert boolean data into DVP50MC11T/DVP50MC11T-06
FC the data of basic data types. “***” can be any basic data DVP50MC11P/DVP50MC11P-06
type. DVP50MC11T-04S/DVP50MC11T-16S

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

B OOL _TO _DWORD BOO L_TO _LW ORD


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

BOO L_TO _UINT BO OL_ TO _INT


EN E NO EN E NO
In Out In Out

BOO L_TO_UDINT BO OL_TO_DI NT


EN E NO EN E NO
In Out In Out

BOO L_TO_ULI NT BO OL_TO_L 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

 BOOL to Real number


 Relevant instructions:
BO OL_TO_RE AL BO OL_TO_L RE AL
EN E NO EN E NO
In Out In Out

 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

 BOOL to Time and Date


 Relevant instructions:
BO OL_ TO_ TI ME BO OL_ TO _DATE
EN E NO EN E NO
In Out In Out

BO OL_TO_TOD BOO L_TO_DT


EN E NO EN E NO
In Out In Out

 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

8.13.2 Bit strings_TO_***


FB/FC Explanation Applicable model
Bit strings_TO_*** instructions convert bit-string data DVP50MC11T/DVP50MC11T-06
FC into the data of basic data types. “***” can be any basic DVP50MC11P/DVP50MC11P-06
data type. DVP50MC11T-04S/DVP50MC11T-16S

Bit S trings_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
 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

DWO RD_TO _WORD LWORD_TO_B YTE


EN E NO EN E NO
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

BY TE _TO _WORD Bit7 Bit0


EN ENO In 1 0 1 1 0 1 0 1 B YTE
In Out

_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

The greate r-d ata are conv erted


t o the les s-lengt h da ta
B it15 B it 8 Bit7 B it0
In * * * * * * * * 1 0 1 1 0 1 0 1 WORD
Not c onv erted

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

Data type The value of In corresponds to the value of Out


In Out In Out
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
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
 Bit string to Real number
 The Bit-string data can be converted to the Real-number data. And some instructions are
shown below.
BYTE_ TO _REAL BYTE_ TO _LREAL
EN ENO EN ENO
In Out In Out

LWORD_TO_REA L LWO RD_TO_ LREAL


EN ENO EN ENO
In Out In Out

 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

 Bit string to Time and Date


 The Bit-string data can be converted to the Time or Date data. And some instructions are
shown below.
B YTE_TO_TIME B YTE_TO_DATE
EN ENO EN ENO
In Out In Out

LWO RD_TO_ TOD LWO RD_TO_DT


EN ENO EN ENO
In Out In Out

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

 Bit string to String


 The Bit-string data can be converted to the String data. And some instructions are shown
below.
BY TE _TO _STRING WORD_TO_STRING
EN ENO EN ENO
In Ou t In O ut

DWO RD_ TO _STRING LWO RD_TO_ STRI NG


EN ENO EN ENO
In O ut In O ut

 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

US INT_ TO _DWORD UINT_TO_LWORD


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

Data type The value of In corresponds to the value of Out


In Out In Out
WORD 16#****_0000~16#****_FFFF 16#0000~16#FFFF
DWORD 16#0000_0000~16#FFFF_FFFF 16#0000_0000~16#FFFF_FFFF
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~
WORD 16#0000~16#FFFF
16#****_****_****_FFFF
ULINT
16#****_****_0000_0000~
DWORD 16#0000_0000~16#FFFF_FFFF
16#****_****_FFFF_FFFF
16#0000_0000_0000_0000~ 16#0000_0000_0000_0000~
LWORD
16#FFFF_FFFF_FFFF_FFFF 16#FFFF_FFFF_FFFF_FFFF
BYTE 16#00~16#FF 16#00~16#FF
WORD 16#00~16#FF 16#0000~16#00FF
SINT 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
INT 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
BYTE 16#****_**00~16#****_**FF 16#00~16#FF
WORD 16#****_0000~16#****_FFFF 16#0000~16#FFFF
DINT DWORD 16#0000_0000~16#FFFF_FFFF 16#0000_0000~16#FFFF_FFFF
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~
WORD 16#0000~16#FFFF
16#****_****_****_FFFF
LINT
16#****_****_0000_0000~
DWORD 16#0000_0000~16#FFFF_FFFF
16#****_****_FFFF_FFFF
16#0000_0000_0000_0000~ 16#0000_0000_0000_0000~
LWORD
_8 16#FFFF_FFFF_FFFF_FFFF 16#FFFF_FFFF_FFFF_FFFF
 Integer to Integer
 The Integer data can be converted to the Integer data. And some instructions are shown
below.

S INT_ TO _INT INT_TO _SI NT


EN ENO EN ENO
In O ut In O ut

USI NT_TO_DI NT UI NT_TO_ UL INT


EN ENO EN ENO
In O ut In O ut

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

Data type The value of In corresponds to the value of Out


In Out In Out
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
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
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
SINT 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
_8 INT 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
DINT 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
16#****_**00~16#****_**7F 0~127
SINT
16#****_**80~16#****_**FF -128~-1
INT 16#****_0000~16#****_7FFF 0~32767

8- 1 6 8
Chapter 8 Logic Instructions

Data type The value of In corresponds to the value of Out


In Out In Out
DINT 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
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

USINT_TO_TOD UI NT_ TO_ DT


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

Data type The value of In corresponds to the value of Out


In Out In Out
DT#1970-1-1-0:0:0~ DT#1970-
DT 16#0000~16#FFFF
1-1-18:12:15
T#0ns~
TIME 16#00000000~16#FFFFFFFF
T#4s294ms967us295ns
DATE 16#00000000~16#FFFFFFFF D#1970-1-1~D#2016-2-7
16#00000000~16#05265BFF
UDINT 16#05265C00~16#0A4CB7FF TOD#0:0:0~ TOD#23:59:59.999
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
16#********00000000~
DATE D#1970-1-1~D#2016-2-7
16#********FFFFFFFF
16#********00000000~
16#********0A4CB7FF
ULINT 16#********05265C00~ TOD#0:0:0~ TOD#23:59:59.999
TOD 16#********0A4CB7FF
……
16#********00000000~
TOD#0:0:0~ TOD#17:2:47.295
16#********FFFFFFFF
16#********00000000~ DT#1970-1-1-0:0:0~ DT#2016-
DT
16#********FFFFFFFF 2-7-6:28:15
TIME 16#00~16#FF T#0ns~T#255ns
DATE 16#00~16#FF D#1970-1-1
SINT 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
INT 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

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

Data type The value of In corresponds to the value of Out


In Out In Out
16#********00000000~
TOD#0:0:0~ TOD#23:59:59.999
16#********0A4CB7FF
16#********05265C00~
TOD 16#********0A4CB7FF
……
16#********00000000~
TOD#0:0:0~ TOD#17:2:47.295
16#********FFFFFFFF
16#********00000000~ DT#1970-1-1-0:0:0~ DT#2016-
DT
16#********FFFFFFFF 2-7-6:28:15

 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

USI NT_ TO _STRING UI 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

8.13.4 Real numbers_TO_***


FB/FC Explanation Applicable model
Real numbers_TO_*** instructions convert real DVP50MC11T/DVP50MC11T-06
FC numbers into the data of basic data types. “***” can be DVP50MC11P/DVP50MC11P-06
any basic data type. DVP50MC11T-04S/DVP50MC11T-16S

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:

REA L_TO_BO OL LREAL_TO_ BOO L


EN ENO EN ENO
In O ut In O ut 8_
8_

 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

Data type The value of In corresponds to the value of Out


In Out In Out
-2.22507385850721E-308
0 FALSE
2.22507385850721E-308~
TRUE
1.79769313486231E+308
 Real Number to Integer
 Real numbers can be converted to integers. And some instructions are shown below.
REAL_ TO _SINT REA L_TO _USI NT
EN ENO EN ENO
In O ut In O ut

LREA L_TO_DINT L RE AL_TO_L INT


EN ENO EN ENO
In O ut In O ut

 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

 Real Number to Bit string


 Real numbers can be converted to bit strings. And some instructions are shown below.
RE AL_TO_B YTE REAL_ TO_ WORD
EN ENO EN ENO
In O ut In O ut

L RE AL_TO_DWO RD LREAL _TO _LWO RD


EN ENO EN ENO
In O ut In O ut

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

 Real Number to Time or Date


 Real numbers can be converted to times or dates. And some instructions are shown below.
RE AL_TO_TIME REAL _TO _DATE
EN ENO EN E NO
In O ut In Out

LREA L_TO_TOD L RE AL_TO_DT


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

TI ME_TO_TOD TO D_TO _DT


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

STRI NG_TO_DINT STRING_ TO _ULINT


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.

 String to Real Number


 Strings can be converted to real numbers. And some instructions are shown below.

S TRI NG _TO _REAL S TRING _TO _LREAL


EN ENO EN ENO
In O ut In O ut

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

 String to Time or Date


 Strings can be converted to times and dates. And some instructions are shown below.
S TRI NG _TO _TIME S TRI NG _TO _DATE
EN ENO EN ENO
In O ut In O ut

S TRI NG _TO_TOD STRING _TO _DT


EN ENO EN ENO
In O ut In O ut 8_
8_
 For the string-to-time or date conversion, the string is required to represent the time or date
value such as ’T#1ns’, ’D#1970-1-1’, ’TOD#0:0:0’ and ’DT#1970-1-1-0:0:0’. The conversion
examples are shown in the following table.
Output result
Input value
Data type Output value
’T#1ns’ TIME T#1ns
’D#1970-1-1’ DATE D#1970-1-1
’TOD#0:0:0’ TOD TOD#0:0:0
’DT#1970-1-1-0:0:0’ DT DT#1970-1-1-0:0:0

8- 1 7 9
DVP-50MC Series Motion Controller Operation Manual

 String to Bit String


 Strings can be converted to bit strings. And some instructions are shown below.
STRING _TO _BYTE S TRING _TO _WORD
EN ENO EN ENO
In O ut In O ut

S TRI NG _TO _DWORD STRING_TO_LWORD


EN ENO EN ENO
In O ut In O ut

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

8.14 Communication Instructions


8.14.1 CANopen Communication Instructions
DMC_ReadParameter_CANopen
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
DMC_ReadParameter_CANopen is used to read a
FB DVP50MC11P/DVP50MC11P-06
parameter value of a slave.
DVP50MC11T-04S/DVP50MC11T-16S
DMC_ReadP arameter_CANopen_instance
DMC_ReadParameter_CANopen
Axis Done
Execut e Busy
Index Active
SubIndex Error
ErrorI D
Dat aType
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.
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 index and subindex of the slave parameter to be read:


1. The user-defined parameter is a servo drive parameter to be read. The data length is specified
by users according to the data type of the read parameter. The data length of the byte
parameter is 1, the data length of the word parameter is 2 and the data length of the double-
word parameter is 4.

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

Variable name Data type Current value


WritePm_C_Bsy BOOL FALSE
WritePm_C_Act BOOL FALSE
WritePm_C_Err BOOL FALSE
WritePm_C_ErrID WORD FALSE
ReadPm_C2 DMC_ReadParameter_CANopen
ReadPm_C2_Done BOOL TRUE
ReadPm_C2_Bsy BOOL FALSE
ReadPm_C2_Act BOOL FALSE
ReadPm_C2_Err BOOL FALSE
ReadPm_C2_ErrID WORD FALSE
ReadPm_C2_DaTy USINT 2
ReadPm_C2_Dat UDINT 1000

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

 The first DMC_ReadParameter_CANopen starts being executed as ReadPm_C1_Ex changes


from FALSE to TRUE. When the execution of the first DMC_ReadParameter_CANopen is
completed, ReadPm_C1_Done changes to TRUE, ReadPm_C1_DaTy = 2 and
ReadPm_C1_Dat=5000.
That is, the content of the servo slave parameter P1-55 which is read is 5000. (The maximum
speed of the servo is limited to 5000rpm.)
 As ReadPm_C1_Done changes from FALSE to TRUE, DMC_WriteParameter_CANopen
starts being executed. When the DMC_WriteParameter_CANopen instruction execution is
completed, WritePm_C_Done changes to TRUE. That is, 1000 is written as the content of the
servo slave parameter P1-55. (The maximum speed of the servo is limited to 1000rpm.)
 The second DMC_ReadParameter_CANopen is executed as WritePm_C_Done changes from
FALSE to TRUE. When the execution of the second DMC_ReadParameter_CANopen is
completed, ReadPm_C2_Done changes to TRUE, ReadPm_C2_DaTy = 2 and
ReadPm_C2_Dat=1000. That is, the read content of the servo slave parameter P1-55 is 1000.
(The maximum speed of the servo is limited to 1000rpm.)

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

 Output Update Timing


Parameter Name Timing for changing to TRUE Timing for changing to FALSE
 When Execute changes from
 When the writing 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
 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
 Timing Chart

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

Variable name Data type Initial value


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
WritePm_C_Bsy BOOL FALSE
WritePm_C_Act BOOL FALSE
WritePm_C_Err BOOL FALSE
WritePm_C_ErrID WORD FALSE
ReadPm_C2 DMC_ReadParameter_CANopen
ReadPm_C2_Done BOOL TRUE
ReadPm_C2_Bsy BOOL FALSE
ReadPm_C2_Act BOOL FALSE
ReadPm_C2_Err BOOL FALSE
ReadPm_C2_ErrID WORD FALSE
ReadPm_C2_DaTy USINT 2
ReadPm_C2_Dat UDINT 1000

_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

 When ReadPm_C1_Ex changes from FALSE to TRUE, the first


DMC_ReadParameter_CANopen starts being executed. After the execution of the first
DMC_ReadParameter_CANopen is completed, ReadPm_C1_Done changes to TRUE,
ReadPm_C1_DaTy =2 and ReadPm_C1_Dat=5000. That is, the content of the servo slave
parameter P1-55 which is read is 5000. (The maximum speed of the servo is limited to 5000rpm.)
 When ReadPm_C1_Done changes from FALSE to TRUE, the DMC_ WriteParameter
_CANopen instruction starts being executed. After the execution of the
DMC_WriteParameter_CANopen instruction is completed, WritePm_C_Done changes to TRUE.
That is, the content of the servo slave parameter P1-55 which is written is 1000. (The maximum
speed of the servo is limited to 1000rpm.)
 When WritePm_C_Done changes from FALSE to TRUE, the second DMC_ ReadParameter
_CANopen instruction starts being executed. After the execution of the second DMC_
ReadParameter _CANopen instruction is completed, ReadPm_C2_Done changes to TRUE,
ReadPm_C2_DaTy =2 and ReadPm_C2_Dat=1000. That is, the content of the servo slave
parameter P1-55 which is read is 1000. (The maximum speed of the servo is limited to 1000rpm.)

_8

8- 1 9 0
Chapter 8 Logic Instructions

8.14.2 Ethernet Instructions


ETH_Link_Config
FB/FC Explanation Applicable model
ETH_Link_Config is used for configuring parameters DVP50MC11T/DVP50MC11T-06
FB for MODBUS TCP data exchange at the Ethernet port DVP50MC11P/DVP50MC11P-06
of the controller. DVP50MC11T-04S/DVP50MC11T-16S
E T H_Link_Config_instance
E TH_Link_Config
Execute Done
LinkNum Error
EnableLink ErrorID
SlaveIP _segment1
SlaveIP _segment2
SlaveIP _segment3
SlaveIP _segment4
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.
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

0~255 When Execute


Set the first segment of the
SlaveIP_segment1 USINT changes from
target IP address (0)
FALSE to TRUE

0~255 When Execute


Set the second segment of
SlaveIP_segment2 USINT changes from
the target IP address (0)
FALSE to TRUE

8- 1 9 1
DVP-50MC Series Motion Controller Operation Manual

Valid range
Parameter name Function Data type Validation timing
(Default)

0~255 When Execute


Set the third segment of
SlaveIP_segment3 USINT changes from
the target IP address (0)
FALSE to TRUE

0~255 When Execute


Set the fourth segment of
SlaveIP_segment4 USINT changes from
the target IP address (0)
FALSE to TRUE

0~255 When Execute


Set the node ID of the
SlaveNodeID USINT changes from
MODBUS slave (0)
FALSE to TRUE
Set the type of slave
registers to be read and
0~1 When Execute
written.
ObjType USINT changes from
0:Word register (0)
FALSE to TRUE
1:Bit register

TRUE or FALSE When Execute


Set the function code 17 to
En_FunCode17 BOOL changes from
be used or not. (FALSE)
FALSE to TRUE
Specify the starting
%MW0~%MW32 When Execute
register of the master
Write_Buffer_Address UINT 767 changes from
where data to be sent are
%QW0~%QW63 FALSE to TRUE
stored.
Set the offset of the
starting register of the
master sending data.
The setting value 1 means
the offset is 1 word if data 0~255 When Execute
Write_Buffer_Address
are written to the word USINT changes from
_Offset (0)
registers of the slave. FALSE to TRUE
The setting value 1 means
the offset is 1 bit if data are
written to bit registers of
the slave.
Specify the starting
address of the registers of When Execute
_8 Write_Destination_Add
the MODBUS slave UINT
16#0~16#FFFF
changes from
ress (0)
receiving the data from the FALSE to TRUE
master
Word register:
0~100
Bit register:
0~256 When Execute
The length of data to be Word register or
Write_Length UINT changes from
written bit register can be FALSE to TRUE
set via the value
of ObjType
(0)

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)

Set the time for the master 8_


to wait for the slave’s 8_
response. The slave 0~65535 When Execute
Timeout timeout occurs if the slave UINT changes from
(0)
does not respond to the FALSE to TRUE
master request within the
set time. Unit: ms
Note:
1. The input parameters SlaveIP_segment1, SlaveIP_segment2, SlaveIP_segment3 and
SlaveIP_segment4 are respectively segment 1~ segment 4 of the IP address of the slave. E.g. the slave
IP is 192.168.1.10. So the input value of SlaveIP_segment1 is 192, SlaveIP_segment2 is 168;
SlaveIP_segment3 is 1 and SlaveIP_segment4 is 10.

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.

 Output Update Timing


Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name

 When the configuration of parameters  When Execute changes from TRUE to


Done
is completed. FALSE

 When an error occurs in the instruction


 When Execute changes from TRUE to
_8 Error execution or the input parameters for
FALSE
the instruction are illegal.

 Output Update Timing Chart


Case 1 Case 2

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
ETH_Link_Manage is used to enable and disable the
FB DVP50MC11P/DVP50MC11P-06
MODBUS TCP data exchange.
DVP50MC11T-04S/DVP50MC11T-16S
E TH_Link_Manage_instance
ET H_Link_Manage
Enable Valid
Open LinkOpened
PhysicalLinkError

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

TRUE or FALSE When Enable


Enable or disable the MODBUS
Open BOOL changes from
TCP data exchange. (FALSE)
FALSE to TRUE
Note:
ETH_Link_Manage is used to enable the MODBUS TCP data exchange after MODBUS TCP parameters are
configured with ETH_Link_Config instruction.
 Output Parameters
Parameter name Function Data type Valid range
Valid TRUE when the outputs of the instruction are valid. BOOL TRUE / FALSE
TRUE when the MODBUS TCP data exchange is
LinkOpened BOOL TRUE / FALSE
enabled.
TRUE when the physical link to the Ethernet
PhysicalLinkError BOOL TRUE / FALSE
interface of the PLC is disconnected.

 Output Update Timing

_8 Parameter Name Timing for changing to TRUE Timing for changing to FALSE

 When Enable changes from TRUE to


Valid  When Enable changes to TRUE
FALSE

 When Enable changes from TRUE to


FALSE
 When the link to the MODBUS TCP  When Open changes from TRUE to
LinkOpened
is successful. FALSE
 When the physical link to the Ethernet
interface of the CPU is disconnected.

 When Open is TRUE and the


 When Enable changes from TRUE to
PhysicalLinkError physical link to the Ethernet interface
FALSE
of the PLC is disconnected.

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.

 Output Update Timing Chart


Cas e1 Cas e2 Cas e3 Ca se4 Ca se5

E nable

Ope n

Va lid

L in kO pened

P hys ica lL in kE rro r

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.

1~16 When Enable


The number of MODBUS
LinkNum UINT changes from
TCP link to be monitored. (0)
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.

 Output Update Timing


Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name

 When Enable changes from TRUE to


Valid  When Enable changes to TRUE.
FALSE.

8- 1 9 8
Chapter 8 Logic Instructions

Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name

 When Enable changes from TRUE to


 When an error occurs in MODBUS FALSE.
ETH_Error
TCP data exchange.  When the MODBUS TCP data
exchange is restored to normal.

 When Enable changes from TRUE to


 When an error occurs in the instruction FALSE.
Error
execution.  When the correct parameter value is
filled.

 Output Update Timing Chart

Case1 Case2 Case3

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

Error code Description How to deal with


1. Check if the Ethernet connection is
normal.
2. Check if the settings for the
102 TCP link timeout
parameters of ETH_Link_Config
instruction are correct.

1. Check if the Ethernet connection is


normal.
2. Increase the timeout period by
103 MODBUS TCP message response timeout
modifying the value of Timeout
parameter of ETH_Link_Config
instruction.
104 Reserved -
105 Reserved -
Transaction identifier error (in the message Make sure that the format of the response
106
header) message from the slave is correct.
Protocol identifier error (in the message Make sure that the format of the response
107
header) message from the slave is correct.
Modbus TCP message length error (in the Make sure that the length of the response
108
message header) message from the slave is correct.
109 Reserved -
The establishment of the link is performed Disable the current link before re-
110
when the TCP link is not disabled. establishing the link.

_8

8- 2 0 0
Chapter 8 Logic Instructions

MODBUS TCP Data Exchange Example

 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

Variable name Address Data type Initial value


MA_PhyErr BOOL
ETH_Link_Status0 ETH_Link_Status
STA_En BOOL
STA_Valid BOOL
STA_ETH_Err BOOL
STA_ETH_ErrID WORD
STA_Err BOOL
STA_ErrID WORD
ET H_Link_Config0
ET H_Link_Config 1
Config0_Ex Execute Done Config0_Done
1 LinkNum Error Config0_Err
Config0_En EnableLink ErrorID Config0_ErrID
Config0_S IP1 SlaveIP_segment1
Config0_S IP2 SlaveIP_segment2
Config0_S IP3 SlaveIP_segment3
Config0_S IP4 SlaveIP_segment4
Config0_S NodeID SlaveNodeID
Config0_OT ObjType
Config0_En_F unCode17 En_FunCode17
Config0_WB f_Add Write_Buffer_Address
Config0_W Bf_Off Write_Buffer_Address_Offset
Config0_WDes_Add Write_Destination_Address
Config0_W LTH Write_Length
Config0_W_Code Write_FunCode
Config0_RBF _ADD Read_Buffer_Address
Config0_R BF _OF F Read_Buffer_Address_Offset
Config0_RDE S_ADD Read_Destination_Address
Config0_RLTH Read_Length
Config0_R_Code Read_FunCode
Config0_T TimeOut

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

 Operation steps and data exchange explanation

8- 2 0 2
Chapter 8 Logic Instructions

1. Combine Config0_WBf_Add and Config0_RBF_ADD with %MW0 and %MW100


respectively. The initial values of Config0_WBf_Off and Config0_RBf_OFF are 10. Perform
the online function after the program compiling and downloading is successful.
2. Set Config0_Ex to TRUE. After ETH_Link_Config instruction execution is completed, set
MA_En to TRUE and then MA_Open to TRUE. After the output MA_LinkOpen of
ETH_Link_Manage instruction changes to TRUE, the motion controller starts to exchange
data with 12SE.
Via the ETH_Link_Status instruction, current communication status can be watched. The
corresponding relationships between the motion controller and DVP12SE are shown in the
following table.
%MW registers in the controller D registers in DVP12SE
%MW10 D0
%MW11 D1
%MW12 D2
……. ……
%MW18 D8
%MW19 D9
%MW110 D100
%MW111 D101
%MW112 D102
…… ……
%MW118 D108
%MW119 D109

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

 Variable table and program


Variable name Address Data type Initial value
8_
ETH_Link_Config1 ETH_Link_Config 8_
Config1_Ex BOOL
Config1_En BOOL TRUE
Config1_SIP1 USINT 192
Config1_SIP2 USINT 168
Config1_SIP3 USINT 1
Config1_SIP4 USINT 10
Config1_SNodeID USINT 0
Config1_OT USINT 1

8- 2 0 3
DVP-50MC Series Motion Controller Operation Manual

Variable name Address Data type Initial value


Config1_En_FunCode17 BOOL FALSE
Config1_WBf_Add %MW0 UINT
Config1_WBf_Off USINT 0
Config1_WDes_Add UINT 16#0500
Config1_WLTH UINT 8
Config1_ W_Code USINT 16#0F
Config1_RBF_ADD %MW1 UINT
Config1_RBF_OFF USINT 0
Config1_RDES_ADD UINT 16#0510
Config1_RLTH UINT 8
Config1_R_Code USINT 1
Config1_T UINT 1000
Config1_Done BOOL
Config1_Err BOOL
Config1_ErrID WORD
ETH_Link_Manage1 ETH_Link_Manage
MA1_En BOOL
MA1_Open BOOL
MA1_Valid BOOL
MA1_LinkOpen BOOL
MA1_PhyErr BOOL
ETH_Link_Status1 ETH_Link_Status
STA1_En BOOL
STA1_ Valid BOOL
STA1_ETH_Err BOOL
STA1_ETH_ErrID WORD
STA1_Err BOOL
STA1_ErrID WORD
_8

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

 Operation steps and data exchange explanation


1. Combine Config1_WBf_Add and Config1_RBF_ADD with %MW0 and %MW1 respectively.
Set the values of Config1_WLTH and Config1_RLTH to 8 and Config1_OT to 1. Set the values
of Config1_WDes_Add and Config1_RDes_Add to 16#0500 and 16#0510 respectively and
Config1_R_Code to 1. 8_
8_
2. After the program compiling and downloading is successful, perform the online. Set Config_Ex
to TRUE. After ETH_Link_Config instruction execution is completed, set MA1_En to TRUE
and then MA1_Open to TRUE. After the output MA1_LinkOpen of ETH_Link_Manage
instruction changes to TRUE, the motion controller starts to exchange data with 12SE.
Via the ETH_Link_Status instruction, current communication status can be watched. The
corresponding relationships between the motion controller and DVP12SE are shown in the following
table.

Devices in the controller Bit devices Y in DVP12SE


%MX0.0 Y0
%MX0.1 Y1

8- 2 0 5
DVP-50MC Series Motion Controller Operation Manual

Devices in the controller Bit devices Y in DVP12SE


%MX0.2 Y2
……. ……
%MX0.6 Y6
%MX0.7 Y7
%MX2.0 Y20
%MX2.1 Y21
%MX2.2 Y22
…… ……
%MX2.6 Y26
%MX2.7 Y27

_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

 Output Update Timing


Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name
 When Execute changes to  When Execute changes from TRUE to
Done
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

Parameter name Function Data type Valid range


Valid TRUE when the instruction output is valid. BOOL TRUE/FALSE
SocketReady TRUE when enabling the Socket is successful. BOOL TRUE/FALSE
TRUE when the physical connection to Ethernet
PhysicalLinkError BOOL TRUE/FALSE
port of the controller is disconnected.

_8

8- 2 1 0
Chapter 8 Logic Instructions

 Output Update Timing

Parameter Name Timing for changing to TRUE Timing for changing to FALSE

 When Enable changes from TRUE to


Valid  When Enable changes to TRUE.
FALSE.

 When Enable changes from TRUE to


 When enabling the Socket is FALSE.
SocketReady
successful.  When EnableSocket changes from
TRUE to FALSE.

 When Enable changes from TRUE to


 When Enable changes to TRUE
FALSE.
and the physical connection to
PhysicalLinkError  When the physical connection to
Ethernet port LAN2 of the
Ethernet port LAN2 of the controller
controller is disconnected.
is returned to normal.

 Output Update Timing Chart

Ca se1 Case2 Case3 Ca se4 Ca se5

E nable

Ena ble Socket

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.

1~8 When Execute


Specify the number of the
SocketNum USINT changes from
Socket. (0)
FALSE to TRUE.

Socket connection mode: 0: Socket UDP When Execute


Protocol_Type 0: Socket UDP USINT 1: Socket TCP changes from
1: Socket TCP (0) FALSE to TRUE.

0~255 When Execute


RemoteIP_segment Set the first segment of the
USINT changes from
1 remote IP address. (0)
FALSE to TRUE.

RemoteIP_segment Set the second segment of 0~255 When Execute 8_


2 the remote IP address.
USINT
(0)
changes from 8_
FALSE to TRUE.

0~255 When Execute


RemoteIP_segment Set the third segment of
USINT changes from
3 the remote IP address. (0)
FALSE to TRUE.

0~255 When Execute


RemoteIP_segment Set the fourth segment of
USINT changes from
4 the remote IP address. (0)
FALSE to TRUE.

0~65535 When Execute


Set the number of the
Remote_port UINT changes from
remote port. (0)
FALSE to TRUE.

8- 2 1 3
DVP-50MC Series Motion Controller Operation Manual

Valid range
Parameter name Function Data type Validation timing
(Default)

0~65535 When Execute


Set the number of the local
Local_port UINT changes from
port. (0)
FALSE to TRUE.

Set the period of time for 65535 When Execute


LinkKeeptime UINT changes from
the connection(s). (0)
FALSE to TRUE.

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.

 Output Update Timing

Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name

 When the configuration of  When Execute changes from TRUE


Done
parameters is completed. to FALSE.

_8 Busy  When Execute changes to TRUE.


 When Done changes from FALSE to
TRUE.

 When input parameters of the  When Execute changes from TRUE


Error
instruction are illegal. to FALSE.

8- 2 1 4
Chapter 8 Logic Instructions

 Output Update Timing Chart

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

ETH_Socket_Open is used for enabling Socket DVP50MC11T/DVP50MC11T-06


FB TCP/UDP protocol. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
ET H_Socket_Open_instance
E T H_Socket_Open
Execute Done
SocketNum Busy
OpenMode 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.

1~8
When Execute
Set the number of the (The variable
SocketNum USINT changes from
Socket value must be
FALSE to TRUE
set.)

Mode to use the controller When Execute


TRUE or FALSE
OpenMode TRUE: Client mode BOOL changes from
(FALSE)
FALSE: Server mode FALSE to TRUE
Note:
1. ETH_Socket_Open is used to enable Socket. After ETH_Socket_Open is executed, the controller will try
to make connection with other node or wait for other node to send out the link request.
2. When OpenMode is TRUE, the controller is in Client mode. After ETH_Socket_Open instruction is
executed, the controller sends out the link request to the target node.
When OpenMode is FALSE, the controller is in Server mode. After ETH_Socket_Open instruction is
executed, the controller waits for the link request from the target node.
_8
3. If Socket UDP is selected as the Socket mode, selecting TRUE or FALSE for OpenMode will have no
impact on the use of the instruction.
 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


TRUE when an error occurs in execution of the
Error BOOL TRUE/FALSE
instruction.

8- 2 1 6
Chapter 8 Logic Instructions

Parameter name Function Data type Valid range

Contains error codes when an error occurs in the


ErrorID instruction execution. Please refer to section 12.2 WORD
for the corresponding error code.

 Output Update Timing

Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name

 TRUE when the instruction  When Execute changes from TRUE


Done
execution is completed. to FALSE.

 When Execute changes from  When Done changes from FALSE to


Busy
FALSE to TRUE. TRUE.

 When an error occurs in the


instruction execution or the input  When Execute changes from TRUE
Error
parameters for the instruction are to FALSE.
illegal.

 Output Update Timing Chart


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

Abort the instruction TRUE or FALSE


Abort BOOL
execution. (FALSE)

1~8 When Execute


Specify the number of the
SocketNum USINT changes from
Socket. (0)
FALSE to TRUE
Set whether to cyclically
send data or not. TRUE or FALSE When Execute
CyclicRun TRUE: Cyclic sending, BOOL changes from
(FALSE)
FALSE: Only one-time FALSE to TRUE
data sending

0~65535 When Execute


Set the time of a cycle.
_8
CycleTime UINT changes from
Unit: ms (0)
FALSE to TRUE
When Execute
Send_Buffer_Addre Specify the start register %MB0~%MB65
USINT changes from
ss for storing the sent data. 535
FALSE to TRUE

0~200 When Execute


Set how many Bytes of
Send_Length UINT changes from
data to be sent. (0)
FALSE to TRUE
Note:
The input parameter Send_Buffer_Address represents the first register address where the data the controller
sends are stored, and the parameter Send_Length is the length of the data sent by the controller. The two
input values must be set.

8- 2 1 8
Chapter 8 Logic Instructions

 Output Parameters

Parameter name Function Data type Valid range


TRUE when the one-time Socket data sending is
Done BOOL TRUE/FALSE
completed in non-cyclic sending mode.
Sent TRUE when Socket data sending is completed. BOOL TRUE/FALSE
Sending TRUE when Socket data are being sent. BOOL TRUE/FALSE
Busy TRUE when the instruction is being executed. BOOL TRUE/FALSE
TRUE when the instruction is controlling the controller
Active BOOL TRUE/FALSE
for sending data.
Aborted TRUE when the instruction execution is aborted. 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.

 Output Update Timing

Parameter Name Timing for changing to TRUE Timing for changing to FALSE

 When the instruction execution is  When Execute changes from


Done
finished. TRUE to FALSE.

 When sending one piece of Socket  When the controller starts


Sent
message is completed. sending another piece of data.

 When one piece of Socket message is  When sending one piece of


Sending
being sent. data is completed.

 When Done changes from


FALSE to TRUE.
 When Aborted changes from
Busy  When Execute changes to TRUE.
FALSE to TRUE.
 When Error changes from
FALSE to TRUE.

 When Done changes from


FALSE to TRUE. 8_
Active
 When the instruction is controlling the  When Aborted changes from 8_
controller for sending data. FALSE to TRUE.
 When Error changes from
FALSE to TRUE.

 When the instruction execution is  When Execute changes from


Aborted
aborted. TRUE to FALSE.

 When an error occurs in the instruction


 When Execute changes from
Error execution or the input parameters for
TRUE to FALSE.
the instruction are illegal.

8- 2 1 9
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing Chart

Cas e1 Cas e2 Cas e3 Cas e4

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.

Abort the instruction TRUE or FALSE


Abort BOOL
execution. (FALSE)
When Execute
Specify the number of the 1~8
SocketNum USINT changes from
Socket. (0)
FALSE to TRUE
Set the mode to receive
data.
When Execute
0:Keep receiving data 0, 1
ReceiveMode USINT changes from
(0)
1:Only receive one piece FALSE to TRUE
_8 of data
Set the mode to save data.
When Execute
0:Splicing 0, 1
DataSaveMode USINT changes from
(0)
1:Covering FALSE to TRUE

Specify the start register When Execute


Receive_Buffer_Ad %MB0~%MB65
for storing the received USINT changes from
dress 535
data. FALSE to TRUE
When Execute
Set how many Bytes of 0~200
Receive_Length UINT changes from
data to be received. (200)
FALSE to 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 name Function Data type Valid range


TRUE when the one-time socket data receiving is
Done completed in the only-one-time data receiving BOOL TRUE/FALSE
mode.
Received TRUE when Socket data receiving is completed. BOOL TRUE/FALSE
Receiving TRUE when Socket data are being received. BOOL TRUE/FALSE
Received_Length The size of the data which are actually received. UINT
Busy TRUE when the instruction is being executed. BOOL TRUE/FALSE
TRUE when the instruction is controlling the
Active BOOL TRUE/FALSE
controller for receiving data.
Aborted TRUE when the instruction execution is aborted. BOOL TRUE/FALSE
TRUE when an error occurs in the instruction
Error 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.

 Output Update Timing

Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name

 When the instruction execution is  When Execute changes from TRUE


Done
completed. to FALSE.

 When Execute changes from TRUE


 When one piece of Socket data to FALSE.
Received
receiving is completed.  When the instruction starts receiving
the next piece of data.

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.

 When the instruction is controlling  When Done changes from FALSE to


Active
the controller for receiving data. TRUE.

8- 2 2 3
DVP-50MC Series Motion Controller Operation Manual

Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name

 When the instruction execution is


aborted.
 When Error changes from FALSE to
TRUE.

 When the instruction execution is  When Execute changes from TRUE


Aborted
aborted. to FALSE.

 When an error occurs in the


instruction execution or the input  When Execute changes from TRUE
Error
parameters for the instruction are to FALSE.
illegal.

 Output Update Timing Chart

Case 1 Case2 Cas e3 Cas e4

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.

 Output Update Timing


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
TRUE when an error occurs in the instruction
Error BOOL TRUE/FALSE
execution.
Contains error codes when an error occurs in the
ErrorID instruction execution. Please refer to section WORD
12.2 for the corresponding error code.

 Output Update Timing


Parameter Name Timing for changing to TRUE Timing for changing to FALSE
_8 Done
 When the instruction execution is  When Execute changes from TRUE to
finished. FALSE.
 When Execute changes from FALSE  When Done changes from TRUE to
Busy
to TRUE. FALSE.
 When an error occurs in the
instruction execution or the input  When Execute changes from TRUE to
Error
parameters for the instruction are FALSE.
illegal.

8- 2 2 6
Chapter 8 Logic Instructions

 Output Update Timing


Case 1 Case 2

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.

 Output Update Timing


Parameter name Function Data type Valid range
TRUE when Socket data sending and receiving are
Valid BOOL TRUE/FALSE
both completed.
TRUE when the connection to the target device is
_8 Connected
successful.
BOOL TRUE/FALSE
Received TRUE when data receiving is successful. BOOL TRUE/FALSE
Closed TRUE when the link has been closed. BOOL TRUE/FALSE
Send TRUE when data have been sent. BOOL TRUE/FALSE
TRUE when the link to the target device is being
Opening BOOL TRUE/FALSE
conducted.
Receiving TRUE when data are being received. BOOL TRUE/FALSE
Closing TRUE when current link is being closed. BOOL TRUE/FALSE
TRUE when a timeout occurs in data sending or
Sending BOOL TRUE/FALSE
receiving.
TRUE when an error occurs in the instruction
Error BOOL TRUE/FALSE
execution.
ErrorID Contains error codes when an error occurs in the WORD

8- 2 2 8
Chapter 8 Logic Instructions

Parameter name Function Data type Valid range


instruction execution. Please 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
 When Enable changes from FALSE to  When Enable changes from TRUE to
Valid
TRUE. FALSE.
 When Enable changes from TRUE to
FALSE.
Connected  When Socket link is finished.
 When Closing changes from FALSE
to TRUE.
 When Receiving changes from
 When a piece of message receiving is FALSE to TRUE.
Received
completed.  When Enable changes from TRUE to
FALSE.
 When Enable changes from TRUE to
FALSE.
Closed  When Socket link is closed.
 When Opening changes from FALSE
to TRUE.
 When Enable changes from TRUE to
 When a piece of message sending is FALSE.
Send
completed.  When Sending changes from TRUE to
FALSE.
 When Enable changes from TRUE to
 When the controller starts to build the FALSE.
Opening
Socket link or is waiting to be linked to.  When Connected changes from
FALSE to TRUE.
 When Enable changes from TRUE to
 When the controller is receiving a piece FALSE.
Receiving
of message.  When Received changes from FALSE
to TRUE.
 When Enable changes from TRUE to
FALSE.
Closing  When Socket is disabled
 When Closed changes from FALSE to 8_
TRUE. 8_
 When Enable changes from TRUE to
Sending  When a piece of message is being sent.
FALSE.
 When an instruction execution error or  When Enable changes from TRUE to
Error
Socket error occurs. FALSE.

8- 2 2 9
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing


Case 1 Case 2

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

Ehternet Free Protocol Example

 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

 Operation steps and data exchange description

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.

3. After the execution of ETH_Socket_Config instruction is competed, execute


ETH_Socket_Open instruction by setting O_Ex to TRUE. The controller starts to build the
link to the target host. Current connection state can be known by checking the output of
ETH_Socket_Status instruction.
8_
4. After the controller builds the link to the target successfully, the output Connected of 8_
ETH_Socket_Status changes to TRUE. Then execute ETH_Socket_Send by setting
S_Ex to TRUE. The controller will cyclically send 17 bytes of data in the registers starting
from %MB200 to the target host.

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

8.14.3 RS485 Communication Instructions


RS485_Link_Config
FB/FC Explanation Applicable model
RS485_Link_Config is used for configuration of DVP50MC11T/DVP50MC11T-06
FB 485 communication parameters of the motion DVP50MC11P/DVP50MC11P-06
controller. DVP50MC11T-04S/DVP50MC11T-16S

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

Data Valid range


Parameter name Function Validation timing
type (Default)
When Execute
Set the function code 17 to TRUE or FALSE
En_FunCode17 BOOL changes from
be used or not. (FALSE)
FALSE to TRUE
The starting register of the When Execute
Write_Buffer_Addr %MW0 ~ %MW32767
master where the sent data UINT changes from
ess %QW0 ~ %QW63
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 word if data are 0~255 When Execute
Write_Buffer_Addr
written to the word address of USINT changes from
ess_Offset (0)
the slave. FALSE to TRUE
The setting value 1 means
the offset is 1 bit if data are
written to the bit address of
the slave.
The starting address of the When Execute
Write_Destination Standard Modbus
MODBUS slave receiving the UINT changes from
_Address address
data from the master FALSE to TRUE
When Execute
The length of data to be Word register: 0~100
Write_Length UINIT changes from
written Bit register: 0~256
FALSE to TRUE
Bit register: 05, 16#0F
When Execute
Specify the function code for Word register: 06,
Write_FunCode USINT changes from
writing data in registers. 16#10
FALSE to TRUE
(16#10)
The starting register of the When Execute
Read_Buffer_Addr %MW0~%MW32767
master where data received UINT changes from
ess %QW0~%QW63
are stored. FALSE to TRUE
Set the offset of the starting
register of the master
receiving data.
The setting value 1 means
When Execute
Read_Buffer_Addr the offset is 1 word if the 0~255
USINT changes from
ess_Offset word register of the slave is (0)
FALSE to TRUE
read.
The setting value 1 means
the offset is 1 bit if the bit
8_
register of the slave is read.
8_
Set the starting address of When Execute
Read_Destination Standard Modbus
the MODBUS slave to be UINT changes from
_Address address
read by the master. FALSE to TRUE
When Execute
Word register: 0~100
Read_Length The length of data to be read UINT changes from
Bit register: 0~256
FALSE to TRUE
Bit register: 01~02 When Execute
Set the function code for
Read_FunCode USINT Word register: 03~04 changes from
reading data in registers.
(03) FALSE to TRUE
Set the time for the master to An integer greater When Execute
Timeout wait for the slave’s response. UINT than 0 changes from
The slave timeout occurs if (300) FALSE to TRUE

8- 2 3 7
DVP-50MC Series Motion Controller Operation Manual

Data Valid range


Parameter name Function Validation timing
type (Default)
the slave does not respond to
the master request within the
set time. Unit: ms
Note:
1. 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.
2. The firmware later than V1.11 supports the Write_FunCode input of the instruction.
3. 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 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.

 Output Update Timing


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 FALE.
to TRUE.
 When Execute changes from TRUE to
 When the configuration of
FALE.
parameters is incorrect and
Error  When Execute is re-triggered after the
Execute changes from FALSE
parameter configuration is modified
to TRUE.
correctly.

_8

8- 2 3 8
Chapter 8 Logic Instructions

 Output Update Timing Chart


Cas e1 Cas e2

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

 Output Update Timing


Parameter Name Timing for changing to TRUE Timing for changing to FALSE
 When Enable changes from
Valid  When Enable changes to TRUE.
TRUE to FALSE.
 When Enable changes from
 When Enable changes to TRUE, Open TRUE to FALSE.
LinkOpened
changes to TRUE.  When Open changes from TRUE
to FALSE.
 Output Update Timing Chart
Cas e1 Cas e2 Cas e3 8_
8_
Enable

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

TRUE when an error occurs in the corresponding


RS485_Link_Error BOOL TRUE / FALSE
link. It is valid when Error is FALSE.
Outputs communication error code. See error codes
and their meanings as below:
1: Unidentified function code
2: The address in the response message from the
slave is different from the configured address.
3: The length of received data in the response
message from the slave is inconsistent with the
configured length. 8_
RS485_Link_ErrorID 4: Data-receiving timeout WORD 8_
5: Checksum error
6: The configured lengths of data to be read and
written are both 0.
7: The length of the data that is actually received
exceeds the max. received data length.
8: Data-sending timeout
16#80+ exception code: the exception code from the
slave

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 Function Data type Valid range


Contains error codes when an error occurs in the
ErrorID instruction execution. Please refer to section 12.2 for WORD
the corresponding error code.
 Output Update Timing

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

 The communication is restored to


normal. (Error is FALSE.)
 When Enable changes from TRUE to
 When an error occurs in the
RS485_Link_Error FALSE.
communication as Enable is TRUE.
 When Open of RS485_Link_Manage
changes from TRUE to FALSE. (Error
is FALSE.)
 When Enable changes from TRUE to
 When an error occurs in the
FALSE.
Error instruction inputs as Enable is  When the correct parameter value is
TRUE. filled.
 Output Update Timing Chart

Case 1 Cas e 2 Cas e 3 Cas e 4

E nable

Valid

RS4 85_Link _Error

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

RS485 Data Exchange Example

 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

Variable name Address Data type Initial value


LStatus_RLEID BOOL
LStatus_Err BOOL
LStatus_ErrID WORD

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

Name Address Data type Initial value


Confg _Err
Confg _ErrID
LStatus RS485_Link_Status
LStatus_En BOOL TRUE
LStatus_LN UINT 1
LStatus_Valid
LStatus_RLE
LStatus_RLEID
LStatus_Err
LStatus_ErrID

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

Busy TRUE when the communication proceeds. BOOL TRUE / FALSE

TRUE when current execution of the


Aborted BOOL TRUE / FALSE
instruction is aborted.

TRUE when the port is controlled by the


Active BOOL TRUE / FALSE
instruction.

TRUE when the instruction execution is


NewCycle BOOL TRUE / FALSE
completed once (in the multi-cycle state)

Received TRUE when receiving is successful. BOOL TRUE / FALSE

TRUE when timeout in message receiving


Receive_TimeOut BOOL TRUE / FALSE
occurs.

TRUE when the length of received data


_8 Receive_LengthOverMAX
exceeds the max. length allowed.
BOOL TRUE / FALSE

Receive_ActulLength Actually received data length UINT 0-200

TRUE when an instruction configuration error


Error BOOL TRUE / FALSE
occurs.
Contains error codes when an error occurs in
ErrorID the instruction execution. Please refer to WORD
section 12.2 for the corresponding error code.

8- 2 5 0
Chapter 8 Logic Instructions

 Output Update Timing


Parameter Name Timing for changing to TRUE Timing for changing to FALSE
 After Execute changes from
FALSE to TRUE and Busy  When Execute changes from TRUE to
Done
changes to TURE in the one FALSE in the single cycle work state.
single cycle work state
 When Abort changes to TRUE in the
 When Execute changes from multi-cycle state.
Busy
FALSE to TRUE.  When Done changes to TRUE in the
one-single-cycle state.
 When Abort changes from TRUE to
 When Abort changes from
FALSE.
FALSE to TRUE for the first
 When Execute changes from TRUE to
time.
FALSE.
Aborted  When current instruction is
 When Execute is FALSE and Abort
aborted by another
changes from FALSE to TRUE,
instruction in the multi-cycle
Aborted changes to TRUE and one
state.
cycle later, changes to FALSE.
 When Execute changes from TRUE to
FALSE
 When current instruction is aborted by
 When Execute changes from
Active another instruction in the multi-cycle
FALSE to TRUE.
state.
 When Done changes to TRUE in the
one-single-cycle state.
 When the PLC completes
 When the instruction enters the next
NewCycle one cycle of work in the multi-
cycle for receiving and sending data.
cylce state.
 When the next cycle is entered after
 When the instruction receives
Received the instruction receives the response
the response message.
message.
 When the parameter
configuration for receiving
data has been done and the  When the response message is
Receive_TimeOut
response message is not received.
received within the set
timeout time.
 When the length of actually
 When the length of received data is
Receive_LengthOverMAX received data is greater than
less than the max. length allowed.
the max. length allowed.
 When an error occurs in the
 When the instruction configuration
Error instruction parameter
data are correct. 8_
configuration. 8_

8- 2 5 1
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing Chart


Case1 Case2 Case3 Case4 Case5 Case6

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

Rec eive d_Timeou t

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.

4. When RS485_RS and RS_485_Link_Config exist together,


a) When Execute of RS485_RS instruction changes from FALSE to TRUE, the 485Link function of
the PLC will take effect.

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.

c) When Execute of RS485_RS instruction changes from FALSE to TRUE, Enable of


RS485_Link_Manage changes to TRUE, Open of the instruction can control the functions of
485 link and free protocol communication.

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

RS485 Free Protocol Example

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

The message data on the bus: 3A 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43 46 0D


0A.
 Variable table 1
Variable name Address Data type Initial value
RS RS485_RS
RS_Ex BOOL FALSE
RS_Abort BOOL FALSE
RS_CyRun BOOL TRUE
RS_SBA %MB4000 USINT 16#30
RS_SL UINT 20
RS_RBA %MB5000 USINT
RS_RL UINT 23
RS_AddSE BOOL 1
RS_Tout UINT 500
RS_Done BOOL
RS_Bsy BOOL
RS_Abt BOOL
RS_Act BOOL
RS_NCyc BOOL
8_
RS_Rec BOOL 8_
RS_RTO BOOL
RS_RLOM BOOL
RS_RAL UINT
RS_Err BOOL
RS_ErrID WORD

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

8- 2 5 5
DVP-50MC Series Motion Controller Operation Manual

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: 3A 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38
43 46 0D 0A
2. If the parameters of RS485_RS instruction are configured based on variable table 2, the data
in %MB4000~%MB4022 are 3A 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43 46
0D 0A

The message data on the bus: 3A 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43 46


0D 0A
 Variable table 2
Variable name Address Data type Initial value
RS RS485_RS
RS_Ex BOOL FALSE
RS_Abort BOOL FALSE
RS_CyRun BOOL TRUE
RS_SBA %MB4000 USINT 16#3A
RS_SL UINT 23
RS_RBA %MB5000 USINT
RS_RL UINT 23
RS_AddSE BOOL 0
RS_Tout UINT 500
RS_Done BOOL
RS_Bsy BOOL
RS_Abt BOOL
RS_Act BOOL
RS_NCyc BOOL
RS_Rec BOOL
RS_RTO BOOL
RS_RLOM BOOL
RS_RAL UINT
RS_Err BOOL
_8 RS_ErrID WORD

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

Done  When the instruction execution is  When Execute changes from


completed. TRUE to FALSE
_8  When an error occurs in the
Error instruction execution or the input  When Execute changes from
parameters for the instruction are TRUE to FALSE
illegal.

8- 2 5 8
Chapter 8 Logic Instructions

 Output Update Timing Chart


Case 1 Case 2

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

8.14.4 RS232 Communication Instructions

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.

1~24 When Execute


Specify the number of
UINT
_8
LinkNum (The variable value changes from
the Link.
must be set) FALSE to TRUE
When Execute
Enable or disable the TRUE or FALSE
EnableLink BOOL changes from
Link. (FALSE)
FALSE to TRUE

Set the Link


communication mode When Execute
TRUE or FALSE
Noncyclic BOOL changes from
FALSE: Cyclic, (FALSE)
FALSE to TRUE
TRUE: Non-cyclic

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)

The starting register of When Execute


%MW0~%MW32767
Read_Buffer_Address the master where data UINT changes from
received are stored. %QW0~%QW63
FALSE to TRUE
8_
Set the offset of the 8_
starting register of the
master receiving data.
The setting value 1
means the offset is 1 When Execute
Read_Buffer_Address 0~255
word if the word register USINT changes from
_Offset (0)
of the slave is read. FALSE to TRUE
The setting value 1
means the offset is 1 bit
if the bit register of the
slave is read.

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

Set the function code Bit register:01~02 When Execute


Read_FunCode for reading data in USINT Word register:03~04 changes from
registers. (03) FALSE to TRUE
Set the time for the
master to wait for the
slave’s response. The An integer greater When Execute
slave timeout occurs if than 0
Timeout UINT changes from
the slave does not
(300) FALSE to TRUE
respond to the master
request within the set
time. Unit: ms
Note:
1. 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.
2. The firmware later than V1.11 supports the Write_FunCode input of the instruction.
3. 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 Link parameters is
Done BOOL TRUE / FALSE
successful.
TRUE when an error occurs in execution of the
_8 Error
instruction.
BOOL TRUE / FALSE

Contains the error code when an error occurs. Please


Error ID WORD
refer to section 12.2 for the corresponding error ID.

8- 2 6 2
Chapter 8 Logic Instructions

 Output Update Timing

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.

 Output Update Timing Chart

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

 Output Update Timing

Parameter Name Timing for changing to TRUE Timing for changing to FALSE

 When Enable changes from


Valid  When Enable changes to TRUE
TRUE to FALSE
 When Enable changes from
 When Enable changes to TRUE and Open TRUE to FALSE
LinkOpened
changes to TRUE  When Open changes from TRUE
to FALSE
8_
8_

8- 2 6 5
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing Chart


Case 1 Case 2 Case 3

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

TRUE when an error occurs in the corresponding link.


RS232_Link_Error BOOL TRUE / FALSE
It is valid when Error is FALSE.
Outputs communication error code. See error codes
and their meanings as below:
1: Unidentified function code
2: The address in the response message from the
slave is different from the configured address.
3: The length of received data in the response
message from the slave is inconsistent with the
configured length.
WORD 8_
8_
RS232_Link_ErrorID 4: Data-receiving timeout
5: Checksum error
6: The configured lengths of data to be read and
written are both 0.
7: The length of the data that is actually received
exceeds the max. received data length.
8: Data-sending timeout
16#80+ exception code: the exception code from the
slave

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 Function Data type Valid range

ErrorID Outputs the error code of the instruction. WORD

 Output Update Timing

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.

 Output Update Timing Chart

Case 1 Cas e 2 Cas e 3 Cas e 4

E nable

Valid

RS2 32_Link _Error

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

RS232 Data Exchange Example

 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 Confg _RL UINT 20


Confg _RFC USINT 16#03
Confg _TOut UINT 1000
Confg _Done BOOL
Confg _Err BOOL
Confg _ErrID WORD
LStatus RS232_Link_Status
LStatus_En BOOL TRUE
LStatus_LN UINT 1
LStatus_Valid BOOL

8- 2 7 0
Chapter 8 Logic Instructions

Name Address Data type Initial value


LStatus_RLE BOOL
LStatus_RLEID BOOL
LStatus_Err BOOL
LStatus_ErrID WORD

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

Name Address Data type Initial value


Confg _Err
Confg _ErrID
LStatus RS232_Link_Status
LStatus_En BOOL TRUE
LStatus_LN UINT 1
LStatus_Valid
LStatus_RLE
LStatus_RLEID
LStatus_Err
LStatus_ErrID

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

Busy TRUE when the communication proceeds. BOOL TRUE / FALSE

TRUE when current execution of the


Aborted BOOL TRUE / FALSE
instruction is aborted.

TRUE when the port is controlled by the


Active BOOL TRUE / FALSE
instruction.

TRUE when the instruction execution is


NewCycle BOOL TRUE / FALSE
completed once (in the multi-cycle state)

Received TRUE when receiving is successful. BOOL TRUE / FALSE

TRUE when timeout in message receiving


Receive_TimeOut BOOL TRUE / FALSE
occurs.
_8
TRUE when the length of received data
Receive_LengthOverMAX BOOL TRUE / FALSE
exceeds the max. length allowed.

Receive_ActulLength Actually received data length UINT 0-200

TRUE when an instruction configuration error


Error BOOL TRUE / FALSE
occurs.

ErrorID Outputs error codes. WORD

8- 2 7 4
Chapter 8 Logic Instructions

 Output Update Timing


Parameter Name Timing for changing to TRUE Timing for changing to FALSE
 After Execute changes from
FALSE to TRUE and Busy  When Execute changes from TRUE to
Done
changes to TURE in the one FALSE in the single cycle work state.
single cycle work state
 When Abort changes to TRUE in the
 When Execute changes from multi-cycle state.
Busy
FALSE to TRUE.  When Done changes to TRUE in the
one-single-cycle state.
 When Abort changes from TRUE to
FALSE.
 When Execute changes from TRUE to
 When Abort changes from
FALSE.
Aborted FALSE to TRUE for the first
time.  When Execute is FALSE and Abort
changes from FALSE to TRUE,
Aborted changes to TRUE and one
cycle later, changes to FALSE.
 When Execute changes from TRUE to
FALSE
 When Execute changes from  When current instruction is aborted by
Active another instruction in the multi-cycle
FALSE to TRUE.
state.
 When Done changes to TRUE in the
one-single-cycle state.
 When the PLC completes
 When the instruction enters the next
NewCycle one cycle of work in the multi-
cycle for receiving and sending data.
cycle state.
 When the next cycle is entered after
 When the instruction receives
Received the instruction receives the response
the response message.
message.
 When the parameter
configuration for receiving
data has been done and the  When the response message is
Receive_TimeOut
response message is not received.
received within the set
timeout time.
 When the length of actually
 When the length of received data is
Receive_LengthOverMAX received data is greater than
less than the max. length allowed.
the max. length allowed.
 When an error occurs in the
 When the instruction configuration 8_
Error instruction
configuration.
parameter
data are correct. 8_

8- 2 7 5
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing Chart


Case1 Case2 Case3 Case4 Case5 Case6

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.

4. When RS232_RS and RS_232_Link_Config coexist,


a. When Execute of RS232_RS instruction changes from FALSE to TRUE, the 232Link function
of the PLC will take effect.

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.

c. When Execute of RS232_RS instruction changes from FALSE to TRUE, Enable of


RS232_Link_Manage changes to TRUE, Open of the instruction can control the functions of
232 link and free protocol communication.

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

RS232 Free Protocol Example

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

The message data on the bus: 3A 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43 46 0D


0A.
 Variable table 1
Variable name Address Data type Initial value
RS RS232_RS
RS_Ex BOOL FALSE
RS_Abort BOOL FALSE
RS_CyRun BOOL TRUE
RS_SBA %MB4000 USINT 16#30
RS_SL UINT 20
RS_RBA %MB5000 USINT
RS_RL UINT 23
RS_AddSE BOOL 1
RS_Tout UINT 500
RS_Done BOOL
RS_Bsy BOOL
RS_Abt BOOL
RS_Act BOOL
RS_NCyc BOOL
8_
RS_Rec BOOL 8_
RS_RTO BOOL
RS_RLOM BOOL
RS_RAL UINT
RS_Err BOOL
RS_ErrID WORD

8- 2 7 9
DVP-50MC Series Motion Controller Operation Manual

 Disabling the function of the start and end of messages


a. 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: 3A 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43
46 0D 0A
b. If the parameters of RS232_RS instruction are configured based on variable table 2, the data
in %MB4000~%MB4022 are 3A 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43 46 0D
0A

The message data on the bus: 3A 30 31 31 30 31 35 30 30 30 30 30 31 30 32 30 30 30 38 43 46 0D


0A.
 Variable table 2
Variable name Address Data type Initial value
RS RS232_RS
RS_Ex BOOL FALSE
RS_Abort BOOL FALSE
RS_CyRun BOOL TRUE
RS_SBA %MB4000 USINT 16#3A
RS_SL UINT 23
RS_RBA %MB5000 USINT
RS_RL UINT 23
RS_AddSE BOOL 0
RS_Tout UINT 500
RS_Done BOOL
RS_Bsy BOOL
RS_Abt BOOL
RS_Act BOOL
RS_NCyc BOOL
RS_Rec BOOL
RS_RTO BOOL

_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

 Output Update Timing Chart


Case 1 Case 2

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

8.15 String Processing Instructions


8.15.1 CONCAT
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
CONCAT joins two or more string variables or
FC DVP50MC11P/DVP50MC11P-06
constants together to form a new string. DVP50MC11T-04S/DVP50MC11T-16S

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

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

Th ree charac ters to delete

DELE TE
ABCDEFGH O ut: A EFGH

Deletion st arts f ro m
the s eco nd c harac ter

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

In 1=AB CDE FG H I n2=ab c

INSERT
P=0 ABCDEFGH Out : abc ABCDEFGH

Ins ert I n2

INSERT
P=2 ABCDEFG H Out : ABab cCDEFGH

Ins ert I n2

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

8.15.4 LEFT / RIGHT


FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
LEFT/RIGHT extracts a specified-length string from
FC DVP50MC11P/DVP50MC11P-06
the string variable or constant.
DVP50MC11T-04S/DVP50MC11T-16S

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

E xt ract 4 cha ract ers


f rom t he lef t of th e string

RIGHT RIGHT
ABCDEFGH Out : EFGH

Ext ract 4 ch aract ers


from t he righ t of the st ring

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

 The variable table and program 2


Variable name Data type Current value
RIGHT_EN BOOL TRUE
RIGHT_In STRING ‘AaBbCcDd’ 8_
RIGHT_L UINT 2
8_
Out1 STRING ‘Dd’
RIG HT 1
RIG HT_ EN EN ENO
RI GHT_In In O ut Out 1
RIGHT_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

Extr ac tio n sta rts fr om


the se con d ch ar act er

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

Deletion st arts fro m


the secon d character In sert I n2

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

8.16 Immediate Refresh Instructions


8.16.1 FROM
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
The FROM instruction reads the values in CR registers of
FB DVP50MC11P/DVP50MC11P-06
the left-side and right-side extension modules.
DVP50MC11T-04S/DVP50MC11T-16S
FRO M _ in stan ce
FROM
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
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

Parameter name Function Data type Valid range


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.
 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 values is finished.
instruction execution is completed.
 When Done changes from FALSE
Busy  When Execute changes to TRUE to TRUE
 When Error changes to TRUE.
 When Error changes to TRUE.
 When the instruction execution
Active  When Done changes from FALSE
begins
to TRUE.
 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 Update Timing Chart
Case 1 Case 2

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

 The variable table and program


Variable name Data type Current value
FRM FROM
FRM_ID USINT 0
FRM _Ex BOOL FALSE
FRM _CR UINT 0
FRM _Num USINT 1
FRM _DP INT
FRM _Done BOOL
FRM _Bsy BOOL
FRM _Act BOOL
FRM _Err BOOL
FRM _ErrID WORD
FRM
FRO M 1
FRM_ID St ationID Done FRM_Done
FRM_Ex Exe cute Busy FRM_Bsy
FRM_CR CR Ac tive FRM_Act
FRM_Num Num E rror FRM_Err
8_
FRM_DP DesPt r ErrorID FRM_ErrID
8_
DVP-04AD is connected to the right side of the motion controller. When FRM _Ex changes from FALSE
to TRUE and FRM _Bsy and FRM _Act change to TRUE simultaneously, FROM instruction starts to
execute. When FRM _Done changes to TRUE, the instruction execution is finished. FRM _DP displays
that the value in CR0 read by the instruction is 136 and thus the version of DVP-04AD is 1.36.
 Programming Example2
 The variable table and program
Variable name Data type Current value
FRM1 FROM
FRM1_ID USINT 0
FRM1_Ex1 BOOL FALSE

8- 3 0 1
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Current value


FRM1_CR1 UINT 2
FRM1_Num1 USINT 4
FRM1_DP Array[1..4] of INT
FRM1_Done BOOL
FRM1_Bsy BOOL
FRM1_Act BOOL
FRM1_Err BOOL
FRM1_ErrID WORD
FRM1
FROM 1
FRM1_ID St ationID Done FRM1_Done
FRM1_Ex E xecute Busy FRM1_B sy
FRM1_CR CR Active FRM1_A ct
FRM1_Num Num Error FRM1_E rr
FRM1_DP[1] DesPt r ErrorID FRM1_E rrID

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

 Output Update Timing


Parameter Name Timing for changing to TRUE Timing for changing to FALSE
 When Execute changes from TRUE to
 When the writing of the parameter
Done FALSE after the instruction execution is
values is finished.
completed
 When Done changes from FALSE to
Busy  When Execute changes to TRUE TRUE
 When Error changes to TRUE.
 When Error changes to TRUE.
Active  When the instruction execution begins  When Done changes from FALSE to
TRUE.
 When an error occurs in the instruction
 When Execute changes from TRUE to
Error execution or the input parameters for
FALSE.
the instruction are illegal.

 Output Update Timing Chart

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

Input Start input point Input Start input point 0~15

Number of input points for


Num Number Input 1~16
immediate refresh
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
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.

 Precautions for Correct Use


 The instruction is only used for the immediate refresh of local input points instead of extension
input points.

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

Number of output points for immediate


Num Number Input 1~8
refresh
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
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.

 Precautions for Correct Use


The instruction is only used for the immediate refresh of local output points instead of extension output
points.

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

Left_Manage _ins tanc e


Lef t_Manage
Enable Va lid
O pen Left Opened

 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

Valid  When Enable changes from


 When Enable changes to TRUE.
TRUE to FALSE
 When Enable changes from
 When Enable changes to TRUE and Open TRUE to FALSE
LinkOpened
changes to TRUE.  When Open changes from TRUE
to FALSE 8_
8_

8- 3 11
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing Chart


Case 1 Case 2 Case 3

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.

Mapping device in the


AD module CR name CR No.
PLC
Channel 1 input signal
CR12 %MW6000
mean value
Channel 2 input signal
CR13 %MW6001
mean value
Channel 3 input signal
CR14 %MW6002
mean value
Channel 4 input signal
CR15 %MW6003
mean value
Channel 1 input signal
CR16 %MW6004
present value
Channel 2 input signal
CR17 %MW6005 8_
present value 8_
Channel 3 input signal
CR18 %MW6006
present value
Channel 4 input signal
CR19 %MW6007
present value

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.

Mapping device in the


DA module CR name CR No.
PLC
Channel 1 output value CR16 %MW6250
Channel 2 output value CR17 %MW6251
Channel 3 output value CR18 %MW6252
Channel 4 output value CR19 %MW6253

_8

8- 3 1 4
Chapter 8 Logic Instructions

8.17 PID-related Instructions


8.17.1 PID
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FB The PID instruction is applicable for the PID operation. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S
PID_inst ance
PID
PID_RUN MV
SV
PV
PI D_MODE
PI D_MAN
MOUT_A UTO
CYCLE
Kc _Kp
Ti_Ki
Td_Kd
Tf
PI D_EQ
PI D_DE
PI D_DIR
ERR_DBW
MV_MAX
MV_MIN
MOUT
BI AS
I _MV

 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

Independent Formula & Derivative of E( PID_EQ=False & PID_DE=False)


t
dE E = SV – PV or E = PV – SV
MV = K P E + Ki ∫ Edt + K d * + BIAS
0
dt
When PID_MODE is set to 1, the PID control mode is the automatic tuning mode. After the tuning
of the parameter is completed, PID_MODE becomes 0 automatically and the PID control mode
_8 becomes the automatic control mode

8- 3 1 8
Chapter 8 Logic Instructions

 PID Block Diagram:

PID Block Diagram (Independent)


PID_D IR
E
+ 1
SV + DEAD BAND
-
REVERSE
PV 0
X(-1)

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

PID Block Diagram (Dependent)


PID_D IR
E
+ 1
SV + DEAD BAND PID-P
-
REVERSE
PV 0
X(-1)

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

0 0 .1 0.2 0.3 0 .4 0 .5 0 .6 0.7 0.8 0 .9 1 Ti me (se c)

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

0 0. 1 0.2 0. 3 0. 4 0 .5 0. 6 0 .7 0. 8 0.9 1 Ti me ( sec)

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

 The variable table and program


1. Global variable table

Variable name Data type Current value


M1 BOOL FALSE
D_RUN BOOL
G_In1 INT
2. Local variable table
Variable name Data type Current value
PID0 PID
D_SV REAL
D_PV REAL
D_MODE DINT
D_MAN BOOL
D_CYC DINT
D_Kc REAL
D_Ki REAL
D_Kd REAL
D_Tf REAL
D_DIR BOOL
D_DBW REAL
D_MAX REAL
D_MIN REAL
D_MOUT REAL
D_BIAS REAL
D_I_MV REAL
D_MV REAL

_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

REA L_TO _SI NT 2


M1 EN ENO
D_MV In O ut G _In1


b. POU2(Freewheeling Task)
GPWM1
GP WM 3
D_RUN E nable Out M2
G_In1 In1
4000 In2

c. The experimental result of the automatic tuning function is shown below.

8_
8_

8- 3 2 3
DVP-50MC Series Motion Controller Operation Manual

Auto Tuning Area PID Control Area


PI D_MODE=1 PID_MODE= 0

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

8.18 Address Instruction


8.18.1 ADR
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
FC ADR is used to get the address of a variable. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S

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

 The variable table and program


Variable name Address Data type
ADR_EN BOOL
ADR_In %MW0 INT
ADR1 POINTER TO INT
OUT1 INT

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

8.19 Network Diagnosis


8.19.1 EtherCAT Diagnosis
EtherCAT_SysDiag
FB/FC Explanation Applicable model
EtherCAT_SysDiag is used for the diagnosis of DVP50MC11T/DVP50MC11T-06
FB EtherCAT system only by the EtherCAT port embedded DVP50MC11P/DVP50MC11P-06
in the motion controller. DVP50MC11T-04S/DVP50MC11T-16S

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

8.19.2 CANopen Diagnosis


CANopen_SysDiag
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
CANopen_SysDiag is used for the diagnosis of the
FB DVP50MC11P/DVP50MC11P-06
states of all slaves connected to CANopen port.
DVP50MC11T-04S/DVP50MC11T-16S

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.

TRUE when the station addresses of the


NodeNumSame BOOL TRUE / FALSE
master and slaves are duplicated.

8- 3 3 3
DVP-50MC Series Motion Controller Operation Manual

Parameter name Function Data type Valid range


Recods the number of Emergency message
EMCY_Num USINT 0~5
the controller receives.
Recods the Emergency message that the ARRAY [1..5] OF
EMCY_Data
controller receives from the slave. CANopen_EMCY_Type
 Output Update Timing
Name Timing for changing to TRUE Timing for changing to FALSE
 When the instruction execution  When Error changes to TRUE.
Done
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.
 Functions
CANopen_NodeDiag is used for the diagnosis of the state of the specified slave connected to CANopen
port. (Only the CANopen port built in the controller can use the instruction.) If the slave configured in the
software can not work normally, the instruction can be used to diagnose the cause of the error and record
the number of times the slave sends Emergency message and the Emergency message data.

_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

 Output Update Timing


Name Timing for changing to TRUE Timing for changing to FALSE
 When the instruction execution  When Error changes to TRUE.
Done
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.
 Functions
CANopen_State is used for the diagnosis of the state of CANopen port (Only the CANopen port built in
the motion controller can use the instruction.) It can tell the state of CANopen port and if any slave is
offline.

_8

8- 3 3 6
Chapter 8 Logic Instructions

8.20 Read and Write Offset Bit Value


8.20.1 SetBitOffsetValue
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
SetBitOffsetValue is used to set the value of the specific
FC DVP50MC11P/DVP50MC11P-06
bit of the specified address to TRUE or FALSE.
DVP50MC11T-04S/DVP50MC11T-16S

SetBitOffsetValue
EN E NO
StartRegister
Offset
Value

 Parameters
Input/
Parameter name Meaning Description Valid range
Output
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.

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.

 Precautions for Correct Use


The StartRegister parameter of the SetBitOffsetValue 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 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

8.21 FCS Instructions


8.21.1 CRC16
FB/FC Explanation Applicable model
DVP50MC11T/DVP50MC11T-06
CRC16 instruction is used to calculate the CRC value
FC DVP50MC11P/DVP50MC11P-06
of the specified data.
DVP50MC11T-04S/DVP50MC11T-16S

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

Data and number of bytes specified by Length.


The calculation result is put in the output parameter LRC.

 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.
2. Programming Example
 The variable table and program
Variable name Address Data type Current value
LRC_EN BOOL TRUE
%MB100 ARRAY[1..6]
IN_Data [16#01,16#03,16#10,16#01,16#00,16#02]
OF BYTE
IN_Length UINT 6
OUT_LRC WORD 16#E9

 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

9.1 Description of Axis Parameters


Default
Serial No Parameter Name Function Data Type
Value
1 Name Axis name STRING -
"Name" is a remark word only used for naming the servo drive without actual meaning.
2 Node ID Axis number; range:1-32 USINT -
“Node ID” is the CANopen station address of a servo drive.
Axis type: linear axis/ rotary axis
Unit: the unit of pitch (UnitsPerRotation). Linear
3 Axis type&unit -
E.g. Users can fill mm (millimeter) or ° axis
(degree) as a unit.
Linear Axis:

Linear Axis Model


Note:
P1 Positive Limit
P2 Negative Limit
Servo Position

Rotary Axis :

Rotary Axis Model(“Modulo”: 360)


Note:
P1 Positive Limit
P2 Negative Limit
Servo Position
R Home Position

_9 Z Axis of the servo motor

Difference between linear axis and rotary axis:


The rotary axis regards modulo as its cycle, which is the difference between linear axis and rotary axis.
The position of the terminal actuator of the linear axis is 500 and the corresponding position of the rotary
axis is 140 which is the remainder of 500 divided by modulo (360).

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.

This parameter and OutputRotation decide


12 InputRotation UINT 1
the mechanical gear ratio.
InputRotation and this parameter decide
13 OutputRotation UINT 1
the mechanical gear ratio.
The number of units which the terminal
14 UnitsPerRotation actuator moves while output end of the UINT 10000
gear rotates for one circle.
As illustrated below, InputRotation =1, OutputRotation =2, it means the input mechanism of gear box
rotates for one circle and the output mechanism of gear box rotates for 2 circles. UnitsPerRotation
represents the corresponding position (units) that ball screw moves while the output mechanism of gear
box rotates for one circle.
E.g. If output mechanism of gear rotates for one circle and ball screw moves 1mm and UnitsPerRotation
is set to 1, through the relative position motion instruction the ball screw will move 1 unit, i.e. the ball screw
will move 1mm; 9_
If UnitsPerRotation is set to 1000, the ball screw will move 1 unit through the MC_MoveRelative motion
instruction, i.e. 1/1000mm actually. The unit of the position in the motion control instruction, G codes and
electronic cam is Unit.

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

Set the homing mode of the servo drive;


15 Homing Mode range: 1~ 35. UINT 1
See appendix D for more details.
The speed from starting homing to finding
Speed 1 the home switch; Unit: rpm, setting range: UDINT 20
1-2000 rpm
16
The speed from finding the home switch to
Speed 2 reaching the mechanical home; Unit: rpm, UDINT 10
setting range: 1-500 rpm
_9

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

10.1 EN and ENO


When one instruction which is used has EN and ENO and EN is FALSE (0), the function defined by instruction
will not be performed and the output values of the instruction will not be refreshed. On the contrary, the function
defined by the instruction will be performed and the output values will be refreshed if EN is TRUE (1).
The output of ENO and the input of EN keep consistent with each other. ENO changes to TRUE while EN is
TRUE. ENO changes to FALSE while EN is FALSE.
For the FB instruction, the instruction execution will continue as its EN changes from TRUE to FALSE after
being executed. But the output values of the FB instruction will not be refreshed.

10.2 Relation among Velocity, Acceleration and Jerk


The motion controller adopts the method of the quadratic-curve acceleration and deceleration. By means of
the method, the S-type velocity waveform which is generated can reduce the mechanical shock effectively. In
addition, at least the velocity (v), acceleration (Acc) or deceleration (Dec) and change rate of the acceleration
(Jerk) need be specified while the motion control instructions are used.

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

Velo ci ty (Uni t /se co nd)

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

Jerk (U nit / secon d )


3

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

10.3 Introduction of BufferMode


For the same axis, another motion instruction can be started while one motion instruction is controlling the axis
motion. There are 6 buffer modes for selection to switch from one motion instruction being executed to another
motion instruction. The buffer mode can be selected through the BufferMode parameter of the buffered motion
instruction.
The terms about BufferMode are explained as below.
1. Current instruction: The motion instruction which is controlling the axis currently.
2. Buffered instruction: The instruction which is waiting to be executed.
3. Transit velocity: The speed at which the axis moves at the moment when the currently being executed
instruction is switched to the buffered instruction.
4. Target velocity: The Velocity parameter of an instruction
5. Target position: The Position or Distance parameter of the position-related instructions
 Six Buffer Modes for Selection
Buffer Mode Description
0: mcAborting
The instruction being executed currently is aborted immediately.
(Aborting)
1: mcBuffered The buffered instruction just starts to control the axis after the current
(Buffered) instruction execution is completed.
The buffered instruction just starts to control the axis after the target
2: mcBlendingLow position of the current instruction is reached. The transit velocity is the
(Blend with low) lower of the target velocities of the current instruction and buffered
instruction.

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.

 Aborting: Buffermode=mcAborting. See the examples of four cases as below.


2. Current instruction is aborted while the
1. Current instruction is aborted while the
controlled axis is moving at a constant
controlled axis is accelerating.
velocity.

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.

C urrent Buffered i ns truction t


Curr ent
ins truction
Buffer ed ins truction t
i nstruc tion

4. The velocity direction of the buffered


3. Current instruction is aborted while the
instruction is opposite to the current
controlled axis is decelerating.
instruction.

V T he buffer ed ins tru cti on i s s tar te d


a nd the n s ta rts t o c ontro l the
V ax is i m me dia tely.

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

 Buffered: Buffermode=mcBuffered. See two cases as below.


1. When the direction of the buffered 2. When the direction of the buffered
instruction is the same as that of the instruction is opposite to that of the
current instruction current instruction.

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

 Blending with low velocity: Buffermode=mcBlendingLow. See three cases as below.


1. When the velocity of the current 2. When the velocity of the current
instruction is less than that of the instruction is greater than that of the
buffered instruction. buffered instruction.

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

 Blending with previous velocity: Buffermode=mcBlendingPrevious. See three cases as below.


1. When the target velocity of the current 2. When the target velocity of the current
instruction is less than that of the instruction is greater than that of the
buffered instruction. buffered instruction.

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

 Blending with next velocity: Buffermode=mcBlendingNext. See three cases as below.


1. When the target velocity of the 2. When the target velocity of the current
current instruction is less than that of instruction is greater than that of the
the buffered instruction buffered instruction
V Cur rent ins tr uc tion ex ecution is c ompleted V
and the buffered ins tr uction starts to control t The buf f er ed
axi s when the ax is ac cel erates to the v eloc it inst ruc ti on
of the next i ns truc tion. C ur rent ins tr uct ion exec ution is c omplet ed
i s st art ed
and t he buf f ered ins t ruct ion st art s t o cont rol t h
axis w hen t he ax is v eloc it y is dec reased t o the
V2 T he buffered v eloci ty o f t he nex t ins t ruct ion.
ins truction V1
is s tarted

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

Buffered ins tr uc tion

Current
instruction t
S2

V2

 Blending with high velocity: Buffermode=mcBlendingHigh. See three cases as below.


1. When the target velocity of the current 2. When the target velocity of the current
instruction is less than that of the instruction is greater than that of the
buffered instruction buffered instruction

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

 Buffer Modes that various instructions support


The buffer mode of the current instruction and buffered instruction is set by modifying the value of the
BufferMode parameter. The value of BufferMode of the buffered instruction is selected according to the buffer
mode that current instruction supports and the BufferMode parameter of the current instruction is invalid.
For example: The BufferMode of MC_MoveRelative supports mcAborting, mcBuffered, mcBlendingLow,
mcBlendingPrevious, mcBlendingNext and mcBlendingHigh. The BufferMode of
MC_MoveVelocity supports mcAborting and mcBuffered.
Case 1: If MC_MoveRelative is the current instruction and MC_MoveVelocity is the buffered instruction. The
BufferMode parameter of MC_MoveVelocity can select one of mcAborting, mcBuffered,
mcBlendingLow, mcBlendingPrevious, mcBlendingNext and mcBlendingHigh.
Case 2: If MC_MoveVelocity is the current instruction and MC_MoveRelative is the buffered instruction. The
BufferMode parameter of MC_MoveRelative can select one of mcAborting and mcBuffered.

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

 Examples of Buffer Modes


Example 1
The following example explains six buffer modes for the switch from the execution of one MC_MoveRelative
instruction to the other MC_MoveRelative instruction.
The variable table and program
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
Rel1 MC_MoveRelative
Rel1_Ex BOOL FALSE
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_Ex BOOL FALSE
Rel2_BM MC_Buffer_Mode 10

10- 11
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value


Rel2_Done BOOL
Rel2_Bsy BOOL
Rel2_Act BOOL
Rel2_Abt BOOL
Rel2_Err BOOL
Rel2_ErrID WORD
Pwr
MC_Power 1
Axis1 Axis S tatus P wr_Sta
True Enable Busy Pwr_Bsy
True EnablePositive Active Pwr_Act
True EnableNegative Error Pwr_Err
Pwr_BM Buff erMode E rrorID Pwr_ErrID

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

 Rel2_BM =mcBlending _Previous

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

 Rel2_BM =mcBlending _Next

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

 Rel2_BM =mcBlending _High

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

Variable name Data type Initial value


Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Vel MC_MoveVelocity
Vel _Ex BOOL FALSE
Vel _Vel LREAL 10000.0
Vel _Acc LREAL 10000.0
Vel _Dec LREAL 10000.0
Vel _Jerk LREAL 10000.0
Vel _Dir MC_DIRECTION 1
Vel _BM MC_Buffer_Mode
Vel _Invel BOOL
Vel _Bsy BOOL
Vel _Act BOOL
Vel _Abt BOOL
Vel _Err BOOL
Vel _ErrID WORD
Rel MC_MoveRelative
Rel_Ex BOOL FALSE
Rel_Dist LREAL 100000.0
Rel_Vel LREAL 20000.0
Rel_Acc LREAL 10000.0
Rel_Dec LREAL 10000.0
Rel_Jerk LREAL 10000.0
Rel_BM MC_Buffer_Mode 0
Rel_Done BOOL
Rel_Bsy BOOL
Rel_Act BOOL
Rel_Abt BOOL
Rel_Err BOOL
Rel_ErrID WORD

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

Variable name Data type Initial value


Pwr_Err BOOL
Pwr_ErrID WORD
Rel MC_MoveRelative
Rel_Ex BOOL FALSE
Rel_Dist LREAL 100000.0
Rel_Vel LREAL 10000.0
Rel_Acc LREAL 10000.0
Rel_Dec LREAL 10000.0
Rel_Jerk LREAL 10000.0
Rel_BM MC_Buffer_Mode 0
Rel_Done BOOL
Rel_Bsy BOOL
Rel_Act BOOL
Rel_Abt BOOL
Rel_Err BOOL
Rel_ErrID WORD
Vel MC_MoveVelocity
Vel _Ex BOOL FALSE
Vel _Vel LREAL 20000.0
Vel _Acc LREAL 10000.0
Vel _Dec LREAL 10000.0
Vel _Jerk LREAL 10000.0
Vel _Dir MC_DIRECTION 1
Vel _BM MC_Buffer_Mode
Vel _Invel BOOL
Vel _Bsy BOOL
Vel _Act BOOL
Vel _Abt BOOL
Vel _Err BOOL
Vel _ErrID WORD

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

 Vel _BM =mcAborting

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

 Vel _BM =mcBuffered

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

 Vel _BM =mcBlendingLow

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

 Vel _BM =mcBlendingPrevious

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

 Vel _BM =mcBlendingNext

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

 Vel _BM =mcBlendingHigh

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

10.4 The State Machine


When the motion controller utilizes the motion control instruction to control every axis, there is one internal-run
state for every axis and axis states are switched by following the state machine instructions below. The state
machine defines the motion instructions that can be executed in all states and the states after the motion
instructions are executed. Using the motion instructions, users could judge if a certain instruction could be
used in current state through the state machine.
The state machine of the motion controller is illustrated as below and the arrow points to the axis status.

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

Note3 E rror Stop


Disable

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.

No. Axis state Indication


1 StandStill Pre-execution state
2 Disabled No-execution state
3 ErrorStop Error state
4 Stopping Stop state
5 Homing Homing state
6 Discrete Motion Discrete motion state
7 Continuous Motion Continuous motion state
8 Synchronized Motion Synchronized motion state

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.3.23 DMC_Jog ....................................................................... 11-178


11.3.24 DMC_MoveVelocityStopByPos ........................................... 11-181
11.3.25 DMC_MoveVelocityStopByLinePos ..................................... 11-186
11 11.3.26 DMC_ReadPositionLagStatus ............................................ 11-191
1 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
11.4 Coupling Instructions..........................................................11-210
11.4.1 MC_GearIn ..................................................................... 11-210
11.4.2 MC_GearOut ................................................................... 11-219
11.4.3 MC_CombineAxes ............................................................ 11-225
11.4.4 Introduction of Electronic Cam .......................................... 11-235
11.4.5 MC_CamIn ...................................................................... 11-236
11.4.6 MC_CamOut .................................................................... 11-263
11.4.7 DMC_CamReadPoint ......................................................... 11-270
11.4.8 DMC_CamWritePoint ........................................................ 11-275
11.4.9 DMC_CamSet .................................................................. 11-278
11.4.10 DMC_CamReadTappetStatus ............................................ 11-283
11.4.11 DMC_CamReadTappetValue .............................................. 11-289
11.4.12 DMC_CamWriteTappetValue ............................................. 11-293
11.4.13 DMC_CamAddTappet ....................................................... 11-299
11.4.14 DMC_CamDeleteTappet ................................................... 11-304
11.5 Application Instructions ......................................................11-308
11.5.1 Rotary Cut Technology ...................................................... 11-308
11.5.2 Rotary Cut Parameters ..................................................... 11-309
11.5.3 Control Feature of Rotary Cut Function ............................... 11-310
11.5.4 Introduction to Cam Curve with Rotary Cut Function ............ 11-311
11.5.5 Rotary-cut Instructions ..................................................... 11-316
APF_RotaryCut_Init ................................................... 11-316
APF_RotaryCut_In ..................................................... 11-320
APF_RotaryCut_Out ................................................... 11-323
11.5.6 Application Example of Rotary Cut Instructions .................... 11-326
11.6 G Code Instructions ............................................................11-331
11.6.1 CNC Introduction ............................................................. 11-331
11.6.2 G Code Input Format........................................................ 11-331
11.6.3 Explanation of G Code Formats .......................................... 11-332

11- 2
Chapter 11 Motion Control Instructions

11.6.4 G Code Functions ............................................................ 11-334


G90 (Absolute Mode) ................................................ 11-334
G91 (Relative Mode) ................................................. 11-335
G0 (Rapid Positioning) ............................................... 11-336 11
G1 (Linear Interpolation) ........................................... 11-340
G2 (Clockwise Circular/ Helical Interpolation) ............... 11-343
G3 (Anticlockwise Circular /Helical Interpolation) .......... 11-352
G17/G18/G19 (Specify Circular Interpolation Plane)...... 11-358
G4 (Dwell Instruction) ............................................... 11-360
G50 (Precise Stop) ................................................... 11-360
G51 (Round path transition) ..................................... 11-361
G52 (Smooth path transition) ................................... 11-362
M Code .................................................................. 11-365
11.6.5 G Code Instructions ......................................................... 11-367
DMC_CartesianCoordinate ......................................... 11-367
DMC_ReadMFunction................................................. 11-375
DMC_ResetMFunction ................................................ 11-379
DMC_SetG0Para ....................................................... 11-383
DMC_SetG1Para ....................................................... 11-387
DMC_SetStartPosition ............................................... 11-391
11.7 Axes Group Instructions ..................................................... 11-395
11.7.1 DMC_AddAxisToGroup...................................................... 11-395
11.7.2 DMC_RemoveAxisFromGroup ............................................ 11-398
11.7.3 DMC_UngroupAllAxes ...................................................... 11-401
11.7.4 DMC_GroupEnable .......................................................... 11-403
11.7.5 DMC_ GroupStop ............................................................ 11-407
11.7.6 DMC_GroupInterrupt ....................................................... 11-414
11.7.7 DMC_GroupContinue ....................................................... 11-421
11.7.8 DMC_MoveDirectAbsolute ................................................. 11-424
11.7.9 DMC_MoveDirectRelative .................................................. 11-431
11.7.10 DMC_MoveLinearAbsolut ................................................. 11-438
11.7.11 DMC_MoveLinearRelative ................................................ 11-456
11.7.12 DMC_MoveCircularAbsolute ............................................. 11-474
11.7.13 DMC_MoveCircularRelative .............................................. 11-487
11.7.14 DMC_GroupSetOverride .................................................. 11-501
11.7.15 DMC_GroupReadActualPosition ........................................ 11-507
11.8 Coordination Instructions ................................................... 11-510
11.8.1 DMC_ControlAxisByPos .................................................... 11-510

11- 3
DVP-50MC Series Motion Controller Operation Manual

11.8.2 DMC_NC ......................................................................... 11-515

11
1

11- 4
Chapter 11 Motion Control Instructions

11.1 Table of Motion Control Instructions


Instruction set Instruction code Function

MC_Power Power Servo


11
MC_Home Homing

MC_MoveVelocity Velocity

MC_Halt Temporary Stop

MC_Stop Stop

MC_MoveRelative Relative Positioning

MC_MoveAdditive Additive Positioning

MC_MoveAbsolute Absolute Positioning

MC_MoveSuperimposed Superimposed Positioning

MC_HaltSuperimposed Halt Superimposing

MC_SetPosition Set Position

MC_SetOverride Set Override Factors

MC_Reset Reset

DMC_SetTorque Set Torque

MC_ReadAxisError Read Axis Error


Single-axis instructions MC_ReadActualPosition Read Actual Position

MC_ReadStatus Read Axis Status

MC_ReadMotionState Read Motion State

DMC_ReadParameter_Motion Read a Parameter

DMC_WriteParameter_Motion Write a Parameter Value

DMC_TouchProbe Capture Axis Position

DMC_TouchProbeCyclically Capture axis position cyclically

DMC_Jog Jog

DMC_MoveVelocityStopByPos Stop at a specified phase

DMC_MoveVelocityStopByLine
Stop at a specified position
Pos

DMC_ReadPositionLagStatus Detect position lag

DMC_WritePositionLagSetting Set position lag

DMC_ChangeMechanismGearR
Modify axis parameter value
atio

DMC_TorqueControl Torque control

11- 5
DVP-50MC Series Motion Controller Operation Manual

Instruction set Instruction code Function

Change velocity and make it valid


DMC_MoveVelocity
immediately
11 DMC_SwitchSoftLimit Software limit switch
1
MC_GearIn Start E-Gear Operation

MC_GearOut End E-Gear Operation

MC_CombineAxes Combine Axes

MC_CamIn Start E-Cam Operation

MC_CamOut End E-Cam Operation

DMC_CamReadPoint Read cam point information

DMC_CamWritePoint Set cam point parameters


Coupling instructions
Make the modified cam point info
DMC_CamSet
effective

DMC_CamReadTappetStatus Read tappet status

DMC_CamReadTappetValue Read tappet parameters

DMC_CamWriteTappetValue Set tappet parameters

DMC_CamAddTappet Add a tappet point

DMC_CamDeleteTappet Delete a tappet point

APF_RotaryCut_Init Initialize Rotary Cut

Application instructions APF_RotaryCut_In Rotary Cut In

APF_RotaryCut_Out Rotary Cut Out

DMC_CartesianCoordinate Cartesian-coordinate robot

DMC_ReadMFunction Read M code status

DMC_ResetMFunction Reset M code


G Code Instructions
DMC_SetG0Para Set G0 parameter

DMC_SetG1Para Set G1 parameter

DMC_SetStartPosition Set start position

DMC_ AddAxisToGroup Add an axis to an axes group

DMC_RemoveAxisFromGroup Remove an axis from an axes group

DMC_UngroupAllAxes Remove all axes in an axes group


Axes Group Instructions DMC_ GroupEnable Enable an axes group

DMC_ GroupStop Stop the current axes group motion

Pause the current axes group motion


DMC_ GroupInterrupt
temporarily

11- 6
Chapter 11 Motion Control Instructions

Instruction set Instruction code Function

Make the paused axes group continue


DMC_ GroupContinue
to run

DMC_MoveDirectAbsolute Direct absolute positioning 11


DMC_MoveDirectRelative Direct relative positioning

DMC_MoveLinearAbsolute Linear absolute interpolation

DMC_MoveLinearRelative Linear relative interpolation

DMC_MoveCircularAbsolute Circular absolute interpolation

DMC_MoveCircularRelative Circular relative interpolation

DMC_GroupSetOverride Set override

DMC_GroupReadActualPosition Read actual position of axes in an group


DMC_ControlAxisByPos Incremental position control
Coordination Instructions
DMC_NC CNC file parsing

11- 7
DVP-50MC Series Motion Controller Operation Manual

11.2 About Motion Control Instructions


11.2.1 Composition of A Motion Control Instruction

11 The instructions starting with “MC_” or “DMC” belong to motion instructions.


1

11.2.2 Program Languages that Motion Control Instructions Support

The motion instructions support the following two types of program languages.

For details, refer to the software help file.


 Ladder diagram (LD)
 Structured text (ST)

11- 8
Chapter 11 Motion Control Instructions

11.2.3 Configuration of 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.

Whether motion intructions can be


Task type
added or not

Cyclic No

Freewheeling No

Motion event Yes


Triggered by event
Non-motion event No

11- 9
DVP-50MC Series Motion Controller Operation Manual

11.3 Single-axis Instructions


11.3.1 MC_Power

11 FB/FC Explanation Applicable model

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.

 Output Update Timing

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.

 When the instruction is being


Busy  When Error changes to TRUE.
executed.

 The instruction starts controlling


Active  When Error changes to TRUE.
the axis.

 When an error occurs in the


instruction execution or the input  When an abnormal situation is
Error
parameters for the instruction are cleared.
illegal.

 Output Update Timing Chart

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

This instruction is used to enable or disable the corresponding servo axis.

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

Enable to personnel or devices!

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

The example of MC_Power instruction execution

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.

1. The variables and program

11- 1 3
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value


Pwr MC_Power
Axis1 USINT 1
11 Pwr_En BOOL FALSE
1 Pwr_EnPs BOOL FALSE
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 _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

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

2. Motion Curve and Timing Chart

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.

 When Vel _Ex changes to FALSE, Vel _Abt changes to FALSE.


 When Pwr_En changes to FALSE, Pwr_Sta change to FALSE after the axis is disabled.

 Programming Example 2

The example of Vel _BM =0


When the value of Vel _BM is set to 0 and Pwr_En changes from TRUE to FALSE, the axis will enter
the Disabled state and the velocity will be decreased to 0 immediately.

1. The variables and program

Variable name Data type Initial value


Pwr MC_Power
Axis1 USINT 1

11- 1 5
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value


Pwr_En BOOL FALSE
Pwr_EnPs BOOL FALSE
11 Pwr_BM MC_Buffer_Mode 1
1 Pwr_Sta BOOL
Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Vel MC_MoveVelocity
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
Stp MC_Stop
Stp _Ex BOOL FALSE
Stp _Done BOOL
Stp _Bsy BOOL
Stp _Act BOOL
Stp _Abt BOOL
Stp _Err BOOL
Stp _ErrID WORD

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

2. Motion Curve and Timing Chart

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.

 When Vel _Ex changes to FALSE, Vel _Abt changes to FALSE.

 Programming Example 3

The example of Vel_BM =1


When the value of Buffermode is set to 1 and Enable changes from TRUE to FALSE, there will be no
change in Status of MC_Power unless the axis stops moving. When the axis stops moving, the axis will
enter the Standstill state first and one cycle later, it will go to the Disabled state.

1. The variables and program

Variable name Data type Initial value


Pwr MC_Power
Axis1 USINT 1
Pwr_En BOOL FALSE
Pwr_EnPs BOOL FALSE
Pwr_BM MC_Buffer_Mode 0
Pwr_Sta BOOL

11- 1 8
Chapter 11 Motion Control Instructions

Variable name Data type Initial value


Pwr_Bsy BOOL
Pwr_Act BOOL
Pwr_Err BOOL 11
Pwr_ErrID WORD
Vel MC_MoveVelocity
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
Stp MC_Stop
Stp _Ex BOOL FALSE
Stp _Done BOOL
Stp _Bsy BOOL
Stp _Act BOOL
Stp _Abt BOOL
Stp _Err BOOL
Stp _ErrID WORD

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

2. Motion Curve and Timing Chart

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.

 When Vel _Ex changes to FALSE, Vel _Abt changes to FALSE.


 When Stp _Ex changes to FALSE, Stp _Done, Stp _Bsy and Stp _Act change to FALSE.

11- 2 1
DVP-50MC Series Motion Controller Operation Manual

11.3.2 MC_Home

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 MC_Home controls the servo motor to perform the
DVP50MC11P/DVP50MC11P-06
1
FB
homing action according to the set mode and velocity.
DVP50MC11T-04S/DVP50MC11T-16S

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

Parameter name Function Data type Valid range

Done TRUE when the homing 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- 2 2
Chapter 11 Motion Control Instructions

Parameter name Function Data type Valid range

CommandAborted TRUE when the instruction is aborted. BOOL TRUE / FALSE

TRUE when an error occurs in execution of the


Error
instruction.
BOOL TRUE / FALSE 11
Contains the error code when an error occurs. Please
ErrorID WORD
refer to section 12.2 for the corresponding error ID.

 Output Update Timing

Parameter Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from


TRUE to FALSE after the
instruction execution is completed.
 Done changes to TRUE when the
Done  When homing is completed. instruction execution is completed
after Execute changes from TRUE
to FALSE during the instruction
execution. One cycle later, Done
changes to FALSE.

 When Done changes to TRUE.

 When Execute changes to  When Error changes to TRUE.


Busy
TRUE.  When CommandAborted changes
to TRUE.

 When Done changes to TRUE.

 When the instruction starts to  When Error changes to TRUE.


Active
control the axis.  When CommandAborted changes
to TRUE.

 When Execute changes from


TRUE to FALSE.
 CommandAborted is set to TRUE
 When this instruction execution is when the instruction is aborted
CommandAborted aborted by other motion control after Execute changes from TRUE
instruction. to FALSE during the instruction
execution. One cycle later,
CommandAborted changes to
FALSE.

 When an error occurs in the  When Execute changes from


Error
instruction execution or the input TRUE 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

Case 1 Case 2 Cas e 3 Cas e 4

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.

 Homing mode selection

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.

 The variable table and program

Variable name Data type Initial value

Hom MC_Home

Axis1 USINT 1

Hom_Ex BOOL FALSE

Hom_Done BOOL

Hom_Bsy BOOL

11- 2 6
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

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

FB/FC Explanation Applicable model


MC_MoveVelocity controls the axis motion based on
11 DVP50MC11T/DVP50MC11T-06
the set acceleration and deceleration till the set target
1 FB DVP50MC11P/DVP50MC11P-06
velocity is reached and then the axis moves at the set
DVP50MC11T-04S/DVP50MC11T-16S
speed.

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)

The instruction is executed


TRUE or FALSE
Execute when Execute changes BOOL -
(FALSE)
from FALSE to TRUE.

ContinuousUpdate Reserved - - -

Positive number, Negative


When Execute
Specify the target speed number and 0
Velocity LREAL changes from
(Unit: unit/second) (The variable value must
FALSE to TRUE
be set)

Specify the target Positive number When Execute


Acceleration acceleration (Unit: LREAL (The variable value must changes from
unit/second2) be set) FALSE to TRUE

Specify the target Positive number When Execute


Deceleration deceleration (Unit: LREAL (The variable value must changes from
unit/second2) be set) FALSE to TRUE

11- 2 8
Chapter 11 Motion Control Instructions

Valid range
Parameter name Function Data type Validation timing
(Default)

Specify the change rate of


When Execute
target acceleration or
Positive number
11
Jerk LREAL (The variable value must changes from
deceleration.
be set) FALSE to TRUE
(Unit: Unit/s3)

Specify the rotation


direction
1: mcPositiveDirection,
1: Positive direction
3: mcNegativeDirection When Execute
3: Negative direction MC_Direc
Direction 4: mcCurrentDirection, changes from
4: Current direction (When tion
FALSE to TRUE
the motor is in stop state,
(1)
the current direction is the
positive direction.)

Specify the behavior when


executing two instructions.
0: mcAborting
0: Aborting 1: mcBuffered
2: mcBlendingLow When Execute
1: Buffered MC_Buffe
BufferMode 3: mcBlendingPrevious changes from
2: BlendingLow r_Mode 4: mcBlending _Next
FALSE to TRUE
3: BlendingPrevious 5: mcBlending _High
(0)
4: BlendingNext
5: BlendingHigh

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

Parameter name Function Data type Valid range

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

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.

 Output Update Timing

Timing for changing to


Parameter Name Timing for changing to FALSE
TRUE

 When CommandAborted changes to TRUE


 When Error changes to TRUE
 Invelocity changes to FALSE immediately when
Execute changes from FALSE to TRUE again if the
input parameter values are revised after the target
Invelocity  When the target velocity is
velocity is reached. If the input parameter values are
reached.
not changed after the instruction execution is
completed and Execute changes from FALSE to
TRUE again, Invelocity changes to FALSE
immediately and Invelocity changes to TRUE in the
next cycle.

 When Execute changes to  When Error changes to TRUE.


Busy
TRUE.  When CommandAborted changes to TRUE.

 When the instruction  When Error changes to TRUE.


Active
starts to control the axis.  When CommandAborted changes to TRUE.

 When Execute changes from TRUE to FALSE.


 When this instruction  CommandAborted is set to TRUE when the
execution is aborted by instruction is aborted by other instruction after
CommandAborted
other motion control Execute changes from TRUE to FALSE during the
instruction. instruction execution. One cycle later,
CommandAborted changes to FALSE.

 When an error occurs in


Error the instruction execution  When Execute changes from TRUE to FALSE.
or the input parameters

11- 3 0
Chapter 11 Motion Control Instructions

Timing for changing to


Parameter Name Timing for changing to FALSE
TRUE
for the instruction are
illegal. 11
 Output Update Timing Chart

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

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

2. Motion Curve and Timing Chart

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

1. The variable table and program

Variable name Data type Initial value

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_Ex BOOL FALSE

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_Ex BOOL FALSE

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

2. Motion Curve and Timing Chart

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
MC_Halt is used to make the axis decelerate at a 11
FB DVP50MC11P/DVP50MC11P-06
given deceleration rate till it stops.
DVP50MC11T-04S/DVP50MC11T-16S

MC_Ha lt_ins tance


MC_Halt
Ax is Done
Ex ecut e Busy
Deceleration Act iv e
Jerk CommandAborted
Buf ferMode Error
E rrorID

 Input Parameters

Parameter Valid range


Function Data type Validation timing
name (Default)

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.

Specify the target Positive number


When Execute changes
Deceleration deceleration rate. LREAL (The variable value
from FALSE to TRUE
(Unit: Unit/s2) must be set)

Specify the change rate


of the target Positive number
When Execute changes
Jerk acceleration or LREAL (The variable value
from FALSE to TRUE
deceleration. must be set)
(Unit: Unit/s3)

11- 3 7
DVP-50MC Series Motion Controller Operation Manual

Parameter Valid range


Function Data type Validation timing
name (Default)

11 Specify the behavior

1 when executing two


MC_Buffer_
0: mcAborting
When Execute changes
BufferMode instructions. 1: mcBuffered
Mode (0) from FALSE to TRUE
0: Aborting
1: Buffered

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

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

CommandAbort
TRUE when the instruction is aborted. BOOL TRUE/FALSE
ed

Error TRUE when there is an error. BOOL TRUE/FALSE

Contains error codes when an error occurs. Please refer


ErrorID WORD -
to section 12.2 for the corresponding error code.

 Output Update Timing

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

 Done changes to TRUE when the instruction


11
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.
 When CommandAborted changes to TRUE.

 When Done changes to TRUE.


 When the instruction starts to
Active  When Error changes to TRUE.
control the axis.
 When CommandAborted changes to TRUE.

 When Execute changes from TRUE to FALSE.

 CommandAborted changes to TRUE when the


 When the instruction execution is
Command instruction is aborted after Execute changes from
aborted by other motion
Aborted TRUE to FALSE during the instruction execution.
instruction.
One period later, CommandAborted changes to
FALSE.

 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

 Output Update Timing Chart

Cas e1 Cas e2 Case3 Cas e4

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

The example of MC_Halt execution is shown below.


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

Pwr_Act BOOL

Pwr_Err BOOL

Pwr_ErrID WORD

Vel MC_MoveVelocity

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

Hlt MC_Halt

Hlt_Ex BOOL FALSE

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

2. Motion Curve and Timing Charts:

Velocity
10000

MC_Ve loci ty Time


Vel_Ex
Vel_Inve l
Vel_Bs y
Vel_Ac t
Vel_Abt
Vel_Err
MC_Hal t
Hlt _Ex
Hlt_Done
Hlt_Bsy
Hlt _Act
Hlt_Abt
Hlt_Err

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.

 As Hlt_Ex changes to FALSE, Hlt_Done changes to FALSE.

11- 4 3
DVP-50MC Series Motion Controller Operation Manual

11.3.5 MC_Stop

FB/FC Explanation Applicable model

MC_Stop is used to make the axis decrease its speed at a DVP50MC11T/DVP50MC11T-06


11
given deceleration rate till it stops and then the axis goes DVP50MC11P/DVP50MC11P-06
1
FB
into the Stopping state. DVP50MC11T-04S/DVP50MC11T-16S

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.

Specify the target Positive number When Execute


Deceleration deceleration rate. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE

Specify the change rate of


Positive number When Execute
the target acceleration or
Jerk LREAL (The variable value changes from
deceleration.
must be set) FALSE to TRUE
(Unit: Unit/s3)

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

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

CommandAbort
TRUE when the instruction is aborted. BOOL TRUE/FALSE
ed

Error TRUE when there is an error. BOOL TRUE/FALSE

Contains error codes when an error occurs. Please refer


ErrorID WORD
to section 12.2 for the corresponding error code.

 Output Update Timing

Parameter name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from TRUE to


FALSE after the instruction execution is
completed.
 When the deceleration ends and the  Done changes to TRUE when the
Done
axis speed is decreased to 0. instruction execution is completed after
Execute changes from TRUE to FALSE
during the instruction execution. One
period later, Done changes to FALSE.

 When Error changes to TRUE.


 When CommandAborted changes to
Busy  When Execute changes to TRUE. TRUE.
 When Done changes from TRUE to
FALSE.

 When Error changes to TRUE.


 When CommandAborted changes to
 When the instruction starts to control
Active TRUE.
the axis.
 When Done changes from TRUE to
FALSE.

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

1  CommandAborted changes to TRUE


when the instruction is aborted by
 When the instruction execution is
CommandAborted another MC_Stop after Execute
aborted by another MC_Stop.
changes from TRUE to FALSE during
the instruction execution. One period
later, CommandAborted changes to
FALSE.

 When an error occurs in the  When Execute changes from TRUE to


instruction execution or the input FALSE
Error
parameters for the instruction are
illegal.

 Output Update Timing Chart

Case 1 Cas e 2 Case 3 Cas e 4

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

The example of MC_Stop execution is shown as below.

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

Pwr_Act BOOL

Pwr_Err BOOL

Pwr_ErrID WORD

Vel MC_MoveVelocity

Vel_Ex BOOL FALSE

11- 4 7
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

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_Ex BOOL FALSE

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

2. Motion Curve and Timing Charts:

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.

 As Stp_Ex changes to FALSE, Stp_Done, Stp_Bsy and Stp_Act change to FALSE


simultaneously.

11- 4 9
DVP-50MC Series Motion Controller Operation Manual

11.3.6 MC_MoveRelative

FB/FC Explanation Applicable model


MC_MoveRelative is used to make the axis move a
11 DVP50MC11T/DVP50MC11T-06
given distance by starting from the command current
1 FB DVP50MC11P/DVP50MC11P-06
position at a given speed, acceleration and
DVP50MC11T-04S/DVP50MC11T-16S
deceleration and Jerk.

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)

The instruction is executed


TRUE or FALSE
Execute when Execute changes BOOL -
(FALSE)
from FALSE to TRUE.

ContinuousUpdate Reserved - - -

Specify the motion distance


Negative number, When Execute
Distance from command current
LREAL positive number or 0 changes from
position.
(0) FALSE to TRUE
(Unit: Unit)

Positive number When Execute


Specify the target velocity.
Velocity LREAL (The variable value changes from
(Unit: Unit/second)
must be set) FALSE to TRUE

11- 5 0
Chapter 11 Motion Control Instructions

Valid range
Parameter name Function Data type Validation timing
(Default)

Specify the target Positive number When Execute


Acceleration acceleration rate. LREAL (The variable value changes from 11
(Unit: Unit/s2) must be set) FALSE to TRUE

Specify the target Positive number When Execute


Deceleration deceleration rate. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE

Specify the change rate of


Positive number When Execute
the target acceleration or
Jerk LREAL (The variable value changes from
deceleration.
must be set) FALSE to TRUE
(Unit: Unit/s3)

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

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

Parameter name Function Data type Valid range

Error TRUE while there is an error. BOOL TRUE / FALSE

11
Contains error codes when an error occurs. Please
ErrorID refer to the section 12.2 for corresponding error WORD
1 codes.

 Output Update Timing

Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name

 When Execute changes from TRUE to


FALSE after the instruction execution is
completed.
 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
cycle 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.

 Done changes to TRUE.


 When the instruction starts to control the  When Error changes to TRUE.
Active
axis.  When CommandAborted changes to
TRUE.

 When Execute changes from TRUE to


FALSE.
 CommandAborted is set to TRUE when
CommandA  When this instruction execution is aborted
the instruction is aborted after Execute
borted by other motion control instruction.
changes from TRUE to FALSE during the
instruction execution. One cycle later,
CommandAborted changes to FALSE.

 When an error occurs in the instruction


 When Execute changes from TRUE to
Error execution or the input parameters for the
FALSE.
instruction are illegal.

11- 5 2
Chapter 11 Motion Control Instructions

 Output Update Timing Chart

Cas e 1 Cas e 2 Case 3 Ca se 4

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

Dista nce>0 D istance <0

Pos ition P osit io n


Dis tanc e= 10000 Dist ance =-1000 0
20000 200 00
Tar g et P osi tio n

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

The programming example is as follows when one MC_MoveRelative instruction is used.

1. The variables 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

Pwr_Act BOOL

Pwr_Err BOOL

Pwr_ErrID WORD

Rel MC_MoveRelative

11- 5 4
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

Rel _Ex BOOL FALSE

Rel _BM MC_Buffer_Mode 0

Rel _Done BOOL


11
Rel _Bsy BOOL

Rel _Act BOOL

Rel _Abt BOOL

Rel _Err BOOL

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

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

2. Motion Curve and Timing Chart

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

1. The variables and program

Variable name Data type Initial value

Pwr MC_Power
11
Axis1 USINT 1

Pwr_En BOOL FALSE

Pwr_BM MC_Buffer_Mode 0

Pwr_Sta BOOL

Pwr_Bsy BOOL

Pwr_Act BOOL

Pwr_Err BOOL

Pwr_ErrID WORD

Rel1 MC_MoveRelative

Rel1 _Ex BOOL FALSE

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 _Ex BOOL FALSE

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

11 True EnablePositive Active Pwr_Act


True EnableNegative Error Pwr_Err
1 0 Buff erMode E rrorID Pwr_ErrID

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

3. Motion Curve and Timing Chart

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

FB/FC Explanation Applicable model

MC_MoveAdditive is used to make the axis move an DVP50MC11T/DVP50MC11T-06


11
additive distance at a given speed, acceleration and DVP50MC11P/DVP50MC11P-06
1
FB
deceleration. DVP50MC11T-04S/DVP50MC11T-16S

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

Valid range Validation


Parameter name Function Data type
(Default) timing

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


TRUE or FALSE
Execute when Execute changes BOOL -
(FALSE)
from FALSE to TRUE.

ContinuousUpdate Reserved - - -

Specify the additive Negative number, When Execute


Distance distance. LREAL positive number or 0 changes from
(Unit: Unit) (0) FALSE to TRUE

When Execute
Specify the target velocity. Positive number or 0
Velocity LREAL changes from
(Unit: Unit/s) (0)
FALSE to TRUE

Specify the target Positive number When Execute


Acceleration acceleration. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE

11- 6 0
Chapter 11 Motion Control Instructions

Valid range Validation


Parameter name Function Data type
(Default) timing

Specify the target Positive number When Execute


Deceleration deceleration. LREAL (The variable value changes from 11
(Unit: Unit/s2) must be set) FALSE to TRUE

Specify the change rate of


Positive number When Execute
target acceleration and
Jerk LREAL (The variable value changes from
deceleration.
must be set) FALSE to TRUE
(Unit: Unit/s3)

Specify the behavior when 0: mcAborting


executing two instructions. 1: mcBuffered

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

Parameter name Function Data type Valid range

Done TRUE when the instruction 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


Error TRUE while there is an error. BOOL TRUE / FALSE

Contains the error code when an error occurs. Please


ErrorID WORD
refer to the section 12.2.

11- 6 1
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing

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.

 When Execute changes from TRUE to


FALSE.
 CommandAborted is set to TRUE when
 When the instruction execution is
the instruction execution is aborted
CommandAborted aborted by some other motion
after Execute changes from TRUE to
control instruction
FALSE during the instruction execution.
One period later, CommandAborted
changes to FALSE.

 When an error occurs in the


instruction execution or the input  When Execute changes from TRUE to
Error
parameters for the instruction are FALSE.
illegal.

11- 6 2
Chapter 11 Motion Control Instructions

 Output Update Timing Chart

Case1 Case2 Case3 Case4

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

If MC_MoveAdditive is executed while MC_MoveSuperimposed is individually executed, the


instruction will abort MC_MoveSuperimposed immediately when the value of BufferMode of
MC_MoveAdditive is 0. The distance which the terminal actuator will move includes the set distance
11 of this instruction and the uncompleted distance left by MC_MoveSuperimposed while
1 MC_MoveAdditive is executed.
An error will occur in the instruction right away if the value of BufferMode is in the range of 1~5 and
the execution of MC_MoveSuperimposed instruction will continue.
If MC_MoveAdditive is executed when MC_MoveSuperimposed is used with a positioning instruction
together, the instruction will abort MC_MoveSuperimposed and the positioning instruction when the
value of BufferMode of MC_MoveAdditive is 0. The distance which the terminal actuator will move is
the sum of the given distance of MC_MoveAdditive and the uncompleted distance left by the position
instruction which is used with MC_MoveSuperimposed together, excluding the uncompleted distance
left by MC_MoveSuperimposed while MC_MoveAdditive is executed. MC_MoveAdditive instruction
will be executed after the execution of the positioning instruction which is used in conjunction with
MC_MoveSuperimposed is completed if the value of BufferMode of MC_MoveAdditive is 1~5.

11- 6 4
Chapter 11 Motion Control Instructions

 MC_MoveAdditive is started while MC_MoveSuperimposed is being executed.

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.

 MC_MoveSuperimposed will not be


affected and keep being executed.
 After the execution of the position
Yes
instruction in conjunction with
1~5 MC_MoveSuperimposed ends,
(Buffered) MC_MoveAdditive will start.

 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

Below is an example of one single MC_MoveAbsolute instruction execution.


11
1 1. The variables 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

Pwr_Act BOOL

Pwr_Err BOOL

Pwr_ErrID WORD

Addt MC_MoveAdditive

Addt_Ex BOOL FALSE

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

2. Motion Curve and Timing Charts:

Veloc it y
500

Pos it ion Time

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

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
Pwr_Act BOOL
Pwr_Err BOOL
Pwr_ErrID WORD
Addt1 MC_MoveAdditive
Addt1_Ex BOOL FALSE
Addt1_BM MC_Buffer_Mode 0
Addt1_Done BOOL
Addt1_Bsy BOOL
Addt1_Act BOOL
Addt1_Abt BOOL
Addt1_Err BOOL
Addt1_ErrID WORD
Addt2 MC_MoveAdditive
Addt2_Ex BOOL FALSE
Addt2_BM MC_Buffer_Mode 0
Addt2_Done BOOL
Addt2_Bsy BOOL
Addt2_Act BOOL
Addt2_Abt BOOL
Addt2_Err BOOL
Addt2_ErrID WORD

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

2. Motion Curve and Timing Charts:

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

FB/FC Explanation FB/FC

MC_MoveAbsolute is used to make the axis move to the DVP50MC11T/DVP50MC11T-06


11
FB specified absolute target position at the given speed, DVP50MC11P/DVP50MC11P-06
acceleration and deceleration. DVP50MC11T-04S/DVP50MC11T-16S

MC_MoveAbs olut e_ins tanc e


MC_Mov eAbsolute
Ax is Done
Ex ecut e Busy
Cont inuous Upda te Ac tiv e
Pos ition CommandAborted
Veloc it y Error
Ac celeration ErrorID
Deceleration
Jerk
Direc tion
Buf ferMode

 Input Parameters

Valid range Validation


Parameter name Function Data type
(Default) timing

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

Specify the absolute


target position.
Rotary axis: 0≤ Position< Negative number, When Execute
Position Modulo LREAL positive number or 0 changes from
Linear axis: No limit to (0) FALSE to TRUE
Position.
(Unit: Unit)

11- 7 1
DVP-50MC Series Motion Controller Operation Manual

Valid range Validation


Parameter name Function Data type
(Default) timing

Specify the target Positive number When Execute


11 Velocity velocity. LREAL (The variable value changes from
1 (Unit: Unit/s) must be set) FALSE to TRUE

Specify the target Positive number When Execute


Acceleration acceleration. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE

Specify the target Positive number When Execute


Deceleration deceleration. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE

Specify the change rate of When Execute


Positive number
target acceleration or changes from
Jerk LREAL (The variable value
deceleration. FALSE to TRUE
must be set)
(Unit: Unit/s3)

Specify the rotation 1: mcPositive-


direction (which is valid Direction, When Execute
only when the axis is the 2: mcShortestWay, changes from
rotary axis). 3: mcNegative- FALSE to TRUE
Direction MC_Direction
1: Positive direction Direction , and the axis is in
2: Shortest way 4: mcCurrent- the mode of
3: Negative direction Direction rotary axis

4: Current direction (1)

Specify the behavior 0: mcAborting


when executing two 1: mcBuffered
instructions. 2: mcBlendingLow
3: mcBlending When Execute
0: McAborting MC_Buffer_ _Previous
BufferMode changes from
1: McBuffered Mode 4: mcBlending
2: McBlendingLow _Next FALSE to TRUE
3: McBlendingPrevious 5: mcBlending
4: McBlending Next _High
5: McBlendingHigh (0)
Notes:
1. MC_MoveAbsolute 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

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

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

 Output Update Timing

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.

 When Done changes to TRUE.


 When Execute changes to
Busy  When Error changes to TRUE.
TRUE.
 When CommandAborted changes to TRUE.

 When Done changes to TRUE.


 When the instruction starts
Active  When Error changes to TRUE.
controlling the axis.
 When CommandAborted changes to TRUE.

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.

 When an error occurs in the


instruction execution or the
Error  When Execute changes from TRUE to FALSE
input parameters for the
instruction are illegal.

 Output Update Timing Chart

Cas e1 Cas e2 Case3 Cas e4

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.

Po si tion >0 Positi on<0

Pos it ion Pos ition


Position= 5000 Position= -5000

Star t po si ti on Start pos ition

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)

1 Current position: 315° Current position: 315°


Target position: 90° Target position: 90°
Movement angle: 135° Movement angle: 225°

Direction: 2 (Shortest way) Direction: 2 (Shortest way)

Current position: 315° Current position: 315°

Target position: 90° Target position: 270°


Movement angle: 135° Movement angle: 45°

11- 7 6
Chapter 11 Motion Control Instructions

Direction: 4 (Current direction)


Direction: 4 (Current direction) The status of the rotary axis before the
The status of the rotary axis before the instruction is instruction is executed: motionless or moving
executed: Moving in the negative direction. in the positive direction. 11
Current position: 315° Current position: 315°
Target position: 90° Target position: 90°
Movement angle: 225° Movement angle: 135°

 Programming Example 1

One MC_MoveAbsolute is executed as follows.

1. The variables 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

Pwr_Act BOOL

Pwr_Err BOOL

Pwr_ErrID WORD

Abs MC_MoveAbsolute

Abs_Ex BOOL FALSE

11- 7 7
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

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

2. Motion Curve and Timing Charts

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.

1. The variables 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

Pwr_Act BOOL

Pwr_Err BOOL

11- 7 9
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

Pwr_ErrID WORD

Abs1 MC_Move Absolute


11
Abs1_Ex BOOL FALSE
1
Abs1_Dir MC_DIRECTION 0

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

Abs2_Ex BOOL FALSE

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

2. Motion Curve and Timing Charts

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

FB/FC Explanation Applicable model


MC_MoveSuperimposed controls the axis to
superimpose the set distance on the current motion state
DVP50MC11T/DVP50MC11T-06 11
FB DVP50MC11P/DVP50MC11P-06
according to the set velocity, acceleration and
DVP50MC11T-04S/DVP50MC11T-16S
deceleration.

MC_MoveSu perimposed_ins tance


MC_MoveSuperimpo sed
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 CoveredDistanc e
Jerk

 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

Specify the target Positive number When Execute


Deceleration deceleration rate. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE

Specify the change rate of


Positive number When Execute
the target acceleration or
Jerk LREAL (The variable value changes from
deceleration.
must be set) FALSE to TRUE
(Unit: Unit/s3)
Notes:
1. MC_MoveSuperimposed 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 during execution of the instruction.
2. When Execute changes from FALSE to TRUE again during execution of the instruction, 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.
3. Refer to section 10.2 for the relation among Velocity, Acceleration, Deceleration and Jerk.

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

 Output Update Timing

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.

 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 to control the  When Error changes to TRUE.
Active
axis.  When CommandAborted changes
to TRUE.

 When Execute changes from


TRUE to FALSE
 CommandAborted is set to TRUE
 When this instruction execution is when the instruction is aborted
CommandAborted aborted by other motion control after Execute changes from TRUE
instruction. to FALSE during the instruction
execution. One cycle later,
CommandAborted changes to
FALSE.

 When an error occurs in the instruction


 When Execute changes from
Error execution or the input parameters for the
TRUE to FALSE
instruction are illegal.

 Output Update Timing Chart

11- 8 5
DVP-50MC Series Motion Controller Operation Manual

Case 1 Case 2 Case 3 Case 4

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.

1. When MC_MoveSuperimposed instruction is executed, the execution of the previous instruction


excluding MC_MoveSuperimposed and MC_HaltSuperimposed instructions is not aborted. If the two
instructions are executed simultaneously, their distances, velocities, accelerations and decelerations
will be respectively added up in real time. When the set velocity of either of the instructions is reached,
the acceleration of the instruction will be 0. If the previous instruction execution is finished, the
velocities, accelerations and decelerations will not be added up any more and
MC_MoveSuperimposed instruction continues running independently.

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.

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

Pwr_Act BOOL

Pwr_Err BOOL

Pwr_ErrID WORD

11- 8 7
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

Sup MC_MoveSuperimposed

Sup_Ex BOOL FALSE


11
Sup_Done BOOL
1
Sup_Bsy BOOL

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

2. Motion Curve and Timing Chart:

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.

 When Sup_Ex changes to FALSE, Sup_Done changes to FALSE.


 When Sup_Ex changes to TRUE again after the servo motor completes the set distance, the
motion controller controls the servo motor to run. When the servo motor completes the set
distance, Sup_Done changes to TRUE again.

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_En BOOL FALSE

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_Ex BOOL FALSE

Rel_Done BOOL

Rel_Bsy BOOL

Rel_Act BOOL

Rel_Abt BOOL

Rel_Err BOOL

Rel_ErrID WORD

Sup MC_MoveSuperimposed

Sup_Ex BOOL FALSE

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

2. Motion Curve and Timing Chart:

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 the superimposed distance specified by the MC_MoveSuperimposed instruction is


completed, Sup_Done changes to TRUE and Sup_Bsy and Sup_Act change to FALSE.

 When the distance specified by the MC_MoveRelative instruction is completed, Rel_Done


changes to TRUE and Rel_Bsy and Rel_Act change to FALSE. The final position of the axis is
the sum of the distances of the two instructions plus the start position.

 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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
MC_HaltSuperimposed halts the execution of the 11
FB DVP50MC11P/DVP50MC11P-06
MC_MoveSuperimposed instruction.
DVP50MC11T-04S/DVP50MC11T-16S

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.

Specify the target Positive number When Execute


Deceleration deceleration rate. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE

Specify the change rate of Positive number When Execute


Jerk the target deceleration. LREAL (The variable value changes from
(Unit: Unit/s3) must be set) FALSE to TRUE
Notes:
1. MC_HaltSuperimposed 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 during execution of the instruction.
2. Refer to section 10.2 for the relation between Deceleration and Jerk.

11- 9 3
DVP-50MC Series Motion Controller Operation Manual

 Output Parameters

Parameter name Function Data type Valid range

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

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.

 Output Update Timing

Parameter Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from


TRUE to FALSE after the
instruction execution is completed.
 Done changes to TRUE when the
 When the instruction execution 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.

 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 to control the  When Error changes to TRUE.
Active
axis.  When CommandAborted changes
to TRUE.

 When Execute changes from


TRUE to FALSE
 When this instruction execution is  CommandAborted is set to TRUE
CommandAborted aborted by other motion control when the instruction is aborted
instruction. after Execute changes from TRUE
to FALSE during the instruction
execution. One cycle later,

11- 9 4
Chapter 11 Motion Control Instructions

Parameter Name Timing for changing to TRUE Timing for changing to FALSE
CommandAborted changes to
FALSE.

 When an error occurs in the instruction


11
 When Execute changes from
Error execution or the input parameters for the
TRUE to FALSE
instruction are illegal.

 Output Update Timing Chart

Case 1 Case 2 Case 3 Case 4

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

The MC_HaltSuperimposed instruction is used to halt the execution of the MC_MoveSuperimposed


instruction.
1. The MC_HaltSuperimposed instruction cannot be executed alone and it can only be used with the
MC_MoveSuperimposed instruction together.

11- 9 5
DVP-50MC Series Motion Controller Operation Manual

2. If the MC_HaltSuperimposed instruction is executed when the MC_MoveSuperimposed instruction


and other motion instruction jointly control the axis, the MC_HaltSuperimposed instruction will abort
the MC_MoveSuperimposed instruction but other motion instruction execution will not be affected.
11 3. The MC_HaltSuperimposed instruction can halt the execution of the MC_HaltSuperimposed
1 instruction.

 Programming Example
The programming example is as follows when one MC_HaltSuperimposed instruction is used.

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

Pwr_Act BOOL

Pwr_Err BOOL

Pwr_ErrID WORD

Rel MC_MoveRelative

Rel_Ex BOOL FALSE

Rel_Done BOOL

Rel_Bsy BOOL

Rel_Act BOOL

Rel_Abt BOOL

Rel_Err BOOL

Rel_ErrID WORD

Sup MC_MoveSuperimposed

Sup_Ex BOOL FALSE

Sup_Done BOOL

Sup_Bsy BOOL

Sup_Act BOOL

Sup_Abt BOOL

11- 9 6
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

Sup_Err BOOL

Sup_ErrID WORD

Sup_Distan LREAL
11
HltSup MC_HaltSuperimposed

HltSup_Ex BOOL FALSE

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

2. Motion Curve and Timing Chart

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.

 When Hltsup_Done changes to TRUE, Hltsup_Bsy and Hltsup_Act change to FALSE.


 The execution of the MC_HaltSuperimposed instruction has no impact on the being executed
MC_MoveRelative instruction.

11- 9 9
DVP-50MC Series Motion Controller Operation Manual

11.3.11 MC_SetPosition

FB/FC Explanation Applicable model

MC_SetPosition is used to set the position of the axis to a DVP50MC11T/DVP50MC11T-06


11
given value and no actual axis motion is brought DVP50MC11P/DVP50MC11P-06
1
FB
accordingly. DVP50MC11T-04S/DVP50MC11T-16S

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.

Specify the target Negative number, When Execute


Position Position. LREAL positive number or 0 changes from
(Unit: Unit) (0) FALSE to TRUE

Specify the relative


mode or absolute When Execute
TRUE or FALSE
Relative mode for the target BOOL changes from
(FALSE)
position and current FALSE to TRUE
position.

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

Done TRUE when the instruction is completed. BOOL TRUE / FALSE


11
Busy TRUE while the instruction is being executed. BOOL TRUE / FALSE
Error TRUE while there is an error. BOOL TRUE / FALSE
Contains error codes when an error occurs. Please refer
ErrorID WORD
to section 12.2 for the corresponding error code.

 Output Update Timing

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.

 When an error occurs in the instruction


 When Execute changes from TRUE to
Error execution or the input parameters for the
FALSE.
instruction are illegal.

 Output Update Timing Chart

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

8000 C om mand Pos ition

6000
5000

Actual Motion Curve


3000
2000
1000
Time
0
Perform Absol ute Ex ecute Perform Abs olute
Posi tioni ng o f Posi ti oni ng of
Set Pos ition
500 0 50 00

 Relationship between Position and Relative


Position, Relative and reference position which stands for the axis position at the moment when the
instruction starts being executed jointly determine the position setting value.

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

Re la tive=TRU E Rel ati ve =FALSE

P osition Pos it ion

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

R efe re nceTyp e=0 Re feren ce Type =1


Re ferenc e Posit io n = Comma nd P osition Re fere nce Posi tion=Act ual Posit ion
11
1
Pos it ion Position

8700 Command Posi ti on


8000
Comm and Pos iti on
Ac tual Pos iti on
Ac tual Pos ition 6700
6000 P
P 6000
5300

3000 3000
P P
2300 2300

1000 1000
0 Time 0 Time

Instruct ion I nst ruction


Execut ion Execution

 Relationship between Axis Type and Reference Type

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

Encoder axis YES YES

Virtual axis YES YES


There will be an error in the instruction execution if the axis on which MC_SetPosition is executed does
not support the selected Reference Type.
 Explanation of Instruction Application Situation
When MC_SetPosition is executed on the master axis which is in the built multi-axis relationship, the
master axis position change incurred by the instruction does not affect the slave axis. That is, the slave
axis will make any motion accordingly when the master axis position change incurred by
MC_SetPosition.
When MC_SetPosition is executed on the slave axis, the slave axis position will change but the original
relationship between slave axis and master axis will not be influenced.
MC_SetPosition will report an error when it is executed in the process of execution of MC_Stop. But
MC_SetPosition can be executed normally after MC_Stop execution is completed.

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

1. The variable table and program

Variable name Data type Initial value

Rel MC_MoveRelative

11- 1 04
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

Axis1 USINT 1

Rel_Ex BOOL FALSE

Rel_Done BOOL
11
Rel_Bsy BOOL

Rel_Act BOOL

Rel_Abt BOOL

Rel_Err BOOL

Rel_ErrID WORD

Tn TON

Tn_In BOOL FALSE

SRe SR

SRe_Q BOOL

SetPos SetPosition

SetPos_Ex BOOL FALSE

SetPos_RefTp MC_REFERECNE TYPE 0

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

2. Motion Curve and Timing Charts:


Velocity

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

 As Rel_Ex changes from FALSE to TRUE, the execution of MC_MoveRelative instruction is


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

1. The variable table and program

Variable name Data type Initial value

Rel MC_MoveRelative

Axis1 USINT 1

Rel_Ex BOOL FALSE

Rel_Done BOOL

Rel_Bsy BOOL

Rel_Act BOOL

Rel_Abt BOOL

Rel_Err BOOL

Rel_ErrID WORD

Tn TON

Tn_In BOOL FALSE

SRe SR

SRe_Q BOOL

SetPos SetPosition

SetPos_Ex BOOL FALSE

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

2. Motion Curve and Timing Charts:

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.

1. The variable table and program

11- 1 09
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

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

Tn_In BOOL FALSE

SRe SR

SRe_Q BOOL

SetPos SetPosition

SetPos_Ex BOOL FALSE

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

2. Motion Curve and Timing Charts:

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

 As Abs_Ex changes from FALSE to TRUE, the execution of MC_MoveAbsolute instruction is


started and MC_SetPosition is executed 3 seconds later after MC_MoveAbsolute is executed.

 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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11
FB MC_SetOverride changes the target velocity for an axis. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S

MC_SetO verride_ins tance


MC_SetOv erride
Ax is Enabled
Enable Busy
VelFact or Erro r
Ac cFactor ErrorID
Jerk Fac tor

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

Velocity override factor 0~500 When Enable


VelFactor LREAL
(Unit: %) (100) changes to TRUE

AccFactor Reserved - - -

JerkFactor Reserved - - -

 Output Parameters

Parameter name Function Data type Valid range

Enabled TRUE when the instruction is controlling the axis. BOOL TRUE / FALSE

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. Please
ErrorID WORD -
refer to section 12.2 for the corresponding error ID.

11- 11 3
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing

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.

 When an error occurs in the instruction


 When Enable changes from TRUE
Error execution or the input parameters for the
to FALSE
instruction are illegal.

 Output Update Timing Chart

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

MC_SetOverride changes the target velocity for an axis.


1. If the target velocities of motion instructions are to be modified, use the MC_SetOverride
instruction. Therefore, the instruction has no influence on the instructions without target velocities.
However, Enabled remains TRUE even if the Enable of MC_SetOverride instruction is set to TRUE
for the instructions which are not affected by MC_SetOverride.
2. The instructions of which the target velocities can be modified by MC_SetOverride are shown in the
following table.

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)

3. The new target velocity is calculated as below.


The new target velocity after modification= Target velocity of currently executed instruction x
Velocity override factor
4. The unit of VelFactor is %. “100” indicates “100%”. The valid range of VelFactor is between 0 and
500. An error will occur if the MC_SetOverride instruction is executed when VelFactor value
exceeds the valid range.
5. The axis will speed up or down till the target velocity after modification is reached according to
Acceleration or Deceleration of the currently executed instruction.

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

Variable name Data type Initial value

SetOv MC_SetOverride

Axis1 USINT 1

SetOv_En BOOL FALSE

SetOv_Velt LREAL 0.0

SetOv_Ena BOOL

SetOv_Bsy BOOL

SetOv_Err BOOL

SetOv_ErrID WORD

Vel MC_MoveVelocity

Vel_Ex BOOL FALSE

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

2. Motion Curve and Timing Chart

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 MC_Reset clears the error states and axis alarm
DVP50MC11P/DVP50MC11P-06
1
FB
information inside the motion controller.
DVP50MC11T-04S/DVP50MC11T-16S

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

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.

11- 11 8
Chapter 11 Motion Control Instructions

 Output Update Timing

Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name

 When Execute changes from TRUE to


11
FALSE after the instruction execution is
completed.
 When the instruction execution is  Done changes to TRUE when the
Done
completed. instruction execution is completed after
Execute changes from TRUE to FALSE
during the instruction execution. One
cycle later, Done changes to FALSE.

 When Done changes to TRUE.


Busy  When Execute is TRUE.
 When Error changes to TRUE.

 When the input parameter values of the


 When Execute changes from TRUE to
Error instruction are illegal or the mistake
FALSE
cannot be cleared.

 Output Update Timing Chart

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.

1. The variable table and program

Variable name Data type Initial value

ReadSt MC_ReadStatus

Axis1 USINT 1

ReadSt_En BOOL FALSE

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

AND1_In1 BOOL FALSE

Rset MC_Reset

Rset_Done BOOL

11- 1 20
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

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

FB/FC Explanation Applicable model

11 DMC_SetTorque sets the torque of the servo axis. DVP50MC11T/DVP50MC11T-06

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

Parameter Valid range


Function Data type Validation timing
name (Default)

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)

The instruction is executed when


TRUE or FALSE
Enable Enable changes from FALSE to BOOL -
(FALSE)
TRUE.

Specify the value of the target


torque.
The torque is expressed with the
permillage of the rated torque of
Negative number,
the servo axis. For example, the
positive number When Enable
TargetTorque setting value 30 indicates that the INT
and 0 changes to TRUE
set torque is 30‰ of the rated
(0)
torque of the servo axis. While
Enable is TRUE, modifying the
parameter value will change the
torque directly.
Notes:
1. If the torque value is a positive number, the effection that the servo produces works in the positive
direction. If the torque value is a negative number, the effection that the servo produces works in
the negative direction.

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

Parameter name Function Data type Valid range

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

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.
ErrorID Please refer to section 12.2 for the corresponding WORD
error ID.

 Output Update Timing

Parameter Name Timing for changing to TRUE Timing for changing to FALSE

 When Error changes to TRUE.


 When the target torque is
InTorque  When Enable changes from TRUE to
reached.
FALSE

 When InTorque changes to TRUE.


Busy  When Enable changes to TRUE
 When Error changes to TRUE.

 When the instruction starts to  When InTorque changes to TRUE.


Active
control the axis  When Error changes to TRUE.

 When Enable changes from TRUE to


FALSE
 When this instruction execution is  CommandAborted is set to TRUE when
CommandAborted aborted by other motion control the instruction is aborted after Enable
instruction. changes from TRUE to FALSE during the
instruction execution. One cycle later,
CommandAborted changes to FALSE.

11- 1 23
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 input  When Enable changes from TRUE to
11 Error
parameters for the instruction are FALSE
1 illegal.

 Output Update Timing Chart

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

1. The variable table and program

Variable name Data type Initial value

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_En BOOL FALSE

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

2. Motion Curve and Timing Chart

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
MC_ReadAxisError is used to read the error 11
FB DVP50MC11P/DVP50MC11P-06
information of a servo axis.
DVP50MC11T-04S/DVP50MC11T-16S

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.

When Valid is TRUE, the value of ErrorID, xxx (hex)


AxisErrorID WORD
indicates that the servo drive releases an alarm and xxx

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

 Output Update Timing

Parameter
Timing for changing to TRUE Timing for changing to FALSE
Name

 When Enable changes from TRUE to


FALSE
Valid  When an axis error is read
 When Error changes from FALSE to
TRUE

 When Enable changes from TRUE to


FALSE
Busy  When Enable changes to TRUE
 When Error changes from FALSE to
TRUE

 When an error occurs in the instruction


 When Enable changes from TRUE to
Error execution or the input parameters for the
FALSE
instruction are illegal

 Output Update Timing Chart

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

FB/FC Explanation Applicable model

MC_ReadActualPosition is used to read the actual DVP50MC11T/DVP50MC11T-06


11
position of an axis including real axes, virtual axes and DVP50MC11P/DVP50MC11P-06
1
FB
encoder axes. DVP50MC11T-04S/DVP50MC11T-16S

MC_ReadA ctualPosition_inst ance


MC_ReadActualPosition
Axis Valid
Enable Busy
Error
ErrorID
Posit ion

 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

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.

Position The actual position of the axis. LREAL

11- 1 30
Chapter 11 Motion Control Instructions

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE


 When Enable changes from TRUE to
Valid  When the actual position has been read.
FALSE
11
 When Done changes to TRUE
Busy  When Enable changes to TRUE.
 When Error changes to TRUE
 When an error occurs in the instruction  When Enable changes from TRUE to
Error execution or the input parameters for the
instruction are illegal FALSE

 Output Update Timing Chart

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

The conversion formula is shown as below.

Uni ts pe r output rot ation


ActualPosition = * The number of ser vo p os ition
11 (t he numbe r of pulses / rotation) feeddback pulses
*mec hanical gear ratio
1
If the axis is a linear axis, its output Position equals ActualPosition above when the instruction is
executed.

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.

 Timing for Updating Actual Position


The timing for updating actual position is related to the cycle time of communication between the
controller and servo drive because the actual position comes from the number of feedback position
pulses that the servo drive gives. In one communication cycle, the servo sends the number of
feedback position pulses to the controller only once. And thus the read actual position remains
unchanged within one communication cycle.

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 Impact of MC_SetPosition on Actual Position

The actual position that MC_ReadActualPosition reads should also include the position offset
caused by MC_SetPosition after MC_SetPosition is executed.

The conversion formula is shown as below.

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.

1. The variable table and program

Variable name Data type Initial value

Rel MC_MoveRelative

11- 1 32
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

Axis1 USINT 1

Rel_Ex BOOL FALSE

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_Ex BOOL FALSE

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

2. Motion Curve and Timing Charts:

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 MC_ReadStatus is used to read the servo axis state in the
DVP50MC11P/DVP50MC11P-06
1
FB
controller.
DVP50MC11T-04S/DVP50MC11T-16S

MC_ReadS tatus _inst anc e


MC_ReadSt atus
Ax is Valid
En able Busy
E rro r
ErrorID
ErrorSt op
Disabled
S topping
Homing
S tands till
Dis c re teMotion
Continuous Motion
Sync Motion

 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

Parameter name Function Data type Valid range

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

Parameter name Function Data type Valid range

Stopping BOOL TRUE / FALSE

Homing BOOL TRUE / FALSE


Standstill BOOL TRUE / FALSE
11
DiscreteMotion BOOL TRUE / FALSE

ContinuousMotion BOOL TRUE / FALSE


SyncMotion BOOL TRUE / FALSE
Notes:
1. When Enable changes from FALSE to TRUE, the execution of MC_ReadStatus starts and the axis
status is read.
2. When Enable changes from TRUE to FALSE, Valid, Busy and Error change to FALSE, meanwhile
ErrorID changes to 0 and the outputs of ErrorStop, Disabled, Stopping, Homing, Standstill,
DiscreteMotion, ContinuousMotion and SyncMotion keep the status as Enable is TRUE.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Enable changes from TRUE


 When Enable changes to to FALSE
Valid
TRUE  When Error changes from FALSE
to TRUE

 When Enable changes from TRUE


 When Enable changes to to FALSE
Busy
TRUE  When Error changes from FALSE
to TRUE

 When an error occurs in the


instruction execution or the  When Enable changes from TRUE
Error
input parameters for the to FALSE
instruction are illegal

 When the axis enters  When the axis is not in ErrorStop


ErrorStop
ErrorStop state state

 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

 When the axis enters


Standstill  When the axis is not in Standstill
Standstill state

11- 1 37
DVP-50MC Series Motion Controller Operation Manual

Name Timing for changing to TRUE Timing for changing to FALSE

 When the axis enters  When the axis is not in


DiscreteMotion
DiscreteMotion state DiscreteMotion state
11  When the axis enters  When the axis is not in
1 ContinuousMotion
ContinuousMotion state ContinuousMotion state

 When the axis enters  When the axis is not in SyncMotion


SyncMotion
SyncMotion state state

 Output Update Timing Chart

Ca se1 Ca se2 Case3

E nable

Valid

B usy

Error

ErrorI D

Dis abled

Stan dst ill

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

This example of the execution of MC_ReadStatus is shown as below.


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

Pwr_Act BOOL

Pwr_Err BOOL

Pwr_ErrID WORD

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

ReadSt MC_ReadStatus

ReadSt_En BOOL FALSE

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

Variable name Data type Initial value

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

2. Motion Curve and Timing Charts:

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

 ReadSt_Vald, ReadSt_Bsy and ReadSt_Disbl change to TRUE as ReadSt_En changes from


FALSE to TRUE.

 When Pwr_Sta changes from FALSE to TRUE, ReadSt_Stans changes to TRUE,


ReadSt_Disbl changes to FALSE and the state of the axis changes from Disabled to
Standstill.

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

 Rel_Done also changes to FALSE as Rel_Ex changes to FALSE.

11- 1 41
DVP-50MC Series Motion Controller Operation Manual

 When Pwr_En changes to FALSE, ReadSt_Disbl changes to TRUE, ReadSt_Stans changes


to FALSE and several cycles later Pwr_Sta also changes to FALSE.

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
MC_ReadMotionState is used to read current 11
FB DVP50MC11P/DVP50MC11P-06
motion state of the servo axis.
DVP50MC11T-04S/DVP50MC11T-16S

MC_ReadMotionS tate_ins tanc e


MC_ReadMotionSt ate
Ax is Valid
En able Busy
Source Error
E rrorI D
Const antVelocity
Ac celerat ing
Decelerat ing
Direc tionPos itive
Direct ionNega tive

 Input Parameters

Valid range Validation


Parameter name Function Data type
(Default) timing

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

Parameter name Function Data type Valid range

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.

TRUE when the absolute value of the axis velocity is


Decelerating BOOL TRUE / FALSE
decreased.

DirectionPositive TRUE when the current position value is increased. BOOL TRUE / FALSE

DirectionNegative TRUE when the current position value is decreased. BOOL TRUE / FALSE

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Enable changes from


 When the actual velocity of the TRUE to FALSE
Valid
axis is read  When Error changes from FALSE
to TRUE

 When Enable changes from


TRUE to FALSE
Busy  When Enable changes to TRUE
 When Error changes from FALSE
to TRUE

 When an error occurs in the


instruction execution or the input  When Enable changes from
Error
parameters for the instruction are TRUE to FALSE
illegal

 When the axis velocity is not  When the axis velocity is changed
ConstantVelocity
changed and Enable is still TRUE

 When the axis velocity is not


 When the absolute value of the
Accelerating increased any more and Enable is
axis velocity is increased
still TRUE

11- 1 44
Chapter 11 Motion Control Instructions

Name Timing for changing to TRUE Timing for changing to FALSE

 When the axis velocity is not


 When the absolute value of the
Decelerating decreased any more and Enable
11
axis velocity is decreased
is still TRUE

 When the current position value is


 When the current position value
DirectionPositive not increased any more and
is increased
Enable is still TRUE

 When the current position value is


 When the current position value
DirectionNegative not decreased any more and
is decreased
Enable is still TRUE

 Output Update Timing Chart

Cas e1 Case 2 Cas e3

Enab le

Valid

B usy

Error

ErrorID

Ac celera ting

Cons tant Ve lo city

Dece le ra ting

Direct io nPos itive

Direc tionNegat ive

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

This example of the execution of MC_ ReadMotionState is shown as below.


11
1 1. The variable table and program

Variable name Data type Initial value

Pwr MC_Power

Axis1 USINT 1

Pwr_En BOOL FALSE

Pwr_Sta BOOL

Pwr_Bsy BOOL

Pwr_Act BOOL

Pwr_Err BOOL

Pwr_ErrID WORD

Rel1 MC_MoveRelative

Rel1_Ex BOOL FALSE

Rel1_Done BOOL

Rel1_Bsy BOOL

Rel1_Act BOOL

Rel1_Abt BOOL

Rel1_Err BOOL

Rel1_ErrID WORD

Rel2 MC_MoveRelative

Rel2_Ex BOOL FALSE

Rel2_Done BOOL

Rel2_Bsy BOOL

Rel2_Act BOOL

Rel2_Abt BOOL

Rel2_Err BOOL

Rel2_ErrID WORD

ReadMoSt MC_ReadMotionState

ReadMoSt_En BOOL FALSE

ReadMoSt_Vald BOOL

ReadMoSt_Bsy BOOL

11- 1 46
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

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

2. Motion Curve and Timing Charts:

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

 ReadMoSt_Vald and ReadMoSt_Bsy change from FALSE to TRUE as ReadMoSt_En


changes from FALSE to TRUE.

 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 ReadMoSt_Constvel changes from FALSE to TRUE, ReadMoSt_Accet changes from


TRUE to FALSE and the axis enters the state of moving at a constant velocity in the positive
direction.

 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 ReadMoSt_Accet and ReadMoSt_DirtNg change from FALSE to TRUE,


ReadMoSt_Decet and ReadMoSt_DirtPos change to FALSE simultaneously and the axis
starts accelerating in the negative direction.

 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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 DMC_ReadParameter_Motion reads a slave
DVP50MC11P/DVP50MC11P-06
1
FB
parameter value.
DVP50MC11T-04S/DVP50MC11T-16S

DMC_ReadP arameter_Motion_instance
DMC_ReadParameter_Motion
Axis Done
Execut e Busy
Index Active
SubIndex Error
ErrorI D
Dat aType
Data

 Input Parameters

Valid range Validation


Parameter name Function Data type
(Default) timing

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

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

11- 1 50
Chapter 11 Motion Control Instructions

Parameter name Function Data type Valid range

TRUE when an error occurs in execution of the


Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs. Please 11
ErrorID WORD
refer to section 12.2 for the corresponding error ID.
The data type of the read parameter
1:Byte,
DataType USINT
2:Word,
4:Double Word.

Data The read parameter value UDINT


Note: The corresponding index and subindex of a salve parameter
1. User-defined parameter is the servo drive parameter which is to be read. The length is specified by
users according to the data type of the parameter to read. The length of the byte parameter is 1. The
length of the word parameter is 2. The length of the double-word parameter is 4.
The calculation of the index and subindex of a servo parameter is shown as follows.

Index = Servo drive parameter (Hex) + 2000 (Hex)


Subindex = 0.
Example: Calculation of the index of the servo parameter P6-10: 2000 + 060A (the hex. expression of
P6-10) = 260A, subindex = 0.

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.

 Output Update Timing

Parameter Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from


TRUE to FALSE after the
Done  When the reading is completed.
instruction execution is
completed.

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.

 When Error changes to TRUE.


 When the instruction starts to  When Done changes from FALSE
Active
control the axis. to TRUE and Active changes 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 Update Timing Chart

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.

1. The variable table and program

Variable name Data type Initial value

ReadPm_M1 DMC_ReadParameter_ Motion

Axis1 USINT 1

ReadPm_M1_Ex BOOL TRUE

ReadPm_M1_Done BOOL TRUE

ReadPm_M1_Bsy BOOL FALSE

ReadPm_M1_Act BOOL FALSE

ReadPm_M1_Err BOOL FALSE

ReadPm_M1_ErrID WORD FALSE

ReadPm_M1_DaTy USINT 2

ReadPm_M1_Dat UDINT 5000

WritePm_M DMC_WriteParameter_Motion

WritePm_M_Done BOOL TRUE

WritePm_M_Bsy BOOL FALSE

WritePm_M_Act BOOL FALSE

WritePm_M_Err BOOL FALSE

WritePm_M_ErrID WORD FALSE

ReadPm_M2 DMC_ReadParameter_ Motion

ReadPm_M2_Done BOOL TRUE

ReadPm_M2_Bsy BOOL FALSE

ReadPm_M2_Act BOOL FALSE

ReadPm_M2_Err BOOL FALSE

11- 1 53
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

ReadPm_M2_ErrID WORD FALSE

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

 When ReadPm_M1_Ex changes from FALSE to TRUE, executing the first


DMC_ReadParameter_Motion instruction starts. When the instruction execution is completed,

11- 1 54
Chapter 11 Motion Control Instructions

ReadPm_M1_Done changes to TRUE, the value of ReadPm_M1_DaTy is 2 and


ReadPm_M1_Dat is 5000. That is, the content of the servo parameter P1-55 which is read is
5000 (The maximum velocity of the servo is limited to 5000rpm.)

 When ReadPm_M1_Done changes from FALSE to TRUE, executing the 11


DMC_WriteParameter_Motion instruction starts. When the instruction execution is completed,
WritePm_M_Done changes to TRUE. That means writing 1000 to the servo slave parameter
P1-55 is successful. (The maximum velocity of the servo is limited to 1000rpm)

 When WritePm_M_Done changes from FALSE to TRUE, executing the second


DMC_ReadParameter_Motion instruction starts. When the instruction execution is completed,
ReadPm_M2_Done changes to TRUE, ReadPm_M2_DaTy is 2 and ReadPm_M2_Dat is
1000. That is, the content of the servo slave parameter P1-55 which is read is 1000. (The
maximum velocity of the servo is limited to 1000rpm.)

11- 1 55
DVP-50MC Series Motion Controller Operation Manual

11.3.20 DMC_WriteParameter_Motion

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 DMC_WriteParameter_Motion sets a slave
DVP50MC11P/DVP50MC11P-06
1
FB
parameter value.
DVP50MC11T-04S/DVP50MC11T-16S

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

Parameter Valid range


Function Data type Validation timing
name (Default)

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)

The instruction is executed


TRUE or FALSE
Execute when Execute changes from BOOL -
(FALSE)
FALSE to TRUE.

The index of the parameter to


Index UINT
write.

The subindex of the parameter


SubIndex USINT
to write.

The data type of the


parameter to write

DataType 1:Byte, USINT


2:Word,
4:Double Word.

The value of the parameter to


Data UDINT
write

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

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

 Output Update Timing

Parameter Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from TRUE to


Done  When the writing is completed. FALSE after the 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 instruction starts to
Active  When Done changes from FALSE to
control the axis.
TRUE.

 When an error occurs in the


instruction execution or the input  When Execute changes from TRUE to
Error
parameters for the instruction are FALSE.
illegal.

11- 1 57
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing Chart


Case 1 Cas e 2

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.

1. The variable table and program

Variable name Data type Initial value

ReadPm_M1 DMC_ReadParameter_Motion

Axis1 USINT 1

ReadPm_M1_Ex BOOL TRUE

ReadPm_M1_Done BOOL TRUE

ReadPm_M1_Bsy BOOL FALSE

ReadPm_M1_Act BOOL FALSE

ReadPm_M1_Err BOOL FALSE

11- 1 58
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

ReadPm_M1_ErrID WORD FALSE

ReadPm_M1_DaTy USINT 2
11
ReadPm_M1_Dat UDINT 5000

WritePm_M DMC_WriteParameter_Motion

WritePm_M_Done BOOL TRUE

WritePm_M_Bsy BOOL FALSE

WritePm_M_Act BOOL FALSE

WritePm_M_Err BOOL FALSE

WritePm_M_ErrID WORD FALSE

ReadPm_M2 DMC_ReadParameter_Motion

ReadPm_M2_Done BOOL TRUE

ReadPm_M2_Bsy BOOL FALSE

ReadPm_M2_Act BOOL FALSE

ReadPm_M2_Err BOOL FALSE

ReadPm_M2_ErrID WORD FALSE

ReadPm_M2_DaTy USINT 2

ReadPm_M2_Dat UDINT 1000

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

 When ReadPm_M1_Ex changes from FALSE to TRUE, executing the first


DMC_ReadParameter_Motion instruction starts. After the instruction execution is completed,
ReadPm_M1_Done changes to TRUE, ReadPm_M1_DaTy is 2 and ReadPm_M1_Dat is
5000. That is, the content of the servo slave parameter P1-55 which is read is 5000. (The
maximum velocity of the servo is limited to 5000rpm.)

 When ReadPm_M1_Done changes from FALSE to TRUE, executing


DMC_WriteParameter_Motion starts. When the instruction execution is completed,
WritePm_M_Done changes to TRUE. That means the content of the servo slave parameter
P1-55 which is set is 1000. (The maximum velocity of the servo is limited to 1000rpm.)

 When WritePm_M_Done changes from FALSE to TRUE, executing the second


DMC_ReadParameter_Motion instruction starts. When the instruction execution is completed,
ReadPm_M2_Done changes to TRUE, ReadPm_M2_DaTy is 2 and ReadPm_M2_Dat is
1000. That is, the content of the servo slave parameter P1-55 which is read is 1000. (The
maximum velocity of the servo is limited to 1000rpm.)

11- 1 61
DVP-50MC Series Motion Controller Operation Manual

11.3.21 DMC_TouchProbe

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 DMC_TouchProbe is used for capturing the position of
DVP50MC11P/DVP50MC11P-06
1
FB
an axis.
DVP50MC11T-04S/DVP50MC11T-16S

DMC_Touc hProbe_in stanc e


DMC_TouchProbe
Ax is Done
Ex ecut e Busy
Trigg erI nput Ac tiv e
Windowonly CommandAborted
Firs tpos Error
Las tpos ErrorID
Mode Rec ordedPosition
Mas k

 Input Parameters

Parameter Valid range Validation


Function Data type
name (Default) timing

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

The instruction is executed when TRUE or FALSE


Execute BOOL -
Execute changes from FALSE to TRUE. (FALSE)

Specify one of the input points I0~I7, 0:mcTriggerinputI0

I10~I17 of the controller as the bit for ...


triggering position capture. The values of 7: mcTriggerinputI7
the parameter 0~15 correspond to input 8:mcTriggerinputI10
TriggerInput MC_Triggerinput
points I0~I7 and I10~I17. ...
The parameter is valid when Mode is 0 15:
and 1 and invalid when Mode is 5, 6, 7 mcTriggerinputI17
and 8. (0)

Windowonly Reserved - - -

11- 1 62
Chapter 11 Motion Control Instructions

Parameter Valid range Validation


Function Data type
name (Default) timing

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

Parameter Valid range Validation


Function Data type
name (Default) timing
of the servo drive. The captured
11 position is converted from the
1 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 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 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.
For the capture which is conducted by
using the input point of a servo drive,
different servo drive models correspond
to different input points as shown in the
table below.

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

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

CommandAborted TRUE when the instruction is aborted. BOOL TRUE / FALSE

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

The captured position after the completion of the


RecordedPosition instruction execution. Refer to the following Function LREAL
for details.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the instruction execution is  When Execute changes from TRUE to


Done
completed. 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 Error changes to TRUE.
Active  When Execute changes to TRUE.
 When CommandAborted changes to
TRUE.

 When Execute changes from TRUE to


FALSE
CommandA  When the instruction execution is aborted
 CommandAborted is set to TRUE when
borted by some other motion control instruction.
the instruction execution is aborted after
Execute changes from TRUE to FALSE

11- 1 65
DVP-50MC Series Motion Controller Operation Manual

Name Timing for changing to TRUE Timing for changing to FALSE


during the instruction execution. One
period later, CommandAborted changes
11 to FALSE.
1  When an error occurs in the instruction
 When Execute changes from TRUE to
Error execution or the input parameters for the
FALSE
instruction are illegal.

 Output Update Timing Chart

Cas e1 Case2 Case3 Cas e4

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

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.

 The position captured by the DMC_TouchProbe instruction is calculated according to axis


parameters. For different modes, the data sources are different. “Servo gear ratio setting” and
“Mechanism gear ratio setting” in axis parameters are shown in the following table. When Mode
value of the instruction is equal to 5 (which you can refer to the introduction of mode 5 below), the
number of pulses that the servo motor feeds back to the servo drive is 435 and the position captured
by the instruction is 65.25. The calculation formula: 435×(3×1000)÷(2×10000)=65.25. 10000,
2, 3 and1000 in the formula correspond to 10000, 2, 3, and 1000 in the following table respectively.
For other mode, the calculation method for the position captured by the instruction is the same as
that described above but only the data source is different.

Servo gear ratio setting Mechanism gear ratio setting

Unit Numerator: 128 Output rotations of gear: 3

Unit Denominator: 1 Input rotations of gear: 2

Pulses per rotation:10000 Units per output rotation: 1000 units/rotation

 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

 Mode 0 and mode 1


Mode 0: The external signal triggers I point of the controller and the position capture is conducted
through the rising edge of the input point specified by TriggerInput. The captured position
11 is converted from the number of pulses the external encoder port of the controller receives
1 through axis parameters.
Mode 1: The external signal triggers I point of the controller and the position capture is conducted
through the falling edge of the input point specified by TriggerInput. The captured position
is converted from the number of pulses the external encoder port of the controller receives
through axis parameters.

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_EN BOOL FALSE

NOT_ENO BOOL

Touch DMC_TouchProbe

Axis1 USINT 3

Touch_Ex BOOL FALSE

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.

1. The variable table and program

Variable name Data type Initial value

NOT_EN BOOL FALSE

NOT_ENO BOOL

11- 1 70
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

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

7 o f s erv o’s CN1


Touc h1_Ex
Touc h1_Don e
Tou ch1_ Bsy
Touc h1_Ac t
Tou ch1 _Abt
Touc h1_E rr
Touc h1_E rrI D
Touc h1_ Pos

 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

FB/FC Explanation Applicable model

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

Parameter Valid range Validation


Function Data type
name (Default) timing
When
Refer to Functions Execute
Specify the number of the axis which is of Section 2.2. changes
Axis USINT
to be operated. (The variable value from
must be set) FALSE to
TRUE

The instruction is enabled when Enable TRUE or FALSE


Enable BOOL -
changes from FALSE to TRUE. (FALSE)

Specify one of the input points I0~I7, 0: mcTriggerinputI0


I10~I17 of the motion controller as the bit ...
for triggering position capture. The 7: mcTriggerinputI7
values of the parameter 0~15 8:
TriggerInput correspond to input points I0~I7 and MC_Triggerinput mcTriggerinputI10
I10~I17. ...
The parameter is valid when Mode is 0 15:
and 1 and invalid when Mode is 5, 6, 7 mcTriggerinputI17
and 8. (0)

Windowonly Reserved - - -

11- 1 73
DVP-50MC Series Motion Controller Operation Manual

Parameter Valid range Validation


Function Data type
name (Default) timing

11 Firstops Reserved - - -

1
Lastops Reserved - - -

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
Mode input points: I0~I7 and I10~I17 of INT
the motion controller, which is
specified 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.

11- 1 74
Chapter 11 Motion Control Instructions

Parameter Valid range Validation


Function Data type
name (Default) timing
Mode 6: The trigger signal comes from
the falling edge of the input point 11
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 7: The trigger signal comes from
the rising edge and falling 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 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.
For the cyclical capture which is
conducted by using the input point of a
servo drive, different servo drive models
correspond to different input points as
shown in the table below.

Servo
drive A2-E B3-E A3-E
model

Input
DI13 DI1 DI1
point

11- 1 75
DVP-50MC Series Motion Controller Operation Manual

Parameter Valid range Validation


Function Data type
name (Default) timing
Mask Reserved - - -
11 Notes:
1 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.

 Output Parameters

Parameter name Function Data type Valid range


Valid TRUE when the captured value is valid. 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 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.

Touched TRUE when one capture is finished by the instruction.

The captured position after the completion of the


RecordedPosition LREAL
instruction execution.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE


 When the instruction execution is normal  When Execute changes from TRUE to
Valid
as Enable is TRUE. FALSE

 When Done changes to TRUE.


 When Error changes to TRUE.
Busy  When Enable changes to TRUE.
 When CommandAborted changes to
TRUE.

 When Done changes to TRUE.


 When Error changes to TRUE.
Active  When Enable changes to TRUE.
 When CommandAborted changes to
TRUE.

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

Name Timing for changing to TRUE Timing for changing to FALSE


 CommandAborted is set to TRUE when
the instruction execution is aborted after
Execute changes from TRUE to FALSE 11
during the instruction execution. One
period later, CommandAborted changes
to FALSE.

 When an error occurs in the instruction


 When Execute changes from TRUE to
Error execution or the input parameters for the
FALSE
instruction are illegal.

 Output Update Timing Chart

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11
DVP50MC11P/DVP50MC11P-06
1
FB DMC_Jog jogs an axis.
DVP50MC11T-04S/DVP50MC11T-16S

DMC_ Jog _ instance


DMC_Jog
Axis Done
JogForward Busy
JogBackward CommandAborted
Velocity Error
Acceleration ErrorID
Deceleration
Jerk

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

Specify the target Positive number When JogForward


Velocity velocity. LREAL (The variable value or JogBackward is
(Unit: Unit/second) must be set) TRUE

Specify the target Positive number When JogForward


Acceleration acceleration rate. LREAL (The variable value or JogBackward is
(Unit: Unit/s2) must be set) TRUE

Specify the target Positive number When JogForward


Deceleration deceleration rate. LREAL (The variable value or JogBackward is
(Unit: Unit/s2) must be set) TRUE

11- 1 78
Chapter 11 Motion Control Instructions

Valid range
Parameter name Function Data type Validation timing
(Default)

Specify the change


rate of the target Positive number When JogForward 11
Jerk acceleration or LREAL (The variable value or JogBackward is
deceleration. must be set) TRUE
(Unit: Unit/s3)

 Output Parameters

Parameter name Function Data type Valid range

Done TRUE when the jogging is finished. BOOL TRUE/FALSE

Busy TRUE when the instruction is being executed. BOOL TRUE/FALSE

CommandAborted TRUE when the instruction is aborted.。 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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 One period later after the jogging


Done  When the jogging stops.
stops.

 When Done changes to TRUE,


 When JogForward or  When Error changes to TRUE,
Busy
JogBackward changes to TRUE.  When CommandAborted changes
to TRUE.

 TRUE when the instruction is  When JogForward or


CommandAborted aborted by other motion JogBackward changes from
instruction. TRUE to FALSE.

 When an error occurs in the


 When JogForward or
instruction execution or the input
Error JogBackward changes from
parameters for the instruction are
TRUE to FALSE.
illegal.

11- 1 79
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing Chart

Cas e1 Cas e2 Cas e3

11 Jog Fward or

1 J ogB ack ward


Done
B usy
Co mma ndAbo rt ed
Error
Error I D

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
DMC_MoveVelocityStopByPos is used for making an 11
FB DVP50MC11P/DVP50MC11P-06
axis stop at the specified phase.
DVP50MC11T-04S/DVP50MC11T-16S

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

Parameter Valid range Validation


Function Data type
name (Default) timing

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)

The instruction controls the


axis to run when Ex_Move TRUE or FALSE
Ex_Move BOOL
changes from FALSE to (FALSE)
TRUE.

The instruction controls the


axis to stop when Ex_Stop TRUE or FALSE
Ex_Stop BOOL
changes from FALSE to (FALSE)
TRUE.

11- 1 81
DVP-50MC Series Motion Controller Operation Manual

Parameter Valid range Validation


Function Data type
name (Default) timing

Positive number When Ex_Move


11 Velocity
Specify the target velocity.
LREAL (The variable value changes to
1 (Unit: Unit/second)
must be set) TRUE.

Specify the target Positive number When Ex_Move


Acceleration acceleration rate. LREAL (The variable value changes to
(Unit: Unit/s2) must be set) TRUE.

Specify the target Positive number When Ex_Move


Deceleration deceleration rate. LREAL (The variable value changes to
(Unit: Unit/s2) must be set) TRUE.

Specify the change rate of


Positive number When Ex_Move
the target acceleration or
Jerk LREAL (The variable value changes to
deceleration.
must be set) TRUE.
(Unit: Unit/s3)

Specify the rotation 1: mcPositiveDirection,


When Ex_Move
direction
Direction MC_Direction changes to
1: Positive direction 3: mcNegativeDirection
TRUE.
3: Negative direction (1)

Specify the modulo that When Ex_Move


Positive number
the pitch changes to
RoundPhase LREAL (The variable value
(UnitsPerRotation) TRUE.
must be set)
corresponds to.

0~the setting value of When Ex_Move


Specify a phase in the
StopPhase LREAL RoundPhase changes to
modulo.
(0) TRUE.

Specify the behavior when 0:mcAborting


executing two instructions. 1:mcBuffered
0: Aborting 2:mcBlendingLow
When Ex_Move
1: Buffered 3:mcBlending
BufferMode MC_Buffer_Mode changes to
2: BlendingLow _Previous
TRUE.
3: BlendingPrevious 4:mcBlending _Next
4: BlendingNext 5:mcBlending _High
5: BlendingHigh (0)

11- 1 82
Chapter 11 Motion Control Instructions

 Output Parameters

Parameter name Function Data type Valid range

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

TRUE when the axis is being controlled by the


Active BOOL TRUE / FALSE
instruction.

CommandAborted TRUE when the instruction is aborted. 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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When CommandAborted changes to TRUE.


 When Error changes to TRUE.
 Invelocity changes to FALSE immediately when
Ex_Move changes from FALSE to TRUE again if
the input parameter values are revised after the
Invelocity  When the target velocity is
target velocity is reached. If the input parameter
reached.
values are not changed after the instruction
execution is completed, Invelocity changes to
FALSE immediately when Ex_Move changes from
FALSE to TRUE again. Invelocity will change to
TRUE in the next cycle.

 When CommandAborted changes to TRUE.


 When the stop position is
Stop_Done  When Error changes to TRUE.
reached
 When Ex_Stop changes to FALSE.

 When Ex_Move changes to  When CommandAborted changes to TRUE.


Busy
TRUE.  When Error changes to TRUE.

 When the axis is being


 When CommandAborted changes to TRUE.
Active controlled by the
 When Error changes to TRUE.
instruction.

11- 1 83
DVP-50MC Series Motion Controller Operation Manual

Name Timing for changing to TRUE Timing for changing to FALSE

 When Ex_Move changes from TRUE to FALSE.


 CommandAborted is set to TRUE when the
11  TRUE when the instruction
instruction is aborted after Ex_Move and Ex_Stop
1 CommandAborted is aborted by other motion
change from TRUE to FALSE during the instruction
instruction.
execution. One cycle later, CommandAborted
changes to FALSE.

 When an error occurs in the


instruction execution or the  When Ex_Move and Ex_Stop change from TRUE to
Error
input parameters for the FALSE.
instruction are illegal.

 Output Update Timing Chart

Case1 Case2 Case3

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

DMC_MoveVelocityStopByPos is used for making an axis stop at a specified phase. RoundPhase is


the modulo that the pitch (UnitsPerRotation) corresponds to. StopPhase specifies a phase in the
modulo. The value of StopPhase should be less than the value of RoundPhase. 11
As Ex_Move changes from FALSE to TRUE, the axis is controlled to run. As Ex_Stop changes from
FALSE to TRUE, the axis is controlled to stop at the phase specified by StopPhase. The final
position where the axis stops equals an integral multiple of the pitch (UnitsPerRotation)
+StopPhase value/RoundPhase value* the pitch value (UnitsPerRotation).

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.

StopPhase
270° 90°

180°

11- 1 85
DVP-50MC Series Motion Controller Operation Manual

11.3.25 DMC_MoveVelocityStopByLinePos

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 DMC_MoveVelocityStopByLinePos is used for
DVP50MC11P/DVP50MC11P-06
1
FB
making an axis stop at the specified position.
DVP50MC11T-04S/DVP50MC11T-16S

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

Parameter Valid range Validation


Function Data type
name (Default) timing

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)

The instruction controls the


axis to run when Ex_Move TRUE or FALSE
Ex_Move BOOL
changes from FALSE to (FALSE)
TRUE.

The instruction controls the


axis to run when Ex_Stop TRUE or FALSE
Ex_Stop BOOL
changes from FALSE to (FALSE)
TRUE.

Positive number When Ex_Move


Specify the target velocity.
Velocity LREAL (The variable value changes to
(Unit: Unit/second)
must be set) TRUE.

11- 1 86
Chapter 11 Motion Control Instructions

Parameter Valid range Validation


Function Data type
name (Default) timing

Specify the target Positive number When Ex_Move


Acceleration acceleration rate. LREAL (The variable value changes to 11
(Unit: Unit/s2) must be set) TRUE.

Specify the target Positive number When Ex_Move


Deceleration deceleration rate. LREAL (The variable value changes to
(Unit: Unit/s2) must be set) TRUE.

Specify the change rate of


Positive number When Ex_Move
the target acceleration or
Jerk LREAL (The variable value changes to
deceleration.
must be set) TRUE.
(Unit: Unit/s3)

Specify the rotation 1: mcPositiveDirection,


When Ex_Move
direction
Direction MC_Direction changes to
1: Positive direction 3: mcNegativeDirection
TRUE.
3: Negative direction (1)

Positive number When Ex_Move


RoundPhase Specify the modulo. LREAL (The variable value changes to
must be set) TRUE.

0~the setting value of When Ex_Move


Specify a position in the
StopPhase LREAL RoundPhase changes to
modulo.
(0) TRUE.

Specify the behavior when 0:mcAborting


executing two instructions. 1:mcBuffered
0: Aborting 2:mcBlendingLow
When Ex_Move
1: Buffered 3:mcBlending
BufferMode MC_Buffer_Mode changes to
2: BlendingLow _Previous
TRUE.
3: BlendingPrevious 4:mcBlending _Next
4: BlendingNext 5:mcBlending _High
5: BlendingHigh (0)

 Output Parameters

Parameter name Function Data type Valid range

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

Parameter name Function Data type Valid range

TRUE when the axis is being controlled by the


Active BOOL TRUE / FALSE
instruction.
11 CommandAborted TRUE when the instruction is aborted. BOOL TRUE / FALSE
1
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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When CommandAborted changes to TRUE.


 When Error changes to TRUE.
 Invelocity changes to FALSE immediately when
Ex_Move changes from FALSE to TRUE again if
the input parameter values are revised after the
Invelocity  When the target velocity is
target velocity is reached. If the input parameter
reached.
values are not changed after the instruction
execution is completed, Invelocity changes to
FALSE immediately when Ex_Move changes from
FALSE to TRUE again. Invelocity will change to
TRUE in the next cycle.

 When CommandAborted changes to TRUE.


 When the stop position is
Stop_Done  When Error changes to TRUE.
reached
 When Ex_Stop changes to FALSE.

 When Ex_Move changes to  When CommandAborted changes to TRUE.


Busy
TRUE.  When Error changes to TRUE.

 When the axis is being


 When CommandAborted changes to TRUE.
Active controlled by the
 When Error changes to TRUE.
instruction.

 When Ex_Move changes from TRUE to FALSE.


 CommandAborted is set to TRUE when the
 TRUE when the instruction
instruction is aborted after Ex_Move and Ex_Stop
CommandAborted is aborted by other motion
change from TRUE to FALSE during the instruction
instruction.
execution. One cycle later, CommandAborted
changes to FALSE.

11- 1 88
Chapter 11 Motion Control Instructions

Name Timing for changing to TRUE Timing for changing to FALSE

 When an error occurs in the


instruction execution or the  When Ex_Move and Ex_Stop change from TRUE to
Error
input parameters for the FALSE. 11
instruction are illegal.

 Output Update Timing Chart

Cas e1 Cas e2 Case3

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

DMC_MoveVelocityStopByLinePos is used for making an axis stop at a specified position.


RoundPhase sets the specified modulo. StopPhase sets a position in the specified modulo. The
value of StopPhase should be less than the value of RoundPhase. Their units are unit which is the
same as that for the pitch (UnitsPerRotation).

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.

StopP hase StopPhase StopPhase StopP hase

0 4000 10000 14000 20000 24000 30000 34000

11- 1 90
Chapter 11 Motion Control Instructions

11.3.26 DMC_ReadPositionLagStatus

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
DMC_ReadPositionLagStatus is used for the 11
FB DVP50MC11P/DVP50MC11P-06
detection of the position lag.
DVP50MC11T-04S/DVP50MC11T-16S

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

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- 1 91
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE


 When the absolute value of the  The absolute value of the actual
11 actual position difference of the position difference of the specified
1 axis is less than or equal to the Lag
specified axis has been
OutOfRange exceeding the set Lag value value.
within the HoldTime period since  When Enable is FALSE.
it exceeded the Lag value for the  When Error changes to TRUE.
first time.
 When the instruction is being
Busy  When Error changes to TRUE.
executed.

 When an error occurs in the


instruction execution or the input
Error  When the problem is solved.
parameters for the instruction are
illegal.

 Function

DMC_ReadPositionLagStatus is used to detect if the absolute value of actual


position difference of the specified axis (which is the difference between the
command position and feedback position) exceeds the setting value. The allowed
position difference value is set in the DMC_WritePositionLagSetting instruction.
The OutOfRange output will change to TRUE if the actual position difference of the
specified axis has been exceeding the Lag value within the period specified by
HoldTime since the Lag value was exceeded for the first time. (Lag and HoldTime
are the inputs of DMC_WritePositionLagSetting.) The OutOfRange output will
change to FALSE when the absolute value of the actual position difference of the
specified axis is less than or equal to the Lag value.
When the setting value of HoldTime of DMC_WritePositionLagSetting is 0, the
OutOfRange output will change to TRUE once the instruction detects that the actual
position difference of the specified axis exceeds the Lag value and the OutOfRange
output will change to FALSE once the instruction detects that the absolute value of
the actual position difference of the specified axis is less than or equal to the Lag
value.
The axis will not stop running when the instruction detects that the actual position
difference of the specified axis exceeds the Lag value. The running of the axis can
be stopped by triggering the execution of MC_Stop or MC_Halt instruction via the
OutOfRange output.

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.

 When DRPLS_En changes to TRUE, the DMC_ReadPositionLagStatus


instruction begins to detect whether the actual position difference of the
specified axis exceeds the allowed value set in the
DMC_WritePositionLagSetting instruction.
The DRPLS_OutfRge changes to TRUE when the
DMC_ReadPositionLagStatus instruction detectes that the actual position
difference of the specified axis exceeds the setting value and then continues
to exceed the setting value within the set period of time.
The axis can stop running by triggering the exection of the MC_Stop
instruction via the DRPLS_OutfRge output.
DRPLS_OutfRge changes to FALSE when the DMC_ReadPositionLagStatus
instruction detectes that the actual position difference of the specified axis is
less than the setting value.

11- 1 94
Chapter 11 Motion Control Instructions

11.3.27 DMC_WritePositionLagSetting

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
DMC_WritePositionLagSetting is used for setting the 11
FB DVP50MC11P/DVP50MC11P-06
position lag.
DVP50MC11T-04S/DVP50MC11T-16S

DMC_WriteP ositionLagSetting_instance
DMC_WriteP ositionLagSetting
Axis Done
Execut e Busy
Lag Error
HoldTime ErrorID

 Input Parameters

Parameter Valid range


Function Data type Validation timing
name (Default)

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)

The instruction is executed when TRUE or


Execute Execute changes from FALSE to BOOL FALSE -
TRUE. (FALSE)

Set the allowed value of the Positive number


When Execute
difference between the (The variable
Lag LREAL changes from
command postion and value must be
FALSE to TRUE.
feedback position. set)

A period of time during which the set 0 or Positive When Execute


HoldTime Lag value is exceeded. LREAL number changes from
(Unit: second) (0) FALSE to TRUE.

 Output Parameters

Parameter
Function Data type Valid range
name

TRUE when the instruction execution is


Done BOOL TRUE/FALSE
completed.

11- 1 95
DVP-50MC Series Motion Controller Operation Manual

Parameter
Function Data type Valid range
name

Busy TRUE when the instruction is being executed. BOOL TRUE/FALSE


11 TRUE when there is an error in the execution of
1 Error
the instruction.
BOOL TRUE/FALSE

Contains the error code when an error occurs.


ErrorID WORD
Please refer to section 12.2.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes to


Done  When the instruction execution is completed. FALSE.
 When Error changes to TRUE.

Busy  When the instruction is being executed.  When Error changes to TRUE.

 When an error occurs in the instruction


Error execution or the input parameters for the  When the error is cleared.
instruction are illegal.

 Function

DMC_WritePositionLagSetting is used to set the allowed position lag value (which is


the difference between the command position and feedback position) and the allowed
length of time specified by HoldTime during which the setting value of Lag is
exceeded. Whether the actual position difference of a specified axis exceeds the
setting value of Lag or not is detected by the DMC_ReadPositionLagStatus
instruction.
For further explanation and example, refer to the section of
DMC_ReadPositionLagStatus instruction.

11- 1 96
Chapter 11 Motion Control Instructions

11.3.28 DMC_ChangeMechanismGearRatio

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
DMC_ChangeMechanismGearRatio is used for 11
FB DVP50MC11P/DVP50MC11P-06
modifying axis parameter values.
DVP50MC11T-04S/DVP50MC11T-16S

DMC_ChangeMechanismG earRatio _ inst ance


DMC_Chan geMechanismGearRatio
Axis Done
Execut e Busy
I nputRotation Error
Output Rotat ion ErrorID
UnitsPerRot ation
AxisType
Modulo

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

The instruction is executed


TRUE or FALSE
Execute when Execute changes from BOOL -
(FALSE)
FALSE to TRUE.

This parameter and Positive integer When Execute


InputRotation OutputRotation decide the LREAL (The variable changes from
mechanical gear ratio. value must be set) FALSE to TRUE.

InputRotation and this Positive integer When Execute


OutputRotation parameter and decide the LREAL (The variable changes from
mechanical gear ratio. value must be set) FALSE to TRUE.

The number of units which the


terminal actuator moves while Positive number When Execute
UnitsPerRotation output end of the gear box LREAL (The variable changes from
rotates for a circle. (Unit: value must be set) FALSE to TRUE.
units/rotation)

11- 1 97
DVP-50MC Series Motion Controller Operation Manual

Valid range
Parameter name Function Data type Validation timing
(Default)

Axis type When Execute


11 AxisType 0: rotary axis USINT
0, 1
changes from
1 (0)
FALSE to TRUE.
1: linear axis

The cycle used for equally


Positive number When Execute
dividing the actual position of
Modulo LREAL (The variable changes from
the terminal actuator.
value must be set) FALSE to 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

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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

Done  When the instruction  When Error changes to TRUE.


execution is completed.  When Execute changes to FALSE.

 When Execute changes to


Busy  When Error changes to TRUE.
TRUE.

 When an error occurs in the


instruction execution or the
Error  When Execute changes from TRUE to FALSE.
input parameters for the
instruction are illegal.

11- 1 98
Chapter 11 Motion Control Instructions

 Output Update Timing Chart

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 DMC_TorqueControl controls an axis to work under
DVP50MC11P/DVP50MC11P-06
1
FB
torque mode and carry out the torque output.
DVP50MC11T-04S/DVP50MC11T-16S

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

Valid range Validation


Parameter name Function Data type
(Default) timing

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)

The instruction is executed When Enable


TRUE or FALSE
Enable when Enable changes from BOOL changes to
(FALSE)
FALSE to TRUE. TRUE.

ContinuousUpdate Reserved - - -

11- 2 00
Chapter 11 Motion Control Instructions

Valid range Validation


Parameter name Function Data type
(Default) timing

Specify the target torque.


The torque is expressed
11
with the permillage of rated
torque of the servo axis.
For instance, the setting
value 30 indicates that the Negative number, When Enable
Torque set torque is 30‰ of rated INT positive number, 0 changes to
torque of the servo axis. (0) TRUE.
While Enable changes to
TRUE, modifying the
parameter value will make
the torque changed
immediately.
Negative number,
Specify change rate of the When Enable
positive number
TorqueRamp torque from current torque LREAL changes from
(The variable value
to target torque. (Unit: ‰/s) FALSE to TRUE.
must be set)
When the torque control
instruction controls an axis,
Positive number When Enable
the velocity of the axis
Velocity LREAL (The variable value changes from
cannot exceed the setting
must be set) FALSE to TRUE.
value.
(Unit: unit/s)
Acceleration Reserved
Deceleration Reserved
Jerk Reserved
1: mcPositiveDirec-
Specify the rotation tion,
When Enable
direction for the axis. 3: mcNegativeDirec-
Direction MC_Direction changes from
1: Positive direction tion
FALSE to TRUE.
3: Negative direction (The variable value
must be set)
BufferMode Reserved

11- 2 01
DVP-50MC Series Motion Controller Operation Manual

 Output Parameters

Parameter name Function Data type Valid range


InTorque TRUE when the set target torque is reached. 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
TRUE when an error occurs in execution of the
Error BOOL TRUE / FALSE
instruction.
Contains the error code when an error occurs.
ErrorID Please refer to section 12.2 for the WORD
corresponding error ID.
 Output Update Timing
Name Timing for changing to TRUE Timing for changing to FALSE

 When the target torque is  When Error changes to TRUE.


InTorque
reached.  When Enable changes from TRUE to FALSE.

 When Enable changes to  When InTorque changes to TRUE.


Busy
TRUE.  When Error changes to TRUE.

 When the instruction starts  When InTorque changes to TRUE.


Active
to control the axis.  When Error changes to TRUE.

 When this instruction  When Enable changes from TRUE to FALSE.


execution is aborted by  CommandAborted is set to TRUE when the
other motion control instruction is aborted by other instruction after
CommandAborted
instruction. Enable changes from TRUE to FALSE during the
instruction execution. One cycle later,
CommandAborted changes to FALSE.

 When an error occurs in the


instruction execution or the
Error  When Enable changes from TRUE to FALSE.
input parameters for the
instruction are illegal.

11- 2 02
Chapter 11 Motion Control Instructions

 Output Update Timing Chart

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_En BOOL FALSE

Pwr_EnPs BOOL FALSE

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_En BOOL FALSE

TC_Tor INT 30

TC_TorRa LREAL 5.0

TC_Vel LREAL 100000.0

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

2. Motion Curve and Timing Chart

Torqu e

30

DMC_ TorqueControl Time

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

FB/FC Explanation Applicable model

DMC_MoveVelocity changes the parameter values of the DVP50MC11T/DVP50MC11T-06


11
1 FB velocity instruction to make the controlled axis valid DVP50MC11P/DVP50MC11P-06
immediately during execution of the velocity instruction. DVP50MC11T-04S/DVP50MC11T-16S

DMC_ Mo veVelocity _ inst ance


DMC_MoveVelocity
Axis I nVe locity
En able Busy
Cont in ousUpdat e Active
Velocity CommandA borted
Acce lerat ion Error
Deceleration E rrorI D
Jerk
Direction
Buffe rMode

 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

FB/FC Explanation Applicable model

DVP50MC11T/DVP50MC11T-06
11
FB DMC_SwitchSoftLimit controls the software limit switch. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-04S/DVP50MC11T-16S

DMC_ Switch SoftL imit_ ins tanc e


DMC_ Swit chS oftLimit
Ax is Done
Enable Error
S witc h E rrorI D

 Input Parameters

Parameter Valid range Validation


Function Data type
name (Default) timing

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

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.

 Output Update Timing

11- 2 07
DVP-50MC Series Motion Controller Operation Manual

Timing for changing to


Parameter Name Timing for changing to FALSE
TRUE

 When the instruction  When Error changes to TRUE.


11 Done
execution is completed.  When Enable changes from TRUE to FALSE.
1
 The input parameters for
Error  When Enable changes from TRUE to FALSE.
the instruction are illegal.

 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

Variable name Data type Initial value

SSL DMC_SwitchSoftLimit

Axis1 USINT 1

SSL_En BOOL FALSE

SSL_Swh BOOL FALSE

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

11.4 Coupling Instructions


11.4.1 MC_GearIn

11 FB/FC Explanation Applicable model


1 DVP50MC11T/DVP50MC11T-06
MC_GearIn is used for establishing the electronic gear
FB DVP50MC11P/DVP50MC11P-06
relationship between two axes.
DVP50MC11T-16S

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)

The instruction is executed


TRUE or FALSE
Execute when Execute changes from BOOL -
(FALSE)
FALSE to TRUE.

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)

Positive number When Execute


RatioDenominator Gear ratio Denominator LREAL (The variable value changes from
must be set) FALSE to TRUE

Command source selection


0: Command position of 0:mcSetValue When Execute
the master axis which MC_Sourc
MasterValueSource the slave axis follows 1:mcActualValue changes from
e
1: Actual position of the (0) FALSE to TRUE
master axis which the
slave axis follows
Specify the target Positive number When Execute
Acceleration acceleration. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE

Specify the target Positive number When Execute


Deceleration deceleration. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE

Specify the change rate of


Positive number When Execute
target acceleration and
Jerk LREAL (The variable value changes from
deceleration.
must be set) FALSE to TRUE
(Unit: Unit/s3)
Specify the behavior when MC_Buffer 0 : mcAborting When Execute
executing two instructions.
BufferMode 0: Aborting _ 1 : mcBuffered changes from
1: Buffered Mode (0) FALSE to TRUE

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

4. Refer to section 10.3 for details on BufferMode.

 Output Parameters

Parameter name Function Data type Valid range


11 TRUE when the slave axis reaches the synchronous
InGear
1
BOOL TRUE / FALSE
state.
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 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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When CommandAborted changes to TRUE


 When Error changes to TRUE
 InGear will change to FALSE immediately
when the input parameter is modified after
the synchronous state is reached and
Execute changes from FALSE to TRUE once
 When the slave axis enters the
InGear more.
synchronous state.
 InGear will change to FALSE immediately
when the input parameter is not modified
after the instruction execution is finished and
Execute changes from FALSE to TRUE once
more. And in the next period, InGear
changes to TRUE.

 When CommandAborted changes to TRUE


Busy  When Execute changes to TRUE
 When Error changes to TRUE

 When the axis starts being  When CommandAborted changes to TRUE


Active
controlled by the instruction  When Error changes to TRUE

11- 2 12
Chapter 11 Motion Control Instructions

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 is
CommandAborted instruction is aborted by other instruction
aborted by other motion
after Execute changes from TRUE to FALSE
instruction
in the course of the instruction execution.
One period later, CommandAborted changes
to FALSE.

 When an error occurs in the


instruction execution or the input  When Execute changes from TRUE to
Error
parameters for the instruction are FALSE
illegal

 Output Update Timing Chart

Case 1 Case2 Case3 Case4

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

Below is the example of execution of MC_GearIn instructions.

1. The variable table and program

11- 2 14
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

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_Ex BOOL FALSE

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_Ex BOOL FALSE

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

3. Motion Curve and Timing Charts:

Ve locit y
M aster a xis (Axis1)
400 00
11

Time

Ve locit y
S lave axis(Axis2)
80000

400 00

Gear In1 Time

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

 In GearIn1, the values of RatioNumerator and RatioDenomenator are both 1. GearIn1_Ex


changes from FALSE to TRUE and meanwhile GearIn1 _Bsy changes to TRUE. One period
later, GearIn1_InGear changes to TRUE and the e-gear relationship between the master axis
and the slave axis is built.

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

 In GearIn2, the values of RatioNumerator and RatioDenomenator are 2 and 1 respectively.


GearIn2_Ex changes from FALSE to TRUE and meanwhile GearIn2 _Bsy changes to TRUE.
One period later, GearIn2_Act and GearIn1_Abt change to TRUE and the slave axis gets to
the target velocity based on the values of RatioNumberator, Ratio Denomenator,

11- 2 17
DVP-50MC Series Motion Controller Operation Manual

MasterValueSource, Acceleration, Jerk and BufferMode specified by the GearIn2 instruction.


Since the values of RatioNumerator and RatioDenomenator in GearIn2 are 2 and 1
respectively, the target velocity of the slave axis is twice that of the master axis. When
11 GearIn2_InGear changes to TRUE, the velocity of the slave axis will be twice that of the
1 master axis.

11- 2 18
Chapter 11 Motion Control Instructions

11.4.2 MC_GearOut

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
MC_GearOut is used for ending the established electronic 11
FB DVP50MC11P/DVP50MC11P-06
gear relationship between the master axis and slave axis.
DVP50MC11T-16S

MC_Gea rO ut_ins tanc e


MC_G earOut
Slav e Done
Ex ecut e Busy
CommandAborted
Erro r
ErrorID

 Input Parameters

Valid range
Parameter name Function Data type Validation timing
(Default)

Specify the number of Refer to Functions


When Execute
the slave axis which is of Section 2.2.
Slave USINT changes from
to disconnect from the (The variable value
FALSE to TRUE
e-gear relationship. must be set)

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

Parameter name Function Data type Valid range

TRUE when the e-gear relationship between the


Done BOOL TRUE / FALSE
slave axis and master axis is disconnected and

11- 2 19
DVP-50MC Series Motion Controller Operation Manual

Parameter name Function Data type Valid range


the MC_GearOut instruction is controlling the
axes.
11 Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
1
CommandAborted TRUE when the instruction is aborted. BOOL TRUE / FALSE
TRUE when there is an error in the execution of
Error BOOL TRUE / FALSE
the instruction.

Contains the error code when an error occurs.


ErrorID WORD
Please refer to section 12.2.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the electronic gear


 When CommandAborted changes to TRUE
Done relationship between the slave axis
 When Error changes to TRUE
and master axis is disconnected

 When CommandAborted changes to TRUE


Busy  When Execute changes to TRUE
 When Error changes to TRUE

 When Execute changes from TRUE to


FALSE
 CommandAborted is set to TRUE when the
CommandAborted  When the instruction execution is instruction is aborted by other instruction
aborted by other motion instruction after Execute changes from TRUE to
FALSE in the course of the instruction
execution. One period later,
CommandAborted changes to FALSE

 When an error occurs in the


instruction execution or the input  When Execute changes from TRUE to
Error
parameters for the instruction are FALSE.
illegal

11- 2 20
Chapter 11 Motion Control Instructions

 Output Update Timing Chart

Case1 Case2 Case3 Case4


11

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

Below is the example of the execution of the MC_GearOut instruction.

1. The variable table and program

Variable name Data type Initial value

Vel MC_MoveVelocity

Axis1 USINT 1

Axis2 USINT 2

Vel_Ex BOOL FALSE

Vel_Dir MC_DIRECTION 1

11- 2 21
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

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

GearIn_Ex BOOL FALSE

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

GearOut_Ex BOOL FALSE

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

2. Curve and Timing Charts:

Velocity
Velocity of Ma st er axis
40000
11
1
Time
Velocity

Ve locity of Slave axis


30000

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

FB/FC Explanation Applicable model

MC_CombineAxes outputs the sum or difference of the DVP50MC11T/DVP50MC11T-06


11
FB position variations of two master axes as the slave DVP50MC11P/DVP50MC11P-06
position variation. DVP50MC11T-16S

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

Positive number When Execute


Specify the acceleration
Acc LREAL (The variable value changes from FALSE
for the slave axis.
must be set) to TRUE

Positive number When Execute


Specify the deceleration
Dec LREAL (The variable value changes from FALSE
for the slave axis.
must be set) to TRUE

Specify the change rate Positive number When Execute


Jerk of the acceleration for the LREAL (The variable value changes from FALSE
slave axis. must be set) to TRUE

Specify the behavior


when executing two 0 : mcAborting When Execute
MC_Buffer
BufferMode instructions. 1 : mcBuffered changes from FALSE
_Mode (0)
0:Aborted to TRUE
1:Buffered
Notes:
1. The instruction execution starts when Execute changes from FALSE to TRUE. When Execute
changes from FALSE to TRUE again no matter whether the instruction execution is completed or
not, the instruction cannot be re-executed and the previous setting values will be kept.
2. Refer to section 10.2 for the relation among Position, Velocity, Acceleration and Jerk.
3. Refer to section 10.3 for the details about BufferMode.

 Output Parameters

Parameter name Function Data type Valid range


TRUE when the slave axis has completed the
InSync BOOL TRUE / FALSE
synchronization action.
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 there is an error in the execution of the
Error BOOL TRUE / FALSE
instruction.

11- 2 27
DVP-50MC Series Motion Controller Operation Manual

Parameter name Function Data type Valid range

Contains the error code when an error occurs. Please


ErrorID WORD
refer to section 12.2.
11

1 Output Update Timing

Timing for changing to


Parameter Name Timing for changing to FALSE
TRUE

 When the slave axis


 When Error changes to TRUE.
InSync completes the
 When CommandAborted changes to TRUE.
synchronization action.

 When CommandAborted changes to TRUE.


Busy  When Execute is TRUE.
 When Error changes to TRUE.

 When the instruction  When CommandAborted changes to TRUE.


Active
starts to control the axis.  When Error changes to TRUE.

 When Execute changes from TRUE to FALSE


 When this instruction  CommandAborted is set to TRUE when the
execution is aborted by instruction is aborted after Execute changes from
CommandAborted
other motion control TRUE to FALSE during the instruction execution.
instruction. One cycle later, CommandAborted changes to
FALSE.

 When an error occurs in


the instruction execution
Error or the input parameters  When Execute changes from TRUE to FALSE
for the instruction are
illegal.

11- 2 28
Chapter 11 Motion Control Instructions

 Output Update Timing Chart

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

Mas ter a xis 1

Mas ter a xis 2

Time

 CombineMode is set to 1

Veloc it y
Mas ter a xis 1

Mas ter a xis 2

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.

1. The variable table and program

Variable name Data type Initial value

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

Variable name Data type Initial value

Pwr3_Act BOOL

Pwr3_Err BOOL
11
Pwr3_ErrID WORD
1
CombinA MC_CombineAxes

CombinA_Ex BOOL FALSE

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_Ex BOOL FALSE

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_Ex BOOL FALSE

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

2. Motion Curve and Timing Chart

Veloc ity
Slav e ax is
11
1
Mas ter ax is 1

Mas ter a xis 2

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

11.4.4 Introduction of Electronic Cam

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 MC_CamIn is used to build the cam relationship between
DVP50MC11P/DVP50MC11P-06
1
FB
two axes according to the set parameters.
DVP50MC11T-16S

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)

The instruction is executed


TRUE or FALSE 11
Execute when Execute changes BOOL -
(FALSE)
from FALSE to TRUE.

ContinuousUpdate Reserved

Specify the cam table used


1~64 When Execute
for building a cam
CamTable USINT (The variable value must changes from
relationship between the
be set) FALSE to TRUE
master axis and slave axis

Specify whether to execute


When Execute
the specified cam table TRUE or FALSE
Periodic BOOL changes from
periodically or just one (FALSE)
FALSE to TRUE
period.

Specify the position mode


When Execute
of the master axis. TRUE or FALSE
MasterAbsolute BOOL changes from
TRUE: Absolute position (FALSE)
FALSE to TRUE
FALSE: Relative position

Specify the position mode


When Execute
of the slave axis. TRUE or FALSE
SlaveAbsolute BOOL changes from
TRUE: Absolute position (FALSE)
FALSE to TRUE
FALSE: Relative position

Specify how many units the


Negative number, When Execute
master axis position shifts
MasterOffset LREAL positive number and 0 changes from
by.
(0) FALSE to TRUE
(Unit: Unit)

Specify how many units the


Negative number, When Execute
slave axis position shifts
SlaveOffset LREAL positive number and 0 changes from
by.
(0) FALSE to TRUE
(Unit: Unit)

Positive number When Execute


Specify the scaling of the
MasterScaling LREAL (The variable value must changes from
master axis position.
be set) FALSE to TRUE

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

Specify the position of the


master axis as the
engagement begins. In
Negative number, When Execute
other words, when the
ActivationPosition LREAL positive number and 0 changes from
master axis passes the
(0) FALSE to TRUE
position, the slave axis
starts to perform the
engagement action.

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)

Specify the way how the 1: mcRampInPositive When Execute


MC_STAR
StartMode slave axis performs the (Positive direction) changes from
T_MODE
engagement action. -1: mcRampInNegative FALSE to TRUE
(Negative direction)
(0)

11- 2 38
Chapter 11 Motion Control Instructions

Valid range
Parameter name Function Data type Validation timing
(Default)

Specify the maximum


11
stacking velocity of the
slave axis during the period Positive number When Execute
Velocity when the slave axis LREAL (The variable value must changes from
performs the engagement be set) FALSE to TRUE
action.
(Unit: Unit/second)

Specify the maximum


acceleration of the slave
axis during the period Positive number When Execute
Acceleration when the slave axis LREAL (The variable value must changes from
performs the engagement be set) FALSE to TRUE
action.
(Unit: Unit/second2)

Specify the maximum


deceleration of the slave
axis during the period Positive number When Execute
Deceleration when the slave axis LREAL (The variable value must changes from
performs the engagement be set) FALSE to TRUE
action.
(Unit: Unit/second2.

Jerk Reserved - - -

Specify the type of the 0:mcSetValue When Execute


MasterValueSource MC_SOU
master axis position in the 1:mcActualValue changes from
RCE
electronic cam calculation. (0) FALSE to TRUE

0: mcAborting When Execute


Specify the behavior when MC_Buffer
BufferMode 1: mcBuffered changes from
executing two instructions. _Mode
(0) FALSE to TRUE

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

Parameter name Function Data type Valid range


TRUE when the master axis and slave axis move TRUE /
11
InSync BOOL
synchronously based on the cam curve. FALSE
1 EndOfProfile
TRUE when the cam motion reaches the end
BOOL
TRUE /
point. FALSE
TRUE when the instruction is being executed. TRUE /
Busy BOOL
FALSE
TRUE when the axis is being controlled. TRUE /
Active BOOL
FALSE
TRUE when the instruction is aborted. TRUE /
CommandAborted BOOL
FALSE
TRUE when there is an error in the execution of TRUE /
Error BOOL
the instruction. FALSE

Contains the error code when an error occurs.


ErrorID WORD
Please refer to the section 12.2.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the cam relationship between the


slave axis and master axis is
disconnected.
 When the acyclic cam motion is
 When the slave axis and master axis
InSync performed (Periodic=FALSE) and
are synchronous in the cam motion.
EndOfProfile changes to TRUE
 When CommandAborted changes to
TRUE
 When Error changes to TRUE

 When the cam motion reaches the end  One period after EndOfProfile changes
EndOfProfile
point in the cam table. to TRUE

 When the acyclic cam motion is


performed (Periodic=FALSE) and
EndOfProfile changes to TRUE
Busy  When Execute changes to TRUE
 When Error changes to TRUE
 When CommandAborted changes to
TRUE

11- 2 40
Chapter 11 Motion Control Instructions

Name Timing for changing to TRUE Timing for changing to FALSE

 When the acyclic cam motion is


performed (Periodic=FALSE) and

 When the instruction starts to control EndOfProfile changes to TRUE 11


Active
axes  When Error changes to TRUE
 When CommandAborted changes to
TRUE

 When Execute changes from TRUE to


FALSE
 CommandAborted is set to TRUE when
CommandAb  When the instruction execution is the instruction is aborted by other
orted aborted by other motion instruction instruction after Execute changes from
TRUE to FALSE in the course of the
instruction execution. One period later,
CommandAborted changes to FALSE.

 When an error occurs in the instruction


 When Execute changes from TRUE to
Error execution or the input parameters for
FALSE
the instruction are illegal

11- 2 41
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing Chart

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

 About MC_CamIn Instruction

 MC_CamIn Execution Process

The MC_CamIn execution process figure:


MC_CamIn Exe cut ion Proc es s
11
S la ve ax is pos ition

2 4 6 Mas ter ax is po sition

1 3 5

Stage 1: Trigger and execute the MC_CamIn instruction.


Stage 2: Wait for the start of the engagement.
Stage 3: The slave axis starts to perform the engagement action as the master axis reaches
the position where the engagement starts.
Stage 4: The engagement is ongoing.
Stage 5: The master axis and slave axis achieve the synchronization as the engagement is
completed.
Stage 6: The master axis and slave axis are in the synchronous motion.

Stage 1: Trigger and execute the MC_CamIn instruction.


The MC_CamIn instruction is executed at this time and then the slave will enter the state of
waiting for the start of the engagement immediately.

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.

Stage 2: Wait for the start of the engagement.


The slave axis waits for the timing for performing the engagement action in the standstill
state. The time to start the engagement is when the master axis passes the position
specified by the parameter ActivationPosition. In different circumstances, the period of time
the slave axis waits for is different. If the master axis is at the position specified by
ActivationPosition as the MC_CamIn instruction is executed, the slave axis starts the
engagement action immediately. If the master axis never reaches the position specified by
ActivationPosition, the slave axis will never start to perform the engagement action and the
cam synchronization will never come true. The parameters ActivationPosition and
ActivationMode are used at this stage.

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.

Stage 4: The engagement is ongoing.


The slave axis performs the engagement in the way specified by the StartMode parameter.
Besides StartMode, the parameters Velocity, Acceleration and Deceleration also works at
this stage. The motion features about velocity, acceleration/ deceleration of the slave axis
are determined by these parameters in the engagement.
Stage 5: The engagement is completed and the master axis and slave axis achieve the
synchronization.
The engagement is completed and the slave axis and master axis achieve the cam
synchronization if the cam phase that the master axis and slave axis correspond to meets
the planned cam relationship after the slave axis starts to perform the engagement action.

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.

 ActivationPosition: Relative axis position

As ActivationMode=0, ActivationPosition is an axis position which is relative 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 the value of ActivationPosition plus the master position of when the
MC_CamIn instruction execution begins.

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.

MC_CamI n Ex ecu tion Proc es s


11

Slave a xis p osit io n Ac tiv ationP osit io n : Re la tive a xis posit io n

10 0 1100

2 4 6 Mas ter ax is po sition

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.

 ActivationPosition: Absolute axis position

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.

MC_CamI n Ex ecut ion Proc es s

A ct iv at io nPos ition :Abs olut e ax is pos ition


Slave a xis p osit io n

10 0 1000

2 4 6 Mas ter ax is p osition

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)

MC_CamI n Ex ecu tion Proc es s

Ac tiva tionPo sition :A bs olu te axis phas e


Ca se 1
S lave a xis p osition

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

6 4 2 Master axis p osition

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

Stage 2: Wait for the start of the engagement.


Stage 3: The master axis reaches the position for starting the engagement (1300 in
circumstance 1 and 900 in circumstance 2) and the slave axis starts to perform the
engagement action.
Stage 4: The engagement is being conducted.
11
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 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.

 ActivationPosition: Absolute cam phase

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

MC_CamI n Ex ecut ion Proc es s

Ac tivat ionPos ition : Abs olute ca m p has e


Ca se 1
S la ve ax is po sition

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

6 4 2 Mast er ax is pos ition

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.

For details, refer to relevant sections. 11


The slave axis follows the master axis to make the synchronous cam motion by using the
MC_CamIn instruction. In the synchronous cam motion, the corresponding relationship between
the master axis position and slave axis position is based on the pre-planned cam relationship (the
cam curve or cam table). The process in which the slave axis position is calculated through the
master axis position is illustrated as follows.

Mas te r Of fse t CA M Slav e Off set


Original v alue of Fin al value o f
Mas ter a xis Slave axis Slav e pos it ion increme nt s la ve po sition inc rement
Mast er ca m phas e
c am pha se S la ve Ca lc ulate slav e Slave ax is
Ma ste r axis
p osition % Abs olute A bs olu te ta rg et pos ition posit io n

Mas ter S caling S la ve Sc alin g

 MasterAbsolute and SlaveAbsolute

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

Master axis ca m phase

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

0 180 360 Maste r 0


a xis p hase -62 0 - 260 100 460 Slave axis po siti on
Cas e2

Planned cam curve


Sl ave axis ca m phase
Slave axi s phase

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.

Maste r axis cam phase

3 60

Master a xis position


0
-720 -360 360 720
When the SlaveAbsolute parameter is TRUE, the slave axis position and its cam phase are in the
absolute relationship. At any time, the slave axis cam phase is equal to the remainder got by
dividing the slave axis position at that time by the maximum value of the slave axis cam phase in
the cam relationship. When the slave axis is in absolute mode, the corresponding relationship
between the slave axis position and its cam phase is consistent with that between the master axis
position and its cam phase when the master axis is in absolute mode.

 Offset and Scaling

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

Slave a xis cam phase

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.

 MasterOffset:0 and SlaveOffset:0 and the impact of MasterScaling and SlaveScaling on


the cam relationship

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

 MasterScaling:1 and SlaveScaling:1 and the impact of MasterOffset and SlaveOffset on


the actually executed cam relationship

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

0 360 0 90 270 360


Master axis positio n
Master a xis p osi ti on

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

MC_Ca mIn Execution Process


Slave axis p ositi on

11

Ma ster axis po sitio n


2 4 6

1 3 5

Stage 1: Trigger and execute the MC_CamIn instruction.


Stage 2: Wait for the start of the engagement.
Stage 3: The master axis reaches the position where the engagement begins 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.
The cam synchronization requires that the master axis cam phase and the slave axis cam phase meet
the defined cam relationship. The engagement process is the process in which the slave axis moves
toward the synchronous phase. The synchronous phase and the master axis cam phase meet the
defined cam relationship. Since the axis cam phase is cyclic, every cam phase is corresponded to by
multiple axis positions. When the engagement occurs, there are many selections for the expected
synchronization position. And thus there are several engagement ways for option.
For example, when the engagement starts, the master axis cam phase and slave axis cam phase are
80 and 180 respectively as point O in the following figure. But the defined cam relationship requires that
the slave axis cam phase is 40 and thus the synchronous position that the slave axis expects is 40 or
400 (Point A or point B in the following figure) at the moment. The engagement process from Point O to
A or Point O to B can be selected via the StartMode parameter.

Slave a xis p ositi on


(Sl ave a xis phase)
660 (300)

Planne d Ca m Curve

Sl ave a xis phase 400 (4 0) B


36 0(0)
300

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

Master axis position


A
40(40) (Mas ter axis phase)
0 (0) 80 360
(80) (360)
StartMode=1
Slave a xis position
(S lave axi s phase)
660 (300)

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)

 Periodic/Non-periodic Cam Operation(Periodic)


In the actual application of electronic cams, some may be executed periodically and some just need be
executed for one cycle. The Periodic parameter is used for choosing one of the two cases for the
electronic cam motion.
As Periodic=TRUE, the slave axis follows the master axis to periodically perform the cam motion till the
cam relationship is disconnected.
As Periodic=FALSE, when the end point of the cam cycle is reached after the slave axis and master
axis enter the synchronous cam motion, the cam relationship between the slave axis and master axis
will be disconnected and the slave axis will stop moving immediately.
If the velocity at the end point of the planned cam relationship is not 0, the slave axis will constantly
move at the disconnection speed after the disconnection of the cam relationship.

11- 2 57
DVP-50MC Series Motion Controller Operation Manual

Ma ster axis po sitio n

11
1

Slave a xis p ositi on Time

300

Periodic m otion
Per iodic =TR UE

0
Sl ave a xis position Time

300

Non -periodic m otion


Per iodic=FALSE

0
Time

 The impact of other instructions on cam operation

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

 MC_Stop and MC_Halt

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.

 Key points of the cam curve


No. Master axis Slave axis Velocity Acceleration
position position
1 0 0 0 0
2 90 100 0 0
3 180 300 0 0
4 360 0 0 0

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

 The variable table and program


Variable name Data type Initial value

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

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

 Motion curve and timing chart


Master a xis p ositi on

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
MC_CamOut can disconnect the established electronic cam 11
FB DVP50MC11P/DVP50MC11P-06
relationship.
DVP50MC11T-16S

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

Parameter name Function Data type Valid range


TRUE /
Done TRUE when the instruction execution is completed. BOOL
FALSE
TRUE when the instruction is being executed. TRUE /
Busy BOOL
FALSE
TRUE when the instruction is aborted. TRUE /
CommandAborted BOOL
FALSE
TRUE when there is an error in the execution of the TRUE /
Error BOOL
instruction. FALSE

Contains the error code when an error occurs.


ErrorID WORD
Please refer to the section 12.2.

11- 2 63
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the electronic cam


11 relationship between the slave
 When CommandAborted changes to

1 Done TRUE.
axis and master axis is
 When Error changes to TRUE.
disconnected.

 When CommandAborted changes to


Busy  When Execute changes to TRUE. TRUE.
 When Error changes to TRUE.

 When Execute changes from TRUE to


FALSE.
 CommandAborted is set to TRUE when
 When the instruction execution is
CommandAborted the instruction is aborted by other
aborted by other motion
instruction after Execute changes from
instruction.
TRUE to FALSE in the course of the
instruction execution. One period later,
CommandAborted changes to FALSE.

 When an error occurs in the


instruction execution or the input  When Execute changes from TRUE to
Error
parameters for the instruction are FALSE.
illegal.

 Output Update Timing Chart

Case 1 Case 2 Case 3 Cas e 4

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

 The execution effect of the MC_CamOut instruction is described in the following


example. The cam curve is planned as below.

 The key points of the cam curve


No. Master axis Slave axis Velocity Acceleration
position position
1 0 0 0 0
2 90 100 0 0
3 180 300 0 0
4 360 0 0 0

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

ActivationPosition Relative axis position: 100

StartMode The shortest way

 The variable table and program


Variable name Data type Initial value

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

Variable name Data type Initial value


CamOut_Bsy BOOL

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

 Motion curve and timing chart

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 FB DMC_CamReadPoint reads the information of a cam point. DVP50MC11P/DVP50MC11P-06
1 DVP50MC11T-16S

DMC_CamRe adPoint_ins tanc e


DMC_Ca mRead Point
Ex ec ute Done
CamTable Busy
CamChange dPoint E rro r
Ca mP ointNum ErrorID
Mas terPos
SlaveP os
Slav eVel
Slav eAc c

 Input Parameters

Valid range
Parameter name Function Data type Validation timing
(Default)

The instruction is executed


TRUE or FALSE
Execute when Execute changes from BOOL -
(FALSE)
FALSE to TRUE.

The number of the cam table


based on which the cam 1~64 When Execute
CamTable relationship between the USINT (The variable changes from
master axis and slave axis is value must be set) FALSE to TRUE.
built.

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

Done TRUE when the instruction execution is completed. 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.

The position of the master axis of the selected 0, positive


MasterPos LREAL
electronic cam point. number

The position of the slave axis of the selected electronic 0, positive


SlavePos LREAL
cam point. number

The velocity of the slave axis of the selected electronic 0, positive


SlaveVel LREAL
cam point. number

The acceleration of the slave axis of the selected 0, positive


SlaveAcc LREAL
electronic cam point. number

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

Done  When the instruction


 When Execute changes to FALSE.
execution is completed.

 When Done changes to TRUE.


Busy  When Execute is TRUE.
 When Error changes to TRUE.

 When any of the input


Error  When Execute changes from TRUE to FALSE.
parameters is illegal.

 Output Update Timing Chart

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

DMC_CamReadPoint reads the information of a cam point in an electronic cam table.


If CamChangedPoint is FALSE, the instruction reads the parameters of a cam point which is before the
cam point information is modified by using DMC_CamSet.
If CamChangedPoint is TRUE, the instruction reads the parameters of a cam point which is after the
cam point information is modified by using DMC_CamSet.

 Programming Example

1. The variable table and program

Variable name Data type Initial value

CamWr DMC_CamWritePoint

CamWr_Ex BOOL FALSE

CamWr_CT USINT 1

CamWr_CP UINT 2

CamWr_MP LREAL 180.0

CamWr_SP LREAL 540.0

CamWr_SV LREAL 0.0

CamWr_SA LREAL 0.0

CamWr_Done BOOL

CamWr_Bsy BOOL

CamWr_Err BOOL

11- 2 72
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

CamWr_ErrID WORD

CamRe DMC_CamReadPoint
11
CamRe_Ex BOOL FALSE

CamRe_CT USINT 1

CamRe_CHP BOOL TRUE

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

2. The cam curve

11
1 C1’
540
C1
360

1 80 360 18 0 36 0

The cam curve C1 is changed to C1’.

 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 CamRe_Ex changes to TRUE, DMC_CamReadPoint is executed. When the parameter


CamChangedPoint (variable: CamRe_CHP ) changes to FALSE, the cam point information that
the instruction reads is the cam point information before writing is done as shown in the following
table.
Master axis Slave axis
No. Velocity Acceleration
position position
2 180.0 360.0 0.0 0.0

 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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11
DMC_CamWritePoint is used for setting parameters of one
FB DVP50MC11P/DVP50MC11P-06
cam point.
DVP50MC11T-16S

DMC_CamWritePoint_ ins tance


DMC_CamWriteP oint
Exec ut e Done
CamTable Busy
CamPointNum Error
Mas terPos E rrorID
Slav ePos
SlaveVel
Slav eAcc

 Input Parameters

Valid range
Parameter name Function Data type Validation timing
(Default)

The instruction is executed


TRUE or FALSE
Execute when Execute changes from BOOL -
(FALSE)
FALSE to TRUE.

The number of the cam table


based on which the cam 1~64 When Execute
CamTable relationship between the USINT (The variable changes from
master axis and slave axis is value must be set) FALSE to TRUE.
built.

When Execute
The number of the cam point 1~2048
CamPointNum UINT changes from
which is set. (0)
FALSE to TRUE.

The position of the master


MasterPos axis of the cam point which is LREAL 0, positive number
set.

The position of the slave axis


SlavePos LREAL 0, positive number
of the cam point which is set.

The velocity of the slave axis


SlaveVel LREAL 0, positive number
of the cam point which is set.

11- 2 75
DVP-50MC Series Motion Controller Operation Manual

Valid range
Parameter name Function Data type Validation timing
(Default)

The acceleration of the slave


11 SlaveAcc axis of the cam point which is LREAL 0, positive number
1 set.

 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

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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

Done  When the instruction


 When Execute changes to FALSE.
execution is completed.

 When Done changes to TRUE.


Busy  When Execute is TRUE.
 When Error changes to TRUE.

 When any of the input


Error  When Execute changes from TRUE to FALSE.
parameters is illegal.

 Output Update Timing Chart

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 FB
DMC_CamSet is used for making the modified cam point
DVP50MC11P/DVP50MC11P-06
1 information effective.
DVP50MC11T-16S

DMC_CamSet _ins tanc e


DMC_CamSet
Ex ecute Done
CamTable Busy
Error
ErrorI D

 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 between USINT (The variable changes from
the master axis and slave value must be set) FALSE to TRUE.
axis is built.

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

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the instruction


Done  When Execute changes to FALSE.
execution is completed.

11- 2 78
Chapter 11 Motion Control Instructions

Name Timing for changing to TRUE Timing for changing to FALSE


 When Done changes to TRUE.
Busy  When Execute is TRUE.
 When Error changes to TRUE.

 When any of the input


11
Error  When Execute changes from TRUE to FALSE.
parameters is illegal.

 Output Update Timing Chart

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

1. The variable table and program


11
1
Variable name Data type Initial value

CamWr DMC_CamWritePoint

CamWr_Ex BOOL FALSE

CamWr_CT USINT 1

CamWr_CP UINT 2

CamWr_MP LREAL 180.0

CamWr_SP LREAL 540.0

CamWr_SV LREAL 0.0

CamWr_SA LREAL 0.0

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

 The cam point information before modification:


Master axis Slave axis
No. Velocity Acceleration
position position
1 0.0 0.0 0.0 0.0
2 180.0 360.0 0.0 0.0
3 360.0 0.0 0.0 0.0

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

 The cam point information after modification:


Master axis Slave axis
No. Velocity Acceleration
position position
11 1 0.0 0.0 0.0 0.0
1 2 180.0 540.0 0.0 0.0
3 360.0 0.0 0.0 0.0

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_Ex changes from FALSE to TRUE, DMC_CamWritePoint is executed. When


CamWr_Done changes to TRUE, setting cam point information is finished.

 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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11
DMC_CamReadTappetStatus is used for reading the
FB DVP50MC11P/DVP50MC11P-06
status of multiple tappet points.
DVP50MC11T-16S

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.

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

Status2 The status of the second tappet point. BOOL TRUE/FALSE

Status3 The status of the third tappet point. BOOL TRUE/FALSE

Status4 The status of the forth tappet point. BOOL TRUE/FALSE

Status5 The status of the fifth tappet point. BOOL TRUE/FALSE

Status6 The status of the sixth tappet point. BOOL TRUE/FALSE

Status7 The status of the seventh tappet point. BOOL TRUE/FALSE

11- 2 84
Chapter 11 Motion Control Instructions

Parameter
Function Data type Valid range
name

Status8 The status of the eighth tappet point. BOOL TRUE/FALSE


11
 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the instruction


Valid  When Enable changes to FALSE.
execution is completed.

 When Done changes to TRUE.


Busy  When Enable is TRUE.
 When Error changes to TRUE.

 When any of the input


Error  When Enable changes from TRUE to FALSE.
parameters is illegal.

 Output Update Timing Chart

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

DMC_CamReadTappetStatus is used for reading the status of eight tappet points.

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

1. The variable table and program


11
1 Variable name Data type Initial value

RTS DMC_CamReadTappetStatus

RTS_En BOOL FALSE

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

1. Table of tappet points

Master axis Slave axis Passed in the Passed in the


Index
position position positive direction negative direction

1 50.0 150.0 PositiveOn NegativeOff

2 100.0 180.0 PositiveDisable NegativeOff

3 180.0 250.0 PositiveOff NegativeOff

4 300.0 100.0 PositiveInvert NegativeOff

11- 2 87
DVP-50MC Series Motion Controller Operation Manual

2. Position curve and sequence chart

Sl av e ax i s po si ti o n
( U ni t)

11
360

1 250
180
150
100

0 50 100 180 200 300 360 Mas ter a


( U nit )

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

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11
DMC_CamReadTappetValue reads the parameters
FB DVP50MC11P/DVP50MC11P-06
of one tappet point.
DVP50MC11T-16S

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

MasterPos Displays the master axis position. LREAL

The status mode selection for the tappet 0: PositiveDisable


1: PositiveOn
PositiveMode point when the axis passes the tappet PositiveMode_Type
2: PositiveOff
point in the positive direction. 3: PositiveInvert
The status mode selection for the tappet 0: NegativeDisable
1: NegativeOn
NegativeMode point when the axis passes the tappet NegativeMode_Type
2: NegativeOff
point in the negative direction. 3: NegativeInvert

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the instruction


Valid  When Enable changes to FALSE.
execution is completed.

 When Done changes to TRUE.


Busy  When Enable is TRUE.
 When Error changes to TRUE.

 When any of the input


Error  When Enable changes from TRUE to FALSE.
parameters is illegal.

 Output Update Timing Chart

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.

Mode Function Explanation


When the master axis passes the tappet point in the positive direction,
PositiveDisable Disabled
the status of the tappet point which is read has no change.
When the master axis passes the tappet point in the positive direction,
PositiveOn ON
the status of the tappet point which is read is ON.

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

1. The variable table and program

11- 2 91
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

RTV DMC_CamReadTappetValue

RTV_En BOOL FALSE


11
1 RTV_CT USINT 1

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

2. Table of tappet points

Master axis Slave axis Passed in the positive Passed in the negative
Index
position position direction direction

1 108.0 235.0 PositiveOn NegativeInvert


2 200.0 250.0 PositiveOff NegativeOff
3 300.0 192.0 PositiveInvert NegativeOff

 When RTV_En changes from FALSE to TRUE, DMC_CamReadTappetValue is executed. When


RTV_Va changes to TRUE, the instruction execution is finished and the tappet point information is read
as follows.

Passed in the positive Passed in the negative


Index Master axis position
direction direction

2 200.0 PositiveOff NegativeOff

11- 2 92
Chapter 11 Motion Control Instructions

11.4.12 DMC_CamWriteTappetValue

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11
DMC_CamWriteTappetValue is used for setting the
FB DVP50MC11P/DVP50MC11P-06
parameters for a tappet point.
DVP50MC11T-16S

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

Parameter name Function Data type Valid range


TRUE when the instruction execution is
11 Done
completed.
BOOL TRUE / FALSE
1 TRUE when the instruction is being
Busy BOOL TRUE / FALSE
executed.
TRUE when there is an error in the
Error BOOL TRUE / FALSE
execution of the instruction.
Contains the error code when an error
ErrorID WORD
occurs. Please refer to section 12.2.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the instruction


Done  When Execute changes to FALSE.
execution is completed.

 When Done changes to TRUE.


Busy  When Execute is TRUE.
 When Error changes to TRUE.

 When any of the input


Error  When Execute changes from TRUE to FALSE.
parameters is illegal.

 Output Update Timing Chart

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.

The meanings of modes are shown in the following table.


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
PositiveInvert Invert
passed 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
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
NegativeIvert Invert 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

11- 2 95
DVP-50MC Series Motion Controller Operation Manual

Mode Function Explanation


passed 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
11 before the tappet point is passed in the negative direction.
1
 Precaution

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

1. The variable table and program


Variable name Data type Initial value

WTV DMC_CamWriteTappetValue

WTV_Ex BOOL FALSE

WTV_CT USINT 1

WTV_TN UINT 2

WTV_MP LREAL 200.0

WTV_PM LREAL PositiveOff

WTV_NM LREAL NegativeOff

WTV_Done BOOL

WTV_Bsy BOOL

WTV_Err BOOL

WTV_ErrID WORD

RTV DMC_CamReadTappetValue

RTV_En BOOL FALSE

RTV_CT USINT 1

RTV_TN UINT 2

RTV_Va BOOL

RTV_Bsy BOOL

11- 2 96
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

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

2. Table of tappet points

Master axis Slave axis Passed in the positive Passed in the


Index
position position direction negative direction

1 108.0 235.0 ON Invert


2 200.0 250.0 OFF OFF
3 300.0 192.0 Invert ON
 When WTV_Ex changes from FALSE to TRUE, DMC_CamWriteTappetValue is executed. When
WTV_Done changes to TRUE, the execution of the instruction is finished and the information of the
second tappet point is written as below.

Master axis
Index Passed in the positive direction Passed in the negative direction
position

2 250.0 PositiveOff NegativeOff

11- 2 97
DVP-50MC Series Motion Controller Operation Manual

 When RTV_En changes from FALSE to TRUE, DMC_CamReadTappetValue is executed. When


RTV_Done changes to TRUE, the execution of the instruction is finished and the information of one
tappet point which is read is shown as below.
11 Master axis
1 Index
position
Passed in the positive direction Passed in the negative direction

2 250.0 PositiveOff NegativeOff

11- 2 98
Chapter 11 Motion Control Instructions

11.4.13 DMC_CamAddTappet

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
FB DMC_CamAddTappet is used for adding a tappet point. DVP50MC11P/DVP50MC11P-06 11
DVP50MC11T-16S

DMC_CamAddTap pet_ins tanc e


DMC_CamAddTappet
Ex ecut e Done
CamTable Busy
Mas terPos Error
PositiveMode ErrorID
Negat iv eMode TappetNum

 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

Parameter name Function Data type Valid range


TRUE when the instruction execution is
11 Done
completed.
BOOL TRUE / FALSE
1
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.
TappetNum Outputs the number of the added tappet point. UINT 1~128

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the instruction


Done  When Execute changes to FALSE.
execution is completed.

 When Done changes to TRUE.


Busy  When Execute is TRUE.
 When Error changes to TRUE.

 When any of the input


Error  When Execute changes from TRUE to FALSE.
parameters is illegal.

 Output Update Timing Chart


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

1. The variable table and program


11
1 Variable name Data type Initial value

CAT DMC_CamAddTappet

CAT_Ex BOOL FALSE

CAT_CT USINT 1

CAT_MP LREAL 200.0

CAT_PM LREAL PositiveOff

CAT_NM LREAL NegativeOff

CAT_Done BOOL

CAT_Bsy BOOL

CAT_Err BOOL

CAT_ErrID WORD

CAT_TN UINT

RTV DMC_CamReadTappetValue

RTV_En BOOL FALSE

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

2. Table of tappet points

Passed in the Passed in the


Index Master axis position Slave axis position
positive direction negative direction

1 108.0 235.0 ON Invert


2 200.0 250.0 OFF OFF
3 300.0 192.0 Invert ON

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.

Passed in the positive Passed in the negative


Index Master axis position
direction direction

4 250.0 PositiveOff NegativeOff

 When RTV_En changes from FALSE to TRUE, DMC_CamReadTappetValue is executed. When


RTV_Done changes to TRUE, the instruction execution is completed and the information of the tappet
point which is read is shown as below.

Passed in the positive Passed in the negative


Index Master axis position
direction direction

4 250.0 PositiveOff NegativeOff

11- 3 03
DVP-50MC Series Motion Controller Operation Manual

11.4.14 DMC_CamDeleteTappet

FB/FC Explanation Applicable model


DVP50MC11T/DVP50MC11T-06
11 FB DMC_CamDeleteTappet is used for deleting a tappet point. DVP50MC11P/DVP50MC11P-06
1 DVP50MC11T-16S

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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the instruction


Done  When Execute changes to FALSE.
execution is completed.

11- 3 04
Chapter 11 Motion Control Instructions

Name Timing for changing to TRUE Timing for changing to FALSE

 When Done changes to TRUE.


Busy  When Execute is TRUE.
 When Error changes to TRUE.

 When any of the input


11
Error  When Execute changes from TRUE to FALSE.
parameters is illegal.

 Output Update Timing Chart


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

1. The variable table and program

Variable name Data type Initial value

CDT DMC_CamDeletTappet

CDT_Ex BOOL FALSE

CDT_CT USINT 1

11- 3 05
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

CDT_Done BOOL

CDT_Bsy BOOL
11
1 CDT_Err BOOL

CDT_ErrID WORD

RTV DMC_CamReadTappetValue

RTV_En BOOL FALSE

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

2. Table of tappet points

Passed in the Passed in the


Index Master axis position Slave axis position
positive direction negative direction
11
1 108.0 235.0 PositiveOn NegativeInvert
2 200.0 250.0 PositiveOff NegativeOff
3 300.0 192.0 PositiveInvert NegativeOn

 When CDT_Ex changes from FALSE to TRUE, DMC_CamDeletTappet is executed. When


CDT_Done changes to TRUE, the execution of the instruction is finished and the last tappet point
is deleted.

 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.5 Application Instructions


11.5.1 Rotary Cut Technology

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

Et her C AT Et her net C A Nopen

F eed axis Rotary cut axis


Rotary cut roller
Material (For cutting)

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.5.2 Rotary Cut Parameters

11

Cutting Cutting Cutting


position position position

Parameter Corresponding parameter name of


Explanation
in the figure the instruction

L The cutting length of the processed material APF_RotaryCut_Init.CutLength

The radius of the feed axis, i.e. the radius


R1 APF_RotaryCut_Init.FeedRadius
length of the feed roller.

The radius of the rotary axis, i.e. the distance


R2 from the center of the rotary roller to the tool APF_RotaryCut_Init.RotaryRadius
bit.

The number of knives of the rotary roller. The


N APF_RotaryCut_Init.KnifeNum
number of knives is 1 in the figure above.

P1 The starting position of the synchronous area. APF_RotaryCut_Init.SyncStartPos

P2 The end position of the synchronous area. APF_RotaryCut_Init.SyncStopPos

11- 3 09
DVP-50MC Series Motion Controller Operation Manual

11.5.3 Control Feature of Rotary Cut Function


Rotary cut function is a type of special electronic cam function. The figure of cam curve is shown below for
continuous cutting.
11
1

 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

11.5.4 Introduction to Cam Curve with Rotary Cut Function


The cam curve with the rotary cut function could be divided into the SYNC area and adjustment area.
SYNC area: Feed axis and rotary-cut axis make the motion at a fixed speed ratio (Linear speed of the
knife is usually equal to that of the cut surface), and material cutting takes place in SYNC 11
area.
Adjustment area: Due to different cutting length, positioning need be adjusted accordingly.
Adjustment area can be in the following three situations based on various cutting
length.

1. Short material cutting

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.

3. Long material cutting

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.

4. The entry curve

It is the rotary cut curve when rotary cut function is started.

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

5. The end curve

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

11.5.5 Rotary-cut Instructions

APF_RotaryCut_Init

11 FB/FC Explanation Applicable model


1 APF_RotaryCut_Init is used for initializing the radius of DVP50MC11T/DVP50MC11T-06
FB the rotary-cut axis and feed axis, the cutting length, DVP50MC11P/DVP50MC11P-06
synchronous area and etc. DVP50MC11T-16S

APF_RotaryCu t_Init_ instance


AP F_Rot aryCut_I nit
E xecute Done
Rota ryAxisRadius Busy
RotaryAxisKnifeNum Error
FeedA xisRadius ErrorID
Cut Length
SyncStartPos
SyncSt opPos
RotSt art Pos
FedStartPos
RotaryCutID

 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 radius of the rotary


Positive number
cut axis, i.e. the When Execute
(The variable
RotaryAxisRadius distance from the LREAL changes from FALSE
value must be
center of the rotary cut to TRUE
set)
roller to the knife.

The number of knives


Positive number
of the rotary cut axis, When Execute
(The variable
RotaryAxisKnifeNum i.e. the number of USINT changes from FALSE
value must be
knives mounted on the to TRUE
set)
rotary cut roller

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)

The start position of the Positive number


When Execute
sync area, i.e. the (The variable
SyncStartPos corresponding feed axis LREAL changes from FALSE
position when the sync value must be
to TRUE
area starts. set)

The end position of the Positive number


When Execute
sync area, i.e. the (The variable
SyncStopPos corresponding feed axis LREAL changes from FALSE
position when the sync value must be
to TRUE
area ends. set)

RotStartPos Reserved - - -

FedStartPos Reserved - - -

The number for a group 1~8


of rotary cut When Execute
instructions; a group of (The variable
RotaryCutID USINT changes from FALSE
rotary cut instructions value must be
use the same number. to TRUE
Setting range: 1~8. set)

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

Done TRUE when the instruction is completed. BOOL TRUE / FALSE

Busy TRUE when the instruction is being executed. 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.

11- 3 18
Chapter 11 Motion Control Instructions

 Output Update Timing

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
Done  When initializing is completed. instruction execution is completed
after Execute changes from
TRUE to FALSE during the
instruction execution. One cycle
later, Done changes to FALSE.

 When Execute changes to  When Done changes to TRUE.


Busy
TRUE.  When Error changes to TRUE.

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

 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

FB/FC Explanation Applicable model

11 APF_RotaryCut_In is used for establishing the rotary-


DVP50MC11T/DVP50MC11T-06
1 cut relationship and specifying the axis No. of the
DVP50MC11P/DVP50MC11P-06
FB
rotary-cut axis and feed axis according to the
DVP50MC11T-16S
application requirement.

APF_Rotary Cut _In_ins tanc e


APF_RotaryCut _In
E xec ute Done
Rota ry Ax is Busy
FeedAx is Error
Rot ary CutID E rrorID

 Input Parameters

Valid range Validation


Parameter name Function Data type
(Default) timing

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)

The axis No. of the feed


axis. We suggest that the
feed axis number should
be less than the rotary cut
Refer to Functions
axis number so that the When Execute
of Section 2.2.
FeedAxis rotary cut axis could USINT changes from
(The variable
better follow the feed axis FALSE to TRUE
value must be set)
for motion. The axis
number can be set in
order of 1~32 from small
to large.

11- 3 20
Chapter 11 Motion Control Instructions

Valid range Validation


Parameter name Function Data type
(Default) timing

The number for a group


of rotary cut instructions; 11
1~8 When Execute
a group of rotary cut
RotaryCutID USINT (The variable changes from
instructions use the same
value must be set) FALSE to TRUE
number. Setting range:
1~8.

 Output Parameters

Parameter
Function Data type Valid range
name

Done TRUE when the instruction is completed. BOOL TRUE / FALSE

Busy TRUE when the instruction is being executed. 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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from


TRUE to FALSE after the
instruction execution is completed.
 When the coupling between the  Done changes to TRUE when the
Done rotary-cut axis and feed axis is instruction execution is completed
completed. after Execute changes from TRUE
to FALSE during the instruction
execution. One cycle later, Done
changes to FALSE.

 When Execute changes to  When Done changes to TRUE.


Busy
TRUE.  When Error changes to TRUE.

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

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

FB/FC Explanation Applicable model

APF_RotaryCut_Out is used for disconnecting the DVP50MC11T/DVP50MC11T-06


11
FB already established rotary-cut relationship between the DVP50MC11P/DVP50MC11P-06
rotary-cut axis and feed axis. DVP50MC11T-16S

APF_RotaryCut _Out _in stan ce


AP F_Rot aryCut_O ut
E xecute Done
Rota ryAxis Busy
RotaryCutI D Error
E rrorID

 Input Parameters

Data Valid range


Parameter name Function Validation timing
type (Default)

The instruction is executed


TRUE or FALSE
Execute when Execute changes BOOL
(FALSE)
from FALSE to TRUE.

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)

The number for a group of


1~8
rotary cut instructions; a
(The variable When Execute
group of rotary cut
RotaryCutID USINT value must be changes from
instructions use the same
set) FALSE to TRUE
number. Setting range:
1~8.

 Output Parameters

Parameter
Function Data type Valid range
name

Done TRUE when the instruction is completed. BOOL TRUE / FALSE

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

Error TRUE when there is an error. BOOL TRUE / FALSE


11
Contains error codes when an error occurs. Please refer
1 ErrorID WORD
to section 12.2 for the corresponding error code.

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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from


TRUE to FALSE after the
instruction execution is completed.
 Done changes to TRUE when the
 When rotary-cut relationship
Done instruction execution is completed
disconnecting is completed.
after Execute changes from TRUE
to FALSE during the instruction
execution. One cycle later, Done
changes to FALSE.

 When Done changes to TRUE.


Busy  When Execute changes to TRUE
 When Error changes to TRUE.

11- 3 24
Chapter 11 Motion Control Instructions

Name Timing for changing to TRUE Timing for changing to FALSE

 When an error occurs in the


 When Execute changes from
Error
instruction execution or the input
11
parameters for the instruction are TRUE to FALSE
illegal.

 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

11.5.6 Application Example of Rotary Cut Instructions

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

RotaryAxisRadius 10 (Unit: units)

RotaryAxisKnifeNum 1

FeedAxisRadius 20 (Unit: units)

CutLenth 30 (Unit: units)

SyncStartPos 19 (Unit: units)

SyncStopPos 1 (Unit: unit)

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

The variable table and program

Variable name Data type Initial value

Pwr1 MC_Power

Axis1 USINT 1

Pwr1_En BOOL TRUE

Pwr1_BM MC_Buffer_Mode 0

Pwr1_Sta BOOL TRUE

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

Variable name Data type Initial value

Pwr2_En BOOL TRUE

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.

The variable table and program

Variable name Data type Initial value

RotyCut_Init APF_RotaryCut_Init

RotyCut_Init_Ex BOOL TRUE

RotyCut_Init _Done BOOL TRUE

RotyCut_Init _Bsy BOOL

RotyCut_Init _Err BOOL

RotyCut_Init _ErrID WORD

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.

The variable table and program

Variable name Data type Initial value

RotyCut_In APF_RotaryCut_In

RotyCut_In_Ex BOOL TRUE

RotyCut_In _Done BOOL TRUE

RotyCut_In _Bsy BOOL

RotyCut_In _Err BOOL

RotyCut_In _ErrID WORD

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.

The variable table and program

Variable name Data type Initial value

Vel MC_MoveVelocity

Axis1 USINT 1

Vel _Ex BOOL TRUE

Vel _Dir MC_DIRECTION 1

11- 3 28
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

Vel _BM MC_Buffer_Mode 0

Vel _Invel BOOL


11
Vel _Bsy BOOL

Vel _Act BOOL

Vel _Abt BOOL

Vel _Err BOOL

Vel _ErrID WORD

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.

The variable table and program

Variable name Data type Initial value

RotyCut_Out APF_RotaryCut_Out

RotyCut_Out_Ex BOOL TRUE

RotyCut_Out_Done BOOL TRUE

RotyCut_Out_Bsy BOOL

RotyCut_Out_Err BOOL

RotyCut_Out_ErrID WORD

11- 3 29
DVP-50MC Series Motion Controller Operation Manual

Rot yCut_ Out


A PF_ Rot aryCut_ Out 6
RotyCut _In_Ex Exe cut e Done RotyCut_O ut_Done
2 Rot aryAxis Busy RotyCut_Out_Bsy
11 1 RotaryCut ID Error RotyCut_Out_Err
1 ErrorID RotyCut_Out _ErrI D

11- 3 30
Chapter 11 Motion Control Instructions

11.6 G Code Instructions


11.6.1 CNC Introduction

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

G0 Quick Positioning 8 Format 1: G0 X_ Y_ Z_ A_ B_ C_ P_ Q_

G1 Linear interpolation 8 Format 1: G1 X_ Y_ Z_ A_ B_ C_ P_ Q_ E_ F_

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_

G4 Delay instruction -- Format 1: G4 K_

XY plane for circular


G17 -- Format 1: G17
interpolation

XZ plane for circular


G18 -- Format 1: G18
interpolation

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

G90 Absolute mode -- Format 1: G90

G91 Relative mode -- Format 1: G91

G50 Precise stop -- Format 1: G50

G51 Round path transition -- Format 1: G51 D_

Smooth path
G52 -- Format 1: G52
transition

M0~M99 M Code -- Format 1: M_ D_

Note:

The location with an underline is the value of the parameter to be set.

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.

Every row has only one G code input.

The input format of G codes in the CANopen Builder software is as follows.

N0 G0 X100 Y100

11.6.3 Explanation of G Code Formats

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

 G code parameter omitting


1. One or more items among X_, Y_, Z_, A_, B_, C_, P_, Q_ in G0 instruction can be omitted.
2. One or more items among X_, Y_, Z_, A_, B_, C_, P_, Q_, E_, E_, F_ in G1 instruction can
be omitted.

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.

 Special function of G code


 Using %ML register to represent key values in G code
X_, Y_, Z_, A_, B_, C_, P_, Q_, E_, F_, I_, J_, K_, R_,T_,E_, F_ all can use %ML register.
“%” of “%ML” is deleted and “$” is added to the right and left of “ML”. T is of ULINT type
and others are of LREAL type.

Example: N0 G0 X$ML0$ Y$ML1$ Z$ML2$ (%ML0=100.0,%ML1=200.0,%ML2=300.0)


Explanation: After the G code is executed, axis X moves to 100 units; axis Y moves to
200 units and axis Z moves to 300 units.

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

G50 G51 G52


(Precise stop) (Round path transition) (Smooth path transition)

The transition mode is


invalid and the motion The transition mode is invalid and the
G0 Usable
effect is the same as motion effect is the same as G50.
G50.

G1 Usable Usable Usable

The transition mode can be used when the


straight line or circular arc and circular arc
G2 Usable Usable
are tangent or are close to the point of
tangency.

The transition mode can be used when the


straight line or circular arc and circular arc
G3 Usable Usable
are tangent or are close to the point of
tangency.

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.

Example: G1 X10000 Y32105.6 E+20000 E-90000


Explanation: When the instruction is executed, the cutter moves at the acceleration of 20000
units/second2 for speeding up and at the deceleration of 90000 units/second2 for reducing the
speed.

11.6.4 G Code Functions

G90 (Absolute Mode)

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

 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 G90
N1 G0 X6000 Y6000
After G codes are executed, the Y/X curve for the whole movement process is shown below:

11- 3 34
Chapter 11 Motion Control Instructions

Y
Position

6000 P2
11

3000 P1

X
O Position
3000 6000

G91 (Relative Mode)

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

 Format: N_G0 X_Y_Z_A_B_C_P_Q_


 Parameter explanation:

11- 3 36
Chapter 11 Motion Control Instructions

N_: The row number of G code in NC program.


X_: Specify the terminal position of axis X, Unit: unit, data type: LREAL.
Y_: Specify the terminal position of axis Y, Unit: unit, data type: LREAL.
Z_: Specify the terminal position of axis Z, Unit: unit, data type: LREAL. 11
A_: Specify the terminal position of axis A, Unit: unit, data type: LREAL.
B_: Specify the terminal position of axis B, Unit: unit, data type: LREAL.
C_: Specify the terminal position of axis C, Unit: unit, data type: LREAL.
P_: Specify the terminal position of axis P, Unit: unit, data type: LREAL.
Q_: Specify the terminal position of axis Q, Unit: unit, data type: LREAL.

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

 Absolute 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 G90
N1 G0 X50000 Y100000

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

Vertical Milling Machine


Motion path figure:

11- 3 40
Chapter 11 Motion Control Instructions

 Format: N_G1 X_Y_Z_A_B_C_P_Q_ E_ E_F_


 Parameter explanation:

N_:The row number of G code in NC program


X_:Specify the terminal position of axis X, Unit: unit, data type: LREAL. 11
Y_:Specify the terminal position of axis Y, Unit: unit, data type: LREAL.
Z_:Specify the terminal position of axis Z, Unit: unit, data type: LREAL.
A_:Specify the terminal position of axis A, Unit: unit, data type: LREAL.
B_:Specify the terminal position of axis B, Unit: unit, data type: LREAL.
C_:Specify the terminal position of axis C, Unit: unit, data type: LREAL.
P_:Specify the terminal position of axis P, Unit: unit, data type: LREAL.
Q_:Specify the terminal position of axis Q, Unit: unit, data type: LREAL.
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.
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

 Absolute mode example:


The initial positions of axis X, Y, Z are all 20000 units and their axis parameters are all default
values. The G codes to be executed are:
11 N0 G90
1 N1 G1 X50000 Y60000 Z70000
After G codes are executed, the Y/X curve for the whole movement process is shown below:

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

 Relative mode example:


The initial positions of axis X, Y, Z are all 20000 units and their axis parameters are all default

11- 3 42
Chapter 11 Motion Control Instructions

value. The G codes to be executed are:


N0 G91
N1 G1 X50000 Y60000 Z70000
11
 After G codes are executed, the Y/X curve for the whole movement process is shown
below:

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

G2 (Clockwise Circular/ Helical Interpolation)

 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

circle of the specified plane.


Helical interpolation: The cutter moves in the clockwise direction on the circular arc of the specified
plane, which is circular interpolation and simultaneously moves in the vertical direction of the specified
11 plane at the feed speed given by parameter F, which is linear interpolation.
1

 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

 The coordinate relations on different planes:

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

Terminal Ter min al Te rmi nal


J poi nt K p oint K p oin t

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.

G code Function Path figure


XY plane: When
there is no
variation for the
start point and Z
Terminal point(X,Y,Z)
terminal point
corresponding to
Z axis
G17
coordinates, the Y
Terminal point
motion path is Radius R
Radius R
Center of a circle(I,J) Center of a circle(I,J)
circular
Z=0
Start point Start point
interpolation. Helical interpolation Circular interpolation

Otherwise, it is
helical
interpolation.

11- 3 46
Chapter 11 Motion Control Instructions

G code Function Path figure


XZ plane:
When there is no
variation for the 11
Z
start point and Helical interpolation

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

G19 coordinates, the Center (J,K) Start point


iu s

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

N02 G2 X4000 Y2000 I1000 J-2000 E5000 F5000


 After G codes are executed, the Y/X curve for the whole movement process is shown below:

11
Y Start point
1
3000

2000 End J=-2000

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

2000 End point J = -2000

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

2000End Start point


i Center

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

N02 G2 X200 Y200 Z200 I100 J100 E+10000 E-20000 F1000

 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

The G codes to be executed are:

N00 G0 X0 Y0 Z0

N01 G1 X100 Y100 Z100

N02 G2 I100 J100

N03 G91

N04 G2 I50 J50

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

end point of (100,100,100) and the center is (150,150).

 Example 6:
11
 Helical interpolation with the radius specified by XY plane (Current position: 0)

The G codes to be executed are:

N00 G2 X200 Y200 Z200 R-200

N01 G0 X0 Y0 Z0

N02 G2 X200 Y200 Z200 R200

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

The G codes to be executed are:

N00 G2 X100 Y100 Z100 I50 J50 T2

 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

G3 (Anticlockwise Circular /Helical Interpolation)

 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

 The coordinate relations on different planes:

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

a) XY plane circular arc b) XZ plane circular arc C) YZ plane circular 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 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)

motion is helical Center (I,J)


sR
Center (I,J)
iu R
R ad d i us
interpolation. Ra

Otherwise, it is Start point Start point Z=0


X
Helical interpolation Circular interpolation
circular
interpolation on
XY plane.

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

G19 Terminal point


coordinates, the point(X,Y,Z) Center(J,K) Start point
Terminal point(Y,Z)
motion is helical X=0
interpolation.
X
Otherwise, it is
Y
circular
interpolation on
YZ plane.

 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

N2 G3 X1000 Y3000 I-2000 J-1000

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

N2 G3 X-2000 Y2000 I0 J2000 T3

 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

N1 G3 X100 Y100 Z100 I50 J50 T2


 Instruction explanation:

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.

G17/G18/G19 (Specify Circular Interpolation Plane)

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

 Function: Dwell instruction



11
Format: N_G4 K_

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.

G50 (Precise Stop)

 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

G51 (Round path transition)

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

N_:The row number of G code in NC program


D_:Radius of the arc

 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

G52 (Smooth path transition)

 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

N2 G1 X0.1 Y0.06282151816 N3 G1 X0.2 Y0.1255810391

N4 G1 X0.3 Y0.1882166266 N5 G1 X0.4 Y0.2506664671

N6 G1 X0.5 Y0.3128689301 N7 G1 X0.6 Y0.3747626292

N8 G1 X0.7 Y0.4362864828 N9 G1 X0.8 Y0.4973797743

N10 G1 X0.9 Y0.5579822121 N11 G1 X1 Y0.6180339887

N12 G1 X1.1 Y0.6774758405 N13 G1 X1.2 Y0.7362491054

N14 G1 X1.3 Y0.7942957813 N15 G1 X1.4 Y0.8515585831

N16 G1 X1.5 Y0.9079809995 N17 G1 X1.6 Y0.9635073482

N18 G1 X1.7 Y1.018082832 N19 G1 X1.8 Y1.07165359

N20 G1 X1.9 Y1.124166756 N21 G1 X2 Y1.175570505

N22 G1 X2.1 Y1.225814107 N23 G1 X2.2 Y1.274847979

N24 G1 X2.3 Y1.322623731 N25 G1 X2.4 Y1.369094212

N26 G1 X2.5 Y1.414213562 N27 G1 X2.6 Y1.457937255

N28 G1 X2.7 Y1.500222139 N29 G1 X2.8 Y1.541026486

N30 G1 X2.9 Y1.580310025 N31 G1 X3 Y1.618033989

N32 G1 X3.1 Y1.654161149 N33 G1 X3.2 Y1.688655851

N34 G1 X3.3 Y1.721484054 N35 G1 X3.4 Y1.75261336

N36 G1 X3.5 Y1.782013048 N37 G1 X3.6 Y1.809654105

N38 G1 X3.7 Y1.835509251 N39 G1 X3.8 Y1.859552972

N40 G1 X3.9 Y1.881761538 N41 G1 X4 Y1.902113033

N42 G1 X4.1 Y1.920587371 N43 G1 X4.2 Y1.937166322

N44 G1 X4.3 Y1.951833524 N45 G1 X4.4 Y1.964574501

N46 G1 X4.5 Y1.975376681 N47 G1 X4.6 Y1.984229403

N48 G1 X4.7 Y1.991123929 N49 G1 X4.8 Y1.996053457

N50 G1 X4.9 Y1.999013121 N51 G1 X5 Y2

N52 G1 X5.1 Y1.999013121 N53 G1 X5.2 Y1.996053457

N54 G1 X5.3 Y1.991123929 N55 G1 X5.4 Y1.984229403

11- 3 63
DVP-50MC Series Motion Controller Operation Manual

N56 G1 X5.5 Y1.975376681 N57 G1 X5.6 Y1.964574501

N58 G1 X5.7 Y1.951833524 N59 G1 X5.8 Y1.937166322

11
N60 G1 X5.9 Y1.920587371 N61 G1 X6 Y1.902113033

1 N62 G1 X6.1 Y1.881761538 N63 G1 X6.2 Y1.859552972

N64 G1 X6.3 Y1.835509251 N65 G1 X6.4 Y1.809654105

N66 G1 X6.5 Y1.782013048 N67 G1 X6.6 Y1.75261336

N68 G1 X6.7 Y1.721484054 N69 G1 X6.8 Y1.688655851

N70 G1 X6.9 Y1.654161149 N71 G1 X7 Y1.618033989

N72 G1 X7.1 Y1.580310025 N73 G1 X7.2 Y1.541026486

N74 G1 X7.3 Y1.500222139 N75 G1 X7.4 Y1.457937255

N76 G1 X7.5 Y1.414213562 N77 G1 X7.6 Y1.369094212

N78 G1 X7.7 Y1.322623731 N79 G1 X7.8 Y1.274847979

N80 G1 X7.9 Y1.225814107 N81 G1 X8 Y1.175570505

N82 G1 X8.1 Y1.124166756 N83 G1 X8.2 Y1.07165359

N84 G1 X8.3 Y1.018082832 N85 G1 X8.4 Y0.9635073482

N86 G1 X8.5 Y0.9079809995 N87 G1 X8.6 Y0.8515585831

N88 G1 X8.7 Y0.7942957813 N89 G1 X8.8 Y0.7362491054

N90 G1 X8.9 Y0.6774758405 N91 G1 X9 Y0.6180339887

N92 G1 X9.1 Y0.5579822121 N93 G1 X9.2 Y0.4973797743

N94 G1 X9.3 Y0.4362864828 N95 G1 X9.4 Y0.3747626292

N96 G1 X9.5 Y0.3128689301 N97 G1 X9.6 Y0.2506664671

N98 G1 X9.7 Y0.1882166266 N99 G1 X9.8 Y0.1255810391

N100 G1 X9.9 Y0.06282151816 N101 G1 X10 Y0

0 5 10 X

11- 3 64
Chapter 11 Motion Control Instructions

M Code

 Function: Interacts with general programs.


 Format: N_ M_ D_
11
 Parameter Explanation:

N_:The row number of M code in NC program


M_:The number of M code, range: 0~99
D_:Output parameter, data type: LREAL.
 Instruction Explanation:
1. D_ can be omitted and then no paramter is output after M code is executed.
2. Two methods of using M code: one is to write it outside the row of G code; the other is to write it
in the row of G code.
3. When M code and G code are not in the same row, e.g. N0 M10 D10.02;N1 G1 X100 Y100.
When arriving at the row N0, G code exution will stop. Meanwhile, DMC_ReadMFunction is
used to read the state of M code, MFuntion is TRUE and the value of MFunctionValue is 10.02.
After M code is reset by using DMC_ResetMFunction intruction, G code execution will continue
and then N1 row will be executed.
4. When M code and G code are in the same row and M code can only be placed after G code,
e.g. N0 G1 X100 M10 D10.02. When the execution arrives at N0 row, G1 is executed.
Meanwhile, DMC_ReadMFunction is used to read the state of M code, MFuntion is TRUE and
the value of MFunctionValue is 10.02. The following execution will continue after G1 execution is
finished and reset instruction will no be needed to reset 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

0 100 200 300 X

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

11.6.5 G Code Instructions

DMC_CartesianCoordinate

FB/FC Explanation Applicable model 11


DMC_CartesianCoordinate is used for controlling the DVP50MC11T/DVP50MC11T-06
FB Cartesian-coordinate robotic arm to make the interpolation DVP50MC11P/DVP50MC11P-06
in accordance with G code. DVP50MC11T-16S

DMC_CartesianCoordinat e_ins tance


DMC_CartesianCoordinat e
Ex ecute Done
Paus e Busy
St op Ac tive
VelO verride CommandAb ort ed
Depth Error
NCFile ErrorID
Ax esGroup CurrentLine
Mode
Res

 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 Pause changes


from FALSE to TRUE,
the Cartesian-coordinate TRUE or FALSE
Pause BOOL
robotic arm stops (FALSE)
executing G code
temporarily.

When Stop changes


from FALSE to TRUE,
TRUE or FALSE
Stop the Cartesian-coordinate BOOL
(FALSE)
robotic arm terminates
the executio of G code.

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.

1~64 When Execute


The number of the NC
NCFile UINT (The variable value changes from
file
must be set) FALSE to TRUE.

1~8 When Execute


The number of the axes
AxesGroup USINT (The variable value changes from
group
must be set) FALSE to TRUE.

When Execute
Fill 0 for internal
Mode INT 0 changes from
reservation
FALSE to TRUE.

Res Reserved

 Output Parameters

Parameter name Function Data type Valid range


TRUE when the instruction execution is
Done BOOL TRUE / FALSE
completed.
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
TRUE when the axis is under control of the
Active BOOL TRUE / FALSE
instruction.
TRUE when the instruction execution is
CommandAborted BOOL TRUE / FALSE
aborted.
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.

The number of the row where the G code is


CurrentLine UDINT
being executed currently.

11- 3 68
Chapter 11 Motion Control Instructions

 Output Update Timing

Timing for changing to


Name Timing for changing to FALSE
TRUE

 When Execute changes from TRUE to FALSE after the


11
instruction execution is done.
 When the G code  Done changes to TRUE when the instruction execution
Done
execution is finished. 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


 When Execute changes
Busy  When Error changes to TRUE
to TRUE
 When CommandAbort changes to TRUE

 TRUE when the  When Done changes to TRUE


Active instruction is controlling  When Error changes to TRUE
axes.  When CommandAbort changes to TRUE

 When Execute changes from TRUE to FALSE


 TRUE when the  CommandAborted changes to TRUE when the
instruction execution is instruction execution is aborted by other instruction
CommandAborted
aborted by other after Execute changes from TRUE to FALSE during the
instruction. instruction execution. One period later,
CommandAborted changes to FALSE.

 The input parameters


for the instruction are
Error illegal or an error  When Execute changes from TRUE to FALSE
occurs in the instruction
execution.

11- 3 69
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing Chart

Case 1 Case 2 Case 3 Case 4

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

DMC_CartesianCoordinate instruction is used for controlling the Cartesian-coordinate robotic arm to


make the interpolation in accordance with G code. It is applied to the engraving machine and sewing
machine which regard the Cartesian coordinate robot as mathematical model.
1. Pause is used for temporarily stopping the execution of G code. After Pause is set to TRUE, the
terminal actuator wil reduce its velocity to 0 according to the specified deceleration rate. When
pausing is finished, Pause is set to FALSE. The terminal actuator will speed up at the specified
acceleration rate till the target velocity is reached and the G code interpolation will continue.

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

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

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

Variable name Data type Initial value


Pwr1_BM MC_Buffer_Mode 0

Pwr1_Sta BOOL
11 Pwr1_Bsy BOOL
1
Pwr1_Act BOOL

Pwr1_Err BOOL

Pwr1_ErrID WORD

ATG DMC_AddAxisToGroup

Axes1 USINT 1

ATG_Ex BOOL FALSE

ATG_Done BOOL

ATG_Bsy BOOL

ATG_Err BOOL

ATG_ErrID WORD

ATG1 DMC_AddAxisToGroup

ATG1_Ex BOOL FALSE

ATG1_Done BOOL

ATG1_Bsy BOOL

ATG1_Err BOOL

ATG1_ErrID WORD

SG1 DMC_SetG1Para

SG1_AG USINT 1

SG1_Ex BOOL FALSE

SG1_Vel LREAL 10000

SG1_Acc LREAL 5000

SG1_Dec LREAL 5000

SG1_Jer LREAL 5000

SG1_Done BOOL

SG1_Bsy BOOL

SG1_Err BOOL

SG1_ErrID WORD

CC DMC_CartesianCoordinate

11- 3 72
Chapter 11 Motion Control Instructions

Variable name Data type Initial value


CC_Ex BOOL FALSE

CC_Pa BOOL FALSE

CC_St BOOL FALSE 11


CC_Done BOOL

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 FALSE to TRUE, DMC_CartesianCoordinate instruction is


executed. In the same cycle, CC_Bsy changes from FALSE to TRUE. In the second cycle,
CC_Act changes from FALSE to TRUE, the robot will move according to the path planned via
G code. After G code execution is completed, the output CC_Done changes from FALSE to
TRUE and meanwhile CC_Bsy and CC_Act change from TRUE to FALSE.

 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

FB/FC Explanation Applicable model

DMC_ReadMFunction is used for reading the state of M


DVP50MC11T/DVP50MC11T-06
11
FB DVP50MC11P/DVP50MC11P-06
code and the data from it.
DVP50MC11T-16S

DMC_ReadMFunc tio n_ins tance


DMC_ReadMFunc tion
Ax esGroup Valid
Enable Busy
MFunctionID Error
ErrorI D
MF unction
MFunctionValue

 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

Parameter name Function Data type Valid range


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

Parameter name Function Data type Valid range


code execution.

The value of M code parameter is output here


11 MFunctionValue
when the output MFunction is TRUE.
LREAL

1
 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the instruction reads the


Valid  When Enable changes from TRUE to FALSE.
state of M code.

 When Enable changes to  When Valid changes to TRUE


Busy
TRUE.  When Error changes to TRUE

 When an input parameter is


Error illegal or an error occurs during  When Enable changes from TRUE to FALSE
the instruction execution.

 Output Update Timing Chart

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

1. The variable table and program


11
Variable name Data type Initial value

RMF DMC_ReadMFunction

Axes1 USINT 1

RMF_En BOOL FALSE

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 and DMC_ReadMFunction instruction is


executed, RMF_Va and RMF_Bsy change from FALSE to TRUE in the first cycle. When G code
execution reaches where the set M code is, RMF_MF changes from FALSE to TRUE and
meanwhile RMF_MFV outputs M code parameter value. When RMF_En changes from TRUE to
FALSE, RMF_Va, RMF_Bsy and RMF_MF change from TRUE to FALSE in the same cycle and
the M code parameter value of RMF_MFV is not cleared.

 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

FB/FC Explanation Applicable model

DVP50MC11T/DVP50MC11T-06
11
FB DMC_ResetMFunction instruction resets the state of M code. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-16S

DMC_Res etMFunc tion_instanc e


DMC_Res etMFunc tion
Ax esGroup Done
Ex ecut e Busy
MFunctionID Error
ErrorI D

 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

Parameter name Function Data type Valid range


TRUE when the instruction execution is
Done BOOL TRUE / FALSE
completed.
Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE
TRUE when an error occurs in execution of
Error BOOL TRUE / FALSE
the instruction.
Contains the error code when an error
ErrorID WORD -
occurs. Please refer to section 12.2.

11- 3 79
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When resetting M code is  When Execute changes from TRUE to FALSE


11 Done
finished. after the instruction execution is completed.
1
 When Execute changes to  When Done changes to TRUE
Busy
TRUE.  When Error changes to TRUE

 When an input parameter is


illegal or an error occurs
Error  When Execute changes from TRUE to FALSE
during the instruction
execution.

 Output Update Timing Chart

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

1. The variable table and program


11
Variable name Data type Initial value

RMF DMC_ReadMFunction

Axes1 USINT 1

RMF_En BOOL FALSE

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_Ex BOOL FALSE

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

11 REM_MID MFunctionID Error


ErrorID
REM_Err
REM_ErrID
1
RMF
DMC_ReadMFunct ion 2
Axe s1 AxesGroup Valid RMF_Va
RMF_En Enable Busy RMF_Bsy
RMF_MID MFunctionID Error RMF_Err
ErrorID RMF_ErrI D
MFunction RMF_MF
MFunctionValue RMF_MFV

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

 When RMF_En changes from FALSE to TRUE, DMC_ReadMFunction instruction is executed.


In the same cycle, RMF_Va and RMF_Bsy change from FALSE to TRUE. When G code
execution reaches where the set M code is, RMF_MF changes from FALSE to TRUE and
meanwhile RMF_MFV outputs M code parameter value.

 When REM_Ex changes from FALSE to TRUE, DMC_ResetMFunction instruction is executed.


In the same cycle, REM_Bsy changes from FALSE to TRUE. In the second cycle, REM_Done
changes from FALSE to TRUE. Meanwhile the output RMF_MF of DMC_ReadMFunction
changes from TRUE to FALSE and REM_Bsy changes from TRUE to FALSE. When REM_Ex
changes from TRUE to FALSE, REM_Done changes from TRUE to FALSE in the same cycle.

11- 3 82
Chapter 11 Motion Control Instructions

DMC_SetG0Para

FB/FC Explanation Applicable model

DMC_SetG0Para is used for setting the velocity, acceleration,


DVP50MC11T/DVP50MC11T-06
11
FB DVP50MC11P/DVP50MC11P-06
deceleration and jerk of G0.
DVP50MC11T-16S

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.

Positive number When Execute


Specify the target speed ARRAY [1..8]
Velocity (The variable value changes from
(Unit: unit/second) OF LREAL
must be set) FALSE to TRUE.

Specify the target Positive number When Execute


ARRAY [1..8]
Acceleration acceleration rate. (The variable value changes from
OF LREAL
(Unit: Unit/s2) must be set) FALSE to TRUE.

Specify the target Positive number When Execute


ARRAY [1..8]
Deceleration deceleration rate. (The variable value changes from
OF LREAL
(Unit: Unit/s2) must be set) FALSE to TRUE.

Positive number When Execute


Specify the target jerk. ARRAY [1..8]
Jerk (The variable value changes from
(Unit: Unit/s3) OF LREAL
must be set) FALSE to TRUE.

11- 3 83
DVP-50MC Series Motion Controller Operation Manual

 Output Parameters

Parameter name Function Data type Valid range


TRUE when the instruction execution is
Done BOOL TRUE / FALSE
11 completed.
1 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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the setting is  When Execute changes from TRUE to FALSE after
Done
completed. the instruction execution is completed.

 When Execute changes to  When Done changes to TRUE


Busy
TRUE.  When Error changes to TRUE

 When an input parameter is


illegal or an error occurs
Error  When Execute changes from TRUE to FALSE
during the instruction
execution.

 Output Update Timing Chart

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

1. The variable table and program

Variable name Data type Initial value

SG0 DMC_SetG0Para

Axes1 USINT 1

SG0_Ex BOOL FALSE

SG0_Vel ARRAY[1..8]OF LREAL

SG0_Acc ARRAY[1..8]OF LREAL

SG0_Dec ARRAY[1..8]OF LREAL

SG0_Jer ARRAY[1..8]OF LREAL

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

FB/FC Explanation Applicable model

DMC_SetG1Para instruction sets the default velocity,


DVP50MC11T/DVP50MC11T-06
11
FB DVP50MC11P/DVP50MC11P-06
acceleration, deceleration and jerk for G1/G2/G3.
DVP50MC11T-16S

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

Parameter Valid range


Function Data type Validation timing
name (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
TRUE or FALSE
Execute when Execute changes from BOOL -
(FALSE)
FALSE to TRUE.

Positive number When Execute


Specify the target speed
Velocity LREAL (The variable value changes from
(Unit: unit/second)
must be set) FALSE to TRUE.

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.

Specify the target Positive number When Execute


Deceleration deceleration rate. LREAL (The variable value changes from
(Unit: Unit/s2) must be set) FALSE to TRUE.

Positive number When Execute


Specify the target jerk.
Jerk (The variable value changes from
(Unit: Unit/s3)
LREAL must be set) FALSE to TRUE.

11- 3 87
DVP-50MC Series Motion Controller Operation Manual

 Output Parameters

Parameter name Function Data type Valid range


TRUE when the instruction execution is
Done BOOL TRUE / FALSE
11 completed.
1 Busy
TRUE when the instruction is being
executed.
BOOL TRUE / FALSE

TRUE when an error occurs in execution of


Error BOOL TRUE / FALSE
the instruction.
Contains the error code when an error
ErrorID WORD -
occurs. Please refer to section 12.2.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the setting is  When Execute changes from TRUE to FALSE after the
Done
completed. instruction execution is completed.

 When Execute changes to  When Done changes to TRUE


Busy
TRUE.  When Error changes to TRUE

 When an input parameter is


illegal or an error occurs
Error  When Execute changes from TRUE to FALSE
during the instruction
execution.

 Output Update Timing Chart

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

1. The variable table and program

Variable name Data type Initial value

SG1 DMC_SetG1Para

Axes1 USINT 1

SG1_Ex BOOL FALSE

SG1_Vel LREAL 5000

SG1_Acc LREAL 1000

SG1_Dec LREAL 1000

SG1_Jer LREAL 1000

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

FB/FC Explanation Applicable model

DMC_SetStartPosition instruction sets the start positions of


DVP50MC11T/DVP50MC11T-06
11
FB DVP50MC11P/DVP50MC11P-06
axes of G code.
DVP50MC11T-16S

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.

Positive number, 0, When Execute


Specify the start
X_StartPos LREAL negative number changes from
positionof X axis.
(0) FALSE to TRUE.

Positive number, 0, When Execute


Specify the start
Y_StartPos LREAL negative number changes from
positionof Y axis.
(0) FALSE to TRUE.

Positive number, 0, When Execute


Specify the start
Z_StartPos LREAL negative number changes from
positionof Z axis.
(0) FALSE to 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.

Positive number, 0, When Execute


Specify the start
B_StartPos LREAL negative number changes from
positionof B axis.
(0) FALSE to TRUE.

Positive number, 0, When Execute


Specify the start
C_StartPos LREAL negative number changes from
positionof C axis.
(0) FALSE to TRUE.

Positive number, 0, When Execute


Specify the start
P_StartPos LREAL negative number changes from
positionof P axis.
(0) FALSE to TRUE.

Positive number, 0, When Execute


Specify the start
Q_StartPos LREAL negative number changes from
positionof Q axis.
(0) FALSE to TRUE.

 Output Parameters

Parameter name Function Data type Valid range


TRUE when the instruction execution is
Done BOOL TRUE / FALSE
completed.
TRUE when the instruction is being
Busy BOOL TRUE / FALSE
executed.
TRUE when an error occurs in execution of
Error BOOL TRUE / FALSE
the instruction.
Contains the error code when an error
ErrorID WORD -
occurs. Please refer to section 12.2.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the setting is  When Execute changes from TRUE to FALSE after
Done
completed. the instruction execution is completed.

 When Execute changes to  When Done changes to TRUE


Busy
TRUE.  When Error changes to TRUE

 When an input parameter


is illegal or an error occurs
Error  When Execute changes from TRUE to FALSE.
during the instruction
execution.

11- 3 92
Chapter 11 Motion Control Instructions

 Output Update Timing Chart

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

1. The variable table and program

Variable name Data type Initial value

SSP DMC_SetStartPosition

Axes1 USINT 1

SSP_Ex BOOL FALSE

SSP_X LREAL 1000

SSP_Y LREAL 1000

SSP_Z LREAL 1000

SSP_A LREAL 1000

11- 3 93
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value


SSP_B LREAL 1000

SSP_C LREAL 1000


11
SSP_P LREAL
1 1000

SSP_Q LREAL 1000

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 FALSE to TRUE, DMC_SetStartPosition instruction is executed.


In the same cycle, SSP_Bsy changes from FALSE to TRUE. In the second cycle, SSP_Done
changes from FALSE to TRUE and meanwhile SSP_Bsy changes from TRUE to FALSE. So the
start positions of axes in G codes for the motion is the start positions set by the instruction.

 When SSP_Ex changes from TRUE to FALSE, SSP_Done changes from TRUE to FALSE.

11- 3 94
Chapter 11 Motion Control Instructions

11.7 Axes Group Instructions


11.7.1 DMC_AddAxisToGroup

FB/FC Explanation Applicable model 11


DMC_AddAxisToGroup is used to add an axis to an DVP50MC11T/DVP50MC11T-06
FB axes group. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-16S

D MC_AddA xisToGroup_instance
DMC_AddAxisToGroup
AxesGroup Done
Axis Busy
Execute Error
IdentInGroup ErrorID

 Input Parameters

Parameter Valid range


Function Data type Validation timing
name (Default)

1~8 When Execute


AxesGroup The axes group number USINT (The variable value changes from
must be set) FALSE to TRUE.

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)

The instruction is executed


TRUE or FALSE
Execute when Execute changes BOOL
(FALSE)
from FALSE to TRUE.

1~8 When Execute


The Identity number of an
IdentInGroup USINT (The variable value changes from
axis in the axes group
must be set) FALSE to TRUE.

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

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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When adding the axis to the axes  When Execute changes from TRUE to
Done
group is finished. FALSE

 When Done changes to TRUE


Busy  When Execute changes to TRUE
 When Error changes to TRUE

 When an error occurs in the instruction


 When Execute changes from TRUE to
Error execution or the input parameters for
FALSE
the instruction are illegal.

 Output Update Timing Chart

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

FB/FC Explanation Applicable model


DMC_RemoveAxisFromGroup is used to remove an DVP50MC11T/DVP50MC11T-06
11
1 FB axis from an axes group. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-16S

DMC_RemoveA xisFromG roup_instance


DMC_RemoveA xisFromG roup
AxesGroup Done
Execut e Busy
Id entInGroup Error
ErrorID

 Input Parameters

Valid range
Parameter name Function Data type Validation timing
(Default)

1~8 When Execute


AxesGroup The axes group number USINT (The variable value changes from
must be set) FALSE to TRUE.

The instruction is
executed when Execute TRUE or FALSE
Execute BOOL
changes from FALSE to (FALSE)
TRUE.

The identity number of 1~8 When Execute


IdentlnGroup the axis to be removed INT (The variable value changes from
from the axes group must be set) FALSE to TRUE.

 Output Parameters

Parameter name Function Data type Valid range

TRUE when the instruction execution is


Done BOOL TRUE / FALSE
completed.

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.

11- 3 98
Chapter 11 Motion Control Instructions

Parameter name Function Data type Valid range

Contains the error code when an error occurs.


ErrorID WORD
11
Please refer to section 12.2.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the axis is removed from the  When Execute changes from TRUE to
Done
axes group. FALSE

 When Execute changes from TRUE to


 When the instruction is being FALSE
Busy
executed.  When Done changes to TRUE
 When Error changes to TRUE

 When an error occurs in the


instruction execution or the input  When Execute changes from TRUE to
Error
parameters for the instruction are FALSE
illegal.

 Output Update Timing Chart

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

FB/FC Explanation Applicable model


DMC_UngroupAllAxes is used to remove all axes in an DVP50MC11T/DVP50MC11T-06
11
FB axes group. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-16S

DMC_UngroupAllAx es_ins tance


DMC_UngroupAllAx es
Ax esGroup Done
Ex ecut e Busy
Error
ErrorI D

 Input Parameters

Valid range
Parameter name Function Data type Validation timing
(Default)

1~8 When Execute


The axes group
AxesGroup USINT (The variable value changes from
number
must be set) FALSE to TRUE.

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

TRUE when the instruction execution is


Done BOOL TRUE / FALSE
completed.

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.

11- 4 01
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

11 Done  When the axes group is ungrouped.


 When Execute changes from TRUE to

1 FALSE

 When Execute changes from TRUE to


FALSE
Busy  When the instruction is executed.
 When DONE changes to TRUE
 When Error changes to TRUE

 When an error occurs in the instruction


 When Execute changes from TRUE to
Error execution or the input parameters for
FALSE
the instruction are illegal.

 Output Update Timing Chart

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

FB/FC Explanation Applicable model


DMC_GroupEnable is used to enable an axes group. DVP50MC11T/DVP50MC11T-06
11
FB DVP50MC11P/DVP50MC11P-06
DVP50MC11T-16S

DMC_GroupEnable_instance
DMC_GroupEnable
AxesGroup Status
Enable Busy
MoveDirectVelocity CommandAborted
MoveDirectAcceleration Error
MoveDirectDeceleration ErrorID
MoveDirectJerk

 Input Parameters

Parameter Valid range


Function Data type Validation timing
name (Default)
1~8
(The variable When Enable
AxesGroup The axes group number USINT
value must be changes to TRUE
set)

The instruction is executed


TRUE or FALSE
Enable when Enable changes from BOOL
(FALSE)
FALSE to TRUE.

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

Parameter Valid range


Function Data type Validation timing
name (Default)
Positive number
11 MoveDirectJ The jerks of all axes for quick
ARRAY
(The variable When Enable
1 erk positioning
[1..8] OF
value must be changes to TRUE.
LREAL
set)

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

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.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the specified axes group is


 When the specified axes group has
Status disabled
been enabled.
 When Error changes to TRUE

 When Enable changes from TRUE to


Busy  When the instruction is being executed. FALSE
 When Error changes to TRUE

CommandAbort  When the instruction execution is  When Enable changes from TRUE to
ed aborted. FALSE

11- 4 04
Chapter 11 Motion Control Instructions

Name Timing for changing to TRUE Timing for changing to FALSE

 When an error occurs in the instruction


 When Enable changes from TRUE to
11
Error execution or the input parameters for
FALSE
the instruction are illegal.

 Output Update Timing Chart

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

DMC_GroupEnable is used to enable or disable an axes group.


1. 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. The
MC_Power instruction must be used to enable axes and make them enter the StandStill state.

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

11.7.5 DMC_ GroupStop

FB/FC Explanation Applicable model

DMC_GroupStop is used to stop the motion of the current DVP50MC11T/DVP50MC11T-06 11


FB axes group. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-16S

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)

The instruction is executed


TRUE or FALSE
Execute when Execute changes BOOL
(FALSE)
from FALSE to TRUE.

Deceleration Reserved - - -

Jerk Reserved - - -

Specify the behavior when When Execute


MC_Buffer_
BufferMode executing two instructions. 0: mcAborting changes from
Mode
0: Abort FALSE to TRUE

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

Parameter name Function Data type Valid range

11 Done
TRUE when the instruction execution is
BOOL TRUE/FALSE
1 completed.

Busy TRUE when the instruction is being executed. BOOL TRUE/FALSE

Active TRUE when the axes group is being controlled. BOOL TRUE/FALSE

CommandAborted TRUE when the instruction is aborted. BOOL TRUE/FALSE

Error TRUE when there is an error. BOOL TRUE/FALSE

Contains error codes when an error occurs.


ErrorID Please refer to section 12.2 for the WORD
corresponding error code.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from TRUE


 When the axes group motion to FALSE.
Done
is stopped.  When Error changes from TRUE to
FALSE.

 When Execute changes from TRUE


to FALSE.
 When Execute changes to  When CommandAborted changes
Busy
TRUE from FALSE to TRUE.
 When Error changes from FALSE to
TRUE.

 When Execute changes from TRUE


to FALSE.
 When the instruction is  When CommandAborted changes
Active
controlling the axes group. from FALSE to TRUE.
 When Error changes from FALSE to
TRUE.

 When the instruction  When Execute changes from TRUE


CommandAborted
execution is aborted. to FALSE.

11- 4 08
Chapter 11 Motion Control Instructions

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
Error 11
input parameters for the to FALSE.
instruction are illegal.

 Output Update Timing Chart

Case 1 Case 2 Case 3

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

DMC_GroupStop is used to stop the motion of the current axes group.

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

The example of how to use DMC_GroupStop instruction is described as follows.

1. The variable table and program

Variable name Data type Initial value


M1 BOOL TRUE
DMC_AddAxisToGroup0 DMC_AddAxisToGroup
ADDAXIS_Ex BOOL
ADDAXIS_Done BOOL
ADDAXIS_Bsy BOOL
ADDAXIS_Err BOOL
ADDAXIS_Eid WORD
DMC_AddAxisToGroup1 DMC_AddAxisToGroup
ADDAXIS_Done1 BOOL
ADDAXIS_Bsy1 BOOL
ADDAXIS_Err1 BOOL
ADDAXIS_Eid1 WORD
DMC_GroupEnable0 DMC_GroupEnable
GE_EN BOOL
GE_VEL ARRAY [1..8] OF LREAL [10000,10000]
GE_ACC ARRAY [1..8] OF LREAL [10000,10000]
GE_DEC ARRAY [1..8] OF LREAL [10000,10000]

11- 4 10
Chapter 11 Motion Control Instructions

Variable name Data type Initial value


GE_JERK ARRAY [1..8] OF LREAL [10000,10000]
GE_Status BOOL
GE_Bsy BOOL 11
GE_Abt BOOL
GE_Err BOOL
GE_Eid WORD
DMC_MoveLinearAbsolute0 DMC_MoveLinearAbsolute
LA_Ex BOOL
LA_Pos ARRAY [1..8] OF LREAL [200000,200000]
LA_Done BOOL
LA_Bsy BOOL
LA_Act BOOL
LA_Abt BOOL
LA_Err BOOL
LA_Eid WORD
DMC_GroupStop0 DMC_GroupStop
GS_Ex BOOL
GS_Done BOOL
GE_Bsy BOOL
GE_Act BOOL
GE_Abt BOOL
GS_Err BOOL
GS_Eid WORD

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

2. Motion Curve and Timing Chart:

Velocity
11
20000

DMC_MoveLinear Absolute 0 Time


LA _E x

LA_Done

LA_Bs y

LA_Act

LA_Abt

LA_Er r

DMC_Gr oupS top0

GS _E x

GS_Done

GS_Bs y

G S_Act

 DMC_AddAxisToGroup is executed and then DMC_GroupEnable is executed to enable the axes


group. After the axes group is enabled, DMC_MoveLinearAbsolute is executed.

 DMC_GroupStop is executed during the execution of DMC_MoveLinearAbsolute. At the moment,


the velocity of the axes group becomes 0 rapidly and DMC_MoveLinearAbsolute is aborted. After
the axes group stops running, Done of DMC_GroupStop changes to TRUE.

11- 4 13
DVP-50MC Series Motion Controller Operation Manual

11.7.6 DMC_GroupInterrupt

FB/FC Explanation Applicable model

DMC_GroupInterrupt is used to pause the motion of DVP50MC11T/DVP50MC11T-06


11
1 FB the current axes group for a period of time. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-16S

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)

The instruction is executed


TRUE or FALSE
Execute when Execute changes BOOL
(FALSE)
from FALSE to TRUE.

Deceleration Reserved - - -

Jerk Reserved - - -

Note:
Deceleration and Jerk are reserved and their setting values are invalid.

 Output Parameter

Parameter name Function Data type Valid range

TRUE when the instruction execution is


Done BOOL TRUE / FALSE
completed.

Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE

CommandAborted TRUE when the instruction is aborted. BOOL TRUE / FALSE

11- 4 14
Chapter 11 Motion Control Instructions

Parameter name Function Data type Valid range

Error TRUE when there is an error. BOOL TRUE / FALSE

Contains error codes when an error occurs. 11


ErrorID Please refer to section 12.2 for the WORD
corresponding error code.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When the axes group is paused  When Execute changes from TRUE to
Done
successfully. FALSE.

 When Done changes from FALSE to


TRUE.
 When CommandAborted changes from
Busy  When Execute changes to TRUE.
FALSE to TRUE.
 When Error changes from FALSE to
TRUE.

 When the instruction execution is  When Execute changes from TRUE to


CommandAborted
aborted. FALSE.

 When an error occurs in the


instruction execution or the input  When Execute changes from TRUE to
Error
parameters for the instruction are FALSE.
illegal.

 Output Update Timing Chart

Case 1 Case 2 Case 3

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

The example of using DMC_GroupInterrupt with DMC_GroupContinue together is described as follows.

1. The variable table and program

Variable name Data type Initial value

M1 BOOL TRUE

DMC_AddAxisToGroup0 DMC_AddAxisToGroup

ADDAXIS_Ex BOOL

11- 4 16
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

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_Vel ARRAY [1..8] OF LREAL [10000,10000]

GE_Acc ARRAY [1..8] OF LREAL [10000,10000]

GE_Dec ARRAY [1..8] OF LREAL [10000,10000]

GE_Jerk ARRAY [1..8] OF LREAL [10000,10000]

GE_Status BOOL

GE_Buy BOOL

GE_Abt BOOL

GE_Err BOOL

GE_ErrID WORD

DMC_MoveLinearAbsolute0 DMC_MoveLinearAbsolute

LINABS_Ex BOOL

LINABS_Pos ARRAY [1..8] OF LREAL [200000,200000]

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

Variable name Data type Initial value

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

2. Motion Curve and Timing Chart:

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

 DMC_AddAxisToGroup is executed and then DMC_GroupEnable is executed to enable the axes


group. After the axes group is enabled, DMC_MoveLinearAbsolute is executed.

 DMC_GroupInterrupt is executed during the execution of DMC_MoveLinearAbsolute. After


DMC_GroupInterrupt is executed, the axes group starts to decelerate at the deceleration rate of
DMC_MoveLinearAbsolute instruction. But the DMC_MoveLinearAbsolute instructon is not
aborted.

 DMC_GroupContinue is executed in the process of deceleration of the axes group.


DMC_GroupContinue stops the execution of DMC_GroupInterrupt immediately. Meanwhile the
DMC_MovelinearAbsolute execution continues.

11- 4 20
Chapter 11 Motion Control Instructions

11.7.7 DMC_GroupContinue

FB/FC Explanation Applicable model

DMC_GroupContinue is used to make the paused DVP50MC11T/DVP50MC11T-06


11
FB axes group continue to run. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-16S

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)

The instruction is executed


TRUE or FALSE
Execute when Execute changes BOOL
(FALSE)
from FALSE to TRUE.

 Output Parameter

Parameter name Function Data type Valid range

TRUE when the instruction execution is


Done BOOL TRUE / FALSE
completed.

Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE

CommandAborted TRUE when the instruction is aborted. BOOL TRUE / FALSE

Error TRUE when there is an error. BOOL TRUE / FALSE

Contains error codes when an error occurs.


ErrorID WORD
Please refer to section 12.2 for the

11- 4 21
DVP-50MC Series Motion Controller Operation Manual

Parameter name Function Data type Valid range

corresponding error code.

11  Output Update Timing


1
Name Timing for changing to TRUE Timing for changing to FALSE

 When the axes group continues to  When Execute changes from TRUE to
Done
run. FALSE.

 When Done changes from FALSE to


TRUE.
 When CommandAborted changes from
Busy  When Execute changes to TRUE.
FALSE to TRUE.
 When Error changes from FALSE to
TRUE.

 When the instruction execution is  When Execute changes from TRUE to


CommandAborted
aborted. FALSE.

 When an error occurs in the


instruction execution or the input  When Execute changes from TRUE to
Error
parameters for the instruction are FALSE.
illegal.

 Output Update Timing Chart

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.

1. DMC_GroupContinue can be executed only when the axes group instructions


DMC_MoveDirectAbsolute, DMC_MoveDirectRelative, DMC_MoveLinearAbsolute,
DMC_MoveLinearRelative, DMC_MoveCircularAbsolute and DMC_MoveCircularRelative are
interrupted by DMC_GroupInterrupt.

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

FB/FC Explanation Applicable model


DMC_MoveDirectAbsolute is used to control all axes in DVP50MC11T/DVP50MC11T-06
11
1 FB the axes group to move from current position to end DVP50MC11P/DVP50MC11P-06
position at the specified velocity. DVP50MC11T-16S

DMC_ Mov eDirect Absolute_inst ance


DMC_ Mov eDirect Absolute
Ax esGroup Done
Ex ecut e Busy
Pos ition Ac tive
CoordSys tem CommandAb ort ed
BufferMode Error
Trans it ionMode ErrorID
Trans itionParameter

 Input Parameters

Parameter Valid range


Function Data type Validation timing
name (Default)

1~8
When Execute
(The variable
AxesGroup The axes group number USINT changes from
value must be
FALSE to TRUE.
set)

The instruction is executed when


TRUE or FALSE
Execute Execute changes from FALSE to BOOL
(FALSE)
TRUE.

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

Specify the buffer mode between When Execute


MC_Buffer_
BufferMode two axes group instructions 1: mcBuffered changes from
Mode
1:Buffered FALSE to TRUE.

11- 4 24
Chapter 11 Motion Control Instructions

Parameter Valid range


Function Data type Validation timing
name (Default)

Specify the transition mode


When Execute 11
TransitionM between two axes group MC_Transitio
0: mcTMNone changes from
ode instructions n_Mode
FALSE to TRUE.
0:No transition curve insert

TransitionP When Execute


Set the transition parameter for Positive, 0
arameter LREAL changes from
specific transition mode (0)
FALSE to TRUE.

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.

4. The input TransitionMode of DMC_MoveDirectAbsolute 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_MoveDirectAbsolute instruction is invalid.

 Output Parameters

Parameter name Function Data type Valid range

TRUE when the instruction execution is


Done BOOL TRUE / FALSE
completed.

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

TRUE when an error occurs in execution of the


Error BOOL TRUE / FALSE
instruction.

11- 4 25
DVP-50MC Series Motion Controller Operation Manual

Parameter name Function Data type Valid range

Contains the error code when an error occurs.


ErrorID WORD
11 Please refer to section 12.2.

1  Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from TRUE to


FALSE after the instruction execution is
completed
 Done changes to TRUE when the
Done  When the end position is reached
instruction execution is completed after
Execute changes from TRUE to FALSE
during the instruction execution. One
cycle later, Done changes to FALSE.

 When Done changes to TRUE


 When Error changes to TRUE
Busy  When Execute changes to TRUE
 When CommandAbort changes to
TRUE

 When Done changes to TRUE

 When axes start being controlled by  When Error changes to TRUE


Active
the insruction  When CommandAbort changes to
TRUE

 When the instruction execution is  When Execute changes from TRUE to


CommandAbort
aborted by other motion instruction FALSE

 When an error occurs in the instruction


 When Execute changes from TRUE to
Error execution or the input parameters for
FALSE
the instruction are illegal.

11- 4 26
Chapter 11 Motion Control Instructions

 Output Update Timing Chart

Ca se1 Case 2 Case 3

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.

1. The variable table and program

Variable name Data type Initial value

ADDAXIS1 DMC_AddAxisToGroup

ADDAXIS1_Ex BOOL

ADDAXIS1_Done BOOL

11- 4 27
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

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_Vel ARRAY [1..8] OF LREAL

GE_Acc ARRAY [1..8] OF LREAL

GE_Dec ARRAY [1..8] OF LREAL

GE_Jerk ARRAY [1..8] OF LREAL

GE_Status BOOL

GE_Bsy BOOL

GE_Abt BOOL

GE_Err BOOL

GE_ErrID WORD

DIRABS DMC_MoveDirectAbsolute

DIRABS_Ex BOOL

DIRABS_Pos ARRAY [1..8] OF LREAL

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

2. X axis-Y axis Motion Curve and Timing Chart

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

FB/FC Explanation Applicable model


DMC_MoveDirectRelative is used to control the axes in DVP50MC11T/DVP50MC11T-06
11
FB an axes group to move corresponding distances from DVP50MC11P/DVP50MC11P-06
current positions at specified velocities. DVP50MC11T-16S

DMC_MoveDirec tRelat iv e_instanc e


DMC_MoveDirec tRelat iv e
Ax esGroup Done
Ex ecut e Busy
Distanc e Ac tive
CoordSys tem CommandAb ort ed
BufferMode Error
Trans it ionMode ErrorID
Trans itionParameter

 Input Parameters

Parameter name Function Data type Valid range Parameter name

1~8 When Execute


The axes group
AxesGroup USINT (The variable value changes from
number
must be set) FALSE to TRUE.

The instruction is
executed when TRUE or FALSE
Execute BOOL
Execute changes from (FALSE)
FALSE to TRUE.

Positive number, 0, When Execute


Set the distances that ARRAY [1..8]
Distance negative number changes from
axes move OF LREAL
(0) FALSE to TRUE.

CoordSystem Reserved

Specify the buffer


mode between two When Execute
MC_Buffer_Mo
BufferMode axes group 1: mcBuffered changes from
de
instructions FALSE to TRUE.
1:Buffered

11- 4 31
DVP-50MC Series Motion Controller Operation Manual

Parameter name Function Data type Valid range Parameter name

Specify the transition

11 mode between two


When Execute
1 TransitionMode
axes group MC_Transition
0: mcTMNone changes from
instructions _Mode
FALSE to TRUE.
0:No transition curve
insert

Set the transition When Execute


TransitionParamet Positive number, 0
parameter for specific LREAL changes from
er (0)
transition mode FALSE to TRUE.

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

Parameter name Function Data type Valid range

TRUE when the instruction execution is


Done BOOL TRUE / FALSE
completed.

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

TRUE when an error occurs in execution of the


Error BOOL TRUE / FALSE
instruction.

11- 4 32
Chapter 11 Motion Control Instructions

Parameter name Function Data type Valid range

Contains the error code when an error occurs.


ErrorID WORD
11
Please refer to section 12.2.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from TRUE to FALSE


after the instruction execution is completed
 Done changes to TRUE when the instruction
 When the end positions are
Done execution is completed after Execute changes
reached.
from TRUE to FALSE during the instruction
execution. One cycle later, Done changes to
FALSE.

 When Done changes to TRUE


 When Execute changes to
Busy  When Error changes to TRUE
TRUE
 When CommandAbort changes to TRUE

 When Done changes to TRUE


 When the instruction starts
Active  When Error changes to TRUE
controlling axes.
 When CommandAbort changes to TRUE

 When the instruction execution


CommandAbort is aborted by other motion  When Execute changes from TRUE to FALSE
instruction.

 When an error occurs in the


instruction execution or the
Error  When Execute changes from TRUE to FALSE
input parameters for the
instruction are illegal.

11- 4 33
DVP-50MC Series Motion Controller Operation Manual

 Output Update Timing Chart

11 Ca se1 Case 2 Case 3

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

Variable name Data type Initial value

ADDAXIS1 DMC_AddAxisToGroup

11- 4 34
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

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_Vel ARRAY [1..8] OF LREAL

GE_Acc ARRAY [1..8] OF LREAL

GE_Dec ARRAY [1..8] OF LREAL

GE_Jerk ARRAY [1..8] OF LREAL

GE_Status BOOL

GE_Bsy BOOL

GE_Abt BOOL

GE_Err BOOL

GE_ErrID WORD

DIRREL DMC_MoveDirectRelative

DIRREL_Ex BOOL

DIRREL_Dis ARRAY [1..8] OF LREAL

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

2. X axis-Y axis Motion Curve and Timing Chart

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

FB/FC Explanation Applicable model


DMC_MoveLinearAbsolute controls axes to perform DVP50MC11T/DVP50MC11T-06
11
1 FB the linear interpolation motion. The end positions of DVP50MC11P/DVP50MC11P-06
axes are absolute positions. DVP50MC11T-16S

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)

1~8 When Execute


The axes group
AxesGroup USINT (The variable value changes from
number
must be set) FALSE to TRUE.

The instruction is
executed when TRUE or FALSE
Execute BOOL
Execute changes from (FALSE)
FALSE to TRUE.

ARRAY Negative number, When Execute


Specify end positions
Position [1..8] OF Positive number, 0, changes from
for linear interpolation
LREAL (0) FALSE to TRUE.

Set the maximum When Execute


Positive number
Velocity resultant velocity. LREAL changes from
(0)
(Unit: Unit/second) 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.

Set the maximum When Execute


Positive number
Deceleration resultant deceleration LREAL changes from
(0)
(Unit: Unit/second2) FALSE to TRUE.

Set the maximum When Execute


Positive number
Jerk resultant jerk (Unit: LREAL changes from
(0)
Unit/second3) FALSE to TRUE.

CoordSystem Reserved

Specify the buffer


mode between two
axes group
1: mcBuffered When Execute
instructions MC_Buffer
BufferMode 3: mcBlending- changes from
1: Buffered _Mode
Previous FALSE to TRUE.
3: Blended with the
speed of previous
instruction

Specify the transiton


mode between two
axes group
instructions
0: No transition curve 0: mcTMNone

inserted 2: mcTMCons- When Execute


MC_Transit
TransitionMode 2: Make the transition tantVelocity changes from
ion_Mode
at the set constant 3: mcTMCorner- FALSE to TRUE.
speed Distance
3: Make the transition
based on the
specified corner
distance

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 .

4. For details on BufferMode, refer to section 10.3.

5. The value of the input TransitionParameter of DMC_ MoveLinearAbsolute instruction is invalid unless
mcTMCornerDistance is selected as TransitionMode.

 Output Parameters

Parameter name Function Data type Valid range

TRUE when the instruction execution is


Done BOOL TRUE / FALSE
completed.

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

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.

11- 4 40
Chapter 11 Motion Control Instructions

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from TRUE to 11


FALSE after the instruction execution is
completed
 Done changes to TRUE when the
Done  When the end positions are reached.
instruction execution is completed after
Execute changes from TRUE to FALSE
during the instruction execution. One
cycle later, Done changes to FALSE.

 When Done changes to TRUE


 When Error changes to TRUE
Busy  Whhen Execute changes to TRUE.
 When CommandAbort changes to
TRUE

 When Done changes to TRUE

 When axes start being controlled by  When Error changes to TRUE


Active
the insruction.  When CommandAbort changes to
TRUE

 When the instruction execution is  When Execute changes from TRUE to


CommandAbort
aborted by other motion instruction. FALSE

 When an error occurs in the instruction


 When Execute changes from TRUE to
Error execution or the input parameters for
FALSE
the instruction are illegal.

 Output Update Timing Chart

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

Wait until the previous interpolation instruction execution is


mcBuffered(1) mcTMNone(0)
finished and then execute current instruction immediately.

Smooth transition: Wait till the previous interpolation


instruction execution is completed and then execute
mcBlending- mcTMConstant-
current instruction immediately. The transition velocity is
Previous(3) Velocity(2)
the resultant velocity of the previous instruction. After the
instruction switch, the terminal actuator conducts the

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

Variable name Data type Initial value

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

Variable name Data type Initial value

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_Vel ARRAY [1..8] OF LREAL

GE_Acc ARRAY [1..8] OF LREAL

GE_Dec ARRAY [1..8] OF LREAL

GE_Jerk ARRAY [1..8] OF LREAL

GE_Status BOOL

GE_Bsy BOOL

GE_Abt BOOL

GE_Err BOOL

GE_ErrID WORD

LINABS DMC_MoveLinearAbsolute

LINABS_Ex BOOL

LINABS_Pos ARRAY [1..8] OF LREAL

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

2. See the entire motion process after the instruction is executed.

11 70000

20000

20000 20000

60000
X
50000 Y

3. X axis-Y axis-Z axis Motion Curve and Timing Chart

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.

1. The variable table and program

Variable name Data type Initial value

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_Vel ARRAY [1..8] OF LREAL

GE_Acc ARRAY [1..8] OF LREAL

GE_Dec ARRAY [1..8] OF LREAL

GE_Jerk ARRAY [1..8] OF LREAL

GE_Status BOOL

GE_Bsy BOOL

GE_Abt BOOL

GE_Err BOOL

11- 4 47
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

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_Pos ARRAY [1..8] OF LREAL

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

 Set BufferMode to mcBlendingPrevious and TransitionMode to mcTMConstantVelocity for


LINABS2.

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

1. The variable table and program

Variable name Data type Initial value

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_Vel ARRAY [1..8] OF LREAL

GE_Acc ARRAY [1..8] OF LREAL

GE_Dec ARRAY [1..8] OF LREAL

GE_Jerk ARRAY [1..8] OF LREAL

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

Variable name Data type Initial value

LINABS1_Ex BOOL

LINABS1_Pos ARRAY [1..8] OF LREAL


11
LINABS1_Done BOOL
1
LINABS1_Bsy BOOL

LINABS1_Act BOOL

LINABS1_Abt BOOL

LINABS1_Err BOOL

LINABS1_ErrID WORD

LINABS2 DMC_MoveLinearAbsolute

LINABS2_Pos ARRAY [1..8] OF LREAL

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

 Set BufferMode to mcBlendingPrevious, TransitionMode to mcTMCornerDistance and


TransitionParameter to 10000 for LINABS2.

 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

FB/FC Explanation Applicable model


DMC_MoveLinearRelative controls axes to perform the DVP50MC11T/DVP50MC11T-06
11
1 FB linear interpolation motion. The end positions of axes DVP50MC11P/DVP50MC11P-06
are relative positions. DVP50MC11T-16S

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)

1~8 When Execute


AxesGroup The axes group number USINT (The variable value changes from
must be set) FALSE to TRUE.

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.

Set the maximum When Execute


Positive
Velocity resultant velocity. (Unit: LREAL changes from
(0)
Unit/second) 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.

Set the maximum When Execute


Positive
Deceleration resultant deceleration LREAL changes from
(0)
(Unit: Unit/second2) FALSE to TRUE.

Set the maximum When Execute


Positive
Jerk resultant jerk LREAL changes from
(0)
(Unit: Unit/second3) FALSE to TRUE.

CoordSystem Reserved

Specify the buffer mode


between two axes group
instructions 1: mcBuffered When Execute
MC_Buffer_
BufferMode 1: Buffered 3: mcBlending- changes from
Mode
3: Blended with the Previous FALSE to TRUE.
speed of previous
instruction

Specify the transiton


mode between two axes
group instructions
0: No transition curve
0: mcTMNone
inserted
2:mcTMCons- When Execute
2: Make the transition at MC_Transitio
TransitionMode tantVelocity changes from
the set constant n_Mode
3: mcTMCorner- FALSE to TRUE.
speed
Distance
3: Make the transition
based on the
specified corner
distance

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

Parameter name Function Data type Valid range

TRUE when the instruction execution is


Done BOOL TRUE / FALSE
completed.

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

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.

11- 4 58
Chapter 11 Motion Control Instructions

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Execute changes from TRUE to 11


FALSE after the instruction execution is
completed
 Done changes to TRUE when the
Done  When the end positions are reached.
instruction execution is completed after
Execute changes from TRUE to FALSE
during the instruction execution. One
cycle later, Done changes to FALSE.

 When Done changes to TRUE


 When Error changes to TRUE
Busy  When Execute changes to TRUE.
 When CommandAbort changes to
TRUE

 When Done changes to TRUE

 When axes start being controlled by  When Error changes to TRUE


Active
the insruction.  When CommandAbort changes to
TRUE

 When the instruction execution is  When Execute changes from TRUE to


CommandAbort
aborted by other motion instruction. FALSE

 When an error occurs in the instruction


 When Execute changes from TRUE to
Error execution or the input parameters for
FALSE
the instruction are illegal.

 Output Update Timing Chart

Ca se1 Cas e2 Cas e 3

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.

Square of terminal actuator’s velocity= Sum of squares of velocities of axes


The inputs Acceleration and Deceleration of DMC_MoveLinearRelative are the target acceleration
and target deceleration of the terminal actuator. The acceleration and deceleration of the terminal
actuator and accelerations and decelerations of axes have the following relationship.
Terminal actuator’s acceleration (deceleration)= Sum of squares of acceleration
(deceleration)of axes
2. The Jerk of DMC_MoveLinearRelative 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.

TransitionMode
BufferMode value Description
value

Wait until the previous interpolation instruction execution


mcBuffered(1) mcTMNone(0) is finished and then execute current instruction
immediately.

Smooth transition: Wait till the previous interpolation


mcBlending- mcTMConstant- instruction execution is completed and then execute
Previous(3) Velocity(2) current instruction immediately. The transition velocity is
the resultant velocity of the previous instruction. After the

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.

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 arc 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_MoveLinearRelative instruction is executed is as follows.
1. The variable table and program

Variable name Data type Initial value

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

Variable name Data type Initial value

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_Vel ARRAY [1..8] OF LREAL

GE_Acc ARRAY [1..8] OF LREAL

GE_Dec ARRAY [1..8] OF LREAL

GE_Jerk ARRAY [1..8] OF LREAL

GE_Status BOOL

GE_Bsy BOOL

GE_Abt BOOL

GE_Err BOOL

GE_ErrID WORD

LINREL DMC_MoveLinearRelative

LINREL_Ex BOOL

LINREL_Dis ARRAY [1..8] OF LREAL

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

2. See the entire motion process after the instruction is executed.

11 Z

1 70000

20000

20000 20000

60000
X 50000
Y

3. X axis-Y axis-Z axis Motion Curve and Timing Chart

Pos ition

Z
70000
Y
60000
X
50000

20000

0
D MC_Mov eLinearRelative0 T

LINREL_Exe

LINR EL_D one

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.

1. The variable table and program

Variable name Data type Initial value

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_Vel ARRAY [1..8] OF LREAL

GE_Acc ARRAY [1..8] OF LREAL

GE_Dec ARRAY [1..8] OF LREAL

GE_Jerk ARRAY [1..8] OF LREAL

GE_Status BOOL

GE_Bsy BOOL

GE_Abt BOOL

GE_Err BOOL

11- 4 65
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

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_Dis ARRAY [1..8] OF LREAL

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

2. Motion Curve and Timing Chart of the terminal actuator

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

 Set BufferMode to mcBlendingPrevious and TransitionMode to mcTMConstantVelocityand for


LINREL2.

 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

Variable name Data type Initial value

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_Vel ARRAY [1..8] OF LREAL

GE_Acc ARRAY [1..8] OF LREAL

GE_Dec ARRAY [1..8] OF LREAL

GE_Jerk ARRAY [1..8] OF LREAL

GE_Status BOOL

GE_Bsy BOOL

GE_Abt BOOL

GE_Err BOOL

GE_ErrID WORD

LINREL1 DMC_MoveLinearRelative

LINREL1_Ex BOOL

LINREL1_Dis ARRAY [1..8] OF LREAL

LINREL1_Done BOOL

LINREL1_Bsy BOOL

11- 4 69
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

LINREL1_Act BOOL

LINREL1_Abt BOOL
11
LINREL1_Err BOOL
1
LINREL1_ErrID WORD

LINREL2 DMC_MoveLinearRelative

LINREL2_Dis ARRAY [1..8] OF LREAL

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

2. Motion Curve and Timing Chart of the terminal actuator

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

 Set BufferMode to mcBlendingPrevious, TransitionMode to mcTMCornerDistance and


TransitionParameter to 10000 for LINREL2.

 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

FB/FC Explanation Applicable model


DMC_MoveCircularAbsolute controls axes to perform DVP50MC11T/DVP50MC11T-06
11
1 FB the circular interpolation. The end positions of axes are DVP50MC11P/DVP50MC11P-06
absolute positions. DVP50MC11T-16S

DMC_MoveCirc ula rAbs olute_instanc e


DMC_MoveCirc ularAbs olute
Ax esGroup Done
Ex ecut e Busy
Circ Mode Ac tive
Aux Point CommandAb ort ed
EndPoint Error
MultiTurn ErrorID
PathChoice
Velocity
Ac celeration
Deceleration
J erk
CoordSys tem
Buff erMode
Trans itionMode
TransitionParamet er

 Input Parameters

Parameter Valid range


Function Data type Validation timing
name (Default)

1~8 When Execute


AxesGroup The axes group number USINT (The variable value must changes from
be set) FALSE to TRUE.

The instruction is executed


TRUE or FALSE
Execute when Execute changes BOOL
(FALSE)
from FALSE to TRUE.

Set the mode of circular


When Execute
CircMode interpolation 0~5
INT changes from
0: Draw an arc via a center (0)
FALSE to TRUE.
on XY plane.

11- 4 74
Chapter 11 Motion Control Instructions

Parameter Valid range


Function Data type Validation timing
name (Default)

1: Draw an arc via a center


11
on ZX plane.
2: Draw an arc via a center
on YZ plane.
3: Draw an arc via the
radius on XY plane.
4: Draw an arc via the
radius on ZX plane.
5: Draw an arc via the
radius on YZ plane.

It is the coordinates for the


center when an arc is
drawn via a center. ARRAY Positive number, 0, When Execute
Aux Point Auxpoint[1] means the [1..2] OF negative number changes from
radius and AuxPoint[2] is LREAL (0) FALSE to TRUE.
meaningless when an arc is
drawn via a radius.

Positions on coordinate ARRAY Positive number, 0, When Execute


EndPoint axes for the end point of an [1..8] OF negative number changes from
arc LREAL (0) FALSE to TRUE.

When Execute
Set the number of turns for Positive number, 0
MultiTurn UINT changes from
helical interpolation (0)
FALSE to TRUE.

The direction for circular


When Execute
interpolation 0、1
PathChoice INT changes from
0: Clockwise (0)
FALSE to TRUE.
1: Counterclockwise

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

Parameter Valid range


Function Data type Validation timing
name (Default)

11 Set the maximum


Positive number
When Execute

1 Acceleration acceleration LREAL


(0)
changes from
(Unit: Unit/second2) FALSE to TRUE.

Set the maximum When Execute


Positive number
Deceleration deceleration LREAL changes from
(0)
(Unit: 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

Specify the buffer mode


between two axes group
When Execute
instructions. MC_Buffe 1: mcBuffered
BufferMode changes from
1: Buffered r_Mode 3: mcBlendingPrevious
FALSE to TRUE.
3: Blending with the speed
of previous instruction

Specify the transiton mode


between two axes group
instructions
MC_Tran When Execute
TransitionMo 0: No transition curve 0: mcTMNone
sition_Mo changes from
de inserted 3: mcTMCornerDistance
de FALSE to TRUE.
3: Make the transition
based on the specified
corner distance

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

Parameter name Function Data type Valid range

TRUE when the instruction execution is


Done BOOL TRUE / FALSE
completed.

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

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.

 Output Update Timing

Timing for changing to


Name Timing for changing to FALSE
TRUE

 When Execute changes from TRUE to FALSE after the


instruction execution is completed
 When the end positions  Done changes to TRUE when the instruction execution
Done
are reached. is completed after Execute changes from TRUE to
FALSE during the instruction execution. One cycle
later, Done changes to FALSE.

11- 4 77
DVP-50MC Series Motion Controller Operation Manual

Timing for changing to


Name Timing for changing to FALSE
TRUE

 When Done changes to TRUE


11  When Execute changes
1 Busy
to TRUE.
 When Error changes to TRUE
 When CommandAbort changes to TRUE

 When axes start being  When Done changes to TRUE


Active controlled by the  When Error changes to TRUE
insruction.  When CommandAbort changes to TRUE

 When the instruction


execution is aborted by
CommandAbort  When Execute changes from TRUE to FALSE
other motion
instruction.

 When an error occurs


in the instruction
Error execution or the input  When Execute changes from TRUE to FALSE
parameters for the
instruction are illegal.

 Output Update Timing Chart

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

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

He lic al Cen ter (I, J)


in terpolat ion
X St art ( X1,Y 1,Z1 )
point

In the figure above, coordinates for the center: I=X1+AuxPoint[1],J=Y1+AuxPoint[2],


Coordinates for the end point: X=EndPoint[1], Y=EndPoint[2], Z=EndPoint[3]

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

In the figure above, coordinates for the center: I=X1+AuxPoint[1],


K=Z1+AuxPoint[2],
Coordinates for the end point: X=EndPoint[1], Y=EndPoint[2], Z=EndPoint[3]

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

E nd point Cent er (J, K)


St art po in t
2 ( X,Y, Z) ( X1, Y1,Z1 )

In the figure above, coordinates for the center: J=Y1+AuxPoint[1],


K=Z1+AuxPoint[2]
Coordinates for the end point: X=EndPoint[1], Y=EndPoint[2], Z=EndPoint[3]

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.

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

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)

In the figure above, Radius: R=AuxPoint[1],


Coordinates for end point: X=EndPoint[1], Y=EndPoint[2], Z=EndPoint[3]

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

Helic al End po in t ( X,Y, Z)


s:

int erpolation
d iu
Ra

4 S tart point
( X1, Y1, Z1 )
Y

In the figure above, Radius: R=AuxPoint[1],


Coordinates for end point: X=EndPoint[1],Y=EndPoint[2],Z=EndPoint[3]

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

In the figure above, Radius: R=AuxPoint[1]


Coordinates for end point: X=EndPoint[1], Y=EndPoint[2], Z=EndPoint[3].

 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

Clock wise motion

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

Cou nterc lock wise mo tion

 BufferMode
Specify the buffer mode between current instruction and previous interpolation instruction. See the
details as follows.

BufferMode value Description


Current instruction will wait and not be executed till the
mcBuffered(1)
previous interpolation instruction execution is finished.
The transition between current instruction and previous
mcBlendingPrevious interpolation instruction is conducted in the mode specified
by TransitionMode. The BufferMode of
(3)
DMC_MoveCircularRelative can select this mode only
when current instruction is a linear interpolation instruction.

 Programming Example
The example of executing one DMC_MoveCircularAbsolute instruction is shown as follows.
1. The variable table and program

Variable name Data type Initial value

ADDAXIS1 DMC_AddAxisToGroup

ADDAXIS1_Ex BOOL

ADDAXIS1_Done BOOL

ADDAXIS1_Bsy BOOL

ADDAXIS1_Err BOOL

ADDAXIS1_ ErrID WORD

11- 4 83
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

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_Vel ARRAY [1..8] OF LREAL

GE_Acc ARRAY [1..8] OF LREAL

GE_Dec ARRAY [1..8] OF LREAL

GE_Jerk ARRAY [1..8] OF LREAL

GE_Status BOOL

GE_Bsy BOOL

GE_Abt BOOL

GE_Err BOOL

GE_ ErrID WORD

CIRABS DMC_MoveCircularAbsolute

CIRABS_Ex BOOL

CIRABS_Mode INT 0

CIRABS_Auxp ARRAY [1..2] OF LREAL

CIRABS_Endp ARRAY [1..8] OF LREAL

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

2. Motion Curve in the X-Y Coordinate System and Timing Chart

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

CIR ABS Err

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

 After DMC_MoveCircularAbsolute instruction is executed, the clockwise circular interpolation is


conducted by starting from point B and regarding point A as the center. The instruction execution is
finished when point C is reached.

11- 4 86
Chapter 11 Motion Control Instructions

11.7.13 DMC_MoveCircularRelative

FB/FC Explanation Applicable model


DMC_MoveCircularRelative controls axes to perform DVP50MC11T/DVP50MC11T-06
11
FB the circular interpolation. The end positions of axes are DVP50MC11P/DVP50MC11P-06
relative positions. DVP50MC11T-16S

DMC_Mov eCircularRelative_ins tance


DMC_Mov eCircularRelative
Ax esGroup Done
Ex ecut e Busy
Circ Mode Ac tive
Aux Point CommandAb ort ed
EndPoint Error
MultiTurn ErrorID
PathChoice
Velocity
Ac celeration
Deceleration
J erk
CoordSys tem
Buff erMode
Trans itionMode
TransitionParamet er

 Input Parameters

Parameter Valid range


Function Data type Validation timing
name (Default)

1~8 When Execute


The axes group
AxesGroup USINT (The variable value must changes from
number
be set) FALSE to TRUE.

The instruction is
executed when TRUE or FALSE
Execute BOOL
Execute changes from (FALSE)
FALSE to TRUE.

Set the mode of


circular interpolation. When Execute
0~5
CircMode 0: Draw an arc via a INT changes from
(0)
center on XY plane. FALSE to TRUE.

1: Draw an arc via a

11- 4 87
DVP-50MC Series Motion Controller Operation Manual

Parameter Valid range


Function Data type Validation timing
name (Default)

11 center on ZX plane.

1 2: Draw an arc via a


center on YZ plane.
3: Draw an arc via the
radius on XY plane.
4: Draw an arc via the
radius on ZX plane.
5: Draw an arc via the
radius on YZ plane.

It is the coordinates for


the center when an arc
is drawn via a center.
Positive number, 0, When Execute
Auxpoint[1] means the ARRAY [1..2]
AuxPoint negative number changes from
radius and AuxPoint[2] OF LREAL
(0) FALSE to TRUE.
is meaningless when
an arc is drawn via a
radius.

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

Set the number of When Execute


Positive number, 0
MultiTurn turns for helical UINT changes from
(0)
interpolation FALSE to TRUE.

The direction for


When Execute
circular interpolation 0, 1
PathChoice INT changes from
0: Clockwise (0)
FALSE to TRUE.
1: Counterclockwise

Set the maximum When Execute


Positive number
Velocity velocity LREAL changes from
(0)
(Unit: unit/second) FALSE to TRUE.

11- 4 88
Chapter 11 Motion Control Instructions

Parameter Valid range


Function Data type Validation timing
name (Default)

When Execute
Set the maximum
Positive number 11
Acceleration acceleration (Unit: LREAL changes from
(0)
Unit/second2) FALSE to TRUE.

Set the maximum When Execute


Positive number
Deceleration deceleration (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

Specify the buffer


mode between two
axes group
When Execute
instructions. MC_Buffer_Mo 1: mcBuffered
BufferMode changes from
1: Buffered de 3: mcBlendingPrevious
FALSE to TRUE.
3: Blending with the
speed of previous
instruction

Specify the transiton


mode between two
axes group
instructions
When Execute
TransitionMo 0: No transition curve MC_Transition 0: mcTMNone
changes from
de inserted _Mode 3: mcTMCornerDistance
FALSE to TRUE.
3: Make the transition
based on the
specified corner
distance

Set the transition When Execute


TransitionPar Positive number, 0
parameter for specific LREAL changes from
ameter (0)
transition mode FALSE to TRUE.

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

Parameter name Function Data type Valid range

TRUE when the instruction execution is


Done BOOL TRUE / FALSE
completed.

Busy TRUE when the instruction is being executed. BOOL TRUE / FALSE

TRUE when the instruction is controlling the axes


Active BOOL TRUE / FALSE
group.

CommandAborted TRUE when the instruction execution 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.


ErrorID WORD
Please refer to section 12.2.

 Output Update Timing

Timing for changing to


Name Timing for changing to FALSE
TRUE

 When Execute changes from TRUE to FALSE after the


 When the end instruction execution is completed
Done
positions are reached.  Done changes to TRUE when the instruction execution
is completed after Execute changes from TRUE to

11- 4 90
Chapter 11 Motion Control Instructions

Timing for changing to


Name Timing for changing to FALSE
TRUE

11
FALSE during the instruction execution. One cycle later,
Done changes to FALSE.

 When Done changes to TRUE


 When Execute
Busy  When Error changes to TRUE
changes to TRUE.
 When CommandAbort changes to TRUE

 When axes start  When Done changes to TRUE


Active being controlled by  When Error changes to TRUE
the insruction.  When CommandAbort changes to TRUE

 When the instruction


execution is aborted
CommandAbort  When Execute changes from TRUE to FALSE
by other motion
instruction.

 When an error occurs


in the instruction
Error execution or the input  When Execute changes from TRUE to FALSE
parameters for the
instruction are illegal.

 Output Update Timing Chart

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

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

Y
0

He lic al Cen ter (I, J)


in terpolat ion
X St art ( X1,Y 1,Z1 )
point

In the figure above,


Coordinates for the center: I=X1+AuxPoint[1], J=Y1+AuxPoint[2],
Coordinates for the end point:

X=X1+EndPoint[1], Y=Y1+EndPoint[2],Z=Z1+EndPoint[3].

Draw an arc via the center on ZX plane. AuxPoint[1] is the offset


1 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 Z-aixs.

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

Coordinates for the center: I=X1+AuxPoint[1],K=Z1+AuxPoint[2]。

Coordinates for the end point:


X=X1+EndPoint[1], Y=Y1+EndPoint[2], Z=Z1+EndPoint[3].
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

E nd point Cent er (J, K) St art po in t


( X,Y, Z) ( X1, Y1,Z1 )

Coordinates for the center: J=Y1+AuxPoint[1],K=Z1+AuxPoint[2]。

Coordinates for the end point:

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)

In the figure above, Radius: R=AuxPoint[1],


Coordinates for end point: X=X1+EndPoint[1], Y=Y1+EndPoint[2],
Z=Z1+EndPoint[3].
Draw an arc via the radius on ZX plane. The value of AuxPoint[1] is
4 the radius of the circle on ZX plane and here the value of AuxPoint[2]
is meaningless.

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

In the figure above, Radius: R=AuxPoint[1]。

Coordinates for end point: X=X1+EndPoint[1],Y=Y1+EndPoint[2],

Z=Z1+EndPoint[3]。

Draw an arc via the radius on ZY plane. The value of AuxPoint[1] is


the radius of the circle on ZY plane and here the value of AuxPoint[2]
is meaningless.

Z
Helical interp olation
Ra d

En d point St art po int


( X, Y,Z ) ( X1, Y1,Z1 )
iu s

5
R :

In the figure above, Radius: R=AuxPoint[1]


Coordinates for end point: X=X1+EndPoint[1], Y=Y1+EndPoint[2],
Z=Z1+EndPoint[3]

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

Cloc k wis e mot io n

The axes group conducts circular interpolation in the anticlockwise


direction on the arcs of the specified plane. Take the radius method
for example, the path for the circular motion is shown as below.

En d point
1 R+ R-

Start point

Cou nterc lock wise mo tion

 BufferMode
Specify the buffer mode between current instruction and previous interpolation instruction. See the
details as follows.

BufferMode Value Description


Current instruction will wait and not be executed till the
mcBuffered(1)
previous interpolation instruction execution is finished.
The transition between current instruction and previous
mcBlendingPrevious interpolation instruction is conducted in the mode
specified by TransitionMode. The BufferMode of

11- 4 96
Chapter 11 Motion Control Instructions

BufferMode Value Description


DMC_MoveCircularRelative can select this mode only
(3)
when current instruction is a linear interpolation
instruction. 11

 Programming Example
The example of executing one DMC_MoveCircularRelative instruction is shown as follows.
1. The variable table and program

Variable name Data type Initial value

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

ADDAXIS2_ ErrID WORD

DMC_GroupEnable0 DMC_GroupEnable

GE_En BOOL

GE_Vel ARRAY [1..8] OF LREAL

GE_Acc ARRAY [1..8] OF LREAL

GE_Dec ARRAY [1..8] OF LREAL

GE_Jerk ARRAY [1..8] OF LREAL

GE_Status BOOL

GE_Bsy BOOL

GE_Abt BOOL

GE_Err BOOL

11- 4 97
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

GE_ErrID WORD

CIRREL DMC_MoveCircularRelative
11
CIRREL_Ex BOOL
1
CIRREL_Mode INT 0

CIRREL_Auxp ARRAY [1..2] OF LREAL

CIRREL_Endp ARRAY [1..8] OF LREAL

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

2. Motion Curve in the X-Y coordinate system and Timing Chart

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

CIR REL_ Bsy

CIRR EL_Act

CIR REL_ Ab t

CIR REL Err

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

 After DMC_MoveCircularRelative instruction is executed, the clockwise circular interpolation is


conducted by starting from point B and regarding point A as the center. The instruction execution is
finished when point C is reached.

11- 5 00
Chapter 11 Motion Control Instructions

11.7.14 DMC_GroupSetOverride

FB/FC Explanation Applicable model


DMC_GroupSetOverride instruction is used to set the DVP50MC11T/DVP50MC11T-06
11
FB value of override for the coordinated motion of an axes DVP50MC11P/DVP50MC11P-06
group. DVP50MC11T-16S

DMC_ GroupS etO verride_ins ta nce


DMC_GroupSetO verride
Ax esGroup Enabled
Enable Busy
VelFac tor Error
Ac cFactor ErrorI D
J erkFactor

 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


TRUE or FALSE
Enable when Enable changes from BOOL
(FALSE)
FALSE to TRUE.

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.

Contains the error code when an error occurs. Please


ErrorID WORD
refer to section 12.2.

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Enable changes to FALSE


Enabled  When the instruction starts being executed.
 When Error changes to TRUE

 When Enable changes to FALSE


Busy  When Enable changes to TRUE
 When Error changes to TRUE

 When an error occurs in the instruction


 When Enable changes from TRUE to
Error execution or the input parameters for the
FALSE
instruction are illegal.

 Output Update Timing Chart

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.

1. The target velocities of these instructions can be changed including DMC_MoveDirectAbsolute,


DMC_MoveDirectRelative, DMC_MoveLinearAbsolute, DMC_MoveLinearRelative, 11
DMC_MoveCircularAbsolute and DMC_MoveCircularRelative.

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

Variable name Data type Initial value


M1 BOOL

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_Pos ARRAY [1..8] OF LREAL

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

2. Motion Curve and Timing Chart

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

FB/FC Explanation Applicable model


DMC_GroupReadActualPosition instruction can be used DVP50MC11T/DVP50MC11T-06
11
FB to read the position of axes in the axes group. DVP50MC11P/DVP50MC11P-06
DVP50MC11T-16S

DMC_GroupReadA ctualPos ition_inst ance


DMC_GroupReadA ctualPos ition
Axes Group Valid
Enable Busy
CoordSys tem Error
ErrorID
Position

 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

TRUE when an error occurs in execution of the


Error BOOL TRUE / FALSE
instruction.

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

 Output Update Timing

Name Timing for changing to TRUE Timing for changing to FALSE

 When Enable changes from TRUE to


 When the instruction reads the
Valid FALSE
positions of axes in the axes group
 When Error changes to TRUE

 When Enable changes from TRUE to


Busy  When the instruction is executed FALSE
 When Error changes to TRUE

 When an error occurs in the instruction


 When Enable changes from TRUE to
Error execution or the input parameters for
FALSE
the instruction are illegal.

 Output Update Timing Chart

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

11.8 Coordination Instructions


11.8.1 DMC_ControlAxisByPos

11 FB/FC Explanation Applicable model


1 DVP50MC11T/DVP50MC11T-06
DMC_ControlAxisByPos controls the motion of an axis
FB DVP50MC11P/DVP50MC11P-06
by sending an incremental position to the axis.
DVP50MC11T-16S

DM C_CAB yPos_ins tanc e

DMC_Con trolAxisByPos
Axis InControl

Exe cute Busy

Conti nousUp date Active

Position CommandAb orted

Velocity Erro r

Acceleration ErrorID

Decel eratio n
Jerk

 Input Parameters

Valid range Validation


Parameter name Function Data type
(Default) timing

Refer to "Axis No.


Ranges that
When Execute
Specify the number of the Controllers changes from
Axis axis which is to be USINT
Correspond to". FALSE to
controlled.
TRUE
(The variable value
must be set)
The instruction is executed
TRUE or FALSE
Execute when Execute changes BOOL -
(FALSE)
from FALSE to TRUE.
ContinuousUpdate Reserved - - -
Positive number,
When Execute
Specify the incremental Negative number changes from
Position LREAL
position. and 0 FALSE to
TRUE
(0)
Positive number
Velocity Specify the target speed LREAL (The variable
value must be set)

11- 5 10
Chapter 11 Motion Control Instructions

Valid range Validation


Parameter name Function Data type
(Default) timing

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.

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 when an error occurs in the instruction


Error BOOL TRUE/FALSE
execution.
Contains error codes when an error occurs.
ErrorID Please refer to the section 12.2 for corresponding WORD
error codes.

 Output Update Timing


Parameter Name Timing for changing to TRUE Timing for changing to FALSE
 When the axis is controlled  When Execute changes from TRUE to
InControl
by the instruction. FALSE.
 When CommandAborted changes to
 When Execute changes to
Busy TRUE.
TRUE.
 When Error changes to TRUE.
 When CommandAborted changes to
 When the instruction starts to
Active TRUE.
control the axis.
 When Error changes to TRUE.

 When this instruction is


 When Execute changes from TRUE to
CommandAborted aborted in process of being
FALSE.
executed.

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

1. DMC_ControlAxisByPos instruction is executed by changing Execute from FALSE to TRUE.


Changing Execute of the instruction from TRUE to FALSE during the instruction execution does not
affect the instruction execution.

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

The programming example is as follows when one DMC_ControlAxisByPos instruction is used.


Variable name Data type Initial value
Pwr MC_Power

Axis1 USINT 1

Pwr_Sta BOOL FALSE

Pwr_Bsy BOOL FALSE

Pwr_Act BOOL FALSE

Pwr_Err BOOL FALSE

Pwr_ErrID WORD 0

CAByPos DMC_ControlAxisByPos

CAByPos_Ex BOOL FALSE

CAByPos_Ex_Pos LREAL

CAByPos_Ex_Vel LREAL 1

CAByPos_Ex_Acc LREAL 1

CAByPos_Ex_Dec LREAL 1

CAByPos_Ex_Jerk LREAL 1

CAByPos_InC BOOL FALSE

CAByPos_Bsy BOOL FALSE

CAByPos_Act BOOL FALSE

CAByPos_Abt BOOL FALSE

CAByPos_Err BOOL FALSE

11- 5 13
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value


CAByPos_ErrID WORD 0

11
1 Pwr

M C_Power
Axis 1 Ax is Status Pwr_Sta
T RUE Enable Busy Pwr_Bsy

T RUE Enabl ePositive Active Pwr_Act

T RU E EnableNegative E rror Pwr_E rr


0 B ufferMode Err orID Pwr_Err ID

C AByPos

DMC_Co ntrolAxi sByPo s


Axi s 1 Axis InCo ntrol CAByPo s_InC

CAByPo s_Ex Execute Busy CAByPo s_Bsy

Con ti nousUpdate Active CAByPo s_Act

N C_ Px Position CommandAborted CAByPo s_Abt

C AByPos_Ex_Ve l Velo city Error CAByPo s_Err


C AByPos_Ex_Acc Accele ration ErrorID CAByPo s_ErrID
CAByPos_Ex_D ec Dece lera ti on
CAByPos_Ex_Jerk Jerk

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

FB/FC Explanation Applicable model

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

Valid range Validation


Parameter name Function Data type
(Default) timing

The instruction is executed TRUE or FALSE


Execute when Execute changes from BOOL -
(FALSE)
FALSE to TRUE.
Parsing the CNC file by
DMC_NC is stopped TRUE or FALSE
Pause temporarily when Pause BOOL - -
(FALSE)-
changes from FALSE to
TRUE.
Parsing the CNC file by
DMC_NC is aborted when TRUE or FALSE
Stop BOOL
Stop changes from FALSE to (FALSE)

TRUE.
VelOverride Velocity override,Unit: %, LREAL Negative, 0-500 When Execute

11- 5 15
DVP-50MC Series Motion Controller Operation Manual

Valid range Validation


Parameter name Function Data type
(Default) timing

11 e.g. “100” means 100% (0) is TRUE

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

Busy TRUE when the instruction is being executed. BOOL TRUE/FALSE

TRUE when the instruction is parsing the CNC


Active BOOL TRUE/FALSE
file.
TRUE when an error occurs in the instruction
Error BOOL TRUE/FALSE
execution.
Contains the error code when an error occurs.
ErrorID WORD
Please refer to section 12.2.

Bypass Reserved BOOL

The number of the row where the G code is


CurrentLine UDINT
being executed currently.

Pos_X The X-axis position which is parsed out LREAL

Pos_Y The Y-axis position which is parsed out LREAL

Pos_Z The Z-axis position which is parsed out LREAL

Pos_A The A-axis position which is parsed out LREAL

Pos_B The Baxis position which is parsed out LREAL

Pos_C The C-axis position which is parsed out LREAL

11- 5 16
Chapter 11 Motion Control Instructions

Data
Parameter name Function Valid range
type

Pos_P The P-axis position which is parsed out LREAL


11
Pos_Q The Q-axis position which is parsed out LREAL

 Output Update Timing


Parameter Name Timing for changing to TRUE Timing for changing to FALSE
 When parsing the CNC file is
over.  When Execute changes from TRUE to
Done
 The Stop input changes to FALSE.
TRUE.
 When Execute changes to  When Error changes to TRUE.
Busy
TRUE.  When Done changes to TRUE.
 When the instruction starts  When Error changes to TRUE.
Active
parsing the CNC file.  When Done changes to TRUE.
 When an error occurs in the
instruction execution or the  When Execute changes from TRUE to
Error
input parameters for the FALSE.
instruction are illegal.

 Output Update Timing Chart

Case 1 Case 2 Case 3 Case 4

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

CNC file execution result:


After G91 is executed, the end position of each axis in the G codes below G91 is calculated by the
incremental value starting from the current position. After G0 is executed, X axis moves 40000 units
from the current position (10000) to the end position (50000). Y axis moves 90000 units from current
position (10000) to end position (100000)

Variable name Data type Initial value

CAByPos DMC_ControlAxisByPos

Axis1 USINT 1

CAByPos_Ex BOOL FALSE

CAByPos_Ex_Vel LREAL 1

CAByPos_Ex_Acc LREAL 1

CAByPos_Ex_Dec LREAL 1

CAByPos_Ex_Jerk LREAL 1

CAByPos_InC BOOL FALSE

CAByPos_Bsy BOOL FALSE

CAByPos_Act BOOL FALSE

11- 5 19
DVP-50MC Series Motion Controller Operation Manual

Variable name Data type Initial value

CAByPos_Abt BOOL FALSE


11 CAByPos_Err BOOL FALSE
1 CAByPos_ErrID WORD 0

CAByPos1 DMC_ControlAxisByPos

Axis2 USINT 2

CAByPos1_Ex BOOL FALSE

CAByPos1_Ex_Vel LREAL 1

CAByPos1_Ex_Acc LREAL 1

CAByPos1_Ex_Dec LREAL 1

CAByPos1_Ex_Jerk LREAL 1

CAByPos1_InC BOOL FALSE

CAByPos1_Bsy BOOL FALSE

CAByPos1_Act BOOL FALSE

CAByPos1_Abt BOOL FALSE

CAByPos1_Err BOOL FALSE

CAByPos1_ErrID WORD 0

NC DMC_NC

NC_EX BOOL FALSE

NC_Pau BOOL FALSE

NC_Stop BOOL FALSE

NC_Ver LREAL 100

NC_Dep UINT 1

NC_File UINT 1

NC_Axes UINT 1

NC_Mode INT 0

NC_Res LREAL 0

NC_Act BOOL FALSE

NC_Err BOOL FALSE

NC_ErrID WORD 0

NC_Bys BOOL 0

NC_Cur UDINT 0

11- 5 20
Chapter 11 Motion Control Instructions

Variable name Data type Initial value

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

NC_Stop Stop Active NC _A ct

NC_Ver Veloverride Error NC _E rr

NC_Dep Depth ErrorID NC _E rrID

N C_F ile NcFile Bypass NC _B ys

N C_Axes AxesGroup CurrentLine NC _Cur

N C_Mode Mode P os_X NC _P x

N C_Res Res P os_Y NC _P y

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

DMC_Co ntrolAxi sByPo s


Axi s 1 Axis InCo ntrol CAByPo s_InC

11 CAByPo s_Ex Execute Busy CAByPo s_Bsy


1 Con ti nousUpdate Active CAByPo s_Act

CAByPos_Ex_Pos Position CommandAborted CAByPo s_Abt

C AByPos_Ex_Ve l Velo city Error CAByPo s_Err


C AByPos_Ex_Acc Accele ratio n ErrorID CAByPo s_ErrID
CAByPos_Ex_D ec Dece lera ti on
CAByPos_Ex_Jerk Jerk

C AByPos1

DMC_Co ntrol Axi sByPo s

Axis 2 Axis InCo ntrol CAByPo s1_InC

CAByPos1_Ex Execute Busy CAByPo s1_Bsy

Con ti nousUpdate Active CAByPo s1_Act

NC_ Py Position CommandAborted CAByPo s1_Abt


C AByPos1_Ex_Vel Velo city Error CAByPo s1_Err
C AByPos1_Ex_Acc Accele ratio n ErrorID CAByPo s1_ErrID
CAByPos1_ Ex_ Dec Dece lera ti on
CAByPos1_ Ex_ Jerk Jerk

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

12.1 Explanation of LED Indicators


 PWR LED
POWER LED indicates the state of the power supply for the motion controller.
LED state Explanation How to deal with
Green light ON Supply power is normal No correction
LED OFF or Check if the supply power for the motion
Supply power is abnormal
blinking controller is normal.
12  RUN LED
1 RUN LED indicates the state of program execution in the motion controller.
LED state Explanation How to deal with
The motion controller is in RUN
Green light ON No correction
state.
The motion controller is in STOP Switch PLC to the RUN state according to
LED OFF
state. demand

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

 ERR LED: Red light blinks.(1HZ)


ON
50 0ms 50 0ms

OFF

 ERR LED: Red light blinks quickly.(10HZ)


100m s
ON

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

LED state Explanation How to deal with

CANopen
Green light PC is downloading the network configuration data.
communication port is in
single flash Wait till downloading is completed.
STOP state.

1. Check if CANopen network bus cable


connection is correct.
2. Check if the CANopen bus cable is Delta
standard CANopen cable.
3. Check if the two ends of the CANopen bus have
CANopen connected a terminal resistor respectively.
Green light
communication port is in 4. Check if the baud rate of the master is the same
blinking
Preoperational state. as that of other slaves.
5. Check if configured slaves have been actually
connected to the network.
6. Check if some slave makes the connection with
the master.
7. Check if some slave is offline.
CANopen
Green light
communication port is in No correction
ON
RUN state.

 RUN LED: Green light is in single flash and blinks as below.

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.

 Input point LED


There are 16 input point LED indicators for showing if the motion controller’s digital input points are ON or
OFF.
LED state Indication

Red light ON Input point is ON.


LED OFF Input point is OFF.

 Output point LED


There are 8 output point LED indicators for showing if the motion controller’s digital output points are ON
or OFF.
LED state Indication

Red light ON Output point is ON.


LED OFF Output point is OFF.

12- 5
DVP-50MC Series Motion Controller Operation Manual

12.2 Table of Error IDs in Motion Instructions


When an error occurs in the motion instruction, the value of ErrorID can be seen as follows for analysis of
the cause and troubleshooting.
ErrorID
Meaning How to deal with
Hex Decimal
Make sure that the value of the input variable, Axis
1001 4097 The axis No. exceeds the valid range.
is within the allowed range.
The acceleration exceeds the valid Make sure that the value of the input variable,
1002 4098
range. Acceleration is a positive number.
12 The deceleration exceeds the valid Make sure that the value of the input variable,
1 1003 4099
range. Deceleration is a positive number.

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.

Make sure that the value of the input variable,


1005 4101 The velocity exceeds the valid range.
Velocity is a nonzero value.
Make sure that the value of the input variable,
The position value exceeds the valid
1006 4102 Position of MC_MoveAbsolute is not greater than
range.
the value of Modulo among axis parameters.
The direction value exceeds the valid Modify the value of the input variable, Direction into
1007 4103
range. that which can be set in the instruction.
The buffermode value exceeds the Modify the value of the input variable, BufferMode
1008 4104
valid range. into that which can be set in the instruction.
Modify the value of the input variable,
The input value for reference position
1009 4105 ReferenceType into that which can be set in the
type is wrong.
instruction.
Change the timing of executing MC_SetPosition.
The timing for executing
100A 4106 Do not execute MC_SetPosition while MC_Home
MC_SetPosition is improper.
or MC_Stop is being executed.
The number of e-cam table is Modify the value of the input variable, CamTable
100B 4107
incorrect. into that of CamId set in the software.
The axis No. of the master axis is Make sure that the value of the input variable, Axis
100C 4108
incorrect. is within the allowed range.
The input value of the engagement Modify the value of the input variable, StartMode
100D 4109
mode is wrong. into that which can be set in the instruction.
The value of the master scaling is Make sure that the value of the input variable,
100E 4110
incorrect. MasterScaling is a positive number.
The value of the slave scaling is Make sure that the value of the input variable,
100F 4111
incorrect. SlaveScaling is a nonzero value.
Modify the value of the input variable,
The chosen position source of the
1010 4112 MasterValueSource into that which can be set for
master axis is wrong.
the instruction.
Conflict in the axis No. of the master Modify the values of the input variables, Master
1011 4113
and slave axes. and Slave into different values.
Modify the value of the input variable, Numerator
1012 4114 Wrong e-gear numerator value
into a nonzero value.
Modify the value of the input variable, Denominator
1013 4115 Wrong e-gear denominator value
into a nonzero value.
Modify the value of the input variable, VelFactor
1014 4116 The value of VelFactor is incorrect.
into that which can be set in the instruction.
1. Check if the slave specified in the instruction
exists.
SDO Timeout in CANopen network (or
1015 4117 2. Check if the connection between the accessed
EtherCAT network)
slave and CANopen port or EtherCAT port is
normal.

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.

Modify the value of the input variable,


The value of SyncStopPos is
1025 4133 SyncStopPos of APF_RotaryCut_Init. It should be
incorrect.
between 0 and the cutting length.
The value of the input variable, SyncStopPos
The settings of SyncStopPos and
1026 4134 should be less than that of SyncStartPos of the
SyncStartPos are incorrect.
instruction.
The value of the input variable, RotCutID should
1027 4135 The value of RotCutID is incorrect.
be in the range of 1~8.
The value of the input variable,
The value of RotaryAxisKnifeNum is
1028 4136 RotaryAxisKnifeNum should be in the range of
incorrect.
1~16.
Modify the parameter values for initializing rotary
1029 4137 The inner state of rotary cut is illegal.
cut.

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 620C 25100 UDP sending register address error


Check if the data-sending register address is within
the valid range.
1 Check if the data-receiving register address is
620F 25103 UDP receiving register address error
within the valid range.
The UDP data actually received
6210 25104 Modify the specified length of data to be received.
exceed the set length.
Modify the timeout time or check if the remote
6212 25106 Ethernet connection timeout
device is connected normally.
The data that TCP slave actually
6213 25107 Modify the specified length of sent data.
receives exceed the set length.
The link is disabled due to a
6214 25108 Make sure the remote device works.
connection exception.
The connection fails or is not enabled Check if the instruction operation sequence is
6215 25109
yet. correct.
Modify timeout time or ensure the remote device is
6220 25120 Timeout
connected normally.
The number of connections exceeds Check if the connection number is within the
6300 25344
the limit. allowed range.
The instruction can be used for the
Modify the local controller as CANopen master
8000 32768 diagnosis only when the controller
before using the instruction.
works as CANopen master.
The priority number of the task is Set the priority number of the task to a value less
8800 34816
greater than 31. than 31.
The watchdog function for the task Enable the watchdog function before the
8801 34817
has not been enabled yet. instruction execution.
The master has not configured the
8808 34824 Configure the slave before the diagnosis.
slave for diagnosis.
8810 34832 Diagnosis type error Modify diagnosis type
The axis to be diagnosed has not
8818 34840 Configure the axis before the diagnosis.
been configured.
8820 34848 Diagnosis type error Modify diagnosis type
Ethernet Link number exceeds the
9000 36864 Modify Ethernet link number as 1~16
range of 1~16.
The written-data length configured for Modify the written-data length configured for
9001 36865
Ethernet link exceeds the maximum. Ethernet link within the allowed range.
The read-data length configured for Modify the read-data length configured for
9002 36866
Ethernet link exceeds the maximum. Ethernet link within the allowed range.
Check if the network hardware connection is
9003 36867 Ethernet physical connection error
normal, e.g. the network cable connection.
Socket number exceeds the valid
9004 36868 Modify Socket number as 1~4.
range
9005 36869 The length of sent data configured for Modify the length of sent data configured for

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.3 System Trouble Diagnosis through System Error Codes


When the ERR indicator of the motion controller blinks or is always ON, you can get to know the cause
of an error and shoot the trouble through system error variable values.
System error code
Explanation Correction
Hexadecimal Decimal
1000 4096 Internal RAM detection failed
Contact local technicians if the error still exists
1001 4097 Internal Flash detection failed
after repower on.
1002 4098 The extension port detection failed
12 1003 4099 Internal voltage is abnormal (LV) Adjust input voltage to 24V at the power port.
1 1004 4100 Flash initializing failed Contact local technicians if the error still exists
1005 4101 Flash ID detection failed. after repower on.
The access to flash failed in the
1007 4103
Ethernet area.
The access to flash failed in the
1008 4104
extension area.
The access to flash failed in the
1009 4105
program area.
The access to flash failed in the
100A 4106
area for axis configuration.
The access to flash failed in the
100B 4107
area for task configuration.
The access to flash failed in the
100C 4108
area for CANopen configuration.
The access to flash failed in the Contact local technicians if the problem still
100D 4109 exists after re-downloading the program and
area for hardware configuration.
restoring the setting to the factory setting.
The access to flash failed in the
100E 4110
CAM area.
The access to flash (the flash
100F 4111
management table) failed.
The access to flash (sheet 1 in the
1010 4112
flash management table) failed.
The access to flash (sheet 2 in the
1011 4113
flash management table) fails.
1012 4114 The reading of flash failed.
1013 4115 The writing in flash failed.
The erasing of the content in flash
1014 4116
failed.
Check if the CNC file ID is larger than 64.
CNC file ID is out of the allowed Update the software and redownload the
1015 4117
range program if the error still exists after
redownloading the program.
The size of CNC file exceeds the CNC file is too large in size. Diminish the size
1016 4118
range and redownload the program.
The position of incremental
Check if the input of the encoder is too fast or
1017 4119 encoder 1 changes dramatically in
enlarge the resolution of the encoder.
short time.
The position of incremental
Check if the input of the encoder is too fast or
1018 4120 encoder 2 changes dramatically in
enlarge the resolution of the encoder.
short time.

12- 1 6
Chapter 12 Troubleshooting

System error code


Explanation Correction
Hexadecimal Decimal
There are too many intermediate variables in
1019 4121 System stack is used up.
the program. Modify the program.
There are too many Retain variables. Decrease
101A 4122 The Retain file is too large. the number of Retain variables and then
redownload the program.
Redownload the program after restoring the
101B 4123 The access to Retain file failed.
system to the factory setting.

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.

1401 5121 The initializing of Ethernet LAN1


failed.

The Ethernet LAN1 buffer


1402 5122
overflows
Contact local technicians if the error still exists
The data sending failed through after repower on.
1403 5123
the Ethernet LAN1.

Sending the buffer memory


1404 5124 distribution through Ethernet
failed.

12- 1 7
DVP-50MC Series Motion Controller Operation Manual

System error code


Explanation Correction
Hexadecimal Decimal
The IP address of other device is Ensure that no identical IP addresses exist on
1405 5125 the same as that of the PLC on the the network by changing the IP address of
Ethernet network. other device or the controller.
The Ethernet LAN2 initializing
1601 5633
failed. Contact local technicians if the error still exists
The Ethernet LAN2 buffer after repower on.
1602 5634
overflows.
Full buffer area for USB Contact local technicians if the problem still
12 1603 5635
communication exists after re-downloading the program.

1 The number of inputs or the


Reset the number of input and output variables
in the self-defined POU and make sure the
3000 12288 number of outputs is greater than
number of input or output variables does not
the limit 32.
exceed 32.
The capacity for one POU is more Change the capacity of variables in a POU to
3001 12289
than 65535 bytes. reduce the variable occupation in the memory.
The number of POUs is more than Reduce the number of POUs called by the task
3002 12290
1000. and re-download the program.
3003 12291 The POU type is illegal.
The types of parameters in the
3004 12292
program are illegal.
Variable’s offset address error in
3005 12293
the program
The data types of parameters are Update the software if the error still exists after
3006 12294
illegal in the program. re-compiling and re-downloading the program
The jump range in a program is and repowering the product.
3007 12295
illegal.
Program memory allocation
3008 12296
alignment is incorrect.
Virtual axis encoder memory
3009 12297
alignment is incorrect.
The Bit accessed exceeds the Update the software if the error still exists after
300A 12298 range. (Only Bit0~Bit7 can be re-compiling and re-downloading the program
accessed.) and repowering the product.
Update the software if the error still exists after
It is detected that data types are
300B 12299 re-compiling and re-downloading the program
illegal in the program.
and repowering the product.
The number of characters in String data type is
The length of data type String is too large. Update the software if the error still
300C 12300
too large. exists after modifying the program, re-
compiling and re-downloading the program.
Update the software if the error still exists after
Illegal addressing method for
300D 12301 re-compiling and re-downloading the program
variables
and repowering the product.
Set a proper task priority and cycle time for the
300E 12302 Improper priority setting of the task
task
Check whether any index is out of bounds of
the array in the program. The pointer is used by
Exception occurs during not assigning it a value or is used by
300F 12303
accessing the controllers memory assigning it an incorrect value. Contact local
technicians if the problem still exists after re-
downloading the program.

12- 1 8
Chapter 12 Troubleshooting

System error code


Explanation Correction
Hexadecimal Decimal
Make sure that the axis configuration is proper
The checksum of the downloaded
3020 12320 and then re-compile and re-download the
axis configuration is illegal.
configuration.
Make sure that the extension configuration is
The checksum of the downloaded
3021 12321 proper and then re-compile and re-download
extension configuration is illegal. the configuration.
The checksum of the downloaded Make sure that the program is proper and then
3022 12322
program is illegal. re-compile and re-download the program.

The checksum of the downloaded


Make sure that the task setting is proper and 12
3023 12323 then re-compile and re-download the
task data is illegal. configuration.
Make sure that the CANopen configuration is
The checksum of the downloaded
3024 12324 proper and then re-compile and re-download
CANopen configuration is illegal. the configuration.
Make sure that the hardware configuration is
The checksum of the downloaded
3025 12325 proper and then re-compile and re-download
hardware configuration is illegal. the configuration.
Check if the program is correct or there is a
loop of which the program execution can not
3026 12326 Watchdog timeout
get out when the program execution timeout
occurs.
Contact local technicians if the error still exists
Calling the axis state machine
3027 12327 after redownloading the program and restoring
failed.
to the factory setting.
Check if the CNC file is correct and redownload
3028 12328 CNC list analysis error
the program.
Check if the CNC file is correct and redownload
3029 12329 CNC file analysis error
the program.
Check if the cam file is correct. Contact local
302A 12330 Cam file parsing failed. technicians if the problem still exists after re-
downloading the program.
Check if the source code file is correct. Contact
3031 12337 Source code file parsing failed. local technicians if the problem still exists after
re-downloading the program.
The actual time for executing the
3050 12368 priority 0 task exceeds the set Contact local distributors
watchdog timeout time.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3051 12369 priority 1 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3052 12370 priority2 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3053 12371 priority 3 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.

12- 1 9
DVP-50MC Series Motion Controller Operation Manual

System error code


Explanation Correction
Hexadecimal Decimal
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3054 12372 priority 4 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
12 3055 12373
The actual time for executing the
priority 5 task exceeds the set
2. Check whether there is any infinite loop in
1 watchdog timeout time.
the program which the task calls.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3056 12374 priority 6 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Revise the program or re-download the
revised program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3057 12375 priority 7 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Revise the program or re-download the
revised program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3058 12376 priority 8 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3059 12377 priority 9 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
305A 12378 priority 10 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
305B 12379 priority 11 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
305C 12380 priority 12 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.

12- 2 0
Chapter 12 Troubleshooting

System error code


Explanation Correction
Hexadecimal Decimal
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
305D 12381 priority 13 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
305E 12382
The actual time for executing the
priority 14 task exceeds the set
2. Check whether there is any infinite loop in 12
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
305F 12383 priority 15 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3060 12384 priority 16 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3061 12385 priority 17 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3062 12386 priority 18 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3063 12387 priority 19 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3064 12388 priority 20 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3065 12389 priority 21 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.

12- 2 1
DVP-50MC Series Motion Controller Operation Manual

System error code


Explanation Correction
Hexadecimal Decimal
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3066 12390 priority 22 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
12 3067 12391
The actual time for executing the
priority 23 task exceeds the set
2. Check whether there is any infinite loop in
1 watchdog timeout time.
the program which the task calls.
3. Redownload it after modifying the
program.
1. Reset the watchdog time to a larger value
for the task.
The actual time for executing the
2. Check whether there is any infinite loop in
3068 12392 priority 24 task exceeds the set
the program which the task calls.
watchdog timeout time.
3. Redownload it after modifying the
program.
The actual time for executing the
3069 12393 priority 25 task exceeds the set Contact local technicians.
watchdog timeout time.
The actual time for executing the
306A 12394 priority 26 task exceeds the set Contact local technicians.
watchdog timeout time.
The actual time for executing the
306B 12395 priority 27 task exceeds the set Contact local technicians.
watchdog timeout time.
The actual time for executing the
306C 12396 priority 28 task exceeds the set Contact local technicians.
watchdog timeout time.
The actual time for executing the
306D 12397 priority 29 task exceeds the set Contact local technicians.
watchdog timeout time.
The actual time for executing the
306E 12398 priority 30 task exceeds the set Contact local technicians.
watchdog timeout time.
The actual time for executing the
306F 12399 priority 31 task exceeds the set Contact local technicians.
watchdog timeout time.
1. Check if the installation of the SD card is
The reading and writing of the SD
4000 16384 proper.
card data by the PLC failed.
2. Check if the SD card is damaged.
Modify the file in the SD card as the read-write
4003 16387 The file in the SD card is read-only.
file
1. Ensure that the data in the project backup
The data in the project backup file
file is not modified.
4100 16640 is modified or the data format is
2. Ensure that the project backup file is
incorrect.
generated by CANopen Builder.
The data format of the RETAIN 1. Ensure that the data in the RETAIN
4101 16641
variable backup file is incorrect. variable backup file is not modified.

12- 2 2
Chapter 12 Troubleshooting

System error code


Explanation Correction
Hexadecimal Decimal
2. Ensure that the RETAIN variable backup
file is generated by CANopen Builder.
During restoration, the data in the
RETAIN variable backup file is Ensure that the data in the RETAIN variable
4102 16642
partially different from that in the backup file is consistent with that in the PLC.
PLC.
During restoration, the data in the
RETAIN variable backup file is Ensure that the data in the RETAIN variable
4103 16643
completely different from that in backup file is consistent with that in the PLC. 12
the PLC.
During restoration, the controller
Ensure that the controller model in the project
model in the project backup file is
4104 16644 backup file is the same as that of the actually
different from that of the actually
connected PLC.
connected PLC.
The program ID in the backup file
Ensure that the program ID in the backup file is
4105 16645 is different from that of the current
the same as that of the current PLC.
PLC.
The PLC password in the backup
Ensure that the PLC password in the backup
4106 16646 file is different from that of the
file is the same as that of the current PLC.
current PLC.
Extension communication
5000 20480 Contact local technicians if the error still exists
checking failed.
after repower on.
5001 20481 Extension communication timeout
Make sure that the module acutally connected
The module actually connected is
to the right side of the PLC is consistent with
5100 20736 inconsistent with that configured in
that configured in the software and then re-
the software.
download the configuration.
The buffer for receiving CANopen
5200 20992
data is full. Adjust the CANopen configuration and check
The buffer for sending CANopen the task setup.
5201 20993
data is full.
The buffer for receiving Motion
5300 21248
data is full. Adjust the Motion configuration and check the
The buffer for sending Motion data task setup.
5301 21249
is full.

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

A.1 Message Format in ASCII Mode


 Communication data structure
Field name Components Explanation
Start character STX Start character “:”, the corresponding ASCII code: 16#3A

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)

The corresponding relation between hexadecimal character and ASCII code:

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

 ADR (Communication address)


The valid range of communication address: 0~254.
Communication address: 0 means the broadcast message is sent to all slaves and the slaves which
have received the message will not make any response. If communication address is not 0, slaves
will respond to master after receiving the message normally. For instance, ASCII codes for the
communication address of 16 are denoted below.
Decimal 16 is equal to hexadecimal 10. (ADR 1, ADR 0) =‘10’, ‘1’=31H, ‘0’ = 30H
 Function code and data
The data format is determined by function codes. For example, to read the two continuous address
data with hexadecimal 16#0000 as the start address in the motion controller. The communication
address of the motion controller is 1, 16#0000 is the Modbus address of %MW0 in the PLC.
The data explanation is shown as below:
PC→the motion controller
3A 30 31 30 33 30 30 30 30 30 30 30 32 46 41 0D 0A
The motion controller→PC
3A 30 31 30 33 30 34 30 30 30 31 30 30 30 32 46 35 0D 0A

A- 2
Appendix A Modbus Communication

 Request message:
ASCII code corresponding to field
Field name Field character
character
Start character “:” 3A

Communication address: “0” 30


01 “1” 31
“0” 30
Function code: 03
“3” 33
“0” 30
“0” 30
Start address: 16#0000
“0” 30
“0” 30
A_
“0” 30
Data number “0” 30
(Counted by word): 2 “0” 30
“2” 32
“F” 46
LRC check code: 16#FA
“A” 41
End character 1 CR 0D
End character 0 LF 0A
 Response message:
ASCII code corresponding to field
Field name Field character
character
Start character “:” 3A
“0” 30
Communication address: 01
“1” 31
“0” 30
Function code: 03
“3” 33
Data number “0” 30
(Counted by byte): “4” 34
“0” 30
Read content of 16#1000 “0” 30
address “0” 30
“1” 31
“0” 30
Read content of 16#1001 “0” 30
address “0” 30
“2” 32

A- 3
DVP- 50MC Ser ies Motion Contr oller O per ation Manual

ASCII code corresponding to field


Field name Field character
character
LRC check code: 16#F5 “F” 46
“5” 35
End character 1 CR 0D
End character 0 LF 0A

 LRC check (Check sum)


LRC check code is the value by firstly getting the inverse values of every bit of the result value of
addition operation of the data from communication ID to the last data content (Hex.) and then adding
1 to the final inverse value.
For instance, LRC check code value: 16#FA. The method of calculating LRC check code value:
16#01+ 16#03 + 16#00 + 16#00 + 16#00 + 16#02 = 16#06, the result 16#FA is got by getting the
A
inverse values of every bit of 16#06 and then adding 1 to the final inverse value.
ASCII code corresponding to field
Field name Field character
character
Start character “:” 3A

Communication address: “0” 30


01 “1” 31
“0” 30
Function code: 03
“3” 33
“0” 30
Start data address: “0” 30
16#0000
“0” 30
“0” 30
“0” 30

Data number (Counted “0” 30


by word):2 “0” 30
“2” 32
“F” 46
LRC check code: 16#FA
“A” 41
End character 1: CR CR 0D
End character 0: LF LF 0A

A- 4
Appendix A Modbus Communication

A.2 Message Format in RTU Mode


 Communication data structure
Start No input data for more than 10ms

Communication address Slave address: 8-bit binary address

Function code Function code: 8-bit binary address

Data (n-1)
Data content
…….
n × 8 bit binary data, n<=202
Data 0

Low byte of CRC check

High byte of CRC check CRC check sum


A_
End CRC check sum is composed of two 8-bit binary data
 Communication address
The range of a valid communication address is 0~254. The communication address 0 indicates
to broadcast the message to all slaves and the slaves which have received the broadcast
message do not make any response. If the communication address is not 0, slaves will reply to
master as normal. For example, to communication with the slave with the communication
address of 16, the address of the slave is set as 16#10 since decimal 16 is equal to hexadecimal
10.
 Function code and data
The data format is determined by function codes.
For example, to read the data of two continuous addresses with 16#0000 as start address in the
motion controller, the address of the motion controller is 1, 16#0000 is the Modbus address
of %MW0 in the controller.
The data in the communication cable and the explanation on them are shown below:
PC→the motion controller: “01 03 00 00 00 02 C4 0B”
The motion controller→PC: “01 03 04 00 01 02 00 2A 32”
 Request message:
Field name Character
Start No input data for more than 10ms
Communication address 01
Function code 03
High byte of Modbus address 00
Low byte of Modbus address 00
Read high byte of data number 00
Read low byte of data number 02
Low byte of CRC check sum C4
High byte of CRC check sum 0B
End No input data for more than 10ms

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 High byte of CRC check sum 32


End No input data for more than 10ms
 CRC check (check sum)
CRC check starts from “Communication address” to the last “Data content”. The calculation
method is shown below.
Step 1: Download a 16-bit hex register (CRC register) with the content value FFFF.
Step 2: Make the XOR operation between the 8-bit data of the first byte in the command and
the 8-bit data of the low byte in CRC register and then store the operation result in CRC register.
Step 3: Move the content value of CRC register by one bit towards the right and fill 0 in the
highest bit.
Step 4: Check the value of the lowest bit in CRC register. If the value is 0, repeat the action of
step 3; if 1, make XOR operation between the content in CRC register and hex. A001 and then
store the result in CRC register.
Step 5: Repeat step 3 and step 4 till the content in CRC register is moved by 8 bits towards the
right. At this moment, the processing of the first byte of the command message is finished.
Step 6: Repeat the action of step 2 to step 5 for the next byte in the command message till the
processing of all bytes is finished. The last content in CRC register is CRC check value. When
CRC check value in command message is transmitted, the high and low bytes in calculated CRC
check value must exchange with each other, i.e. the low byte is transmitted first.

Example on calculation of CRC check value with C language


unsigned char* data  // Pointer of command message content
unsigned char length  // Length of command message content
unsigned int crc_chk(unsigned char* data, unsigned char length)
{
int j;
unsigned int reg_crc=16#ffff;
while(length--)
{
reg_crc ^= *data++;
for (j=0;j<8;j++)
{
If (reg_crc & 16#01) reg_crc=(reg_crc>>1) ^ 16#a001; /* LSB(b0)=1 */
else reg_crc=reg_crc >>1;
}

A- 6
Appendix A Modbus Communication

}
return reg_crc; // the value that sent back to the CRC register finally
}

A.3 Modbus Function Codes Supported


 The function codes which are supported by the motion controller are listed in the following table when
COM2 port is possessed by the motion control module.
Function
Explanation Available register
code
Read output bit register values; the data of 256 bits at %QX
16#01
most can be read at a time
Read bit register values; the data of 256 bits at most %IX,%QX
16#02
can be read at a time A_
Read one single or multiple word register value; the
16#03 %MW,%QW,%IW
data of 100 words at most can be read at a time.
16#05 Write one single bit register value. %QX

16#06 Write one single word register value. %MW,%QW


Write multiple bit register value; the data of 256 bits at
16#0F %QX
most can be written at a time.
Write multiple word register value; the data of 100
16#10 %MW,%QW
words at most can be written at a time.

A.4 Modbus Exception Response Code Supported


 Exception response codes supported by the motion controller are listed in the following table.
Exception
response Explanation
code
Illegal command codes: the command codes in the command message
16#01
which PLC receives are invalid.
Illegal register address: the address in the command message received is
16#02
invalid.
Illegal register value: the data in the command message received by PLC
16#03
are invalid.
 Check sum fault
 Check if the check sum is correct.
 Illegal command message
16#07
 Too short command message
 The length of the command message exceeds the valid
range.

A.5 Introduction to Modbus Function Codes


 Function code 03 reads one single or multi word register values

A- 7
DVP- 50MC Ser ies Motion Contr oller O per ation Manual

 Data structure of a request message:


Byte NO. Name Byte
Byte0 Modbus ID Single byte
Byte1 Function code Single byte

Byte2 Read the start address of word registers in the High byte

Byte3 motion controller


Low byte

Byte4 Read the number of addresses of word registers High byte


in the motion controller
Byte5 Low byte
(Counted by Word)
Byte6 Low byte of CRC check sum Low byte

Byte7 High byte of CRC check sum High byte


A
 Data structure of a response message:
Byte NO. Name Byte

Byte0 Modbus ID Single byte

Byte1 Function code Single byte

Read the number of addresses of word registers


Byte2 in the motion controller Single byte
(Counted by Byte)
Byte3 The address content of the word register in the High byte
Byte4 motion controller Low byte
… The address content of the word register in the High byte
… motion controller Low byte
Byte n The address content of the word register in the High byte
Byte n+1 motion controller Low byte
Byte n+2 Low byte of CRC check sum Low byte
Byte n+3 High byte of CRC check sum High byte
 Data structure of an exception response message:
Byte NO. Name Byte

Byte0 Modbus ID Single byte

Byte1 16#80+ function code Single byte

Byte2 Exception response code Single byte

Byte3 Low byte of CRC check sum Low byte

Byte4 High byte of CRC check sum High byte


 Example
To read the contents of address 16#0000 and 16#0001 in the motion controller via function code 03.
16#0000 and 16#0001 are the Modbus addresses of %MW0 and %MW1 in the motion controller
respectively.

A- 8
Appendix A Modbus Communication

Suppose the value of %MW0 is 16#0001 and %MW1 is 16#0002:


Request message: 01 03 00 00 00 02 C4 0B
Response message: 01 03 04 00 01 00 02 2A 32
 Function code 06 writes one single word register value
 Data structure of a request message:
Byte NO. Name Byte
Byte0 Modbus ID Single byte
Byte1 Function code Single byte
Byte2 Controller’s register address where to write High byte
Byte3 the value Low byte
Byte4 High byte
The written value
Byte5 Low byte
Byte6 Low byte of CRC check sum Low byte A_
Byte7 High byte of CRC check sum High byte
 Data structure of a response message:
Byte NO. Name Byte
Byte0 Modbus ID Single byte
Byte1 Function code Single byte
Byte2 Controller’s word register address where to High byte
Byte3 write the value Low byte
Byte4 High byte
The written value
Byte5 Low byte
Byte6 Low byte of CRC check sum Low byte
Byte7 High byte of CRC check sum High byte
 Data structure of an exception response message:
Byte NO. Name Byte
Byte0 Modbus ID Single byte
Byte1 16#80+ function code Single byte
Byte2 Exception response code Single byte
Byte3 Low byte of CRC check sum Low byte
Byte4 High byte of CRC check sum High byte
 Example
Write 16#0100 to the address 16#0000 in the motion controller via function code 06.
Request message: 01 06 00 00 01 00 88 5A
Response message: 01 06 00 00 01 00 88 5A
 Function code 16#10 writes multiple word register values
 Data structure of a request message:
Byte NO. Name Byte
Byte0 Modbus ID Single byte
Byte1 Function code Single byte

A- 9
DVP- 50MC Ser ies Motion Contr oller O per ation Manual

Byte2 The start address of Controller’s word registers High byte


Byte3 where to write the value Low byte
Byte4 The number of addresses of Controller’s word High byte
Byte5 registers where to write the value. (Counted by word) Low byte
The number of addresses of Controller’s word
Byte6 Single byte
registers where to write the value. (Counted by byte)
Byte7 The address value written into Controller’s word High byte
Byte8 register Low byte
… The address value written into Controller’s word High byte
… register Low byte
Byte n The address value written into Controller’s word High byte
A Byte n+1 register Low byte
Byte n+2 Low byte of CRC check sum Low byte
Byte n+3 High byte of CRC check sum High byte
 Data structure of a response message:
Byte NO. Name Byte
Byte0 Modbus ID Single byte
Byte1 Function code Single byte
Byte2 The start address of Controller’s word registers High byte
Byte3 where to write the value Low byte
Byte4 The number of Controller’s word registers where to High byte
write the value.
Byte5 Low byte
(Counted by Word)
Byte6 Low byte of CRC check sum Low byte
Byte7 High byte of CRC check sum High byte
 Data structure of an exception response message:
Byte NO. Name Byte
Byte0 Modbus ID Single byte
Byte1 16#80+ function code Single byte
Byte2 Exception response code Single byte
Byte3 Low byte of CRC check sum Low byte
Byte4 High byte of CRC check sum High byte

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

Byte0 Modbus ID Single byte


Byte1 Function code Single byte
Byte2 Read the number of bytes of bit registers. Single byte
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

Byte0 Modbus ID Single byte

Byte1 16#80+ function code Single byte

Byte2 Exception response message Single byte

Byte3 Low byte of CRC check sum Low byte

Byte4 High byte of CRC check sum High byte


Note:
The value of Byte 2 in the response message is determined by the values of Byte 4 and Byte 5 in the
request message. For example, the number of the read bit registers in the request message is A.
Dividing 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.

A- 11
DVP- 50MC Ser ies Motion Contr oller O per ation Manual

See the example below for details.


 Example
Read the state value of %QX2.0~%QX3.4 in the motion controller via function code 01. The address
of %QX2.0 is 16#A010. Suppose the value of %QX2.0~%QX2.7 is 1000 0001 and %QX3.0~%QX3.4
is 1 0001.
Request message: 01 01 A0 10 00 0D DE 0A
Response message: 01 01 02 81 11 19 A0
 Function code 16#02 reads multiple 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 where High byte
A Byte3 to read the state Low byte
Byte4 High byte
Read the number of bit registers.
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

Byte0 Modbus ID Single byte

Byte1 Function code Single byte


Byte2 Read the number of bytes of bit registers. Single byte

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

Byte0 Modbus ID Single byte

Byte1 16#80+ Function code Single byte

Byte2 Exception response code Single byte

Byte3 Low byte of CRC check sum Low byte

Byte4 High byte of CRC check sum High byte


Note:
The value of Byte 2 in the response message is determined by the values of Byte 4 and Byte 5 in the
request message. For example, the number of the read bit registers in request message is A. Dividing

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

Byte1 Function code Single byte


A_
Byte2 High byte
Modbus address of the bit register
Byte3 Low byte

Byte4 High byte


The value written in the bit register
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

Byte0 Modbus ID Single byte

Byte1 Function code Single byte

Byte2 High byte


Modbus address of the bit register
Byte3 Low byte

Byte4 High byte


The value written in the bit register
Byte5 Low byte

Byte6 Low byte of CRC check sum Low byte

Byte7 High byte of CRC check sum High byte


 Data structure of an exception response message:

Byte NO. Name Byte

Byte0 Modbus ID Single byte

Byte1 16#80+ Function code Single byte

Byte2 Exception response code Single byte

Byte3 Low byte of CRC check sum Low byte

A- 13
DVP- 50MC Ser ies Motion Contr oller O per ation Manual

Byte NO. Name Byte

Byte4 High byte of CRC check sum High byte


Note: The written value 16#0000 for the bit register in request message or response message
indicates the value FALSE is written in the bit register; the written value 16#FF00 for the bit register
indicates the value TRUE is written in the bit register.
 Example
The value of %QX0.0 in the motion controller is set to TRUE and the address of %QX0.0 is set to
16#A000 via function code 05.
Request message: 01 05 A0 00 FF 00 AE 3A
Response message: 01 05 A0 00 FF 00 AE 3A
 Function code 16#0F writes multiple bit register values
 Data structure of a request message:

A Byte NO. Name Byte

Byte0 Modbus ID Single byte

Byte1 Function code Single byte

Byte2 High byte


The start address of the bit registers where to write values
Byte3 Low byte

Byte4 High byte


The number of bit registers where to write values
Byte5 Low byte

Byte6 The number of bytes of bit registers where to write values Single byte

Byte7 The value written to the bit register Single byte

… The value written to the bit register Single byte

Byte n The value written to 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 a response message:
Byte NO. Name Byte

Byte0 Modbus ID Single byte

Byte1 Function code Single byte

Byte2 High byte


The start address of bit registers where to write values
Byte3 Low byte

Byte4 High byte


The number of bit registers where to write values
Byte5 Low byte

Byte6 Low byte of CRC check sum Low byte

Byte7 High byte of CRC check sum High byte

A- 14
Appendix A Modbus Communication

 Data structure of an exception response message:


Byte NO. Name Byte

Byte0 Modbus ID Single byte

Byte1 16#80+ Function code Single byte

Byte2 Exception response code High byte


Byte3 Low byte of CRC check sum Low byte
Byte4 High byte of CRC check sum High byte
Note: How many bytes of data in the request message depend on the number of bit registers in the
request message.
 Example
The value of %QX0.0~%QX0.7 is set to 1000 0001 and the address of %QX0.0 is 16#A000 via
function code 0F in the motion controller. A_
Request message: 01 0F A0 00 00 08 01 81 26 55
Response message: 01 0F A0 00 00 08 76 0D

A- 15
DVP- 50MC Ser ies Motion Contr oller O per ation Manual

A.6 Table of Registers and Corresponding Modbus


Addresses
 Register numbers in the motion control module of the motion controller and corresponding addresses
are listed below:
Register
Register number Explanation Address (hex) Attribute
name
I %IX0.0~%IX127.7 6000 ~ 63FF Read only
Bit registers
Q %QX0.0~%QX127.7 A000 ~ A3FF Read/write

I %IW0~%IW63 8000 ~ 803F Read only


Q %QW0~%QW63 Word registers A000 ~ A03F Read/write
M %MW0~%MW32767 0000 ~ 7FFF Read/write
A

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

 Ethernet Communication Port in DVP-50MC Series Motion Controller


The motion controller provides two independent Ethernet ports supporting Modbus TCP protocol. The
motion controller can only serve as the slave in the Ethernet network. Both of them can accept the access
from 4 masters. The IP addresses need be set for both of them. Through the two Ethernet ports, HMI, PLC
or other ModbusTCP master equipment can read or write data in the registers inside the motion controller.
The two Ethernet ports could be used to download configuration data, executable files and CAM files.
Besides, they support auto jumper function as well. When being connected to the computer or switchboard,
The motion controller does not need to be handled in jumper specially. They can also automatically detect
the transmission rate of 10/100Mbps.
 Pin Definition of Ethernet Ports of DVP-50MC Series Motion Controller
The pin definitions of the two Ethernet ports of the motion controller are same completely.
 Pin Definition

Terminal No. Definition Explanation RJ -45 figure

Positive pole for transmitting


1 Tx+
data
Negative pole for transmitting
2 Tx-
data

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

 Illustration of the motion controller connected to Ethernet network

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.

B.1 Modbus TCP Message Structure


 Modbus TCP message structure

Byte NO. Name Explanation

Byte0 High byte


Transaction identifier 0
Byte1 Low byte

Byte2 High byte


Protocol identifier 0
Byte3 Low byte

Byte4 High byte The number of bytes of


Modbus data length Modbus address and the
Byte5 Low byte data after it.

Byte6 Modbus ID Single byte 0~16#FF B_


Byte7 Function code Single byte

Byte8 Register address in the motion High byte


0~16#FFFF
Byte9 controller Low byte
The number of bytes of
Modbus data is
Byte10 Modbus data High byte
determined by function
code.

B.2 Modbus Function Codes Supported in Modbus TCP


 Modbus function codes which the motion controller supports

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.3 Exception Response Code in Modbus TCP


 Modbus exception response codes that the motion controller supports are shown in the
table below.

Exception response code Indication

16#01 Unsupportive function code

16#02 Unsupportive Modbus address

16#03 Data length exceeds the range

B.4 Modbus Function Codes in Modbus TCP


 Function code: 03 to read one single or multiple word register values
 Request message data structure:
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
B Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Low byte

Byte7 Function code Single byte

Byte8 High byte


The start address of word registers to be
Byte9 read Low byte

Byte10 The number of word registers High byte

Byte11 (Counted by Word) Low byte


 Response message data structure:
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

B- 4
Appendix B Modbus TCP Communication

Byte NO. Name Byte

Byte7 Function code Single byte


The number of read word registers.
Byte8 Single byte
(Counted by Byte)
Byte9 High byte
The content value in a word register
Byte10 Low byte

… High byte
The content value in a word register
Byte n Low byte
 Exception response message data structure:
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte B_
Byte4 High byte
Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 16#80+ function code Single byte

Byte8 Exception response code Single byte


 Example
To read the content value in the addresses 16#0000 and 16#0001 inside the motion controller via
function code 03. 16#0000 and 16#0001 are the Modbus address of %MW0 and %MW1 inside the
motion controller respectively. Suppose that the value of %MW0 is 16#0100 and the value of %MW1
is 16#0200.

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

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

B- 5
DVP-50MC Series Motion Controller Operation Manual

Byte NO. Name Byte

Byte6 Modbus ID Single byte

Byte7 Function code Single byte

Byte8 High byte


The address of a word register where to write
Byte9 value
Low byte

Byte10 High byte


The value written in the word register
Byte11 Low byte
 Response message data structure:
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte
B
Byte4 High byte
Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 Function code Single byte

Byte8 High byte


The address of a word register where to write a
Byte9 value Low byte

Byte10 High byte


The value written in a word register
Byte11 Low byte
 Exception response message data structure:
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 16#80+ function code Single byte

Byte8 Exception response code Single byte


 Example:

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

 Function code: 16#10 to write multiple word register values


 Request message data structure:
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 Function code Single byte

Byte8 High byte


B_
The start address of word registers where to write values
Byte9 Low byte

Byte10 The number of word registers where to write values High byte

Byte11 (Counted by Word) Low byte


The number of word registers where to write values
Byte12 Single byte
(Counted by Byte)
Byte13 High byte
The value written in a word register
Byte14 Low byte

… High byte
The value written in a word register
Byte n Low byte
 Response message data structure:
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 Function code Single byte

B- 7
DVP-50MC Series Motion Controller Operation Manual

Byte NO. Name Byte

Byte8 High byte


The start address of word registers where to write values
Byte9 Low byte

Byte10 The number of word registers where to write values. High byte

Byte11 (Counted by Word) Low byte


 Exception response message data structure:
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte
B
Byte6 Modbus ID Single byte

Byte7 16#80+ function code Single byte

Byte8 Exception response code Single 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:

Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 Modbus data length High byte

B- 8
Appendix B Modbus TCP Communication

Byte NO. Name Byte

Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 Function code Single byte

Byte8 High byte


The start address of the read bit registers
Byte9 Low byte

Byte10 High byte


The number of read bit registers
Byte11 Low byte
 Response message data structure:
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte B_


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 Function code Single byte

Byte8 How many bytes for the read bit registers Single byte

Byte9 The status value of a bit register which is read Single byte

… 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

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 16#80+ function code Single byte

B- 9
DVP-50MC Series Motion Controller Operation Manual

Byte NO. Name Byte

Byte8 Exception response code Single byte

 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

 Function code: 16#05 to write one single bit register value


 Request message data structure:

Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

B
Byte2 High byte
Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 Function code Single byte

Byte8 High byte


Modbus address of a bit register
Byte9 Low byte

Byte10 High byte


The value written in the bit register
Byte11 Low byte
 Response message data structure:

Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

B- 10
Appendix B Modbus TCP Communication

Byte NO. Name Byte

Byte7 Function code Single byte

Byte8 High byte


Modbus address of a bit register
Byte9 Low byte

Byte10 High byte


The value written in the bit register
Byte11 Low byte
 Exception response message data structure:
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte B_


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 16#80+ function code Single byte

Byte8 Exception response code Single byte


Note: The written value 16#0000 means that 0 is written to the bit register and 16#FF00 means that
1 is written to the bit register.
 Example
Set the value of %QX0.0 in the motion controller to 1 via function code 05; the address of %QX0.0 is
16#A000.
Request message: 00 00 00 00 00 06 01 05 A0 00 FF 00
Response message: 00 00 00 00 00 06 01 05 A0 00 FF 00

 Function code: 16#0F to write multiple bit register values.


 Request message data structure:
Byte NO. Name Byte
Byte0 High byte
Transaction identifier
Byte1 Low byte
Byte2 High byte
Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 Function code Single byte

B- 11
DVP-50MC Series Motion Controller Operation Manual

Byte NO. Name Byte

Byte8 High byte


The start address of the bit registers where to write values
Byte9 Low byte

Byte10 High byte


The number of bit registers where to write values
Byte11 Low byte
How many bytes occupied by bit registers where to write
Byte12 Single byte
values
Byte13 The value written in a bit register Single byte

Byte n The value written in a bit register Single byte


 Response message data structure
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


B Protocol identifier
Byte3 Low byte

Byte4 Modbus data length Single byte

Byte5 High byte


Modbus ID
Byte6 Low byte

Byte7 Function code Single byte

Byte8 High byte


The start address of bit registers where to read
Byte9 status Low byte

Byte10 High byte


The number of bit registers where to write values
Byte 11 Low byte
 Exception response message data structure
Byte NO. Name Byte

Byte0 High byte


Transaction identifier
Byte1 Low byte

Byte2 High byte


Protocol identifier
Byte3 Low byte

Byte4 High byte


Modbus data length
Byte5 Low byte

Byte6 Modbus ID Single byte

Byte7 16#80+ function code Single byte

B- 12
Appendix B Modbus TCP Communication

Byte NO. Name Byte

Byte8 Exception response code Single byte


 Example
Set %QX0.0~%QX0.7=1000 0001 via function code 0F and set the address of %QX0.0 to 16#A000
in the motion controller.
Request message: 00 00 00 00 00 0A 01 0F A0 00 00 08 01 81
Response message: 00 00 00 00 00 06 01 0F A0 00 00 08

B.5 Registers in DVP-50MC Series and Corresponding


Modbus Addresses

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

I %IW0~%IW63 8000 ~ 803F Read only


Q %QW0~%QW63 Word register A000 ~ A03F Read/write B_
M %MW0~%MW32767 0000 ~ 7FFF 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

 About CANopen protocol

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

OSI second layer


CAN controller CAN 2.0A
Data link layer

C
+ -
OSI first layer ISO 11898
Physical layer + -

CAN network

 The object dictionary


 CANopen uses an object-based way to define a standard device. Every device is represented
by a set of objects, and can be visited by the network. The model of the CANopen device is
illustrated below. As the figure below shows, the object dictionary is the interface between the
communication program and the superior application program.
 The core concept of CANopen is the device object dictionary (OD). It is an orderly object set.
Every object adopts a 16-bit index for addressing. In order to allow the visit to the single element
in the data structure, it also defines an 8-bit subindex. Every node in the CANopen network has
an object dictionary. The object dictionary includes the parameters which describe the device
and the network behavior. The object dictionary of a node is described in the electronic data
sheet.

C-2
Appendix C CANopen Protocol

 The CANopen Communication Object


The CANopen communication protocol contains PDO, SDO, NMT and other predefined CANopen
communication object.
Refer to section C.3 for PDO introduction.
Refer to section C.4 for SDO introduction.
Refer to section C.2 for NMT introduction.

 Other predefined CANopen communication objects (SYNC and EMCY)


 SYNC Object (Synchronous object)
The synchronous object is the message broadcasted periodically by the master node in the
CANopen network. This object is used to realize the network clock signal. Every device decides
whether to use the event and undertake the synchronous communication with other network
devices according to its configuration. For example, when controlling the driving device, the
devices do not act immediately after they receive the command sent by the master. They do act C_
until they receive the synchronous message. In this way, many devices can act synchronously.

The format of the SYNC message:


COB-ID
80(hex)
 Emergency Object
The emergency object is used by the CANopen device to indicate an internal error. When an
emergency error occurs in the device, the device sent the emergency message (including the
emergency error code), and the device enters the error state. After the error is eliminated, the
device sends the emergency message, the emergency error code is 0, and the device enters the
normal state.
The format of the emergency message:
COB-ID Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7
Emergency error
80(hex) code Error
Factory-defined error code
+Node-ID register
LSB MSB
Note: The value in the error register is mapped to index 1001 (hex) in the object dictionary. If the value
is 0, no error occurs. If the value is 1, a general error occurs. If the value is H’80, an internal
error occurs in the device.

C-3
DVP-50MC Series Motion Controller Operation Manual

C.1 Node States


 Module control services
The master node in the CANopen network controls the slave by sending the command. The slave
executes the command after it receives the command and it does not need to reply. All CANopen
nodes have internal NMT states. The slave node has four states, Initializing, Pre-operational,
Operational, and Stop state.
The state of the device is illustrated below.

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

Initialization Pre-operational Operational Stopped


PDO X
SDO X X
SYNC X X
Time Stamp X X
EMCY X X

C-4
Appendix C CANopen Protocol

Initialization Pre-operational Operational Stopped


Boot-up X
NMT X X X
The format of the control message for the node state:

COB-ID Byte 0 Byte 1


Slave address
0 Command specifier (CS)
(0: Broadcast)
The command specifiers are listed below.

Command specifier (hex) Function

01 Start the remote node


02 Stop the remote node
80 Enter the pre-operational state
81 Reset the application layer
82 Reset the communication

 Error Control services

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.2 Network Management (NMT)


The CANopen network management complies with the Master/Slave mode. Only one NMT master
can exist and other nodes are considered as slaves in a CANopen network. NMT contains three
types of services, Module control services, Error Control services and Boot-up services. Please refer
to section C.1 of the manual for more details.

C.3 PDO (Process Data Object)


 PDO
 The PDO provides the direct visit channel for the device application object, is used to transmit
the real-time data, and has high priority. Every byte in the PDO CAN message data list is used
to transmit the data. The rate of making use of the message is high.
 The PDO is described by means of the “producer/consumer mode”. The data is transmitted from
one producer to one or many consumers. The data which can be transmitted are limited to 1-
byte data to 8-byte data. After the data is transmitted by the producer, the consumer does not
need to reply to the data. Every node in the network will detect the data information transmitted
by the transmission node, and decides whether to process the data which is received.
 There are two kinds of PDO services for every PDO: TxPDO and RxPDO. The PDO sent by the
producer is called PDO (TxPDO) sent by the producer device. And the PDO the consumer
receives is called PDO (RxPDO) which the consumer device receives.
 Every PDO is described with two objects in the object dictionary: The PDO communication
parameters and the PDO mapping parameters.
The PDO communication parameters:

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.

Object dictionary PDO_1 mapping


xxxxh xxh Application object A 0 3
1 yyyyh yyh 8

yyyyh yyh Application object B 2 zzzzh zzh 16


3 xxxxh xxh 8

zzzzh zzh Application object C

Application object B
PDO_1 Application object C Application object A

 The data format for RxPDO and TxPDO is as follows.

COB-ID Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7


Object
Data
identifier

C-7
DVP-50MC Series Motion Controller Operation Manual

C.4 SDO (Service Data Object)


 SDO
 The SDO is used to build the client/server relation between two CANopen devices. The client
device can read the data from the object dictionary of the server device, and write the data into
the object dictionary of the server device. The access mode of the SDO is “client/server” mode.
The mode which is accessed is the SDO server. Every CANopen device has at least one service
data object which provides the access channel to the object dictionary of the device. SDO can
read all objects in the object dictionary, and write all objects into the object dictionary.
 The SDO message contains the index information and the subindex information which can be
used to position the objects in the object dictionary, and the composite data structure can easily
pass the SDO access. The trigger method of SDO belongs to the type of command response. In
other words, the SDO server must reply after the SDO client sends a read/write request. The
client and the server can stop the transmission of the SDO. The request message and response
message can be differentiated according to their different COB-IDs.
 The SDO can transmit the data in any length. If the data length is more than 4 bytes, the data
has to be transmitted by segment. The last segment of the data contains an end flag.
The structures of the SDO requested message and reply message are as follows.
The formats of the request message and response message:
 The format of the request message

COB-ID Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7

600(hex) Request Object index Requested data


Object index
+Node-ID code LSB MSB bit7-0 bit15-8 bit23-16 bit31-24

 The definition of the request code in the request message:

C Request code (hex) Description

23 Writing the 4-byte data


2B Writing the 2-byte data
2F Writing the 1-byte data
40 Reading the data
80 Stopping current SDO function

 The format of the response message

COB-ID Byte 0 Byte 1 Byte 2 Byte 3 Byte 4 Byte 5 Byte 6 Byte 7

580(hex) Response Object index Object Response data


+Node-ID code LSB MSB subindex bit7-0 bit15-8 bit23-16 bit31-24

 The definition of the response code in the response message:


Response code
Description
(hex)
43 Reading the 4-byte data
4B Reading the 2-byte data
4F Reading the 1-byte data
60 Writing the 1/2/4-byte data
80 Stopping the SDO function

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

D.1 Explanation of Homing Modes


The motion controller provides many homing modes from which user can choose the appropriate one in
accordance with the field condition and technical requirement.

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

Circ ums tanc e 1 Sta rt point

1 Pos itive direc tion

St art point

Circums ta nce 2 1 Pos itive direc tion

Z pulse

Nega tive limit s wit ch

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

Circu msta nce 1 Start


point

Negativ e 2
direct io n

Circums tan ce 2 Negativ e 2 Sta rt p oint


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

Circumst ance 1 Start


point

Negat ive 3
direction
Circumstance 2 Negat ive 3 St art point
direction

Circumstance 1 St art 4 Positive


point direction
Circumst ance 2 Start point

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

Circ ums tanc e 1 St art 5 Po sitiv e d irec tion


point

Circums tan ce 2 St art po int

5 Pos itiv e direc tion


St art
Circ umst anc e 1 point

Negat ive direct ion


6

Negat ive direct ion


Circ ums tanc e 2 6 S tart point

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

Circums ta nce 1 St art


point

Nega tive 7
direc tion

Circums tan ce 2 Nega tive 7 St art point


direc tion

Circ umst anc e 3 St art p oint

Ne gativ e
7
dire ct io n

Z pu ls e

Home s witc h

P osit iv e limit s wit ch

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

Circums ta nce 1 S tart 8 P os it iv e dire ct ion


po in t

Circ ums tanc e 2 Start point

8 P os it iv e dire ct ion

Circ ums tanc e 3


St art
po int

8 Pos itive direct io n

Z puls e

Home s wit ch

Pos it ive limit 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

Circumst ance 1 St art


point

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

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

Circ umst anc e 1 Sta rt 10 Pos it ive direc tion


point

Circ umst anc e 2 St art 10 Pos itiv e direc tion


point

Circ ums tanc e 3 St art


point

10 P osit iv e direct io n

Z puls e

Ho me s wit ch

P osit iv e limit switc h

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

11 Pos itive direc tion

Circu mst ance 2 Start 11 Pos itiv e direc tion


point

St art
Circ umst anc e 3 point

11 Pos itiv e 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 (○
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

Circums ta nce 1 Nega tive 12 S tart


direc tion p oin t

Circums ta nce 2 Sta rt


point

Neg ative 12
d irec tion

Circums tan ce 3 St art


point

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

Circumsta nce 1 S tart


po in t
13 Posit ive direct ion

Circumsta nce 2 St art


point

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

Circumsta nce 1 Negat ive 14 St art


direct ion po int

Circumsta nce 2 Negat ive 14 St art


direct ion po in t

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)

Mode 15 and mode 16 are reserved for future development.


Mode 17~mode 30 Homing which has nothing to do with Z pulse
In mode 17~mode 30 which are respectively similar to mode1~mode 14 mentioned previously, the axis has
nothing to do with Z pulse but the relevant home switch and limit switch status while returning to the home
position. Mode 17 is similar to mode 1, mode 18 is similar to mode 2, mode 19 & mode 20 is similar to mode
3, mode 21 & mode 22 is similar to mode 5, mode 23 & mode 24 is similar to mode 7, mode 25 & mode 26 is
similar to mode 9, mode 27 & mode 28 is similar to mode 11, and mode 29 & mode 30 are similar to 13. D_

D- 1 3
DVP-50MC Series Motion Controller Operation Manual

 Mode 17 Homing which depends on the negative limit switch


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 servo is when
the negative limit switch is OFF is the home position.
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
servo is is the home position when the negative limit switch is OFF.

Circ ums tanc e 1 S tart point

17 Po sitiv e d irec tion

Circ ums tanc e 2


17 Po sitiv e d irec tion
S tart point

Negat ive
limit s wit ch


Homing depending on the negative limit switch (17: mode 17)

 Mode 18 Homing which depends on the positive limit switch


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 servo is is the
D 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
servo is is the home position while the positive limit switch is OFF.

Circums tan ce 1
Start point

Neg ative direc tion 18

Circ umst anc e 2 Ne gativ e d irec tion 18 St art 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

Circumstance 2 Ne gative 19 Sta rt


dire ct ion point

Home swit ch

Homing depending on the home switch (○


19: mode 19)

 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

Circ ums tanc e 2 Negati ve 20


19 Start
dire ction point

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

Circ ums tanc e 2 Start 21 Pos itive direc tion


point

Home switc h

Homing depending on the home switch (○


21: mode 21)

 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

Circ ums tanc e 2 Start 21


22 Pos iti ve di rec tion
point

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.

Circumstance 1 St art point

Neg ative direction 23

Circumstan ce 2 Neg ative direction 23 Start po in t

S tart point
Circumst ance 3

Neg ative direction 23

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

C irc um s tan ce 1 St a rt p oin t

N e g a tive d ire ct ion 243


2

C i rcum s tan ce 2 N e g a tive d ire ct ion 243


2 S tar t po in t

S ta rt p oin t
Circ u mst a nc e 3

N e g a tive d ire ct ion 243


2

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

Circ umst anc e 1 26 Pos itiv e


Start po int direc tion

26 Pos itiv e
Circ umst anc e 2 Start point direc tion

Circums ta nce 3 St art point

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

Circumsta nce 1 St art point

27 Positive direction

Circumst ance 2 S tart point 27 Positive direction

Circumsta nce 3 St art point

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

Circums tance 1 Start point

27
28 Pos iti ve di rec tion

Circ umstanc e 2 Start point 27


28 Pos iti ve di rec tion

Ci rcumstance 3 Start point

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

Circu mst ance 2 Negat iv e 30 S tart


direc tion p oint

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)

Mode 31 and mode 32 Reserved for future development.


Mode 33 ~ mode 34 Homing which depends on Z pulse
 Mode 33
In mode 33, MC_Home instruction is executed and the axis moves at the second-phase speed in the negative
direction. And the place where the axis stands is the home position once the first Z pulse is met.
 Mode 34
In mode 34, MC_Home instruction is executed and the axis moves at the second-phase speed in the positive
direction. And the place where the axis stands is the home position once the first Z pulse is met.

D
33

34

Z p u lse

Homing depending on Z pulse (○


33: mode 33, ○
34: mode 34)

 Mode 35 Homing which depends on the current position


In mode 35, MC_Home instruction is executed, the axis does not move and its current position is regarded
as the home position.

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.1 Accessories for EtherCAT Communication


 Cables

Figure Model Length Diameter(AWG)


UC-EMC003-02A 0.3M 4#22 PVC

UC-EMC005-02A 0.5M 4#22 PVC

UC-EMC010-02A 1.0M 4#22 PVC


UC-EMC020-02A 2.0M 4#22 PVC
UC-EMC050-02A 5.0M 4#22 PVC
UC-EMC100-02A 10.0M 4#22 PVC
UC-EMC200-02A 20.0M 4#22 PVC

E-2
Appendix E. List of Accessories

E.2 Accessories for CANopen Communication


 Cables

Figure Model Length Diameter(AWG)


UC-DN01Z-01A 305M 2#15,2#18 SHLD PVC(Thick cable)

UC-DN01Z-02A 305M 2#22,2#24 SHLD PVC(Thin cable)

UC-CMC003-01A 0.3M 4#26,1#24 PVC(Thin cable)

UC-CMC005-01A 0.5M 4#26,1#24 PVC(Thin cable)

UC-CMC010-01A 1.0M 4#26,1#24 PVC(Thin cable)

UC-CMC015-01A 1.5M 4#26,1#24 PVC(Thin cable)

UC-CMC020-01A 2.0M 4#26,1#24 PVC(Thin cable)

UC-CMC030-01A 3.0M 4#26,1#24 PVC(Thin cable)

UC-CMC050-01A 5.0M 4#26,1#24 PVC(Thin cable)

UC-CMC100-01A 10.0M 4#26,1#24 PVC(Thin cable)

UC-CMC200-01A 20.0M 4#26,1#24 PVC(Thin cable)

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

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

TB3 TB4 TB5

Thin Cable Thin Cable Thin Cable

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

TB3 TB4 TB5

Thin Cable Thin Cable Thin Cable

Connector Removable terminals(5.08mm)


Terminal
120Ω
resistor

 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

E.3 Accessories for PROFIBUS DP Communication


 Connector

○1 ○2 ○3

Model

UN-03PF-01A UN-03PF-02A UN-03PF-03A


Connector Male DB9 connector Male DB9 connector Male DB9 connector
Program planning
-- Female DB9 connector --
connector
Terminal resistor*1 120Ω 120Ω 120Ω
*1.:Please set the switches of the connectors to ON when the connectors are placed at two ends of the
PROFIBUS network. Set the switches of the connectors to OFF if they are not placed at two ends of
the PROFIBUS network.

 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

E.4 Accessories for DeviceNet Communication


 Cable

Figure Model Length Diameter(AWG)


UC-DN01Z-01A 305M 2#15,2#18 SHLD PVC (Thick)
UC-DN01Z-02A 305M 2#22,2#24 SHLD PVC (Thin)

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)

3. The maximum communication distance at a transmission speed is regulated in the DeviceNet


protocol. The relationships between maximum communication distances and transmission speeds
are shown in the following table.
Transmission speed
10K 20K 50K 125K 250K 500K
(bit/s)
Max. communication
5000 2500 1000 500 250 100
distance(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

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

TB3 TB4 TB5

Thin Cable Thin Cable Thin Cable

V- V-
Thick/Thin Cable

E
Thick/Ttin C able

L L
TB1
TB2

S S
TAP-CP01
H H
(Power V+ V+

distribution EF2 EF1

box )
121

V+ V- S
J1

Connector Removable terminals(5.08mm)


Terminal
120Ω
resistor

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

You might also like