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.
Page 3
Introduction
These specifications are the programming manual used when creating the sequence
program 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 function)
operations are also given.
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 tools in this manual may differ slightly according to
the tool version. Refer to the respective manual for details.
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).
Page 4
Precautions for Safety
G
Always read the specifications issued by the machine tool builder, this manual, related manuals and
attached documents before installation, operation, programming, 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
WARNIN
CAUTION
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.
Note that even items ranked as "
situation. In any case, important information that must always be observed is described.
Not applicable in this manual.
Not applicable in this manual.
1. Items related to product and manual
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.
CAUTION", may lead to major results depending on the
DANGER
WARNING
CAUTION
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.
(To be continued to the next page.)
Page 5
3. Items related to program development
Always observe the cautions before development to develop a program.
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.
CAUTION
Page 6
Contents
I OUTLINE
1. System Configuration....................................................................................................................1
1.1 System Configuration for PLC Development...........................................................................1
1.2 User PLC (Ladder) Development Procedure...........................................................................2
Appendix 3.List of Special Relays and Special Registers...............................................................17
Appendix 3.1 Special Relay.........................................................................................................18
Appendix 3.2 Special Register.....................................................................................................19
Appendix 4. List of PLC Alarms ......................................................................................................22
Page 15
I OUTLINE
Page 16
1. System Configuration
1.1 System Configuration for PLC Development
1. System Configuration
1.1 System Configuration for PLC Development
The general configuration of the development environment is shown 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 functions may be limited. (Print output, Japanese input, etc.)
Offline development
Personal computer
GX Developer
Printout
General-purpose printer
PLC program creation
Message creation
Ladder monitor
Ethernet
or
RS-232C
IC card
Ladder printout
Message printout
CNC control unit PLC onboard edit screen
PLC program creation
Ladder monitor
ROM making
General configuration of development environment
I - 1
Page 17
1. System Configuration
1.2 User PLC (Ladder) Development Procedure
1.2 User PLC (Ladder) Development Procedure
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
Write
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 - 2
Page 18
1. System Configuration
1.2 User PLC (Ladder) Development Procedure
Next, procedures for creating sequence programs are shown below.
ProcedurePersonal ComputerCNC Unit
Start
Determination of
machine Determination
of CNC and PLC
specifications
Determination of the
numbers of I/O points
Assign ment of I/O
signals
Assignment of internal
relays
Programming
Debugging
Debugging
(temporary memory)
(RAM operation)
Program correction
Commercially available
spreadsheet tool
DeviceName
X0X- OTX-axis OT
X1Y-OTY-axis OT
X2Z- OTZ- axis O T
GX Developer
GX Developer
Comment
Onboard
PLC onboard edit screen
Onboard
The data created with the
commercially available
spreadsheet tool can be
used as ladder comment
data.
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.
Is de bugging
complete?
NO
ROM writing
ROM operation by
CNC unit
operatio n OK?
NO
Printout
YES
Is ROM
YES
GX Deve lo p er
Onboard
Input/output
screen
Perform ROM making
operations with F-ROM write
screen.
Output binary data with
maintenance data format
using input/output screen.
Printout to a commercial
printer connected with the
personal computer from GX
Developer.
Data save onto FLD
Completion
Program data
(Maintenance data format)
Binary data
Program data:
Saved using GX Developer
Binary data:
Saved using input/output
screen
I - 3
Page 19
II PROGRAMMING EXPLANATION
Page 20
1. Outline
1. Outline
This programming manual is used when creating a sequence program 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 in structions can be
used according to the purpose and application such as the PLC support function used when supporting the
user PLCs.
II - 1
Page 21
2. PLC Processing Program
2.1 PLC Processing Program Level and Operation
2. PLC Processing Program
2.1 PLC Processing Program Level and Operation
The details of the user PLC processing level and the time chart are shown below.
PLC processing level
Program name Description (frequency, level, etc.)
Initial processing program This program starts only once at power ON. When this program operates,
machine input and operation board input are not read.
High-speed processing
program
Main processing program This program runs constantly except during the high-speed process program.
When reference interrupt signal is 3.5ms
Reference
interrupt signal
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.
When the user PLC one-scan process is completed, the next scan process
starts at the next reference interrupt signal cycle.
3.5ms
High speed
processing
Main processing
NC processing
PLC processing program operation timing chart
II - 2
Page 22
2. PLC Processing Program
2.2 Outline of PLC Processing Program
2.2 Outline of PLC Processing Program (Two Program Method)
The MITSUBISHI CNC 700 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 (conventional 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 by splitting into multiple
programs (Multi-program method)
Program A
Control details A
Program B
Control details B
Split and register for
each control detail
Program n
Control details n
Control details n
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.
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 order 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 label s.
II - 3
Page 23
2. PLC Processing Program
2.4 Multi-program Method
2.4.1 Number and Types of Registerable Programs
Up to 20 sequence programs can be registered. Only one execution type can be set in one program. The
following five types of execution types can be used.
• "Initial" (Initialization process) : This starts up only once when the power is turned ON.
• "Scan" (High-speed process) : This starts up at the standard interrupt cycle.
• "Scan" (Main process) : This starts up constantly except during the high-speed process.
• "Standby" (Standby process) : This is called from the high-speed process or main process.
• "Low speed" : This execution type is not used.
2.4.2 Program Execution Order
Several programs are executed in a predetermined order. They are not executed simultaneously. The order
is determined with the development tool (GX Developer or onboard) setting screen. The programs are
executed from the smallest number in the same execution type. An example of the setting screen for GX
Developer is shown below.
The execution order when seven sequence programs are registered in the CNC, as shown in the above
setting screen, is indicated below.
Program
name
Execution type
INIT Initialization sequence program 1
HLAD1 1
HLAD2
MAIN 1
MLAD1 2
High-speed process execution
program
Execution type is set as "Scan"
Main process sequence program
Execution type is set as "Scan"
MLAD2
SUB1 Standby sequence program 1
HLAD1 HLAD2
High-speed
process
Main process
MAINMLAD1MLAD2
Execution
One scan
order
2
3
Remarks
Starts up only once when the power is turned
ON.
"Scan type" for which program name starts
with "H"
"Scan type" for which program name does not
start with "H"
Here, subroutine that is called from MLAD2
with CALL instruction is stored
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 - 4
Page 24
2. PLC Processing Program
yp
2.5 User Memory Area Configuration and Size
2.5 User Memory Area Configuration and Size
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
User PLC
data area
Control information
Program 1
Program 2
Program 3
Program n
• Message data
• Contact/coil
comment data
(1) Internal information table of User PLC
(The table is automatically generated.)
(2) Sequence program storage area
This is not required for programs other than the main process.
The initialization, high-speed and main process program order
is arbitrary.
Total 700 Series 42000 steps
70 Series type A 32000 steps
type B 20000 steps
(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
(1) Internal information table of User PLC
(The table is automatically generated.)
(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 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 - 5
Page 25
2. PLC Processing Program
A
2.6 Storing PLC Processing Program and Execution Mode
2.6 Storing PLC Processing Program and Execution Mode
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 execut ed
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 executio n, 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 the figure above, a sequence program 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 "6.2 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 "III PERIPHERAL
DEVELOPMENT ENVIRONMENT 5.2.4 (2) How to confirm the size of execution area" or "IV EXPLANATION
OF BUILT-IN EDITING FUNCTION 13.2 (9) EXECUTE STEP" for details.
II - 6
Page 26
3. Input/Output Signals
3.1 Input/Output Signal Types and Processing
3. Input/Output Signals
3.1 Input/Output Signal Types and Processing
The input/output signals handled in user PLC are as follows:
(1) Input/output from/to controller
(2) Input/output from/to operation board (Note 1)
(3) Input/output from/to machine
The user PLC does not directly input or output these signals from or to hardware or controller; it inputs or
outputs the signals from or to input/output image memory. For the reading and writing with the hardware or
controller, the controller will perform the input/output according to the level of the main process or high-speed
process.
Controller
Input/output
Operation
board
Machine
Controller
(Note 1) The operation board here refers to when the remote I/O is installed on the
communication terminal.
Concept of input/output processing
High-speed processing
input/output
image memory
(device X, Y)
User PLC
Main 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.
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.
Input/output processing conforming to program level
II - 7
Page 27
3. Input/Output Signals
A
3.1 Input/Output Signal Types and Processing
The table below shows whether or not high-speed input/output can be performed.
Whether or not high-speed input/output can be performed
Input signal from control unit
Output signal to control unit
Input signal from machine
Output signal to machine
Input signal from operation
board
Output signal to operation board
Input signal from MELSEC when
connected to MELSEC
Output signal to MELSEC when
connected to MELSEC
High-speed input
specification
× ×
× ×
(2-byte units)
×
× ×
× ×
× ×
× ×
High-speed output
specification
×
(2-byte units)
: Possible × : Not possible
The operation board here refers to when the remote I/O is installed on the communication terminal.
3.2 Handling of Input Signals Designated for High-speed Input
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 level is higher than main processing interrupts. Input signal
which must not change within one scan should be saved in temporary memory (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 processi ng
(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 designation part. Whenever the high-speed processing program 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 between (A) and (B) and re-reads the input signal in the
hatched area.
II - 8
Page 28
3. Input/Output Signals
3.3 High-speed Input/Output Designation Method
3.3 High-speed Input/Output Designation Method
High-speed input/output is designated by setting the corresponding bit of the bit selection parameter as
shown below.
(1) High-speed input designation
76 5 4 321 0 Bit
Bit
selection
parameter
#6457
X70
X7F
X60
X6F
X50
X5F
X40
X4F
X30
X3F
X20
X2F
X10
X1F
X00
X0F
These bits
correspond to the
low-order byte
(bits 0 to 7) of file
register R7828
#6458
XF0
XFF
XE0
XEF
XD0
XDF
XC0
XCF
XB0
XBF
XA0
XAF
X90
X9F
X80
X8F
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
76 5 43210 Bit
Y70
Y7F
Y60
Y6F
Y50
Y5F
Y40
Y4F
Y30
Y3F
Y20
Y2F
Y10
Y1F
Y00
Y0F
These bits
correspond to the
low-order byte
(bits 0 to 7) of file
register R7830
#6462
YF0
YFF
YE0
YEF
YD0
YDF
YC0
YCF
YB0
YBF
YA0
YAF
Y90
Y9F
Y80
Y8F
These bits
correspond to the
high-order byte
(bits 8 to F) of file
register R7830
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 processing 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 selectio n parameter and can be set in the
parameter . However, it is recommended to set in a sequence program to prevent a parameter setting
error, etc.
(Example) —[MOV H3
R7828]— ..... To designate X00 to X0F, X10 to X1F (bit 0 and 1 for H3)
II - 9
Page 29
4. Parameters
4.1 PLC Constants
4. Parameters
4.1 PLC Constants
The parameters that can be used in user PLC include PLC constants set in the d ata 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 table
Item (# No.)
LOW side R7500 PLC constant #1
(#18001)
(#18002)
(#18003)
……
(#18148)
(#18149)
(#18150)
PLC constant setting and display screen
HIGH side R7501
LOW side R7502 PLC constant #2
HIGH side R7503
LOW side R7504 PLC constant #3
HIGH side R7505
LOW side R7794 PLC constant #148
HIGH side R7795
LOW side R7796 PLC constant #149
HIGH side R7797
LOW side R7798 PLC constant #150
HIGH side R7799
Corresponding
register
Details Setting range
Data type parameters
which can be used in
user PLC
-99999999 to
99999999
(Signed 8-digit
integer)
II - 10
Page 30
4. Parameters
(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 n umber 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
4.1 PLC Constants
Item (# No.)
LOW side PLC constant #151
(#18151)
(#18152)
(#18153)
…
(#18898)
(#18899)
(#18900)
The extended area quantity is set with basic common parameter #1326.
# No. Item Details Setting range
1326
PLC Const Ext.
Number
HIGH side
LOW side PLC constant #152
HIGH side
LOW side PLC constant #153
HIGH side
LOW side PLC constant #898
HIGH side
LOW side PLC constant #899
HIGH side
LOW side PLC constant #900
HIGH side
• Set number of PLC constant extension points.
• This is valid after the power is turned OFF and ON.
Corresponding
register
R8300 to R9799
The area for the
number
determined with
parameter #1326
is continuously
secured.
Data type parameters
which can be used in
user PLC
Details Setting range
-99999999 to
99999999
(Signed 8-digit
integer)
0 to 750
II - 11
Page 31
4. Parameters
4.2 Bit Selection Parameters
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-design ation format.
If data is stored in the file register corresponding to bit selection by using the MOV instru ction 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.)
#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.
Use bit selection parameters
#6497 to #6596 freely.
Setting
range
8 bits
II - 12
Page 32
4. Parameters
Contents of bit selection parameters #6449 to #6496
4.2 Bit Selection Parameters
Symbol
name
#6449
R7824 L
0
#6450
R7824 H
1
#6451
R7825 L
2
#6452
R7825 H
3
#6453
R7826 L
4
#6454
R7826 H
5
#6455
R7827 L
6
Control unit
thermal
alarm on
7 6 5 4 3 2 1 0
Setting and
display unit
thermal
mgmt on
External
alarm
-
message
display
- -
Branch
destination
-
label check
valid
Integrated timer ST
Variable/fixed
- - -
Number of points setting
Counter C
- - - - - - - -
Variable/fixed
Number of points setting
-
Alarm/
operator
change
Serial
GPP
communication on
Full screen
display of
message
Serial handy
terminal
comm. on
Counter C
retention
Integrated
timer ST
retention
Operator
-
message on
Onboard
editing not
possible
- -
Number of points setting
PLC counter
program on
1 0
R
method F method
operation mode
Extended PLC
instruction
mode valid
Message language change code
Timer T
Variable/fixed
Onboard
simple
on
PLC timer
program on
Alarm
message on
Onboard
on
-
#6456
R7827 H
7
#6457
R7828 L
8
#6458
R7828 H
9
#6459
R7829 L
A
#6460
R7829 H
B
#6461
R7830 L
C
#6462
R7830 H
D
#6463
R7831 L
E
- - - - - - - -
High-speed input specification 1
High-speed input specification 2
High-speed output specificati on 1
#6464
R7831 H
F
High-speed output specification 2
II - 13
Page 33
4. Parameters
4.2 Bit Selection Parameters
Symbol
name
#6465
0
R7832 L
#6466
1
R7832 H
#6467
2
R7833 L
#6468
3
R7833 H
#6469
4
R7834 L
#6470
5
R7834 H
#6471
6
R7835 L
#6472
7
R7835 H
#6473
8
R7836 L
#6474
9
R7836 H
#6475
A
R7837 L
#6476
B
R7837 H
#6477
C
R7838 L
#6478
D
R7838 H
#6479
E
R7839 L
#6480
F
R7839 H
7 6 5 4 3 2 1 0
- -
-
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 debugging by MITSUBISHI.
(Note3) Functions marked with
may not be available for some machine types.
II - 14
Page 34
4. Parameters
Bit selection screen
4.2 Bit Selection Parameters
4.3 Other Parameters
4.3.1 PLC Startup Condition Switchover
Parameter "#11004 PLCautorun enable" allows PLC to startup at NC startup even if no setting display unit is
used.
For safety, use this function only for the machine with no NC screen displayed by HMI.
(1) Basic common parameter
# No. Item Details Setting
range
11004
(PR)
PLCautorun
enable
PLC
automatic
startup valid
Switch starting condition of the PLC.
0: Start PLC after NC screen startup
1: Start PLC at NC startup
0, 1 0
(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 screen,
unexpected incident may occur.
Standard
value
II - 15
Page 35
5. Explanation of Devices
5.1 Devices and Device No.
5. Explanation of Devices
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,
etc.
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 memor y. 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 SW 0 to SW 1FF 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
parameters)
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
parameters)
D D0 to D2047 2048 points 16-bit/32-bitData register. Register for calculation
R R0 to R13311 13312 points 16-bit/32-bitFile register. CNC word I/F
W W0 to W1FFF 8192 points 16-bit/32-bitLink register
Z Z0 to Z1 2 points 16-bit Address index
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 5.3 . 4 Timer T)
*2 : The P device has two types of pointers, local and common. The number of points given above is the
total number of points.
*1
II - 16
Page 36
5. Explanation of Devices
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.
Output 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
Y10
Y10
Program Output circuit
(d) The output No. is expressed with a hexadecimal.
II - 17
Load
Page 37
5. Explanation of Devices
5.3 Detailed Explanation of Devices
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.
II - 18
Page 38
5. Explanation of Devices
5.3 Detailed Explanation of Devices
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 function s.
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.
5.3.5 Special Relay SM, Special Register SD
(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.
II - 19
Page 39
5. Explanation of Devices
5.3 Detailed Explanation of Devices
(3) Some of the main relays and registers whose applications are fixed are listed below.
Refer to "Appendix 3 List of Special Relays and Special Registers" for details.
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
• 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)
Number of counts per 1 scan
• After RUN, +1 is added every 1 scan.
SD430 Scan counter (High-speed
ladder)
5.3.6 Edge relay V
Edge relay V
(a) This stores the operation result (ON/OFF information) from the head of ladde r block.
(b) This can be used only at contacts. This cannot be used as a coil.
X0
X1 X10
V1
Edge relay
Operation results of X0,X1 and X10
are stored.
(c) The relay No. is expressed with a decimal.
II - 20
Page 40
5. Explanation of Devices
5.3 Detailed Explanation of Devices
5.3.7 Timer T
(4) The 100ms timer and 10ms timer are available for this count-up type timer.
The 100ms timer and 10ms timer are differentiated by the instru ctions 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
(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.
Input
conditions
K50
T193
100ms timer
X5
T193 coil
T193 contact
OFF
OFF
OFF
ON
ON
5 seconds
ON
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
Display for 10ms timer instruction
H K500
T1
10ms timer
X5
T1 coil
T1 contact
OFF
OFF
OFF
ON
ON
5 secnds
ON
(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.
(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.
II - 21
Page 41
5. Explanation of Devices
(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 pointsRange Bit 3Bit 2Bit 1Bit 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
(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 )
5.3 Detailed Explanation of Devices
Remarks
Use range other than that shown on
left as fixed timer
(c) Methods for setting the setting value from the setting and display unit
The timer and counter setting value can be set from the parameter setting screen. Steps 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 - 22
Page 42
5. Explanation of Devices
r
5.3 Detailed Explanation of Devices
5.3.8 Integrated Timer ST
(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
X7
Input conditions
100ms integrated time
K100
ST47
RST ST47
X5
X7
OFF
OFF
ON
9 seconds
6 seconds
1.5 seconds
ON
ST47 reset instruction Reset input
ST47 coil
ST47 contact
ST47 current value
ON
OFF
OFF
0 1 90 91 100 0 1 60
(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 current 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 pointsRange Bit 7Bit 6Bit 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
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.)
9 seconds
1 second
ON
Remarks
Use range other than that shown on left
as fixed integrated counter
6 seconds
II - 23
Page 43
5. Explanation of Devices
5.3 Detailed Explanation of Devices
5.3.9 Counter C
(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 indicates the
current value (counter 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) programmed 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.
Number of pointsRange Bit 7Bit 6Bit 5Bit 4
The bit selection parameter is set using 40 counter poi nts 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.)
Variable counter Bit selection (#6454)
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
All points (0 to 255) 0 1 1 1 Use all points as variable counter
Use range other than that shown on
left as fixed counter
Remarks
II - 24
Page 44
5. Explanation of Devices
5.3 Detailed Explanation of Devices
5.3.10 Data Register D
(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) Use of the DMOV instruction is shown belo w.
The X0 to 1F data is
stored in D0, 1.
D1 D0
High-order 16-bit
(X1F to X10)
DMOV K8X0 D0
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) The data stored in the data register is cleared when the power is turned OFF.
(5) Values that can be stored: 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)
(6) Data registers D0 to D2047 are all user release data registers.
II - 25
Page 45
5. Explanation of Devices
5.3 Detailed Explanation of Devices
5.3.11 File Register R
(1) As with the data registers, the file registers are memories used to store data. However, there are some
that have fixed applications, and those that are released.
(2) The file register has a 1-point 16-bit configuration, and can be read and written in 16-bit units.
To handle 32-bit data, two points must be used. The file register No. designated with the 32-bit instruction
will be the low-order 16-bit, and the designated file register No. +1 will be the high-order 16-bit.
Circuit example
0
Data storage
(Example) Use of the DMOV instruction is shown belo w.
The X0 to 1F data is
stored in R0, 1.
R1 R0
High-order 16-bit
(X1F to X10)
DMOV K8X0 R0
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, pa rameter
interface, etc., so use according to the application.
(5) Values that can be stored: 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)
5.3.12 Index register Z
(1) The index register is used as ornaments for the device (T, ST, C, D, R, W, SW, SD).
159
MOV K3 Z0
K4X0 D5Z0
165
MOV
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
II - 26
Page 46
5. Explanation of Devices
A
5.3.13 Nesting N
(1) This indicates the master control nesting structure.
(2) The master control nesting N is used in order from smallest No.
N0
M15
MC N0 M15
5.3 Detailed Explanation of Devices
N1
N2
B
MC N1 M16
M16
C
MC N2 M17
M17
MCR N2
MCR N1
MCR N0
Execute when A condition is set.
Execute when A, B conditions are set.
Execute when A, B, C conditions are set.
Reset MC2 to 7
Execute when A, B conditions are set.
Reset MC1 to 7
Execute when A condition is set.
Reset MC0 to 7
Execute regardless of A,B,C conditions.
(a) The conditions for each master control to turn ON are as follow.
MC N0 M15 .......... ON when condition A is ON
MC N0 M16 .......... ON when conditions A, B are ON
MC N0 M17 .......... ON when conditions A, B, C are ON
(b) The timer and counter when the master control is OFF is as follows.
· 100ms timer, 10ms timer : The count value is set to 0.
· 100ms integrated timer : The current count value is retained.
· Counter : The current counter value is retained.
· OUT instruction : All turn OFF.
II - 27
Page 47
5. Explanation of Devices
5.3.14 Pointer P
(1) What is a pointer?
A pointer is a device u se d 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
X13
CJ P20
Pointer
5.3 Detailed Explanation of Devices
Jump to label P20 when
X13 turns ON.
(b) Subroutine call instruction (CALL) call destination and label (Designation of subroutine program
head)
Label
P33
(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
• Reserved pointer : Pointer with fixed application, such as a start label
X10
instruction
CALL P33
Pointer
RET
Execute sub-routine
program designated with
label P33 when X10 turns
(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 - 28
Page 48
5. Explanation of Devices
5.3 Detailed Explanation of Devices
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 instructions and subroutin e call instruction s. The same poin ter
No. cannot be used.
5.3.14.2 Local Pointers
Local pointers are pointers that can be used only with the multi-program method.
(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 setting value (explained later) can be
used.
Program A
CALL P0
Program B
CALL P0
The same pointer
can be used.
FEND
P0
RET
END
(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
P0
Program C
Use only P249
in the program
250 points from P0 to
P249 are occupied
FEND
RET
END
Total of 550 points
are used
When P0 to P99 are
used, only 100
points are occupied.
When P0 is
used, only one
point is occupied.
II - 29
Page 49
5. Explanation of Devices
5.3 Detailed Explanation of Devices
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 program from all programs executed 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.
Program A
Program C
Program B
(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 be 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.
CALL P1804
END
CALL P1805
END
P1804
P1805
CALL P0
RET
RET
END
II - 30
Page 50
5. Explanation of Devices
5.3.14.4 Reserved Pointers
Reserved pointers are pointers with fixed applications.
(1) Independent program method
P4001 (high-speed) : Start label for PLC high-speed processing program.
P4002 (medium-speed) : Start label for PLC main (ladder) processing program.
P4005 (END) : Label indicating END.
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.
723
726
X17
5.3 Detailed Explanation of Devices
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 instruction 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.
II - 31
Page 51
5. Explanation of Devices
(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
5.3 Detailed Explanation of Devices
CJ P4005
Cancel process (jump to
END of last program in
process) when X17 turns
ON.
The following two methods of jumping to the end of each program are available.
• 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
P100
X17
X17
[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 cannot 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.
CJ P100
END
GOEND
Jump to pointer before
END when X17 turns
ON.
Jump to END with
GOEND instruction
when X17 turns ON.
II - 32
Page 52
5. Explanation of Devices
5.3 Detailed Explanation of Devices
5.3.15 Decimal Constant K
(1) The decimal constant can be used in the following 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 designate the basic instruction, function instruction and exclusive
instruction values.
• 16-bit instruction : 0 to FFFF
• 32-bit instruction : 0 to FFFFFFFF
II - 33
Page 53
6. Explanation of Instructions
6.1 Compatible Instructions and Extended Instructions
6. Explanation of Instructions
6.1 Compatible Instructions and Extended Instructions
The following two PLC instruction modes are available with this CNC. Characte ristics and setting method s for
these instructions are explained here.
• Compatible PLC instruction mode (Usable model: 700 Series, 70 Series type A/type B)
• Extended PLC instruction mode (Usable model: 700 Series, 70 Series type A)
(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 b elow.
Number of basic
instructions
Number of function
instructions
PLC instruction mode is set by bit selection parameter #6452.
(a) Bit selection parameter
# No. Bit Item Details
The condition of the usable instruction
6452 Bit 1
PLC
instruction
extension
valid
for the built-in PLC 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 expanding the PLC instruction is enabled in 70 Series type B, the instruction is ignored
and operated in the compatible PLC instruction mode.
Compatible
PLC instruction
mode
← Extended
Extended PLC
instruction
mode
198
instructions
Setting
range
0, 1 0
Standard
value
II - 34
Page 54
6. Explanation of 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
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
mode
6.1 Compatible Instructions and Extended Instructions
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
"6.2.12 Special
Instructions for Old
Machine Typ e
Compatible"
Refer to "Appendix
1.3.1 Alternative
Circuits Resulted from
the Ban on DEFR
Instruction"
II - 35
Page 55
6. Explanation of Instructions
+
+
6.2 Instruction Tables
6.2.1 How to Read Instruction Table
The instruction tables have been made according to the following format.
Class
+ (BIN)
Process unit
16-bit
sign
+P
Instruction
Symbol Process details
S D
+
+
+P
S D
(D)+(S) (D)
(BIN)
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
3 386
■
3 786
■
Description
Execution
See for
+
+P
(1) (2) (3) (4) (5)(6) (7) (8) (9)(10)
S1 S2 D
+P
S1 S2 D
(S1)+(S2) (D)
(BIN)
4 488
4 888
■
(1) • • • Classifies instructions according to their application
(2) • • • Indicates the processing unit of instructions.
(3) • • • Indicates the instruction symbol used to enter the instruction in a program
Instruction code is built around the 16-bit instruction, with the following notations used to mark 32-bit
instructions, instructions executed only at the leading edge of OFF to ON, real number instructions,
and character string instructions.
• 32-bit instruction • • • The letter "D" is added to the first line of the instruction
(Example)
+ D+
16-bit instruction 32-bit instruction
• Instructions executed only at the leading edge of OFF to ON • • • The letter "P" is appended to
the end of the instruction
(Example)
+ +P
Instructions
executed when ON
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
Destination……….Indicates where data will be sent following operation
Source………………Stores data prior to operation
II - 36
Page 56
6. Explanation of Instructions
(5) • • • Indicates the type of processing that is performed by individual instructions
(D) + (S) (D)
(D+1,D) + (S+1,S) (D+1,D)
16 bits 16 bits
6.2 Instruction Tables
Indicates 16 bits
D+1 D
Indicates 32 bits
Lower 16 bits Upper 16 bits
(6) • • • The details of conditions for the execution of individual instructions are as follows.
Symbol Execution Condition
No
symbol
recorded
Instruction executed under normal circumstances, with no regard to the ON/OFF status
of conditions prior to the 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 "2.6
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 "2.6 Storing PLC Processing Program and Execution Mode " for details.
(10) • • • Indicates the page numbers where the individual instructions are discussed.
II - 37
Page 57
6. Explanation of Instructions
6.2.2 Basic Instructions
Process unit
Class
Instruction
sign
Symbol Process details
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
Description
Execution
See for
LD
LDI
AND
ANI
OR
ORI
ANB
ORB
Basic instruction
LDP
LDF
Bit
ANDP
ANDF
ORP
ORF
INV
MEP
MEF
EGP
EGF
OUT
OUT T/C
OUT H
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 (Store d at Vn)
*1: Argument will be 2 steps at F device.
*2: Argument will be 1 step at bit device, 2 steps at word device.
1/2
1/2
1/2
1/2
1/2
1/2
1/2
*1
1/2
*1
1/2
*1
1/2
*1
1/2
*1
1/2
*1
58
*2
58
*2
58
*2
58
*2
58
*2
58
*2
1 1 60
1 1 60
1/2
■
■
■
■
■
■
■
■
■
■
■
462
*1
1/2
462
*1
1/2
462
*1
1/2
462
*1
1/2
462
*1
1/2
462
*1
1 364
1 365
1 365
1 366
1 366
1/2
1/2
*1
*2
67
4 369,71
4 3 69
(To be continued on the next page)
II - 38
Page 58
6. Explanation of Instructions
Basic instructions (continued)
Process unit
Class
Instruction
sign
SET
RST
RST T/C
MC
Symbol Process details
SET
RST
MC
RST
n D
D
D
D
Device set
Device reset
Timer/counter reset
Master control start
6.2 Instruction Tables
Ext. inst.
No. of
steps
Storage
1/2
*1
1/2
*1
4 2
Condition
Execution
2 277
Execution
1/2
*2
1/2
*2
Description
See for
73
75
75
FF
NOPLF
n
D
D
D
D
n
Master control release
Generate one cycle worth of pulses at
rising edge of input signal
Generate one cycle worth of pulses at
falling edge of input signal
Reversal of device output
Device 1-bit shift
Registration of operation result
Read of operation results registered in
MPS
Reading and resetting of operation
results registered in MPS
Ignored (For program deletion or
space)
Ignored (To change pages during
printouts)
Ignored (Subsequent programs will be
controlled from step 0 of page n)
MCR
PLS
Bit
PLF
FF
Basic instruction
SFT
SFTP
MPS
MRD
MPP
NOP
NOPLF
PAGE
MCR
PLS D
PLF
SFT
SFTP
MPS
MRD
MPP
PAGE
*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.
1 177
2 279
2 279
2 581
■
2
2 682
■
1/2
*2
82
1 184
1 184
1 184
1 186
1 186
■
1 186
■
II - 39
Page 59
6. Explanation of Instructions
6.2.3 Comparison Instructions
Process unit
Class
16-bit
32-bit
16-bit
32-bit
Instruction
sign
LD=
AND=
OR=
LDD=
ANDD=
ORD=
LD<>
AND<>
OR<>
LDD<>
ANDD<>
ORD<>
Symbol Process details
S1 S2
=
S1 S2
=
S1 S2
=
S1 S2
D=
S1 S2
D=
S1 S2
D=
S1 S2
<>
S1 S2
<>
S1 S2
<>
S1 S2
D<>
S1 S2
D<>
S1 S2
D<>
Continuity state when (S1) (S2)
Non-continuity state when (S1)
(S2)
Continuity state when
(S1+1,S1)
(S2+1,S2)
Non-continuity state when
(S1+1,S1)
(S2+1,S2)
Continuity state when (S1) (S2)
Non-continuity state when (S1)
(S2)
Continuity state when
(S1+1,S1)
(S2+1,S2)
Non-continuity state when
(S1+1,S1)
(S2+1,S2)
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
3 390
3 390
3 390
3/4
*1
3/4
*1
3/4
*1
3 3
■
3 390
■
3 390
■
3/4
■
*1
3/4
■
*1
3/4
■
*1
Execution
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
Description
See for
92
92
92
90
92
92
92
S1 S2
LD>
>
16-bit
AND>
OR>
>
>
S1 S2
S1 S2
Continuity state when (S1) (S2)
Non-continuity state when (S1)
S1 S2
LDD>
32-bit
ANDD>
ORD>
LD>=
D>
D>
D>
>=
S1 S2
S1 S2
S1 S2
Continuity state when
(S1+1,S1)
(S2+1,S2)
Non-continuity state when
(S1+1,S1)
(S2+1,S2)
16-bit
AND>=
OR>=
>=
>=
S1 S2
S1 S2
Continuity state when (S1) (S2)
Non-continuity state when (S1)
S1 S2
LDD>=
32-bit
ANDD>=
ORD>=
D>=
D>=
D>=
S1 S2
S1 S2
Continuity state when
(S1+1,S1)
(S2+1,S2)
Non-continuity state when
(S1+1,S1)
(S2+1,S2)
*1: 1 step is added when either S1 or S2 is a constant number.
3 390
(S2)
3 390
3 390
3/4
*1
3/4
*1
3/4
*1
3 390
■
3 390
■
3 390
■
3/4
■
*1
3/4
■
*1
3/4
■
*1
(S2)
(To be continued on the next page)
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
92
92
92
92
92
92
II - 40
Page 60
6. Explanation of Instructions
+
Comparison instructions (continued)
Process unit
Class
16-bit
32-bit
16-bit
32-bit
*1: 1 step is added when either S1 or S2 is a constant number.
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) (S2)
Non-continuity state when (S1)
Continuity state when
(S1+1,S1)
Non-continuity state when
(S1+1,S1)
Continuity state when (S1) (S2)
Non-continuity state when (S1)
Continuity state when
(S1+1,S1)
Non-continuity state when
(S1+1,S1)
6.2.4 Arithmetic Operation Instructions
Process unit
Class
Instruction
sign
Symbol Process details
(S2+1,S2)
(S2+1,S2)
(S2+1,S2)
(S2+1,S2)
(S2)
(S2)
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
3 390
3 390
3 390
Execution
Condition
3/4
*1
3/4
*1
3/4
*1
3 390
■
3 390
■
3 390
■
3/4
■
*1
3/4
■
*1
3/4
■
*1
No. of
Ext. inst.
steps
Storage
Execution
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
3/4
*1
Execution
Description
Description
See for
92
92
92
92
92
92
See for
S D
16-bit
+ (BIN)
32-bit
+
+P
+
+P
D+
D+P
D+
D+P
+P
S1 S2 D
+P
S1 S2 D
D+
D+P
D+
S1 S2 D
D+P
S1 S2 D
+
S D
S D
S 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)
3 3
■
3 7
■
4 4
4 8
■
3/4
*1
3/4
*1
4/5
*2
4/5
*2
3/4
7/8
4/5
8/9
■
■
■
*1
*1
*2
*2
96
96
94
94
100
100
98
98
(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 - 41
Page 61
6. Explanation of Instructions
(
)
Arithmetic operation instructions (continued)
Process unit
Class
16-bit
- (BIN)
32-bit
16-bit
* (BIN)
32-bit
16-bit
/ (BIN)
32-bit
Four arithmetic operations (BCD)
Instruction
sign
-
-P
-
-P
D-
D-P
D-
D-P
*
*P
D*
D*P
/
/P
D/
D/P
B+
B+P
Symbol Process details
S D
-
S D
-P
-
S1 S2 D
-P
S1 S2 D
S D
D-
S D
D-P
D-
S1 S2 D
D-P
S1 S2 D
*
S1 S2 D
*P
S1 S2 D
D*
S1 S2 D
D*P
S1 S2 D
/
S1 S2 D
/P
S1 S2 D
D/
S1 S2 D
D/P
S1 S2 D
B+
S1 S2 D
S1 S2 D
B+P
(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+1,S1) (S2+1,S2)
Quotient(D+1,D),
Remainder(D+3,D+2)
BIN
(S1)+(S2) (D)
(BCD)
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
3 396
■
3 7
■
4 4
4 8
■
3/4
■
*1
3/4
■
*1
4/5
*2
4/5
■
*2
4 4
4 8
■
4/5
*2
4/5
■
*2
4 4
4 8
■
4/5
*2
4/5
■
*2
4 5
■
4 9
■
Execution
3/4
*1
7/8
*1
4/5
*2
8/9
*2
4/5
*2
8/9
*2
4/5
*2
8/9
*2
Description
100
100
102
102
104
104
102
102
104
104
106
106
See for
96
94
94
98
98
B-
B-
16-bit
B-P
B*
B*P
B/
S1 S2 D
B-P
S1 S2 D
B*
S1 S2 D
B*P
S1 S2 D
B/
S1 S2 D
(S1) (S2) (D)
(BCD)
(S1) (S2) (D+1,D)
(BCD)
(S1) (S2)
4 5
■
4 9
■
4 5
■
4 9
■
4 5
■
106
106
108
108
108
Quotient(D),Remainder(D+1)
B/P
S1 S2 D
(BCD)
4 9
■
108
B/P
(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 - 42
Page 62
6. Explanation of Instructions
)
)
)
)
Arithmetic operation instructions (continued)
Process unit
Class
Instruction
sign
Symbol Process details
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
Description
Execution
See for
16-bit
INC
INC
D
(D)+1 (D)
+1
INCP
32-bit
DINC
INCP
DINC
D
D
(D+1,D)+1 (D+1,D)
16-bit
DINCP
DEC
DINCP
DEC
D
D
(D) 1 (D)
-1
32-bit
DECP
DDEC
DECP
DDEC
D
D
(D+1,D) 1 (D+1,D)
DDECP
NEG
NEGP
DNEG
DNEGP
Complement of 2
16-bit
32-bit
DDECP
NEG
NEGP
DNEG
DNEGP
*1: 1 step is added when S is a constant number.
D
D
D
D
D
• (D)
BIN data
• (D+1, D)
BIN data
*2: 1 step is added when either S1 or S2 is a constant number.
6.2.5 BCD<->BIN Conversion Instructions
Process unit
Class
Instruction
sign
Symbol Process details
(D)
(D+1, D)
2 2
2 6
■
2 2
2 6
■
2 2
2 6
■
2 2
2 6
■
2 2
2 6
■
2 2
■
Execution
Condition
■
Ext. inst.
2 6
No. of
steps
Storage
110
110
112
112
110
110
112
112
114
114
114
114
Description
See for
Execution
S D
BCD
S D
BCDP
BIN
S D
S D
S D
S D
S D
DBCD
DBCDP
BINP
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
BIN(0 to 99999999
(D+1, D)
(D)
BIN
conversion
BCD (0 to 99999999
(D+1, D)
3 3
3 7
■
3 3
3 7
■
3 3
3 7
■
3 3
3 7
■
116
116
116
116
118
118
118
118
BCD
BIN
16-bit
32-bit
16-bit
32-bit
BCD
BCDP
DBCD
DBCDP
BIN
BINP
DBIN
DBINP
II - 43
Page 63
6. Explanation of Instructions
⋅
⋅
⋅
⋅
6.2.6 Data Transmission Instructions
Process unit
Class
Instruction
sign
Symbol Process details
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
Description
Execution
See for
Transmission
Conversion
transmission
of same data
transmission
Batch
transmission
Batch
Timer
16-bit
32-bit
16-bit
32-bit
16-bit
32-bit
16-bit
16-bit
S.TMOV
MOV
MOVP
DMOV
DMOVP
CML
CMLP
DCML
DCMLP
XCH
XCHP
DXCH
DXCHP
BMOV
BMOVP
FMOV
FMOVP
S D
MOV
MOVP
DMOV
DMOVP
CML
CMLP
DCML
DCMLP
XCH
XCHP
DXCH
DXCH
BMOV S D n
BMOVP S D n
FMOV S D n
FMOVP S D n
S.TMOV
S D
S D
S D
S D
S D
S D
S D
D1 D2
D1 D2
D1 D2
D1 D2
S D
(D)
(D+1,D)
(S)
(S+1,S)
(S)
(D)
(S+1,S)(D+1,D)
(D1)
⋅
(D2)
(D1+1,D1)
⋅
(D2+1,D2)
(S)
(S)
Transfer of timer and counter setting
(D)
(D)
n
n
value
3 3
3 7
■
3/4
*1
3/4
■
*1
3 3
■
3 7
■
3/4
■
*1
3/4
■
*1
3 3
3 7
■
3 3
3 7
■
4 4
4 8
■
4 4
4 8
■
6 3
3/4
*1
7/8
*1
3/4
*1
7/8
*1
120
120
120
120
122
122
122
122
124
124
124
124
126
126
128
128
130
*1: 1 step is added when S is a constant number.
II - 44
Page 64
6. Explanation of Instructions
6.2.7 Program Branch Instruction
Process unit
Class
Instruction
sign
Symbol Process details
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
Description
Execution
See for
Jump
Program
end
Subroutine
call
Return
Repetition
CJ
-
JMP
GOEND
- FEND
END
- CALL
- CALLP
- RET
- FOR
- NEXT
- BREAK
- BREAKP
CJ
JMP P**
GOEND
FEND
END
CALL P**
CALLP P**
RET
FOR n
NEXT
BREAK
BREAKP
D P**
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
NEXT
, and jump to the pointer Pn.
and
■
■
■
■
■
■
■
2 2
2 2
1 2
1 1
1 1
2 3
2 7
1 1
2 3
1 3
3 4
3 8
131
131
134
133
135
135
135
137
137
139
139
II - 45
Page 65
6. Explanation of Instructions
⋅
⋅
⋅
⋅
6.2.8 Logical Operation Instructions
Process unit
Class
Instruction
sign
Symbol Process details
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
Description
Execution
See for
WAND
16-bit
WANDP
Logical AND
WAND
WANDP
DAND
32-bit
DANDP
DAND
DANDP
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
(S)
(D)
(S1)
(D+1,D)
(S1+1,S1)
(S2)
(S+1,S)
*1: 1 step is added when S is a constant number.
*2: 1step is added when either S1 or S2 is a constant number.
(D)
(D)
(S2+1,S2)
(D+1,D)
(D+1,D)
3/4
*1
7/8
*1
4/5
*2
8/9
*2
142
142
141
141
142
142
141
141
3 3
■
3 7
■
4 4
4 8
■
3/4
*1
3/4
■
*1
4/5
■
*2
4/5
■
*2
(To be continued on the next page)
II - 46
Page 66
6. Explanation of Instructions
⋅
⋅
⋅
⋅
⋅
⋅
⋅
⋅
⋅
⋅
⋅
⋅
Logical operation instructions (continued)
Process unit
Class
Instruction
sign
Symbol Process details
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
Description
Execution
See for
16-bit
Logical OR
32-bit
16-bit
Exclusive OR
32-bit
WOR
WORP
WOR
WORP
DOR
DORP
DOR
DORP
WXOR
WXORP
WXOR
WXORP
DXOR
DXORP
DXOR
DXORP
WOR
WORP
WOR S1 S2 D
WORP S1 S2 D
DOR
WNXR S1 S2 D
DOR S1 S2 D
DORP S1 S2 D
WXOR
WXORP
WXOR S1 S2 D
WXORP S1 S2 D
DXOR
DXORP
DXOR S1 S2 D
DXORP S1 S2 D
S D
S D
S D
S D
S D
S D
S D
(S)
(D)
(S1)
(D+1,D)
(S1+1,S1)
(S)
(D)
(S1)
(D+1,D)
(S1+1,S1)
(S2)
(S2)
(D)
(D)
(S+1,S)
(S2+1,S2)
(D)
(D)
(S+1,S)
(S2+1,S2)
(D+1,D)
(D+1,D)
(D+1,D)
(D+1,D)
3/4
*1
7/8
*1
4/5
*2
8/9
*2
3/4
*1
7/8
*1
4/5
*2
8/9
*2
145
145
144
144
145
145
144
144
148
148
147
147
148
148
147
147
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
S D
S D
S D
S D
(S)
(D)
(S1)
(D+1,D)
(S1+1,S1)
(S2)
(D)
(D)
(S+1,S)
(S2+1,S2)
(D+1,D)
(D+1,D)
3/4
*1
7/8
*1
4/5
*2
8/9
*2
151
151
150
150
151
151
150
150
3 3
■
3 7
■
4 4
■
4 8
■
3/4
■
*1
3/4
■
*1
4/5
■
*2
4/5
■
*2
Non exclusive logical sum
16-bit
32-bit
WXNR
WXNRP
WXNR
WXNRP
DXNR
DXNRP
DXNR
DXNRP
WXNR
WXNR
WXNR S1 S2 D
WXNRP S1 S2 D
DXNR
DXNRP
DXNR S1 S2 D
DXNRP S1 S2 D
*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 - 47
Page 67
6. Explanation of Instructions
(D)
(D)
(
)
(D)
(D)
(D)
(
)
(D)
6.2.9 Rotation Instructions
Process unit
Class
Instruction
sign
Symbol Process details
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
Description
Execution
See for
16-bit
RORP
Right rotation
RCRP
DROR
32-bit
DRORP
DRCR
DRCRP
16-bit
ROLP
Left rotation
RCLP
DROL
32-bit
DROLP
DRCL
ROR
RCR
ROL
RCL
ROR
RORP
RCR
RCRP
DROR
DRORP
DRCR
DRCRP
ROL
ROLP
RCL
RCLP
DROL
DROLP
DRCL
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
b15
Rotate n bits right.
b15
Rotate n bits right.
(D+1)(D)
b31 ~ b16SM12b15 ~ b0
Rotate n bits right.
D+1
b31 ~ b16SM12b15 ~ b0
Rotate n bits right.
SM12
Rotate n bits left.
SM12
Rotate n bits left.
b31 ~ b16SM12b15 ~ b0
Rotate n bits left.
b31 ~ b16SM12b15 ~ b0
b0
b0
(D+1)(D)
D+1
SM12
SM12
b0b15
3 3/4
3 7/8
■
b0b15
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
153
153
153
153
157
157
157
157
155
155
155
155
159
159
159
16-bit
Right shift
Device unit
16-bit
Left shift
Device unit
DRCLP
SFR
SFRP
DSFR
DSFRP
SFL
SFLP
DSFL
DSFLP
DRCLP
SFR
SFRP
DSFR
DSFRP
SFL
SFLP
DSFL
DSFLP
D n
D n
D n
D n
D n
D n
D n
D n
D n
3 7/8
■
Rotate n bits left.
b15
0~ 0
0
SM12
n
b15 bnb0
b15
n
bn
(D)
(D)
0
b0
b0 SM12b15
b0
0~0
3 3/4
3 7/8
■
3 3/4
3 7/8
■
3 3/4
3 7/8
■
3 3/4
3 7/8
■
159
161
161
163
163
161
161
163
163
II - 48
Page 68
6. Explanation of Instructions
(D)
(D)
)
6.2.10 Data Processing Instructions
Process unit
Class
Instruction
sign
Symbol Process details
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
Description
Execution
See for
16-bit
Search
32-bit
Number of bits set to "1"
16-bit
32-bit
16-bit
Decode
2
n
bit
Encode
2
n
bit
Average
16-bit
value
SER
SERP
DSER
DSERP
SUM
SUMP
DSUM
DSUMP
SEG
SEGP
DECO
DECOP
ENCO
ENCOP
S.AVE
SER S1 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
DECO S D n
DECOP S D n
ENCO S D n
ENCOP S D n
S.AVE S D n
S D
S D
S D
(S1)
32 bit
(S1)
(S)
b15
+1)
(S
(S)
(S2)
(D): Match No.
(D+1): Number of matches
(S2)
(D): Match No.
(D+1): Number of matches
b0
(D): Number of "1"s
(D): Number of "1"s
b3 to bO
(S)
7SEG
8
256 decode
(S)
Decode
256
(S)
n
8 encode
Encode
2 bit
16-bit data average value
n
1
Σ (S+i) →(D
n
i=1
n
n
2 bit
(D)
n
5 6
5 10
■
n
5 6
■
5 10
■
165
165
165
165
3 3
3 7
■
3 3
■
3 7
■
3 3
3 7
■
4 4
4 8
■
4
■
4
■
7
■
167
167
167
167
169
169
171
171
4173
8173
4175
II - 49
Page 69
6. Explanation of Instructions
6.2.11 Other Function Instructions
Process unit
Class
Carry flag set
Instruction
sign
Symbol Process details
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
Description
Execution
See for
Carry flag
reset
― S.STC
― S.CLC
S.STC
S.CLC
Carry flag contact (SM12) is turned
ON.
Carry flag contact (SM12) is turned
OFF.
4 1
4 1
176
176
II - 50
Page 70
6. Explanation of Instructions
6.2.12 Special Instructions for Old Machine Type Compatible
Process unit
Class
Instruction
sign
Symbol Process details
6.2 Instruction Tables
Condition
Execution
No. of
Ext. inst.
steps
Storage
Description
Execution
See for
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)
3 2
3 2
3 2
3 2
3 2
3 2
177
177
177
179
179
179
BIT
1-bit
LDBIT
ANDBIT
ORBIT
LDBII
ANDBII
ORBII
<=
<=
<=
<>
<>
<>
S1 n
S1 n
S1 n
S1 n
S1 n
S1 n
(Note) These instructions can be used with the compatible instruction mode as they are compatible with old
machine types but will not be available in the future.
6.2.13 Exclusive Instructions
Class
ATC
ROT
Process unit
― S.ATC
― S.ROT
Instruction
sign
Symbol Process details
K1: Tool No. search
K2: Tool No. AND operation search
K3: Tool change
K4: Arbitrary position tool change
K5: Forward run of pointer
S.ATC
KnRn
Rm
Mn
K6: Reverse run of pointer
K7: Forward run of tool table
K8: Reverse run of tool table
K9: Tool table read
K10: Tool table write
K11: Automatic write of tool table
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) or counter (C).
X0
D0.5
D0.5
SET
SETY10
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 - 52
Page 72
6. Explanation of Instructions
6.3 Data Designation Method
6.3.2 Word (16-bit) Data
Word data is a 16-bit numerical value data used with the basic instructions and applied instructions.
Word devices and digit-designated bit devices can be used with the word data.
(1) When using bit devices
Bit devices can be used as word devices by designating digits.
The bit data digit is designated as "number of digits""bit device head No.".
The digits can be designated between K1 and K4 with a 4-point (4-bit) unit.
The target numbers of points when X0 is designated as the digit are shown below.
• K1X0 --- 4 points X0 to X3 are the target
• K2X0 --- 8 points X0 to X7 are the target
• K3X0 --- 12 points X0 to XB are the target
• K4X0 --- 16 points X0 to XF are the target
XF to XC XB to X8 X7 to X4 X3 to X0
K1 designation
range
(4 points)
K4 designation
range
(16 points)
K3 designation
range
(12 points)
K2 designation
range
(8 points)
List of Numeric Values that Can Be Dealt with as Source Data for Digit Designation at Source (S) Side
Number of Digits Designated With 16-Bit Instruction
K1 (4 points) 0 to 15
K2 (8 points) 0 to 255
K3 (12 points) 0 to 4095
K4 (16 points) -32768 to 32767
If the source side is a digit-designated bit device, and the destination is a word device, the word device
on the destination side will be 0 after the digit-designated bit s o n the source side.
Ladder Example Processing
With 16-bit instruction
MOV K1X0
Source (S) data
D0
Become 0
……………………
b15 b4
D0
K1X0
X3X2X1X0
b3b2b1b0
X3X2X1X0
0 0 0 0 0 0 0 0 0 0 0 0
II - 53
Page 73
6. Explanation of Instructions
When a digit is designated on the destination (D) side, the No. of points designat ed by the digit will be the
target of the destination side.
Ladder Example Processing
When source data (S) is a numerical value
When source data (S) is a bit device
MOV H1234
Destination (D)
MOV K1M0
K2M0
(Note)
K2M100
6.3 Data Designation Method
0 1 0 0
1 0 0 0 1 0 0 1 0 0 0 1
1 0 0 0 0 0 0 0 0 0 0 1
0 1 0 0
0 1 0 0
1 0 0 0 1 0 0 1 0 0 0 1
1 0 0 0 0 0 0 0 0 0 0 1
0 1 0 0
4
4
1
1234
M15・・・・・・・・・・・・・M8M7・・・・・・・・・・・・・・M0
K2M0
2
Do not change
M15・・・・・・・・・・・・・・・M8M7・・・・・・・・・・・・・・・・M0
K1M0
M115・・・・・・・・・・・・・M108M107・・M104M103・・M100
K2M100
3
3
When source data (S) is a word device
(2) When using word devices
Word devices are designated in 1-point (16 bits) units.
M0
Destination (D)
MOV D0
Destination (D)
K2M100
MOV K100
D0
Do not change
M15・・・・・・・・・・・・・・・M8M7・・・・・・・・・・・・・・・・M0
D0
M115・・・・・・・・・・・・・M108M107・・M104M103・・M100
K2M100
Do not change
0 is
transferred
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
1 D0 point (16 bits) is word device
II - 54
Page 74
6. Explanation of Instructions
(8 p
)
(
)
(
(12p
)
(
)
(
)
6.3 Data Designation Method
6.3.3 Using Double Word Data (32 bits)
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 numbe r of bit
device".
Digit designation of bit devices can be done in 4-point (4-bit) units, and designation can 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
• K5X0 ….. The 20 points X0 through X13 are designated
• K6X0 ….. The 24 points X0 through X17 are designated
• K7X0 ….. The 28 points X0 through X1B are designated
• K8X0 ….. The 32 points X0 through X1F are designated
X1F X1CX1B X18X17 X14X13 X10XF XCXB X8X7 X4X3 X0
K1 designation range
K7 designation range
28 points
K8 designation range
32 points)
K4 designation range
K5 designation range
20 points
K6 designation range
(24 points)
K2 designation range
K3 designation range
oints
16 points
oints
(8 points)
List of Numeric Values that Can Be Dealt with as Source Data for Digit Designation at Source (S) Side
Number of Digits
Designated
With 32-bit
Instructions
Number of
Digits
With 32-bit Instructions
K1 (4 points) 0 to 15 K5 (20 points) 0 to 1048575
K2 (8 points) 0 to 255 K6 (24 points) 0 to 16772165
K3 (12 points) 0 to 4095 K7 (28 points) 0 to 268435455
K4 (16 points) 0 to 65535 K8 (32 points) -2147483648 to 2147483647
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.
II - 55
Page 75
6. Explanation of Instructions
Ladder Example Processing
With 32-bit Instructions
(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 nu mber + 1).
M0
DMOV K1X0
Source (S) data
DMOV K100
D0
D0
6.3 Data Designation Method
X3X2X1X0
K1X0
Become 0
・・・・・・・・・・・・・・・・・・・・・・・
b15
D0
D1
‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥‥
b31
Become 0
The 2 points D0 and D1(32 bits) are used
32-bit data transfer instruction
b3b2 b1 b0
b4
X3X2X1X0
0 00000000000
0 00000000000
0 0 0 0
b16
II - 56
Page 76
6. Explanation of Instructions
6.4 Index Qualification
6.4 Index Qualification
Index qualification is an indirect setting made by using an index register.
When an index qualification 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.
(1) The index (Z0,Z1) can be set in the range of –32768 to 32767 with a sign added.
(2) The index qualification 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.
MOVKnZ0
MOV
(b) Possible device combination of MOV instruction with index qualification
(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 qualification is applied to the devices during
sequence program execution. Thus, keep in mind that the index register content s exceeds the
device range at qualification, unexpected type of device are referred or renewed.
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 i s as shown bel ow.
(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 qualification 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 device.
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 instruction is as shown below.
(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 erro r 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 - 58
Page 78
6. Explanation of Instructions
6.6 Execution Condition of Instruction
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 edge Instruction name + P
With MOV instruction, execution at ON and execution at rising edge are specified as shown below.
MOV K4X0 D0
Execute at ON
MOVP K4X0 D0
Execute at rising edge
II - 59
Page 79
6. Explanation of Instructions
6.7 Counting Step Number
6.7 Counting Step Number
There are the following 2 step numbers. Refer to "2.6 Storing PLC Processing Program and Execution Mode
" for details on the sequence program storage and execution.
(1) Number of steps during storage
This is the number of steps to be consumed when each instruction is stored in F-ROM. This is stored in
the instruction code format which is compatible with the MELSEC sequencer.
Basic number of steps for basic instruction and function instruction is (number of specified devices + 1).
For example, if "+ instruction", the number of steps is as shown below.
+ D0
+ D0 R0 D10
(1)(2)(3)
R0
(2)
(1)
Indicates the number of devices
3 steps
4 steps
Devices where number of steps increases
Condition Added Steps Example
Specified device is a 32 bit
constant
1 DMOV K123 D0
When the number of characters
(S.xxx's "xxx") in the character
Instruction is a character string
(S.xxx)
string is:
Even number : Number of
characters /2 + 1
S.AVE D882 D0 K7
Odd number : (Number of
characters+1)/2 + 1
(2) Number of steps during execution
This is the number of steps to be consumed when each instruction is executed. When executed, a
sequence program is analyzed, optimizing the references and converting into the instru ction code for the
PLC processing processor which is unique to the CNC. Thu s, the length of ea ch instruction (number of
step) is varied before and after the conversion.
The number of steps at storage and execution for each instruction is shown in "6.2 Instruction Tables".
Instruction list
No. of
Ext. inst.
steps
Storage
Class
Process unit
sign
Instruction
Symbol Process details
Condition
Execution
Description
See for
Execution
+ (BIN)
16-bit
+
+P
+
+P
S D
S D
(D)+(S)
(BIN)
(D)
●
3 386
●
3 786
(a) (b)
II - 60
Page 80
6. Explanation of Instructions
6.8 Operations when the OUT, SET/RST, or PLS/PLF Instruction of the Same Device is Used
6.8 Operations when the OUT, SET/RST, or PLS/PLF Instruction of the Same Device is
Used
Operations when multiple OUT instructions, SET/RST instructions or PLS/PLF instructions using the same
device are executed in one scan are explained.
(1) When the OUT instruction of the same device is used:
Do not execute the OUT instruction of the same device multiple times within one scan.
When the OUT instruction of the same device is executed multiple times in one scan, a specif ied device
is turned ON/OFF at the time of each execution of OUT instruction, depending on the operation result up
to the OUT instruction.
Because ON/OFF of the specified device is determined at the time of each execution of OUT instruction ,
ON/OFF may be repeated within one scan.
In the ladder example below, the same internal relay (M0) is turned ON/OFF with the input X0 and X1.
[Ladder]
X0
M0
X1
M0
[Timing chart]
END
ON
OFF
X0
ON
X1
M0
OFF
OFF
ON
X0
X1
END
M0
M0
X0
X1
M0
END
M0
M0 turns OFF
because X1 is OFF
M0 turns ON
because X0 is ON.
M0 turns ON when
X1 is ON.
M0 remains OFF
because X0 is OFF.
In the case of refresh type CPU unit, when output (Y) is specified with OUT instruction, ON/OFF status of
the OUT instruction executed at the end of 1 scan is output.
(2) When the SET/RST instruction of the same device is used:
(a) The SET instruction turns a specified device ON when the SET command is ON and it does not
operate when the SET command is OFF. Therefore, when the SET instructions of the same device
are executed multiple times within one scan, and if one or more SET commands are ON, the
specified device will be turned ON.
(b) The RST instruction turns a specified device OFF when the RST command is ON and it does not
operate when the RST command is OFF. Therefore, when the RST instructions of the same device
are executed multiple times within one scan, and if one or more RST commands are ON, the
specified device will be turned OFF.
(c) When both the SET instruction and RST instruction of the same device exist within o ne scan, the SET
instruction turns a specified device ON when the SET command is ON, and the RST instruction
turns a specified device OFF when the RST command is ON.
When both the SET command and RST command are OFF, the specified device's ON/OFF status
does not change.
II - 61
Page 81
6. Explanation of Instructions
6.8 Operations when the OUT, SET/RST, or PLS/PLF Instruction of the Same Device is Used
[Ladder]
X0
SET M0
X1
RST M0
[Timing chart]
END
OFF
X0
OFF
X1
OFF
M0
ON
X0
X1
SET M0
RST M0
END
ON
X0
X1
SET M0
RST M0
END
RST executes no
operation because X1 is
OFF. (M0 remains ON.)
M0 turns ON
because X0 is ON.
M0 turns OFF
because X1 is ON.
SET executes no
operation because X0 is
OFF. (M0 remains ON.)
(3) When the PLS/PLF instruction of the same device is used:
The PLS instruction turns a specified device ON when the PLS command changes from OFF to ON, and
it turns a specified device OFF when the PLS command changes in a way other than "from OFF to ON"
(which means from OFF to OFF, ON to ON, or ON to OFF). Also, the PLF instruction turns a specified
device ON when the PLF command changes from ON to OFF, and it turns a specified device OFF when
the PLF command changes in a way other than "from ON to OFF" (which means from OFF to OFF, OFF
to ON, or ON to ON). Note that, however, the PLS/PLF command's previous scan status is stored in the
area that is unique to the device specified with the PLS/PLF instruction. Thus, when the PLS/PLF
instruction of the same device is executed multiple times in one scan, the PLS/PLF command status
saved with the first PLS/PLF instruction is used as the second PLS/PLF instruction's PLS/PLF
command's previous scan status. In this way, when the PLS/PLF instruction is executed multiple times in
one scan, the operation may not be carried out in a way as expected by the PLS/PLF instruction.
[Ladder]
X0
X1
PLS M0
PLF M0
[Timing chart]
X0
OFF
X1
OFF
M0’
OFF
END
ON
ON
X0
X1
PLS M0
PLS M0
END
X0
X1
PLS M0
PLS M0
END
ON
M0
OFF
(Saves PLS/PLF
instruction status.)
M0 turns ON because
MO’ = OFF → X0 = ON.
MO’ saves X0 = ON at the
same time.
M0 turns OFF because
MO’ = ON → X1 = ON.
MO’ saves X1 = ON.
M0 turns ON because
MO’ = OFF → X1 = ON.
MO’ saves X1 = ON.
M0 remains OFF because
MO’ = ON → X0 = OFF.
MO’ saves X0 = OFF.
II - 62
Page 82
6. Explanation of Instructions
6.9 How to Read Instruction Tables
The basic instructions and function instructions are explained as follows.
6.9 How to Read Instruction Tables
Instruction symbol is displayed
○D+, D+P, D-, D-P ……
instruction mode
instruction mode
Compatible
Setting
data
X Y M L F B SB T SM V T C D R WSW Z SD K H P
S1
S2
D ○ ○ ○ ○ ○ ○○
Extended
Setting
data
X Y M L F B SB T SM V T C D R WSW Z SD K H P
S1 ○ ○ ○ ○ ○ ○
S2 ○ ○ ○ ○ ○ ○ ○○○ ○ ○ ○ ○ ○○ △ △
D ○
"T" is representing T, ST, and C.
A circle is placed for the device that can be
used with the D+/D- instruction. A triangle is
placed when there is a restriction in use.
Usable instruction: D+, D-
- - Blank - - (Usable for any instructions)
○ ○ ○ ○ ○
Outline of instruction is displayed
BIN32-bit addition and subtraction (Storage destination device independent type)
Usable device
Bit device Word device
○ ○ ○ ○ ○ ○○
○ ○ ○ ○ ○ ○○ ○ ○
Usable device
Bit device Word device
○○○ ○ ○ ○ ○ ○○ △ △
Constant Pointer
Constant Pointer
Digit
designation
○
Digit
designation
○
○○○ ○ ○ ○ ○ ○○
A circle is placed when digit
designation is possible for the bit
device.
A circle is placed for the instruction
where index (Z0 to Z1) can be used.
Index
Index
A list of usable instructions and devices for each instruction mode is provided here.
"Compatible instruction mode" is the PLC inst ruc tion m ode hav i ng ins tru ct i on' s compatib ility
with the conventional machine type. "Extended instruction mode" is the instruction mode in
which the kinds of instructions and usable devices are e xtended. Refer to "6.1 Compatib le
Instructions and Extended Instructions" for details.
Instruction
symbol
D+, D-
D+P, D-P
Execution
condition
indicates D+ / D-
Command
Command
S1D S2
S1D S2 P
Execution condition and ladder display of D+ / D- instructions are shown below.
Execution
condition
Signs in the
explanation page
Always
executes
No sign
Executes at
ON
Executes
once at ON
Executes once
at OFF
Setting data Details Data type
S1
S2
D
Augend/minuend data or head No. of the device where
augend/minuend data is stored.
Addend/subtrahend data or head No. of the device where
addend/subtrahend data is stored.
Head No. of the device to store addition/subtraction result.
BIN 32 bits
Explanation of the setting data and data type for each instruction is provided.
The functions first, then execution conditions, then program examples are described on the following pages.
II - 63
Page 83
7. Basic Instructions
7. Basic Instructions
Basic instructions include instructions to describe relay control ladders, etc. They are divided into the
following categories.
Instruction Meaning
Contact instruction Operation start, series connection, parallel connection
Connection instruction Ladder block connection, creation of pulses from operation
results, store/read operation results
Output instruction Bit device output, pulse output, output reversal
Shift instruction Bit device shift
Master control instruction Master control
Termination instruction Program termination
Other instructions Instructions which do not fall into the above categories,
such as no operation.
II - 64
Page 84
7. Basic Instructions
{ LD, LDI (Operation start) AND, ANI (Series connection) OR, ORI (Parallel connection)
Compatible/Extended
instruction mode
Set
data
X Y M LF B SB T SM VT C DR W SW Z SD K H P
S
The compatible instruction mode and extended instru ction mode sh are the same specifications for this
instruction.
Usable devices
Bit Devices Word Devices
Con-
Pointer
stant
LD, LDI
Digit
designation
Index
Instruction
symbol
LD
LDI
AND
ANI
OR
ORI
Execution
condition
Bit device number / Bit designation of word device
X1/D0.1
X1/D0.1
X2/D0.2
X2/D0.2
X3/D0.3
X3/D0.3
Set Data
Set Data Meaning Data Type
S Devices used as connections Bit
II - 65
Page 85
7. Basic Instructions
Functions
LD,LDI
AND,ANI
OR,ORI
Operation Errors
Program Example
(1) LD is the A contact operation start instruction, and LDI is the B contact operation start
instruction. They read ON/OFF information from the designated device (if a wo rd device bit has
been designated, this becomes the 1/0 status of the designated bit), and use that as an
operation result.
(1) AND is the A contact series connection instruction, and ANI is the B contact series connection
instruction. They read the ON/OFF data of the designated bit device (if a bit designation has
been made for a word device, the 1/0 status of the designated bit is read), perform an AND
operation on that data and the operation result to that point, and take this value as the
operation result.
(1) OR is the A contact single parallel connection instruction, and ORI is the B contact single
parallel connection instruction. They read ON/OFF information from the designated device (if a
word device bit has been designated, this becomes the 1/0 status of the designated bit), and
perform an OR operation with the operation results to that point, and use the resulting value as
the operation result.
REMARK
Word device bit designations are made in hexadecimal. Bit b11 of D0 would be D0.B.
(1) There are no operation errors with LD,LDI,AND,ANI,OR,or ORI instructions.
(1) A program using LD, AND,OR, and ORI instructions.
[Ladder Mode] [List Mode]
b15
‥‥‥
D0
b5 ‥ b0
1
0
LD, LDI
X3
Y33
0
D0.5
X5
X5
M11
Y34
4
X6
8
END
Steps Inst. Device
0 LD X3
1 OR D0.5
2 OR X5
3 OUT Y33
4 LD X5
5 AND M11
6 ORI X6
7 OUT Y34
8 END
II - 66
Page 86
7. Basic Instructions
A
(2) A program linking contact points established through the use of ANB and ORB instructions.
[Ladder Mode] [List Mode]
b15
‥‥‥‥‥
D6
(3) A parallel program with OUT instruction
[Ladder Mode] [List Mode]
b4
0
6
1
X3
LD, LDI
D6.1
b1b0
1
0
0
X3
0
D6.4
X5
X7
M8
M9
ORB
M1
Y33
Y34
7
M9
NB
X8
13
X9
Y35
Y36
Y37
END
END
Steps Inst. Device
0 LD X3
1 AND D6.1
2 LDI D6.4
3 ANI X7
4 ORB
5 ANI M9
6 OUT Y33
7 LD X5
8 LD M8
9 OR M9
10 ANB
11 ANI M11
12 OUT Y34
13 END
Steps Inst. Device
0 LD X5
1 OUT X35
2 AND X8
3 OUT Y36
4 ANI X9
5 OUT Y37
6 END
II - 67
Page 87
7. Basic Instructions
A
[
{ ANB,ORB … Ladder block series connections and parallel connections
ANB,ORB
Functions
ANB
ORB
Compatible/Extended
instruction mode
Set
data
X Y M LF B SB T SM VTC D R W SW Z SD K H P
Usable devices
Bit Devices Word Devices
Constant Pointer
Digit
designation
Index
The compatible instruction mode and extended instru ction mode sh are the same specifications for this
instruction.
Instruction
symbol
ANB
ORI
Execution
condition
Block A
Block A
Block B
NB
Block B
ORB
1 contact series connections
use OR or ORI.
(1) Performs an AND operation on block A and block B, and takes the resulting value as the
operation result.
(2) The symbol for ANB is not the contact symbol, but rather is the connection symbol.
(3) When programming in the list mode, up to 7 instructions of ANB and ORB combined (8 blocks)
can be used consecutively.
(1) Conducts an OR operation on block A and block B, and takes the resulting value as the
operation result.
(2) ORB is used to perform parallel connections for ladder blocks with two or more contacts. For
ladder blocks with only one contact, use OR or ORI; there is no need for ORB in such cases.
Ladder Mode]
X0
0
X2
X4
X1
X3
Y10
[List Mode]
0 LD
1 AND
2 LD
3 AND
4 ORB
5 OR
6 OUT
X0
X1
X2
X3
X4
Y10
(3) The ORB symbol is not the contact symbol, but rather is the connection symbol.
(4) When programming in the list mode, up to 7 instructions of ANB and ORB combined (8 blocks)
can be used consecutively.
Operation Errors
(1) There are no operation errors with ANB or ORB instructions.
II - 68
Page 88
7. Basic Instructions
Program Example
(1) A program using ANB and ORB instructions
[Ladder Mode] [List Mode]
0
9
X0 X1
X3
X2
X5
X4
ANB,ORB
M0
END
Steps Inst. Device
0 LD X0
1 OR X2
2 LD X1
3 OR X3
4 ANB
5 LD X4
6 AND X5
Bit device number / Bit designation of word device
X1/D0.1
X1/D0.1
X2/D0.2
Digit
Index
Constant Pointer
designation
Set Data
ANDF
ORP
ORF
Set Data Meaning Data Type
S Devices used as contacts Bit
X2/D0.2
X3/D0.3
X3/D0.3
II - 70
Page 90
7. Basic Instructions
A
A
Functions
LDP,LDF
ANDP,ANDF
ORP,ORF
Operation Errors
(1) There are no operation errors with LDP, LDF, ANDP, ANDF, ORP, or ORF instructions.
(1) LDP is the leading edge pulse operation start instruction, and is ON only at the leading
(2) LDF is the trailing edge pulse operation start instruction, and is ON only at the trailing edge
(1) ANDP is a leading edge pulse series connection instruction, and ANDF is a trailing edge
(1) ORP is a leading edge pulse parallel connection instruction, and ORF is a trailing edge
LDP,LDF,ANDP,ANDF,ORP,ORF
edge of the designated bit device (when it goes from OFF to ON).
If a word device has been designated, it is ON only when the designated bit changes from
0 to 1.
In cases where there is only an LDP instruction, it acts identically to instructions for the
creation of a pulse that are executed during ON (
ladder using LDP instruction
X0
MOV K0 D0
X0
M0
ladder not using an LDP instruction
X0
X0
P).
MOVP K0 D0
PLS M0
of the designated bit device (when it goes from ON to OFF). If a word device has been
designated, it is ON only when the designated bit changes from 1 to 0.
pulse series connection instruction. They perform an AND operation with the operation
result to that point, and take the resulting value as the operation result.
The ON/OFF data used by ANDP and ANDF are indicated in the table below:
Devices Designated by ANDP Devices Designated by ANDF
Bit Device
OFF→ON 0→1 ON OFF→ON 0→1
OFF 0 OFF 0
ON 1 ON 1
ON→OFF 1→0
Word Device
Bit Designation
ANDP State
OFF
Bit Device
ON→OFF 1→0 ON
Word Device
Bit Designation
ANDF State
OFF
pulse parallel connection instruction. They perform an OR operation with the operation
result to that point and take the resulting value as the operation result.
Devices Designated by ORP Devices Designated by ORF
Bit Device
OFF→ON 0→1 ON OFF→ON 0→1
OFF 0 OFF 0
ON 1 ON 1
ON→OFF 1→0
Word Device
Bit Designation
ORP State
OFF
Bit Device
ON→OFF 1→0 ON
Word Device
Bit Designation
ORF State
OFF
II - 71
Page 91
7. Basic Instructions
Program Example
(1) The following program executes the MOV instruction at input X0, or at the leading edge of b10 (bit 10)
of data register D0.
[Ladder Mode] [List Mode]
REMARK
1)*: Word device bit designations are performed in hexade c imal.
X0
0
*
D0. A
MOV K0 D0
6
Bit b10 of D0 would be D0.A.
END
LDP,LDF,ANDP,ANDF,ORP,ORF
Steps Inst. Device
0 LDP X0
2 ORP D0. A
4 MOV K0
D0
6 END
II - 72
Page 92
7. Basic Instructions
{
INV … Operation results inversion
INV
Compatible
instruction mode
Extended
instruction mode
Set
Data
Instruction
symbol
INV
Functions
Inverts the operation result immediately prior to the INV instruction.
Operation Errors
(1) There are no operation errors associated with the INV instruction.
Program Example
(1) A program which inverts the X0 ON/OFF data, and outputs from Y10.
Not available
Usable Devices
Bit Devices Word Devices
X Y M LF B SB T SM V TC DR W SW Z SD K H P
Execution
Constant Pointer
Digit
designation
condition
Operation Result Immediately Prior to
the INV Instruction.
Operation Result Following the
Execution of the INV Instruction.
OFF ON
ON OFF
[Ladder Mode] [List Mode]
X0
0
3
[Timing Chart]
X0
Y10
END
ON
OFF
Steps Inst. Device
0 LD X0
1 INV
2 OUT Y10
3 END
Index
ON
Y10
OFF
POINT
(1) The INV instruction operates based on the results of calculation made until the
INV instruction is given. Accordingly, use it in the same position as that of the
AND instruction.
The INV instruction cannot be used at the LD and OR positions.
II - 73
Page 93
7. Basic Instructions
{
MEP,MEF … Operation result pulse conversion
MEP,MEF
Compatible
instruction mode
Extended
instruction mode
Set
Data
Instruction
symbol
MEP
MEF
Functions
MEP
(1) If operation results up to MEP instruction are leading edge (from OFF to ON), goes ON
(2) Use of the MEP instruction simplifies pulse conversion processing when multiple contacts are
MEF
(1) If operation results up to MEF instruction are trailing edge (from ON to OFF), goes ON (continuity
(2) Use of the MEF instruction simplifies pulse conversion processing when mult iple contacts are
Operation Errors
(1) There are no operation errors associated with the MEP or MEF instructions.
Program Example
(1) A program which performs pulse conversion on the operation results of X0 and X1.
(1) Because the MEP and MEF instructions operate with the operation results
Not available
Usable Devices
Bit Devices Word Devices
X Y M LF B SB T SM VT C D R W SW Z SD K H P
Execution
Constant Pointer
Digit
designation
Index
condition
(continuity state).
If operation results up to MEP instruction are anything other than leading edge, goes OFF
(non-continuity state).
connected in series.
state).
If operation results up to MEF instruction are anything other than trailing edge, goes OFF
(non-continuity state).
connected in series.
[Ladder Mode] [List Mode]
Steps Inst. Device
0 LD X0
1 AND X1
2 MEP
3 SET M0
4 END
0
4
X0 X1
SET M0
END
POINT
immediately prior to the MEP and MEF instructions, the AND instruction should
be used at the same position.
The MEP and MEF instructions cannot be used at the LD or OR position.
II - 74
Page 94
7. Basic Instructions
{
EGP,EGF … Pulse conversion of edge relay operation results
Compatible
instruction mode
Extended
instruction mode
Not available
Usable Devices
Set
Data
X Y M LF B SB T SM VTC DR W SW Z SD K H P
Bit Devices Word Devices
Instruction
symbol
Execution
condition
EGP,EGF
Digit
Index
Constant Pointer
designation
EGP
EGF
Set Data
Functions
EGP
(1) Operation results up to the EGP instruction are stored in memory by the edge relay (V).
(2) Goes ON (continuity state) at the leading edge (OFF to ON) of the operation result up to the EGP
(3) The EGP instruction can be used like an AND instruction.
(1) Operation results up to the EGF instruction are stored in memory by the edge relay (V).
EGF
(2) Goes ON (continuity state) at the trailing edge (from ON to OFF) of the operation result up to the
(3) The EGF instruction can be used like an AND instruction.
Operation Errors
(1) There are no operation errors associated with the EGP or EGF instructions.
(1) Because the EGP and EGF instructions operate with the operation results
Command
Vn
Command
Vn
Set Data Meaning Data Type
Vn Edge relay No. where operation results are stored Bit
instruction.
If the operation result up to the EGP instruction is other than a leading edge (i.e., from ON to ON,
ON to OFF, or OFF to OFF), it goes OFF (non-continuity state).
EGF instruction.
If the operation result up to the EGF instruction is other than a trailing edge (i.e., from OFF to
ON, ON to ON, or OFF to OFF), it goes OFF (non-continuity state).
POINT
immediately prior to the EGP and EGF instructions, the AND instruction should
be used at the same position.
The EGP and EGF instructions cannot be used at the LD or OR position.
II - 75
Page 95
7. Basic Instructions
{
OUT(Y,M,L,F,B,SB,SM) … Out instructions (Y,M,L,F,B,SB,SM)
OUT(Y,M,L,F,B,SB,SM)
Set Data
Compatible
instruction mode
Set
Data
X Y M LF B SB T SM VT C D R W SW Z SD K H P
D
Extended
instruction mode
Data
Set
X Y M LF B SB T SM VT C D R W SW Z SD K H P
D
Instruction
symbol
OUT
Bit Devices Word Devices
Bit Devices
Execution
condition
Usable Devices
Usable Devices
Word Devices
Bit designation of word device (D)
Constant Pointer
Constant Pointer
Bit device number (D)
Digit
designation
Digit
designation
Y35
D0.5
Index
Index
Functions
(1) Operation results up to the OUT instruction are output to the designated device.
Operation Errors
(1) There are no operation errors associated with the OUT instruction.
Set Data Meaning Data Type
D Number of device to be turned ON and OFF Bit
When Bit Designation has
Operation
results
When Using Bit Devices
Contact
Coil
been Made for Word
Device
Bit Designated
A Contact B Contact
OFF ON Non-continuityContinuity 0
ON ON Continuity Non-continuity1
II - 76
Page 96
7. Basic Instructions
Program Example
(1) When bit device is in use
[Ladder Mode] [List Mode]
(2) When bit designation has been made for word device
[Ladder Mode] [List Mode]
OUT(Y,M,L,F,B,SB,SM)
X5
0
X6
2
5
X5
0
X6
2
5
b15
D0
b7b6b5 ‥ b0
‥‥‥
Y33
Y34
Y35
END
D0.5
D0.6
D0.7
END
Steps Inst. Device
0 LD X5
1 OUT Y33
2 LD X6
3 OUT Y34
4 OUT Y35
5 END
Steps Inst. Device
0 LD X5
1 OUT D0.5
2 LD X6
3 OUT D0.6
4 OUT D0.7
5 END
II - 77
Page 97
7. Basic Instructions
{
OUT(T,ST), OUTH(T) … 100ms, 10ms timer output
OUT(T,ST), OUTH(T)
Set Data
Compatible/Extended
instruction mode
Set
Data
value
X Y M LF B SB T SM V TC D R W SW Z SD K H P
D
Set
Usable Devices
Bit Devices Word Devices
Constant Pointer
Digit
Index
designation
The compatible instruction mode and extended instru ction mode sh are the same specifications for this
instruction.
Instruction
symbol
OUT T
(100ms timer)
OUT ST
(100ms retentive
timer)
Execution
condition
Set value
(Valid from 1 to 32767 of the contents of data register)
Set value (Valid from 1 to 32767)
K50
T0
D10
T0
OUTH T
(10ms timer)
Set value (Valid from 1 to 32767)
Display of 10ms timer output instruction
H
T0
K50
Set value (Valid from 1 to 32767 of the contents of data register)
H D10
T0
Functions
Set Data Meaning Data Type
D Timer number Bit
Set value Value set for timer BIN 16 bits
REMARK
(1) Timer values can be set only as a decimal constant (K). Hexadecimal constants (H) cannot be used
for timer settings.
(2) The retentive timer (ST) cannot be used for the 10ms timer.
(1) When the operation results up to the OUT instruction are ON, the timer coil goes ON and the timer
counts up to the value that has been set; when the time up state (total numeric value is equal to or
greater than the setting value), the contact responds as follows:
A contact Continuity
B contact Non-continuity
II - 78
Page 98
7. Basic Instructions
(2) The following will apply if the calculation result up to OUT instruction changes from ON to OFF.
Type of Timer Timer Coil
100ms timer OFF 0
100ms
retentive timer
10ms timer OFF 0
(3) The contact status of retentive timer after time-up will not be changed until the RST instruction is
executed.
(4) A negative number (-32768 to -1) cannot be set as the setting value for the timer.
If a negative value is set for the word device, operation is carried out taking the value as a positive
value with no signs.
(5) When 0 is set for the set value, time will be up instantly.
(6) In cases where the OUT instruction is not executed while the OUT instruction is ON due to the JMP
instruction, etc., no present value update or contact ON/OFF operation is conducted. Also, if the
same OUT instruction is conducted two or more times during the same scan, the present value will
be updated for the number of times executed.
(1) Setting the timer setting value using the setting display device.
Operation Errors
(1) There are no operation errors associated with the OUT T
Program Example
(1) The following program turns Y10 and Y14 ON 10 seconds after X0 has gone ON.
[Ladder Mode] [List Mode]
OUT(T,ST), OUTH(T)
Prior to Time Up After Time Up
A ContactB Contact A Contact B Contact
Non-
continuity
Non-
continuity
Non-
continuity
Continuity Continuity
Continuity
Continuity
Continuity
Continuity
OFF
Present Valu e
of Timer
Maintains the
present value
POINT
The method for setting the value of timer T and retentive timer ST includes the
following two ways.
• A method in which the setting value (Kn) programmed by a sequence
program is validated. (Fixed timer)
• A method in which the setting value set with the setting display device is
validated. (Variable timer)
Refer to "5.3 Detailed Explanation of Devices" for details on variable timer.
or OUTH T instruction.
X0
0
T1
4
7
K100
T1
Y10
Y14
END
Steps Inst. Device
0 LD X0
1 OUT T1
K100
4 LD T1
5 OUT Y10
6 OUT Y14
7 END
Non-
continuity
Non-
continuity
Non-
continuity
II - 79
Page 99
7. Basic Instructions
OUT(T,ST), OUTH(T)
(2) The following program uses the BCD data at X10 to X1F as the timer's set value.
[Ladder Mode]
Converts BCD data at X10 to X1F to BIN and
stores at D10.
When X2 goes ON, the data stored at D10 is
calculated as the set value.
Y15 goes ON when T2 counts up.
4
8
10
X0
0
X2
T2
BINP K4X10 D10
D10
T2
Y15
END
[List Mode]
Steps Inst. Device
0 LD X0
1 BINP K4X10
D10
4 LD X2
5 OUT T2
D10
8 LD T2
9 OUT Y15
10 END
(3) The following program turns Y10 ON 250ms after X0 has gone ON.
[Ladder Mode] [List Mode]
K25
X0
0
T0
5
7
H
T0
Y10
END
Steps Inst. Device
0 LD X0
1 OUTH T0
K25
5 LD T0
6 OUT Y10
7 END
II - 80
Page 100
7. Basic Instructions
{
OUT(C) … Counters
OUT(C)
Set Data
Function
Compatible/Extended
instruction mode
Set
Data
The compatible instruction mode and extended instruction mode share the same specifications for this instruction.
X Y M LF B SB T SM V TC D R W SW Z SD K H P
D
Set
value
Instruction
symbol
OUT C
Usable Devices
Bit Devices Word Devices
Execution
condition
Set value (Valid from 1 to 32767)
Digit
Index
Constant Pointer
designation
K50
C0
Set value (Valid from 1 to 32767 of the contents of data register)
D10
C0
Set Data Meaning Data Type
D Counter No. Bit
Set value Counter set value BIN 16 bits
REMARK
(1) Only decimal constant (K) can be used for the counter setting value.
Hexadecimal constant (H) cannot be used for the counter setting value.
(1) When the operation results up to the OUT instruction change from OFF to ON, 1 is added to the
present value (count value) and the count up status (present value = set value), and the contacts
respond as follows:
A contact Continuity
B contact Non-continuity
(2) Not counted if the operation result is remained ON. (There is no need to perform pulse conversion on
count input.)
(3) After "present value≧set value" has been realized, the contact state will not be changed until RST
instruction is executed, but the present value is further added by +1.
In this case, the present value is added by +1 up to 65535, and then counted up again by +1 from 0.
(4) A negative number (-32768 to -1) cannot be set as the setting value. If a negative value is set for the
word device, operation is carried out taking the value as a positive value with no signs. If the set
value is 0, the processing is identical to that of when 1 is set.
POINT
(1) Setting the timer setting value using the setting display device.
The method for setting the value of timer T and retentiv e timer ST includes the following two ways.
• A method in which the setting value (Kn) programmed by a sequenc e program is validated.
(Fixed timer)
• A method in which the setting value set with the setting di splay device is validated. (Variable timer)
Refer to "5.3 Detailed Explanation of Devices" for details o n variable timer.
II - 81
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.