MITSUBISHI CNC M700V, M70 Programming Manual

MELSEC and MELDAS are registered trademarks of Mitsubishi Electric Corporation. Microsoft, Windows and Microsoft Windows NT are registered trademarks of Microsoft Corporation in the United States and/or other countries. Pentium is a registered trademark of Intel Corporation in the United States and/or other countries. PC-9800 is a registered trademark of NEC Corporation. All other company names and product names in this document are trademarks or registered trademarks of the respective companies.

Introduction

These specifications are the programming manual used when creating the sequence progr am with the PLC development software, or Mitsubishi Electric Co.'s integrated FA software MELSOFT series (GX Developer). The PLC (Programmable Logic Controller) instructions are largely categorized into the basic instructions, function instructions and exclusive instructions. There are many types of instructions. The instructions can be used according to the purpose and application such as the PLC support function used when supporting the user PLCs. In addition to the explanation of instructions and functions, the environment to develop the user PLC using GX Developer, especially the usage unique to MITSUBISHI CNC, is described. Explanations on the built-in PLC edit function (onboard PLC edit func t ion ) op er a tion s ar e als o give n .
Details described in this manual
CAUTION
An effort has been made to describe special handling of this machine, but items that are not described must be interpreted as "not possible". Some screens and functions may differ or some functions may not be usable depending on the NC version.
General precautions
Refer to each manual for details on the MITSUBISHI CNC Series PLC, and for details on the various tools in this manual. The explanations and screens for the various to ols in this manual may differ slightly accordin g to the tool version. Refer to the respective manual for details.
[MELSEC Series Software Package Manual]
GX Developer Version 8 Operating Manual (Startup Section)
GXDEV8-0-IN-E 13JU40 SH-080372E
GX Developer Version 8 Operating Manual
GXDEV8-0-E 13JU41 SH-080373E
GX Converter Version 1 Operating Manual
SW0D5-CNVW (OPE)-E 13J949 IB-080004E
(Caution)
- The version numbers are current as of the editing of this manual, but may be updated in the future.
- GX Developer Version 8 (Model SW8D5C-GPPW) is the new name of the old "Windows Version GPP Function Software Package" (common name GPPW).
- GX Converter Version 1 (Model SW2D5C-CNVW) is the new name of the old "Windows Version Data Conversion Software Package" (common name CNVW).

Precautions for Safety

WARNING
CAUTION
DANGER
Always read the specifications issued by the machine tool builder, this manual, related manuals and attached documents before installation, operation, programmi ng, maintenance or inspection to ensure correct use. Understand this numerical controller, safety items and cautions before using the unit. This manual ranks the safety precautions into "DANGER", "WARNING" and "CAUTION".
DANGER
Note that even items ranked as " CAUTION", may lead to major results depending on the situation. In any case, important information that must always be observed is described.
Not applicable in this manual.
When there is a great risk that the user could be subject to fatalities or serious injuries if handling is mistaken.
When the user could be subject to fatalities or serious injuries if handling is mistaken.
When the user could be subject to injuries or when physical damage could occur if handling is mistaken.
WARNING
Not applicable in this manual.
1. Items related to product and manual
DANGER
For items described as "Restrictions" or "Usable State" in this manual, the instruction manual issued by the machine tool builder takes precedence over this manual.
An effort has been made to describe special handling of this machine, but items that are not described must be interpreted as "not possible".
This manual is written on the assumption that all option functions are added. Refer to the specifications issued by the machine tool builder before starting use.
Refer to the Instruction Manual issued by each machine tool builder for details on each machine tool. Some screens and functions may differ or some functions may not be usable depending on the NC
version.
2. Items related to start up and maintenance
Read this manual carefully and confirm the safety enough before executing the operation of the program change, forced output, RUN, STOP, etc. during operation. Operation mistakes may cause damage of the machine and accidents.
3. Items related to program development
Always observe the cautions before developm en t to deve lo p a pr og ram . If the data transferred does not follow the file name rule, the CNC will mistake it for another data,
resulting in unexpected operation, e.g. PLC program erasure. Do not read a sequence program on which a conversion error occurred into the GX Developer. The file
may include unexpected contents to result an illegal operation.
When an error occurred at GX Developer On-line function, the error message may not explain exactly
the state in the CNC side. Always refer to the error list.

CONTENTS

I. OUTLINE
1 System Configuration... ... .... ... ... ....................................... ... ... .... ...................................... ........................... 1
1.1 System Configuration for PLC Development ......................................................................................... 2
1.2 User PLC (Ladder) Development Procedure......................................................................................... 3
II. PROGRAMMING EXPLANATION
1 Outline.. .... ...................................... .... ... ... ... ....................................... ... .... ... ................................................. 1
2 PLC Processing Program............................................................................................................................ 3
2.1 PLC Processing Program Level and Operation..................................................................................... 4
2.2 Outline of PLC Processing Program (Two Program Method)................................................................ 5
2.3 Independent Program Method............................................................................................................... 6
2.4 Multi-program Method.......................... .... ... ... ... ... .... ...................................... .... ... ... .............................. 7
2.4.1 Number and Types of Registerable Programs............................................................................... 7
2.4.2 Program Execution Order.............................................................................................................. 7
2.5 User Memory Area Configuration and Size ............................................. ... ... .... ... ... ....... ... ... ... ... ........... 9
2.5.1 Independent Program Method....................................................................................................... 9
2.5.2 Multi-program Method.................................................................................................................... 9
2.6 Storing PLC Processing Program and Execution Mode ...................................................................... 10
2.6.1 Path from Storage to Execution................................................................................................... 10
2.6.2 Conversion of Instruction Code at Execution...............................................................................10
2.6.3 How to Confirm the Number of Steps at Storage/Execution........................................................ 10
3 Input/Output Signals.. ... ... .... ... ... ... .... ... ... ... ................................................................................................ 11
3.1 Input/Output Signal Types and Processing.......................................................................................... 12
3.2 Handling of Input Signals Designated for High-speed Input .............. ... ... ... ... .... ... ... ... ....... ... ... ... .... ... .. 14
3.3 High-speed Input/Output Designation Method..................................................................................... 15
4 Parameters..................................... ....................................... ... .... ... ............................................................ 17
4.1 PLC Constants..................... ... ....................................... ... .... ... ... ......................................................... 18
4.2 Bit Selection Parameters ..................................................................................................................... 20
4.3 Other Parameters .................................... ... ... ... ... .... ... ....................................... ... ... ... ......................... 24
4.3.1 PLC Startup Condition Switchover............................................................................................... 24
5 Explanation of Devices.... .... ...................................... .... ... ... ... ....................................... ... ......................... 25
5.1 Devices and Device No.................. ... ... .... ... ... ... ... .... ...................................... .... ... ... ... ......................... 26
5.2 List of Devices................ ... ... ... ....................................... ... .... ... ............................................................ 26
5.3 Detailed Explanation of Devices.......................................................................................................... 27
5.3.1 Input/Output X, Y ......................................................................................................................... 27
5.3.2 Internal Relays M and F, Latch Relay L....................................................................................... 28
5.3.3 Special Relay for Link (SB), Special Register for Link (SW)......................... ............................... 28
5.3.4 Link Relay B, Link Register W ..................................................................................................... 28
5.3.5 Special Relay SM, Special Register SD ...................................................................................... 29
5.3.6 Edge relay V ................................................................................................................................ 30
5.3.7 Timer T......................................................................................................................................... 30
5.3.8 Integrated Timer ST..................................................................................................................... 33
5.3.9 Counter C..................................................................................................................................... 34
5.3.10 Data Register D ......................................................................................................................... 35
5.3.11 File Register R........................................................................................................................... 36
5.3.12 Index register Z.......................................................................................................................... 37
5.3.13 Nesting N................................................................................................................................... 38
5.3.14 Pointer P.................................................................................................................................... 39
5.3.14.1 General Pointers................................................................................................................ 40
5.3.14.2 Local Pointers.................................................................................................................... 40
5.3.14.3 Common Pointers.............................................................................................................. 42
5.3.14.4 Reserved Pointers ............................................................................................................. 43
5.3.15 Decimal Constant K ................................................................................................................... 45
5.3.16 Hexadecimal Constant H......................... ....................................... ... ... ... ................................. 45
6 Explanation of Instructions....................................................................................................................... 47
6.1 Compatible Instructions and Extended Instructions............................................................................. 48
6.2 Instruction Tables................................... ... .... ... ....................................... ... ... ... .................................... 50
6.2.1 How to Read Instruction Table..................................................................................................... 50
6.2.2 Basic Instructions........... ....................................... ... ... ... ....................................... ... ....................52
6.2.3 Comparison operation Instructions.......................... ... ... .... ... ... ... ....... ... ... ... .... ... ... ... .... ... ... ... ....... 54
6.2.4 Arithmetic Operation Instructions................................................................................................. 55
6.2.5 Data Conversion Instructions................ ... ... ... ....................................... ... ... .... ............................. 57
6.2.6 Data Transmission Instructions.................................................................................................... 58
6.2.7 Program Branch Instruction .............. .... ... ... ... ....................................... ... ... .... ............................. 59
6.2.8 Logical Operation Instructions .................................................................................................... 59
6.2.9 Rotation Instructions ................... ... ....................................... ... ... .... ... .......................................... 61
6.2.10 Data Processing Instructions .............. ... ....................................... ... ... ... ... ................................. 62
6.2.11 Other Function Instructions........................................................................................................ 62
6.2.12 Special Instructions for Old Machine Type Compatible ............................................................. 63
6.2.13 Exclusive Instructions ..................................... .... ... ... ... .... ...................................... .... ................ 63
6.3 Data Designation Method.......................... .... ... ... ....................................... ... ... ... ................................. 64
6.3.1 Bit Data....................... ...................................... .... ... ... ....................................... .......................... 64
6.3.2 Word (16-bit) Data ....................................................................................................................... 65
6.3.3 Using Double Word Data (32 bits) ............................................................................................... 67
6.4 Index Modification............................ ... ... ... .... ... ... ... ....................................... ... ... .... ............................. 69
6.4.1 For Models without Extended Index Modification ........................................................................ 69
6.4.2 For Models with Extended Index Modification ............................................................................70
6.5 Operation Error ......... ....................................... ... ... ... ....................................... ... .... ... .......................... 73
6.6 Execution Condition of Instruction........................................................................................................74
6.7 Counting Step Number......................................................................................................................... 75
6.8 Operations when the OUT, SET/RST, or PLS/PLF Instruction of the Same Device is Used.......... 76
6.9 How to Read Instruction Tables........................................................................................................... 79
7 Basic Instructions...................................................................................................................................... 81
7.1 Contact instruction ........................................ ... ... ... ... .... ... ....................................... ... .......................... 83
7.2 Connection Instruction .......... ... ... ....................................... ... .... ... ... .................................................... 86
7.3 Output Instruction... .............................................................................................................................. 98
7.4 Shift Instruction ...... ....................................... ... ... ....................................... ... ... ... ............................... 113
7.5 Master Control Instruction.................................................................................................................. 115
7.6 Other Instructions................................ ... ... .... ... ....................................... ... ... ... .................................. 118
8 Function Instructions .............................................................................................................................. 123
8.1 Comparison Operation Instruction ............................................. ... ... ... ...............................................125
8.2 Arithmetic Operation Instruction......................................................................................................... 129
.................................................................................. 155
8.3 Data Conversion Instruction..........................
8.4 Data Transfer Instruction.................................................................................................................... 161
8.5 Program Branch Instruction .......................................... ... ... ....................................... ... ... .................. 175
8.6 Logical Operation Instructions................... .... ... ... ... ... .... ...................................... .... ... ... ..................... 187
8.7 Rotation Instruction................................ ... ....................................... ... .... ... ... ..................................... 207
8.8 Data Processing Instructions .... ... ....................................... ... .... ... ... .................................................. 225
8.9 Other Instructions................................ ... ... .... ... ....................................... ... ... ... .................................. 239
8.10 Special Instructions For Old Machine Type Compatible.................................................................. 241
9 Exclusive Instructions............................................................................................................................. 247
9.1 ATC Exclusive Instruction......................... .... ... ... ....................................... ... ... ... ............................... 249
9.1.1 Outline of ATC Control...................... .... ...................................... .... ... ... ... .................................. 249
...
9.1.2 ATC Operation........................................................................................................................... 249
9.1.3 Explanation of Terminology ....................................................................................................... 250
9.1.4 Relationship between Tool Registration Screen and Magazines............................................... 251
9.1.5 Use of ATC and ROT Instructions ............................................................................................. 252
9.1.6 Basic Format of ATC Exclusive Instruction................................................................................ 254
9.1.7 Instruction List............................................................................................................................ 255
9.1.8 Control Data Buffer Contents..................................................................................................... 255
9.1.9 File Register (R Register) Assignment and Parameters............................................................ 256
9.1.10 Details of Each Instruction....................................................................................................... 260
9.1.11 Precautions for Using ATC Exclusive Instructions................................................................... 269
9.1.12 Examples of Tool Registration Screen.....................................................................................270
9.1.13 Display of Spindle Tool and Standby Tool............................................................................... 272
9.2 ROT Instructions............................................... ... .... ... ... ... .... ...................................... ....................... 273
9.2.1 Instruction List............................................................................................................................ 273
10 PLC Help Function............. ... ....................................... ... ... ... .... ...................................... ....................... 277
10.1 Tool Life Management (Machining Center System)......................................................................... 279
10.1.1 Outline of Tool Life Management Function.............................................................................. 279
10.1.2 Tool Life Management Methods .............................................................................................. 280
10.1.3 Procedure when tool command is executed............................................................................ 280
10.1.4 Procedure when Spindle Tool is Changed............................................................................... 281
10.1.5 Tool Life Management II Method............................................................................................. 281
10.1.6 Maximum Number of Registerable Tools................................................................................. 282
10.1.7 Tool Data ................................................................................................................................. 282
10.1.8 Usage Time, Work Count......................................................................................................... 285
10.1.9 Tool Data Flow (R Register) .................................................................................................... 286
10.1.10 User PLC processing............................................................................................................. 288
10.1.11 Interface with PLC.................................................................................................................. 289
10.2 External Search ........................................ ....................................... ... ... ... ... .................................... 292
10.2.1 Detailed Explanation................................................................................................................ 292
10.2.2 PLC NC Interface Signal ..................................................................................................... 293
10.2.3 NC PLC Interface Signal ................................ ... .... ... ... ... ....................................... ... ... .... ... 294
10.2.4 Timing Chart ............................................................................................................................ 294
10.2.5 External Search Status............................................................................................................ 294
10.2.6 Precautions.............................................................................................................................. 295
10.2.7 Usage Example........................................................................................................................ 295
10.3 PLC Axis Control....................... ... ... ... .... ... ... ... ....................................... ... ... .... ................................ 296
10.3.1 Specifications........................................................................................................................... 296
10.3.2 Detailed explanation ................................................................................................................ 297
10.3.3 PLC Interface........................................................................................................................... 298
10.3.4 Details of PLC Axis Control Information Data.......................................................................... 300
10.3.5 Timing Chart ........................................................................................................................... 306
10.3.6 Reference Position Return Near Point Detection..................................................................... 310
10.3.7 Handle Feed Axis Selection.................................................................................................... 310
10.3.8 Single Mode............................................................................................................................. 311
10.3.9 Buffering Mode......................................................................................................................... 311
10.3.10 PLC Axis Monitor.......................................................................................................
.11 Absolute Position Detection................................................................................................... 314
3
10.
10.3.12 Usage Example...................................................................................................................... 314
10.4 External Machine Coordinate System Compensation ..................................................................... 315
10.5 Alarm Message Display................................................................................................................... 316
10.5.1 Interface................................................................................................................................... 316
10.5.2 Screen Display......................................................................................................................... 318
10.5.3 Message creation..................................................................................................................... 318
10.5.4 Parameters .............................................................................................................................. 318
10.6 Operator Message Display .............................................................................................................. 320
10.6.1 Interface................................................................................................................................... 320
10.6.2 Operator Message Preparation................................................................................................ 321
10.6.3 Operator Message Display Validity Parameter........................................................................ 321
10.7 PLC Switches.................. ... ... .... ...................................... .... ... ... ....................................................... 322
............ 314
10.7.1 Explanation of Screen.............................................................................................................. 322
10.7.2 Explanation of Operation ......................................................................................................... 323
10.7.3 Signal Processing........................... .... ...................................... .... ... ... ... .................................. 324
10.7.4 Switch name preparation ......................................................................................................... 328
10.8 Load Meter Display.......................................................................................................................... 329
10.8.1 Interface....................................................... ... .... ... ... ....................................... ... .....................329
10.9 PLC Axis Indexing............................................................................................................................332
10.9.1 Functions ..................................... ... .... ... ... ... ... ....................................... ... .... ... ........................ 332
10.9.2 Programming and Setting ........................................................................................................ 334
10.9.2.1 Operation Function: Automatic Mode .............................................................................. 334
10.9.2.2 Operation Function: Manual Mode................................................................................... 339
10.9.2.3 Operation Function: JOG Mode....................................................................................... 340
10.9.2.4 Operation Function: Incremental Feed ............................................................................ 341
10.9.2.5 Operation Function: Manual Handle Feed .......... .......................................................... .. 342
10.9.2.6 Operation Function: Reference Position Return ............................................................. 343
10.9.2.7 Machine Compensation Function: Backlash Compensation............................................ 344
10.9.2.8 Protection Function: Interlock ......................................................................................... 344
10.9.2.9 Protection Function: Stored Stroke Limit ......................................................................... 345
10.9.2.10 Protection Function: Servo OFF ...................................................................................345
10.9.2.11 Miscellaneous Function: Feedrate Override.................................................................. 346
10.9.2.12 Miscellaneous Function: Position Switch ...................................................................... 346
10.9.2.13 NC axis Control Selection..............................................................................................346
10.9.3 Setup ........................... ....................................... ... ... ... ............................................................ 350
10.9.3.1 Initial Parameter Settings: Selecting Axes to Use in PLC Axis Indexing (#12800) .........350
10.9.3.2 Initial Parameter Settings: Setting the Control Parameter 1 ............................................ 352
10.9.3.3 Initial Parameter Settings: Setting Stations (#12801 to #12805, #12850 to #12868) .....353
10.9.3.4 Initial Parameter Setting: Setting Operation parameter groups (#12810 to #12848) ...... 358
10.9.3.5 Initial Parameter SettingSetting Position Switches (#12870 to #12900)...................... 364
10.9.3.6 Absolute Position Zero Point Initialization Set: Machine End Stopper Method ............... 365
10.9.3.7 Absolute Position Zero Point Initial Setting: Marked Point Alignment Method................. 366
10.9.4 Test Operation in Auxiliary Axis Test Screen........................................................................... 367
10.10 Direct Screen Selection..................................................................................................................368
10.10.1 Screen Selection Information................................................................................................. 369
10.10.2 iming Chart............................................................................................................................. 370
10.10.3 Precautions............................................................................................................................ 370
10.10.4 Restrictions............................................................................................................................ 370
11 Appendix................................................................................................................................................. 371
11.1 Example of Faulty Circuit..................................... ... .... ... ....................................... ... ... ... .................. 372
III. PERIPHERAL DEVELOPMENT ENVIRONMENT
1 Outline........................................................................................................................................................... 1
1.1 Software Configuration........................ ... ....................................... ... ... .... ... ............................................2
1.2 Operating Environment..........................................................................................................................3
2 GX Developer Functions Supported by MITSUBISHI CNC....................................................................... 5
2.1 Function Support Conditions (General Section)............................... ... .... ... ... ... ... ....... ... ... .... ... ... ... ......... 6
2.2 Function Support Conditions (Online Section)........................................................ ... ... ... .................... 10
3 Preparation ................................................................................................................................................. 15
3.1 Installing the Tools............................................................................................................................... 16
3.2 Preparation for Serial (RS-232C) Communication........................................................................ ... ....16
3.2.1 Connecting the Serial Cable .................... ... ....................................... ... ... ... .... ............................. 16
3.2.2 Setting the Connection Target ................. ... ....................................... ... ... ... .... ............................. 17
3.3 Preparation for Ethernet Communication ...... ... ... ... ... .... ... ... ... .... ... ... ... .... ... ... ...... .... ... ... ... .... ... ... .......... 18
3.3.1 Confirming IP Address of the CNC Unit....................................................................................... 18
3.3.2 Setting IP Address for the Personal Computer Side........... ... .... ... ... ... ... .... ... ... ... .... ... ... ...... .... ... .. 18
3.3.3 Connecting the Ethernet Cable........ ...... ... ... .... ... ... ... .... ... ... ... .... ... ... ... ... ....... ... ... .... ... ... ... ... ......... 19
3.3.4 Setting the Connection Target..................................................................................................... 20
4 Common Items..................................... ... ....................................... ... ... .... ... ............................................... 21
4.1 Precautions Before Development..................... ... ....................................... ... .... ... ... ............................ 22
4.2 NC-related Parameters..................................................... .... ...................................... .... ..................... 23
4.3 PLC Data Storage Areas ..................................................................................................................... 24
4.4 File Name................... .... ...................................... .... ... ... ... ....................................... ............................ 27
4.4.1 File Name Rule for Sequence Program, Parameter, and Device Comment................................ 27
4.4.2 File Name Rule for Message Data............................................................................................... 28
4.5 Creating a Project....................... ... ... ... .... ... ... ... ....................................... ... ... .... .................................. 30
4.5.1 Project.......................................................................................................................................... 30
4.5.2 Operating Procedures.................................................................................................................. 31
4.6 Setting the Parameters .................. ... ... .... ... ... ... ....................................... ... ... .... .................................. 32
4.6.1 Parameter Setting Screen............................................................................................................ 32
4.6.2 Setting the Number of Device Points........................................................................................... 33
4.6.3 Setting the Number of Common Pointer Points...................................................... ... ... ... ............ 34
4.6.4 Setting the Program Execution Order.................... ... .... ... ... ... .... ... ... ... ... ....... ... ... .... ... ... ... ... .... ..... 35
4.6.5 Writing and Reading Parameters to and from the CNC Controller.............................................. 36
4.7 Starting/Stopping the PLC ....................................... ... ... ... .... ... ... ....................................... .................. 37
4.7.1 Operation Procedure.................................................................................................................... 37
4.8 Ladder Program Writing during RUN.................................................... ... ... ... ...................................... 38
4.8.1 Setting Ladder Program Writing during RUN......... ... .... ... ... ... .... ... ... ... ... .... ... ... ....... ... ... ... ... .... ... .. 38
4.8.2 PLC Data Available for Ladder Program Writing during RUN....................................... ... ... .... ..... 39
4.8.3 Data Unit for Writing..................................................................................................................... 39
4.8.4 Available Number of Steps for Writing......................................................................................... 40
4.8.5 Operation with GX-Developer...................................................................................................... 41
4.8.5.1 Common "Conversion" Operation........................................................................................ 41
4.8.5.2 Executing "Conversion (online change)" ............................................................................. 42
4.8.5.3 Setting Ladder Program Writing during RUN before Executing "Conversion"..................... 42
4.8.5.4 Executing "Conversion" in "Monitor (Write mode)".............................................................. 43
4.8.5.5 Operation when Ladder Program Writing during RUN is Disabled...................................... 43
4.8.6 Precautions.................................................................................................................................. 44
4.8.6.1 Limitations on Program Configuration ................................................................................. 44
4.8.6.2 Precautions for Command Operation in Ladder Programming Writing during RUN.......... .. 45
4.8.6.3 Other Precautions................................................................................................................ 46
4.9 Keyword Registration.................. ... ... ... ....................................... ... .... ... ............................................... 47
4.9.1 Data Protected by a Keyword...................................................................................................... 47
4.9.2 Operations Prohibited by a Keyword ........................................................................................... 47
4.9.3 Structure of the Keyword Function............................................................................................... 47
4.9.4 File Names Excluded from the Target of Keyword Protection................................ ... ... ... ... .... ... .. 48
4.9.5 Compatibility and Precautions when Using the System with No Keyword Support..................... 49
4.9.6 Registering a Keyword. ....................................... ... ... .... ...................................... .... ... ... ............... 50
4.9.7 Canceling the Keyword................................................................................................................ 51
4.9.8 Disabling the Keyword................................................................................................................. 52
4.9.9 Disabling the Keyword as Required when Accessing to CNC..................................................... 52
5 Sequence Program Development............................................................................................................. 53
5.1 Development Procedures .................................... .... ... ... ... .... ...................................... .... ... .................. 54
5.1.1 Method for Using Sequence Program Developed with PLC4B.................................................... 54
..
5.2 Writing the Sequence Program to the CNC Controller
5.2.1 Operation Procedure.................................................................................................................... 55
5.2.2 Writing Operation......................................................................................................................... 56
5.2.3 Operations and Check Items at Conversion Error....................................................................... 56
5.2.4 Operations and Check Items at the Other Errors......................................................................... 58
5.3 Reading the Sequence Program from the CNC Controller.................................................................. 60
5.3.1 Operation Procedure.................................................................................................................... 60
5.4 Verifying the Sequence Programs ....................................................................................................... 62
5.4.1 Operation Procedure.................................................................................................................... 62
...................................................................... 55
5.5 Using Sequence Programs from Older Models.................................................................................... 63
5.5.1 Starting GX Converter and Specifying the File to be Converted.................................................. 63
5.5.2 Conversion Format Setting .......................................................................................................... 63
5.6 Monitoring the Sequence Program ...................................................................................................... 66
5.6.1 Operation Procedure................ ...................................... .... ... ... .................................................... 66
5.7 Executing Sampling Trace on Device.................................................................................................. 67
5.7.1 Basic Operation .......................... ... ... .... ... ... ... ....................................... ... ... .... ............................. 68
5.7.2 Basic Specifications.................................................... ... .... ... ... ... .... ............................................. 70
5.7.3 Status of Special Relay during Sampling Trace........................................................................... 73
5.7.4 Sampling Trace Operation Screen............................................................................................... 74
5.7.4.1 Sampling Trace Main Screen............................................................................................... 74
5.7.4.2 Wizard Setting/Execution Screen ........................................................................................ 76
5.7.4.3 Trace Setting........................................................................................................................ 77
5.7.4.4 Trace Execution................................................................................................................... 83
5.7.4.5 Trace Result.........................................................................................................................85
5.7.5 Operation at Error.......................... ....................................... ... ... .... ............................................. 86
5.7.6 Operation Example.................. ... ... ... .... ... ... ... ....................................... ... ... .... ............................. 86
5.7.7 Precautions.............................................. ... ... ... .... ... ... ....................................... ... ....................... 88
6 PLC Message Development ...................................................................................................................... 91
6.1 Development Procedure . .... ... ... ....................................... ... ... .... ...................................... .................... 92
6.1.1 Using a General Text Editor.............. .... ...................................... .... ... ... ... .................................... 93
6.1.2 Entering Messages Directly from GX Developer ..................................... ... .... ... ... ... .... ... ... ...... .... 93
6.2 Message Data Description Method...................................................................................................... 94
6.2.1 Description Format............ ... .... ... ... ... .... ... ....................................... ... ... ... .................................... 94
6.2.2 Description Method............................................... ... ....................................... ... ... ... .... ................95
6.2.3 Precautions.............................................. ... ... ... .... ... ... ....................................... ... ....................... 96
6.3 Converting Data into GX Developer Format .............................. ... ....................................... ... ... ... ....... 97
6.3.1 Starting GX Converter and Specifying the File to be Converted.................................................. 97
6.3.2 Conversion Format Setting .......................................................................................................... 97
6.4 Entering/Editing Data using GX Developer........................................................................................ 100
6.4.1 Interlinear Statement Display using Circuit Display ................................................................... 100
6.4.2 Interlinear Statement Display using List Display........................................................................ 101
6.4.3 Editing of Integrated Type Interlinear Statements...................................................................... 102
6.5 Writing to the CNC Controller............................................................................................................. 103
6.5.1 Operation Procedure................ ...................................... .... ... ... .................................................. 103
6.5.2 Writing Operation.............................................. .... ... ... ....................................... ... ... ..................103
6.5.3 Operation at Write Error................. ... .... ... ... ... ... ....................................... ... .... ... ........................ 104
6.5.4 How to Confirm the Error Position ............................................................................................. 105
6.6 Reading and Verifying from the CNC Controller................................................................................ 106
6.6.1 Menu Selection/Screen Operation.............................................. .... ... ... ... .................................. 106
7 Device Comment Creation ...................................................................................................................... 107
7.1 Development Procedure . .... ... ... ....................................... ... ... .... ...................................... .................. 108
7.2 Description Method for Indirect Entry................................................................................................. 109
7.3 Converting Comment Data into GX Developer Data........................ ... .... ... ... ... ... .... ... ... ... ....... ... ... ... .. 110
7.3.1 Starting GX Converter and Specifying the File to be Converted................................................ 110
7.3.2 Conversion Format Setting ................................................................................................
e
8 Troubl
8.1 List of Errors During GX Developer Online Operations...................................................................... 114
8.2 Confirmation of PLC Alarms on CNC Controller Side................... ... ... .... ... ... ... ... .... ... ... ... .... ... ...... ... .. 117
8.3 Initialization for PLC Data Storage Area ............................................................................................ 121
shooting....................................................................................................................................... 113
8.2.1 Operating Procedures.................... ... ....................................... ... .... ... ... ..................................... 117
8.2.2 Details of Each Display.............................................................................................................. 118
8.2.3 Detailed Error Information Display.............................................................................................118
8.2.4 Display of the Error-generated Ladder....................................................................................... 119
8.2.5 List of Corresponding PLC Alarms............................................................................................. 120
8.3.1 Operation Procedure................ ...................................... .... ... ... .................................................. 121
........ 110
9 Procedures for Backing Up Data Such as Sequence Programs ......................................................... 123
9.1 Backup Target Data.................................................... ... ....................................... ... ... .... ................... 124
9.2 Backup Procedures.............. ....................................... ... ... .... ...................................... .... ................... 125
9.3 Restoring Backed Up Data .. ... .... ... ... ... .... ... ....................................................................................... 126
IV. EXPLANATION OF BUILT-IN EDITING FUNCTION
1 Outline.. .... ...................................... .... ... ... ... ....................................... ... .... ... ................................................. 1
2 Starting and Ending Onboard.................................................................................... ................................. 7
2.1 Starting.............. ....................................... ... ... ....................................... ... ... ... ........................................ 8
2.1.1 Startup with Standard Operation Mode.......................................................................................... 8
2.1.2 Startup with Simple Operation Mode............................................................................................. 9
2.1.3 M700VS/M70 Series Startup ....................................................................................................... 10
2.2 Ending............................ ... ... ... .... ... ... ....................................... ... ... .... .................................................. 11
2.3 Switching from Simple Operation Mode to Standard Operation Mode ................................................ 12
2.4 Switching from Standard Operation Mode to Simple Operation Mode ................................................ 12
3 Screens.......................................... .... ...................................... .... ... ... ... ...................................................... 15
3.1 Screen Resolution............................................................................................................................... 16
3.2 Types......................... .... ... ... ... .... ... ... ....................................... ... ... .... .................................................. 16
3.3 Full Screen Display.............................................................................................................................. 17
3.4 Color-coded Display of "LADDER" Screen.......................................................................................... 20
3.5 Split Display...................... ... ... .... ... ... ... .... ...................................... .... ... ... ............................................ 21
3.6 Popup Screen............................. ... ....................................... ... ... ... .... .................................................. 22
3.7 Confirmation Popup Screen................................................................................................................. 23
3.8 Error Display Popup Screen ....................................... ... ... .... ... ... ... ...................................................... 23
3.9 Screen Title Display....................................................... ... .... ... ... ... .... ... ............................................... 24
3.10 Menu Key Display........................................................ ... .... ... ... ... .... ... ............................................... 25
3.11 Basic Screen Operations ................................................................................................................... 25
3.12 Language........................................................... .... ...................................... .... ... ... ............................ 30
3.12.1 Screen Display Language.......................................................................................................... 30
3.12.2 Comment (Statement, Note, Comment, Device Name) Language....................... ... ... ... ... .... ..... 30
4 PLC Data..................................... ....................................... ... ... .... ............................................................... 31
4.1 PLC Data Storage Area ....................................................................................................................... 32
4.2 Type of Data ............................................................................... ... .... ... ............................................... 33
4.2.1 Program Data............................................................................................................................... 34
4.2.2 Device Comment Data................................................................................................................. 35
4.2.3 Parameter Data........................................................................................................................... 35
5 Explanation of Keys (Keys Related to Onboard) .................................................................................... 37
5.1 Basic Operation Keys .......................................................................................................................... 38
5.2 Menu Keys.................................................. ... ... ... .... ... ... ....................................... ... ............................ 39
5.2.1 Menu Keys in Standard Operation Mode and Simple Operation Mode. .... ... ... ... .... ... ... ...... .... ... .. 39
5.2.2 Menu Key Hierarchies and Movement.........................................................................................39
5.2.2.1 Menu keys in standard operation mode............................................................................... 39
5.2.2.2 Menu keys in simple operation mode .................................................................................. 40
5.2.2.3 Menu Keys in M700VS/M70 Series......... ... ... ... .... ... ... ... .... ... ... ... ... .... ...... ... .... ... ... ... ... .... ... .. 40
5.2.3 Details of Menu Keys................................................................................................................... 41
5.2.3.1 Menu keys in standard operation mode............................................................................... 41
5.2.3.2 Menu keys in simple operation mode .................................................................................. 46
5.2.3.3 Menu Keys in M700VS/M70 Series......... ... ... ... .... ... ... ... .... ... ... ... ... .... ...... ... .... ... ... ... ... .... ... .. 50
6 Environment Setting............... ...... .... ... ... ... ................................................................................................ 57
6.1 Setting the Connected NC Control Unit ............................................................................................... 60
6.1.1 Arbitrary Switchover of Connected NC........................................................................................ 61
6.1.2 Information to be updated at connection switchover.................................................................... 61
6.2 NC File Operation Setting....................................................................................................................62
6.2.1 Setting the Storage Destination of Device Comment................................................................... 62
6.3 Simple Operation Mode Menu Key Switchover................................ ... .... ... ...... ... .... ... ... ... .... ... ... ... ... .... 64
6.4 Ladder Display Setting.... .... ... ... ....................................... ... ... .... ..........................................................65
6.4.1 Maximum Number of Contacts ................................ ... ... .... ... ... ... ....................................... ... ....... 65
6.4.2 Zoom Display................................................. ... .... ... ... ... .... ... .......................................................65
6.4.3 Current Monitor Value Display..................................................................................................... 65
6.5 Comment Display Setting.............................. ... ... ... ....................................... ... ... .... ............................. 66
6.5.1 Comment Line................ ... ....................................... ... ... .... ... ....................................................... 66
6.5.2 Various Displays.................. .... ... ... ... .... ... ... ....................................... ... ... ... ................................. 66
6.5.3 Common Comment File............................................................................................................... 67
7 Basic Operations........................................................................................................................................ 69
7.1 Basic Operations 1 (Steps for Creating a Program for the First Time) ................................................ 70
7.2 Basic Operations 2 (Creating, Monitoring and Testing Programs)................ ... ... .... ... ... ... .... ... ... ... ... .... 71
7.3 Basic Operations 3 (Correcting Programs Stored in NC)..................................................................... 72
7.4 Basic Operations 4 (Creating Multiple Programs with Multi-program Method) .................................... 73
7.5 Basic Operations 5 (Creating Device Comments) ...............................................................................74
7.6 Basic Operations 6 (Upgrading the Program Version).........................................................................75
7.7 Basic Operations 7 (Loading Programs Created with GX Developer) .................................................76
8 Circuit Operations...................................................................................................................................... 79
8.1 Monitoring a Program (Ladder)............................................................................................................ 81
8.1.1 Restrictions................. ... ... ... .... ... ... ... ....................................... ... .... ... .......................................... 83
8.1.2 Starting and Stopping Monitoring................................................................................................. 83
8.1.3 Device Registration Monitor (Split Screens) ................................................................................ 84
8.1.4 Ladder Entry Monitor (Split Screens)........................................................................................... 87
8.1.5 Registering the Monitor................................................................................................................ 88
8.1.6 Testing the Devices .....................................................................................................................90
8.1.7 Changing the Current Value Monitor ........................................................................................... 92
8.1.8 Movement on Split Screen.......................... ... ... .... ...................................... .... ... ... ....................... 92
8.1.9 Searching....................... ... ... .... ... ... ... ....................................... ... .... ... .......................................... 92
8.1.10 Deleting All the Entry Ladders ................................................................................................... 93
8.1.11 Changing the Split Ratio..................... ... ... ... ....................................... ... ... .... ............................. 93
8.1.12 Setting the Monitor Stop Conditions ..........................................................................................94
8.2 Editing.................................... ... ....................................... ... ... .... ... ....................................................... 95
8.2.1 Changing to Circuit Editable Screen............................................................................................ 96
8.2.2 Restrictions................. ... ... ... .... ... ... ... ....................................... ... .... ... .......................................... 97
8.2.3 Inputting a Circuit......................................................................................................................... 98
8.2.4 Inserting a Line ........................................ ....................................... ... ... ... ... ............................... 101
8.2.5 Deleting a Line........................................................................................................................... 101
8.2.6 Designating the Range ......................................... ... ... ....................................... ... ... .... .............. 102
8.2.7 Deleting in a Batch..................................................................................................................... 103
8.2.8 Copy & Paste.................................................... .... ...................................... .... ... ... ... .................. 103
8.2.9 Converting a Program................................................................................................................ 104
8.2.10 Editing a Statement......................... ....................................... ... .... ... ...........................
11 Editing
8.2.
8.2.12 Editing a Comment ......................................... .... ... ... ... .... ... ....................................... .............. 110
8.2.13 Editing a PLC Message ............................................ ....................................... ... ... .... ... ........... 111
8.2.14 Undoing the Last Editing Operation.........................................................................................115
8.2.15 Ladder Program Writing during RUN by Conversion............................................................... 116
8.3 Searching and Replacing.......... ....................................... ... ... .... ... ..................................................... 118
8.3.1 Searching for Ladder (Simple search)........................ ... .... ... ... ... .... ...... ... ... .... ... ... ... .... ... ... ... ..... 118
8.3.2 Searching for Step No. (Simple search) ..................................................... .... ... ... ... .... ... ... ... ... .. 120
8.3.3 Searching for Contacts and Coils .............................................................................................. 121
8.3.4 Searching for Device................... ... ....................................... ... ... .... ... ........................................ 122
8.3.5 Instruction Search............................................. .... ... ... ... .... ... ..................................................... 123
8.3.6 Step No. Search................... .... ...................................... .... ... ... ... ............................................... 124
8.3.7 Character String Search ................................... ....................................... ... .... ... ... ..................... 125
a Note ........................................... ....................................... ... ... ... .... ........................... 108
............. 106
8.3.8 Changing the AB Contacts......................................................................................................... 126
8.3.9 Replacing Devices..................................................................................................................... 127
8.3.10 Changing the T/C Setting Value .............................................................................................. 129
8.4 Changing the Displayed Details......................................................................................................... 130
8.4.1 Program Changeover................................................................................................................. 130
8.4.2 Comment Display....................................................................................................................... 131
8.4.3 Comment ON/OFF..................................................................................................................... 134
8.4.4 Setting the Circuit Display Scale......... ... ... ... .... ... ... ....... ... ... ... .... ... ... ... ... .... ... ... ... .... ... ... ... .. ........ 135
8.4.5 Restrictions................................................................................................................................ 139
9 Other Functions ....................................................................................................................................... 141
9.1 Contact Coil Usage List ..................................................................................................................... 142
9.2 List of Used Devices......................... ... .... ... ... ... ... .... ...................................... .... ... ... .......................... 144
9.3 Program Check................................................. ... .... ... ... ... .... ... .......................................................... 146
10 Device Monitor Operations ..... ... .... ... ... ....................................... ... ... .... ................................................ 149
10.1 Device Batch Monitor...................... ... .... ... ... ... ... ....................................... ... .... ... ............................. 150
10.2 Device Registration Monitor............................................................................................................. 152
10.3 Sampling Trace............................... ... .... ... ... ... ... ....................................... ... .... ... ............................. 154
10.3.1 MAIN Screen............................................................................................................................ 158
10.3.2 Trace Count Setting................................................................................................................. 162
10.3.3 Trace Point Setting . ... ....................................... ... ... .... ... ....................................... ... ................ 164
10.3.4 Trigger Point Setting................................................................................................................ 168
10.3.5 Trace Data Setting.. ... ... .... ... ... ... .... ...................................... .... ... ... .......................................... 171
10.3.6 Trace execution ....................................................................................................................... 173
10.3.7 Trace Result Display................................................................................................................ 176
10.3.8 Creating CSV File.................................................................................................................... 179
10.3.9 File Input.................................................................................................................................. 181
10.3.10 File Output ............................................................................................................................. 182
10.3.11 Deleting File........................................................................................................................... 183
10.3.12 Selecting Project.................................................................................................................... 184
11 Setting the Parameters.......................................................................................................................... 187
11.1 Setting the Program......................................................................................................................... 189
11.2 Common Pointer Setting.................................................................................................................. 191
12 File Operations...... ... ....................................... ... ... ... .... ...................................... .... ... ............................. 195
12.1 Adding New Data............................................................ .... ... ... ....................................................... 198
12.2 Deleting PLC Data.......................... ....................................... ... ... .... ................................................ 199
12.3 Renaming the PLC Data..................................................... ... ....................................... ... ................ 200
12.4 Initialization..................... ... ... .... ...................................... .... ... ... ....................................................... 202
13 NC File Operations................................................................................................................................. 205
13.1 Opening PLC Data from the Temporary Memory.................................. ... ... ....... ... ... .... ... ... ... ... .... ... 207
13.2 Saving PLC Data to the Temporary Memory................................................................................... 211
13.3 Verifying with the PLC Data in the Temporary Memory................................................................... 214
13.4 Writing PLC Data in Temporary Memory to ROM............................................................................ 216
13.5 Deleting the PLC Data from the Temporary Memory....................................................................... 217
13.6 Formatting the Temporary Memory ...........................................................................................
o
13.7 C
13.8 Updating the PLC Version (Maintenance Function)......................................................................... 222
13.9 Keyword.......................................................... ....................................... ... ... .... ................................ 227
13.10 File list............................................................................................................................................ 230
ntrolling the PLC RUN/STOP..................... ... ....................................... ... .... ... ............................. 220
13.8.1 Storing the Upgraded Data...................................................................................................... 223
13.8.2 PLC VERSION UP Screen ...................................................................................................... 224
13.8.3 Operations of This Function..................................................................................................... 225
13.9.1 Disabling the Keyword on the KEYWORD Screen .................................................................. 227
13.9.2 Disabling the Keyword as Required at the Read or Write Operation ...................................... 229
...... 219
14 Project Operation/External File Operations......................................................................................... 231
14.1 Opening PLC Data from a Project.................................................................................................... 234
14.2 Saving PLC Data from a Project...................................................................................................... 238
14.3 Deleting a Project.............................................................................................................................241
14.4 Verifying the Project PLC Data ........................................................................................................ 244
15 Diagnostics............................................................................................................................................. 249
15.1 PLC Diagnostics................................ ... ... .... ... ... ... ....................................... ... ... .... ........................... 250
16 Help ......................................................................................................................................................... 253
17 Error Messages ...................................................................................................................................... 257
17.1 Warning Messages .......................................................................................................................... 258
17.2 User PLC Alarm............................................................................................................................... 258
17.3 Error Message.................................................................................................................................. 259
V. APPENDIX
1 Comparison of PLC Related Sections in Each Model ..............................................................................1
1.1 Development Tools, etc. ........................................................................................................................ 2
1.2 Devices and Device Assignments.......................................................................................................... 3
1.3 Instructions with Changed Designation Format ..................................................................................... 7
1.3.1 Alternative Circuits Resulted from the Ban on DEFR Instruction................................................... 9
2 List of Instructions Usable with GX Developer ....................................................................................... 11
2.1 Sequence Instructions................................... ...................................... .... ... ... ....................................... 13
2.2 Comparison Operation Instructions..................... ... ... ....................................... ... .... ... .......................... 15
2.3 Application Instructions................................. ... ... ... ... .... ... ... ....................................... ... ....................... 27
3 List of Special Relays and Special Registers.......................................................................................... 35
3.1 Special Relay......................................... ... .... ... ... ... ... .... ...................................... .... ... .......................... 37
3.2 Special Register........ ... ... .... ... ... ... .... ...................................... .... ... ... ... ................................................. 38
4 List of PLC Alarms..................................................................................................................................... 41
I OUTLINE
I-1
1

System Configuration

1 System Configuration
MITSUBISHI CNC

1.1 System Configuration for PLC Development

Offline development
Printout
CNC control unit PLC onboard edit screen
Personal computer
General-purpose printer
Ladder printout Message printout
PLC program creation Message creation Ladder monitor
GX Developer
Ethernet or RS-232C
IC card
PLC program creation Ladder monitor
㪩㪦㪤㩷㫄㪸㫂㫀㫅㪾
The general configuration of the deve lopm e nt en vir on m en t is show n below. Most of the development work is carried out with "GX Developer", which runs on a personal computer. GX Developer and the CNC control unit are connected with Ethernet or an RS-232C cable at this time. On the CNC unit PLC onboard edit screen, it is possible to use the data saved with GX Developer or develop PLC programs, as well. Note that some functio ns may be limited. (Print output, Japanese input, etc.)
General configuration of development environment
I-2
M700V/M70 Series PLC Programming Manual

1.2 User PLC (Ladder) Development Procedure

1.2 User PLC (Ladder) Development Procedure
Write
User PLC programs can be created and input by means of either GX Developer installed in the external PC or PLC onboard edit screen. Procedures for creating/inputting PLC programs with either method are shown below.
Start
GX Developer
Ethernet
Connection
Write into NC
temporary memory by
using Ethernet
communication
GX Developer
Create by GX Developer
RS232C
Write into NC
temporary memory by
using RS232C
Create
PLC onboard
Save sequence program in
IC card by using GX
Developer
Open the sequence program
saved in IC card by using
PLC onboard
Write into NC temporary
memory
PLC onboard
Create by PLC
onboard
Write into NC
temporary memory
Write sequence program into NC
ROM
Complete
I-3
1 System Configuration
MITSUBISHI CNC
Next, procedures for creating sequence programs are shown below.
Is ROM
oper atio n OK?
Determination of machine Determination of CNC and PLC specifications Determination of the numbers of I/O points
Assignment of I/O signals Assignment of internal relays
Programming
Debugging (RAM operation)
Program correction
ROM writing
Printout
Data save o nt o FLD
Is debugging complete?
Completion
ROM operation by CNC unit
Start
Device Name
Comment X0 X- OT X-axis OT X1 Y- OT Y- axis O T X2 Z- OT Z- axis O T
Commercial ly avai labl e spreadsheet tool
NO
YES
GX Developer
Onboard
Inpu t/output screen
The data created with the commercially available spreadsheet tool can be used as ladder comment data.
Program data
Binary data
Procedure Personal Computer CNC Unit
Use GX Developer for programming. After completion, download the data through RS-232C. A new program can also be created by using the CNC onboard function.
Perform monitoring/correction with GX Developer's online function or onboard function.
Output binary data with maintenance data format using input/output screen.
Program data: Saved using GX Developer
Binary data: Saved using input/output screen
Printout to a commercial printer connected with the personal computer from GX Developer.
NO
YES
GX Developer
GX Developer
Perform ROM making operations with F-ROM write screen.
Onboar d
Onboar d
Debugging (temporary memory)
PLC onboard edit screen
I-4
(Maintenance data format)
II PROGRAMMING EXPLANATION
II-1
1

Outline

1 Outline
MITSUBISHI CNC
This programming manual is used when creating a sequence pro gram for this CNC using the MELSEC PLC development software package (GX Developer). The PLC (Programmable Logic Controller) instructions are largely categorized into the basic instructions, function instructions and exclusive instructions. There are many types of instructions. The instructions can be used according to the purpose and application such as the PLC support function used wh en supporting the user PLCs.
II-2
II-3
2

PLC Processing Program

2 PLC Processing Program
MITSUBISHI CNC

2.1 PLC Processing Program Level and Operation

The details of the user PLC processing level and the time chart are shown below. PLC processing level
Program name Description (frequency, level, etc.)
Initial processing program
High-speed processing program
Main processing program
When reference interrupt signal is 3.5ms
This program starts only once at power ON. When this program operates, machine input and operation board input are not read.
This program starts periodically at each standard interrupt signal. This program has the highest level as a program that starts periodically. It is used in signal processing where high-speed processing is required. The steps for high-speed processing program should be up to 1000 steps with basic instructions. (Application example) Position count control of turret and ATC magazine (Note) The standard interrupt signal cycle differs according to each model, and must be confirmed separately.
This program runs constantly except during the high-speed process program. When the user PLC one-scan process is completed, the next scan process starts at the next reference interrupt signal cycle.
Reference interrupt signal
High speed processing
Main processing
NC processing
3.5ms
PLC processing program operation timing chart
II-4
M700V/M70 Series PLC Programming Manual

2.2 Outline of PLC Processing Program (Two Program Method)

2.2 Outline of PLC Processing Program (Two Program Method)
r
The MITSUBISHI CNC M700 series program execution control methods include the conventional method which controls with one program, and the method that splits the program into multiple sections for each control unit. When splitting into multiple programs, the order for executing the split programs can be designated on the setting screen. This is called the multi-programming function.
Method controlling with one program (co nven tional method) : Independent program method Method splitting control into multiple programs : Multi-program method
Control with one program (Independent control method)
Control details A
Control details B
Control details n
Control by splitting into multiple programs (Multi-program method)
Program A
Control details A
Program B
Control details B
Program n
Control details n
Split and register fo each control detail
II-5
2 PLC Processing Program
MITSUBISHI CNC

2.3 Independent Program Method

This method lays importance on compatibility with the conventional models. One sequence program can be stored. The execution type and head of processing are designated with reserved labels. The execution type and execution order cannot be designated on the setting screen.
- Initialization process (reserved label P4003) : This starts up only once when the power is turned ON.
- High-speed process (reserved label P4001) : This starts up at the standard interrupt cycle.
- Main process (reserved label P4002) : This starts up constantly except during the high-speed process.
II-6
M700V/M70 Series PLC Programming Manual

2.4 Multi-program Method

2.4 Multi-program Method
Several sequence programs can be registered in the CNC and sequentially executed. By using this function, the sequence program can be split into each process and developed. With the multi-program method, the execution type and execution or der are designated on the GX Developer setting screen, and the parameter files are sent to the NC. The execution type and the head of the process cannot be designated with reserved labels.
2.4.1 Number and Types of Registerable Programs
Up to 20 sequence programs can be registered. Only one execution type can be set in one program. The following five types of execution types can be used.
- "Initial" (Initialization process) : This starts up only once when the power is turned ON.
- "Scan" (High-speed process) : This starts up at the standard interrupt cycle.
- "Scan" (Main process) : This starts up constantly except during the high-speed process.
- "Standby" (Standby process) : This is called from the high-speed process or main process.
- "Low speed" : This execution type is not used.
2.4.2 Program Execution Order
Several programs are executed in a predetermined order. They are not executed simultaneously. The order is determined with the development tool (GX Developer or onboard) setting screen. The programs are executed from the smallest number in the same execution type. An example of the setting screen for GX Developer is shown below.
The execution order when seven sequence programs are registered in the CNC, as shown in the above setting screen, is indicated below.
Program name Execution type
INIT Initialization sequence program 1 Starts up only once when the power is turned ON. HLAD1 HLAD2 2 MAIN
MLAD2 3 SUB1 Standby sequence program 1
High-speed process execution program Execution type is set as "Scan"
Main process sequence programExecution type is set as "Scan"
Executio
n order
1
1
Remarks
"Scan type" for which program name starts with "H"
"Scan type" for which program name does not start with "H"MLAD1 2
Here, subroutine that is called from MLAD2 with CALL instruction is stored
II-7
2 PLC Processing Program
MITSUBISHI CNC
HLAD1 HLAD2
High-speed process
Main process
MAIN MLAD1 MLAD2
One scan
SUB1
MAIN MLAD1
[Caution] If the process jumps to END (P4005) in the sequence program, the process will jump to the
end of each process (high-speed, main) instead of the end of the program.
II-8
M700V/M70 Series PLC Programming Manual

2.5 User Memory Area Configuration and Size

2.5 User Memory Area Configuration and Size
(1) Internal information table of User PLC (The table is automatically generated.)
(3) Data storage area (Other than sequence program)
• Alarm messages
• Operator messages
• PLC switches
• Load meter (Each can be stored in eight language
• Contact/coil comment data, etc.
Total 256 Kbyte
(2) Sequence program storage area This is not required for programs other than the ma The initialization, high-speed and main process pro is arbitrary.
Total 700/700VS Series 42000 steps 70 Series type A 32000 steps type B 20000 steps
yp
Program 1
The user memory area approximate configuration and size are shown below. The configuration and size differ according to the program method.
2.5.1 Independent Program Method
P4001 (high-speed) P4002 (medium­speed)
User PLC data area
Control information
High speed processing
Main processing
• Message data
• Contact/coil comment data
2.5.2 Multi-program Method
Control information
(1) Internal information table of User PLC
(The table is automatically generated.)
Program 2
User PLC data area
Program 3
Program n
• Message data
• Contact/coil comment data
(2) Sequence program storage area
The initialization, high-speed, main and standby processes can be split into multiple programs for each control unit and stored. The program storage order is arbitrary. There must be at least one main process.
Total 700/700VS Series 42000 steps 70 Series type A 32000 steps t
(3) Data storage area (Other than sequence program)
• Alarm messages
• Operator messages
• PLC switches
• Load meter (Each can be stored in eight languages)
• Contact/coil comment data, etc.
Total 256 Kbyte
e B 20000 steps
II-9
2 PLC Processing Program
MITSUBISHI CNC

2.6 Storing PLC Processing Program and Execution Mode

A
The user memory area storage method and the PLC processing program execution method are explained. User memory area is stored in the internal flash ROM (internal F-ROM) and a sequence program is executed according to the following path.
2.6.1 Path from Storage to Execution
(1) During PLC development
Sequence program data transferred from development environment such as GX Developer or PLC onboard is stored in the volatile RAM (hereinafter, D-RAM) for the temporary memory. The sequence program is transferred to the PLC processor execution area before PLC execution, and is then executed. The D-RAM in the temporary memory is not held when the power is turned OFF. If the data needs to be held even after the power is turned OFF, it must be stored in the internal F-ROM.
(2) At power ON
The data is transferred from the internal F-ROM to the PLC processor execution area via the temporary memory D-RAM, and is then executed.
Right after the PLC RUN instruction, converts into the
MELSEC instruction code format
Transfer
GX Developer
PLC onboard
Edit
Temporary memory area D-RAM
Manual save
Internal F-ROM
t power ON
PLC processor instruction code method and copies to the execution area.
Conversion
PLC processor execution area
CNC
2.6.2 Conversion of Instruction Code at Execution
In the internal F-ROM/temporary memory area shown on the left in th e figure ab ove, a se quence pro gram is stored in the instruction code format that is compatible with the MELSEC sequencer. During execution, however, a sequence program is analyzed to optimize the references and/or converted into the PLC processing processor instruction code for the CNC. Thus, the length (number of steps) of an instruction for each instruction changes before and after the conversion. Refer to ""Explanation of Instructions: Instruction List" for details on the number of steps during storage and execution for each instruction.
2.6.3 How to Confirm the Number of Steps at Storage/Execution
The number of steps under the PLC development environment (GX Developer, PLC onboard edit function) is usually all displayed as the number of steps at "storage". The number of steps at execution can be checked with some dedicated methods. Refer to "Sequ ence Program Development: Writing the Sequence Program to the CNC Controller: Operations and Check Items at the Other Errors: (2) How to confirm the size of execution area " or "NC File Op eration s: Saving PL C Data to the Temporary Memory: (9) EXECUTE STEP" for details.
II-10
II-11
3

Input/Output Signals

3 Input/Output Signals
MITSUBISHI CNC

3.1 Input/Output Signal Types and Processing

The input/output signals handled in user PLC are as follows:
(1) Input/output from/to controller (2) Input/output from/to operation board (Note 1)
(3) Input/output from/to machine The user PLC does not directly input or output these signals from or to hardware or controller ; it inputs or outputs the signals from or to input/output image memory. For the reading and writing with the hardware or controller, the controller will perform the input/output according to the level of the main process or high­speed process.
Concept of input/output processing
Controller
Input/output
Operation
Controller
board
Machine
(Note 1) The operation board here refers to when the remote I/O is installed o n th e communication
terminal.
image memory
(device X, Y)
User PLC
Input/output processing conforming to program level
High-speed processing input/output
The controller reads the high-speed input designation input, and sets in the image memory.
User PLC high-speed processing
The controller outputs the high-speed output designation output from the image memory to the machine.
Main processing input/output
The controller reads the input other than the high­speed input designation, and sets in the image memory.
User PLC main processing
The controller outputs the output other than the high speed output designation from the image memory to the machine.
II-12
M700V/M70 Series PLC Programming Manual
3.1 Input/Output Signal Types and Processin g
The table below shows whether or not high-speed input/output can be performed.
Whether or not high-speed input/output can be performed
High-speed input
specification
Input signal from control unit x x Output signal to control unit x x Input signal from machine o (2-byte units) x o : Possible Output signal to machine x o (2-byte units) x : Not possible Input signal from operation board x x Output signal to operation board x x Input signal from MELSEC when connected to
MELSEC Output signal to MELSEC when connected to
MELSEC
xx
xx
High-speed output
specification
The operation board here refers to when the remote I/O is installed on the communication terminal.
II-13
3 Input/Output Signals
MITSUBISHI CNC

3.2 Handling of Input Signals Designated for High-speed Input

A
The input/output signals used in user PLC are input/output for each program level as shown in the figure below. In high-speed processing, input/output signal for which high-speed input or output designation (parameter) is made is input or output each time the high-speed processing program runs. In main processing, signals other than the high-speed input/output designation are input/output. When high-speed input designation signal is used in main processing, the input signal may change within one scan because high-speed processing whose le vel is higher than main processing in terrupts. Input signal which must not change within one scan should be saved in tem porary memo ry (M), etc., at the head of main processing and the temporary memory should be used in the main program, for example.
Input image memory
Main processing
(1)
High-speed
processing
(2)
(1) Set at the head of main processing. (2) Set at the head of high-speed processing.
PLC one scan
B
The hatched area is high-speed input desi gnatio n part. Whe never th e high-speed processin g progr am runs, data is reset in the hatched area. Thus, the signal in the hatched area may change in main processing (A) and (B) because the high-speed process interrupts betwee n (A) and (B) and re-reads the input signal in the hatched area.
II-14
M700V/M70 Series PLC Programming Manual

3.3 High-speed Input/Output Designation Method

3.3 High-speed Input/Output Designation Method
7 6 5 4 3 2 1 0
X70
X7F
X60
X6F
X50
X5F
X40
X4F
X30
X3F
X20
X2F
X10
X1F
X00
X0F
XF0
XFF
XE0
XEF
XD0
XDF
XC0
XCF
XB0
XBF
XA0
XAF
X90
X9F
X80
X8F
bit
:: ::::::
:: :: : : ::
7 6 5 4 3 2 1 0
Y70
Y7F
Y60
Y6F
Y50
Y5F
Y40
Y4F
Y30
Y3F
Y20
Y2F
Y10
Y1F
Y00
Y0F
YF0
YFF
YE0
YEF
YD0
YDF
YC0
YCF
YB0
YBF
YA0
YAF
Y90
Y9F
Y80
Y8F
bit
:: :: : : ::
:: :: : : ::
High-speed input/output is designated by se ttin g the cor re sp o nd ing bit of th e bit selection parameter as shown below. (1) High-speed input designation
Bit selection parameter #6457
#6458
These bits correspond to the low-order byte (bits 0 to 7) of file register R7828
These bits correspond to the high-order byte (bits 8 to F) of file register R7828
If there are multiple remote I/O connection channels, designate RIO2 with the same configuration as RIO1 above.
RIO2 : Designate X100 to X1FF with bit selection parameters #6459 and #6460 RIO3 : Designate X200 to X2FF with bit selection parameters #6465 and #6466
(2) High-speed output designation
Bit selection parameter #6461
These bits correspond to the low-order byte (bits 0 to 7) of file register R7830
#6462
If there are multiple remote I/O connection channels, designate RIO2 with the same configuration as RIO1 above.
RIO2 : Designate Y100 to Y1FF with bit selection parameters #6463 and #6464 RIO3 : Designate Y200 to Y2FF with bit selection parameters #6473 and #6474
- As listed above, one bit corresponds to two bytes (16 points).
- Input or output in which 1 is set in the table is not performed at the main pr ocessing program level.
- Although the number of bits set to 1 is not limited, set only necessary ones from viewpoint of overhead.
- High-speed input/output designation corresponds to the bit selection parameter and can be set in the parameter. However, it is recommended to set in a sequence progr am to prevent a parameter setting error, etc.
(Example) ..... To designate X00 to X0F, X10 to X1F (bit 0 and 1 for H3)
㨇/18 * 4㨉
These bits correspond to the high-order byte (bits 8 to F) of file register R7830
II-15
3 Input/Output Signals
MITSUBISHI CNC
II-16
II-17
4

Parameters

4 Parameters
MITSUBISHI CNC

4.1 PLC Constants

The parameters that can be used in user PLC include PLC constants set in the data type. The PLC constants include the basic area and the extended area.
(1) Basic area
Set up data is stored in a file register and is backed up. In contrast, if data is stored in the file register corresponding to PLC constant by using sequence program MOV instruction, etc., it is backed up. However, display remains unchanged. Display another screen once and then select the screen again. 150 PLC constants are set (the setting range is ±8 digits). (Signed 4-byte binary data)
PLC constant No. and R register correspondence t able
Item (# No.)
PLC constant #1
(#18001)
PLC constant #2
(#18002)
PLC constant #3
(#18003)
PLC constant #148
(#18148)
PLC constant #149
(#18149)
PLC constant #150
(#18150)
LOW side R7500
HIGH side R7501
LOW side R7502
HIGH side R7503
LOW side R7504
HIGH side R7505
……
LOW side R7794
HIGH side R7795
LOW side R7796
HIGH side R7797
LOW side R7798
HIGH side R7799
Corresponding
PLC constant setting and display screen
register
Details Setting range
Data type parameters which can be used in user PLC
-99999999 to 99999999 (Signed 8-digit integer)
II-18
M700V/M70 Series PLC Programming Manual
4.1 PLC Constants
(2) Extended area
Up to 750 PLC constants can be secured by using the user backup area (R8300 to R9799) as the extended area. The extended area start register and number can be set with the parameters. A total of 900 PLC constants can be set with 150 (#18001 to #18150) in the basic area and up to 750 (#18151 to #18900) in the extended area. Set up data is stored in a file register and is backed up. In contrast, if data is stored in the file register corresponding to PLC constant by using sequence program MOV instruction, etc., it is backed up. However, display remains unchanged. Display another screen once and then select the screen again. 750 PLC constants are set (the setting range is ±8 digits). (Signed 4-byte binary data)
PLC constant No. and R register correspondence table
Item (# No.)
PLC constant #151
(#18151)
PLC constant #152
(#18152)
PLC constant #153
(#18153)
PLC constant #898
(#18898)
PLC constant #899
(#18899)
PLC constant #900
(#18900)
LOW side
HIGH side
LOW side
HIGH side
LOW side
HIGH side
LOW side
HIGH side
LOW side
HIGH side
LOW side
HIGH side
Corresponding
register
R8300 to R9799 The area for the
number determined
with parameter
#1326 is continuously
secured.
Details Setting range
Data type parameters which can be used in user PLC
-99999999 to 99999999 (Signed 8-digit integer)
The extended area quantity is set with basic common parameter #1326.
# No. Item Details Setting range
1326 PLC Const Ext. Number
- Set number of PLC constant extension points.
- This is valid after the power is turned OFF and ON.
0 750
II-19
4 Parameters
MITSUBISHI CNC

4.2 Bit Selection Parameters

The parameters that can be used in user PLC include bit selection parameters set in the bit type. Set up data is stored in a file register and is backed up. When using bit operation in a sequence program, use a word device bit-designation format. If data is stored in the file register corresponding to bit selection by using the MOV instruction etc., it is backed up. However, display remains unchanged. Once display another screen and again select screen. The corresponding between the bit selection parameters and file registers is listed below. The setting and display screens are also shown.
Bit selection parameter (# No.) Corresponding register Details Setting range
#1 (#6401) R7800-Low side #2 (#6402) R7800-High side #3 (#6403) R7801-L #4 (#6404) R7801-H
... ...
#45 (#6445) R7822-L #46 (#6446) R7822-H #47 (#6447) R7823-L #48 (#6448) R7823-H #49 (#6449) R7824-L #50 (#6450) R7824-H #51 (#6451) R7825-L #52 (#6452) R7825-H
... ...
#93 (#6493) R7846-L #94 (#6494) R7846-H #95 (#6495) R7847-L #96 (#6496) R7847-H #97 (#6497) R7848-L #98 (#6498) R7848-H #99 (#6499) R7849-L
#100 (#6500) R7849-H #101 (#6501) R7850-L #102 (#6502) R7850-H #103 (#6503) R7851-L #104 (#6504) R7851-H #105 (#6505) R7852-L #106 (#6506) R7852-H
... ...
#187 (#6587) R7893-L #188 (#6588) R7893-H #189 (#6589) R7894-L #190 (#6590) R7894-H #191 (#6591) R7895-L #192 (#6592) R7895-H #193 (#6593) R7896-L #194 (#6594) R7896-H #195 (#6595) R7897-L #196 (#6596) R7897-H
Use bit selection parameters #6401 to #6448 freely.
Bit selection parameter #6449 to #6496 are PLC operation parameters used by the machine tool builder and MITSUBISHI. The contents are fixed.
8 bits
Use bit selection parameters #6497 to #6596 freely.
II-20
M700V/M70 Series PLC Programming Manual
4.2 Bit Selection Parameters
Contents of bit selection parameters #6449 to #6496
Symbol
name
7 6 5 4 3 2 1 0
0
#6449
R7824 L
Control unit thermal al arm on
S etting and disp lay unit thermal mgmt on
-
Counter C retention
Integrated timer ST retention
PLC counter program on
PLC timer program on
1 0
1
#6450
R7824 H
-
External alarm message display
Alarm/ operator cha nge
Ful l screen display of message
-
Operator message on R method F method
Alarm message on
2
#6451
R7825 L
- -
Serial GPP communi­cation on
Onboard editing not possible
Onboard
simple
operation mode
on
Onbo ard on
3
#6452
R7825 H
-
Branch
destination
label chec k
valid
Serial handy
terminal
comm. on
- -
Extended PLC
instruction
mode valid
-
4
#6453
R7826 L
- - -
5
#6454
R7826 H
6
#6455
R7827 L
- - - - - -
7
#6456
R7827 H
- - - - - - - -
8
#6457
R7828 L
9
#6458
R7828 H
A
#6459
R7829 L
B
#6460
R7829 H
C
#6461
R7830 L
D
#6462
R7830 H
E
#6463
R7831 L
F
#6464
R7831 H
Enable ladder program writing during RUN
Enable ladder program writ­ing during
RUN
(in high-speed processing)
Integrated tim er ST
Variable/fixed
Number of points setting
Counter C
Variable/fixed
Number of poi nts setting
Message l anguage change code
Time r T
Variable/fixed
Number of points setti ng
High-speed input specification 1
High-speed input specification 2
High-speed output specificati on 1
High-speed output specification 2
II-21
4 Parameters
MITSUBISHI CNC
Symbol
name
7 6 5 4 3 2 1
0
0
#6465
R7832 L
-
- - - - - - -
1
#6466
R7832 H
-
- - - - - - -
2
#6467
R7833 L
-
- - - - - - -
3
#6468
R7833 H
4
#6469
R7834 L
-
- - - - - - -
5
#6470
R7834 H
-
- - - - - - -
6
#6471
R7835 L
-
- - - - - - -
7
#6472
R7835 H
-
- - - - - - -
8
#6473
R7836 L
-
-
9
#6474
R7836 H
A
#6475
R7837 L
B
#6476
R7837 H
C
#6477
R7838 L
-
- - - - - - -
D
#6478
R7838 H
-
- - - - - - -
E
#6479
R7839 L
-
- - - - - - -
F
#6480
R7839 H
-
- - - - - - -
II-22
High-speed input specification 3
High-speed input specification 4
High-speed output specification 3
High-speed output specification 4
(Note 1) Be sure to set the bits indicated - and blanks to 0. (Note 2) Parameters #6481 to #6496 are reserved for debuggin g by MITSUBISHI.
(Note 3) Functions marked with may not be available for some machine types.
M700V/M70 Series PLC Programming Manual
4.2 Bit Selection Parameters
Bit selection screen
II-23
4 Parameters
MITSUBISHI CNC

4.3 Other Parameters

4.3.1 PLC Startup Condition Switchover
Parameter "#11004 PLCautorun enable" allows PLC to star tup at NC startup even if n o setting display unit is used. For safety, use this function only for the machine with no NC screen displayed by HMI.
(1) Basic common parameter
# No. Item Details Setting range
11004 (PR)
PLCautorun enable
PLC automatic startup valid
Switch starting condition of the PLC. 0: Start PLC after NC screen startup 1: Start PLC at NC startup
0, 1 0
Standard
value
(2) Precautions
Parameter "#11004 PLCautorun enable" is the parameter prepared on the assumption that the setting and display unit is not used. For the machine with NC screen displayed, to ensure your safety, always set "#11004 PLCautorun enable" to "0" and start PLC after NC screen startup. When PLC automatic startup is validated without confirming the pre -operation status on the NC scr een, unexpected incident may occur.
II-24
II-25
5

Explanation of Devices

5 Explanation of Devices
MITSUBISHI CNC

5.1 Devices and Device No.

The devices are address symbols to identify signals handled in PLC. The device Nos. are serial Nos. assigned to the devices. The device Nos. of devices X, Y, SB, B, SW, W and H are represented in hexadecimal notation. The device numbers of other devices are represented in decimal notation.

5.2 List of Devices

Device Device Range Units Details Remarks
X X0 to X1FFF 8192 points 1-bit Input signals to the PLC. Machine input, etc. Y Y0 to Y1FFF 8192 points 1-bit Output signals from the PLC. Machine output,
M M0 to M10239 10240 points 1-bit Temporary memory L L0 to L511 512 points 1-bit Latch relay (Backup memory) F F0 to F1023 1024 points 1-bit Temporary memory. Alarm message interface SB SB to SB1FF 512 points 1-bit Special relay for link B B0 to B1FFF 8192 points 1-bit Link relay SM SM0 to SM1023 1024 points 1-bit Special relay V V0 to V255 256 points 1-bit Edge relay SW SW0 to SW1FF 512 points 16-bit Special register for link SD SD0 to SD1023 1024 points 16-bit Special register T T0 to T703 704 points 1-bit/16-bit Timer (Fixed/variable boundary is set with
ST ST0 to ST63 64 points 1-bit/16-bit Incremented timer (100ms unit) C C0 to C255 256 points 1-bit/16-bit Counter (Fixed/variable boundary is set with
D D0 to D2047 2048 points 16-bit/32-bit Data register. Register for calculation R R0 to R13311 13312 points 16-bit/32-bit File register. CNC word I/F W W0 to W1FFF 8192 points 16-bit/32-bit Link register Z Z0 to Z1 2 points 16-bit Address index *2 N N0 to N7 8 points Master controller nesting level P P0 to P2047
P4000 to P4005 K-32768 to K32767 Decimal constant for 16-bit instruction K K-2147483648 to K2147483647 H0 to HFFFF Hexadecimal constant for 16-bit instruction H H0 to HFFFFFFFF Hexadecimal constant for 32-bit instruction
2048 points Conditional jump, subroutine call label *3
Decimal constant for 32-bit instruction
etc.
parameters)
parameters)
*1
*1 : The 10ms timer and 100ms timer are differentiated with instructions. (Refer to Explanation of Devices: Timer T) *2 : The Z device has 14 points, Z0 to Z13 when the machine has extended index modification. *3 : The P device has two types of pointers, local and common. The num ber of points g iven abo ve is the total number of points.
II-26
M700V/M70 Series PLC Programming Manual

5.3 Detailed Explanation of Devices

5.3 Detailed Explanation of Devices
5.3.1 Input/Output X, Y
Input/output X and Y are windows for executing communication with the PLC and external device or controller.
Input X
(a)This issued commands or data from an external device such as a push-button, changeover switch, limit switch or digital switch to the PLC.
(b)Assuming that there is a hypothetical relay Xn built-in the PLC per input point, the program uses the "A" contact and "B" contact of that Xn.
(c)There is no limit to the number of "A" contacts and "B" contacts of the input Xn that can be used in the program.
PLC
Hypothetical relay
PB1
LS2
PB16
X10
X11
X1F
X10
X11
X1F
Program Input circuit
(d)The input No. is expressed with a hexadecimal.
utput Y
(a)This outputs the results of the program control to the solenoid, magnetic switch, signal lamp or digital indicator, etc.
(b)The output (Y) can be retrieved with the equivalent of one "A" contact.
(c)There is no limit to the number of "A" contacts and "B" contacts of the output Yn that can be used in the program.
PLC
Y10
24V
Y10
Load
Y10
Y10
Program Output circuit
(d)The output No. is expressed with a hexadecimal.
II-27
5 Explanation of Devices
MITSUBISHI CNC
5.3.2 Internal Relays M and F, Latch Relay L
The internal relay and latch relay are auxiliary relays in the PLC that cannot directly output to an external source.
Internal relay M
(a)The relay is cleared when the power is turned OFF.
(b)There is no limit to the number of "A" contacts and "B" contacts of the internal relays that can be used in the program.
(c)The internal relay No. is expressed with a decimal.
Internal relay F
Internal relay F is an interface for the alarm message display. Use the bit selection parameter to determine whether to use this relay for the alarm message interface. The target will be all F0 to F1023. This internal relay can be used in the same manner as the internal relay M when not used as the alarm message interface.
Latch relay L
(a)The original state is held even when the power is turned OFF.
(b)There is no limit to the number of "A" contacts and "B" contacts of the latch relay that can be used in the program.
(c)The latch No. is expressed with a decimal.
5.3.3 Special Relay for Link (SB), Special Register for Link (SW)
Special relay for link (SB)
(a)This interacts between various kinds of network cards and PLC programs.
(b)ON/OFF control is applied due to various factors occurred at the time of data link. By monitoring the special relay for link, abnormal state of data link can be detected.
Special register for link (SW)
(a)This interacts between various kinds of network cards and PLC programs.
(b)Information at the time of data link is stored. By monitoring the special register for link, abnormal area and the cause can be examined.
5.3.4 Link Relay B, Link Register W
(1) Link relay B is the bit type device that performs data link with various link functions.
Unused area can be used as the primary memory, etc.
(2) Link register W is the word type device that performs data link with various link functions.
Unused area can be used as the primary memory, etc.
Link relay B, link register W
(a)This relay is cleared when the power is turned OFF.
(b)There is no limit in the number that can be used in the program.
(c)The relay and register No. are expressed with a hexadecimal.
II-28
M700V/M70 Series PLC Programming Manual
5.3 Detailed Explanation of Devices
5.3.5 Special Relay SM, Special Register SD
Device
Name
Details
SM0
PLC error
Turns ON at PLC error occurrence; resets when
changed from STOP to RUN.
SM12
Carry flag
Used with various machine types
SM400
Always ON
Always ON
SM401
Always OFF
Always OFF
SM402
After RUN, turned ON by only
1 scan.
SM403
After RUN, turned OFF by
only 1 scan.
(For medium-speed ladder)
SM404
After RUN, turned ON by only
1 scan.
SM405
After RUN, turned OFF by
only 1 scan.
(For high-speed ladder)
SM410
0.1-second clock
SM411
0.2-second clock
SM412
1-second clock
SM413
2-second clock
• ON/OFF is repeated every specified amount of time
divided by 2.
• Operation is continued even during STOP
• Starts from OFF when starting up
SM414
2n-second clock
ON/OFF is repeated according to the second
specified with SD414.
Device
Name
Details
SD0
PLC error No.
Error code when a PLC error occurs.
SD412
1-second clock
Number of counts in 1sec unit
SD414
2n-second clock set
Used for the 2n-second clock setting
SD420
Scan counter (Medium-speed
ladder)
SD430
Scan counter (High-speed
ladder)
Number of counts per 1 scan
• After RUN, +1 is added every 1 scan.
(1) Special relay is the relay whose application is fixed. (i.e. Carry flag of operation result, display
request signal to the setting display device, etc.) Do not use the currently unused area from SM0 to SM1023 as the primary memory.
(2) Special register SD is the data register whose application is fixed. (i.e. 1-second counter) Do not
use the currently unused area from SD0 to SD1023 as the primary memory.
Link relay B, link register W
(a) This relay is cleared when the power is turned OFF. (b) There is no limit in the number that can be used in the program. (c) The relay and register No. are expressed with a decimal.
(3) Some of the main relays and registers whose applications are fixed are listed below.
Refer to " List of "Special relay, Special Register" for details.
II-29
5 Explanation of Devices
MITSUBISHI CNC
5.3.6 Edge relay V
Edge relay V
(a)This stores the operation result (ON/OFF information) from the head of ladder block. (b) This can be used only at contacts. This cannot be used as a coil.
(c)The relay No. is expressed with a decimal.
5.3.7 Timer T
(1) The 100ms timer and 10ms timer are available for this count-up type timer.
The 100ms timer and 10ms timer are differentiated by the instructions used. Refer to the following explanation on basic instructions for details.
100ms Timer T
(a)When the input conditions are set, the count starts. When the set value is counted, that timer contact will turn ON. (b)If the input conditions are turned OFF, the 100ms timer count value will be set to 0, and the contact will turn OFF.
X5
Input conditions
X0
X1 X10
K50 T193
100ms timer
V1
Edge relay Operation results of X0,X1 and X 10 are stored.
X5
T193 coil
T193 contact
OFF
OFF
OFF
ON
ON
5 seconds
ON
(c)The value is set with a decimal, and can be designated from 1 to 32767 (0.1 to 3276.7 s).The data register D or file register R data can be used as the setting value.
10ms Timer T
(a)When the input conditions are set, the count starts. When the set value is counted, that timer contact will turn ON. (b)If the input conditions are turned OFF, the 10ms timer count value will be set to 0, and the contact will turn OFF
X5
Input conditions
(c)The value is set with a decimal, and can be designated from 1 to 32767 (0.01 to 327.67 s). The data register D or file register R data can be used as the setting value.
Display for 10ms timer instruction
H K500 T1
10ms timer
X5
T1 coil
T1 contact
OFF
OFF
OFF
ON
ON
5 secnds
ON
II-30
M700V/M70 Series PLC Programming Manual
5.3 Detailed Explanation of Devices
(2) With the device T, the contact/coil is handled as bit device, and the current value is handled as
0: PLC timer screen setting valid 1: PLC timer program valid
0: PLC counter screen setting valid 1: PLC counter program valid
word device. In the function instructions described after, the word device T indicates the current value even if there is no description about it.
(3) Setting the timer setting value from the setting and display unit
The timer T setting value can be set with the following two methods.
Method to validate the setting value (Kn) programmed with the sequence program (Fixed timer)Method to validate the setting value set from the setting and display unit (Variable timer)
(Note that even when this method is used, the setting value (Kn) must be programmed in the sequence program. In this case, the Kn value will be ignored during the operation. When a data register D is used for the setting value, the contents of the data register D will be the setting value regardless of the parameter.)
(a) Methods for setting the number of fixed timer and variable timer points
The ratio of the fixed timer and variable timer in all of the timer T points can be set with the bit selection parameter. The boundary of the two setting methods is set using 100 points of the timer as one unit. This setting is validated when the PLC is restarted.
Variable timer Bit selection (#6454)
Number of points Range Bit 3 Bit 2 Bit 1 Bit 0
0 0 0 0 0 Use all points as fixed timer
100 (0 to 99) 0 0 0 1
200 (0 to 199) 0 0 1 0
300 (0 to 299) 0 0 1 1
400 (0 to 399) 0 1 0 0
500 (0 to 499) 0 1 0 1
600 (0 to 599) 0 1 1 0
All points (0 to 703) 0 1 1 1 Use all points as variable timer
Use range other than that shown on left as fixed timer
Remarks
(b) Variable timer validity setting bit on program side
A bit selection parameter is provided as a switch for the variable timer to invalidate all of the setting values set from the setting and display unit and validate the setting values in the sequence program. This setting is valid when the PLC is restarted. (This bit is valid also for the integrated timer.)
# (6449
) Data
Use No. 6449
7 6 5 4 3 2 1 0
( 0 0 0 0 0 0 1 1 )
II-31
5 Explanation of Devices
MITSUBISHI CNC
(c) Methods for setting the setting value from the setting and display unit
The timer and counter setting value can be set from the pa rameter setting scr een. Ste ps 1 to 4 also apply for the counter.
1) The set value is validated when the PLC is restarted.
2) On the setting screen, only the number of variable timer points set with (a) are valid. The (a) setting is immediately reflected on the display of the settable range.
3) The setting screen values are not affected even if the (b) "variable timer validity setting bit on program side" setting is changed.
4) It is possible to judge whether the setting value is valid within the current storage ladder (whether that timer is used with the setting value (Kn) in the ladder).
5) The timer type (10ms, 100ms) can be judged on the setting screen.
II-32
M700V/M70 Series PLC Programming Manual
5.3 Detailed Explanation of Devices
5.3.8 Integrated Timer ST
r
X5
X7
ST47 coil
ST47 contact
ST47 current value
0 1 90 91 100 0 1 60
(1) The 100ms integrated timer is available for this count-up type timer.
100ms Integrated timer ST
(a)When the input conditions are set, the count starts. When the set value is counted, that timer contact will turn ON. (b)Even the input conditions are turned OFF, the 100ms integrated timer current value (count value) will be held, and the contact state will not change. (c)The 100ms integrated timer count value will be set to 0 and the contact will turn OFF when the RST instruction is executed.
X5
K100
ON
ST47
X7
Input conditions
100ms integrated time
ST47 reset instruction Reset input
RST ST47
OFF
OFF
OFF
9 seconds
1.5 seconds
ON
ON
9 seconds
1 second
6 seconds
6 seconds
ON
OFF
(d)The value is set with a decimal, and can be designated from 1 to 32767 (0.1 to 3267.7 s). The data register D or file register R data can be used as the setting value. (e)When the bit selection parameter is set, the 100ms integrated timer current value (count value) will be held even when the power is turned OFF.
(2) Handling the device ST types
With the device ST, the contact/coil is handled as bit device, and the current value is handled as word device. In the function instructions described after, the word device T indicates the curren t value even if there is no description about it.
(3) Setting the timer setting value from the setting and display unit
The ratio of the variable and fixed can be set with the bit selection parameter in the same manner as timer T.
Variable integrated timer Bit selection (#6453)
Number of points Range Bit 7 Bit 6 Bit 5
0 0 0 0 Use all points as fixed integrated timer
20 (0 to 19) 0 0 1
40 (0 to 39) 0 1 0
All points (0 to 63) 0 1 1 Use all points as variable integrated timer
Use range other than that shown on left as fixed integrated counter
Remarks
In the same manner as timer T, a bit selection parameter is provided as a switch for the variable integrated timer to invalidate all of the setting values set from the setting and display unit and validate the setting values in the sequence program. (This bit is used for both the timer T and integrated timer ST.)
II-33
5 Explanation of Devices
MITSUBISHI CNC
5.3.9 Counter C
Variable counter
Bit selection (#6454)
Number of points
Range
Bit 7
Bit 6
Bit 5
Bit 4
Remarks
0
0 0 0 0
Use all points as fixed counter
40
(0 to 39)
0 0 0
1
80
(0 to 79)
0 0 1
0
120
(0 to 119)
0 0 1
1
160
(0 to 159)
0 1 0
0
200
(0 to 199)
0 1 0
1
240
(0 to 239)
0 1 1
0
Use range other than that shown on left as fixed counter
All points
(0 to 255)
0 1 1 1 Use all points as variable counter
(1)The counter counts up and detects the rising edge of the input conditions. Thus, the count will not take
place when the input conditions are ON.
Counter C
(a)The value is set with a decimal, and can be designated from 1 to 32767. The data register D or file register R data can be used as the setting value. (b)The counter count value will not be cleared even if the input conditions turn OFF. The counter count value must be cleared with the RST instruction. (c)When the bit selection parameter is set, the counter current value (count value) will be held even when the power is turned OFF. Note that some cannot be held depending on the version of CNC.
(2)With the device C, the contact/coil is handled as bit device, and the current value (counter value) is
handled as word device. In the function instructions described after, the word device C in dicates the current value (counte r value) even if there is no description about it.
(3)The counter C setting value can be set with the following two methods.
(a)Method to validate the setting value (Kn) programme d with the sequence program (Fixed
counter) (b)Method to validate the setting value set from the setting and display unit (Variable counter) (Note that even when this method is used, the setting value (Kn) must be programmed in the sequence program. In this case, the Kn value will be ignored during the operation. When a data register D is used for the setting value, the contents of the data register D will be the setting value regardless of the parameter.)
The ratio of the fixed counter and variable counter in all of the counter C points can be set with the bit selection parameter.
The bit selection parameter is set using 40 counter points as one unit. A bit selection parameter is provided as a switch for the variable counter to invalidate all of the setting values set from the setting and display unit and validate the setting values in the sequence program. (Refer to the explanation on the timer.)
II-34
M700V/M70 Series PLC Programming Manual
5.3 Detailed Explanation of Devices
5.3.10 Data Register D




Decimal -32768 to 32767
Hexadecimal 0 to FFFF
Decimal -2147483648 to 2147483647
Hexadecimal 0 to FFFFFFFF
For 16-bit instruction(Using Dn)
For 32-bit instruction
(Using Dn+1, Dn)
(1)The data register is the memory that stores the data in the PLC.
(2)The data register has a 1-point 16-bit configuration, and can be read and written in 16-bit units.
To handle 32-bit data, two points must be used. The data register No. designated with the 32-bit instruction will be the low-order 16-bit, and the designated data register No. +1 will be the high-order 16-bit.
Circuit example
0
Data storage
(Example)
D1 D0
High-order 16-bit
(X1F to X10)
Use of the DMOV instruction is shown below.
DMOV K8X0 D0
Low-order 16-bit
(XF to X0)
The X0 to 1F data is
stored in D0, 1.
(3)The data that is stored once in the sequence program is held until other data is stored.
(4)The data stored in the data register is cleared when the power is turned OFF.
(5)Values that can be stored:
(6)Data registers D0 to D2047 are all user release data registers.
II-35
5 Explanation of Devices
MITSUBISHI CNC
5.3.11 File Register R




Decimal -32768 to 32767
Hexadecimal 0 to FFFF
Decimal -2147483648 to 2147483647
Hexadecimal 0 to FFFFFFFF
For 16-bit instruction(Using Rn)
For 32-bit instruction
(Using Rn+1, Rn)
(1)As with the data registers, the file registers are memories used to store data. However, there are some
that have fixed applications, and those that are released.
(2)The file register has a 1-point 16-bit configuration, and can be read and written in 16-bit units.
To handle 32-bit data, two points must be used. The file register No. designated with the 32-bit instruction will be the low-order 16-bit, and the designated file register No. +1 will be the high-order 16­bit.
Circuit example
0
Data storage
(Example)
High-order 16-bit
(X1F to X10)
Use of the DMOV instruction is shown below.
R1 R0
The X0 to 1F data is stored in R0, 1.
Low-order 16-bit
(XF to X0)
(3)The data that is stored once in the sequence program is held until other data is stored.
(4)With the file registers, the following registers are the user release.
R8300 to R9799, R9800 to R9899
The following registers of the registers above are not cleared when the power is turned OFF.
R8300 to R9799
The other file registers have fixed applications such as interface of the PLC and CNC, parameter interface, etc., so use according to the application.
(5)Values that can be stored:
II-36
M700V/M70 Series PLC Programming Manual
5.3 Detailed Explanation of Devices
5.3.12 Index register Z
(1)The index register is used as ornaments for the device. *
159
165
D5Z0 indicates D(5+Z0)=D8
(2)The index register has a 1-point 16-bit configuration, and can be read and written in 16-bit units.
(3)The data stored in the index register is cleared when the power is turned OFF.
(4)Values that can be stored:Decimal -32768 to 32767
Hexadecimal 0 to FFFF
* Refer to " Explanation of Instructions: Index Modification" for the modifiaction target device.
II-37
5 Explanation of Devices
MITSUBISHI CNC
5.3.13 Nesting N
A
Execute when A condition is set.
Execute when A, B conditions ar
Execute when A, B, C conditions
Reset MC2 to 7 Execute when A, B conditions ar
Reset MC1 to 7 Execute when A condition is set Reset MC0 to 7
Execute regardless of A,B,C con
(1)This indicates the master control nesting structure.
(2)The master control nesting N is used in order from smallest No.
N0
N1
N2
M15
B
M16
C
M17
MC N0 M15
MC N1 M16
MC N2 M17
MCR N2
MCR N0
(a)The conditions for each master control to turn ON are as follow.
 MC N0 M15 ‥‥‥‥ ON when condition A is ON  MC N0 M16 ‥‥‥‥ ON when conditions A, B are ON  MC N0 M17 ‥‥‥‥ ON when conditions A, B, C are ON
(b)The timer and counter when the master control is OFF is as follows.
100ms timer, 10ms timer : The count value is set to 0.100ms integrated timer : The current count value is retained.Counter : The current counter value is retained.OUT instruction : All turn OFF
II-38
M700V/M70 Series PLC Programming Manual
5.3 Detailed Explanation of Devices
5.3.14 Pointer P
(1)What is a pointer?
A pointer is a device used with branch instructions. A total of 2048 points is used in all executed programs. The reserved pointers use the 4000 addresses separately.
(2)Pointer applications
(a)Jump instruction (CJ, JMP) jump destination designation and label (Designation of jump destination head)
Label
P20
(b)Subroutine call instruction (CALL) call destination and label (Designation of subroutine program head)
X13
Jump to label P20 when X13 turns ON.
Pointer
X10
Execute sub-routine
Label
Pointer
P33
program designated with
label P33 when X10 turns
(3)Types of pointers
The details of the pointers differ according to the program method. (a)Independent program method
The following two types of pointers are used.
・General pointer  : Pointer which can jump or call with a jump instruction or subroutine call
instruction
・Reserved pointer : Pointer with fixed application, such as a start label
(b)Multi-program method
The following three types of pointers are used.
・Local pointer  : Pointer used independently in each program ・Common pointer : Pointer which can be called with subroutine call instruction from all
programs being executed
・Reserved pointer : Pointer with fixed application, such as an END label
II-39
5 Explanation of Devices
MITSUBISHI CNC
5.3.14.1 General Pointers
General pointers are pointer which can be used only with the independent program method, which lays importance on compatibility with conventional models. The general pointer can be used with the jump ins tru ctions and subroutine call instructions. The same pointer No. cannot be used.
5.3.14.2 Local Pointers
Local pointers are pointers that can be used on ly wi th the m ulti-p ro gr am me th od . (1)What is a local pointer?
(a)A local pointer is a pointer that can be used independently with each program stored in the CNC
controller. The local pointer can be used with the jump instructions and subroutine call instructions.
(b)The same pointer No. can be used in each program.
The pointers from P0 to the common pointer usage range settin g value (explained later) can be used.
P0
Program A
CALL P0
P0
Program B
CALL P0
RET
END
The same pointer can be used.
II-40
M700V/M70 Series PLC Programming Manual
5.3 Detailed Explanation of Devices
(2)Concept of number of local pointer points
The local pointers split and use the local pointer area (arbitrarily settable with user settings) in all programs. Up to the maximum No. of local pointers in use can be used in each program. When using the local pointers in multiple programs, start use from P0. An error will occur if the total of local pointers used in each program exceeds the setting number.
Program A
Use P0 to P99 in the program
100 points from P0 to P99 are occupied
Program B
Use P100 to P199 in the program
200 points from P0 to P199 are occupied
When P0 to P99 are used, only 100 points are occupied.
Program C
Use only P249 in the program
250 points from P0 to P249 are occupied
When P0 is used, only one point is occupied.
Total of 550 points are used
II-41
5 Explanation of Devices
MITSUBISHI CNC
5.3.14.3 Common Pointers
Common pointers are pointers that can be used only with the multi-program method. (1)What is a common pointer?
(a)A common pointer is a pointer that calls the subroutine progr am from all pr og rams exe cuted with the
CNC controller. The common pointer can be used only with the subroutine call instruction, and cannot be used with the jump instruction.
(b)The same pointer No. cannot be used as a label.
(2)Common pointer usage range
The common pointer usage range can be set with the GX Developer parameter settings. The range following the set No. is the common pointers. The range that can b e set as the head No. of the common pointer is P0 to P2047. The default value is set to 1800, and P1800 to P2047 can be used as common pointers.
Program A
Program B
P1804
P1805
Program C
CALL P0
RET
II-42
M700V/M70 Series PLC Programming Manual
5.3 Detailed Explanation of Devices
5.3.14.4 Reserved Pointers
P4005 (END) can be used as a device for the CJ instruction, etc., but cannot be used as a label. In addition, it cannot be used for a CALL instruction device.
Reserved pointers are pointers with fixed applications.
(1)Independent program me th od
P4001 (high-speed) : Start label for PLC high-speed processing progra m. P4002 (medium-speed) : Start label for PLC main (ladder) processing pro gram. P4005 (END) : Label indicating END.
X17
723
726
CJ P4005
Jump to END when X17 turns ON.
[CAUTION]
1.Do not omit the P4002 (medium-speed) label even when using only the PLC main processing program.
2.Do not use P4001 (high-speed) or P4002 (medium-speed) as a CJ instru ction or CALL instruction device.
3.Do not program to jump to P** in the PLC high-speed processing program from the PLC main processing program.
4.P** used as a CJ instruction or CALL instruction device must be programmed so that it is in the same program file as the label instruction.
The PLC will not run properly if even one of Cautions 1 to 4 is not observed.
(2)Multi-program method
(a)Label indicating END (P4005)
P4005 is used as the CJ instruction jump destination, and cannot be used as a normal label. It also cannot be used as the CALL instruction call destination. If CJ P4005 is executed when multiple PLC programs are registered with the multi-programming function, the process will jump to the end of all PLC programs (in other words, the scan process is canceled).
To jump to end of all processes
X17
CJ P4005
Cancel process (jump to END of last program in process) when X17 turns ON.
II-43
5 Explanation of Devices
MITSUBISHI CNC
The following two methods of jumping to the end of each program are available.
X17
Sets the local pointer right before the END instruction and jumps to that position. Executes GOEND instruction. (Usable only with the extended instruction mode)
To jump to the end of the program
CJ P100
P100
X17
Jump to pointer before
END when X17 turns
ON.
GOEND
Jump to END with GOEND instruction when X17 turns ON.
[Cautions for pointers in multi-program method]
1.Each process (initialization, high-speed, main) is executed from the head of the program executed at the start of each process. Thus, the reserved labels for starting, used with the conventional models, cannot be used.
2.The common pointers can be used only with subroutine call instructions, and ca nnot be used with jump instructions.
3.The labels using the CJ instruction, JMP instruction or CALL instruction as a device must be programmed so that one of the following exists.
If the pointer is a local pointer, it must exist in the same program file as the used instruction.If the pointer is a common pointer, it must exist in one of the registered program files.
The PLC will not run properly if even one of Cautions 1 to 3 is not observed.
II-44
M700V/M70 Series PLC Programming Manual
5.3 Detailed Explanation of Devices
5.3.15 Decimal Constant K
(1)The decimal constant can be used in the followin g ways.
(a)Timer counter setting value : Designate in the range of 1 to 32767. (b)Pointer No. : 0 to 159 (c)Bit device digit designation : 1 to 8 (d)Basic instruction, function instruction, exclusive instruction value setting
16-bit instruction : -32768 to 32767 32-bit instruction : -2147483648 to 2147483647
(2)The decimal constant is stored by binary value in the PLC.
5.3.16 Hexadecimal Constant H
(1)The hexadecimal constant is used to design a te the ba sic ins tru ct ion , fun ct ion instr uc tio n an d ex clu sive instruction values.
16-bit instruction : 0 to FFFF 32-bit instruction : 0 to FFFFFFFF
II-45
5 Explanation of Devices
MITSUBISHI CNC
II-46
II-47
6
Explanation of
Instructions
6 Explanation of Instructions
MITSUBISHI CNC

6.1 Compatible Instructions and Extended Instructions

The following two PLC instruction modes are available with this CNC. Some model has extended index Modification in the extended PLC instruction mode. Characteristics and setting methods for these instructions are explained here.
Compatible PLC instruction mode (Usable model: M700V Series, M700 Series, M70 Series type A/type B) Extended PLC instruction mode (Usable model: M700V Series, M700 Series, M70 Series type A)
(Model with extended index Modification: M700V Series)
(1) Outline and differences of each mode
"Compatible PLC instruction mode" is set when instructions must be compatible with those of the conventional machine type. In this mode, only the PLC instruction specification which is conventionally compatible with can be used. If the extended PLC instruction is used, an execution error occurs at the time of input or edit.
"Extended PLC instruction mode" is set when the extended instruction specification is used. "Extended PLC instruction mode" includes the specification of "Compatible PLC instruction mode". (Note that operations may differ for some instructions. Details are explained later.) Specifications for each mode are given below.
Conventional machine type
Number of basic instructions
Number of function instructions
Usable device 15 devices 22 devices Device designation range of
instruction argument
22 instructions
71 instructions
-
Compatible PLC
instruction mode
(2) Setting method of PLC instruction mode
PLC instruction mode is set by bit selection parameter #6452. (a) Bit selection parameter
# No. Bit Item Details
The condition of the usable instruction for the built-in PLC
6452 Bit 1
PLC instruction extension valid
can be switched. 0: Operated in the compatible PLC instruction mode 1: Operated in the extended PLC instruction mode
(b) Notes
This parameter will be valid when the power is turned OFF and ON again. If expanding the PLC instruction is disabled during the use of expansion PLC instruction, an error
occurs at PLC RUN.
Even if expandin g th e PLC instr uction is enabled in 70 Series type B, the instruction is ignored
and operated in the compatible PLC instruction mode.
Extended PLC instruction mode
Extended index
Modification
37 instructions
198 instructions
←←
Extended
Extended +Index
Modification
Setting
range
0,1 0
Standard
value
II-48
M700V/M70 Series PLC Programming Manual
6.1 Compatible Instructions and Extended Instructions
(3) Notes
The following instructions have different operations even if they are the same instructions, depending on each instruction mode. For these instructions, it is highly recommended that the instructions should be replaced with ones that are usable in both modes.
Instruction
LD<=AND<
=OR<=
LD<>
AND<>
OR<>
ANDP
Compatible PLC instruction
mode
Operated as bit test instruction. (Alternative instruction for LDBIT,ANDBIT,ORBIT)
Operated as bit test instruction. (Alternative instruction for LDBII,ANDBII,ORBII)
Alternative instruction for DEFR (pulse in respect to the operation result) instruction
Extended PLC instruction
mode
Operated as comparison operation instruction. (LD<=,AND<=,OR<= instruction)
Operated as comparison operation instruction. (LD<>,AND<>,OR<> instruction)
Operated as leading edge pulse series connection instruction. (ANDP instruction)
Instruction
replacement method
"Replaceable instructions" given in the instruction specification details for "LDBIT" indicated in "Instruction Tables: Special Instructions for Old Machine Type Compatible"
Refer to "Instructions with Changed Designation Format: Alternative Circuits Resulted from the Ban on DEFR Instruction"
II-49
6 Explanation of Instructions
MITSUBISHI CNC

6.2 Instruction Tables

Process unit
+
16-bit
(1) (2)
(4) (5) (6) (7) (8) (9)
+
6.2.1 How to Read Instruction Table
The instruction tables have been made according to the following format.
Class
+ (BIN)
Instruction
sign
+
+P
+
+P
Symbol Process details
S D
+
+P
S1 S2 D
+P
S1 S2 D
S D
(D)+(S)
(BIN)
(S1)+(S2)
(BIN)
(D)
(D)
Condition
Execution
Ext. inst.
4 4
No. of
steps
Execution
Storage
3 3
3 7
4 8
(1) … Classifies instructions according to their application
(2) … Indicates the processing unit of instructions.
(3) … Indicates the instruction symbol used to enter the instruction in a program
Instruction code is built around the 16-bit instruction, with the following notations used to mark 32­bit instructions, instructions executed only at the leading edge of OFF to ON, real number instructions, and characte r strin g instruc tion s .
32-bit instruction o o o The letter "D" is added to the first line of the instruction
(Example)
+
16-bit instruction 32-bit instruction
D+
Instructions executed only at the leading edge of OFF to ON o o o The letter "P" is appended to
the end of the instruction (Example)
+
Instructions executed when ON
+P
Instructions executed only at the leading edge of OFF to ON
(4) … Shows symbol drawing on the ladder
+
S D
Indicates destination Indicates source Indicates instruction symbol
S1 S2 D
Indicates destination Indicates source Indicates instruction symbol
II-50
M700V/M70 Series PLC Programming Manual
6.2 Instruction Tables
Destination……….Indicates where data will be sent following operation Source………………Stores data prior to operation
(5) … Indicates the type of processing that is performed by individual instructions
(D) + (S) (D)
Indicates 16 bits
(D+1,D) + (S+1,S) (D+1,D)
16 bits 16 bits
Indicates 32 bits
D+1 D
Lower 16 bits Upper 16 bits
(6) … The details of conditions for the execution of individual instructions are as follows.
Symbol Execution Condition
No
Instruction executed under normal circumstances, with no regard to the ON/OFF status of conditions prior to the
symbol
recorded
instruction. If the precondition is OFF, the instruction will conduct OFF processing.
Executed during ON; instruction is executed only while the precondition is ON. If the precondition is OFF, the instruction is not executed and no processing is conducted.
Executed once at ON; instruction executed only at leading edge when precondition goes from OFF to ON. Following execution, instruction will not be executed and no processing conducted even if condition remains ON.
Executed once at OFF; instruction executed only at trailing edge when precondition goes from ON to OFF. Following execution, instruction will not be executed and no processing conducted even if condition remains OFF.
(7) … " " mark indicates that the instruction is an extended instruction.
An extended instruction operates in "Extended PLC instruction mode". When an extended instruction is used in "Compatible PLC instruction mode", an error occurs at input, edit or execution.
(8) … Indicates the number of steps when storing each instruction.
This is the number of steps that is consumed when each instruction is stored in F-ROM. Refer to "PLC Processing Program:Storing PLC Processing Program and Execution Mode " for details.
(9) … Indicates the number of steps when executing each instruction.
This is the number of steps that is consumed in the PLC processor execution area when each instruction is executed. The number of steps may be different from that of when stored in F-ROM. Refer to "PLC Processing Program: Storing PLC Processing Program and Execution Mode " for details.
II-51
6 Explanation of Instructions
MITSUBISHI CNC
6.2.2 Basic Instructions
Bit
Process unit
Class
Basic instruction
sign
LD
LDI
AND
ANI
OR
ORI
ANB
ORB
LDP
LDF
ANDP
ANDF
ORP
ORF
INV
MEP
MEF
EGP
EGF
OUT
OUT T/C
OUT H
Instruction
Execution
Condition
Symbol Process details
Vn
Vn
Start of logic operation (A contact operation start) Start of logic negation operation (B contact operation start) Logical AND (A contact serial connection) Logical AND negation (B contact serial connection) Logical OR (A contact parallel connection) Logical OR negation (B contact parallel connection)
AND between logical blocks (Serial connection between blocks)
OR between logical blocks (Parallel connection between blocks)
Starts leading edge pulse operation
Starts trailing edge pulse operation
Leading edge pulse series connection
Trailing edge pulse series connection
Leading edge pulse parallel connection
Trailing edge pulse parallel connection
Inversion of operation result
Conversion of operation result to leading edge pulse
Conversion of operation result to trailing edge pulse Conversion of operation result to leading edge pulse (Stored at Vn) Conversion of operation result to trailing edge pulse (Stored at Vn)
Device output
100ms timer/counter output
10ms timer output
1
1
1
1
1
1
1 1
1 1
4 3
4 3
No. of
Ext. inst.
steps
Storage
2 4
2 4
2 4
2 4
2 4
2 4
1 3
1 3
1 3
1 3
1 3
1/2
*1
Execution
1/2
*2
1/2
*2
1/2
*2
1/2
*2
1/2
*2
1/2
*2
1/2
*2
(To be continued on the next page) *1: Argument will be 2 steps at F device. *2: Argument will be 1 step at bit device, 2 steps at word device. When the machine has the extended index Modification, an argument with an index will be two steps.
II-52
M700V/M70 Series PLC Programming Manual
6.2 Instruction Tables
Basic instructions (continued)
No. of
steps
Class
Process unit
Instruction
sign
Symbol
Process details
Execution
Condition
Ext. inst.
Storage
Execution
SET
Device set
1/2
*1
1/2
*2
RST
Device reset
1/2
*1
1/2
*2
RST T/C
Timer/counter reset
4
2
MC
Master control start
2
2
MCR
Master control release
1
1
PLS
Generate one cycle worth of pulses at rising edge of input signal
2 2
PLF
Generate one cycle worth of pulses at falling edge of input signal
2 2
FF
Reversal of device output
2
5
SFT
2
1/2
*2
SFTP
Device 1-bit shift
2
6
MPS
Registration of operation result
1
1
MRD
Read of operation results registered in MPS
1
1
MPP
Reading and resetting of operation results registered in MPS
1
1
NOP
Ignored (For program deletion or space)
1
1
NOPLF
Ignored (To change pages during printouts)
1
1
Basic instruction
Bit
PAGE
Ignored (Subsequent programs will be controlled from step 0 of page n)
1
1
SET
RST
RST
n D
MC
MCR
PLS D
PLF
FF
SFT
D
D
D
n
D
D
D
*1: 2 steps when the argument is F device. *2: 1 step when the argument is bit device; 2 steps when the argument is word device. When the machine has the extended index Modification, an argument with an index will be two steps.
MPS
MRD
MPP
SFTP
NOPLF
PAG E
D
n
II-53
6 Explanation of Instructions
MITSUBISHI CNC
6.2.3 Comparison operation Instructions
16-bit
S1
S2
32-bit
16-bit
32-bit
16-bit
3/4
*1
3/4
*1
32-bit
16-bit
32-bit
Class
Process unit
Instruction
sign
LD=
AND=
OR=
LDD=
ANDD=
ORD=
LD<>
AND<>
OR<>
LDD<>
ANDD<>
ORD<>
LD>
AND>
OR>
LDD>
ANDD>
ORD>
LD>=
AND>=
OR>=
LDD>=
ANDD>=
ORD>=
Symbol Process details
S1 S2
=
=
=
D=
D=
D=
<>
<>
<>
D<>
D<>
D<>
>
>
>
D>
D>
D>
>=
>=
>=
D>=
D>=
D>=
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
Continuity state when (S1) Non-continuity state when (S1)
Continuity state when (S1+1,S1) Non-continuity state when (S1+1,S1)
(S2+1,S2)
Continuity state when (S1) Non-continuity state when (S1)
Continuity state when (S1+1,S1) Non-continuity state when (S1+1,S1)
(S2+1,S2)
Continuity state when (S1) Non-continuity state when (S1)
Continuity state when (S1+1,S1) Non-continuity state when
(S1+1,S1)
(S2+1,S2)
Continuity state when (S1) Non-continuity state when (S1)
Continuity state when (S1+1,S1) Non-continuity state when (S1+1,S1)
(S2+1,S2)
(S2)
(S2)
(S2+1,S2)
(S2)
(S2)
(S2+1,S2)
(S2)
(S2)
(S2+1,S2)
(S2)
(S2)
(S2+1,S2)
Execution
Condition
No. of
Ext. inst.
steps
Storage
Execution
3 3
3 3
3 3
3/4
*1
3/4
*1
3/4
*1
3 3
3 3
3 3
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3 3
3 3
3 3
3/4
*1
3/4
*1
3/4
3/4
*1
3/4
*1
3/4
*1
3/4
*1
*1
3 3
3 3
3 3
3/4
*1
3/4
*1
3/4
*1
II-54
(To be continued on the next page) *1: 1 step is added when either S1 or S2 is a constant number.
M700V/M70 Series PLC Programming Manual
6.2 Instruction Tables
Comparison operation instructions (continued)
16-bit
32-bit
16-bit
32-bit
+
16-bit
32-bit
Class
Process unit
Instruction
sign
LD<
AND<
OR<
LDD<
ANDD<
ORD<
LD<=
AND<=
OR<=
LDD<=
ANDD<=
ORD<=
Symbol Process details
S1 S2
<
<
<
D<
D<
D<
<=
<=
<=
D<=
D<=
D<=
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
S1 S2
Continuity state when (S1) Non-continuity state when (S1)
Continuity state when (S1+1,S1) Non-continuity state when
(S1+1,S1)
(S2+1,S2)
Continuity state when (S1) Non-continuity state when (S1)
Continuity state when (S1+1,S1) Non-continuity state when (S1+1,S1)
(S2+1,S2)
(S2)
(S2)
(S2+1,S2)
(S2)
(S2)
(S2+1,S2)
Execution
Condition
No. of
Ext. inst.
steps
Storage
Execution
3 3
3 3
3 3
3/4
3/4
*1
*1
3/4
3/4
*1
*1
3/4
3/4
*1
*1
3 3
3 3
3 3
3/4
3/4
*1
*1
3/4
3/4
*1
*1
3/4
3/4
*1
*1
*1: 1 step is added when either S1 or S2 is a constant number.
6.2.4 Arithmetic Operation Instructions
Process unit
Class
+ (BIN)
Instruction
sign
+
+P
+
+P
D+
D+P
D+
D+P
Symbol Process details
S D
+P
D+
D+P
D+
D+P
+
S D
+P
S1 S2 D
S1 S2 D
S D
S D
S1 S2 D
S1 S2 D
(D)+(S) (D) (BIN)
(S1)+(S2) (D) (BIN)
(D+1,D)+(S+1,S) (D+1,D) (BIN)
(S1+1,S1)+(S2+1,S2) (D+1,D) (BIN)
Execution
Condition
No. of
Ext. inst.
steps
Storage
3 3
3 7
4 4
4 8
3/4
*1
3/4
*1
4/5
*2
4/5
*2
Execution
3/4
*1
7/8
*1
4/5
*2
8/9
*2
(To be continued on the next page) *1: 1 step is added when S is a constant number. *2: 1 step is added when either S1 or S2 is a constant number.
II-55
6 Explanation of Instructions
MITSUBISHI CNC
Arithmetic operation instructions (continued)
16-bit
32-bit
16-bit
32-bit
S1
S2
D
16-bit
32-bit
(S1+1,S1) (S2+1,S2)
Quotient(D+1,D), Remainder(D+3,D+2) (BIN)
16-bit
Class
- (BIN)
* (BIN)
/ (BIN)
Four arithmetic operations (BCD)
Process unit
Instruction
Execution
Condition
sign
Symbol Process details
S D
-
-P
D-
D-P
D-
D-P
*
*P
D*
D*P
/
/P
D/
D/P
B+
B+P
B-
B-P
B*
B*P
B/
B/P
-
S D
-P
S1 S2 D
S1 S2 D
S D
S D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
S1 S2 D
(D) (S) (D) (BIN)
(S1) (S2) (D) (BIN)
(D+1,D) (S+1,S) (D+1,D) (BIN)
(S1+1,S1) (S2+1,S2) (D+1,D) (BIN)
(S1) (S2) (D+1,D) (BIN)
(S1+1,S1) (S2+1,S2)
(D+3,D+2,D+1,D)
(BIN)
(S1) (S2)
Quotient(D),Remainder(D+1)
(BIN)
(S1)+(S2) (D) (BCD)
(S1) (S2) (D) (BCD)
(S1) (S2) (D+1,D) (BCD)
(S1) (S2)
Quotient(D),Remainder(D+1)
(BCD)
-
-P
-
-P
D-
D-P
D-
D-P
*
*P
D*
D*P
/
/P
D/
D/P
B+
B+P
B-
B-P
B*
B*P
B/
B/P
Ext. inst.
No. of
steps
Execution
Storage
3 3
3 7
4 4
4 8
3/4
3/4
*1
*1
7/8
3/4
*1
*1
4/5
4/5
*2
*2
4/5
8/9
*2
*2
4 4
4 8
4/5
4/5
*2
*2
4/5
8/9
*2
*2
4 4
4 8
4/5
4/5
*2
*2
4/5
8/9
*2
*2
4 5
4 9
4 5
4 9
4 5
4 9
4 5
4 9
(To be continued on the next page) *1: 1 step is added when S is a constant number. *2: 1 step is added when either S1 or S2 is a constant number.
II-56
M700V/M70 Series PLC Programming Manual
6.2 Instruction Tables
Arithmetic operation instructions (continued)
D
16-bit
32-bit
16-bit
32-bit
16-bit
32-bit
16-bit
32-bit
16-bit
32-bit
Process unit
Class
sign
INC
INCP
+1
DINC
DINCP
DEC
DECP
-1 DDEC
DDECP
Complement of 2
NEG
NEGP
DNEG
DNEGP
Instruction
Execution
Condition
Symbol Process details
INC
INCP
DINC
DINCP
DEC
DECP
DDEC
DDECP
NEG
NEGP
DNEG
DNEGP
D
D
D
D
D
D
D
D
D
D
D
(D)+1 (D)
(D+1,D)+1 (D+1,D)
(D) 1 (D)
(D+1,D) 1 (D+1,D)
• (D)
BIN data
• (D+1, D)
BIN data
(D)
(D+1, D)
No. of
Ext. inst.
steps
Storage
2 2
2 6
2 2
2 6
2 2
2 6
2 2
2 6
2 2
2 6
2 2
2 6
Execution
*1: 1 step is added when S is a constant number. *2: 1 step is added when either S1 or S2 is a constant number.
6.2.5 Data Conversion Instructions
Process unit
Class
BCD
BIN
Instruction
sign
BCD
BCDP
DBCD
DBCDP
BIN
BINP
DBIN
DBINP
Symbol Process details
S D
BCD
S D
BCDP
S D
DBCD
S D
DBCDP
S D
BIN
S D
BINP
S D
DBIN
DBINP S D
BCD
conversion
• (S)
___
BIN (0 to 9999)
• (S+1, S)
_______
BIN
conversion
• (S)
___
BCD (0 to 9999)
• (S+1, S)
_______
(D)
BCD
conversion
(D+1, D)
BIN (0 to 99999999)
(D)
BIN
conversion
(D+1, D)
BCD (0 to 99999999)
Ext. inst.
No. of
steps
Execution
Storage
3 3
3 7
3 3
3 7
3 3
3 7
3 3
3 7
Execution
Condition
II-57
6 Explanation of Instructions
MITSUBISHI CNC
6.2.6 Data Transmission Instructions
No. of
steps
Class
Process unit
Instruction
sign
Symbol
Process details
Execution
Condition
Ext. inst.
Storage
Execution
MOV
3
3
16-bit
MOVP
(S)
(D)
3
7
DMOV
3/4
*1
3/4
*1
32-bit
DMOVP
(S+1,S)
(D+1,D)
3/4
*1
7/8
*1
CML
3
3
16-bit
CMLP
(S)
(D)
3
7
DCML
3/4
*1
3/4
*1
Transmission
32-bit
DCMLP
(S+1,S)
(D+1,D)
3/4
*1
7/8
*1
XCH
3
3
16-bit
XCHP
3
7
DXCH
3
3
Conversion
32-bit
DXCHP
3
7
BMOV
4
4
Batch
transmission
16-bit
BMOVP
n
(S)
(D)
4
8
FMOV
4
4
Batch
transmission
of same data
16-bit
FMOVP
n
(S)
(D)
4
8
Timer
transmission
S.TMOV
Transfer of timer and counter setting value
6
3
S D
MOV
S D
MOVP
S D
DMOV
S D
DMOVP
S D
CML
S D
CMLP
S D
DCML
S D
DCMLP
D1 D2
XCH
XCHP
DXCH
DXCH
D1 D2
D1 D2
D1 D2
(D1)
(D1+1,D1)
(D2)
(D2+1,D2)
BM OV S D n
BM OVP S D n
FM OV S D n
FM OVP S D n
S.TMOV
S D
*1: 1 step is added when S is a constant number.
II-58
M700V/M70 Series PLC Programming Manual
6.2 Instruction Tables
6.2.7 Program Branch Instruction
Program
end
Subroutine
call
(D)
(S)
(D)
(S1)
(S2)
(D)
(D+1,D)
(S+1,S)
(D+1,D)
(S1+1,S1)
(S2+1,S2)
(D+1,D)
Process unit
Class
Jump
-
- FEND
END
- CALL
- CALLP
Return
- RET
- FOR
Repetition
- NEXT
- BREAK
- BREAKP
Instruction
sign
CJ
JMP
GOEND
Execution
Condition
Symbol Process details
CJ
JMP P**
GOEND
FEND
END
CALL P**
CALLP P**
RET
FOR n
NEXT
D P**
BREAK
BREAKP
P**
D P**
Jump to Pn upon establishment of input condition
Jump to Pn unconditionally
Jump to END instruction upon establishment of input condition
End process during sequence program
End sequence program
Execute P** sub-routine program after input conditions are met
Return to main program from subroutine program
Execute the interval between FOR and
NEXT
for n times.
Forcibly end the execution of the interval
between FOR
and NEXT , and jump
to the pointer Pn.
Ext. inst.
No. of
steps
Execution
Storage
2 2
2 2
1 2
1 1
1 1
2 3
2 7
1 1
2 3
1 3
3 4
3 8
6.2.8 Logical Operation Instructions
Process unit
Class
16-bit
Logical AND
32-bit
(To be continued on the next page) *1: 1 step is added when S is a constant number. *2: 1step is added when either S1 or S2 is a constant number.
Instruction
sign
WAND
WANDP
WAND
WANDP
DAND
DANDP
DAND
DANDP
Symbol Process details
WAND
WAND
WAND S1 S2 D
WANDP S1 S2 D
DAND
DAND S1 S2 D
DAND S1 S2 D
DANDP S1 S2 D
S D
S D
S D
Ext. inst.
No. of
steps
Execution
Storage
3 3
3 7
4 4
4 8
3/4
3/4
*1
*1
3/4
7/8
*1
*1
4/5
4/5
*2
*2
4/5
8/9
*2
*2
Execution
Condition
II-59
6 Explanation of Instructions
MITSUBISHI CNC
Logical operation instructions (continued)
(D)
(S)
(D)
(S1)
(S2)
(D)
(D+1,D)
(S+1,S)
(D+1,D)
(S1+1,S1)
(S2+1,S2)
(D+1,D)
(D)
(S)
(D)
(S1)
(S2)
(D)
(D+1,D)
(S+1,S)
(D+1,D)
(S1+1,S1)
(S2+1,S2)
(D+1,D)
S
D
(D)
(S)
(D)
(S1)
(S2)
(D)
(D+1,D)
(S+1,S)
(D+1,D)
(S1+1,S1)
(S2+1,S2)
(D+1,D)
Class
Logical OR
Exclusive OR
Non exclusive logical sum
Process unit
16-bit
32-bit
16-bit
32-bit
16-bit
32-bit
Instruction
sign
WOR
WORP
WOR
WORP
DOR
DORP
DOR
DORP
WXOR
WXORP
WXOR
WXORP
DXOR
DXORP
DXOR
DXORP
WXNR
WXNRP
WXNR
WXNRP
DXNR
DXNRP
DXNR
DXNRP
Symbol Process details
S D
WOR
S D
WORP
WO R S1 S2 D
WO RP S1 S 2 D
S D
DOR
WN XR S1 S2 D
DO R S 1 S2 D
DO RP S1 S 2 D
WXOR
S D
WXORP
WXOR S1 S2 D
S D
WX ORP S1 S 2 D
S D
DXOR
DXORP
DX OR S1 S2 D
S D
DX ORP S1 S 2 D
WXNR
S D
WXNR
WXNR S1 S2 D
WXNRP S1 S2 D
S D
DXNR
DXNRP
DXNR S1 S2 D
S D
DXNRP S1 S2 D
Execution
Condition
No. of
Ext. inst.
steps
Storage
3 3
3 7
4 4
4 8
3/4
*1
3/4
*1
4/5
*2
4/5
*2
3 3
3 7
4 4
4 8
3/4
*1
3/4
*1
4/5
*2
4/5
*2
3 3
3 7
4 4
4 8
3/4
*1
3/4
*1
4/5
*2
4/5
*2
Execution
3/4
*1
7/8
*1
4/5
*2
8/9
*2
3/4
*1
7/8
*1
4/5
*2
8/9
*2
3/4
*1
7/8
*1
4/5
*2
8/9
*2
*1: 1 step is added when S is a constant number. *2: 1 step is added when either S1 or S2 is a constant number.
II-60
M700V/M70 Series PLC Programming Manual
6.2 Instruction Tables
6.2.9 Rotation Instructions
(D)
(D)
Rotate n bits right.
(
) (D)
(D)
(D)
(
) (D)
(
) (D)
16-bit
(D)
n
0
(D)
Process unit
Class
16-bit
Right rotation
32-bit
16-bit
Left rotation
32-bit
Right shift
Device unit
Instruction
sign
ROR
RORP
RCR
RCRP
DROR
DRORP
DRCR
DRCRP
ROL
ROLP
RCL
RCLP
DROL
DROLP
DRCL
DRCLP
SFR
SFRP
DSFR
Execution
Condition
Symbol Process details
b15
ROR
D n
b0
SM12
RCR
DROR
DRORP
DRCR
DRCRP
ROL
ROLP
RCL
RCLP
DROL
DROLP
DRCL
DRCLP
SFR
SFRP
DSFR
D n
D n
D n
D n
D n
D n
D n
D n
D n
D n
D n
D n
D n
D n
D n
D n
D n
D n
Rotate n bits right.
b15
Rotate n bits right.
b31 ~ b16
D+1
b31 ~ b16
Rotate n bits right.
SM12
SM12
SM12
SM12
b15
b15 0 ~ 0
(D+1)
b15 ~ b0
b15 ~ b0
(D)
b15
Rotate n bits left.
b15
Rotate n bits left.
D+1
b31 ~ b16
Rotate n bits left.
D+1
b31 ~ b16
Rotate n bits left.
bn
b0
SM12
SM12
SM12
b15 ~ b0
b15 ~ b0
b0
b0 SM12
b0
b0
RORP
RCRP
Ext. inst.
No. of
steps
Execution
Storage
3 3/4
3 7/8
3 3/4
3 7/8
3 3/4
3 7/8
3 3/4
3 7/8
3 3/4
3 7/8
3 3/4
3 7/8
3 3/4
3 7/8
3 3/4
3 7/8
3 3/4
3 7/8
3 3
16-bit
Left shift
Device unit
DSFRP
SFL
SFLP
DSFL
DSFLP
DSFRP
SFL
SFLP
DSFL
DSFLP
D n
D n
D n
D n
D n
b15 bn
SM12
b15
n
0~0
b0
b0
0
3 7
3 3/4
3 7/8
3 3
3 7
II-61
6 Explanation of Instructions
MITSUBISHI CNC
6.2.10 Data Processing Instructions
(S1)
(S2)
(D)
(
(S2)
(D)
(
(S1)
(S)
(D)
7SEG
(D)
(S)
(S)
Average
value
Process unit
Class
16-bit
Search
32-bit
Number of bits set to "1"
16-bit
32-bit
16-bit
Decode
2 bit
Encode
2 bit
n
n
Instruction
sign
SER
SERP
DSER
DSERP
SUM
SUMP
DSUM
DSUMP
SEG
SEGP
DECO
DECOP
ENCO
ENCOP
Symbol Process details
S ER S 1 S2 D
SERP S1 S2 D
DSER S1 S2 D
DSERP S1 S2 D
D
S
SUM
SUMP
S
D
DSUM
S D
DSUMP
SEG
SEGP
D EC O S D n
D EC OP S D n
E NC O S D n
E NC OP S D n
S D
S D
S D
32 bit
(S)
(S㧗1)
b3 to bO
8
256 decode
256
(S)
Decode
n
8 encode
2 bit
b0
n
: Match No.
D+1): Number of matches
n
: Match No.
D+1): Number of matches
(D): Number of "1"s
(D): Number of "1"s
n
2 bit
(D)
Encode
n
Execution
Condition
No. of
Ext. inst.
steps
Storage
5 6
5 10
5 6
5 10
3 3
3 7
3 3
3 7
3 3
3 7
4 4
4 8
4
4
Execution
4
8
16-bit
S.AVE
S .AV E S D n
6.2.11 Other Function Instructions
Class
Carry flag set
Carry flag
reset
Process unit
S.STC
S.CLC
Instruction
sign
Symbol Process details
S.STC
S.CLC
16-bit data average value
n
1
Σ (S+i) ψ (D)
n
i=1
Carry flag contact (SM12) is turned ON.
Carry flag contact (SM12) is turned OFF.
Execution
Condition
7
No. of
Ext. inst.
steps
Storage
4 1
4 1
4
Execution
II-62
M700V/M70 Series PLC Programming Manual
6.2 Instruction Tables
6.2.12 Special Instructions for Old Machine Type Compatible
S1
n
No. of
Ext. inst.
steps
Storage
3 2
3 2
3 2
3 2
3 2
3 2
Class
BIT
Process unit
1-bit
Instruction
sign
LDBIT
ANDBIT
ORBIT
LDBII
ANDBII
ORBII
Execution
Condition
Symbol Process details
<=
<=
<=
<>
<>
<>
S1 n
S1 n
S1 n
S1 n
S1 n
Bit test (A contact operation start handling) (Note 1) Bit test (A contact series connection handling) (Note 1) Bit test (A contact parallel connection handling) (Note 1) Bit test (B contact operation start handling) (Note 1) Bit test (B contact series connection handling) (Note 1) Bit test (B contact parallel connection handling) (Note 1)
(Note) These instructions can be used with the compatible instruction mode as they are compatible with old machine types but will not be available in the future.
6.2.13 Exclusive Instructions
Execution
Process unit
Class
ATC
S.ATC
ROT
S.ROT
Instruction
sign
Symbol Process details
K1: Tool No. search
K2: Tool No. AND operation search
K3: Tool change
K4: Arbitrary position tool change
K5: Forward run of pointer
S.ATC
Kn Rn
Rm
Mn
K6: Reverse run of pointer
K7: Forward run of tool table
K8: Reverse run of tool table
K9: Tool table read
K10: Tool table write
K11: Automatic write of tool table
S.ROT
Kn Rn
Rm
Mn
K1: Rotary body index
K3: Ring counter
Execution
Condition
No. of
Ext. inst.
steps
Storage
8 5
8 5
Execution
II-63
6 Explanation of Instructions
MITSUBISHI CNC

6.3 Data Designation Method

b15 ~ b0
Word device 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0 1/0
Each bit can be used with 1 as ON and 0 as OFF
(
The following three types of data can be used in each instruction. (1) Bit data (2) Word (16-bit) data (3) Double-word (32-bit) data
6.3.1 Bit Data
Bit data is data which handles contacts and coils, etc., in 1-bit units. "Bit devices" and "bit-designated word devices" can be used as bit data.
(1) When using bit devices
The bit device is designated with a 1-point unit.
M0
Y10
SET
One M0 point is target.
One Y10 point is target.
(2) When using word devices
With the word device, when the bit No. is designated, the bit for the designated bit No. can be used as bit data.
The word device bit is designated as "word device","bit number". (The bit No. is designated with a hexadecimal.) For example, D0 bit 5 (b5) is designated as D0.5, and D0 bit 10 (b10) is designated as D0.A. Note that the bit designated cannot be used for the timer (T), integrated timer (ST) , counter (C) or Index register (Z). (Example: Z0.0 is invalid)
X0
D0.5
D0.5
SET
SET Y10
Word device bit designation
Turn D0 bit 5(b5) ON(1).)
Word device bit designation
(Turn ON/OFF by setting D0 bit 5(b5) to 1/0.)
II-64
M700V/M70 Series PLC Programming Manual
6.3 Data Designation Method
6.3.2 Word (16-bit) Data
Word data is a 16-bit numerical value data used with the basic instructions and applied instructions. Word devices and digit-designated bit devices can be used with the word data.
(1) When using bit devices
Bit devices can be used as word devices by designating digits. The bit data digit is designated as "number of digits""bit device head No.". The digits can be designated between K1 and K4 with a 4-point (4-bit) unit. The target numbers of points when X0 is designated as the digit are shown below.
K1X0 --- 4 points X0 to X3 are the target K2X0 --- 8 points X0 to X7 are the target K3X0 --- 12 points X0 to XB are the target K4X0 --- 16 points X0 to XF are the target
XF to XC XB to X8 X7 to X4 X3 to X0
K1 designation
range
(4 points)
K4 designation
range
(16 points)
K3 designation
range
(12 points)
K2 designation
range
(8 points)
List of Numeric Values that Can Be Dealt with as Source Data for Digit Designation at Source (S) Side
Number of Digits Designated With 16-Bit Instruction
K1 (4 points) 0 to 15
K2 (8 points) 0 to 255 K3 (12 points) 0 to 4095 K4 (16 points) -32768 to 32767
If the source side is a digit-designated bit device, and the destination is a word device, the word device on the destination side will be 0 after the digit-designated bits on the source side.
Ladder Example Processing
With 16-bit instruction
X3X2X1X0
MOV K1X0
D0
Source (S) data
D0
Become 0
……………………
b15 b4
K1X0
b3 b2 b1 b0
X3X2X1X0
0 0 0 0 0 0 0 0 0 0 0 0
II-65
6 Explanation of Instructions
MITSUBISHI CNC
When a digit is designated on the destination (D) side, the No. of points designated by the digit will be
Do not change
(
the target of the destination side.
Ladder Example Processing
When source data (S) is a numerical
value
H1234
0 1 0 0
1 0 0 0 1 0 0 1 0 0 0 1
4
1
2
3
MOVH1234
Destination (D)
When source data (S) is a bit device
MOVK1M0
K2M0
Note)
K2M100
K2M0
K1M0
K2M100
㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯
M15
㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯
M15
㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯
M115
㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯
M8M7
1 0 0 0 0 0 0 0 0 0 0 1
3
㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯
M8M7
0 1 0 0
1 0 0 0 1 0 0 1 0 0 0 1
M108M107㨯㨯M104M103㨯㨯M100
1 0 0 0 0 0 0 0 0 0 0 1
0 1 0 0
M0
0 1 0 0
4
M0
Destination (D)
When source data (S) is a word device
MOVD0
Destination (D)
K2M100
(2) When using word devices
Word devices are designated in 1-point (16 bits) units.
M0
MOV K100
K2M100
D0
Do not change
D0
㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯
M15
㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯
M115
0 is transferred
M8M7
M108M107㨯㨯M104M103㨯㨯M100
Do not change
1 D0 point (16 bits) is word device
Data in M3 to M0 is transferred.
㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯
1 1 0 1
1 1 1 1 0 1 0 1 0 1 0 0
1 1 0 0
1 1 0 1
M0
II-66
M700V/M70 Series PLC Programming Manual
6.3 Data Designation Method
6.3.3 Using Double Word Data (32 bits)
(8 p
)
(
(
(
(12p
)
(
)
(
)
Double word data is 32-bit numerical data used by basic instructions and application instructions. Word devices and bit devices designated by digit designation can be used as double word data.
(1) When using bit devices
Digit designation can be used to enable a bit device to deal with double word data. Digit designation of bit devices is done by designating "Number of digits" and "Initial number of bit device". Digit designation of bit devices can be done in 4-point (4-bit) units, and designation ca n be made for K1 to K8. For example, if X0 is designated for digit designation, the following points would be designated:
K1X0 ….. The 4 points X0 through X3 are designatedK2X0 ….. The 8 points X0 through X7 are designatedK3X0 ….. The 12 points X0 through XB are designatedK4X0 ….. The 16 points X0 through XF are designated
X1F X1CX1B X18X17 X14X13 X10XF XCXB X8X7 X4X3 X0
K1 designation range
(8 points)
K2 designation range
oints
K7 designation range
28 points
K8 designation range
32 points)
K4 designation range
K5 designation range
20 points
K6 designation range
24 points)
K3 designation range
16 points)
oints
List of Numeric Values that Can Be Dealt with as Source Data for Digit Designation at Source (S) Side
Number of Digits
Designated K1 (4 points) 0 to 15 K5 (20 points) 0 to 1048575 K2 (8 points) 0 to 255 K6 (24 points) 0 to 16772165
K3 (12 points) 0 to 4095 K7 (28 points) 0 to 268435455 K4 (16 points) 0 to 65535 K8 (32 points) -2147483648 to 2147483647
With 32-bit Instructions
Number of Digits
Designated
With 32-bit Instructions
II-67
6 Explanation of Instructions
MITSUBISHI CNC
In cases where the source is a bit device designated by digit designation, and the destination is a word device, the word device for the destination becomes 0 following the bit designated by digit designation at the source.
Ladder Example Processing
With 32-bit Instructions
X3X2X1X0
K1X0
DMOVK1X0
Source (S) data
D0
D0
D1
Become 0
㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯㨯
b15

b31
b4
b3 b2 b1 b0 X3X2X1X0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0
b16
Become 0
(2) When using word devices
A word device designates devices used by the lower 16 bits of data. A 32-bit instruction uses (designation device number) and (designation device number + 1).
M0
DMOV K100
D0
The 2 points D0 and D1(32 bits) are used
32-bit data transfer instruction
II-68
M700V/M70 Series PLC Programming Manual

6.4 Index Modification

6.4 Index Modification
Index modification is an indirect setting made by using an index register. When an index modification is used in a sequence program, the device to be used will become the device number designated directly plus the contents of the index register. For example, if D0Z2 has been designated, and the content of Z2 is 3, D(2+3), or D5, will become the designated device. The model with extended index modification has different specifications of index modification. Refer to "Explanation of Instructions: Compatible Instructions and Extended Instructions" for the model with extended index modification.
6.4.1 For Models without Extended Index Modification
(1) The index register (Z0,Z1) can be set in the range of -32768 to 32767 with a sign added.
(2) The index modification is used only for the MOV instruction. (DMOV cannot be used.)
(3) The usable instruction format is as shown below.
(a) Transmission of data to Z0, Z1.
MOV Kn
MOV
Kn or Hn is used
Z0 or Z1
Z0
(b) Possible device combination of MOV instruction with index modification
S (Source) D (Destination) Program example
Constant Kn or Hn
Word device Example: D0,R1900
(Word device)・Z
MOV
Example: D0Z0 (Word device)・Z
Example: D0Z0 Bit device digit designation
Example: K2M00
(Word device)・Z Example: D0Z0, R500Z1
(Word device)・Z Example: D0Z0, R500Z1
(Word device)・Z Example: D1Z0, D0Z1
Bit device digit designation Example: K2Y20
(Word device)・Z Example: D0Z0, R1900Z1
MOV K100 D0Z0
MOV D0 D100Z1
MOV D0Z0 D20Z0
MOV D0Z0 K2M10
MOV K2M10 D0Z0
(Note 1) Word device indicates T, C, D, R, W, SW, and SD.
[Note] The range of the devices will not be checked if index modification is applied to the devices during sequence program execution. Thus, keep in mind that the index register contents exceeds the device range at modification, unexpected type of device are referred or renewed.
II-69
6 Explanation of Instructions
MITSUBISHI CNC
6.4.2 For Models with Extended Index Modification
:
:
ω
+PFGZSWCNKHKECVKQP
/18-<
KUUVQTGFKP<
/18&<<
&<&]_& FCVCKUUVQTGFKP&
:
:
/18-<
/18-<9<
/18-<
:
'ZRNCPCVKQP
-< --
9< -9'
ω
*GZCFGEKOCN
/18-9'
:
:
/18-<
/18-:<-/<
/18-<
:
'ZRNCPCVKQP
-:<
-:-:
ω
-/<
-/-/
/18-:-/
-KUEQPXGTVGFVQJGZCFGEKOCN
:
:
/18-<
/18&<-;(<
/18-<
:
'ZRNCPCVKQP
&< &&
-;(
-;(-;#
ω
*GZCFGEKOCN
/18&-;#
(1) Index register (Z0 to Z13) can be set from -32768 to 32767 with sign.
(2) Index modification is available in most instructions. (Refer to each instruction's explanation for
specification details of instructions.)
(3) Following is the method for using index register.
(a) Transferring data to index register
MOV Kn
MOV
Kn or Hn is used.
Z0 to Z13
Zn
(b) Example of modification
The ladder example with modification and actual processing devices are showed below.
(Example) When Z0 = 20, Z1 = -5
Ladder example Actual processing device
II-70
M700V/M70 Series PLC Programming Manual
6.4 Index Modification
[Note]
6< -
6<
6< -
6<
%< -
%<
Timer set value
: -
5/
: -
5/
$%&6<-;
6
%
$%&%<-;
The range check is invalid for device which operates modification during executing sequence program. So, be careful when using modificatio n with inde x re gis ter s which exceeds the device' allowable range. Unexpected type of device might be referred or updated. When using modification with 16 bit constant, following responses will be taken. Be careful with using beyond the maximum value or bellow the minimum value of 16 bit constant.
- When using larger value than the maximum -> Index modification will be executed on the minimum value. Z0=1 with K32767Z0 will be considered as K-32768.)
-When using smaller value than the minimum -> Index modification will be executed on maximum value. Z0=-1 with K-32768Z0 will be considered as K32767.)
(4) Restrictions of modification
Index modification has following restrictions (a) Invalid devices for modification
Devices in following table are invalid for modification.
Devices Description
K,H .
P Pointer as a label N Master controller nesting level Z Index register T,ST Timer set value C Counter set value
32 bit constant (16 bit constant is available for modification) (Note)
Word device bit designation
(Note) Constant designation of rotation instruction except for DSFR(P)/DSFL(P) is invalid for modification.
(b) Devices with restriction for index register usage
Devices Description Examples
- Only Z0 and Z1 can be used for timer contact
T
point.
- Not available for timer coil.
- Only Z0 and Z1 can be used for counter contact
C
point.
- Not available for counter coil.
(Remark) No restriction of index register No. for current value of timer and counter.
II-71
6 Explanation of Instructions
MITSUBISHI CNC
(c) Index modification on digit-designated bit device
5GVVKPIKUXCNKFFWGVQCPKPFGZ
SWCNKHKECVKQPKUCRRNKGFVQFGXKEG0Q
9JGP<::
5GVVKPIKUKPXCNKFFWGVQCP
KPFGZSWCNKHKECVKQPKUCRRNKGFVQ
FKIKVFGUKIPCVKQP
$+0-:<&
$+0-<:&
Digit-designated bit device can be executed modification. Digit-designated itself cannot be executed modification.
II-72
M700V/M70 Series PLC Programming Manual

6.5 Operation Error

6.5 Operation Error
Operation error occurs in the following cases during execution of basic instruction and function instruction.
In the case where an error described in each instruction's explanation page has occurred:
(1) Device range check
The range check for the devices to be used in basic instruction and function instruction is as shown below. (a) If instruction handles a fixed length of device (MOV, DMOV, etc.), device range check will not be
performed. In case that the relevant device range has exceeded, the data is written into another device. In such a case indicated below, error will not occur even if D2047 has been exceeded.
DMOV K100
D2047
D2047 and D2048 are supposed to be the targets; however, since D2048 does not exist, the contents of the other device will be destroyed.
Device range check will not be performed when index Modification is carried out
(b) If instruction handles a variable length of device (BMOV, FMOV, etc. that would specify the number
of transfers), device range check will not be performed. In case that the relevant device range has exceeded, the data is written into another de vice . In such a case indicated below, error will not occur even if D2047 has been exceeded.
BMOV K100 D2047
K2
D2047 and D2048 are supposed to be the targets; however, since D2048 does not exist, the contents of the other device will be destroyed.
(2) Device data check
Device's data check used for the basic instruction and function instructio n is as show n be low. (a) BIN data
Error does not occur even if the operation result is overflowed or underflowed.
 At this time, carry flag does not turn ON either.
(b) BCD data
Checking as to whether each digit is BCD value (0/ to 9) is performed.
 If the digit is other than 0 to 9 (A to F), an operation error will result.
Error does not occur even if the operation result is overflowed or underflowed.
 At this time, carry flag does not turn ON either.
II-73
6 Explanation of Instructions
MITSUBISHI CNC

6.6 Execution Condition of Instruction

There are the following 4 kinds of execution conditions for basic instruction and function instruction.
Execute all the time … Instruction executed regardless of device's ON/OFF
Example: LD X0 , OUT Y10
Execute at ON … Instruction executed when input condition is turned ON
Example: MOV instruction, CJ instruction
Execute at rising edge … Instruction executed only at the rising edge (OFF to ON) of input condition
Example: PLS instruction, MOVP instruction
Execute at falling edge … Instruction executed only at the falling edge (ON to OFF) of input condition
Example: PLF instruction
With coil equivalent basic instruction and function instruction, if "execution at ON" and "execution at rising edge" are both possible with the same instruction, add "P" at the end of instruction to differentiate the execution condition.
Instruction when executed at ON     Instruction nameInstruction when executed at rising edge   Instruction name + P
With MOV instruction, execution at ON and execution at rising edge are specified as shown below.
MOV K4X0 D0
MOVP K4X0 D0
Execute at ON
Execute at rising edge
II-74
Loading...