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.
6 Explanation of Instructions....................................................................................................................... 47
6.1 Compatible Instructions and Extended Instructions............................................................................. 48
8 Function Instructions .............................................................................................................................. 123
3.1 Installing the Tools............................................................................................................................... 16
3.2 Preparation for Serial (RS-232C) Communication........................................................................ ... ....16
3.2.1 Connecting the Serial Cable .................... ... ....................................... ... ... ... .... ............................. 16
3.3 Full Screen Display.............................................................................................................................. 17
3.4 Color-coded Display of "LADDER" Screen.......................................................................................... 20
4.1 PLC Data Storage Area ....................................................................................................................... 32
4.2 Type of Data ............................................................................... ... .... ... ............................................... 33
4.2.1 Program Data............................................................................................................................... 34
9 Other Functions ....................................................................................................................................... 141
9.1 Contact Coil Usage List ..................................................................................................................... 142
9.2 List of Used Devices......................... ... .... ... ... ... ... .... ...................................... .... ... ... .......................... 144
11 Setting the Parameters.......................................................................................................................... 187
11.1 Setting the Program......................................................................................................................... 189
11.2 Common Pointer Setting.................................................................................................................. 191
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
16 Help ......................................................................................................................................................... 253
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 unitPLC 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
DeviceName
Comment
X0X- OTX-axis OT
X1Y- OTY- axis O T
X2Z- OTZ- 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
ProcedurePersonal ComputerCNC 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.
Onboard
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 nameDescription (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 nameExecution type
INITInitialization sequence program1Starts up only once when the power is turned ON.
HLAD1
HLAD22
MAIN
MLAD23
SUB1Standby sequence program1
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"MLAD12
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
(mediumspeed)
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:
(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 highspeed 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 highspeed 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 unitxx
Output signal to control unitxx
Input signal from machineo (2-byte units)xo : Possible
Output signal to machinexo (2-byte units)x : Not possible
Input signal from operation boardxx
Output signal to operation board xx
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 sideR7500
HIGH sideR7501
LOW sideR7502
HIGH sideR7503
LOW sideR7504
HIGH sideR7505
……
LOW sideR7794
HIGH sideR7795
LOW sideR7796
HIGH sideR7797
LOW sideR7798
HIGH sideR7799
Corresponding
PLC constant setting and display screen
register
DetailsSetting 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.
DetailsSetting 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.ItemDetailsSetting range
1326PLC 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 registerDetailsSetting range
#1(#6401)R7800-Low side
#2(#6402)R7800-High side
#3(#6403)R7801-L
#4(#6404)R7801-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
communication 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 writing 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.ItemDetailsSetting 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, 10
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
*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
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 16bit.
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.
MCN0M15 ‥‥‥‥ ON when condition A is ONMCN0M16 ‥‥‥‥ ON when conditions A, B are ONMCN0M17 ‥‥‥‥ 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 device15 devices22 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.BitItemDetails
The condition of the usable instruction for the built-in PLC
6452Bit 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,10
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 32bit 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.
SymbolExecution 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.
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 DesignatedWith 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 ExampleProcessing
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 ExampleProcessing
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
MOVH1234
Destination (D)
When source data (S) is a bit device
MOVK1M0
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
MOVD0
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 designated
・K2X0 ….. The 8 points X0 through X7 are designated
・K3X0 ….. The 12 points X0 through XB are designated
・K4X0 ….. 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 15K5 (20 points)0 to 1048575
K2 (8 points)0 to 255K6 (24 points)0 to 16772165
K3 (12 points)0 to 4095K7 (28 points)0 to 268435455
K4 (16 points)0 to 65535K8 (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 ExampleProcessing
With 32-bit Instructions
X3X2X1X0
K1X0
DMOVK1X0
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
:
:
ω
+PFGZSWCNKHKECVKQP
/18-<
KUUVQTGFKP<
/18&<<
&<&]_&
FCVCKUUVQTGFKP&
:
:
/18-<
/18-<9<
/18-<
:
'ZRNCPCVKQP
-< --
9< -9'
ω
*GZCFGEKOCN
/18-9'
:
:
/18-<
/18-:<-/<
/18-<
:
'ZRNCPCVKQP
-:<
-:-:
ω
-/<
-/-/
/18-:-/
-KUEQPXGTVGFVQJGZCFGEKOCN
:
:
/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 exampleActual 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.
DevicesDescription
K,H
□ . □
PPointer as a label
NMaster controller nesting level
ZIndex register
T,STTimer set value
CCounter 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 DescriptionExamples
- 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
5GVVKPIKUXCNKFFWGVQCPKPFGZ
SWCNKHKECVKQPKUCRRNKGFVQFGXKEG0Q
9JGP<::
5GVVKPIKUKPXCNKFFWGVQCP
KPFGZSWCNKHKECVKQPKUCRRNKGFVQ
FKIKVFGUKIPCVKQP
$+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 name
・Instruction when executed at rising edgeInstruction 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...
+ hidden pages
You need points to download manuals.
1 point = 1 manual.
You can buy points or you can get point for every manual you upload.