Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
PROGRAMMING MANUAL
Basic & Applied Instruction Edition
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programmable Controllers
Programming Manual - Basic & Applied Instruction
Edition
Manual No.
JY997D16601
Revision
Date
9/2013
Foreword
This manual contains text, diagrams and explanations which will guide the reader through the safe and
correct installation, use, and operation of the FX3S/FX3G/FX3GC/FX3U/FX3UC Series programmable controller.
It should be read and understood before attempting to install or use the unit.
Store this manual in a safe place so that you can take it out and read it whenever necessary. Always forward
it to the end user.
This manual confers no industrial property rights or any rights of any other kind, nor does it confer any patent licenses.
Mitsubishi Electric Corporation cannot be held responsible for any problems involving industrial property rights which
may occur as a result of using the contents noted in this manual.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Outline Precautions
This manual provides information for the use of the FX3S/FX3G/FX3GC/FX3U/FX3UC Series Programmable
Controllers. The manual has been written to be used by trained and competent personnel. The definition of
such a person or persons is as follows;
1) Any engineer who is responsible for the planning, design and construction of automatic equipment
using the product associated with this manual should be of a competent nature, trained and qualified
to the local and national standards required to fulfill that role. These engineers should be fully aware of
all aspects of safety with regards to automated equipment.
2) Any commissioning or service engineer must be of a competent nature, trained and qualified to the
local and national standards required to fulfill that job. These engineers should also be trained in the
use and maintenance of the completed product. This includes being completely familiar with all
associated documentation for the said product. All maintenance should be carried out in accordance
with established safety practices.
3) All operators of the completed equipment should be trained to use that product in a safe and
coordinated manner in compliance to established safety practices. The operators should also be
familiar with documentation which is connected with the actual operation of the completed equipment.
Note: The term 'completed equipment' refers to a third party constructed device which contains or uses
the product associated with this manual
This product has been manufactured as a general-purpose part for general industries, and has not been
designed or manufactured to be incorporated in a device or system used in purposes related to human life.
Before using the product for special purposes such as nuclear power, electric power, aerospace, medicine
or passenger movement vehicles, consult with Mitsubishi Electric.
This product has been manufactured under strict quality control. However when installing the product
where major accidents or losses could occur if the product fails, install appropriate backup or failsafe
functions in the system.
When combining this product with other products, please confirm the standard and the code, or regulations
with which the user should follow. Moreover, please confirm the compatibility of this product to the system,
machine, and apparatus with which a user is using.
If in doubt at any stage during the installation of the product, always consult a professional electrical
engineer who is qualified and trained to the local and national standards. If in doubt about the operation or
use, please consult the nearest Mitsubishi Electric representative.
Since the examples indicated by this manual, technical bulletin, catalog, etc. are used as a reference,
please use it after confirming the function and safety of the equipment and system. Mitsubishi Electric will
accept no responsibility for actual use of the product based on these illustrative examples.
This manual content, specification etc. may be changed without a notice for improvement.
The information in this manual has been carefully checked and is believed to be accurate; however, you
have noticed a doubtful point, a doubtful error, etc., please contact the nearest Mitsubishi Electric
representative.
Registration
Microsoft, Windows and Excel are either registered trademarks or trademarks of Microsoft Corporation
in the United States and/or other countries.
CompactFlash is a trademark of SanDisk Corporation in the United States and other countries.
Ethernet is a trademark of Xerox Corporation.
MODBUS is a registered trademark of Schneider Electric SA.
The company name and the product name to be described in this manual are the registered trademarks or
trademarks of each company.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Table of Contents
Table of Contents
Related manuals ............................................................................................................................. 14
Generic Names and Abbreviations Used in Manuals .................................................................. 21
1. Introduction
23
25
3. Instruction List
70
4. Devices in Detail
83
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Table of Contents
Numbers of timers................................................................................................................................... 97
Functions and operation examples ......................................................................................................... 97
Set value specification method ............................................................................................................... 99
Cautions on routines ............................................................................................................................... 99
Details on timer operation and timer accuracy........................................................................................ 99
Program examples [off-delay timer and flicker timer]............................................................................ 100
Handling timers as numeric devices ..................................................................................................... 101
4.10 Extension Register [R] and Extension File Register [ER] .................................................................. 138
4.10.1
4.10.2
4.10.3
4.10.4
4.10.5
4.10.6
4.10.7
4.10.8
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Table of Contents
153
5.1 Numeric Values Handled in PLC (Octal, Decimal, Hexadecimal and Real Numbers) ......................... 153
5.1.1 Types of numeric values ....................................................................................................................... 153
5.1.2 Conversion of numeric values............................................................................................................... 154
5.1.3 Handling of numeric values in floating point operations........................................................................ 155
5.2 Specification of Constants K, H and E (Decimal, Hexadecimal and Real Number)............................. 157
5.2.1 Constant K (decimal number) ............................................................................................................... 157
5.2.2 Constant H (hexadecimal number) ....................................................................................................... 157
5.2.3 Constant E (real number)...................................................................................................................... 157
5.4
5.5
5.6
5.7
166
7. Basic Instruction
181
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Table of Contents
220
244
270
292
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Table of Contents
315
338
388
421
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Table of Contents
15.9 FNC 78 FROM / Read From A Special Function Block .................................................................. 448
15.9.1 Common items between FROM instruction and TO instruction (details) ............................................ 451
455
480
485
531
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
562
547
Table of Contents
580
585
586
600
611
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Table of Contents
640
652
28.1 FNC224~230 LD =, >, <, <>, <=, >= / Data Comparison ................................................................ 654
28.2 FNC232~238 AND=, >, <, < >, <=, >= / Data Comparison ............................................................. 656
28.3 FNC240~246 OR=, >, <, < >, <=, >= / Data Comparison ............................................................... 658
660
684
701
708
32.1 FNC280 HSCT / High-Speed Counter Compare With Data Table.................................................. 709
10
714
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Table of Contents
741
756
Outline................................................................................................................................................. 785
Explanation of function and operation................................................................................................. 785
Expression of step ladder.................................................................................................................... 787
Creation of step ladder program (SFC program STL program)...................................................... 788
Preliminary knowledge for creating step ladder programs .................................................................. 789
Program with state relays in branches and recombination ................................................................. 792
Program examples .............................................................................................................................. 796
802
36.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function] ............................. 807
36.3.1 Input interrupt (interrupt triggered by external signal) [without delay function].................................... 807
36.3.2 Examples of practical programs (programs to measure short pulse width) ........................................ 811
36.4 Input interrupt (Interrupt by External Signal) [With Delay Function] ................................................... 813
36.5 Timer Interrupt (Interrupt in Constant Cycle)...................................................................................... 813
36.5.1 Timer interrupt (interrupt in constant cycle)......................................................................................... 813
36.5.2 Examples of practical program (timer interrupt programs using applied instruction) .......................... 815
36.6 Counter Interrupt - Interrupt Triggered by Counting Up of High-Speed Counter ............................... 818
36.7 Pulse Catch Function [M8170 to M8177] ........................................................................................... 819
36.8 Pulse width/Pulse period measurement function [M8075 to M8079, D8074 to D8097] ..................... 820
11
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Table of Contents
824
884
901
12
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Table of Contents
917
948
955
13
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related manuals
Related manuals
For detailed explanation of programming (basic instructions, applied instructions and step ladder instructions) in FX3S/
FX3G/FX3GC/FX3U/FX3UC PLCs, refer to this manual.
For hardware information on the PLC main unit, special extension units, etc., refer to each associated manual.
For acquiring manuals, contact the representative you have purchased the product from.
~ Essential manual
Manual
number
Contents
Model name
code
JY997D48301
JY997D51701
JY997D48601
09R535
JY997D46001
JY997D31301
09R521
JY997D45201
JY997D45401
09R533
JY997D50301
JY997D16501
09R516
Supplied
FX3S Series
with product Hardware Manual
Supplied
FX3S-30M /E -2AD
with product Hardware Manual
Additional
Manual
Supplied
FX3G Series
with product Hardware Manual
Additional
Manual
Supplied
FX3GC Series
with product Hardware Manual
Additional
Manual
Supplied
FX3U Series
with product Hardware Manual
Additional
Manual
Supplied
FX3UC (D, DS, DSS) Series
with product Hardware Manual
JY997D50501
Supplied
FX3UC-32MT-LT-2
with product Hardware Manual
JY997D31601
JY997D28701
09R519
14
Additional
Manual
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related manuals
Manual
number
Model name
code
Programming
~
Additional
Manual
FX3S/FX3G/FX3GC/FX3U/FX3UC
Series Programming Manual
- Basic & Applied Instruction
Edition (this manual)
Additional
Manual
MELSEC-Q/L/F Structured
Programming Manual
(Fundamentals)
Additional
Manual
JY997D16601
09R517
SH-080782ENG
13JW06
FXCPU Structured
Programming Manual
[Device & Common]
JY997D26001
09R925
Additional
Manual
FXCPU Structured
Programming Manual
[Basic & Applied Instruction]
JY997D34701
09R926
Additional
Manual
FXCPU Structured
Programming Manual
[Application Functions]
JY997D34801
09R927
JY992D50401
Terminal block
Supplied
FX INPUT AND OUTPUT
with product TERMINAL BLOCKS
JY997D16901
09R715
Additional
Manual
FX3S/FX3G/FX3GC/FX3U/FX3UC
Series Users Manual
- MODBUS Serial
Communication Edition
JY997D26201
09R626
Supplied
FX3U-USB-BD
with product Users Manual
JY997D13501
Supplied
FX3G-232-BD
with product Installation Manual
JY997D32001
Supplied
FX3U-232-BD
with product Installation Manual
JY997D12901
Supplied
FX3U-232ADP-MB
with product Installation Manual
JY997D26401
Supplied
FX3U-232ADP
with product Installation Manual
JY997D13701
Supplied
FX2N-232IF
with product Hardware Manual
JY992D73501
Supplied
FX3G-422-BD
with product Installation Manual
JY997D32101
Supplied
FX3U-422-BD
with product Installation Manual
JY997D13101
Supplied
FX3G-485-BD
with product Installation Manual
JY997D32201
Supplied
FX3G-485-BD-RJ
with product Installation Manual
JY997D51501
FX3U-485-BD
Supplied
with product Installation Manual
JY997D13001
FX3U-485ADP-MB
Supplied
with product Installation Manual
JY997D26301
FX3U-485ADP
Supplied
with product Installation Manual
JY997D13801
FX-485PC-IF
Supplied
with product Hardware Manual
JY992D81801
15
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related manuals
Manual
number
Model name
code
JY997D47401
JY997D45801
09R725
JY997D43401
JY997D43601
JY992D93201
JY992D93101
09R710
JY997D29801
FX3U-64CCL
Users Manual
JY997D30401
09R718
Supplied
FX2N-32CCL
with product Users Manual
JY992D71801
09R711
Supplied
FX3U-ENET-ADP
with product Installation Manual
Additional
Manual
Supplied
FX3U-16CCL-M
with product Installation Manual
Additional
Manual
FX3U-16CCL-M
Users Manual
Supplied
FX2N-16CCL-M
with product Hardware Manual
Additional
Manual
FX3U-ENET-ADP
Users Manual
FX2N-16CCL-M
Users Manual
Supplied
FX3U-64CCL
with product Installation Manual
Additional
Manual
FX2N-64CL-M
Supplied
Users Manual
with product
[Hardware Volume]
Additional
Manual
FX2N-64CL-M
Users Manual
[Detailed Volume]
09R724
As for the remote I/O station, remote device station and intelligent
device station for CC-Link, refer to each manual and the related data.
JY997D05401
JY997D08501
As for the remote I/O station, remote device station, power supply
adapter and dedicated power supply for CC-Link/LT, refer to each
manual and the related data.
Supplied
FX2N-16LNK-M
with product User's Manual
JY992D73701
Supplied
FX2N-32ASI-M
with product Users Manual
JY992D76901
JY997D16701
09R709
FX3S/FX3G/FX3GC/FX3U/FX3UC
Users Manual
- Analog Control Edition
09R619
JY997D33501
Supplied
FX2N-2AD
with product Users Guide
JY992D74701
Supplied
FX3U-4AD
with product Installation Manual
JY997D20701
Supplied
FX3U-4AD-ADP
with product Installation Manual
JY997D13901
16
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related manuals
Manual
number
Contents
Model name
code
Supplied
FX3UC-4AD
with product Installation Manual
JY997D14901
Supplied
FX2N-4AD
with product Users Guide
JY992D65201
Supplied
FX2NC-4AD
with product Users Manual
JY997D07801
Supplied
FX2N-8AD
with product Users Manual
JY992D86001
09R608
Supplied
FX3U-4AD-PT-ADP
with product Users Manual
JY997D14701
Supplied
FX3U-4AD-PTW-ADP
with product Users Manual
JY997D29101
Supplied
FX2N-4AD-PT
with product Users Guide
JY992D65601
JY997D29201
Manual name
Supplied
FX3U-4AD-PNK-ADP
with product Users Manual
Supplied
FX3U-4AD-TC-ADP
with product Users Manual
JY997D14801
Supplied
FX2N-4AD-TC
with product Users Guide
JY992D65501
Supplied
FX3U-4LC
with product Installation Manual
JY997D38901
JY997D39101
JY992D85601
JY992D85801
Additional
Manual
U
FX3U-4LC
Users Manual
Supplied
FX2N-2LC
with product Users Guide
Additional
Manual
FX2N-2LC
Users Manual
09R625
09R607
Analog output
When using each product, refer also to the Users Manual - Hardware Edition of the PLC main unit to which each product is
connected.
JY997D33601
JY992D74901
FX3U-4DA
Supplied
with product Installation Manual
JY997D20801
FX3U-4DA-ADP
Supplied
with product Users Manual
JY997D14001
FX2N-4DA
Supplied
with product Users Guide
JY992D65901
FX2NC-4DA
Supplied
with product Users Manual
JY997D07601
FX3G-1DA-BD
Supplied
with product Installation Manual
FX2N-2DA
Supplied
with product Users Guide
17
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related manuals
Manual
number
Model name
code
FX3U-3A-ADP
Supplied
with product Users Manual
JY997D35601
FX0N-3A
Supplied
with product Users Guide
JY992D49001
FX2N-5A
Supplied
with product Users Manual
JY997D11401
09R616
FX3U-4HSX-ADP
Supplied
with product Installation Manual
JY997D16301
FX3U-2HC
Supplied
with product Users Manual
JY997D36701
FX2N-1HC
Supplied
with product Users Guide
JY992D65401
FX2NC-1HC
Supplied
with product Users Manual
JY997D30701
JY997D16801
FX3S/FX3G/FX3GC/FX3U/FX3UC
Series Users Manual
- Positioning Edition
09R620
FX3U-2HSY-ADP
Supplied
with product Installation Manual
JY997D16401
FX3U-1PG
Supplied
with product Installation Manual
JY997D47101
JY997D47301
JY997D50601
JY992D65301
09R610
JY992D91901
JY992D93401
Supplied
FX2N-10GM
with product Users Guide
JY992D77701
Supplied
FX2N-20GM
with product Users Guide
JY992D77601
JY992D77801
09R612
Additional
Manual
U
FX2N-1PG-E
Supplied
with product Installation Manual
Additional
Manual
FX2N/FX-1PG
Users Manual
FX2N-10PG
Supplied
with product Installation Manual
Additional
Manual
Additional
Manual
18
FX3U-1PG
Users Manual
FX2N-10PG
Users Manual
FX2N-10GM, FX2N-20GM
Hardware/Programming
Manual
09R629
09R611
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related manuals
Manual name
Model name
code
JY992D71101
JY997D21101
JY997D21301
09R622
JY997D21801
09R916
JY997D35201
JY997D35401
09R720
JY997D34201
JY997D34401
09R924
09R614
Supplied
FX3U-20SSC-H
with product Installation Manual
Additional
Manual
FX3U-20SSC-H
User's Manual
Supplied
FX Configurator-FP
with product Operation Manual
Supplied
FX3U-CF-ADP
with product Installation Manual
Additional
Manual
FX3U-CF-ADP
User's Manual
Supplied
FX-30P
with product Installation Manual
Additional
Manual
FX-30P
Operation Manual
Other manuals
When using each product, refer also to the Users Manual - Hardware Edition of the PLC main unit to which each product is
connected.
Connector conversion
U
Supplied
FX3S-CNV-ADP
with product Installation Manual
JY997D48801
Supplied
FX3G-CNV-ADP
with product Installation Manual
JY997D32301
Supplied
FX3U-CNV-BD
with product Installation Manual
JY997D13601
JY997D51301
JY997D51401
Input extension
U
Supplied
FX3G-4EX-BD
with product User's Manual
Output extension
U
Supplied
FX3G-2EYT-BD
with product User's Manual
Analog volume
When using each product, refer also to the FX3S/FX3G/FX3GC/FX3U/FX3UC Series Programming Manual - Basic and Applied
Instruction Edition.
U
Supplied
FX3G-8AV-BD
with product Installation Manual
JY997D33701
Supplied
FX3U-8AV-BD
with product User's Manual
JY997D40901
JY997D14101
Supplied
FX3U-32BL Battery
with product
Display module
U
Supplied
FX3G-5DM
with product Installation Manual
JY997D33801
Supplied
FX3U-7DM
with product User's Manual
JY997D17101
JY997D15401
Supplied
FX3U-7DM-HLD
with product User's Manual
19
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related manuals
Manual
number
Contents
Model name
code
Memory cassette
U
Memory cassette
Supplied
FX3G-EEPROM-32L
with product
Installation Manual
JY997D32401
Supplied
FX3U-FLROM-16/64/64L/1M
with product Hardware Manual
JY997D12801
20
Supplied
FX3U-1PSU-5V
with product Installation Manual
JY997D22501
Supplied
FX3UC-1PS-5V
with product Installation Manual
JY997D12201
FX3UC-1PS-5V.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Name
Programmable controllers
FX3S Series
FX3S PLC or main unit
FX3G Series
FX3G PLC or main unit
FX3GC Series
FX3GC PLC or main unit
FX3U Series
FX3U PLC or main unit
FX3UC Series
FX3UC PLC or main unit
FX2N Series
FX2NC Series
FX1S Series
FX1N Series
FX1NC Series
Expansion boards
Expansion board
Special adapters
Special adapter
Generic name of special high-speed I/O adapters, special communication adapters, CF card special
analog adapters, and special analog adapters
Connectable equipment may vary depending on the main unit. For connectable equipment, refer to the
Users Manual - Hardware Edition of the main unit.
Generic name of special high-speed I/O adapters (The models shown below):
FX3U-2HSY-ADP and FX3U-4HSX-ADP
CF-ADP
FX3U-CF-ADP
Generic name of special adapter connection conversion adapter (The models shown below):
FX3S-CNV-ADP and FX3G-CNV-ADP
Extension equipment
Extension equipment
Generic name of FX2N Series I/O extension units, FX2N Series I/O extension blocks, FX2N Series I/O
extension blocks, and FX0N Series I/O extension blocks
Connectable equipment may vary depending on the main unit. For connectable equipment, refer to the
Users Manual - Hardware Edition of the main unit.
21
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Abbreviation/generic name
CC-Link/LT equipment
Name
Generic name of CC-Link/LT master station, CC-Link/LT remote I/O stations, CC-Link/LT remote device
stations, power supply adapters, and dedicated power supplies
CC-Link/LT master
Generic name of built-in type CC-Link/LT master and (additional) CC-Link/LT master
Generic name of units connected to supply the power to the CC-Link/LT system
Generic name of power supplies connected to supply the power to the CC-Link/LT system
AS-i system
AS-i master
Generic name of AS-i system master station (having following model name):
FX2N-32ASI-M
Generic name of MELSEC I/O LINK master station (having following model name):
FX2N-16LNK-M
Ethernet
Ethernet adapter
Generic name of Ethernet communication special adapter (having following model name):
FX3U-ENET-ADP
Options
Extension power supply unit
FX3UC-1PS-5V (for FX3GC, FX3UC series), FX3U-1PSU-5V (for FX3G, FX3U series)
Memory cassette
Battery
FX3U-32BL
Peripheral equipment
Peripheral equipment
Generic name of programming software, handy programming panels, and display units
Programming tools
Programming tool
Programming software
GX Works2
GX Developer
FX-PCS/WIN(-E)
Handy programming panel (HPP)
RS-232C/RS-422 converter
RS-232C/RS-485 converter
USB/RS-422 converter
FX-USB-AW
Display units
GOT1000 Series
GOT-900 Series
GOT-A900 Series
GOT-F900 Series
ET-940 Series
Manuals
FX3S Hardware Edition
Programming Manual
ENET-ADP Manual
CF-ADP Manual
FX-30P Manual
22
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1 Introduction
1
Introduction
1.
Introduction
1.1
Instruction
List
1.1.1
2
Overview
This chapter explains basic items related to programming in FX3S, FX3G, FX3GC, FX3U and FX3UC programmable
controllers (PLCs).
FX3S, FX3G, FX3GC, FX3U and FX3UC PLCs support the following six types of programming languages:
1. List programming
1)
Instruction
Device number
LD
X000
0001
OR
Y005
0002
ANI
X002
0003
OUT
Y005
5
Specified the
Device &
Constant
Step
0000
2. Circuit programming
Features
In a circuit program, a sequence circuit is drawn on the graphic screen by sequence formats and device numbers.
Because a sequence circuit is expressed with contact symbols and coil symbols, the contents of a program can
be understood easily.
In the circuit display status, the PLC operations can be monitored.
2)
6
Before
Programming
1)
X000
4
Devices
in Detail
Features
In this method, sequence instructions are input in the form of instruction words such as "LD", "AND" and "OUT".
This input method is the basis of sequence programs.
2) Example of list display
X002
Basic
Instruction
Y005
Y005
The above list program is expressed in
the circuit diagram.
Features
In an SFC (sequential function chart) program, sequences can be designed in accordance with the flow of
machine operations.
2)
9
FNC10-FNC19
Move & Compare
1)
FNC00-FNC09
Program Flow
10
FNC20-FNC29
Arith. & Logic
Operation
23
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1 Introduction
4. ST (structured text)
1)
Features
The ST language is a text language with a similar grammatical structure to the C language.
The ST language can describe control achieved by syntax using selective branches with conditional statements
and repetition by repetitive statements in the same way as high-level languages such as the C language.
By using the ST language, you can create simple programs that are easy to understand.
5. Structured ladder
1)
Features
The structured ladder language is a graphic language developed based on the relay ladder programming
technique.
The structured ladder language is a graphic language for writing programs using ladder symbols such as contact,
coils, functions, and function blocks.
Since it can be understood intuitively, it is commonly used for the sequence programming.
A circuit always starts from the bus line located on the left side.
1.1.2
Features
The FBD (function block diagram) language is a graphic language for writing programs using parts for special
processing (functions and function blocks), variables and constants.
You can create programs easily by connecting parts along the flow of data and signals, and improve the
programming efficiency.
GX Works2
List programming
GX Developer
Circuit programming
SFC programming
1.1.3
ST
Structured ladder/FBD
Circuit
SFC
It is not possible to display or edit sequence programs created using ST, structured ladder or FBD programming by
converting them from the form of instruction words (contents at the time of list programming).
For displaying and editing such sequence programs using ST, structured ladder or FBD programming, the symbolic
information (data indicating the program configuration such as structure and labels) is required.
Refer to the GX Works2 Version 1 Operating Manual (Common) for the details on symbolic information.
24
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
2.
2.1
Instruction
List
2.1.1
*3.
3. "Input filter adjustment" function for changing the time constant of input relays*4
Input relays in the main unit are equipped with a C-R filter of approximately 10 ms as countermeasures against
chattering and noise in input signals. Because a digital filter is adopted for the input relays X000 to X017 , however,
the filter value can be changed in sequence programs.
*4.
*5.
*6.
25
10
FNC20-FNC29
Arith. & Logic
Operation
The pulse catch function is provided as a method to receive short-time pulse signals.
The pulse catch function monitors signals from specific input relays, and sets special auxiliary relays in the interrupt
processing as soon as signals are input.
The pulse catch function can be used in a wide range of applications because even narrow pulses can be easily
received.
When complicated operations should be processed with high priority as interrupt by using specific trigger signals, the
"interrupt" function described later is suitable.
9
FNC10-FNC19
Move & Compare
8
FNC00-FNC09
Program Flow
*5
7
Basic
Instruction
The input terminal information of the PLC in the batch refresh method is input all at once by the input image memory
before step 0. The output information is output at one time when END instruction is executed.
I/O refresh instruction can get the latest input information and immediately output the operation result during sequence
operation.
Related instruction: Refresh REF (FNC 50)
6
Before
Programming
Specified the
Device &
Constant
4
Devices
in Detail
High-speed counters can count regardless of the scan time because they process high-speed pulses from specific
input relays as interrupts.
The counting result can be immediately handled as high-speed counter output interrupts by specific program
processing and high-speed counter counted values by comparison instructions dedicated to high-speed counters.
*2.
2
Overview
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
5. Three types of "interrupt" functions for receiving short-period pulses and priority processing
Refer to Chapter 36.
*1
1)
Input interrupt
Signals from specific input relays are monitored. At the rising edge or falling edge of the monitored input, a
specified interrupt routine is executed with highest priority.
2)
Timer interrupt
Specified interrupt routines are executed with highest priority at every specified time.
3)
*1.
*2.
2.1.2
2.1.3
2. "All outputs disable" mode for turning OFF all output signals
When the special auxiliary relay M8034 is driven, the output latch memory is cleared. Accordingly, all output relays (Y)
turn OFF while the PLC is continuing its operation.
However, the status of output relays (Y) in each device image memory is not cleared. As a result, when devices are
monitored using a programming tool, they may be regarded as the ON status.
3. "Memory hold stop" function for holding the output status during the RUN mode even in the
STOP mode
When the special auxiliary relay M8033 is driven, the PLC stops and holds the output status during the RUN mode.
26
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
1
The entry code can be registered to prevent erroneous read/incorrect write protection of created sequence programs.
With regard to online operations from GX Works2, GX Developer (Ver. 8.24A or later) and handy programming panels,
the program protection level can be set by the entry code specification method. In this case, such specification that
"changes of a program are disabled, but monitoring and changes of present values are enabled" is available.
Refer to the manual of the used programming tool.
By setting parameters, the device comment area (where Katakana, Kanji and alphanumeric characters are available)
can be secured in the program memory.
Refer to the manual of the used programming tool.
2.2
FX3S/FX3G/FX3GC/FX3U/FX3UC PLCs are equipped with not only fundamental applied functions for data transfer, data
comparison, arithmetic operations, logical operations, data rotation, and data shift but also high-speed processing
instructions for I/O refresh, interrupt, comparison dedicated to high-speed counters, and high-speed pulse output as
well as initial state instructions by which standard operations for machine control are made into packages in the SFC
control. In this way, FX3S/FX3G/FX3GC/FX3U/FX3UC PLCs have the specifications offering fundamental functions, highspeed processing, and good operability.
In addition, FX PLCs offer many handy instructions by which complicated sequence control is made into packages to
mitigate the load for creating sequence programs and save the number of I/O points.
FX PLCs also offer floating point arithmetic operations and PID operations to cope with more advanced control.
Basic
Instruction
1. Program flow
FNC10-FNC19
Move & Compare
FNC00-FNC09
Program Flow
6
Before
Programming
Specified the
Device &
Constant
2.2.1
4
Devices
in Detail
The FX3U/FX3UC PLCs Ver. 3.00 or later can store symbolic information (data indicating the program configuration
such as structure and labels).
By using this function, you can read the symbolic information from the PLC, and edit labels, function blocks, etc.
GX Works2 Ver. 1.62Q or later is required to store symbolic information.
Refer to the GX Works2 Version 1 Operating Manual (Common) for the details on symbolic information.
3
Instruction
List
2
Overview
Introduction
10
FNC20-FNC29
Arith. & Logic
Operation
27
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
3. Arithmetic and logical operations
Addition (ADD/FNC 20)
5. Data operation
Zone reset (ZRST/FNC 40)
Decode (DECO/FNC 41)
Encode (ENCO/FNC 42)
Sum of active bits (SUM/FNC 43)
Mean (MEAN/FNC 45)
Word to byte (WTOB/FNC141) and byte to word
(BTOW/FNC142)
4-bit linking/grouping of word data
(FNC143 and FNC144)
Limit control (LIMIT/FNC256)
8. Complicated control
Search a data stack (SER/FNC 61)
Sort tabulated data (FNC 69 and FNC149)
PID control loop (PID/FNC 88)
Refer to Chapter 14, Chapter 16 and
Chapter 19.
9. Positioning control
6. High-speed processing
Refresh (REF/FNC 50)
Refresh and filter adjust (REFF/FNC 51)
Speed detection (SPD/FNC 56)
Pulse Y output (PLSY/FNC 57)
Pulse ramp (PLSR/FNC 59)
Refer to Chapter 13.
28
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
2.3
2. Positioning control
Overview
Analog output
3. High-speed counter
High-speed counter (hardware counter equipped
with multiplication function)
2.4
1. CC-Link
4. AS-i system
5. Ethernet communication
Excel.
Refer to the Data Communication Edition.
For MX Component and MX Sheet, refer to the
respective product manual.
9. Non-protocol communication
Non-protocol serial communication is available
between an FX PLCs and interface equipment in
accordance with RS-232C/RS-485 such as bar code
reader, printer, personal computer and measuring
instrument.
Refer to the Data Communication Edition.
10.Inverter communication
An FX PLCs can control up to eight inverters via
communication in accordance with RS-485.
Refer to the Data Communication Edition.
11.MODBUS communication
MODBUS serial communication is available between
an FX PLCs and interface equipment in accordance
with RS-232C/RS-485.
Refer to the MODBUS Serial Communication
Edition.
29
10
FNC20-FNC29
Arith. & Logic
Operation
FNC10-FNC19
Move & Compare
8. Computer link
FNC00-FNC09
Program Flow
Basic
Instruction
7. Parallel link
Before
Programming
Specified the
Device &
Constant
2. CC-Link/LT
6. N : N Network
Devices
in Detail
3
Instruction
List
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2.5
2.5.1
Input terminal or
input connector
Input relay: X
Input relays function as receiving ports when the PLC receives signals from external
input switches.
The assigned device mnemonic is "X".
The PLC has built-in input relays in accordance with its size.
1234
Auxiliary relay: M
There are many
auxiliary relays
inside the PLC.
The assigned
device mnemonic
is "M".
State relay: S
There are many
state relays inside
the PLC.
The assigned
device mnemonic
is "S".
Output terminal
or output
connector
30
Timer: T
There are many
timers inside the
PLC.
The assigned
device mnemonic
is "T".
Counter: C
There are many
counters inside the
PLC.
The assigned
device mnemonic
is "C".
Output relay: Y
Output relays
function as ports
when the PLC
drives external
loads.
There are many
output relays inside
the PLC.
The assigned
device mnemonic
is "Y".
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Device list
1. Input relays (X) and output relays (Y)
Refer to Section 4.2.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
FNC00-FNC09
Program Flow
Basic
Instruction
4. Timers (T)
Before
Programming
Specified the
Device &
Constant
1)
Devices
in Detail
Instruction
List
5. Counters (C)
Overview
Introduction
2.5.2
31
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
8. Index registers (V)(Z)
Refer to Section 4.11.
Among registers, there are index type registers V
and Z used for modification.
A data register V or Z is added to another device as
follows:
[In the case of "V0, Z0 = 5"]
D100V0 = D105, C20Z0 = C25 Device number +
V or Z value
Data registers and index registers are used for
indirectly specifying the set value of timers and
counters, or used in applied instructions.
9. Pointers (P)(I)
Refer to Section 4.12.
Pointers are classified into branch pointers and
interrupt pointers.
A branch pointer (P) specifies the jump
destination of the conditional jump CJ (FNC 00) or
the call subroutine CALL (FNC 01) instruction.
An interrupt pointer (I) specifies the routine of an
input interrupt, timer interrupt or counter interrupt.
10.Constants (K)(H)(E)
Refer to Chapter 5.
Constant numerical values used in the PLC, "K"
indicates a decimal integer value, "H" indicates a
hexadecimal value, and "E" indicates a real number
(floating point data).
Constants are used as set values or present values
of timers and counters, or operands for applied
instructions.
32
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2.6.1
Memory structure
1
Introduction
2.6
1. In FX3S PLC
Overview
System ROM
3
Instruction
List
4
Devices
in Detail
[Data memory]
Memory cassette
(EEPROM)
Parameter
Sequence program
Specified the
Device &
Constant
Not attached
Comment
File register (D)
2)
When using an attached memory cassette (without using the built-in program memory)
Before
Programming
CPU
System ROM
8
Memory cassette
(EEPROM)
FNC00-FNC09
Program Flow
Basic
Instruction
[Data memory]
Parameter
Sequence program
Not used
FNC10-FNC19
Move & Compare
Comment
10
FNC20-FNC29
Arith. & Logic
Operation
33
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. In FX3G/FX3GC PLCs
FX3G/FX3GC PLCs are equipped with the EEPROM memory as standard.
1)
System ROM
[Data memory]
Parameter
Sequence program
Comment
File register (D)
Special setting
Extension file register (ER)
2)
Memory cassette
(EEPROM)
Not attached
When using an attached memory cassette*1 (without using the built-in program memory)
CPU
System ROM
[Data memory]
Memory cassette
(EEPROM)
Parameter
Sequence program
Not used
The PLC automatically recognizes attachment of a
memory cassette (when the power is turned ON),
and disconnects the built-on program memory.
(The priority is given to the memory cassette.)
34
Comment
File register (D)
Special setting
Extension file register (ER)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
3. In FX3U/FX3UC PLCs
FX3U/FX3UC PLCs are equipped with the RAM memory as standard.
By mounting a memory cassette, the memory type can be changed.
1)
System ROM
Overview
Instruction
List
[Data memory]
4
Devices
in Detail
Memory cassette
(Flash memory)
Not attached
Comment
Specified the
Device &
Constant
Special setting
Symbolic information*1
2)
When using an attached memory cassette (does not use the built-in program memory)
Before
Programming
CPU
System ROM
Parameter
Sequence program
Comment
9
FNC10-FNC19
Move & Compare
Not used
8
FNC00-FNC09
Program Flow
Memory cassette
(Flash memory)
Basic
Instruction
[Data memory]
10
FNC20-FNC29
Arith. & Logic
Operation
35
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2.6.2
Power
OFFON
Power OFF
Parameter
Sequence program
RUNSTOP
Comment
Can be secured by
parameter setting.
File register
Special setting
Symbolic information*1
*1.
*2.
The contents of the program memory and device values are not backed up correctly in FX3U/FX3UC PLCs
when the battery voltage becomes lower than the holding voltage if a memory cassette is not attached.
2)
Power
OFFON
Power OFF
Cleared.
Latched (EEPROM
backed) type
Special type
Index register (V, Z)
V, Z
For 100 ms
Clock data
*3.
*4.
RUNSTOP
Cleared.
Set to initial
Cleared.
Cleared.
For 10 ms
Cleared.
For 1 ms
Cleared.
values.*3
Cleared.
Cleared.
Latched (EEPROM
backed) type
High-speed type
(EEPROM backed)
Present value
Cleared.
Cleared.
Cleared.
General type
Counter present value
register (C)
STOPRUN
File type
36
STOPRUN
Some devices are cleared when the PLC status switches from STOP to RUN.
For special data registers, refer to Chapter 37.
The clock data is held by the electricity charged in the large-capacity capacitor built in the PLC.
When the voltage of the large-capacity capacitor becomes low, the clock data is not held correctly.
The capacitor can hold the clock data for 10 days (when the ambient temperature is 25C) in the full charge state
(achieved by powering ON the PLC for 30 minutes or more).
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Item
General type
Cleared.*1
Latched (EEPROM
backed) type
V, Z
Cleared.*1
For 10 ms
Cleared.
Cleared.
Cleared.
Cleared.
Cleared.
High-speed type
(EEPROM backed)
Cleared.
Present value
Specified the
Device &
Constant
7
Basic
Instruction
These registers can be changed from the general type to the latched (battery backed) type by the parameter
setting when the optional battery is installed.
Some devices are cleared when the PLC status switches from STOP to RUN.
For special data registers, refer to Chapter 37.
The clock data is held by the electricity charged in the large-capacity capacitor built in the PLC.
When the voltage of the large-capacity capacitor becomes low, the clock data is not held correctly.
The capacitor can hold the clock data for 10 days (when the ambient temperature is 25C) in the full charge state
(achieved by powering ON the PLC for 30 minutes or more).
The clock data is backed up by the battery when the optional battery is installed and the battery mode is selected
in the parameter setting.
Before
Programming
*3.
values.*2
Clock data
*2.
Cleared.
Cleared.
General type
*1.
For 100 ms
For 1 ms
Cleared.
Devices
in Detail
Instruction
List
RUNSTOP
File type
Special type
STOPRUN
Overview
Power
OFFON
Power OFF
Introduction
b) FX3G/FX3GC PLCs
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
37
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
c) FX3U/FX3UC PLCs
Item
General type
*4.
Cleared.
File type
Set to initial
values.*3
Latched (battery
backed) type
File type
V, Z
Cleared.
For 100 ms
Cleared.
For 10 ms
Cleared.
Cleared.
Cleared.
Cleared.
High-speed type
(battery backed)
Present value
Clock data
*3.
RUNSTOP
General type
*1.
*2.
Cleared.
STOPRUN
Latched (battery
backed) type
Special type
Extension register (R)
Power
OFFON
Power OFF
Device values are not backed up correctly when the battery voltage becomes lower than the holding voltage.
The contents of the program memory and device values are not backed up correctly when the battery voltage
becomes lower than the holding voltage if a memory cassette is not attached.
Some devices are cleared when the PLC status switches from STOP to RUN.
For special data registers, refer to Chapter 37.
An optional memory cassette is required.
Caution
Programs (when a memory cassette is not attached), latched (battery backed) type device values and clock data is not
backed up correctly when the battery voltage becomes low due to expiration of the battery life or another reason.
In such a case, clear latched (battery backed) type devices, transfer programs again (when a memory cassette is not
attached), and then set initial values and clock data if necessary.
For a rough guide to the life and replacement of the battery, refer to the PLC Users Manual
[Hardware Edition].
For the latched type device initialization method, refer to Subsection 2.6.5.
38
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Types of bit device memory
a) FX3S PLC
Item
Power OFF
Cleared.
Cleared.
Set to initial
values.*1
Cleared.
Cleared.
Cleared.
Cleared.
Does not
change.
Does not
change.
Cleared.
Cleared.
Cleared.
General type
Cleared.
Does not
change.
High-speed type
7
Cleared.
Some devices are cleared when the PLC status switches from STOP to RUN.
For special data registers, refer to Chapter 37.
8
FNC00-FNC09
Program Flow
*1.
Basic
Instruction
Counter contact
Counting coil
Reset coil (C)
Before
Programming
For 1 ms
Specified the
Device &
Constant
Timer contact
Time counting coil
Reset coil (T)
For 10 ms
Cleared.
For 100 ms
Cleared.
Devices
in Detail
Cleared.
Does not
change.
Cleared.
Does not
change.
Cleared.
RUNSTOP
Instruction
List
Contact image
memory
(X, Y, M, S)
STOPRUN
Overview
Power
OFFON
Introduction
3)
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
39
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
b) FX3G/FX3GC PLCs
Item
Power OFF
Cleared.
Contact image
memory
(X, Y, M, S)
Power
OFFON
40
Cleared.
Does not
change.
Cleared.
Does not
change.
Cleared.*1
Set to initial
values.*2
Cleared.*1
Cleared.
Cleared.
Cleared.
Does not
change.
Does not
change.
Cleared.
Cleared.
Cleared.
Cleared.
General type
Cleared.
Annunciator (S)
For 10 ms
Cleared.
For 1 ms
Counter contact
Counting coil
Reset coil (C)
Does not
change.
For 100 ms
Timer contact
Time counting coil
Reset coil (T)
RUNSTOP
STOPRUN
Does not
change.
Cleared.
High-speed type
*1.
These registers can be changed from the general type to the latched (battery backed) type by the parameter
setting when the optional battery is installed.
*2.
Some devices are cleared when the PLC status switches from STOP to RUN.
For special data registers, refer to Chapter 37.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Item
Power OFF
Cleared.
Set to initial
values.*1
Cleared.
Does not
change.
Cleared.
Does not
change.
5
Cleared.
Cleared.
Cleared.
Cleared.
Cleared.
Annunciator (S)
General type
Does not
change.
Cleared.
High-speed type
8
FNC00-FNC09
Program Flow
Some devices are cleared when the PLC status switches from STOP to RUN.
For special auxiliary relay names and definitions, refer to Chapter 37.
Basic
Instruction
*1.
For 10 ms
Cleared.
Before
Programming
Counter contact
Counting coil
Reset coil (C)
Does not
change.
Specified the
Device &
Constant
Timer contact
Time counting coil
Reset coil (T)
For 100 ms
Cleared.
Devices
in Detail
Cleared.
Instruction
List
Does not
change.
Does not
change.
Cleared.
RUNSTOP
Cleared.
STOPRUN
Overview
Contact image
memory
(X, Y, M, S)
Power
OFFON
Introduction
c) FX3U/FX3UC PLCs
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
41
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2.6.3
Description
Latched contents
The optional battery backs up the RAM memory built in the PLC and clock data.
Maintenance
The battery life is around 5 years, (when the ambient temperature is 25C).
For replacement information, refer to the Users Manual [Hardware Edition] of each PLC.
Cautions
When the optional battery voltage becomes low, the RAM memory built in the PLC and clock data is lost.
b) FX3U/FX3UC PLCs
Item
Description
Latched contents
The battery backs up the RAM memory built in the PLC, latched (battery backed) type devices and clock data.
Maintenance
The battery life is around 5 years, (when the ambient temperature is 25C).
For replacement information, refer to the Users Manual [Hardware Edition] of each PLC.
1)
Cautions
2)
When the battery voltage becomes low, sequence programs and other latched (battery backed) contents are
lost.
When an optional memory cassette (flash memory) is mounted, it is not necessary to back up sequence
programs by the battery.
Description
Latched contents
The EEPROM memory built in the memory cassette backs up sequence programs.
Maintenance
Cautions
b) FX3U/FX3UC PLCs
Item
Description
Latched contents
1)
2)
The flash memory built into the memory cassette backs up sequence programs.
A battery is required to back up latched (battery backed) devices and clock data from failure.
Maintenance
Cautions
42
Description
Latched contents
The EEPROM memory built in the PLC backs up latched (EEPROM backed) type devices and sequence
programs.
Maintenance
Cautions
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
2.6.4
1. When using latched (battery backed) type devices as non-latch type devices
2. When using non-latch type devices as latched (battery backed) type devices
2.6.5
M8002
Initial pulse
M8032
Clear input
FNC 40
ZRST
M500
M7679
Auxiliary relay
7
Basic
Instruction
6
Before
Programming
Includes general type devices in FX3G/FX3GC PLCs whose type is changed to the latched (battery backed)
type when the optional battery is installed.
5
Specified the
Device &
Constant
When M8032 is turned ON, all latched type devices*1 (including reset coils of timers and counters) are cleared.
M8032 can be turned ON and OFF using the forced ON/OFF operation from peripheral equipment or within the
sequence program. Note that latched type devices cannot be turned ON while M8032 is ON.
When turning ON M8032 within the sequence program, note that latched type devices are cleared during END
processing after M8032 is turned ON.
Program example: This program clears all latched type devices.
4
Devices
in Detail
3
Instruction
List
In FX3U/FX3UC PLCs, non-latch type devices can be changed into latched (battery backed) type devices by the
parameter settings.
In FX3G/FX3GC PLCs, non-latched type devices can be changed to latched (battery backed) type devices when the
optional battery is installed and the battery mode is selected in the parameter setting.
2
Overview
In FX3U/FX3UC PLCs, some latched (battery backed) type devices can be changed into non-latch type devices by the
parameter settings.
Devices dedicated to latched type cannot be changed into non-latch type devices even by the parameter settings.
Such devices can be handled as non-latch type devices by clearing all latched (battery backed) type devices by the
initial pulse (M8002) in a program.
M500~M7679
FNC 40
ZRST
S500
FNC 40
ZRST
T246
T255
FNC 40
ZRST
C100
C199
FNC00-FNC09
Program Flow
FNC 40
ZRST
C220
C255
FNC 40
ZRST
D200
D7999
S4095
State
S500~S4095
Timer
T246~T255
Counter
C100~C199,
C220~C255
Data register
D200~D7999
FNC10-FNC19
Move & Compare
43
10
FNC20-FNC29
Arith. & Logic
Operation
For details on the ZRST (FNC 40) instruction, refer to Section 12.1.
For details on latched type devices, refer to Subsection 2.6.2 and Chapter 4.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2.7
2.7.1
Parameter list
The following items may be set in the parameter settings.
Classification
Item
Description
Memory
capacity
This parameter specifies the maximum value for the number of steps to which a sequence
program can be input.
1) The upper limit is determined by the capacity of the built-in memory or optional memory.
2) The program memory, file register, comment area, and other special setting capacities are
contained in this memory capacity.
Comment area
File register
Memory capacity
1)
Other special
setting
capacity
2)
3)
Device setting
Latch range
setting
This parameter enables to change the latched (battery backed) device range and the non-latch
device range inside the PLC.
I/O assignment
setting
I/O assignment
setting
Special unit
setting
This parameter sets the initial values of the buffer memory (BFM) for each special unit/block
number.
It is necessary to set the memory capacity.
Built-in
CC-Link/LT
Setup
This parameter sets the transmission speed, point mode and station information. The memory
capacity setting is required to set the station information.
Batteryless
mode
Battery mode
Modem
initialization
RUN terminal
input setting
This parameter sets whether one input terminal in the PLC is used for RUN input.
RUN terminal
input number
This parameter specifies the input number of the RUN input described above.
X000 to X017 (Up to the built-in input number of main unit)
Special unit
setting
PLC system
setting
44
This parameter sets whether or not the special unit/block initial value setting function is used.
When this function is used, this function requires 4000 steps (8 blocks) in the memory
capacity.
This parameter sets whether or not the positioning setting (constants and setting table) in
TBL (FNC152) instruction is used. When this setting is used, this setting requires 9000 steps
(18 blocks) in the memory capacity.
This parameter sets whether or not the built-in CC-Link/LT function is used.
When this function is used, this function requires 500 steps (1 block) in the memory capacity.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
PLC system
setting
Constant
setting
This parameter sets interrupt inputs for the maximum speed, bias speed, creep speed, zero
return speed, acceleration time, deceleration time, and the DVIT instruction.
It is necessary to set the memory capacity.
Detailed setting
Keyword
This parameter sets protection to prevent erroneous read/incorrect write protection of a sequence
program. The entry code (8 characters), 2nd entry code (8 characters) and the customer keyword
(16 characters) can each be specified in characters in the ranges of A to F and 0 to 9.
In addition, a permanent PLC lock can be specified.
Program title
4
Devices
in Detail
Parameter initial values and available tools for changing parameter values
1)
FX3S PLC
Item
GX Works2
Initial value
Setting
range
Memory
capacity
4000
Comment capacity
(blocks)
24
Refer to
Subsection 2.7.3.
Display unit
FX-30P
GOT1000*1
4000
16000
4000
4000
Program title
Not registered
Entry code
Not registered
Not registered
NONE
OFF
INVALID
OFF
Not set
No
Modem initialization
RUN terminal input
Serial port operation setting
Refer to
Subsection 2.7.1.
7
Basic
Instruction
*1.
Not set
Before
Programming
Program capacity
(steps)
Programming tool
Specified the
Device &
Constant
16000
Instruction
List
Network
parameter
Others
2.7.2
Serial port
operation
setting
Ethernet port
setting
Special
parameters
Description
This parameter sets the communication setting of the serial port.
Setting of communication format (D8120, D8400 and D8420)
Setting of station number (D8121 and D8421)
Setting of timeout check (D8129, D8409 and D8429)
Overview
Positioning
instruction
setting
Item
Introduction
Classification
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
45
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FX3G/FX3GC PLCs
Programming tool
Item
GX Works2 GX Developer
Initial value Initial value*1
Setting
range
Display unit
FX-10P
FX-30P
(-E)*2
FX-20P
FX-PCS/
WIN(-E)*2
(-E)*2
Program capacity
(steps)
8000
8000
Not used
Program title
Entry code
Comment capacity
Memory (blocks)
capacity File register capacity
(blocks)
Positioning
instruction setting
Battery mode
46
8000
2000
8000
8000
8000
Not used
Not
registered
Not
registered
Not
registered
Not
registered
Not
registered
Not
Not
Not
registered registered registered
OFF
OFF
Modem initialization
Not set
Not set
OFF
Not set
GOT GOT-F900
1000
Series*2*4
*3
Refer to
Subsection
2.7.3.
Refer to
Subsection
2.7.1.
No
OFF
NONE
Not set
OFF
INVALID
Not used
Not used
(X0)
OFF
Not set
No
Not set
*1.
*2.
These programming tools are not applicable to FX3G/FX3GC PLCs. The initial values in FX1N PLC are shown
above.
*3.
*4.
Parameter values can be changed only by the F940WGOT, F94 GOT and F94
handy GOT.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
FX3U/FX3UC PLCs
Programming tool
Item
GX Works2
Initial value
GX
Developer
Initial value
Setting
range
FX-10P
(-E)*2
FX-20P
FX-30P
(-E)*2
Display unit
FX-PCS/
WIN(-E)
GOT
1000
*2
*3
GOT-F900
Series*4
16000
16000*1
8000
2000
8000
16000
8000
Comment capacity
(blocks)
Not used
Not used
Not used
Not used
Instruction
List
Overview
Program capacity
(steps)
Not used
Not used
Not
registered
Not
Not
Not
registered registered registered
Refer to
Subsection
2.7.3
0 to 1023
500 to 1023
500 to 999
500 to 999
0 to 999
500 to 999
100 to 199
100 to 199
0 to 199
100 to 199
220 to 255
220 to 255
200 to 255
220 to 255
200 to 511
200 to 511
0 to 511
200 to 511
Program title
Not
registered
Not
registered
Entry code
Not
registered
Not
registered
Batteryless mode
Modem initialization
OFF
Not set
Refer to
Subsection
2.7.1.
No
OFF
NONE
Not set
OFF
OFF
OFF
INVALID
Not used
Not used
(X0)
Not set
Not set
No
Not set
The initial value is 8000 steps in GX Developer Ver. 8.18U to Ver. 8.22Y.
*2.
These programming tools are not applicable to FX3U/FX3UC PLCs. The initial values in FX2N PLC are shown
above.
*3.
*4.
Parameter values can be changed only by the F940WGOT, F94 GOT and F94
7
Basic
Instruction
*1.
Before
Programming
OFF
Not set
Specified the
Device &
Constant
Devices
in Detail
Introduction
3)
handy GOT.
*5.
*6.
This item is supported only in the FX3UC-32MT-LT-2, and can be set using GX Developer Ver. 8.68W or later.
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
47
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2.7.3
1)
2)
3)
4)
5)
With regard to the comment capacity, up to 50 device comments can be set in one block.
With regard to the file register capacity, up to 500 (16-bit) file registers can be set in one block.
In the special unit initial value setting, 8 blocks (4000 steps) are used.
In the positioning instruction setting, 18 blocks (9000 steps) are used.
In the built-in CC-Link/LT setup, 1 block (500 steps) are used.
1. FX3S PLC
Memory capacity
setting
Unit: Step
0 to 3
0 to 3
2000
4000
16000
0 to 7
0 to 4
20 to 24
0 to 4
Caution
When the memory capacity of the FX3S is 16,000 steps, the program capacity is fixed to 4,000 steps, and the total of
the comment capacity and the file register capacity is limited to 12,000 steps (24 blocks).
The comment capacity is automatically set when the file register capacity is set.
2. FX3G/FX3GC PLCs
Memory capacity
setting
Unit: Step
2000
0 to 3
0 to 3
4000
0 to 7
0 to 7
8000
0 to 15
0 to 14
0 to 31
0 to 14
18
0 to 63
0 to 14
18
16000
32000
Caution
FX3G/FX3GC PLCs operate in the extension mode when the program capacity is 16,001 steps or more, and operate in
the standard mode when the program capacity is 16,000 steps or less. The instruction execution time is longer in the
extension mode than in the standard mode.
Example:
48
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Memory capacity
setting
Unit: Step
Comment capacity
setting
Unit: Block
File register
capacity setting
Unit: Block
Built-in
positioning setting
Unit: Block
Built-in
CC-Link/LT Setup
Unit: Block
2000
0 to 3
0 to 3
4000
0 to 7
0 to 7
0 to 15
0 to 14
0 to 31
0 to 14
18
0 to 63
0 to 14
18
0 to 127
0 to 14
18
32000
64000
2
Overview
8000
16000
Caution
It is possible to check the symbolic information capacity using the memory capacity calculation (offline) of GX Works2.
Refer to the GX Works2 Version 1 Operating Manual (Common) for details.
FX3G-EEPROM-32L
*1.
Maximum number of
steps
Memory type
Allowable number of
times of writing
32000*1
EEPROM
memory
10000 times
Before
Programming
1. FX3S/FX3G PLCs
Model name
Remarks
Write-protect switch and loader
function are provided.
The FX3S Series PLC can hold 16,000 steps of memory, but user program capacity is limited to 4,000 steps.
Maximum number of
steps
Memory type
Allowable number of
times of writing
Remarks
FX3U-FLROM-64
64000
Flash memory
10000 times
FX3U-FLROM-16*2
16000
Flash memory
10000 times
FX3U-FLROM-64L*2
64000
Flash memory
10000 times
FX3U-FLROM-1M*3
64000
Flash memory
10000 times
*3.
9
FNC10-FNC19
Move & Compare
8
FNC00-FNC09
Program Flow
*2.
7
Basic
Instruction
2. FX3U/FX3UC PLCs
Model name
5
Specified the
Device &
Constant
When symbolic information is stored, it is deleted if the memory capacity set by parameters is changed.
After changing the memory capacity, write the symbolic information again.
4
Devices
in Detail
Symbolic information capacity = Maximum capacity of memory cassette - Memory capacity set by parameters
Instruction
List
The FX3U/FX3UC PLCs can store symbolic information in the following capacity:
- The FX3U-FLROM-1M (memory cassette) has an area dedicated to the storage of symbolic information, and can
store up to 1300 kB.
- When storing the symbolic information in any memory cassette other than the FX3U-FLROM-1M or to the built-in
memory, make sure that amount of the symbolic information to be stored does not exceed the available memory
capacity.
It is recommended to use the FX3U-FLROM-1M when there is a large amount of symbolic information to be
stored.
2.7.4
Introduction
3. FX3U/FX3UC PLCs
10
FNC20-FNC29
Arith. & Logic
Operation
49
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2.7.5
Change
Permanent
PLC lock
Entry code
Entry code
Entry code +
Second entry
code
Entry code +
Second entry code
The entry code and second entry code can be changed, canceled
and reset.
Entry code +
Second entry code
The entry code, second entry code and customer entry code can
be changed, canceled and reset.
Entry code +
Second entry
code +
Customer
keyword
Customer keyword
Cancel Disable
Outline
The permanent PLC lock cannot be changed, canceled or reset.
The entry code can be changed, canceled and reset.
0 to 9 and
Entry code
A to F
Second
0 to 9 and
entry code
A to F
Customer
keyword
0 to 9 and
A to F
Applicable PLC
GX
Works2
GX
Developer
GOT
1000
FX3S/FX3G/FX3GC
(From first product)
FX3U/FX3UC
(Ver. 2.61 or later)
FX3S/FX3G/FX3GC/
Ver. 1.08J Ver. 2.00A
Applicable
FX3U/FX3UC
or later
or later
(From first product)
GOTF900
FX-30P
FX-10P
(-E)
FX-20P
(-E)
FX-PCS
/WIN(-E)
FX3S/FX3G/FX3GC
8 (16 total
(From first product)
including
FX3U/FX3UC
entry code)
(Ver. 2.20 or later)
FX3S/FX3G/FX3GC
(From first product)
FX3U/FX3UC
(Ver. 2.61 or later)
16
The security provided by the entry code, second entry code and customer keyword is limited, and is not always
perfect.
50
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Setting status
Program
Read
Write
Write prohibited
Monitoring
Present value
change
Registration condition
Program
Write
Write prohibited
Monitoring
Present value
change
The programming tool performs the following operations in accordance with the selected registration
condition:
Registration condition
Write
Write prohibited
Read and write prohibited
Read/Incorrect
B
write protection
Monitoring
Present value
change
6
Before
Programming
Read
All operations
A,D to F,0 to 9
prohibited
Basic
Instruction
Erroneous write
C
prohibited
2)
Present value
change
Head character
of entry code
When only the entry code is set
Monitoring
Specified the
Device &
Constant
1)
Program
Read
Devices
in Detail
Read
3
Instruction
List
The programming tool performs the following operations in accordance with the selected registration
condition:
It is not possible to cancel the entry code using the customer keyword.
2
Overview
Introduction
When using any programming tool or data access unit other than the FX-10P(-E)/FX-20P(-E)
Read/Incorrect write protection is set for all entry codes.
51
10
FNC20-FNC29
Arith. & Logic
Operation
In an FX3U/FX3UC PLC whose version is earlier than Ver. 2.61, do not use a memory cassette where the customer
keyword and permanent PLC lock are set.
If a memory cassette where the permanent PLC lock is set is used in an FX3U/FX3UC PLC whose version is earlier
than Ver. 2.61, the PLC does not function normally.
If the PLC memory is cleared or the keyword is canceled in an FX3U/FX3UC PLC whose version is earlier than Ver.
2.61 for a memory cassette where the customer keyword and permanent PLC lock are set, access restrictions set
by the keyword may not be able to be removed normally.
9
FNC10-FNC19
Move & Compare
The entry codes are provided to restrict access from peripheral equipment to programs created by the user. Take
care to save/remember the entry codes.
If a registered entry code is forgotten, the online operations from the programming tool to the PLC are disabled
depending on the programming tool type and the contents of the registered entry code.
FNC00-FNC09
Program Flow
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Set item
Function Selection
Keyword
Input
Remarks
When "Permanent PLC lock" is selected, it cannot be
reset.
To reset the permanent PLC lock or write programs again
to the PLC, all-clear the PLC memory.
To use two keywords, select "Keyword Protection(16
digits)".
Keyword(16 digits)
Input
16
characters.
Available Set 8 characters in the first field, and set 8 characters in
characters are A to F and 0 to 9.
the second field.
Keyword(8 digits)
Input
8
characters.
Available
Set 8 characters in the first field.
characters are A to F and 0 to 9.
Retype Keyword
Customer Keyword
Retype Keyword
Protection Level
52
Contents of setting
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
GX Developer
2
Overview
3
Instruction
List
Set item
Keyword
Input
Remarks
When "Permanent PLC lock" is selected, it cannot be
reset.
To reset the permanent PLC lock or write programs
again to the PLC, all-clear the PLC memory.
Keyword
2nd Keyword
Input 8 characters. Available characters Before setting the second entry code, set the entry code
are A to F and 0 to 9.
first.
Customer keyword
The entry codes are provided to restrict access from peripheral equipment to programs created by the users. Keep the
entry codes carefully.
If a registered entry codes is forgotten, the online operations from a programming tool to the PLC are disabled
depending on the programming tool type and the contents of the registered entry code.
7
Basic
Instruction
GX Works2
Click the [Execute] button to register the keyword to the PLC.
When "Permanent PLC Lock" is selected, however, the following dialog box appears when the [Execute] button is
clicked.
Click the [OK] button to register protection to the PLC.
6
Before
Programming
5
Specified the
Device &
Constant
Protection level
4
Devices
in Detail
Function Selection
Contents of setting
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
53
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
GX Developer
Click [Execution] button to open Keyword confirmation dialog box.
Enter the same keyword again, and click the [OK] button to register the keyword to the PLC.
When "Permanent PLC Lock" is selected, however, the following dialog box appears when the [Execute] button is
clicked.
Click the [OK] button to register protection to the PLC.
54
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1. Select [Online][Read from PLC...]/[Write to PLC...] to open Input current keyword dialog box.
2
Overview
2. Input the keyword (8 digits, 16 digits), 2nd keyword or customer keyword currently registered in
the PLC.
Introduction
GX Works2
3
Instruction
List
Keyword
Contents of setting
Input 16 characters. Available
characters are A to F and 0 to 9.
Devices
in Detail
Set item
Remarks
Enter only the first 8 digits when "Keyword Protection (8 digits)" is registered.
When the customer keyword is set, 16 characters for the customer keyword are
available.
5
Specified the
Device &
Constant
GX Developer
6
Before
Programming
7
Contents of setting
Remarks
Keyword
When cancelling the keyword using the customer keyword instead of entering
the keyword, enter the former 8 characters of the customer keyword.
2nd Keyword
When cancelling the 2nd keyword using the customer keyword instead of entering
the 2nd keyword, enter the latter 8 characters of the customer keyword.
Basic
Instruction
Set item
8
FNC00-FNC09
Program Flow
3. Click [Execution] button to verify the keywords you have input with the keywords currently
registered in the PLC.
When the entry code inputs are verified, the PLC executes "Read from PLC" or "Write to PLC".
When the entry code inputs are not verified, the PLC does not execute "Read from PLC" or "Write to PLC".
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
55
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3. Input the keyword (8 digits, 16 digits) and 2nd keyword currently registered in the PLC.
The setting method is different between GX Works2 and GX Developer.
GX Works2
Set item
Keyword
Contents of setting
Input 16 characters. Available
characters are A to F and 0 to 9.
Remarks
Enter only the first 8 digits when "Keyword Protection (8 digits)" is registered.
It is not possible to cancel the keyword using the customer keyword.
GX Developer
Set item
Contents of setting
Keyword
2nd Keyword
Remarks
4. Click [Execution] button to verify the entry codes you have input with the entry codes currently
registered in the PLC.
When the entry code inputs are verified, the PLC executes "Keyword Cancel".
When the entry code inputs are not verified, the PLC does not execute "Keyword Cancel".
56
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
Resetting the entry codes, and validating the reset entry codes (Keyword Protect)
2
Overview
GX Works2
Select [Online][Password/Keyword][Disable...] to open Keyword Disable dialog box.
GX Developer
Select [Online][Keyword setup][Disable...] to open Keyword Disable dialog box.
2. Input the keyword (8 digits, 16 digits), 2nd keyword or customer keyword currently registered in
the PLC.
3
Instruction
List
4
Devices
in Detail
Keyword Disable
Keyword
Input 16 characters.
Available characters are A to F and 0 to 9.
Remarks
Enter only the first 8 digits when "Keyword
Protection (8 digits)" is registered.
When cancelling the keyword using the
customer keyword instead of entering the
keyword, enter the former 8 characters of the
customer keyword.
-
6
Before
Programming
Keyword Protect
Contents of setting
Specified the
Device &
Constant
Set item
GX Developer
7
Basic
Instruction
8
Contents of setting
Remarks
Input 8 characters.
Available characters are A to F and 0 to 9.
2nd Keyword
Input 8 characters.
Available characters are A to F and 0 to 9.
3. Click [Execution] button to reset the entry codes or validate the reset entry codes again.
9
FNC10-FNC19
Move & Compare
Keyword
Keyword Disable
Keyword Protect
FNC00-FNC09
Program Flow
Set item
10
FNC20-FNC29
Arith. & Logic
Operation
57
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
2.7.6
The initial values of the buffer memory (BFM) in special function units/blocks connected to an FX3UC PLC Ver.2.20 or
later and FX3U PLC can be set as a parameter in GX Works2 or GX Developer.
When this parameter is used, it is not necessary to execute initial setting in a user program for special function units/
blocks requiring initial setting. The special unit initial value setting uses 4000 steps (8 blocks) in the memory capacity.
For the setting procedure, refer to Subsection 2.7.9.
For GX Developer, refer to the GX Developer Version 8 Operating Manual.
2.7.7
In the positioning instruction setting available in all FX3UC PLC Ver. 2.20 or later and FX3G/FX3GC/FX3U PLCs,
constants can be set in the table for the TBL (FNC152) instruction. Make sure to set this parameter when using TBL
(FNC152) instruction.
The positioning instruction setting for TBL (FNC152) instruction uses 9000 steps (18 blocks) in the memory capacity.
For details on TBL (FNC152) instruction, refer to the Positioning Control Manual.
For the setting procedure, refer to the Positioning Control Manual or Subsection 2.7.9.
For GX Developer, refer to the GX Developer Version 8 Operating Manual.
2.7.8
2.7.9
Parameter settings
This subsection explains the parameter setting procedures by GX Works2.
For network parameter setting, refer to the GX Works2 Version 1 Operating Manual (Common).
For Ethernet adapter setting, refer to FX3U-ENET-ADP User's Manual.
58
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
2
Overview
3
Instruction
List
4
Contents of setting
Comments Capacity
Symbolic Information
Capacity
The symbolic information capacity when the built-in memory or a memory cassette is used is
displayed here based on the "Memory Capacity" value.
Press the [Check Other Items] button to display the symbolic information capacity when a
memory cassette is used.
Setting range
Refer to
Subsection
2.7.2 or Subsection 2.7.3
Program Capacity
Special Function
Memory Capacity
Set whether "Special Function Block Settings", "Positioning Instruction Settings", "Built-in
CC-Link/LT Settings" should be enabled.
Special Function
Block Settings
Selects the initial value setting function for special function unit/block.
Positioning
Instruction Settings
Built-in CC-Link/LT
Settings
Before
Programming
Specified the
Device &
Constant
Devices
in Detail
Set item
Memory Capacity
When the memory capacity of the FX3S is 16,000 steps, the program capacity is fixed to 4,000 steps, and the total
of the comment capacity and the file register capacity is limited to 12,000 steps (24 blocks).
The comment capacity is automatically set when the file register capacity is set.
Example:
9
FNC10-FNC19
Move & Compare
In FX3U/FX3UC PLCs, when symbolic information is stored, it is deleted if the memory capacity set by parameters is
changed.
After changing the memory capacity, write the symbolic information again.
8
FNC00-FNC09
Program Flow
FX3G/FX3GC PLCs operate in the extension mode when the program capacity is 16,001 steps or more, and operate
in the standard mode when the program capacity is 16,000 steps or less.
The instruction execution time is longer in the extension mode than in the standard mode.
Basic
Instruction
Caution
10
FNC20-FNC29
Arith. & Logic
Operation
59
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Setting devices
1. Click [Device] tab, and set devices.
Set item
Contents of setting
Setting range
Supplemental Relay
Set the latched (battery backed) auxiliary relay range. Initial value: 500 to 1023
0 to 1023
State
Set the latched (battery backed) state relay range. Initial value: 500 to 999
0 to 999
Timer
Counter (16bit)
Set the latched (battery backed) 16-bit counter range. Initial value: 100 to 199
0 to 199
Counter (32bit)
Set the latched (battery backed) 32-bit counter range. Initial value: 220 to 255
200 to 255
Data Register
Set the data register range (battery backed). Initial value: 200 to 511
Extended Register
0 to 511
Set item
Title
60
Contents of setting
Input the program title in up to 32 half-width characters
(or 16 full-width characters).
Setting range
32 half-width characters
(or 16 full-width characters)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Setting special function block
1. Click the [Special Function Block] tab, and then set the special function unit/block and built-in
CC-Link/LT.
2
Overview
In order to use the "Special Function Block" field, the "Special Function Block Settings" box in the [Memory Capacity]
tab must be checked first.
When setting the station information in "Built-in CC-Link/LT Setting", it is necessary to put a check mark to "Built-in
CC-Link/LT Settings" on the [Memory Capacity] tab.
Introduction
3
Instruction
List
4
Devices
in Detail
5
Specified the
Device &
Constant
Set item
Unit No.
This button moves the cursor to the upper line (transposes the upper line).
This button moves the cursor to the lower line (transposes the lower line).
This button displays Special Function Block Settings dialog box of the selected
unit number.
Refer to the next page.
Delete
Delete All
This button reads "Special Unit" field from the connected PLC.
Setting
8
FNC00-FNC09
Program Flow
Built-in
CC-Link/LT
Setting
32 half-width
characters
(or 16 full-width
characters)
Basic
Instruction
Special
Function Block
Up
Settings
(It is necessary Down
to set the
memory
Setting
capacity.)
Set the name of each special function unit/block whose initial values are to be
set.
Setting range
Before
Programming
Unit Name
Contents of setting
This is the unit number of each special function unit/block.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
61
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. On Special Function Block Settings dialog box, set the initial values of special function units/
blocks.
Set item
Contents of setting
Setting range
Unit Name
Set the name of a special function unit/block whose initial values are to be set.
No.
This column indicates the order of initial value setting in the selected unit
number.
Numbers 1 to 98 can be set.
Address
Set the buffer memory address (BFM number) in a decimal value whose initial
value is to be set.
*1
Comment
Value
Set a value to be set as the initial value of the buffer memory address (BFM
number).
Set the data length and type of the set value in "Size/Type" column.
*2
Size/Type
Select the size and type of a value set to the buffer memory among the
following:
16bit/DEC
32bit/DEC
16bit/HEX
32bit/HEX
Insert
Delete
Up
This button moves the cursor to the upper line (transposes the upper line).
Down
This button moves the cursor to the lower line (transposes the lower line).
Check mark this box to check the model code of the special function unit/block
before initialization.
Identification Code
*3
32 half-width
characters
(or 16 full-width characters)
*1.
Input buffer memory addresses (BFM numbers) that in the connected special function unit/block hold.
*2.
To each buffer memory address (BFM number), set a value within the allowed range in the connected special
function unit/block.
*3.
3. Click [OK] button to finish the setting and close Special Function Block Settings dialog box.
62
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
2
Overview
3
Instruction
List
4
Contents of setting
Setting range
Transmission Speed
Point Mode
Station No.
This item indicates the station number of the built-in CC-Link/LT module.
Station numbers 1 to 64 are available.
5
Specified the
Device &
Constant
Select one of the following supported I/O point counts for each remote
I/O and remote device station: 1 to 16, 32, 48, 64*2
Up
This button moves the cursor to the upper line (transposes the upper line).
Down
This button moves the cursor to the lower line (transposes the lower line).
Insert Row
Delete Row
Click this button to read the transmission rate, point mode and station
information of the built-in CC-Link/LT module.
7
Basic
Instruction
Before
Programming
Station Type
Devices
in Detail
Set item
Select 16-point mode when using remote device stations. Remote device stations cannot be set in 4-point
mode.
Only station numbers 40 to 64 are available for remote device stations.
*2.
The station numbers 32, 48 and 64 are available when a remote device station is selected in Station type.
FNC00-FNC09
Program Flow
*1.
2. Click the [OK] button to finish the setup and close the Built-in CC-Link/LT setup dialog box.
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
63
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FX3S/FX3U/FX3UC PLC
2)
FX3G/FX3GC PLCs
Set item
Contents of setting
Setting range
Battery Mode*2
MODEM Initialized
Set this item to automatically initialize a connected modem when the PLC power
is turned ON.
Set this item to use an input terminal (X) to switch the PLC between STOP and
RUN.
*1.
*2.
*3.
64
None
X000 to X017*3
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
2
Overview
2. Only when a latch (battery backed) area for a serial port exists through an extended PLC, select
a channel to be set and put a check mark next to "Operate Communication Setting".
When not performing the communication setting for a serial port, do not put a check mark next
to "Operate Communication Setting".
Channel selection
Instruction
List
4
Devices
in Detail
5
Contents of setting
Operate Communication
Setting
Check mark this box when using the selected serial port in "computer link",
"non- protocol communication" or "inverter communication".
Do not put a check mark when transferring and monitoring sequence programs
in GX Works2 or when using the selected serial port in N : N Network, parallel
link, MODBUS communication or FX3U-ENET-ADP.
Setting range
CH1,CH2*1
Before
Programming
Protocol
Data length
Parity
Stop Bit
Header
Control Line
H/W Type
Control Mode
FNC00-FNC09
Program Flow
Sum Check
Transmission Control
Procedure
Station Number Setting
Time Out Judge Time
*1.
Basic
Instruction
Transmission Speed
Terminator
Specified the
Device &
Constant
Set item
Channel selection
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
65
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Setting positioning
1. Click [Positioning] tab.
In order to use the [Positioning] tab, the "Positioning Instruction Settings" box in the [Memory Capacity] tab must be
checked first.
66
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Contents of setting
Set range
Set the creep speed in DSZR (FNC150) instruction for each set of output pulses.
Initial value: 1000
Set the zero point return speed in DSZR (FNC150) instruction for each set of
output pulses.
Initial value: 50000
50 to 5000
50 to 5000
Set the interrupt input*3 for DVIT (FNC151) instruction for each set of output
pulses. Specify a user interrupt command device (M) for a pulse output
destination device not used in DVIT instruction.
Initial setting:
Setting range:
Pulse output destination Y000: X000
X000 to X007, M8460
Pulse output destination Y001: X001
X000 to X007, M8461
Pulse output destination Y002: X002
X000 to X007, M8462
10 to 32767*2
*1
Y1
Y2*5
Y3*6
Individual Setting
This button displays "Positioning instruction settings" dialog box for setting the
table used in TBL (FNC152) instruction.
For the setting procedure, refer to the next page.
*2.
The creep speed should satisfy the relationship "Bias speed Creep speed Maximum speed".
*3.
An interrupt input set here cannot be used jointly with a high-speed counter, input interrupt, pulse catch input,
input in SPD (FNC 67) instruction, or interrupt input in DVIT (FNC151) instruction.
*4.
*5.
Y002 is not set in FX3G PLC (14-point and 24-point type) and FX3GC PLC.
*6.
Note that this item can only be set if two high-speed output special adapters are connected to the FX3U PLC.
6
Before
Programming
*1.
Specified the
Device &
Constant
4
Devices
in Detail
Y0
Instruction
List
*1
Overview
Instruction*4
Introduction
Set item
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
67
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3. Click [Individual setting] button to display Positioning Instruction Settings dialog box.
In this dialog box, set the positioning table for each pulse output destination.
Set item
Contents of setting
Setting range
Y0
Set the positioning table for the pulse output destination Y000.
Y1
Set the positioning table for the pulse output destination Y001.
Y2*1
Set the positioning table for the pulse output destination Y002.
Y3*2
Set the positioning table for the pulse output destination Y003.
FX3U/FX3UC:
Y000 to Y357
FX3G/FX3GC:
Y000 to Y177
Head Address
Set the head number of devices storing the set data (pulse number and
FX3U/FX3UC:
frequency).
D0 to D6400
1600 devices (FX3U and FX3UC) or 1200 devices (FX3G and FX3GC) are
R0 to R31168
occupied starting from the head device number set here regardless of the
FX3G/FX3GC:
number of axes.
D0 to D6400
Initial setting: R0
R0 to R22800
Refer to the Positioning Control Manual.
No.
68
Pulse (Pls)
Set the pulse number output by the operation (instruction) set in "Positioning
Instruction" column.
Refer to the Positioning Control Manual.
Refer to the
Positioning Control
Manual.
Frequency [Hz]
Set the speed (pulse frequency) output by the operation (instruction) set in
"Positioning Instruction" column.
Refer to the Positioning Control Manual.
Refer to the
Positioning Control
Manual.
Up
Down
Insert Row
Delete Row
This button deletes the entire setting of the positioning table for the selected
pulse output destination.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Contents of setting
Setting range
A check mark here means not to transfer the positioning setting when PLC turns
ON.
Check mark this box when changing the positioning setting from a display unit,
etc., and then using the changed contents even after restoring power. In this
case, set a latched (battery backed) type device to "Head Address".
Write
This button writes the contents of the positioning table created here to up to
1600 devices (FX3U and FX3UC) or 1200 devices (FX3G and FX3GC) starting
from "Head Address".
Read
This button reads the contents of the existing positioning table from all pulse
output destinations, up to 1600 devices (FX3U and FX3UC) or 1200 devices
(FX3G and FX3GC) starting from "Head Address", but does not read device
numbers without the "positioning instruction" setting.
2
Overview
*1.
Introduction
Set item
Y002 is not set in FX3G PLC (14-point and 24-point type) and FX3GC PLC.
Note that this item can only be set if two high-speed output special adapters are connected to the FX3U PLC.
This area can be set only in FX3U/FX3UC PLCs.
4
Devices
in Detail
1. Select [Online] [Write to PLC...] from the menu bar to display the online data operation dialog
box.
Instruction
List
*2.
*3.
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
Caution
FNC00-FNC09
Program Flow
After changing the memory capacity, make sure to write both the programs and parameters to the PLC.
If only the parameters are written to the PLC, program errors (such as parameter error, circuit error and grammar
error) may occur in the PLC.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
69
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
3.
Instruction List
This chapter introduces a list of instructions available in programming.
3.1
Basic Instructions
The basic instructions are provided in the following series. The table below shows differences in applicable devices.
Applicable PLC
FX3S
FX3G
FX3GC
FX3U
FX3UC
FX1S
FX1N
FX1NC
FX2N
FX2NC
Ver. 2.30
or later
Ver. 2.30
or later
Absence/presence of applicable
devices (R)
Mnemonic
Name
Symbol
Function
Applicable devices
Reference
Contact Instruction
Initial logical operation
contact type NO
(normally open)
X,Y,M,S,D .b,T,C
Section 7.1
X,Y,M,S,D .b,T,C
Section 7.1
Applicable devices
Section 7.5
Applicable devices
Section 7.5
Applicable devices
Serial connection of NO
X,Y,M,S,D .b,T,C
(normally open) contacts
Section 7.3
AND Inverse
Applicable devices
Serial connection of NC
X,Y,M,S,D .b,T,C
(normally closed) contacts
Section 7.3
ANDP
AND Pulse
Applicable devices
Section 7.5
ANDF
Applicable devices
Serial connection of
Falling/trailing edge pulse
X,Y,M,S,D .b,T,C
Section 7.5
Applicable devices
Parallel connection of NO
X,Y,M,S,D .b,T,C
(normally open) contacts
Section 7.4
Applicable devices
Parallel connection of NC
X,Y,M,S,D .b,T,C
(normally closed) contacts
Section 7.4
Applicable devices
Parallel connection of
Rising edge pulse
X,Y,M,S,D .b,T,C
Section 7.5
Applicable devices
Parallel connection of
Falling/trailing edge pulse
X,Y,M,S,D .b,T,C
Section 7.5
70
Applicable devices
LD
Load
LDI
Load Inverse
Applicable devices
LDP
Load Pulse
LDF
AND
AND
ANI
OR
OR
ORI
OR Inverse
ORP
OR Pulse
ORF
OR Falling Pulse
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
1
Name
Symbol
Function
Applicable devices
Reference
Connection Instruction
AND Block
Serial connection of
multiple parallel circuits
Section 7.7
ORB
OR Block
Parallel connection of
multiple contact circuits
Section 7.6
MPS
Memory Point
Store
MPS
Memory Read
MRD
MPP
Memory POP
MPP
INV
Inverse
MEP
MEF
Section 7.8
Section 7.8
Section 7.8
Section 7.10
MEP
Conversion of
operation result
to leading edge pulse
Section 7.11
MEF
Conversion of operation
result to trailing edge pulse
Section 7.11
Applicable devices
Y,M,S,D .b
Section 7.13
Reset
Y,M,S,D .b,T,C,
D,R,V,Z
Section 7.13
PLS
Pulse
Y,M
Section 7.12
PLF
Pulse Falling
Y,M
Section 7.12
Section 7.9
SET
SET
RST
MC N Applicable devices
MCR
Master Control
Reset
MCR N
Section 7.9
Section 7.14
Other Instruction
NOP
No Operation
END
Section 7.15
FNC10-FNC19
Move & Compare
END
End Instruction
END
FNC00-FNC09
Program Flow
MC
Basic
Instruction
Section 7.2
Before
Programming
OUT
5
Specified the
Device &
Constant
Out Instruction
OUT
4
Devices
in Detail
INV
Instruction
List
MRD
2
Overview
ANB
Introduction
Mnemonic
10
FNC20-FNC29
Arith. & Logic
Operation
71
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
3.2
Mnemonic
Name
STL
Step Ladder
RET
Return
3.3
Symbol
Function
Applicable devices
Reference
Chapter 35
Chapter 35
FX2N
FX1NC
FX1N
FX1S
FX3UC
FX3U
Function
FX3GC
Symbol
FX3S
Mnemonic
FX3G
FNC
No.
Reference
Program Flow
00
CJ
CJ
Pn
Conditional Jump
Section 8.1
01
CALL
CALL
Pn
Call Subroutine
Section 8.2
02
SRET
SRET
Subroutine Return
Section 8.3
03
IRET
IRET
Interrupt Return
Section 8.4
04
EI
EI
Enable Interrupt
Section 8.5
05
DI
DI
Disable Interrupt
Section 8.6
06
FEND
FEND
Section 8.7
07
WDT
WDT
Section 8.8
08
FOR
Section 8.9
09
NEXT
Section
8.10
FOR
NEXT
CMP
11
ZCP
12
MOV
72
CMP
ZCP
S1 S2 D
S1 S2 S D
MOV
S D
Compare
Section 9.1
Zone Compare
Section 9.2
Move
Section 9.3
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
Section 9.4
Complement
Section 9.5
Overview
FX2NC
FX1NC
Shift Move
FX2N
FX1N
Reference
FX1S
FX3UC
FX3U
FX3GC
Function
FX3S
Symbol
FX3G
Mnemonic
Introduction
Applicable PLC
FNC
No.
14
CML
15
BMOV
16
FMOV
17
XCH
XCH
D1 D2
18
BCD
BCD
S D
Conversion to Binary
Coded Decimal
Section 9.9
19
BIN
BIN
S D
Conversion to Binary
Section
9.10
SMOV S m1 m2 D n
CML
S D
BMOV S D n
Block Move
FMOV S D n
Fill Move
Exchange
Section 9.6
Section 9.7
Section 9.8
4
Devices
in Detail
SMOV
Instruction
List
13
ADD
ADD
S1 S2 D
Addition
Section
10.1
21
SUB
SUB
S1 S2 D
Subtraction
Section
10.2
MUL
MUL
S1 S2 D
Multiplication
Section
10.3
Specified the
Device &
Constant
22
23
DIV
DIV
S1 S2 D
Division
Section
10.4
24
INC
INC
Increment
Section
10.5
Before
Programming
25
DEC
DEC
Decrement
Section
10.6
26
WAND
WAND S1 S2 D
Section
10.7
Basic
Instruction
27
WOR
WOR S1 S2 D
Logical Word OR
Section
10.8
28
WXOR
WXOR S1 S2 D
Logical Exclusive OR
Section
10.9
29
NEG
Negation
Section
10.10
ROR
D n
Rotation Right
Section
11.1
31
ROL
ROL
D n
Rotation Left
Section
11.2
32
RCR
RCR
D n
Section
11.3
33
RCL
RCL
D n
Section
11.4
73
10
FNC20-FNC29
Arith. & Logic
Operation
ROR
FNC10-FNC19
Move & Compare
30
8
FNC00-FNC09
Program Flow
NEG
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
Applicable PLC
FX2NC
FX2N
FX1NC
FX1N
FX1S
FX3UC
FX3U
Function
FX3GC
Symbol
FX3S
Mnemonic
FX3G
FNC
No.
Reference
SFTR
SFTR S D n1 n2
Section
11.5
35
SFTL
SFTL
Section
11.6
36
WSFR
WSFR S D n1 n2
Section
11.7
37
WSFL
WSFL S D n1 n2
Section
11.8
38
SFWR
SFWR S D n
Shift write
[FIFO/FILO control]
Section
11.9
39
SFRD
SFRD S D n
Section
11.10
Zone Reset
Section
12.1
S D n1 n2
Data Operation
40
ZRST
41
DECO
DECO S D n
Decode
Section
12.2
42
ENCO
ENCO S D n
Encode
Section
12.3
43
SUM
44
BON
45
MEAN
46
ANS
47
ANR
48
SQR
SQR
49
FLT
ZRST D1 D2
Section
12.4
Section
12.5
MEAN S D n
Mean
Section
12.6
ANS
Section
12.7
Annunciator Reset
Section
12.8
S D
Square Root
Section
12.9
FLT
S D
Conversion to Floating
Point
Section
12.10
REF
D n
Refresh
SUM
BON
S D
S D n
S m D
ANR
*6
High-speed Processing
50
REF
51
REFF
52
MTR
53
HSCS
54
HSCR
74
REFF
Section
13.1
Section
13.2
Input Matrix
Section
13.3
HSCS S1 S2 D
Section
13.4
HSCR S1 S2 D
Section
13.5
MTR
S D1 D2 n
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
1
FX1NC
FX2NC
FX1N
FX2N
FX1S
FX3UC
FX3U
FX3GC
Function
FX3S
Symbol
FX3G
Mnemonic
Reference
Introduction
Applicable PLC
FNC
No.
High-speed Processing
56
SPD
SPD
57
PLSY
58
59
HSZ
S1 S2 S D
Section
13.6
Speed Detection
Section
13.7
PLSY S1 S2 D
Pulse Y Output
Section
13.8
PWM
PWM S1 S2 D
Section
13.9
PLSR
PLSR S1 S2 S3 D
Acceleration/Deceleration
Setup
Section
13.10
Initial State
Section
14.1
S1 S2 D
Handy Instruction
3
Instruction
List
HSZ
Overview
55
IST
61
SER
62
ABSD
ABSD S1 S2 D n
Section
14.3
63
INCD
INCD S1 S2 D n
Incremental Drum
Sequencer
Section
14.4
Specified the
Device &
Constant
64
TTMR
TTMR D n
65
STMR
STMR S m D
66
ALT
67
RAMP
68
69
IST
SER
S D1 D2
S1 S2 D n
Section
14.2
Section
14.5
Special Timer
Section
14.6
Alternate State
Section
14.7
RAMP S1 S2 D n
Section
14.8
ROTC
ROTC S m1 m2 D
Section
14.9
Basic
Instruction
Before
Programming
Teaching Timer
Devices
in Detail
60
SORT
SORT S m1 m2 D n
Section
14.10
ALT
Section
15.1
S D1 D2 D3
Hexadecimal Input
Section
15.2
S D1 D2 n
Digital Switch
(Thumbwheel Input)
71
HKY
HKY
72
DSW
DSW
73
SEGD
SEGD S D
74
SEGL
SEGL S D n
TKY
S D1 D2
Section
15.3
Section
15.4
Section
15.5
9
FNC10-FNC19
Move & Compare
TKY
FNC00-FNC09
Program Flow
70
10
FNC20-FNC29
Arith. & Logic
Operation
75
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
Applicable PLC
FX1NC
Section
15.6
ASC
Section
15.7
Section
15.8
FROM m1 m2 D n
Section
15.9
TO
TO
m1 m2 S n
Write To A Special
Function Block
Section
15.10
80
RS
RS
S m D n
81
PRUN
82
ASCI
ASCI
83
HEX
84
CCD
85
VRRD
VRRD S D
Volume Read
*6
*9
*9
Section
16.6
86
VRSC
VRSC S D
Volume Scale
*6
*9
*9
Section
16.7
87
RS2
Section
16.8
88
PID
FX2NC
FX1N
Function
FX2N
FX1S
Symbol
FX3UC
FX3GC
Arrow Switch
Mnemonic
FX3U
FX3S
FX3G
ARWS S D1 D2 n
FNC
No.
Reference
External FX Device
75
ARWS
76
ASC
77
PR
78
FROM
79
PR
S D
Serial Communication
Section
16.1
Section
16.2
S D n
Hexadecimal to ASCII
Conversion
Section
16.3
HEX
S D n
ASCII to Hexadecimal
Conversion
Section
16.4
CCD
S D n
Check Code
Section
16.5
PRUN S D
RS2
S m D n n1
PID
S1 S2 S3 D
Serial Communication 2
Section
16.9
Data Transfer 2
102
ZPUSH
103
ZPOP
ZPUSH D
ZPOP D
Batch Store
Register
of
Index
*5
Section
17.1
*5
Section
17.2
Section
18.1
Section
18.2
Section
18.3
Floating Point
110
ECMP
ECMP S1 S2 D
111
EZCP
EZCP S1 S2 S D
112
EMOV
EMOV S D
116
ESTR
ESTR S1 S2 D
117
EVAL
76
EVAL
S D
*6
*6
Section
18.4
Character String to
Floating Point Conversion
Section
18.5
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
1
FX1NC
Section
18.6
119
EBIN
EBIN
Scientific Notation to
Floating Point Conversion
Section
18.7
120
EADD
121
FX2NC
FX1N
FX2N
FX1S
EBCD S D
Function
FX3UC
FX3GC
EBCD
Symbol
FX3U
FX3S
FX3G
118
Mnemonic
Reference
Introduction
Applicable PLC
FNC
No.
Floating Point
Overview
S D
EADD S1 S2 D
*6
Section
18.8
ESUB
ESUB S1 S2 D
*6
Section
18.9
122
EMUL
EMUL S1 S2 D
Floating Point
Multiplication
*6
Section
18.10
123
EDIV
EDIV S1 S2 D
*6
Section
18.11
124
EXP
Devices
in Detail
125
LOGE
LOGE S D
126
LOG10
LOG10
127
ESQR
ESQR S D
128
ENEG
ENEG D
129
INT
INT
S D
130
SIN
SIN
S D
131
COS
COS
S D
132
TAN
TAN
S D
133
ASIN
ASIN
S D
S D
Section
18.12
Section
18.13
Section
18.14
Section
18.15
Section
18.16
Section
18.17
Section
18.18
Section
18.19
Section
18.20
*6
Before
Programming
Specified the
Device &
Constant
S D
Instruction
List
EXP
*6
Section
18.21
7
Basic
Instruction
ACOS
ACOS S D
135
ATAN
ATAN S D
Section
18.23
136
RAD
RAD
S D
Section
18.24
137
DEG
DEG
S D
Section
18.25
FNC10-FNC19
Move & Compare
10
Data Operation 2
WSUM
WSUM S D n
*5
Section
19.1
141
WTOB
WTOB S D n
WORD to BYTE
*5
Section
19.2
77
FNC20-FNC29
Arith. & Logic
Operation
140
FNC00-FNC09
Program Flow
134
Section
18.22
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
Applicable PLC
FX3GC
FX3UC
FX1S
FX1N
FX1NC
FX2N
FX2NC
BYTE to WORD
*5
Section
19.3
S D n
*5
Section
19.4
S D n
*5
Section
19.5
Byte Swap
*5
Section
19.7
*4
Section
20.1
*2,
4
Section
20.2
*5
Section
20.3
*1 *1
Section
20.4
Section
20.5
Section
20.6
Symbol
Function
FX3U
FX3S
Mnemonic
FX3G
FNC
No.
Reference
Data Operation 2
142
BTOW
143
UNI
UNI
144
DIS
DIS
147
SWAP
SWAP S
149
SORT2
SORT2 S m1 m2 D n
BTOW S D n
Section
19.6
Positioning Control
150
DSZR
DSZR S1 S2 D1 D2
151
DVIT
DVIT
Interrupt Positioning
152
TBL
155
ABS
156
ZRN
157
PLSV
158
DRVI
DRVI S1 S2 D1 D2
Drive to Increment
Section
20.7
159
DRVA
DRVA S1 S2 D1 D2
Drive to Absolute
Section
20.8
S1 S2 D1 D2
TBL
ABS
ZRN
D n
S D1 D2
S1 S2 S3 D
PLSV
S D1 D2
*4
Section
21.1
Section
21.2
TADD S1 S2 D
Section
21.3
TSUB
TSUB S1 S2 D
Section
21.4
164
HTOS
HTOS S D
Hour to Second
Conversion
Section
21.5
165
STOH
STOH S D
Second to Hour
Conversion
Section
21.6
166
TRD
TRD
Section
21.7
167
TWR
TWR
Section
21.8
169
HOUR
160
TCMP
TCMP S1 S2 S3 S D
161
TZCP
TZCP S1 S2 S D
162
TADD
163
78
HOUR S D1 D2
Hour Meter
*1 *1
Section
21.9
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
1
FX2NC
FX1NC
170
GRY
GRY
S D
Section
22.1
171
GBIN
GBIN
S D
Section
22.2
176
RD3A
177
WR3A
FX2N
FX1N
Reference
FX1S
FX3UC
FX3U
FX3GC
Function
FX3S
Symbol
FX3G
Mnemonic
Introduction
Applicable PLC
FNC
No.
External Device
*1 *1
Section
22.3
*1 *1
Section
22.4
*1 *1
Random Number
Generation
Extension Function
180
EXTR
Others
COMRD S D
184
RND
RND
186
DUTY
DUTY n1 n2 D
188
CRC
CRC
S D n
189
HCMOV
HCMOV S D n
Section
24.1
Section
24.2
Section
24.3
Section
24.4
*4
Section
24.5
*5
*5
192
BK+
BK+
S1 S2 D n
*5
Section
25.1
193
BK-
BK-
S1 S2 D n
*5
Section
25.2
BKCMP= S1 S2 D n
195
BKCMP>
BKCMP> S1 S2 D n
196
BKCMP<
BKCMP< S1 S2 D n
197
BKCMP<>
BKCMP<> S1 S2 D n
198
BKCMP<=
BKCMP<= S1 S2 D n
BKCMP>=
BKCMP>= S1 S2 D n
S1 > S2
Block Data Compare
S1 < S2
Block Data Compare
S1 S2
Block Data Compare
S1 S2
Block Data Compare
*5
*5
Section
25.3
*5
Section
25.3
*5
Section
25.3
*5
Section
25.3
*5
*5
Section
26.1
*5
Section
26.2
S1 S2
STR
201
VAL
STR
VAL
S1 S2 D
S D1 D2
79
10
FNC20-FNC29
Arith. & Logic
Operation
Section
25.3
FNC10-FNC19
Move & Compare
199
S1 = S2
FNC00-FNC09
Program Flow
BKCMP=
Section
25.3
Basic
Instruction
194
6
Before
Programming
5
Specified the
Device &
Constant
COMRD
Devices
in Detail
182
3
Instruction
List
WR3A m1 m2 S
Overview
RD3A m1 m2 D
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
Applicable PLC
FX1S
FX1N
FX1NC
FX2N
FX2NC
Section
26.3
Section
26.4
FX3UC
Function
FX3U
FX3GC
Symbol
FX3S
Mnemonic
FX3G
FNC
No.
Reference
$+
203
LEN
204
RIGHT
205
$+
S1 S2 D
LEN
S D
RIGHT
S D n
Section
26.5
LEFT
LEFT
S D n
Section
26.6
206
MIDR
MIDR S1 D S2
Random Selection of
Character Strings
Section
26.7
207
MIDW
MIDW S1 D S2
Random Replacement of
Character Strings
Section
26.8
208
INSTR
INSTR S1 S2 D n
Section
26.9
209
$MOV
$MOV S D
Section
26.10
*5
Data Operation 3
210
FDEL
FDEL
S D n
*5
Section
27.1
211
FINS
FINS
S D n
*5
Section
27.2
212
POP
POP
S D n
Section
27.3
213
SFR
SFR
D n
Section
27.4
214
SFL
SFL
D n
Section
27.5
Data Comparison
224
LD=
LD=
S1 S2
225
LD>
LD>
S1 S2
226
LD<
LD<
S1 S2
228
LD<>
LD<> S1 S2
229
LD<=
LD<= S1 S2
230
LD>=
LD>= S1 S2
232
AND=
AND= S1 S2
233
AND>
AND> S1 S2
80
Load Compare
S1 = S2
Load Compare
S1 > S2
Load Compare
S1 < S2
Load Compare
S1 S2
Load Compare
S1 S2
Load Compare
S1 S2
AND Compare
S1 = S2
AND Compare
S1 > S2
Section
28.1
Section
28.1
Section
28.1
Section
28.1
Section
28.1
Section
28.1
Section
28.2
Section
28.2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
1
FX2NC
FX2N
FX1NC
FX1N
FX1S
FX3UC
FX3U
FX3GC
Function
FX3S
Symbol
FX3G
Mnemonic
Reference
Introduction
Applicable PLC
FNC
No.
Data Comparison
AND Compare
AND< S1 S2
236
AND<>
AND<> S1 S2
237
AND<=
AND<= S1 S2
238
AND>=
240
OR=
AND>= S1 S2
S1 S2
S1 S2
Section
28.3
4
Section
28.3
Section
28.3
S1 < S2
S1 S2
OR Compare
Section
28.3
S1 S2
OR Compare
OR Compare
Section
28.3
S1 S2
OR>= S1 S2
Section
29.1
257
BAND
BAND S1 S2 S3 D
Section
29.2
258
ZONE
ZONE S1 S2 S3 D
Zone Control
Section
29.3
259
SCL
Scaling
(Coordinate by Point Data)
Section
29.4
260
DABIN
DABIN S D
Section
29.5
*5
Section
29.6
Scaling 2
(Coordinate by X/Y Data)
*3
Section
29.7
Section
30.1
SCL
S1 S2 D
261
BINDA
BINDA S D
269
SCL2
SCL2 S1 S2 D
*5
IVCK S1 S2 D n
*6
81
10
FNC20-FNC29
Arith. & Logic
Operation
Limit Control
FNC10-FNC19
Move & Compare
LIMIT S1 S2 S3 D
FNC00-FNC09
Program Flow
LIMIT
Basic
Instruction
256
IVCK
270
Before
Programming
Section
28.3
S1 S2
OR<= S1 S2
Specified the
Device &
Constant
OR>=
Section
28.2
OR Compare
OR<> S1 S2
246
AND Compare
Devices
in Detail
S1 S2
OR<>
OR<=
Section
28.2
S1 S2
S1 > S2
OR<
245
AND Compare
OR Compare
OR<
244
Section
28.2
S1 S2
S1 = S2
OR>
OR>
242
AND Compare
OR Compare
OR=
241
Section
28.2
S1 < S2
Instruction
List
AND<
Overview
234
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3 Instruction List
Applicable PLC
FX1N
FX1NC
FX2N
FX2NC
Reference
FX1S
FX3UC
FX3U
Function
FX3GC
Symbol
FX3S
Mnemonic
FX3G
FNC
No.
271
IVDR
IVDR S1 S2 S3 n
Inverter Drive
*6
Section
30.2
272
IVRD
IVRD S1 S2 D n
*6
Section
30.3
273
IVWR
IVWR S1 S2 S3 n
*6
Section
30.4
274
IVBWR
IVBWR S1 S2 S3 n
Section
30.5
275
IVMC
IVMC S1 S2 S3 D n
*8
*9
*9
Section
30.6
276
ADPRW
ADPRW S S1 S2 S3 S4/D
*
10
*
*
11 11
Section
30.7
Data Transfer 3
278
RBFM
RBFM m1 m2 D n1 n2
*5
Section
31.1
279
WBFM
WBFM m1 m2 S n1 n2
*5
Section
31.2
HSCT S1 m S2 D n
High-speed Counter
Compare With Data Table
Section
32.1
Load From ER
Section
33.1
Save to ER
Section
33.2
Initialize R and ER
Section
33.3
Logging R and ER
Section
33.4
Rewrite to ER
*3
Section
33.5
Initialize ER
*3
Section
33.6
*7
*7
Section
34.1
*7
*7
Section
34.2
High-speed Processing 2
280
HSCT
LOADR
291
SAVER
292
INITR
293
LOGR
294
RWER
295
INITER
LOADR S n
SAVER
S m D
INITR S n
LOGR S m D1 n D2
RWER S n
INITER
S n
FLCRT
FLCRT S1 S2 S3 n
301
FLDEL
FLDEL S1 S2 n
302
FLWR
FLWR S1 S2 S3 D n
Data write
*7
*7
Section
34.3
303
FLRD
FLRD S1 S2 D1 D2 n
Data read
*7
*7
Section
34.4
304
FLCMD
FLCMD S n
FX3U-CF-ADP command
*7
*7
Section
34.5
305
FLSTRD
FLSTRD S D n
*7
*7
Section
34.6
82
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
Introduction
4.
Devices in Detail
4.1
2
Overview
This chapter explains how numeric values are handled in the PLC as well as the roles and functions of various built-in
devices including I/O relays, auxiliary relays, state relays, counters and data registers.
The following content provides a basis for handling the PLC.
1)
FX3S PLC
Device name
Reference
Section 4.2
Input relay
X000 to X017
16 points
Output relay
Y000 to Y015
14 points
General type
M0 to M383
384 points
M384 to M511
128 points
General type
M512 to M1535
1024 points
Special type*1
M8000 to M8511
512 points
S0 to S9
10 points
S10 to S127
118 points
General type
S128 to S255
128 points
100 ms
T0 to T31
32 points
100 ms/10 ms
T32 to T62
31 points
1 ms
T63 to T127
65 points
T128 to T131
4 points
T132 to T137
6 points
C0 to C15
16 points
Counts 0 to 32,767
C16 to C31
16 points
Counts 0 to 32,767
General type
bi-directional counter
(32 bits)
C200 to C234
35 points
Auxiliary relay
4
Devices
in Detail
Description
I/O relay
3
Instruction
List
Section 4.3
State relay
Section 4.4
5
Specified the
Device &
Constant
Chapter 37
6
Before
Programming
Section 4.5
7
Basic
Instruction
Counter
Section 4.6
FNC00-FNC09
Program Flow
*1.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
83
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Device name
Description
Reference
High-speed counter
1-phase 1-counting input
Bi-directional (32 bits)
(EEPROM keep)
C235 to C245
C246 to C250
C251 to C255
Section 4.7
D0 to D127
128 points
D128 to D255
128 points
D256 to D2999
2744 points
Section 4.9
Among 2000 latched type data registers backed
up by the EEPROM, D1000 and later can be set
as file registers in units of 500 points by the
parameter setting.
D1000 to D2999
2000 points
D8000 to D8511
512 points
Chapter 37
V0 to V7, Z0 to Z7
16 points
Section 4.11
P0 to P255
256 points
Input interrupt
I0
to I5
6 points
Timer interrupt
I6
to I8
3 points
Pointer
For CJ and CALL instructions
Section 4.12
Nesting
For master control
N0 to N7
8 points
For MC instruction
16 bits
32,768 to +32,767
32 bits
2,147,483,648 to +2,147,483,647
Constant
Decimal (K)
Hexadecimal (H)
*1.
84
16 bits
0 to FFFF
32 bits
0 to FFFFFFFF
32 bits
Chapter 5
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
FX3G/FX3GC PLCs
Device name
Description
Reference
I/O relay
X000 to X177
128 points
Output relay
Y000 to Y177
128 points
General type
M0 to M383
384 points
M384 to M1535
Section 4.2
Auxiliary relay
General
type*1
Special type*3
M1536 to
M7679*2
1152 points
Section 4.3
6144 points
M8000 to M8511
512 points
Chapter 37
S0 to S9
10 points
S10 to S899
890 points
Annunciator type
(EEPROM keep)
S900 to S999
100 points
General type*1
S1000 to S4095
3096 points
100 ms
T0 to T191
192 points
T192 to T199
8 points
0.1 to 3,276.7sec
10 ms
T200 to T245
46 points
T246 to T249
4 points
T250 to T255
6 points
1 ms
T256 to T319
64 points
C0 to C15
16 points
Counts 0 to 32,767
C16 to C199
184 points
Counts 0 to 32,767
General type
bi-directional counter (32 bits)
C200 to C219
20 points
C220 to C234
15 points
State relay
Instruction
List
4
Devices
in Detail
Section 4.5
7
Basic
Instruction
High-speed counter
C235 to C245
C251 to C255
Section 4.7
When the optional battery is installed, general type devices can be changed to latched (battery backed) type
devices by the parameter setting. However, the latched range cannot be set.
*2.
Operation varies when M2800 to M3071 are used in the LDP, LDF, ANDP, ANDF, ORP and ORF instructions.
Refer to Section 7.5 for the details.
*3.
9
FNC10-FNC19
Move & Compare
*1.
8
FNC00-FNC09
Program Flow
Before
Programming
Section 4.6
C246 to C250
5
Specified the
Device &
Constant
Counter
Section 4.4
2
Overview
Input relay
Introduction
2)
10
FNC20-FNC29
Arith. & Logic
Operation
85
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Device name
Description
Reference
D0 to D127
128 points
D128 to D1099
972 points
D1100 to D7999
6900 points
Section 4.9
Among 7000 latched type data registers backed
up by the EEPROM, D1000 and later can be set
as file registers in units of 500 points by the
parameter setting.
D1000 to D7999
7000 points
D8000 to D8511
512 points
Chapter 37
V0 to V7, Z0 to Z7
16 points
Section 4.11
R0 to R23999
24000 points
ER0 to ER23999
24000 points
P0 to P2047
2048 points
Input interrupt
I0
to I5
6 points
Timer interrupt
I6
to I8
3 points
(16 bits)*1
Extension file register
(16 bits)
(EEPROM keep)
Section 4.10
Pointer
For CJ and CALL instructions
Section 4.12
Nesting
For master control
N0 to N7
8 points
For MC instruction
16 bits
32,768 to +32,767
32 bits
2,147,483,648 to +2,147,483,647
Constant
Decimal (K)
Hexadecimal (H)
86
16 bits
0 to FFFF
32 bits
0 to FFFFFFFF
32 bits
Chapter 5
*1.
When the optional battery is installed, general type devices can be changed to latched (battery backed) type
devices by the parameter setting. However, the latched range cannot be set.
*2.
*3.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
FX3U/FX3UC PLCs
Device name
Description
Reference
Section 4.2
I/O relay
Input relay
Output relay
X000 to X367*1
248 points
*1
248 points
Y000 to Y367
M0 to M499
500 points
M500 to M1023
524 points
M1024 to M7679*2
6656 points
Special type*3
M8000 to M8511
512 points
S0 to S9
10 points
S10 to S499
490 points
S500 to S899
400 points
Annunciator
(latched (battery backed)
type [variable])
S900 to S999
100 points
S1000 to S4095
3096 points
100 ms
T0 to T191
192 points
T192 to T199
8 points
10 ms
T200 to T245
46 points
T246 to T249
4 points
T250 to T255
6 points
1 ms
T256 to T511
256 points
C0 to C99
100 points
C100 to C199
100 points
Counts 0 to 32,767
The setting can be changed between the latched
(battery backed) type and the non-latched type
using parameters.
General type
bi-directional counter
(32 bits) [variable]
C200 to C219
20 points
C220 to C234
15 points
2
Overview
Auxiliary relay
Introduction
3)
Section 4.3
State relay
4
Section 4.4
Devices
in Detail
Instruction
List
Chapter 37
6
Before
Programming
Counter
7
Section 4.6
Basic
Instruction
2,147,483,648 to
+2,147,483,647 counts
The setting can be changed between the latched
(battery backed) type and the non-latched type
using parameters.
Specified the
Device &
Constant
Section 4.5
Available device numbers vary depending on the PLC. For details, refer to Section 4.2.
*2.
Operation varies when M2800 to M3071 are used in the LDP, LDF, ANDP, ANDF, ORP and ORF instructions.
Refer to Section 7.5 for the details.
*3.
FNC00-FNC09
Program Flow
*1.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
87
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Device name
Description
Reference
High-speed counter
1-phase 1-counting input
Bi-directional (32 bits)
C235 to C245
C246 to C250
C251 to C255
Section 4.8
D0 to D199
200 points
D200 to D511
312 points
D512 to D7999
<D1000 to
D7999>
7488 points
<7000
points>
D8000 to D8511
512 points
Chapter 37
V0 to V7, Z0 to Z7
16 points
Section 4.11
Section 4.9
R0 to R32767
32768 points
ER0 to ER32767
32768 points
P0 to P4095
4096 points
Input interrupt
Input delay interrupt
I0
to I5
6 points
Timer interrupt
I6
to I8
3 points
Counter interrupt
I010 to I060
6 points
N0 to N7
8 points
For MC instruction
16 bits
32768 to +32767
32 bits
2,147,483,648 to +2,147,483,647
Section 4.10
Pointer
Section 4.12
Nesting
For master control
Constant
Decimal (K)
16 bits
0 to FFFF
32 bits
0 to FFFFFFFF
32 bits
Character string
Hexadecimal (H)
88
Chapter 5
*1.
When the FX3U-4HSX-ADP is connected to an FX3U PLC, the maximum input frequency is set as follows:
1 phase: 200 kHz
2 phases: 100 kHz (1 edge count). 100 kHz (4 edge count)
*2.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
FX3S
PLC
FX3S-10M
FX3S-14M
FX3S-20M
FX3S-30M
Input
X000 to X005
6 points
X000 to X007
8 points
X000 to X013
12 points
X000 to X017
16 points
Output
Y000 to Y003
4 points
Y000 to Y005
6 points
Y000 to Y007
8 points
Y000 to Y015
14 points
Model
name
FX3G-14M
FX3G-24M
FX3G-40M
FX3G-60M
When extended
Input
X000 to X007
8 points
X000 to X015
X000 to X027
24 points
X000 to X043
36
points(40)*1
X000 to X177
128 points
Y000 to Y017
16 points
Y000 to Y027
24 points
Y000 to Y177
128 points
10 points(16)*1
Model
name
FX3GC-32MT/
D(SS)
When extended
Input
X000 to X017
16 points
X000 to X177
128 points
Output
Y000 to Y017
16 points
Y000 to Y177
128 points
Model
name
FX3U-16M
Output
128
points in
total
FX3U-48M
FX3U-64M
FX3U-80M
FX3U-128M
When
extended
256
X000 to X007 X000 to X017 X000 to X027 X000 to X037 X000 to X047 X000 to X077 X000 to X367
points in
8 points
16 points
24 points
32 points
40 points
64 points
248 points
total
Y000 to Y007 Y000 to Y017 Y000 to Y027 Y000 to Y037 Y000 to Y047 Y000 to Y077 Y000 to Y367
8 points
16 points
24 points
32 points
40 points
64 points
248 points
*1.
FX3UC-32M
FX3UC-64M
FX3UC-96M
When
extended
Input
X000 to X007
8 points
X000 to X017
16 points
X000 to X037
32 points
X000 to X057
48 points
X000 to X367
248 points
Output
Y000 to Y007
8 points
Y000 to Y017
16 points
Y000 to Y037
32 points
Y000 to Y057
48 points
Y000 to Y367
248 points
Model
name
FX3UC-32MT-LT
(-2)
When extended
Input
X000 to X017
16 points
X000 to X357
240 points
Output
Y000 to Y017
16 points
Y000 to Y357
240 points
256
points
in total
256
points in
total
A number inside ( ) indicates the number of occupied points. The difference from the number of valid points is
unused.
FNC00-FNC09
Program Flow
FX3UC-32MT-LT(-2) PLC
FX3UC-16M
Basic
Instruction
Model
name
6
Before
Programming
Input
FX3U-32M
128
points in
total
Specified the
Device &
Constant
Y000 to Y011
6 points(8)*1
Devices
in Detail
FX3U
PLC
14 points(16)
Y000 to Y005
Output
FX3GC
PLC
*1
30
points in
total
Instruction
List
FX3G
PLC
Model
name
2
Overview
4.2.1
Introduction
4.2
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
89
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.2.2
External power
supply
COM1
24V
Input
signal
Program example
X000
X001
S/S
X000
Y000
X000
Input
terminal
Load
Y000
NO contact
X000
PLC
90
Y000
Y000
X000
Y000
Output terminal
NC contact
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1) Read-in
Input processing
Before executing a program, the PLC reads the ON/
OFF status of all input terminals inside the PLC into
the input image memory.
Even if inputs change while the program is
executed, the contents of the input image memory
remain unchanged, but the changes in inputs are
read during the input processing in the next cycle.
Even if an input contact changes from ON to OFF or
from OFF to ON, its ON/OFF status is judged after
the response delay (approximately 10 ms) caused
by the input filter.
(When the input filter is a digital type input terminal ,
its value can be overwritten by a sequence
program.)
X000
Input
Image
Memory
3
Instruction
List
Input terminal
X001
X002
Overview
Input processing
Introduction
4.2.3
4
Devices
in Detail
3) Write
4) Readout
M0
5) Write
Auxiliary
relay
Device
Image
Memory
5
Specified the
Device &
Constant
Y000
Y000
Program processing
The PLC reads the ON/OFF status of each device
from the input image memory and other device
image memories according to the contents of
instructions in the program memory, executes
operations in sequence from step 0, and then writes
the operation result to the image memory.
Accordingly, the contents of the image memory for
each device change as the program is executed.
The operation of a contact inside an output relay is
determined by the contents of the output image
memory.
6
Before
Programming
Output processing
Output
Latch
Memory
Y001
Y002
Output processing
When execution of all instructions is finished, the
ON/OFF status of the image memory of outputs (Y)
is transferred to the output latch memory. This is
the actual output of the PLC.
External output contacts inside the PLC operate
after the response delay time of the output devices.
Basic
Instruction
Y000
Output terminal
8
FNC00-FNC09
Program Flow
Repeated operation
[The time required for a cyclic
operation is called operation cycle
(scan time).]
6) Output
The above method is called the batch I/O method (or refresh method).
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
91
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.3
4.3.1
1. FX3S PLC
General type
Fixed latched
(EEPROM keep) type
General type
Special type
M0 to M383
384 points
M384 to M511
128 points
M512 to M1535
1024 points
M8000 to M8511
512 points
General type
Fixed latched
(EEPROM keep) type
General type
Special type
M0 to M383
384 points
M384 to M1535
1152 points
M1536 to M7679
M8000 to M8511
512 points
General type
Latched
(battery backed) type
Fixed latched
(battery backed) type
M0 to M499
M500 to M1023
M1024 to M7679
500 points*2
524 points*3
6656 points*4
2. FX3G/FX3GC PLCs
6144 points*1
3. FX3U/FX3UC PLCs
Special type
M8000 to M8511
512 points
*1.
These registers can be changed to the latched (battery backed) type by the parameter setting when the
optional battery is used. However, the latched range cannot be set.
*2.
This area is not latched (battery backed). It can be changed to a latched (battery backed) area by setting the
parameters.
*3.
This area is latched (battery backed). It can be changed to a non-latched (non-battery-backed) area by setting
the parameters.
*4.
When N : N Network or parallel link is used, some auxiliary relays are occupied for the link.
Refer to the Data Communication Edition manual.
4.3.2
M100
NO contact
M100
NC contact
Auxiliary relay circuit
92
All of general type auxiliary relays turn OFF when the PLC turns OFF.
When the ON/OFF status of auxiliary relays just before power failure is
required in control, use latched (battery backed) type auxiliary relays.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
X001
M600
M600
PLC
Backup against power failure
(self-holding circuit)
SET
M600
RST
M600
The figure on the left shows a circuit using the SET and RST
instructions.
X001
5
Specified the
Device &
Constant
PLC
Backup against power failure
(set/reset circuit)
1)
4
Devices
in Detail
X000
3
Instruction
List
X000
2
Overview
When the power is turned OFF while the PLC is operating, all of the output relays and general type auxiliary relays
turn OFF.
When restoring the power again, all of the output relays and general type auxiliary relays remain OFF except those
whose input condition is ON. In some output relays and auxiliary relays, however, the ON/OFF status just before
power failure should be stored and then replicated when restoring the power, depending on control targets. In such a
case, use latched (battery backed) type auxiliary relays.
In FX3U/FX3UC PLCs, latched (battery backed) type devices are backed up by the battery built into the PLC.
In FX3S/FX3G/FX3GC PLCs, latched type devices are backed up by the EEPROM built into the PLC. When the optional
battery is installed in FX3G/FX3GC PLCs, the battery backs up some general type devices.
Introduction
6
Before
Programming
7
X000
X001
M600
M600
X000
M601
M601
Leftward drive
command
8
FNC00-FNC09
Program Flow
X001
Rightward
drive
command
Basic
Instruction
93
10
FNC20-FNC29
Arith. & Logic
Operation
Method for using a fixed latched (battery backed) type auxiliary relay as a general type auxiliary relay
When using a fixed latched (battery backed) type auxiliary relay as a general type auxiliary relay, provide a reset
circuit shown in the figure below around the head step in the program.
Ex. FX3U/FX3UC PLCs
M8002
FNC 40
M1024 M1999
ZRST
Initial pulse
M1024 to M1999 are initialized.
FNC10-FNC19
Move & Compare
2)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.4
4.4.1
1. FX3S PLC
Initial state type
(EEPROM keep)
Fixed latched
(EEPROM keep) type
General type
S0 to S9
10 points
S10 to S127
118 points
S128 to S255
128 points
Fixed latched
(EEPROM keep) type
Annunciator type
(EEPROM keep)
S0 to S9
10 points
S10 to S899
890 points
S900 to S999
100 points
2. FX3G/FX3GC PLCs
General type
S1000 to S4095
3096 points*1
3. FX3U/FX3UC PLCs
General type
Latched
(battery backed) type
Fixed latched
(battery backed) type
Annunciator type
S0 to S9
S0 to S499
S500 to S899
S1000 to S4095
S900 to S999
10 points*2
500 points*2
400 points*3
3096 points*4
100 points*3
94
*1.
These registers can be changed to the latched (battery backed) type by the parameter setting when the
optional battery is used. However, the latched range cannot be set.
*2.
This area is not latched (battery backed). It can be changed to a latched (battery backed) area by setting the
parameters.
*3.
This area is latched (battery backed). It can be changed to a non-latched (non-battery-backed) area by setting
the parameters.
*4.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Introduction
4.4.2
1. General type
Initial state
S 2
Start
TRAN
Moving down
S 20
Y000
Lower limit
X001
TRAN
Clamping
S 21
Y001
Clamping
X002
Clamping
TRAN
S 22
Upper
limit
Y002
Upper limit
X003
4
Devices
in Detail
Moving up
When the PLC turns OFF, all of general type state relays
are turned OFF.
When the ON/OFF status just before power failure is
required, use latched (battery backed) type state relays.
3
Instruction
List
Lower
limit
2
Overview
Start
X000
TRAN
X001
S10
S10
M30
Y005
Latched (battery backed) type state relays store their ON/OFF status even if the power is shut down while the PLC
is operating, so the operation can be restarted from the last point in the process.
In FX3U/FX3UC PLCs, latched (battery backed) type devices are backed up by the battery built into the PLC.
In FX3S/FX3G/FX3GC PLCs, latched type devices are backed up by the EEPROM built into the PLC. When the
optional battery is installed in FX3G/FX3GC PLCs, the battery backs up some general type devices.
For details on backup against power failure, refer to Chapter 2.6.
Ex. FX3U/FX3UC PLCs
0
M8002
Initial pulse
FNC 40
ZRST
7
Basic
Instruction
6
Before
Programming
Specified the
Device &
Constant
State relays have many NO contacts and NC contacts in the same way as
auxiliary relays, and such contacts can be used arbitrarily in sequence
programs.
When state relays (S) are not used for step ladder instructions, they can be used
in general sequences in the same way as auxiliary relays (M) (as shown in the
figure on the right).
S1000
S1200
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
95
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
3. Annunciator type
Annunciator type state relays can be used as outputs for external fault diagnosis.
For example, when an external fault diagnosis circuit shown in the figure below is created and the contents of the
special data register D8049 are monitored, the smallest number out of the active state relays S900 to S999 is stored in
D8049.
If two or more faults have occurred, the smallest state number having a fault is displayed at first. When the fault is
cleared, the next smallest state number having a fault is stored.
M8000
M8049
RUN monitor
Y000
X001
X003
X000
X002
X004
FNC 46
ANS
T 0
K 10
S900
FNC 46
ANS
T 1
K 20
S901
FNC 46
ANS
T 2
K100
S902
M8048
Y010
X005
FNC 47
ANRP
While the special auxiliary relay M8049 is not driven, annunciator type state relays can be used as latched (battery
backed) type state relays in sequence programs in the same way as general type state relays.
In the SFC programming mode in the FX-PCS/WIN(-E), however, S900 to S999 cannot be programmed as a
processes flow in SFC diagrams.
96
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Timer [T]
Timers add and count clock pulses of 1 ms, 10 ms, 100 ms, etc. inside the PLC. When the counted value reaches a
specified set value, the output contact of the timer turns on.
A set value can be directly specified by a constant (K) in the program memory, or indirectly specified by the contents of
a data register (D).
Numbers of timers
2
Overview
4.5.1
Introduction
4.5
The table below shows timer (T) numbers. (The numbers are assigned in decimal.)
1. FX3S PLC
For 1 ms pulses
0.001 to 32.767 sec
T0 to T62
63 points
T32 to T62
31 points
T63 to T127
65 points
T128 to T131
4 points
Latched type*1
T132 to T137
6 points
Latched type*1
For 10 ms pulses
0.01 to 327.67 sec
For 1 ms pulses
0.001 to 32.767 sec
T0 to T199
200 points
------------Routine program
type
T192 to T199
T200 to T245
46 points
T246 to T249
4 points for
Interrupt execution
Latched type*1
T250 to T255
6 points
Latched type*1
T256 to T319
64 points
Potentiometer type
0 to 255
(numeric value)
2 built-in points*2
Stored in D8030 and
D8031
2. FX3G/FX3GC PLCs
Potentiometer type
0 to 255
(numeric value)
For 1 ms pulses
0.001 to 32.767 sec
T0 to T199
200 points
------------Routine program type
T192 to T199
T200 to T245
46 points
T246 to T249
4 points for
Interrupt execution
Latched (battery
backed) type*4
T250 to T255
6 points
Latched (battery
backed) type*4
T256 to T511
256 points
6
Before
Programming
For 10 ms pulses
0.01 to 327.67 sec
5
Specified the
Device &
Constant
Timer numbers not used for timers can be used as data registers for storing numeric values.
In FX3S/FX3G/FX3GC PLCs, retentive type timers are backed up by the EEPROM memory.
This function is not supported in the FX3S-30M /E -2AD PLC.
This function is supported only in FX3G PLC.
In FX3U/FX3UC PLCs, retentive type timers are backed up by the battery.
7
Basic
Instruction
4.5.2
2 built-in points*3
3. FX3U/FX3UC PLCs
*1.
*2.
*3.
*4.
Devices
in Detail
For 100/10 ms
pulses
0.1 to 3276.7 sec
0.01 to 327.67 sec
Instruction
List
K123
Set value
(constant)
A data register
can be
specified also.
1.23 sec
Y000
X000
When the drive input X000 of the timer coil T200 turns ON, the current
value counter for T200 adds and counts clock pulses of 10 ms. When
the counted value becomes equivalent to the set value K123, the
output contact of the timer turns on.
In other words, the output contact turns on 1.23 seconds after the coil
is driven.
When the drive input X000 turns OFF or when the power is turned off
the timer is reset and the output contact returns.
Y000
T32
FNC20-FNC29
Arith. & Logic
Operation
RUN monitor
X003
10
For FX3S, driving M8028 ON, timers T32 to T62 are changed to
10 ms resolution.
M8028
9
FNC10-FNC19
Move & Compare
Set value
Current
value
8
FNC00-FNC09
Program Flow
T200
T200
K100
1-second timer
97
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
2. Retentive type
Set value
T250 K345 (constant)
A data register
can be
Y001
specified also.
X001
T250
X002
RST
t2
t1
X001
Current
value
Y001
T250
Retentive time
t1 + t2 = 34.5 sec
When the drive input X001 of the timer coil T250 turns ON, the current
value counter for T250 adds and counts clock pulses of 100 ms.
When the counted value becomes equivalent to the set value K345,
the output contact of the timer turns on.
Even if the drive input X001 turns OFF or the power is turned off
during counting, the timer continues counting when the operation
restarts. The retentive operating time is 34.5 seconds.
When the reset input X002 turns ON, the timer is reset and the output
contact is returned.
Set value
X002
3. Potentiometer type
When variable analog potentiometers built in the FX3S/FX3G PLCs are used*1
Values of variable analog potentiometers built
[Basic example]
in FX3S/FX3G PLCs as standard are stored as
X003
numeric data ranging from 0 to 255 in the
T10 D08030
following special registers in accordance with
the scale position.
This register stores the
0 to 25.5 sec
An obtained numeric value can be specified
value (0 to 255) of variable
as the indirectly specified value for a timer to
analog potentiometer.
make a variable potentiometer type analog
timer.
[Applied example]
VR1 D8030 (Integer from 0 to 255)
1)
M8000
RUN monitor
X003
FNC 22
MUL
K2
DO (D1)
T10
D0
The set value range can be
changed (up to 32,767) by multiplying
the register value by "n".
Do not use D1 in other programs.
*1.
2)
98
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Introduction
4.5.3
K100
X001
FNC 12
MOV
K100
T10
4.5.4
Cautions on routines
Use timers T192 to T199 in subroutines and interrupt routines. These timers execute counting when a coil
instruction or END instruction is executed.
When such a timer reaches the set value, its output contact turns on when a coil instruction or END instruction is
executed.
Because general type timers execute counting only when a coil instruction is executed (Refer to "4.5.5 Details on
timer operation and timer accuracy" below), they do not execute counting and do not operate normally if they are
used in subroutines or interrupt routines in which a coil instruction is executed only in a certain condition.
2)
When a retentive timer for 1 ms pulses (T246 to T249) is used in a subroutine or interrupt routine, note that its
output contact turns on when the first coil instruction is executed after the retentive timer has reached the set
value.
X010
T 0
1.2 sec
timeout
T 0
Y010
1st cycle
2nd cycle
"n"th cycle
T 0
Contact is
activated
Y010
ON
"n+1"th cycle
: 0.001 sec (timer for 1 ms), 0.01 sec (timer for 10 ms) or 0.1 sec (timer for 100 ms)
T : Timer set value (sec)
T0: Operation cycle (sec)
9
FNC10-FNC19
Move & Compare
If the contact is programmed before the timer coil, "+2T0" is obtained in the worst case.
When the timer set value is "0", the output contact turns on when a coil instruction is executed in the next cycle. An
interrupt execution type timer for 1 ms pulses counts clock pulses of 1 ms as an interrupt processing after a coil
instruction has been executed.
8
FNC00-FNC09
Program Flow
As shown in the above operation diagram, the accuracy of operation of the timer contact after the coil is driven until the
contact turns on is shown in the following outline:
+T0
Basic
Instruction
K12
Before
Programming
A timer (except interrupt execution type) starts counting when a coil is driven, and its output contact turns on when the
first coil instruction is executed after the timer has reached timeout.
Specified the
Device &
Constant
1)
Devices
in Detail
4.5.5
D5
D5 = K100
10-second
timer
Instruction
List
X003
D 5
Overview
10
FNC20-FNC29
Arith. & Logic
Operation
99
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.5.6
Off-delay timer
X001
T5
X001
Y000
Y000
X001
T 5
K200
T 1
K20
T 2
K10
T5
Y000
(20 sec)
X001
T2
T 1
2
sec
T1
1
2
sec sec
T2 T1
Y000
T 2
(
Y000
One
operation
cycle
In addition, the flicker operation can be performed by the ALT (FNC 66) instruction.
X000
FNC 65
STMR
T 10
m
K100
D
M0
X000
M0
10
sec
10
sec
M0 is an off-delay timer.
M1
10
sec
10
sec
10
sec
M2
M3
Flicker timer
X000
X000
M 3
FNC 65
STMR
T 10
K100
M0
M 2
M 1
In addition, the timer time can be set according to the switch input time by the teaching timer instruction TTMR (FNC
64).
100
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
16-bit
*1
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
High
Low
16 bits
order
order
b15 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 b0
3
Instruction
List
Sign
0: Positive
number
1: Negative
number
*1 The sign is valid only when a timer is handled as a substitute for data register.
32-bit
Devices
in Detail
2)
1,073,741,824
536,870,912
268,435,456
134,217,728
67,108,864
33,554,432
16,777,216
8,388,608
4,194,304
2,097,152
1,048,576
524,288
262,144
131,072
65536
32768
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
High
Low
32 bits
order
order
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0
b31 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1
b0
5
Specified the
Device &
Constant
Sign
0: Positive
number
1: Negative
number
2
Overview
Introduction
4.5.7
For the full use of timers as numeric devices, refer to the explanation of applied instructions later.
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
101
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.6
Counter [C]
4.6.1
Numbers of counters
The table below shows counter (C) numbers. (Numbers are assigned in decimal.)
1. FX3S PLC
For high-speed counters, refer to Section 4.7.
16-bit up counter
Counting range: 0 to 32767
General type
General type
C0 to C15
16 points
C16 to C31
16 points
C200 to C234
35 points
2. FX3G/FX3GC PLCs
For high-speed counters, refer to Section 4.7.
16-bit up counter
Counting range: 0 to 32767
General type
General type
C0 to C15
16 points
C16 to C199
184 points
C200 to C219
20 points
C220 to C234
15 points
3. FX3U/FX3UC PLCs
For high-speed counters, refer to Section 4.8.
16-bit up counter
Counting range: 0 to 32767
General type
General type
C0 to C99
C100 to C199
C200 to C219
C220 to C234
100 points*1
100 points*2
20 points*1
15 points*2
*1.
This area is not latched (battery backed). It can be changed to a latched (battery backed) area by setting the
parameters.
*2.
This area is latched (battery backed). It can be changed to a non-latched (non-battery-backed) area by setting
the parameters.
Counter numbers not used as counters can be converted as data registers for storing numeric values.
4.6.2
Features of counters
The table below shows the features of 16-bit counters and 32-bit counters. They can be used in accordance with the
operating condition such as the counting direction switching and counting range, etc.
Item
Counting direction
102
16-bit counter
Up-counting
32-bit counter
Up-counting and down-counting can be switched (as
shown in Subsection 4.6.3)
Set value
1 to 32767
2,147,483,648 to +2,147,483,647
Output contact
Reset operation
When RST instruction is executed, current value of counter is reset to "0" and output contact returns
16 bits
32 bits
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Counting
direction
switching
relay
Counter No.
Counting
direction
switching
relay
C200
C201
M8200
C209
M8201
C210
M8209
C218
M8218
C227
M8227
M8210
C219
M8219
C228
C202
M8202
M8228
C211
M8211
C220
M8220
C229
C203
M8229
M8203
C212
M8212
C221
M8221
C230
M8230
C204
M8204
C213
M8213
C222
M8222
C231
M8231
C205
M8205
C214
M8214
C223
M8223
C232
M8232
C206
M8206
C215
M8215
C224
M8224
C233
M8233
C207
M8207
C216
M8216
C225
M8225
C234
M8234
C208
M8208
C217
M8217
C226
M8226
Devices
in Detail
The valid set range of 16-bit binary up counter is from K1 to K32767 (decimal constant).
K0 provides the same operation as K1, and the output contact turns on at the first counting.
Every time the coil C0 is driven by the counting input X011, the current value of the counter increases. When a coil
instruction is executed 10 times, the output contact turns on.
After that, the current value of the counter does not change even if the counting input X011 turns on after that.
When the RST input X010 turns ON and then RST instruction is executed, the current value of the counter is reset
to "0" and the output contact returns.
C 0
X011
C 0
Y000
K10
Current
value
10
7
Basic
Instruction
6
Before
Programming
X011
C 0
X010
5
Specified the
Device &
Constant
In general type counters, the counter value is cleared when the PLC turns off. In latch type counters, however, the
counter value just before power failure is stored (backed up by the battery); The counter value in the subsequent
operations can be added to the last counter value.
RST
X010
Instruction
List
Counter No.
Counting
direction
switching
relay
Overview
4.6.4
Counter No.
Counting
direction
switching
relay
Introduction
4.6.3
Y000
If data beyond the set value is written to the current value register by MOV instruction, etc., the OUT coil turns ON
and the current value register becomes the set value when the next counting input is received.
9
FNC10-FNC19
Move & Compare
For latched (battery backed) type counters, the current value, output contact operation and reset status are backed
up against power failure.
In FX3U/FX3UC PLCs, latched type counters are backed up by the battery built into the PLC.
In FX3S/FX3G/FX3GC PLCs, latched type counters are backed up by the EEPROM built into the PLC.
For details on backup methods against power failure, refer to Section 2.6.
8
FNC00-FNC09
Program Flow
The counter set value can be set by a constant (K) as shown above, or indirectly specified by a data register
number. For example, when D10 is specified and the contents of D10 are "123", it is equivalent to "K123".
10
FNC20-FNC29
Arith. & Logic
Operation
103
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
2. General type and latched (battery backed) type 32-bit bi-directional counters
The valid set range of 32-bit binary bi-directional counters is from 2,147,483,648 to +2,147,483,647 (decimal
constant). The counting direction (up or down) is specified by special auxiliary relays M8200 to M8234.
When M8UUU is driven for CUUU, a counter executes down-counting. When M8UUU is not driven, a counter
executes up-counting. (Refer to the previous page.)
The set value (positive or negative) can be specified by a constant (K) or the contents of data registers (D).
When data registers are used, 32-bit data composed of paired serial devices are treated as set values.
For example, when D0 is specified, D1 and D0 provide a 32-bit set value.
When the coil C200 is driven by the counting input X014, a counter starts up-counting or down-counting.
When the current value of a counter increases from "6" to "5", the output contact is set. When the current value
decreases from "5" to "6", the output contact is reset.
X012
X012
M8200
X013
RST
Up counting
Down counting
X014
C200
3
Current
2
value
1
0
X014
C200
Up counting
X013
K-5
45 4
C200
Y001
Y001
0
2
34
5
6
7
43
5
6
7
The current value increases or decreases regardless of the operation of the output contact. When a counter
executes up-counting from "+2,147,483,647", the counter value becomes "2,147,483,648". In the same way,
when a counter executes down-counting from "2,147,483,648", the counter value becomes "+2,147,483,647".
(This type of counter is called ring counter.)
When the reset input X013 turns ON and then RST instruction is executed, the current value of the counter is reset
to "0" and the output contact returns.
For latched (battery backed) type counters, the current value, output contact operation and reset status are backed
up against power failure.
In FX3U/FX3UC PLCs, latched type counters are backed up by the battery built into the PLC.
In FX3S/FX3G/FX3GC PLCs, latched type counters are backed up by the EEPROM built into the PLC.
For details on backup methods against power failure, refer to Section 2.6.
A 32-bit counter can be used as a 32-bit data register. 32-bit counters cannot be handled as target devices in 16-bit
applied instructions.
If data beyond the set value is written to the current value register by DMOV instruction, etc., the counter continues
counting and the contact does not change when the next counting input is received.
4.6.5
2)
K100
X001
FNC 12
MOV
K100
D 5
X003
C0
D5
D5 = 100
100 counts
104
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
1)
K43,210
FNC 12
DMOV
K43210
D5(D6)
X003
D5(D6)
Instruction
List
C200
4.6.6
2
Overview
2)
Introduction
2. 32-bit counter
16-bit
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
*1
7
Basic
Instruction
High
Low
16 bits
order
order
b15 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 b0
Sign
0: Positive
number
1: Negative
number
*1. The sign is valid only when a counter is handled as a substitute for data register.
32-bit
FNC00-FNC09
Program Flow
High
Low
32 bits
order
1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 order
0
1
0
1
0
1
0
1
0
1
0
1
0
1
0
1
b31
b0
9
FNC10-FNC19
Move & Compare
Sign
0: Positive
number
1: Negative
number
1,073,741,824
536,870,912
268,435,456
134,217,728
67,108,864
33,554,432
16,777,216
8,388,608
4,194,304
2,097,152
1,048,576
524,288
262,144
131,072
65536
32768
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
2)
6
Before
Programming
Counters use output contacts operating in accordance with the set value or use the counter value (current value) as
numeric data for control.
The figure below shows the structure of the current value register of a counter. When a counter number is specified in
an operand of an applied instruction in execution, the counter is handled as a device storing 16-bit or 32-bit data in the
same way as data register.
A 32-bit counter is handled as 32-bit data.
5
Specified the
Device &
Constant
4.6.7
4
Devices
in Detail
Counters execute counting by cyclic operating for contact operations of internal signals X, Y, M, S, C, etc. inside the
PLC.
For example, when X011 is specified as counting input, its ON duration and OFF duration should be longer than the
scan time of the PLC (which is tens of Hz or less usually).
On the other hand, high-speed counters described later execute counting as an interrupt processing for specific input,
and can execute counting at 5 k to 6 kHz regardless of the scan time.
For high-speed counters, refer to Section 4.7 or 4.8.
10
FNC20-FNC29
Arith. & Logic
Operation
105
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
C 20
D 10
FNC 10
CMP
K100
C 30
FNC 18
BCD
C 10 K2Y000
FNC 22
MUL
C 5
FNC 12
DMOV
C200 D0(D1)
FNC 11
DZCP
M 0
K 2
D4(D5)
*1
M10
*1. Make sure to use 32-bit operation instructions for 32-bit counters.
FNC 40
ZRST
C0
C100
RST
M0
K10
X000
C0
Timing chart
one operation one operation one operation one operation
cycle
cycle
cycle
cycle
ON
X000
ON
OFF
OFF
ON
M0
OFF
Current
value
of C0
Counting is
executed when
X000 is ON.
OUT instruction ZRST instruction OUT instruction OUT instruction
execution
execution
execution
execution
Program in the following way to disable counting after execution of the ZRST instruction:
Circuit program
M0
X000
106
FNC 40
ZRST
C0
C100
RST
M0
K10
C0
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.7.1
Introduction
4.7
Overview
The main unit has built-in 32-bit high-speed bi-directional counters (1-phase 1-count, 1-phase 2-count and 2-phase 2count). Some high-speed counters are capable of using an external reset input terminal and an external start input
terminal (for counting start).
UP/DOWN
+1
+1
UP
1
DOWN
A phase
2-phase
2-count input
A phase
+1
+1
B phase
Up-counting
Down-counting
7
Basic
Instruction
General-purpose inputs X000 to X007 are used for high-speed counter inputs. An encoder*1 adopting the output
method shown in the table below can be connected depending on the connected terminal.
Encoders adopting the voltage output method and absolute encoders cannot be connected to high-speed counter
inputs.
For the wiring, refer to the Hardware Edition of the main unit.
6
Before
Programming
B phase
5
Specified the
Device &
Constant
1-phase
2-count input
+1
4
Devices
in Detail
1-phase
1-count input
Counting direction
3
Instruction
List
*1.
8
FNC00-FNC09
Program Flow
A rotary encoder adopting the output method shown above may not operate correctly depending on the
electrical compatibility. Check the specifications before connecting an encoder.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
107
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1-phase
1-count input
1-phase
2-count input
Counter No.
C235
C236
C237
C238
C239
C240
C241
C242
C243
C244
C245
C246
C248(OP)*1
C247
C248
C249
C250
C251
Data length
2-phase
2-count input
External start
input terminal
Not provided
Not provided
Provided
Not provided
Provided
Provided
Not provided
Not provided
Provided
Not provided
Provided
Provided
Not provided
Not provided
Provided
Not provided
Provided
Provided
32-bit
bi-directional
counter
32-bit
bi-directional
counter
C253(OP)*1
C254(OP)*2
C252
C253
C254
C255
External reset
input terminal
32-bit
bi-directional
counter
*1.
C248 and C253 are usually used as counters having reset input, but can be used as counters C248 (OP) and
C253 (OP) not having reset input when used together with special auxiliary relays M8388 and M8392.
For the method to switch the counter function, refer to Subsection 4.7.6.
*2.
C254 is usually used as a counter having reset input and start input, but can be used as a counter C254 (OP)
not having reset input or start input when used together with special auxiliary relays M8388 and M8395.
This function is supported only in FX3G/FX3GC PLCs.
For the method to switch the counter function, refer to Subsection 4.7.6.
108
C248
C248(OP)
C253
C253(OP)
C254
C254(OP)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
FX3G/FX3GC PLCs
X000, X001, X003, X004: 10 s
X002, X005, X006, X007: 50 s
Input terminals not used for high-speed counters, however, can be used as general inputs.
For the input specifications of the main unit, refer to the Hardware Edition of the main unit.
X001
X002
U/D
U/D
R
U/D
C243
U/D
U/D
C246
C247
C248
C248(OP)
C253
C253(OP)
C254(OP)
A
A
D: Down-counting input
R: External reset input
B
S
Basic
Instruction
C255
U: Up-counting input
B: B phase input
Before
Programming
C251
C250
C252
S
U/D
Specified the
Device &
Constant
C245
C254
Devices
in Detail
U/D
C242
2-phase
2-count
input
C240
C249
X007
U/D
C239
C244
X006
U/D
C238
C241
X005
U/D
C237
1-phase
2-count
input
X004
U/D
C236
1-phase
1-count
input
X003
3
Instruction
List
C235
Overview
FX3S PLC
X000, X001: 10 s
X002, X003, X004, X005, X006, X007: 50 s
Counter No.
Introduction
4.7.2
A: A phase input
S: External start input
8
FNC00-FNC09
Program Flow
Inputs X000 to X007 are used for high-speed counters, input interrupt, pulse catch, SPD/ZRN/DSZR instructions and
general-purpose inputs. When assigning functions, there should be no overlap between those input terminals.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
109
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.7.3
4.7.4
HSCS
HSCR
6 instructions
HSZ
4.7.5
Related devices
1. Devices used to switch the counting direction of 1-phase 1-count input counters
Type
1-phase
1-counting input
110
Counter No.
Specifying device
C235
M8235
C236
M8236
C237
M8237
C238
M8238
C239
M8239
C240
M8240
C241
M8241
C242
M8242
C243
M8243
C244
M8244
C245
M8245
Up-counting
Down-counting
OFF
ON
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
Type
1-phase
2-counting input
Monitoring device
C246
M8246
C247
M8247
C248
M8248
C249
M8249
C250
M8250
C251
M8251
C252
M8252
C253
M8253
C254
M8254
C255
M8255
OFF
ON
2
Up-counting
Overview
2-phase
2-counting input
Counter No.
Introduction
2. Devices used to check the counting direction of 1-phase 2-count input counters and
2-phase 2-count input counters
Down-counting
3
Instruction
List
4.7.6
Description
Function switching
device
Devices
in Detail
M8395
Name
Counter No.
M8388
C248(OP)
M8392
C253(OP)
M8392
M8395
C254(OP)
K{{{
8
FNC00-FNC09
Program Flow
C254
7
Basic
Instruction
K{{{
C253
M8388
Before
Programming
K{{{
C248
M8388
Description
5
Specified the
Device &
Constant
When the counters C248, C253 and C254 are combined with the following special auxiliary relays, the allocation of the
input terminals and functions are changed.
In a program, put a special auxiliary relay just before a target counter.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
111
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.7.7
In FX3S PLC
Counter type
1-phase
1-counting
input
1-phase
2-counting
input
2-phase
2-counting
input
*2.
Response
frequency
60kHz
10kHz
C246
60kHz
200 kHz
C247, C248,
C248(OP), C249,
C250
10kHz
C251
30kHz
5kHz
60 kHz
- Number of positioned axes*2 x 5 kHz
In FX3G/FX3GC PLCs
Counter type
Response
frequency
60kHz
10kHz
1-phase
2-counting
input
C246, C248(OP)
60kHz
C247, C248,
C249,C250
10kHz
2-phase
2-counting
input
C251, C253(OP)
30kHz
5kHz
1-phase
1-counting
input
*3.
200 kHz
- (Number of positioned axes*3
+ Number of pulse width/period
measurement inputs)
x 40 kHz
60 kHz
- (Number of positioned axes*3 x 5 kHz)
- (Number of pulse width/period
measurement inputs x 20 kHz)
Total frequency [(Sum of used frequency of 1-phase counters) + (Sum of used frequency of 2-phase counters)]
112
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
Example1: When the HSCS, HSCR or HSZ instruction is not used, and the instructions related to the number of
positioning axes (DRVI instruction [Y000], DRVA instruction [Y001]) are used in the FX3G PLC
Introduction
3. Calculation example
C235(1-phase 1-counting)
50 kHz is input.
C236(1-phase 1-counting)
50 kHz is input.
C237(1-phase 1-counting)
10 kHz is input.
C253(2-phase 2-counting)
5 kHz is input.
Total
2
Overview
<Counter No.>
C235(1-phase 1-counting)
50 kHz is input.
C236(1-phase 1-counting)
50 kHz is input.
Total
4
Devices
in Detail
<Counter No.>
Instruction
List
Example2: When the HSCS, HSCR or HSZ instruction is not used, and instructions related to the number of
positioning axes (DRVI instruction [Y000]) and the number of pulse width/pulse period measurement inputs
[X003] are used in the FX3G PLC
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
113
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.7.8
Cautions on use
For a contact to drive the coil of a high-speed counter, use a contact which is normally ON during high-speed
counting.
Example: M8000 (RUN monitor NO contact)
X000
C235
Program a contact which is
normally ON during counting.
If the operation of a high-speed counter is triggered by a device such as a switch, the counter may malfunction due
to extra noise from switch chattering or contact bounce.
The input filter of an input terminal for a high-speed counter in the main unit is automatically set to 10 s or 50 s.
Accordingly, it is not necessary to use special data register D8020 (input filter adjustment).
The input filter for input relays not being used for high-speed counters remains at 10 ms (initial value).
The inputs X000 to X007 are used for high-speed counters, input interrupt, pulse catch, SPD/DSZR/ZRN
instructions and general-purpose inputs. There should be no overlap between each input number.
When a counting pulse is not provided, none of the high-speed counter output contacts will turn ON, even if the
PLC executes an instruction where "present value = set value".
Counting may be started or stopped for a high-speed counter when the output coil (OUT C***) is set to ON or OFF.
Program this output coil in the main routine. If the output coil is programmed in a step ladder (SFC) circuit,
subroutine or interrupt routine, counting cannot be started or stopped until the step ladder or routine is executed.
Make sure that the signal speed for high-speed counters does not exceed the response frequency described
above. If an input signal exceeds the response frequency, a WDT error may occur, or the communication functions
such as a parallel link may malfunction.
The response frequency changes depending on the number of used counters, but the input filter value is fixed to 10
s or 50 s. Note that noise above the response frequency may be counted depending on the filter value of the
used input.
When a high-speed counter is reset by the RST instruction, it cannot count until the RST instruction is set to OFF.
1)
Program example
X010
RST
2)
C235
Timing chart
X000
Current
value of C235
3
2
3
2
1
X010
RST
C235
114
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1)
Program example
X010*1
2)
K0
C235
When the driving contact is the continuous execution type, the current value of the counter is reset to "0"
at each scan while X010 remains ON.
Timing chart
X000
3
1
3
1
Instruction
List
Current
value of C235
X010
Devices
in Detail
Write the following program to "turn OFF the contact and reset the current value of a high-speed counter".
Program example
X010*2
M8001
RST
C235
----- A
RST
C235
----- B
Specified the
Device &
Constant
1)
2)
When the driving contact is the continuous execution type, the current value of the counter is reset to "0"
and the counter reset status is cleared at each scan while X010 remains ON.
Timing chart
Before
Programming
RUN Monitor
(normally OFF)
*2.
Overview
*1.
FNC 12
DMOV
1
Introduction
Write the following program to "reset only the current value of a high-speed counter (and does not turn OFF the
contact)".
X000
Basic
Instruction
Current
value of C235
2
1
2
1
X010
8
FNC00-FNC09
Program Flow
RST
C235
Counter is reset
(part A in above
program).
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
115
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.8
4.8.1
These types of counters execute counting by hardware, but may be switched to software
counters depending on the operating condition.
For the condition handled as software counters, refer to Subsection 4.8.9.
Software counters:
Counting direction
Down-count or up-count is specified by
turning on or off M8235 to M8245.
ON: Down-counting
OFF: Up-counting
UP/DOWN
+1
+1
+1
UP
1-phase
2-count input
DOWN
A phase
1 edge
count
A phase
+1
+1
B phase
1 1 1 1 1
+1 +1 +1 +1 +1
A phase
4 edge
count
Down-counting
Up-counting
2-phase
2-count
input
B phase
A phase
B phase
B phase
+1 +1 +1 +1
Up-counting
1 1 1 1
Down-counting
*1.
116
A rotary encoder adopting the output method shown above may not operate correctly depending on the
electrical compatibility. Check the specifications before connecting an encoder.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
Classification
Counter No.
External reset
input terminal
External start
input terminal
Not provided
Not provided
Provided*5
Not provided
Provided*5
Provided
Not provided
Not provided
Provided*5
Not provided
Provided*5
Provided
Edge count
Data length
C235*2
C236*2
C237*2
C238*2
C239*2
C240*2
1-phase
1-count input
C244(OP)*3
C245(OP)*3
C241
C242
C243
C244*3
C245*3
Hardware counter*1
1-phase
2-count input
Software counter
C246*2
C248(OP)*2*3
C247
C251*2
Hardware
counter*1
C253*2
C252
Software counter
C253(OP)*6
C254
C255
32-bit
bi-directional
counter
1*4
Not provided
4*4
Not provided
1*4
4*4
1*4
4*4
1*4
Provided*5
32-bit
bi-directional
counter
Provided*5
Not provided
Not provided
4*4
1*4
Provided*5
4*4
Provided
*3.
C244, C245 and C248 are usually used as software counters, but can be used as hardware counters C244
(OP), C245 (OP) and C248 (OP) by combining a special auxiliary relay (M8388, M8390 to M8392).
For the method to switch the counter function, refer to Subsection 4.8.7.
*4.
2-phase 2-input counter is usually 1 edge count counter, but can be used as a 4 edge count counter by
combining a special auxiliary relay (M8388, M8198 or M8199).
For the method to use a 2-phase 2-input 4 edge count counter, refer to Subsection 4.8.8.
*5.
The external reset input is usually reset by turning ON, but can be changed to be reset by turning OFF by
combining special auxiliary relays (M8388 and M8389).
For the method to change the logic of the external reset input, refer to Subsection 4.8.6.
*6.
The counter C253 is usually used as a hardware counter, but can be used as the counter C253 (OP) not
equipped with reset input by combining special auxiliary relays (M8388 and M8392).
In this case, C253 (OP) is handled as a software counter.
8
FNC00-FNC09
Program Flow
*2.
Basic
Instruction
They are handled as software counters depending on the operating condition. When they are handled as
software counters, they have limitations on both maximum response frequency and total frequency.
For the condition handled as software counters, refer to Subsection 4.8.9.
For the total frequency, refer to Subsection 4.8.10.
Before
Programming
*1.
Specified the
Device &
Constant
2-phase
2-count input
Devices
in Detail
C248*3
C249
C250
32-bit
bi-directional
counter
Instruction
List
Software counter
Overview
Hardware counter*1
Introduction
C244
C244(OP)
C248
C248(OP)
C245
C245(OP)
C253
C253(OP)
FNC10-FNC19
Move & Compare
For some high-speed counters in FX3U and FX3UC PLCs, the assignment of input terminals will switch when special
auxiliary relays are used.
Such high-speed counter devices are classified below. Note that description as (OP) is not available in programming.
10
FNC20-FNC29
Arith. & Logic
Operation
117
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.8.2
1-phase
1-count
input
1-phase
2-count
input
2-phase
2-count
input*4
Classification
X000
C235*1
H/W*2
U/D
C236*1
H/W*2
C237*1
H/W*2
C238*1
H/W*2
C239*1
H/W*2
C240*1
H/W*2
C241
S/W
C242
S/W
C243
S/W
C244
S/W
C244(OP)*3
H/W*2
X001
U/D
R
U/D
U/D
S
U/D
H/W*2
S/W
C248
S/W
C248(OP)*1*3
H/W*2
C249
S/W
C250
S/W
C251*1
H/W*2
C252
S/W
C253*1
H/W*2
U/D
S
U/D
S
S
S/W
S/W
X007
C247
C255
X006
U/D
U/D
C246*1
S/W
X005
U/D
S/W
C254
X004
U/D
H/W*2
C253(OP)
X003
U/D
C245
*3
X002
U/D
C245(OP)*3
118
Counter No.
U: Up-counting input
R: External reset input
D: Down-counting input
S: External start input
*1.
*2.
Hardware counters are switched to software counters when a comparison set/reset instruction for high-speed
counter (DHSCS, DHSCR, DHSZ or DHSCT) is used.
The counter C253 is switched to a software counter when the logic of the external reset input signal is
reversed.
For the condition under which it is handled as a software counter, refer to Subsection 4.8.9.
*3.
When a special auxiliary relay is driven in a program, the input terminals and their associated functions are
switched.
For the method to use a software counter as a hardware counter, refer to Subsection 4.8.7.
*4.
In a 2-phase 2-count input counter, the edge count is usually 1. But the edge count can be set to 4 by
combining a special auxiliary relay.
For the method on how to use a 2-phase 2-count input counter with on edge count of 4,
refer to Subsection 4.8.8.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
Inputs X000 to X007 are used for high-speed counters, input interrupt, pulse catch, SPD/ZRN/DSZR/DVIT
instructions and general-purpose inputs. When assigning functions, there should be no overlap between those
input terminals.
4.8.3
Down/up count
M8235
X011
RST
Reset
C235
X012
K-5
C235
Down/up count
M8244
X011
RST
X012
Reset
C244
D0(D1)
C244
Up counting
X011
Reset input
X012
Start input
Before
Programming
Operation example
The counter C235 shown above operates as follows:
X010
Up counting
Down counting
3
C235
2
Current 1
value 0
Basic
Instruction
X000
Counting
input
5
Specified the
Device &
Constant
4
Devices
in Detail
X010
3
Instruction
List
X010
2
Overview
Since the FX3U-4HSX-ADP and FX3UC PLC main unit share the same assigned input terminal numbers, only one of
them may be used in operation. If both input terminals are used, intended operation is not enabled because the
inputs of the FX3U-4HSX-ADP and PLC main unit operate in an "OR" relationship.
Introduction
6
7
4
5
8
FNC00-FNC09
Program Flow
When counting with input X000, C235 executes up-count or down-count as an interrupt.
10
FNC20-FNC29
Arith. & Logic
Operation
119
FNC10-FNC19
Move & Compare
When the current value of a counter increases from "6" to "5", the output contact is set. When the current value
decreases from "5" to "6", the output contact is reset.
The current value increases or decreases regardless of the operation of the output contact. When a counter
executes up-count from "+2,147,483,647", the counter value becomes "2,147,483,648". In the same way, when a
counter executes down-count from "2,147,483,648", the counter value becomes "+2,147,483,647". (This type of
counter is called a ring counter.)
When the reset input X011 turns ON and RST instruction is executed, the current value of the counter is reset to "0"
and the output contact is restored.
In a latch type high-speed counter, the current value, output contact operation and reset status of the counter are
latched (battery backed) by the backup battery built in the PLC.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
4 Devices in Detail
4.8 High-Speed Counter [C] (FX3U/FX3UC PLC)
C246
D2(D3)
Set value is (D3,D2)
X011
RST
C249
X012
C249
K1234
While X012 is ON, C246 executes up-count when the input X000
turns from OFF to ON, and executes down-count when the input
X001 turns from OFF to ON.
The up/down-count operation of C246 to C250 can be checked with
M8246 to M8250.
ON status: Down-counting
OFF status: Up-counting
While X012 is ON, C249 immediately starts counting when the input
X006 turns ON.
The up-count input is X000, and the down-count input is X001.
A high-speed counter can be reset by X011 in a sequence as shown
in the figure, but C249 is immediately reset without any program
when X002 is closed. So a program with X011 is not necessary.
The up/down-count operation of C246 to C250 can be checked with
M8246 to M8250.
ON status: Down-counting
OFF status: Up-counting
C251
K1234
C251
Y002
Y003
X011
X012
C254
C254
D0(D1)
Y004
When the current value becomes equivalent to or larger than the set
value (D1, D0), Y004 turns ON. When the current value becomes
equivalent to or smaller than the set value, Y004 turns OFF.
Y005
C254
M8254
120
When the current value becomes equivalent to or larger than the set
value, Y002 turns ON. When the current value becomes equivalent
to or smaller than the set value, Y002 turns OFF.
Y003 turns ON (for down-count) or OFF (for up-count) according to
the counting direction.
M8251
RST
While X012 is ON, C251 counts the operation of the inputs X000 (A
phase) and X001 (B phase) as interrupt.
When X011 turns ON a RST instruction is executed and C251 is
reset.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
A phase
A phase
+1
+1
B phase
B phase
Overview
Down-counting
Up-counting
- When the counter is operating at the 4 edge count
1 1 1 1 1
+1 +1 +1 +1 +1
A phase
A phase
B phase
B phase
1 1 1 1
Down-counting
Instruction
List
+1 +1 +1 +1
Up-counting
The down/up-count operation of C251 to C255 can be checked with M8251 to M8255.
ON status: Down-counting
OFF status: Up-counting
4.8.4
A high-speed counter executes up-count or down-count when a pulse is input to its input terminal, but the current
value is updated at the timing shown in the table below. When using the current value of a hardware counter in a MOV,
CMP or applied instruction such as the comparison instruction, special care must be taken since the current value
update timing is affected by the ladder scans as shown in the table.
Current value update timing
When OUT or HCMOV instruction is executed for the counter
Software counter
HSCS
HSCR
HSZ*2
HSCT*2
*2.
8
FNC00-FNC09
Program Flow
7
Basic
Instruction
Using comparison instructions for high-speed counters (HSCS, HSCR, HSZ or HSCT)
The comparison instructions for high-speed counters (HSCS, HSCR, HSZ and HSCT) execute a comparison and
output the comparison result during high-speed counting. These instructions have limitations on the number of
simultaneously driven instructions as shown in the following table. The HSCT instruction can only be used once in
any program.
When an output relay is specified for the comparison result, the comparison result is directly updated at the ON/
OFF status of the output regardless of the output refresh by END instruction.
Mechanical operation delay (about 10 ms) cannot be avoided in a relay output type PLC. Use a transistor output
type PLC.
6
Before
Programming
The following two methods are available to compare and output the current value of a high-speed counter.
1) Using the comparison instruction (CMP), zone comparison instruction (ZCP) or comparison contact instruction
When the comparison result is necessary during counting operation*1, comparison may be executed in the main
program if the HCMOV instruction is used just before the comparison instruction (CMP or ZCP) or comparison
contact instruction.
*1.
If it is necessary to execute comparison to update an output contact with the high-speed counter's
changing value, use comparison instructions for high-speed counters (HSCS, HSCR, HSZ or HSCT).
Instruction
5
Specified the
Device &
Constant
Hardware counter
Devices
in Detail
2)
Introduction
A 2-phase encoder generates outputs for the A phase and B phase by a phase difference of 90. With these
outputs, a high-speed counter automatically executes up-count and down-count as shown in the figure below.
- When the counter is operating at the 1 edge count
9
FNC10-FNC19
Move & Compare
When HSZ or HSCT instruction is used, the maximum response frequency and total frequency of all
software counters are affected.
For the maximum response frequency and total frequency of software counters,
refer to Subsection 4.8.10.
10
FNC20-FNC29
Arith. & Logic
Operation
121
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.8.5
Related devices
1. Devices used to switch the counting direction of 1-phase 1-count input counters
Type
Counter No.
Specifying device
C235
M8235
C236
M8236
C237
M8237
C238
M8238
C239
M8239
C240
M8240
C241
M8241
C242
M8242
C243
M8243
C244
M8244
C245
M8245
1-phase
1-counting input
Up-counting
Down-counting
OFF
ON
2. Devices used to check the counting direction of 1-phase 2-count input counters and
2-phase 2-count input counters
Type
Counter No.
Monitoring device
C246
M8246
C247
M8247
C248
M8248
C249
M8249
C250
M8250
C251
M8251
C252
M8252
C253
M8253
C254
M8254
C255
M8255
1-phase
2-counting input
2-phase
2-counting input
OFF
ON
Up-counting
Down-counting
Name
Description
M8388
M8389
M8390
M8391
M8392
M8198
Switches the edge count (between 1 and 4) of C251, C252 and C254.
(For details, refer to Subsection 4.8.8.)
M8199
Switches the edge count (between 1 and 4) of C253, C255 and C253 (OP).
(For details, refer to Subsection 4.8.8.)
Description
Operation status of C236
M8382*1
M8384*1
Operation
status flag
M8385*1
M8386*1
M8387*1
*1.
ON
OFF
Operation status of C235, C241, C244, C246, C247, C249, C251, C252 or C254
M8381*1
M8383*1
122
Name
*1
Software
counter
Hardware
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
M8388
M8389
C241 to C245
C247 to C250
C252 to C255
K{{{
C2
Description
The logic of the external reset input is inverted
so that the counters are reset when the input
turns OFF.
(The logic is inverted for all target counters.)
The counter C253 is switched to a software counter when the logic of the external reset input signal is inverted.
4.8.7
Counter No.
M8388
M8390
K{{{
C244
M8388
M8391
C245(OP)
M8388
M8392
C248(OP)
M8388
M8392
C253(OP)
8
FNC00-FNC09
Program Flow
K{{{
C253
Basic
Instruction
K{{{
C248
Before
Programming
K{{{
C245
Description
Specified the
Device &
Constant
C244(OP)
4
Devices
in Detail
The assignment of the input terminal and the function of the software counters C244, C245, C248 and C253 are
changed as shown below when combined with the following special auxiliary relays.
In a program, put a special auxiliary relay just before a target counter.
3
Instruction
List
Caution
2
Overview
Counter No.
Introduction
4.8.6
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
123
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.8.8
Description
M8000
M8198
C251
K{{{
C251
1 edge count (before change)
M8000
M8198
C252
K{{{
C252
M8000
M8199
C253
K{{{
C253
A phase
+1
Up-counting
A phase
Down-counting
+1 +1 +1 +1 +1
A phase
M8392
K{{{
C253
M8198
K{{{
C254
M8000
M8199
C255
124
B phase
+1 +1 +1 +1
Up-counting
1 1 1 1 1
M8000
C254
B phase
M8199
M8388
M8000
C253(OP)
+1
B phase
K{{{
C255
A phase
B phase
1 1 1 1
Down-counting
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Hardware
counter No.
K{{{
C235
4
Devices
in Detail
DHSCS K100
C235 Y000
When an index register is used for a counter number specified in DHSCS (FNC 53), DHSCR
(FNC 54), DHSZ (FNC 55) or DHSCT (FNC280) instruction, all hardware counters are handled as software
counters.
Example: C235Z0
C253 (hardware counter) is handled as a software counter by inverting the logic using the external reset input
signal logic changing function.
Example: The logic of the C253 external reset input signal is inverted.
For logic inversion of the external reset input signal, refer to Subsection 4.8.6.
6
Before
Programming
M8388
5
Specified the
Device &
Constant
3
Instruction
List
Because hardware counters execute counting at the hardware level of the FX3U/FX3UC, they can execute counting
regardless of the total frequency.
However, when hardware counters are handled as software counters with the following conditions, their maximum
response frequency and total frequency are limited in the same way as the software counters.
Use M8380 to M8387 to verify that high-speed counters are handled as hardware counters or software counters.
When DHSCS (FNC 53), DHSCR (FNC 54), DHSZ (FNC 55) or DHSCT (FNC280) instruction is used for a
hardware counter number, the hardware counter is handled as a software counter.
Example: C235
C235
C236
C237
C238
C239
C240
C244(OP)
C245(OP)
C246
C248(OP)
C251
C253
2
Overview
Introduction
4.8.9
M8389
K{{{
C253
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
125
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.8.10
Main unit
Counter No.
1 edge count
4 edge count
FX3U-4HSX-ADP
100 kHz
C244(OP), C245(OP)
10 kHz
C246, C248(OP)
100 kHz
C251, C253
200 kHz
50 kHz
100 kHz
50 kHz
100 kHz
1)
Software
counter
Counter type
1-phase
1-counting
input
1-phase
2-counting
input
Following
software
counter with
HSCS, HSCR,
HSZ or HSCT
instruction*1
C244(OP),
C245(OP)
1 edge
2count C252,
phase
C253(OP),
2count- 4 edge C254,
ing
count C255
input
126
Magnification for
calculating
total
frequency
Maximum
Maximum
Total
Total
response
response
frequency
frequency
frequency
frequency
(kHz)
(kHz)
(kHz)
(kHz)
40
30
10
10
40
40
80
30
10
Maximum
response
frequency
(kHz)
40 - (Number of
instruc60
tion)*2
30
C251, C253
4
7.5
(40-Number of
instruction) 4
Total
frequency
(kHz)
80
1.5(Num
ber of
instruction)
30-(Number
of instruction)*2
Total
frequency
(kHz)
60
1.5(Num
ber of
instruction)
(30-Number
of instruction) 4
*1.
When an index register is added to a counter number specified by a HSCS, HSCR, HSZ or HSCT instruction,
all hardware counters are switched to software counters.
*2.
The high-speed counters C244 (OP) and C245 (OP) can count up to 10 kHz.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
When special analog adapters and FX3U/FX3UC Series special function units/blocks are used
Counter type
Software
counter
Following
software
counter with
HSCS, HSCR,
HSZ or HSCT
instruction*1
C244(OP),
C245(OP)
1 edge
2count
phase
2count- 4 edge
ing
count
input
C252,
C253(OP),
C254,
C255
Maximum
Maximum
Total
Total
response
response
frequency
frequency
frequency
frequency
(kHz)
(kHz)
(kHz)
(kHz)
Maximum
response
frequency
(kHz)
Total
frequency
(kHz)
30
25
10
10
30 - (Number of
instruc-
25
tion)*2
30
30
25
7.5
6.2
60
50
C251, C253
50
1.5(Num
ber of
instruction)
(30-Number of
instruction) 4
25-(Number
of instruction)*2
Total
frequency
(kHz)
50
1.5(Num
ber of
instruction)
(25-Number
of instruction) 4
When an index register is added to a counter number specified by a HSCS, HSCR, HSZ or HSCT instruction,
all hardware counters are switched to software counters.
*2.
The high-speed counters C244 (OP) and C245 (OP) can count up to 10 kHz.
4
Devices
in Detail
*1.
Instruction
List
Magnification for
calculating
total
frequency
Overview
1-phase
1-counting input
Introduction
2)
Total frequency Sum of "Response frequency of high-speed counter Magnification for calculating total frequency"
When only HSZ instruction is used 6 times in a program, the total frequency and response frequency are calculated as
follows in accordance with the columns for "When only HSZ instruction is used" shown above.
This calculation example is provided for a system configuration not including special analog adapters and FX3U/FX3UC
Series special function units/blocks.
C237
Operates as
software counter
C241
Software counter
30 kHz
40 6 (times) = 34 kHz
20 kHz
40 6(times) = 34 kHz
4 kHz
Used
instruction
HSZ
instruction 6
times
7
Basic
Instruction
C253(OP)
[4 edge count]
Input
frequency
6
Before
Programming
Magnification for
calculating total
frequency
Specified the
Device &
Constant
4. Calculation example
1) The total frequency is calculated as follows because HSZ instruction is used 6 times:
Total frequency
= 80 1.5 6 = 71 kHz
2) The sum of the response frequencies of the high-speed counters
being used is calculated as follows:
"30 kHz 1[C237]" + "20 kHz 1[C241]" + "4kHz 4[C253(OP)]" = 66 kHz 71 kHz
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
127
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.8.11
Cautions on use
For a contact to drive the coil of a high-speed counter, use a contact which is normally ON during high-speed
counting.
Example: M8000 (RUN monitor NO contact)
X000
C235
Program a contact which is
normally ON during counting.
If the operation of a high-speed counter is triggered by a device such as a switch, the counter may malfunction due
to extra noise from switch chattering or contact bounce.
The input filter of an input terminal for a high-speed counter in the main unit is automatically set to 5 s (X000 to
X005) or 50 s (X006 and X007).
Accordingly, it is not necessary to use the REFF instruction or special data register D8020 (input filter adjustment).
The input filter for input relays not being used for high-speed counters remains at 10 ms (initial value).
The inputs X000 to X007 are used for high-speed counters, input interrupt, pulse catch, SPD/DSZR/DVIT/ZRN
instructions and general-purpose inputs. There should be no overlap between each input number.
When a counting pulse is not provided, none of the high-speed counter output contacts will turn ON, even if the
PLC executes an instruction where "present value = set value".
Counting may be started or stopped for a high-speed counter when the output coil (OUT C***) is set to ON or OFF.
Program this output coil in the main routine. If the output coil is programmed in a step ladder (SFC) circuit,
subroutine or interrupt routine, counting cannot be started or stopped until the step ladder or routine is executed.
Make sure that the signal speed for high-speed counters does not exceed the response frequency described
above. If an input signal exceeds the response frequency, a WDT error may occur, or communication functions
such as a parallel link may malfunction.
The response frequency changes depending on number of used counters, but the input filter value is fixed to 5 s
(X000 to X005) or 50 s (X006 and X007).
Note that noise above the response frequency may be counted depending on the filter value of the used input.
When a high-speed counter is reset by the RST instruction, it cannot count until the RST instruction is set to OFF.
1)
Program example
X010
X010
2)
RST
RST
C235
C235
C235
C235isisreset
resetwhile
whileX010
X010turns
turnsON.
ON.
Timing chart
X000
Current
value of C235
X010
RST
C235
128
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1)
Program example
X010*1
2)
K0
C235
When the driving contact is the continuous execution type, the current value of the counter is reset to "0"
at each scan while X010 remains ON.
Timing chart
X000
3
1
3
1
Instruction
List
Current
value of C235
X010
4
Devices
in Detail
Write the following program to "turn OFF the contact and reset the current value of a high-speed counter".
Program example
X010*2
M8001
RST
C235
----- A
RST
C235
----- B
Specified the
Device &
Constant
1)
2)
When the driving contact is the continuous execution type, the current value of the counter is reset to "0"
and the counter reset status is cleared at each scan while X010 remains ON.
Timing chart
Before
Programming
RUN Monitor
(normally OFF)
*2.
Overview
*1.
FNC 12
DMOV
1
Introduction
Write the following program to "reset only the current value of a high-speed counter (and does not turn OFF the
contact)".
X000
Basic
Instruction
Current
value of C235
X010
8
FNC00-FNC09
Program Flow
RST
C235
Counter is reset
(part A in above
program).
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
129
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.9
4.9.1
1. FX3S PLC
Data registers
General type
Fixed latched
(EEPROM keep) type
General type
Special type
File registers
(latched (EEPROM
keep) type)
D0 to D127
128 points
D128 to D255
128 points
D256 to D2999
2744 points
D8000 to D8511
512 points
General type
Special type
File registers
(latched (EEPROM
keep) type)
D1100 to D7999
D8000 to D8511
512 points
2. FX3G/FX3GC PLCs
Data registers
General type
Fixed latched
(EEPROM keep) type
D0 to D127
128 points
D128 to D1099
972 points
6900 points*2
3. FX3U/FX3UC PLCs
Data registers
General type
Latched
(battery backed) type
(backed up by battery
against power failure)
Fixed latched
(battery backed) type
(backed up by battery
against power failure)
D0 to D199
D200 to D511
D512 to D7999
200 points*3
312 points*4
7488 points*1*5
Special type
File registers
(latched (battery
backed) type)
D8000 to D8511
512 points
*1.
Data registers D1000 and later can be used as file registers in units of 500 points by setting parameters.
*2.
These registers can be changed to the latched type by the parameter setting when the optional battery is
used. However, the latched range cannot be set.
*3.
This area is not latched (battery backed). It can be changed to the latched (battery backed) area by setting
parameters.
*4.
This area is latched (battery backed). It can be changed to the non-latched (non-battery-backed) area by
setting parameters.
*5.
When N : N Network or parallel link is used, some data registers are occupied for the link.
Refer to the Data Communication Edition.
130
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Introduction
16-bit type
One (16-bit) data register or file register can store a numeric value ranging from -32,768 to +32,767.
D 0 (16 bits)
High
Low
order 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 order
b15
b0
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
Overview
Sign
0: Positive
number
1: Negative
number
2)
D1 (high-order 16 bits)
D0 (low-order 16 bits)
High
Low
order 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 order
b31
b0
5
Specified the
Device &
Constant
Sign
0: Positive
number
1: Negative
number
4
Devices
in Detail
32-bit type
Two serial data registers or file registers can express 32-bit data.
- A data register with a larger device number handles high-order bits, and a data register with a smaller device
number handles low-order bits.
- In the index type, V handles high-order bits, and Z handles low-order bits.
Two data registers or file registers can store a numeric value ranging from -2,147,483,648 to +2,147,483,647.
3
Instruction
List
A numeric value can be read from or written to a data register by an applied instruction usually.
Or a numeric value can be directly read from or written to a data register from a display unit, display module, or
programming tool.
1,073,741,824
536,870,912
268,435,456
134,217,728
67,108,864
33,554,432
16,777,216
8,388,608
4,194,304
2,097,152
1,048,576
524,288
262,144
131,072
65536
32768
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
4.9.2
4 Devices in Detail
6
Before
Programming
In the case of 32-bit type, when a data register or file register on the low-order side (example: D0) is specified, the
subsequent number on the high-order side (example: D1) is automatically occupied.
Either an odd or even device number can be specified for the low-order side, but it is recommended to specify an
even device number for the low-order side under consideration of the monitoring function of display units, display
modules, and programming tools.
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
131
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.9.3
FNC 40
ZRST
D512
D999
FNC 12
MOV
FNC 07
WDT
K250
D8000
For the data backup characteristics of special data registers, refer to Section 2.6 and Chapter 37.
For the types and functions of special data registers, refer to Chapter 37.
132
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
Data registers can be used in various control with numeric data.
This section explains the operations of representative basic instructions and applied instructions among various
applications.
For the full use of data registers, refer to the explanation of applied instructions later.
1)
Overview
D0
C 10
D 20
3
Instruction
List
2)
D 5
C 2
4
Devices
in Detail
C 10
D 4
K200
D 10
Specified the
Device &
Constant
16-bit
FNC 12
MOV
32-bit
K80000 D10(D11)
6
Before
Programming
FNC 12
DMOV
Introduction
3. Operation examples
3)
D 10
D 20
T 10
FNC 12
MOV
T 10
C 20
C 20
K300
8
FNC00-FNC09
Program Flow
FNC 12
MOV
Basic
Instruction
FNC 12
MOV
9
FNC10-FNC19
Move & Compare
As in the case of data registers, when 16-bit timers or counters are used as 32-bit devices, two timers or two
counters (example: C1 and C0) store 32-bit numeric data.
One 32-bit counter (example: C200) can store 32-bit numeric data.
10
FNC20-FNC29
Arith. & Logic
Operation
133
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.9.4
Inside system
RAM
D0
Data
memory
When power
is turned ON
When PLC
Data register
mode is
changed D1000
from STOP
Data register Write
to RUN
[B]
Read
D7999
Data register
The remaining area can be used as data registers for general purpose.
Transferred contents
Remarks
BMOV instruction
Applied
Data can be read from and written to the data
instructions other
register area [B] inside the image memory in the
than BMOV
same way as general data registers.
instruction
The data stored in data registers set as file registers are automatically copied from the file register area [A] to the
data register area [B] when restoring the power.
When a file register is monitored from peripheral equipment, the data register area [B] inside the data memory is
read.
When "file register device current value change", "file register device forced reset" or "PLC memory all clear" is
executed from peripheral equipment, the file register area [A] inside the program memory is changed, and then the
data is automatically transferred to the data register area [B].
Accordingly, when file registers are to be overwritten, the program memory should be "built-in memory" or "memory
cassette whose protect switch is set to OFF". (The memory cassette cannot be overwritten from peripheral
equipment if its protect switch is set to ON.)
134
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Program
memory
Data
memory
Program/
comment
Data register
OFF
S
X002
D1100 D1100
Read
FNC 15
BMOVP
D1100
BMOV
direction
M8024
inverse:
OFF
n
D
D1100
K400
Data register
[B]
D1499 D1499
Data register
D7999
Inside built-in
memory or
memory cassette
D0
Program
memory
Data
memory
Program/
comment
Data
register
X001
ON
S
X003
D1100 D1100
Write
Data
register
D1499 D1499
[B]
File
register
[A]
Data register
FNC 15
BMOVP
D1100
BMOV
direction
M8024
inverse:
ON
n
D
D1100
K400
Specified the
Device &
Constant
D1000
500 points
14 blocks
maximum
(7000 points
maximum)
Inside system
RAM
4
Devices
in Detail
Write
Instruction
List
D1000
500 points
File register
14 blocks
[A]
maximum
(7000 points
maximum)
Read
Overview
Inside built-in
memory or
memory cassette
Introduction
2. File register Data register <updating the same number registers by BMOV (FNC 15)
instruction>
BMOV
M8024 direction
inverse:
OFF
When S
and D
are indexed, the instruction is executed if the actual device number is within the file
register area and if the number of transfer points is within the file register area also.
7
Basic
Instruction
register numbers at S
and D
are equal to each other. Also make sure that the number of transfer points
specified by "n" does not exceed the file register area. If the number of transfer points exceeds the file register area,
an operation error occurs and the instruction is not executed.
Before
Programming
D7999
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
135
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Inside built-in
memory or
memory cassette
Inside system
RAM
D0
Program
memory
D1000
500 points
14 blocks
maximum
(7000 points
maximum)
D200
X001
FNC 15
BMOVP
D599
Data register
D1100
File register
D1100
Write
Program/
comment
Data
memory
M8024
OFF
Data register
Write
[A]
[B]
D1499
D1499
Data register
D7999
D200
D
D1100
K400
. If
is
BMOV
M8024 direction
inverse
n
D
S
X000
FNC 15
BMOVP
D1100
D200
K400
M8024(ON) :D1100
M8001
D200
BMOV
M8024
direction
inverse: OFF
Cautions on reading
When a file register (D1000 or later) is specified for the source of BMOV (FNC 15) instruction and the same number
file register is not specified for the destination, the contents of the file register area [A] inside the program memory are
not read.
1)
When a file register is specified for the source and a data register is specified for the destination
Inside built-in
memory or
memory cassette
Inside system
RAM
D0
D200
Program
memory
D1000
500 points
14 blocks
maximum
(7000 points
maximum)
136
File register
[A]
Read
Program/
comment
Data
memory
S
FNC 15
BMOVP
D1100
D
D200
K400
[B]
Data register
. If
is
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
When file registers of different device numbers are specified for the source and destination
Write
Inside built-in
memory or
memory cassette
D0
Program
memory
Data
memory
Program/
comment
Data register
D1400
Data register
[A]
[B]
D1199
D1400
Data register
S
FNC 15
BMOVP
D1100
D
D1400
K100
3
Instruction
List
D1499
D1499
D7999
X001
D1100
Write
File register
M8024
OFF
Overview
4.9.5
Inside system
RAM
Write
D1000
500 points
14 blocks
maximum
(7000 points
maximum)
Introduction
2)
4
Devices
in Detail
When updating the contents of the same number file register, make sure that the file register number at
D
and
Make sure that the number of transfer points specified by "n" does not exceed the file register area.
9
FNC10-FNC19
Move & Compare
If the number of transfer points specified by "n" exceeds the file register area, an operation error (M8067) occurs
and the instruction is not executed.
8
FNC00-FNC09
Program Flow
4. Cautions on handling file registers in the same-number register update mode in BMOV (FNC 15)
instruction
7
Basic
Instruction
In FX3S/FX3G/FX3GC PLCs
It takes 80 ms to write data in one continuous block (500 points) to file registers.
Note that execution of the program is paused during this period, but the watchdog timer is automatically refreshed.
The time for writing data is same between file registers stored in the built-in memory and file registers stored in a
memory cassette (EEPROM).
6
Before
Programming
In FX3U/FX3UC PLCs
It takes 66 to 132 ms to write data in one continuous block (500 points) to the memory cassette (flash memory).
Execution of the program is paused during this period. Because the watchdog timer is not refreshed during this
period, it is necessary to take proper countermeasures such as inserting the WDT instruction into the sequence
program.
It takes longer time to write data to file registers stored in a memory cassette (flash memory) compared to writing
data to file registers stored in the built-in memory.
Specified the
Device &
Constant
10
FNC20-FNC29
Arith. & Logic
Operation
137
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.10
4.10.1
1. FX3G/FX3GC PLCs
Extension register (R)
(General type)
R0 to R23999
ER0 to ER23999
24000 points*1
24000 points*2
2. FX3U/FX3UC PLCs
4.10.2
R0 to R32767
32768 points
ER0 to ER32767
32768 points*3
*1.
These registers can be changed to the latched (battery backed) type by the parameter setting when the
optional battery is used. However, the latched range cannot be set.
*2.
These registers are stored in the EEPROM built in the PLC, or in the EEPROM in the memory cassette when
the memory cassette is attached.
*3.
Available only while a memory cassette is mounted (because they are stored in the flash memory inside a
memory cassette.)
PLC
Extension register
Built-in RAM
FX3U/FX3UC
FX3G
Extension file register
FX3G/FX3GC
FX3GC
FX3U/FX3UC
Extension
register
Reading in program
Writing in program
Display module
Data change
method
138
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
16-bit type
One extension register (consisting of 16 bits) can handle a numeric ranging from 32768 to +32767.
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
4.10.4
7
Basic
Instruction
The contents of extension registers are backed up by the battery even when the power is turned OFF or when the PLC
mode switches from STOP to RUN in FX3U/FX3UC PLCs and in FX3G/FX3GC PLCs if extension registers are changed
to the latched (battery backed) type and the optional battery is installed.
When initializing the contents of extension registers, clear them using a sequence program, GX Works2 or GX
Developer.
6
Before
Programming
In the case of 32 bit type, when an extension register on the low-order side (example: R0) is specified, the
subsequent serial number on the high-order side (example: R1) is automatically occupied.
Either an odd or even device number can be specified for the low-order side, but it is recommended to specify an
even device number for the convenience of the monitoring function for display units, display modules, and
programming tools.
Specified the
Device &
Constant
Sign
0: Positive
number
1: Negative
number
1,073,741,824
536,870,912
268,435,456
134,217,728
67,108,864
33,554,432
16,777,216
8,388,608
4,194,304
2,097,152
1,048,576
524,288
262,144
131,072
65536
32768
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
4
Devices
in Detail
32-bit type
Two serial extension registers (consisting of 32 bits) can express a 32-bit numeric value ranging from
2,147,483,648 to +2,147,483,647. (A larger number register handles high-order 16 bits, and a smaller number
register handles low-order 16 bits.)
3
Instruction
List
Sign
0: Positive
number
1: Negative
number
A numeric value is usually read from and written to an extension register by applied instructions.
However, a numeric value can also be directly read from and written to an extension register from a display unit,
display module, or programming tool.
Overview
2)
Introduction
4.10.3
K0
R0
8
K200
When initializing extension registers and extension file registers in sector units
Sectors are not provided for extension registers and extension file registers in FX3G/FX3GC PLCs.
Example: When initializing R0 to R4095 and ER0 to ER4095 (initializing two sectors starting from R0 and ER0)
Ex. FX3U/FX3UC PLCs
FNC292
INITRP
R0
K2
9
FNC10-FNC19
Move & Compare
Command
FNC00-FNC09
Program Flow
Command
10
FNC20-FNC29
Arith. & Logic
Operation
Select [Online] [PLC Memory Operation] [Clear PLC memory...] in GX Works2, and clear [Data device].
This operation initializes the contents of timers, counters, data registers, file registers and extension registers.
139
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.10.5
R 0
C 10
R 20
R 5
C 2
C 10
R 4
16 bits
FNC 12
MOV
K200
R 10
32 bits
FNC 12
DMOV
K80000 R10(R11)
140
D 10
R 20
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
RWER (FNC294)
Description
This (transfer) instruction reads data of extension file registers (ER)*1 to extension registers (R).
This (transfer) instruction writes specified extension registers (R) to extension file registers (ER)
Use this instruction to store the contents of any extension register (R) in extension file registers (ER)*1.
When the memory cassette is attached, extension file registers in the memory cassette are accessed.
When the memory cassette is not attached, extension file registers in the EEPROM built in the PLC are
accessed.
3
Instruction
List
*1.
2
Overview
FX3G/FX3GC PLCs
LOADR (FNC290)
Introduction
4.10.6
FX3U/FX3UC PLCs
Instruction
Description
This (transfer) instruction reads data of extension file registers (ER)*2 to extension registers (R).
SAVER (FNC291)
This (transfer) instruction writes data of extension registers (R) to extension file registers (ER)*2 in 2048 point (1
sector) units. Use this instruction to store newly created sectors (2048 points) of data to extension file registers
(ER)*2.
Devices
in Detail
LOADR (FNC290)
This instruction initializes extension registers (R) and extension file registers (ER)*2 in 2048 point (1 sector) units.
Use this instruction to initialize extension registers (R) and extension file registers (ER)*2 before starting to log data
by the LOGR instruction.
LOGR (FNC293)
This instruction logs specified data, and writes it to extension registers (R) and extension file registers (ER)*2.
RWER (FNC294)
This (transfer) instruction writes specified extension registers (R) to extension file registers (ER)*2.This instruction is
supported in FX3UC PLC Ver. 1.30 or later. Use this instruction to store the contents of any extension register (R) to
extension file register (ER)*2.
This instruction initializes extension file registers (ER)*2 in 2048 point (1 sector) units. This instruction is supported
INITER (FNC295)
Extension file registers are only accessible when a memory cassette is mounted.
Extension file registers and extension registers have the following positional relationship inside the PLC.
a) FX3G/FX3GC PLCs
General-purpose device
(sequence program)
R0
RWER instruction
(arbitrary number of points)
ER0
8
FNC00-FNC09
Program Flow
General
applied
instruction
Basic
Instruction
6
Before
Programming
*2.
in FX3UC PLC Ver. 1.30 or later. Use this instruction to initialize extension file registers (ER)*2 before executing
SAVER instruction.
5
Specified the
Device &
Constant
INITR (FNC292)
LOADR instruction
(point units)
9
All points are
written at one
time
Nonvolatile
memory
FNC10-FNC19
Move & Compare
R23999
ER23999
10
Programming tool
FNC20-FNC29
Arith. & Logic
Operation
GX Works2, GX Developer
*3.
141
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
b) FX3U/FX3UC PLCs
Extension register (R)
R0
General-purpose device
(sequence program)
2048
points
R2048
General
applied
instruction R4096
2048
points
LOGR
instruction
INITER
2048
points
SAVER instruction
(sector units)
RWER instruction
(point units)
LOADR instruction
(point units)
ER0
2048
points
ER2048
2048
points
ER4096
2048
points
INITR instruction
(initialization)
(sector units)
R30720
R32767
ER32767
1 sector
2048
points
16
sectors
Nonvolatile
memory
Programming tool
GX Works2, GX Developer
142
Sector No.
Head
device No.
Sector No.
Head
device No.
Sector 0
R0
Sector 8
R16384
Sector 1
Sector 2
R2048
Sector 9
R18432
R4096
Sector 10
R20480
Sector 3
R6144
Sector 11
R22528
Sector 4
R8192
Sector 12
R24576
Sector 5
R10240
Sector 13
R26624
Sector 6
R12288
Sector 14
R28672
Sector 7
R14336
Sector 15
R30720
Device range
Device range
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Introduction
4.10.7
1)
When initializing extension file registers in a program (required only in FX3U/FX3UC PLCs)
a) Initializing only extension file registers in sector units [Ver. 1.30 or later]
Example: When initializing ER0 to ER4095 (initializing two sectors starting from ER0)
FNC295
INITERP
R0
K2
5
Specified the
Device &
Constant
Command input
2)
FNC292
INITRP
R0
K2
143
10
FNC20-FNC29
Arith. & Logic
Operation
In FX3G/FX3GC PLCs
Data can be written to the memory cassette (EEPROM) up to 10,000 times, and to the built-in memory (EEPROM)
up to 20,000 times.
Every time the RWER (FNC294) instruction is executed, it is counted as a write to the memory. Make sure not to
exceed the allowable number of writes.
When a continuous operation type instruction is used, data is written to the memory in every operation cycle of the
PLC. To prevent this, make sure to use a pulse operation type instruction.
Execution of the LOADR (FNC290) instruction is not counted as a write to the memory.
9
FNC10-FNC19
Move & Compare
Execution of the LOADR (FNC290), SAVER (FNC291) or LOGR (FNC293) instruction is not counted as a write to
the memory. However, it is necessary to initialize the writing target sector before executing the SAVER (FNC291)
or LOGR (FNC293) instruction.
Every time the INITR (FNC292) or INITER (FNC295) instruction is executed, it is counted as a write to the memory.
Make sure not to exceed the allowable number of writes.
8
FNC00-FNC09
Program Flow
In FX3U/FX3UC PLCs
Data can be written to the memory cassette (flash memory) up to 10,000 times.
Every time the INITR (FNC292), RWER (FNC294) or INITER (FNC295) instruction is executed, it is counted as a
write to the memory. Make sure not to exceed the allowable number of writes.
When a continuous operation type instruction is used, data is written to the memory in every operation cycle of the
PLC. To prevent this, make sure to use a pulse operation type instruction.
7
Basic
Instruction
6
Before
Programming
4
Devices
in Detail
Because the contents of extension file registers are stored in the memory cassette or built-in EEPROM, use the data
clear operation in a sequence program, GX Works2 or GX Developer to initialize them.
For writing data to extension file registers in FX3U/FX3UC PLCs, it is necessary to initialize the target area to be written
in advance.
For writing data to extension file registers in FX3G/FX3GC PLCs, it is not necessary to initialize the target area to be
written in advance.
3
Instruction
List
2
Overview
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
4.10.8
4 Devices in Detail
4.10 Extension Register [R] and Extension File Register [ER]
144
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
1
Introduction
4 Devices in Detail
1. Right-click [Device Memory] in the project data list to open the submenu.
3. Input the data name, and click the [OK] button to display the dialog box for Device Memory.
Overview
2. Click [Add New Data] to open the New Data dialog box.
3
Instruction
List
4
Devices
in Detail
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
145
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
4 Devices in Detail
4.10 Extension Register [R] and Extension File Register [ER]
146
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
1
Introduction
4 Devices in Detail
2
Overview
3
Instruction
List
4
Devices
in Detail
5
Specified the
Device &
Constant
3. Click the [Detail] button in the Online Data Operation dialog box to open the Device Data Detail
Setting dialog box.
Check the "Ext. file register".
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
4. Click the [Execute] button in the Online Data Operation dialog box to write (transfer) to the PLC.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
147
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
4.11
4.11.1
*1.
4.11.2
The characteristics related to protection against power failure cannot be changed by parameters.
1. 16-bit type
Index registers have the same structures as data registers.
16 bits
V
V0 to V7:
8 points
16 bits
Z
Z0 to Z7:
8 points
2. 32-bit type
Make sure to use Z0 to Z7 when indexing a device in a 32-bit applied instruction or handling a numeric value outside
the 16-bit range.
32 bits
V0 (high-order side)
Z0 (low-order side)
V1 (high-order side)
Z1 (low-order side)
V2 (high-order side)
Z2 (low-order side)
V3 (high-order side)
Z3 (low-order side)
V4 (high-order side)
Z4 (low-order side)
V5 (high-order side)
Z5 (low-order side)
V6 (high-order side)
Z6 (low-order side)
V7 (high-order side)
Z7 (low-order side)
K300
Z2
K300(V2,Z2)
Even if an index value in a 32-bit applied instruction does not exceed
the 16-bit numeric range, use a 32-bit operation instruction such as
DMOV for writing a numeric value to Z as shown in the above figure
so that both V (high-order side) and Z (low-order side) are overwritten
at the same time.
4.11.3
Indexing of devices
Available devices and the contents of indexing are as described below:
For indexing method and cautions, refer to Section 5.7.
Decimal devices/numeric values: M, S, T, C, D, R, KnM, KnS, P and K
For example, when "V0 = K5" is specified and "D20V0" is executed, an instruction is executed for the device number
D25 (D20 + 5).
Constants can be indexed also. When "K30V0" is specified, an instruction is executed for decimal value K35 (30 + 5).
Octal devices: X, Y, KnX and KnY
For example, when "Z1 = K8" is specified and "X0Z1" is executed, an instruction is executed for the device number
X10 (X0 + 8: addition of octal value). When indexing for a device whose device number is handled in octal, a numeric
value converted into octal is added for the contents of V and Z.
Accordingly, note that when "Z1 = K10" is specified "X0Z1" indicates that X12 is specified, and X10 is not specified.
Hexadecimal numeric values: H
For example, when "V5 = K30" is specified and a constant "H30V5" is specified, it is handled as H4E (30H + K30).
When "V5 = H30" is specified and a constant "H30V5" is specified, it is handled as H60 (30H + 30H).
148
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Pointer [P and I]
4.12.1
Numbers of pointers
1
Introduction
4.12
1. FX3S PLC
For branch
I6
I7
I8
3 points
I6
I7
I8
3 points
For counter
interrupt
I6
I7
I8
3 points
I010 I040
I020 I050
I030 I060
6 points
3
Instruction
List
P0 to P62
P64 to P255
255 points
2
Overview
The table below shows numbers of pointers (P and I). (Numbers are assigned in decimal.)
When using a pointer for input interrupt, an input number assigned to it cannot be used together with a "high-speed
counter" or "speed detection (FNC 56)" which uses the same input range.
2. FX3G/FX3GC PLCs
For branch
Devices
in Detail
P0 to P62
P64 to P2047
2047 points
3. FX3U/FX3UC PLCs
P0 to P62
P64 to P4095
4095 points
P63
1 point
Jump
Label
P1
FNC 02
SRET
Jump
Return
Subroutine
program
9
FNC10-FNC19
Move & Compare
FNC 06
FEND
8
FNC00-FNC09
Program Flow
Label
P0
7
Basic
Instruction
Before
Programming
4.12.2
5
Specified the
Device &
Constant
For branch
10
FNC20-FNC29
Arith. & Logic
Operation
149
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Label
P63
P 63
END
4.12.3
Input
Interrupt at rising
edge
Interrupt at falling
edge
X000
I001
I000
M8050*1
X001
I101
I100
M8051*1
X002
I201
I200
M8052*1
X003
I301
I300
M8053*1
X004
I401
I400
M8054*1
X005
I501
I500
M8055*1
*1.
FX3S
FX3G/FX3GC
10 s or more
10 s or more
50 s or more
50 s or more
FX3U/FX3UC
5 s or more
10 s or more
50 s or more
M8393
FNC 12
MOV
K{{{*
D8393
150
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
1
FNC 04
EI
Interrupt enabled
range
Introduction
Operations
2
Overview
Pointer for
interrupt
FNC 06
FEND
Rising edge of X000 is detected
FNC 03
IRET
Rising edge of X001 is detected
I101
Devices
in Detail
END
I8
*1.
6
Before
Programming
M8056*1
I6
I7
Specified the
Device &
Constant
Input No.
3
Instruction
List
I001
M8057*1
M8058*1
Caution
Basic
Instruction
It is recommended to set the timer interrupt time to 10 ms or more. When the timer interrupt time is set to 9 ms or less,
the timer interrupt processing may not be executed at an accurate cycle in the following cases:
When an instruction requiring long processing time is used in the main program
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
151
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4 Devices in Detail
Operations
Step
0
FNC 04
EI
Interrupt is
enabled
Main
program
FNC 06
FEND
Pointer for
interrupt
Main program
is finished
Interrupt at every 20 ms
I620
Interrupt
routine
FNC 03
IRET
Interrupt return
END
Pointer No.
I010
I040
M8059*2
I020
I050
I030
M8059*2
I060
*1.
*2.
Operations
Step
0
M8000
RUN
monitor
C255
K2,147,483,647
FNC 53
DHSCS K1000 C255
FNC 06
FEND
Pointer for
interrupt
FNC 04
EI
I010
I010
Interrupt routine
(interrupt program)
FNC 03
IRET
END
152
Interrupt return
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
2
Overview
This chapter explains how to specify sources and destinations in sequence instructions which are the basis for
handling PLC instructions.
Introduction
5.
5.1
Instruction
List
Specified the
Device &
Constant
Device numbers of auxiliary relays (M), timers (T), counters (C), state relays (S), etc.
Numeric values in operands and instruction operations in applied instructions (constant K)
instruction.
Input from
keyboard
(decimal) K 7 8 9
0: Positive value
1: Negative value
(binary)
0 0 0 0 0 0 1 1 0 0 0 1 0 1 0 1
Automatic
conversion
1+4+16+256+512
= 789
(decimal) K 7 8 9
Monitoring in programming tool
153
10
FNC20-FNC29
Arith. & Logic
Operation
FX3S, FX3G, FX3GC, FX3U and FX3UC PLCs have the floating point operation function to achieve high accuracy
operation.
In floating point operations, binary floating points (real numbers) are used, and scientific notation (real numbers) are
used for monitoring them.
9
FNC10-FNC19
Move & Compare
BCD format expresses each numeric value from 0 to 9 constructing each digit of a decimal number in a 4-bit binary
number.
Because handling of each digit is easy, this format is adopted in controlling digital switches of BCD output type and
seven-segment display units.
8
FNC00-FNC09
Program Flow
7
Basic
Instruction
Example of decimal
number input
Before
Programming
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
5.1.1
Devices
in Detail
FX PLCs handle five types of numeric values according to the application and purpose.
This section explains the roles and functions of these numeric values.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
5.1.2
Hexadecimal number
(HEX)
00
0000
0000
0000
0000
01
0000
0001
0000
0001
02
0000
0010
0000
0010
03
0000
0011
0000
0011
04
0000
0100
0000
0100
05
0000
0101
0000
0101
06
0000
0110
0000
0110
07
0000
0111
0000
0111
10
08
0000
1000
0000
1000
0B
0000
1011
0001
0001
12
14
0C
0000
1100
0001
0010
13
15
0D
0000
1101
0001
0011
14
16
0E
0000
1110
0001
0100
15
17
0F
0000
1111
0001
0101
16
20
10
0001
0000
0001
0110
99
143
0011
1001
1001
Hexadecimal number
(HEX)
0110
63
13
0000
11
1001
0000
0001
1001
1010
0000
0000
09
0A
11
12
9
10
BCD
Major applications
Decimal number (DEC)
Constants (K) and
numbers of internal
devices except I/O
relays
154
Numbers of internal
I/O relays
Constants (H)
BCD
BCD digital switches
and seven-segment
display units
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
5.1.3
5.1 Numeric Values Handled in PLC (Octal, Decimal, Hexadecimal and Real Numbers)
When handling a binary floating point (real number) in data registers, use a pair of data registers having consecutive
device numbers.
When D11 and D10 are used, for example, a binary floating point is handled as shown below:
D 11(b15 to b0)
2
D 10(b15 to b0)
2
-1
-2
-3
2-21
2-22
2-23
E7
E6
E5
E1
E0
A22
A21
A20
A2
A1
A0
b31
b30
b29
b28
b24
b23
b22
b21
b20
b2
b1
b0
23 bits in
mantissa part
A0 to A22 = 0 or 1
5
Specified the
Device &
Constant
8 bits in
exponent part
E0 to E7 = 0 or 1
4
Devices
in Detail
6
Before
Programming
Instruction
List
2
Overview
The sign bit b31 states whether data is positive or negative, but is not handled as a complement.
7
Basic
Instruction
- Zero flag
- Borrow flag
- Carry flag
FNC00-FNC09
Program Flow
Handling of the zero (M8020), borrow (M8021) and carry (M8022) flags
These flags operate as follows in floating point operations.
: 1 when the result is 0
: 1 when the result does not reach the minimum unit but is not 0
: 1 when the absolute value of the result exceeds the available numeric value range.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
155
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
5.1 Numeric Values Handled in PLC (Octal, Decimal, Hexadecimal and Real Numbers)
The most significant bit of D0 and D1 specifies the positive or negative sign respectively, and is handled as the
complement of 2 respectively.
The mantissa D0 does not allow "100", for example. In the case of "100", it is handled as "1000 101".
The scientific notation (real number) range is as follows:
- Minimum absolute value: 1175 1041
- Maximum absolute value: 3402 1035
Number of significant figures
The number of significant figures of scientific notation is approximately 4 when expressed in decimal. The scientific
notation range is as described above.
Scientific notation (real number) is valid in the following instructions:
- Conversion from binary floating point (real number) into scientific notation (real number): FNC118 ([D]EBCD)
- Conversion from scientific notation (real number) into binary floating point (real number): FNC119 ([D]EBIN)
156
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
5.2
5.2.1
Devices
in Detail
"H" indicates a hexadecimal number, and is mainly used to specify numeric values as operands in applied instructions.
(Example: H1234)
When using digits 0 to 9, the bit status (1 or 0) of each bit is equivalent to the BCD code, so BCD data can be specified
also.
(Example: H1234 ... When specifying BCD data, specify each digit of hexadecimal number in 0 to 9.)
The hexadecimal constant setting range is as follows:
5
Specified the
Device &
Constant
5.2.3
3
Instruction
List
"K" indicates a decimal integer, and is mainly used to specify the set value of timers and counters and numeric values
as operands in applied instructions. (Example: K1234)
The decimal constant specification range is as follows:
5.2.2
2
Overview
When handling constants in a sequence program, use constant K (decimal), H (hexadecimal) or E (floating point).
In peripheral equipment for programming, add "K" to a decimal number, "H" to a hexadecimal number and "E" to a
floating point (real number) for operations associated with numeric values in instructions. (Examples: K100 (decimal
number), H64 (hexadecimal number) and E1.23 (or E1.23 + 10) (real number))
The roles and functions of constants are described below.
7
Basic
Instruction
Before
Programming
"E" indicates a real number (floating point data), and is mainly used to specify numeric values as operands in applied
instructions. (Example: E1.234 or E1.234 + 3)
The real number setting range is from 1.0 2128 to 1.0 2126, 0 and 1.0 2126 to 1.0 2128.
In a sequence program, a real number can be specified in two methods, "normal expression" and "exponent
expression".
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
157
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
5.3
Character Strings
Character strings are classified into character string constants which directly specify character strings in operands in
applied instructions and character string data.
5.3.1
5.3.2
b8 b7
b0
b15
1st character
3rd character
5th character
D100
D101
00H
21st character
D102
2)
2nd character
4th character
6th character
b0
1st character
3rd character
5th character
D110
b8 b7
2nd character
4th character
6th character
"(n-1)"th character
00H
13th character
M211 to M196
M115 to M100
M131 to M116
M147 to M132
2nd character
4th character
6th character
1st character
3rd character
5th character
6th character
1st character
3rd character
5th character
M7679 to
M7664
<Example 2>
M7623 to M7608
M7639 to M7624
M7655 to M7640
M7671 to M7656
M7679 to M7672
1st character
3rd character
5th character
7th character
00H
158
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
5.4
Transferred
Do not change
M9
M8
Low order
M7
M6
M5
M4
M3
M2
M1
M0
D1
1
4
Devices
in Detail
Transferred
K2M0
1
D0
Instruction
List
Low order
1
FNC 19
BIN
K2X004
D0
5
Specified the
Device &
Constant
When 16-bit data is transferred to K1M0 to K3M0, the highest-order bits are not transferred due to insufficient data
length.
32-bit data is transferred in the same way.
When the number of digits specified for bit devices is K1 to K3 (or K1 to K7) in a 16-bit (or 32-bit) operation, the
insufficient high-order bits are always regarded as "0". It means that such data is always positive.
M0
2
Overview
Devices which handle only the ON/OFF information such as X, Y, M and S are called bit devices.
On the other hand, devices handling numeric values such as T, C, D and R are called word devices.
Even bit devices can handle a numeric value when they are combined. In this case, the number of digits Kn and the
head device number are combined.
The number of digits is expressed in 4 bit units (digits); K1 to K4 are used for 16-bit data, and K1 to K8 are used for 32bit data.
For example, "K2M0" indicates two-digit data expressed by M0 to M7.
K1X000,
K1X004,
K1X010,
K2Y010,
K2Y020,
K2Y030 .....
K3M12,
M3M24,
K4S16,
K4S32,
K4S48 .....
K3M36 .....
FNC00-FNC09
Program Flow
K3M0,
K1X014 .....
7
Basic
Instruction
A series of data registers starting from D1 means "D1, D2, D3, D4 ....."
In the case of word devices with digit specification, when such word devices are handled as a series, they are
specified as shown below:
Before
Programming
A bit device number can be specified arbitrarily, but it is recommended to set the least significant digit to "0" for X or Y.
(In other words, it is recommended to specify "X000, X010, X020 ... Y000, Y010, Y020 ...")
For M and S, multiples of "8" are ideal, but it is recommended to specify "M0, M10, M20 ..." to prevent confusion.
Use the above devices in digit units so that devices are not skipped.
When "K4Y000" is used in a 32-bit operation, the high-order 16 bits register as "0".
It is necessary to use "K8Y000" when 32-bit data is required.
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
159
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
5.5
By specifying a bit of a word device, the specified bit can be used as bit data.
When specifying a bit of a word device, use a word device number and bit number (hexadecimal).
(Example: D0.0 ... Indicates the bit 0 of data register (D).)
Indexing is not available for both device numbers and bit numbers.
Target word device
Bit number
D0.F
D0.3
D0 F E D C B A 9 8 7 6 5 4 3 2 1 0
16 bits
5.6
Transfer Transfer
source destination
FNC 12
MOV
K10
U0\G10
Unit number
Example of indexing
BFM number
FNC 12
MOV
Transfer Transfer
source destination
K20
U0\G10Z0
Unit number
160
BFM #10
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Indexing
Introduction
5.7
5.7 Indexing
The functions and structures of index registers are explained in detail in "4.11 Index Register [V and Z]".
Refer to Section 4.11 in advance.
5.7.1
Overview
Y000
M0Z(0)
Y001
Cautions
2)
3)
X001
T0
9
FNC10-FNC19
Move & Compare
D0V2
V2 = 0 : The set value of T0 is the
present value of D0.
V2 = 10 : The set value of T0 is the
present value of D10.
8
FNC00-FNC09
Program Flow
1)
7
Basic
Instruction
The set value of word devices used in OUT instruction of T and C(0~199) can be indexed with index registers.
The indexing operation is explained in an example in which the set value
X030
D0 of T0 used in the index register V2 indexes OUT instruction (as shown
FNC 12
K0
V2
in the right figure).
MOVP
Transfer K0 or K10 to the index register V2 in advance.
K0 V2
When X001 is set to ON, "D(0+0) = D0" if V2 is "0", and T0 operates with
X030
the set value D0.
FNC 12
K10
V2
When X001 is set to ON, "D(0+10) = D10" if V2 is "10", and T0 operates
MOVP
with the set value D10.
K10 V2
6
Before
Programming
5
Specified the
Device &
Constant
1)
Caution
4
Devices
in Detail
In OUT instruction for a timer or counter, the timer number (or counter
number) and the device specified for the set value can be indexed.
3
Instruction
List
Bit devices [X, Y, M (except special auxiliary relays), T, and C (C0 to C199)] used in LD, LDI, AND, ANI, OR, ORI,
OUT, SET, RST, PLS, and PLF instructions can be indexed with index registers.
The figure shown on the right explains an indexing operation with the
X030
index register Z(0) for X000 and M0 in the LD instruction.
FNC 12
K5
Z(0)
Transfer K5 or K10 to the index register Z(0) in advance.
MOVP
If Z(0) is "5", "X(0+5) = X005". When X005 turns ON, Y000 turns ON and
K5 Z(0)
"M(0+5) = M5". When M5 turns ON, Y001 turns ON.
X030
FNC 12
If Z(0) is "10", "X(0+10) = X012*1". When X012*1 turns ON, Y000 turns ON
K10
Z(0)
MOVP
and "M(0+10) = M10". When M10 turns ON, Y001 turns ON.
K10 Z(0)
*1. Refer to the caution 3) below.
X000Z(0)
The index registers Z0 to Z7 and V0 to V7 can be used for indexing.
10
FNC20-FNC29
Arith. & Logic
Operation
161
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
5.7.2
5.7 Indexing
K100
D
D 10
X000
FNC 12
MOVP
K0
V1
K0 V1
X000
FNC 12
MOVP
K10
V1
K10 V1
X001
FNC 10
CMP
V1=0
D0>D1 M0=ON
D0=D1 M1=ON
D0<D1 M2=ON
X000
D0
D1
M0V1
V1=10
M10=ON
M11=ON
M12=ON
FNC 12
MOVP
K0
V3
K0 V3
X000
FNC 12
MOVP
K10
V3
K10 V3
X001
FNC 12
K500
D0V3
MOV
V3=0 : K500 D0 (D0+0)
V3=10 : K500 D10 (D0+10)
162
X002
FNC 12
DMOVP
K0
Z4
K0 V4,Z4
X002
FNC 12
DMOVP
K10
Z4
K10 V4,Z4
X003
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
5.7 Indexing
1
1)
When even if a numeric value written to index registers does not exceed the 16-bit numeric value range (0 to
32767), make sure to overwrite both V and Z using a 32-bit instruction. If only Z is overwritten and another
numeric value remains in V, the numeric value will be extremely large. Thus an operation error occurs.
2)
3)
4)
Overview
Introduction
Cautions
5)
6)
Instruction
List
X030
X032
K0
V3
K0V3
FNC 12
MOVP
K8
V3
K8V3
FNC 12
MOVP
K 16
V3
X033
RUN monitor
Z0
(X003 to X000)BCD(Z0)BIN
T 0Z0
PLC
K4Y000
Basic
Instruction
FNC 18
BCD
(T0Z0)BIN(Y017 to Y000)BCD
"T0Z0 = T0 to T9" according to "Z0 = 0 to 9"
8
FNC00-FNC09
Program Flow
FNC 12
MOVP
K0
V6
K0 V6
X004
FNC 12
MOVP
K20
V6
K20 V6
X005
163
10
FNC20-FNC29
Arith. & Logic
Operation
FNC 12
K6V6
D10
MOVP
V6=0 : K6 (K6+0) D10
V6=20 : K26(K6+20) D10
9
FNC10-FNC19
Move & Compare
6
Before
Programming
A sequence to display the present value of the timers T0 to T9 can be programmed index registers.
K1X000
5
Specified the
Device &
Constant
K16 V 3
FNC 19
BIN
4
Devices
in Detail
X031
FNC 12
MOVP
M8000
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
5.7.3
5.7 Indexing
X010
X012
X013
164
FNC 12
MOVP
K0
V0
(K0) (V0)
FNC 12
MOVP
K0
V1
(K0) (V1)
FNC 12
MOVP
K0
V2
(K0) (V2)
FNC 12
MOVP
K16
V0
(K16) (V0)
FNC 12
MOVP
K2
V1
(K2) (V1)
FNC 12
MOVP
K20
V2
(K20) (V2)
M0V2
Head Device
Number of
Pressed Key
Information
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
5.7 Indexing
1
Introduction
MEMO
2
Overview
3
Instruction
List
4
Devices
in Detail
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
FNC00-FNC09
Program Flow
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
165
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
6.
6.1
Introduction
10.1
Outline
1. Instruction format
FNC 20
ADD
16-bit Instruction
7 steps
Mnemonic
Operation Condition
ADDP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DADD
DADDP
2. Set data
Operand type
Description
3
Instruction
List
Continuous
Operation
Pulse (Single)
Operation
ADD
2
Overview
This instruction executes addition by two values to obtain the result (A + B = C).
oFor the floating point addition instruction EADD (FNC120), refer to Section 18.8.
Data type
S2
4
Devices
in Detail
S1
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
Constant
Index
U\G V
Z Modify K
S1
3 3 3 S1
S2
3 3
3 3
S2
3 3 3 S1
S2
3 3
3 3
3 3 3 S1
S2
3 3
Real
CharacPointer
Number ter String
E
""
6
Before
Programming
are added to S1
FNC 20
ADD
S1
S2
Basic
Instruction
The contents of S2
S1 + S2 o D
or S2
S1
S2
] are added to [ S1
+1,
S1
].
S2
D 1, D ]
[ S1 +1, S1 ] + [ S2 +1, S2 ] o>
The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is added algebraically.
5500 + (8540) = 3040
+1, S1
] or [ S2
+1, S2
10
FNC20-FNC29
Arith. & Logic
Operation
FNC10-FNC19
Move & Compare
Command
input
+1,
+1, D1
8
FNC00-FNC09
Program Flow
The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is added algebraically.
5 + (8) = 3
The contents of [ S2
5
Specified the
Device &
Constant
Operand
Type
265
The above is different from the actual page, as it is provided for explanation only.
166
Indicates applicable
PLC versions.
Applicable
series
Expression of applicable versions
Ver. 2.20: before Ver. 2.20
Ver. 2.20 : Ver. 2.20 or later
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1. Instruction format
1)
The applied instruction number (FNC No.) and instruction mnemonic are indicated. The table below shows the
meaning of simplified expression.
Description
Applicable
instruction
(example)
No.
FNC 12
Instruction
P
MOV name
Dotted lines on the upper left and lower left sides indicate an independent instruction
WDT (FNC 07)
not associated with the 16-bit or 32-bit type.
No.
FNC 12
Instruction
P
MOV name
Continuous lines on the upper left side indicates that 16-bit type is available. "D" on the
MOV (FNC 12)
lower left side indicates that the 32-bit type is available.
No.
FNC 12
Instruction
P
MOV name
Dotted lines on the lower left side indicate that the 32-bit type does not exist.
CJ (FNC 00)
Continuous lines on the upper left side indicate that only the 16-bit type is available.
Continuous lines on the upper right side indicate that the continuous operation type is
CMP (FNC 10)
available. "P" on the lower right side indicates that the pulse operation type is available.
No.
FNC 12
Instruction
D MOV name P
Dotted lines on the lower right side indicate that the pulse operation type does not exist.
Continuous line on the upper right side indicate that only the continuous operation type MTR (FNC 52)
is available.
"on the upper right side indicates that the contents of the destination change in
2. Set data
1)
Contents
Bit device
16-bit binary code
32-bit binary code
64-bit binary code
16-bit or 32-bit binary code
32-bit or 64-bit binary code
4-digit (16-bit) BCD code
8-digit (32-bit) BCD code
4-digit (16-bit) or 8-digit (32-bit) BCD code
Character code such as ASCII code and shift JIS code
ASCII code
Binary floating point
Scientific notation
9
FNC10-FNC19
Move & Compare
Data types
Bit
16-bit BIN
32-bit BIN
64-bit BIN
16/32-bit BIN
32/64-bit BIN
4-digit BCD
8-digit BCD
4/8-digit BCD
Character string
Character string (only ASCII)
Real number (binary)
Real number (decimal)
FNC00-FNC09
Program Flow
3)
7
Basic
Instruction
The contents of devices that can be specified as operands in instructions and available data types are described
below:
Before
Programming
FNC
DInstruction
MOV name P
"
5
Specified the
Device &
Constant
No.
FNC 12
Instruction
D MOV name P
4
Devices
in Detail
Dotted lines on the upper left side indicate that the 16-bit type does not exist. "D" on the
HSCS (FNC 53)
lower left side indicates that only the 32-bit type is available.
Instruction
List
No.
FNC 12
Instruction
D MOV name
P
No.
12
2
Overview
Mark
Introduction
Outline
10
FNC20-FNC29
Arith. & Logic
Operation
167
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable devices
Devices which can be specified in operands of instructions are shown.
When a device supports an instruction, " " is added to the device.
1)
Bit devices
X : Input relay (X)
Y : Output relay (Y)
M : Auxiliary relay (M)
S : State relay (S)
etc.
2) Word devices
K : Decimal integer
H : Hexadecimal integer
KnX: Input relay (X) with digit specification*1
KnY: Output relay (Y) with digit specification*1
KnM: Auxiliary relay (M) with digit specification*1
KnS: State relay (S) with digit specification*1
T : Timer (T) current value
C : Counter (C) current value
D : Data register (file register)
V, Z: Index register
Modify: Availability of indexing using index register
etc.
*1.
Cautions
Cautions on using each instruction are described.
Errors
Major errors that are possible to occur in each instruction are described.
For details on errors, refer to "Chapter 38. Error Check Method and Error Code List".
Program examples
Concrete program examples using each instruction are described.
168
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
6.2
6.2.1
Even for a sequence circuit offering the same operation, the program can be simplified and the number of steps can
be saved depending on the contact configuration method.
1)
(1)LD
(3)AND
Instruction
List
(2)LD
(2)AND
(5)OUT
(4)OUT
(3)OR
(4)ORB
Devices
in Detail
2)
Overview
(2)LD
(1)LD
(3)AND
(5)OUT
(4)OUT
(3)OR
Specified the
Device &
Constant
(4)ANB
(2)OR
ANB instruction is not necessary
Before
Programming
A sequence program is executed "from top to bottom" and "from left to right".
Code the sequence instruction list according to this rule.
Executed
Basic
Instruction
8
FNC00-FNC09
Program Flow
(1)
(5)
(3)
(2)
(7)
(9)
(10)
FNC10-FNC19
Move & Compare
(6)
(4)
(8)
(11)
10
FNC20-FNC29
Arith. & Logic
Operation
169
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
6.2.2
Input processing
X001 = ON X002 = OFF
First
X001
Y003
Y003
Y004
Second
X002
Y003
Output processing
Y003 = OFF Y004 = ON
B
Y000
Y000
C
.....
C
Ignored
E
Y000
B
M100
.....
or
M101
.....
D
M100
Y000
M101
SET, RST or jump instruction can be used instead, or the same output coil can be programmed at each state by step
ladder instructions.
When step ladder instructions are used, if an output coil located in the main routine is also used in a state, it is handled
as a double coil. It is better to avoid such programming.
170
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
6.2.3
1. Bridge circuit
A circuit in which the current flows in both directions should be changed as shown in the figure on the right (so that a
circuit without D and a circuit without B are connected in parallel).
B
F
A
A
D
3
Instruction
List
E
B
Specified the
Device &
Constant
6.3
Devices
in Detail
and operation is
Scan time
(operation
cycle)
(3)
Batch I/O method
(refresh method)
to program.
[Output processing]
Result is
transferred to
output latch
memory
Output
devices
are driven
10
Program
processing
Input processing
Output processing
Program
processing
Time)
Program
processing
Operation cycle
171
FNC20-FNC29
Arith. & Logic
Operation
OFF
9
FNC10-FNC19
Move & Compare
8
FNC00-FNC09
Program Flow
The ON duration and OFF duration of inputs in PLCs require longer time than "PLC scan time + Input filter response
delay".
When the response delay of the input filter "10 ms" is considered and the scan time is supposed as "10 ms", the ON
duration and OFF duration should be at least 20 ms respectively.
Accordingly, PLCs cannot handle input pulses at 25 Hz (1000 / (20 + 20) = 25) or more. However, the situation can be
improved by PLC special functions and applied instructions.
7
Basic
Instruction
(1)
Before
Programming
2
Overview
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
6.4
Instruction in
left line
Instruction in
left line
Example 1: MC CJ P MCR
Top line
Left line
MC-MCR
CJ-P
MC-MCR
octet
Example 2: MC CJ MCR P
CJ-P
EI-DI
FOR-NEXT
STL-RET
Example
1
Example
2
EI-DI
quintet
FOR-NEXT
STL-RET
*2
inside
one
STL
P-SRET
I-IRET
FEND-END
*1
O-FEND
O-END
(no FEND)
172
*1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
2
Overview
Remarks
FEND-END
*1
Instruction
List
P-SRET
*2
FOR
NEXT
NEXT
Devices
in Detail
FOR
3
3
*1
5
Specified the
Device &
Constant
6
Before
Programming
*3
*3
*3
8
FNC00-FNC09
Program Flow
Basic
Instruction
9
FNC10-FNC19
Move & Compare
*3
*3
10
*3
FNC20-FNC29
Arith. & Logic
Operation
173
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
6.5
6.5.1
FNC 13
SMOV
m1
m2
: An operand whose contents do not change by execution of the instruction is called "source", and is
indicated by this symbol.
When a device number can be indexed with index registers, the source is expressed as
with addition of " ".
When there are two or more sources, they are expressed as S1
, S2
, etc.
: An operand whose contents change by execution of the instruction is called "destination", and
indicated by this symbol.
When indexing is allowed and there are two or more destinations, they are expressed as
m, n
D1
- In applied instructions, the program step of the instruction part always occupies 1 step, but each operand
occupies 2 or 4 steps depending on whether the instruction is 16-bit type or 32-bit type.
174
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applied instructions are classified into "16-bit type" or "32-bit type" by the size of handled numeric values. And by the
operation type, applied instructions are classified into "continuous operation type" or "pulse operation type".
Some applied instructions have every combination of this form and type, and others do not.
Command 1
Command 2
FNC 12
MOV
D10
D12
FNC 12
DMOV
D20
D22
X001
FNC 12
MOVP
D10
D12
6
FNC 12
MOV
D10
D12
In the continuous operation type of some instructions such as INC (FNC 24) and DEC (FNC 25), the contents of the
destination change in every operation cycle.
" is added to the
No.
FNC 12
Instruction
MOV name P
8
FNC00-FNC09
Program Flow
In any case, instructions are not executed while the drive input X000 or X001 is OFF. And the destinations do not
change except when instructions specify otherwise.
7
Basic
Instruction
For applied instructions requiring attention in using the continuous operation type, the symbol "
title of the explanation of such instructions as shown in the figure below.
Before
Programming
X000
Specified the
Device &
Constant
4
Devices
in Detail
3
Instruction
List
2
Overview
- Applied instructions handling numeric values are classified into the 16-bit type or the 32-bit type by the bit length
of the numeric value data.
Introduction
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
175
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
6.5.2
1. Program containing many flags (example of instruction execution complete flag M8029)
When two or more instruction execution complete flags M8029 are programmed together for applied instructions, it is
difficult to determine which instruction executes which flag.
For using flags in any positions other than directly under applied instructions, refer to the next page.
...
Good example
M8000
FNC 72
DSW
M8029
Execution is
completed
FNC 22
MUL
Y10
D0
D0
K10
K1
D20
...
M8029 works as
a flag to indicate
that execution of
DSW is
completed.
X10
X000
M0
M8029 works as
a flag to indicate
that execution of
DPLSY is
completed.
Bad example
M8029 works as
a flag to indicate
that execution of
DSW is
completed.
K1000
Execution is
completed
D20
RST
M0
RST
M0
M8029
Execution is
completed
M8000
Y000
FNC 72
DSW
X10
SET
M0
FNC 57
DPLSY
Y10
D0
K1
K1000
D20
Y000
FNC 22
MUL
D0
K10
D20
FNC 57
DPLSY
K1000
D22
Y001
Second DPLSY
instruction
X000
M8029
Execution is
completed
M1
176
FNC 57
DPLSY
M8029
M0
M8029 works as
a flag to indicate
that execution of
the first DPLSY
is completed.
M0
...
M8029 works as
a flag to indicate
that execution of
the second
DPLSY is
completed.
SET
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
When two or more applied instructions are programmed, general flags turn ON or OFF when each applied instruction
turns ON.
Accordingly, when using a flag in any position other than directly under an applied instruction, set to ON or OFF
another device just under the applied instruction, and then use the contact of the device as the command contact.
DSW execution
complete flag
M8029 is
changed to
M100.
FNC 72
DSW
Y10
D0
K1
3
Instruction
List
M8029
M100
Execution is
completed
M0
FNC 57
DPLSY
K1000
D20
Y000
M8029
RST
Execution is
completed
Devices
in Detail
DPLSY
execution
complete flag
M8029 is
changed to
M200.
X10
M0
M200
FNC 22
MUL
Specified the
Device &
Constant
...
It works as DSW
execution
complete flag.
M100
2
Overview
...
M8000
Introduction
2. Introduction of method for using flags in any positions other than directly under applied
instructions
D0
K10
D20
6
Before
Programming
It works as
DPLSY execution
complete flag.
M200
Y030
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
177
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
6.5.3
1. Operation error
Error flag
M8067
D8067
FX3U/FX3UC PLCs
D8069
D8315, D8314
D8069
When an operation error has occurred, M8067 turns ON and D8067 stores the operation error code number.
In the FX3U/FX3UC PLCs, D8315 and D8314 (32 bits in total) store the step number in which the error has occurred.
When the error occurrence step number is up to 32767, the error occurrence step can be checked also in D8069
(16 bits).
In the FX3S/FX3G/FX3GC PLCs, D8069 stores the error occurrence step number.
If another error occurs in another step, the stored data is updated in turn to the error code and step number of the
new error. (These devices are set to OFF when errors are cleared.)
When the PLC mode switches from STOP to RUN, these devices are cleared instantaneously, and then set to ON
again if errors have not been cleared.
M8068
FX3U/FX3UC PLCs
D8068
D8313, D8312
D8068
6.5.4
X000
X000
FNC 17
XCHP
D10
D11
D10
D10
Same number
When using an instruction requiring the function extension flag in an interrupt program, program DI instruction (for
disabling interrupt) before driving the function extension flag, and program EI instruction (for enabling interrupt) after
turning OFF the function extension flag.
178
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
6.5.5
Some applied instructions can only be used up to the specified number of times.
Allowable number of times of
use
FNC 52 (MTR)
Remarks
MTR instruction can only be used once in program.
FNC 56 (SPD)
Pay attention so that this instruction does not overlap the input numbers of in DVIT
instruction, DOG inputs in ZRN instruction, zero point signal in DSZR instruction,
input interrupt numbers and high-speed counter input numbers.
FNC 60 (IST)
FNC 69 (SORT)
FNC 70 (TKY)
FNC 71 (HKY)
FNC 75 (ARWS)
FNC 77 (PR)
FNC280 (HSCT)
4
Devices
in Detail
FNC186 (DUTY)
FNC149 (SORT2)
3
Instruction
List
Overview
Instruction name
1. Positioning instructions
It is impossible to combine and use "FNC 80 (RS), FNC 87 (RS2)", "FNC270 (IVCK) to FNC275 (IVMC)", "FNC276
(ADPRW)", "FNC300 (FLCRT) to FNC305 (FLSTRD)" instructions for the same port.
In FNC270 (IVCK) to FNC275 (IVMC) instructions, two or more instructions can be driven at the same time for the
same port.
9
FNC10-FNC19
Move & Compare
In FNC 80 (RS) and FNC 87 (RS2) instructions, do not drive two or more instructions at the same time for the same
port.
8
FNC00-FNC09
Program Flow
FX3U/FX3UC PLCs
In FNC 53 (HSCS), FNC 54 (HSCR) and FNC 55 (HSZ) instructions (including FNC280 (HSCT) instruction), make
sure that up to 32 instructions are driven at the same time. [FNC280 (HSCT) instruction can only be used once.]
Note that "FNC280 (HSCT) instruction", "table high-speed comparison mode of FNC 55 (HSZ) instruction)" and
"frequency control mode of FNC 55 (HSZ) instruction" can each only be used once.
7
Basic
Instruction
Do not drive FNC 57 (PLSY), FNC 58 (PWM), FNC 59 (PLSR), FNC150 (DSZR), FNC151 (DVIT), FNC156 (ZRN),
FNC157 (PLSV), FNC158 (DRVI) and FNC159 (DRVA) instructions at the same time for the same output number.
6
Before
Programming
Some applied instructions can be programmed two or more times, but the number of simultaneous instances is
limited.
Even in instructions not shown below, if two or more instructions are driven at the same time for the same I/O number,
it is regarded as double outputs. In some combinations of instructions, the operation may be disrupted, or the
instructions cannot be executed.
For details, refer to the caution described in each instruction page.
For combinations of instructions, refer to "6.4 Mutual Relationship Among Program Flow Control Instructions".
5
Specified the
Device &
Constant
When using above instructions beyond the allowable number of times of use
For instructions whose operands allow indexing, device numbers and numeric values in such instructions can be
changed by index registers.
By indexing, when driving multiple instances simultaneously is not required, such instruction can be used as if they
were used beyond the allowable number of times.
Refer to "Subsection 5.7.3. Indexing example for instruction with limited number of use.".
10
FNC20-FNC29
Arith. & Logic
Operation
179
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
6.6
6.6.1
Cautions
When symbolic information is stored, it is deleted if the memory capacity set by parameters is changed.
After changing the memory capacity, write the symbolic information again.
Memory cassettes (except for the FX3U-FLROM-1M) which save symbolic information are also supported
by FX3U/FX3UC PLCs whose version is earlier than Ver. 3.00. In that case, the FX3U/FX3UC PLC operates,
but the written symbolic information is invalid.
For writing symbolic information and changing the set values of timers and counters using a peripheral
device, it is recommended to create programs with set values specified indirectly.
If the set values are specified directly, programs cannot be restored from symbolic information after the set
values are changed.
6.6.2
Block password
In GX Works2, program parts can be protected by setting the block password.
In the FX3U/FX3UC PLC Ver. 3.00 or later, the setting "Read-protect the execution program" is available for the block
password.
Refer to the GX Works2 Version 1 Operating Manual (Common) for the details on the block password.
Cautions
In the PLC written by the computer using a project including a block password for which the setting "Readprotect the execution program" is valid, restoration of programs is enabled only when the PLC stores the
symbolic information.
For editing programs using a peripheral device which cannot read symbolic information (only supported by
GX Works2 Ver. 1.62Q or later), do not use a block password for which the setting "Read-protect the
execution program" is valid.
When a peripheral device tries to read an execution program from the PLC that has been written to by a
computer using a project including a block password for which the setting "Read-protect the execution
program" is valid, a communication error occurs and reading is disabled.
For writing a program using a peripheral device other than GX Works2 (Ver. 1.62Q or later) to a PLC that
has been written to by a computer using a project including a block password for which the setting "Readprotect the execution program" is valid, execute "Clear PLC memory" to clear programs before writing.
If a program is written without executing "Clear PLC memory" in advance, the written program cannot be
read.
It is not possible to write programs including the block password for which the setting "Read-protect the
execution program" is valid to the FX3U/FX3UC PLC whose version is earlier than 3.00.
If a memory cassette which saves programs including a block password for which the setting "Readprotect the execution program" is valid is used for the FX3U/FX3UC PLC whose version is earlier than 3.00,
the FX3U/FX3UC PLC does not run normally.
180
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
1
Introduction
7.
Basic Instruction
Mnemonic
Name
Symbol
Function
Applicable devices
Reference
Contact Instruction
X,Y,M,S,D .b,T,C
Section 7.1
X,Y,M,S,D .b,T,C
Section 7.1
LD
Load
LDI
Load Inverse
Applicable devices
LDP
Load Pulse
Applicable devices
X,Y,M,S,D .b,T,C
Section 7.5
LDF
Applicable devices
X,Y,M,S,D .b,T,C
Section 7.5
AND
AND
Applicable devices
Serial connection of NO
(normally open) contacts
X,Y,M,S,D .b,T,C
Section 7.3
ANI
AND Inverse
Applicable devices
Serial connection of NC
(normally closed) contacts
X,Y,M,S,D .b,T,C
Section 7.3
ANDP
AND Pulse
Applicable devices
X,Y,M,S,D .b,T,C
Section 7.5
ANDF
Applicable devices
X,Y,M,S,D .b,T,C
Section 7.5
Applicable devices
Parallel connection of NO
(normally open) contacts
X,Y,M,S,D .b,T,C
Section 7.4
Applicable devices
Parallel connection of NC
(normally closed) contacts
X,Y,M,S,D .b,T,C
Section 7.4
Applicable devices
X,Y,M,S,D .b,T,C
Section 7.5
Basic
Instruction
Instruction
List
Applicable devices
2
Overview
Applicable devices
X,Y,M,S,D .b,T,C
Section 7.5
OR Inverse
ORP
OR Pulse
ORF
OR Falling Pulse
6
Before
Programming
ORI
5
Specified the
Device &
Constant
OR
Devices
in Detail
OR
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
181
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
Mnemonic
Name
Symbol
Function
Applicable devices
Reference
Connection Instruction
ANB
AND Block
Section 7.7
ORB
OR Block
Parallel connection of
multiple contact circuits
Section 7.6
MPS
Memory Point
Store
MPS
MRD
Memory Read
MRD
MPP
Memory POP
MPP
INV
Inverse
MEP
MEF
Section 7.8
Section 7.8
Section 7.8
Section 7.10
MEP
Conversion of
operation result
to leading edge pulse
Section 7.11
MEF
Conversion of
operation result
to trailing edge pulse
Section 7.11
INV
Out Instruction
Applicable devices
Y,M,S,D .b,T,C
Section 7.2
Y,M,S,D .b
Section 7.13
Reset
Y,M,S,D .b,T,C,
D,R,V,Z
Section 7.13
PLS
Pulse
Y,M
Section 7.12
PLF
Pulse Falling
Y,M
Section 7.12
Section 7.9
OUT
OUT
SET
SET
RST
Master Control
MC N Applicable devices
MCR
Master Control
Reset
MCR N
Section 7.9
Section 7.14
Section 7.15
Other Instruction
NOP
No Operation
End Instruction
END
182
END
END
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
LD, LDI
Introduction
7.1
Outline
LD and LDI instructions are contacts connected to bus lines.
When combined with ANB instruction described later, LD and LDI instructions can be used for the start of branches.
Overview
1. Instruction format
Basic Instruction
LD
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
LD
Load
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
LDI
Load
Inverse
3
Instruction
List
Basic Instruction
LDI
Bit Devices
Word Devices
System User
Digit Specification
System User
LDI
S S
1 2
1 2
C D R U \G
Z Modify K
S3
S4
S3
S4
Real
CharacPointer
Number ter String
E
" "
Special auxiliary relays (M) and 32-bit counters (C) cannot be indexed with index registers (V and Z).
State relays (S) cannot be indexed with index registers (V and Z).
"D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
This function is supported only in FX3U/FX3UC PLCs.
X000
List program
LD instruction
0000 LD X000
0001 OUT Y000
Y000
Basic
Instruction
Circuit program
Before
Programming
S1:
S2:
S3:
S4:
S S
Index
Constant
Specified the
Device &
Constant
LD
S
1
Others
Special
Unit
4
Devices
in Detail
2. Applicable devices
Instruction
Bus line
X000
ON
ON
Y000
ON
ON
FNC00-FNC09
Program Flow
Timing chart
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
183
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
List program
LDI instruction
Y000
Bus line
Timing chart
ON
X000
ON
ON
Y000
ON
3. Indexing*1
Devices used in LD and LDI instructions allow indexing with index registers (V and Z).
(State relays (S), special auxiliary relays (M), 32-bit counters (C), and "D .b" cannot be indexed.)
Circuit program
List program
X000V0
Y000
*1.
0000 LD X000V0
0003 OUT Y000
List program
D0.3
Y000
*1.
0000 LD D0.3
0003 OUT Y000
Errors
When an I/O number used in LD or LDI instruction does not exist due to indexing, M8316 (Non-existing I/O
specification error) turns ON.
When the device number of a device (M, T or C) other than I/O used in LD or LDI instruction does not exist due to
indexing, an operation error (error code: 6706) occurs.
184
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
OUT
Introduction
7.2
7.2 OUT
Outline
OUT instruction drives coils of output relays (Y), auxiliary relays (M), state relays (S), timers (T) and counters (C).
Basic Instruction
OUT
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
OUT
OUT
Overview
1. Instruction format
Instruction
List
2. Applicable devices
Bit Devices
Instruction
Word Devices
System User
Digit Specification
System User
1 2
Z Modify K
S3
Real
CharacPointer
Number ter String
E
" "
S5
S
Set
value
S5
Special auxiliary relays (M) and 32-bit counters (C) cannot be indexed with index registers (V and Z).
State relays (S) cannot be indexed with index registers (V and Z).
"D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
This function is supported only in FX3U/FX3UC PLCs.
5
Specified the
Device &
Constant
S1:
S2:
S3:
S4:
S5:
C D R U \G
Index
Constant
Devices
in Detail
OUT
S
1
Others
Special
Unit
X000
OUT instruction
Y000
OUT instruction
X001
M100
0000
0001
0002
0003
0004
LD
OUT
LDI
OUT
OUT
X000
Y000
X001
M100
M101
8
FNC00-FNC09
Program Flow
OUT instruction
M101
7
Basic
Instruction
Drive contact of
OUT instruction
Before
Programming
A device described in OUT instruction turns ON or OFF according to the driven contact status.
Parallel OUT instructions can be used consecutively as many times as necessary.
In the program example shown below, OUT M100 and OUT M101 are parallel.
If two or more OUT instructions are executed for the same device number, however, it results in a double output
(double coil) operation.
Circuit program
List program
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
185
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
7.2 OUT
Timing chart
X000
OUT instruction
Y000
X001
ON
ON
ON
ON
ON
ON
OUT instruction
M100
ON
OUT instruction
M101
ON
Direct specification
List program
Circuit program
X000
X001
K30
T0
K30
T1
K50
C0
2)
X000
X001
List program
D10
T10
R15
T11
D20
C10
0000 LD
0001 OUT
(SP)
0004 LDI
0005 OUT
(SP)
0008 OUT
(SP)
X000
T10
D10
X001
T11
R15
C10
D20
Setting range
(Value of K or current value of D or R)
Number of steps
1 ms timer
1 to 32767
10 ms timer
100 ms timer
186
X000
T0
K30
X001
T1
K30
C0
K50
Indirect specification
Circuit program
3)
0000 LD
0001 OUT
(SP)
0004 LDI
0005 OUT
(SP)
0008 OUT
(SP)
1 to 32767
16-bit counter
1 to 32767
Same as left
32-bit counter
2,147,483,648 to +2,147,483,647
Same as left
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
7.2 OUT
1
Introduction
3. Indexing
*1
Devices used in OUT instruction can be indexed with index registers (V and Z).
(State relays (S), special auxiliary relays (M), 32-bit counters (C), and "D .b" cannot be indexed.)
Circuit program
*1.
Y000Z0
0000 LD X000
0001 OUT Y000Z0
A bit in data register (D) can be specified as a device used in OUT instruction.
*1.
D0.3
0000 LD X000
0001 OUT D0.3
4
Devices
in Detail
X000
List program
Instruction
List
Circuit program
2
Overview
X000
List program
When a special internal relay (M), timer or counter is used, program steps increase as described in "Setting range
of timers and counters" on the previous page.
Do not use the last bit number of a data register (D) or extension register (R) as the set value of a 32-bit counter.
When an I/O number used in OUT instruction does not exist due to indexing, M8316 (Non-existing I/O specification
error) turns ON.
When the device number of a device (M, T or C) other than I/O used in OUT instruction does not exist due to
indexing, an operation error (error code: 6706) occurs.
6
Before
Programming
Errors
Specified the
Device &
Constant
Caution
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
187
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
7.3
AND, ANI
Outline
AND and ANI instructions connect one contact in series.
The number of contacts connected in series is not limited, so AND and ANI instructions can be used consecutively as
many times as necessary.
Output to another coil by way of a contact after the OUT instruction is called cascade output.
Such a cascade output can be repeated as many times as necessary as long as the order is correct.
1. Instruction format
Basic Instruction
AND
Mnemonic
AND
AND
Basic Instruction
ANI
Mnemonic
ANI
AND Inverse
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Applicable devices
Bit Devices
Instruction
Word Devices
System User
Digit Specification
System User
S1:
S2:
S3:
S4:
S
1
S S
S S
1 2
1 2
Others
Special
Unit
C D R U \G
Constant
Index
V
Z Modify K
S3
S4
S3
S4
Real
CharacPointer
Number ter String
E
Special auxiliary relays (M) and 32-bit counters (C) cannot be indexed with index registers (V and Z).
State relays (S) cannot be indexed with index registers (V and Z).
"D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
This function is supported only in FX3U/FX3UC PLCs.
List program
AND instruction
X002
0000 LD X002
0001 AND X000
0002 OUT Y003
X000
Y003
Timing chart
LD instruction
X002
AND instruction
X000
Y003
188
" "
ON
ON
ON
ON
ON
Contact connected
in series
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
1
Circuit program
Introduction
X002
0000 LD X002
0001 ANI X000
0002 OUT Y003
X000
Y003
Contact connected
in series
Overview
Timing chart
X002
ANI instruction
X000
ON
ON
ON
ON
Y003
ON
*1
Devices
in Detail
3. Indexing
ON
Instruction
List
LD instruction
Devices used in AND and ANI instruction can be indexed with index registers (V and Z).
(State relays (S), special auxiliary relays (M), 32-bit counters (C), and "D .b" cannot be indexed.)
Circuit program
List program
Y003
0000 LD X002
0001 AND X000V0
0004 OUT Y003
5
Specified the
Device &
Constant
X002 X000V0
6
Before
Programming
*1.
D0.3
Y003
Errors
When the device number of a device (M, T or C) other than I/O used in AND or ANI instruction does not exist due to
indexing, an operation error (error code: 6706) occurs.
9
FNC10-FNC19
Move & Compare
When an I/O number used in AND or ANI instruction does not exist due to indexing, M8316 (Non-existing I/O
specification error) turns ON.
FNC00-FNC09
Program Flow
*1.
0000 LD X002
0001 AND D0.3
0004 OUT Y003
Basic
Instruction
X002
List program
10
FNC20-FNC29
Arith. & Logic
Operation
189
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
Program examples
Circuit program
List program
AND instruction
X000 X001
Y003
ANI instruction
X002 X003
Y004
AND instruction
X004
K30
T0
ANI instruction
X005
190
T0
Y005
0000
0001
0002
0003
0004
0005
0006
0007
LD
AND
OUT
LD
ANI
OUT
AND
OUT
(SP)
0010 LD
0011 ANI
0012 OUT
X000
X001
Y003
X002
X003
Y004
X004
T0
K30
X005
T0
Y005
Contact connected
in series
Contact connected
in series
Contact connected
in series
Contact connected
in series
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
OR, ORI
Introduction
7.4
Outline
2
Overview
1. Instruction format
Basic Instruction
OR
Mnemonic
Basic Instruction
ORI
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
ORI
Devices
in Detail
OR Inverse
Instruction
List
OR
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
OR
2. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
S S
S S
1 2
1 2
C D R U \G
Index
V
Constant
Z Modify K
S3
S4
S3
S4
Real
CharacPointer
Number ter String
E
" "
Special auxiliary relays (M) and 32-bit counters (C) cannot be indexed with index registers (V and Z).
State relays (S) cannot be indexed with index registers (V and Z).
"D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
This function is supported only in FX3U/FX3UC PLCs.
Basic
Instruction
Circuit program
Y000
X001
FNC00-FNC09
Program Flow
0000 LD X000
0001 OR X001
0002 OUT Y000
X000
Timing chart
ON
X000
OR instruction
X001
ON
Y000
ON ON
FNC10-FNC19
Move & Compare
ON
LD instruction
Before
Programming
S1:
S2:
S3:
S4:
S
1
Others
Special
Unit
Specified the
Device &
Constant
Instruction
ON
10
ON
FNC20-FNC29
Arith. & Logic
Operation
191
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
List program
0000 LD X000
0001 ORI X002
0002 OUT Y001
X000
Y001
X002
Timing chart
LD instruction
X000
ORI instruction
X002
ON
ON
ON
ON
Y001
ON
ON
ON
ON
LD
LD
OR
OR
Before ANB
instruction
OR
OR
After ANB instruction
4. Indexing*1
Devices used in OR and ORI instruction can be indexed with index registers (V and Z).
(State relays (S), special auxiliary relays (M), 32-bit counters, and "D .b" cannot be indexed.)
Circuit program
List program
X000
Y000
X001V0
*1.
192
0000 LD X000
0001 OR X001V0
0004 OUT Y000
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
1
5. Bit specification of data register (D)
A bit in data register (D) can be specified as a device used in OR and ORI instructions.
Circuit program
List program
Y000
D0.3
3
Instruction
List
*1.
0000 LD X000
0001 OR D0.3
0004 OUT Y000
Overview
X000
Introduction
*1
Errors
When an I/O number used in OR or ORI instruction does not exist due to indexing, M8316 (Non-existing I/O
specification error) turns ON.
4
Devices
in Detail
When the device number of a device (M, T or C) other than I/O used in OR or ORI instruction does not exist due to
indexing, an operation error (error code: 6706) occurs.
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
193
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
7.5
Outline
LDP, ANDP, and ORP instructions for contacts detect the rising edge, and become active during one operation cycle
only at the rising edge of a specified bit device (that is, when the bit device turns from OFF to ON).
Contact instructions LDF, ANDF and ORF detect the falling edge, and become active during one operation cycle only
at the falling edge of a specified bit device (that is, when the bit device turns from ON to OFF).
1. Instruction format
Basic Instruction
LDP
Mnemonic
Load Pulse
LDP
Basic Instruction
LDF
Mnemonic
LDF
Basic Instruction
ANDP
Mnemonic
AND Pulse
ANDP
Basic Instruction
ANDF
Mnemonic
ANDF
Basic Instruction
ORP
Mnemonic
OR Pulse
ORP
Basic Instruction
ORF
Mnemonic
OR Falling Pulse
ORF
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Applicable devices
Bit Devices
Instruction
Word Devices
System User
Digit Specification
System User
LDF
ANDP
ANDF
ORP
ORF
S:
194
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
1
Introduction
0000
0002
0004
0005
0006
0008
M0
X001
ORP instruction
M8000
X002
ANDP instruction
LDP
ORP
OUT
LD
ANDP
OUT
2
Overview
X000
List program
X000
X001
M0
M8000
X002
M1
3
Instruction
List
M1
RUN monitor
Timing chart
X000
ORP instruction
X001
ON
ON
Specified the
Device &
Constant
ON
ON
ON
ON during
one operation cycle
In the example shown above, M0 or M1 is ON during only one operation cycle when X000 to X002 turn from OFF to
ON.
Before
Programming
M1
5
ON
M8000
X002
ON
ON during one
operation cycle
M0
ANDP instruction
ON
Devices
in Detail
LDP instruction
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
195
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
2. LDF, ANDF, and ORF instructions (initial logical operation of falling/trailing edge pulse, serial
connection of falling/trailing edge pulse, and parallel connection of falling/trailing edge pulse)
Circuit program
X000
List program
LDF instruction
0000
0002
0004
0005
0006
0008
M0
X001
M8000
ORF instruction
X002
ANDF instruction
M1
LDF
ORF
OUT
LD
ANDF
OUT
X000
X001
M0
M8000
X002
M1
RUN monitor
Timing chart
LDF instruction
X000
ORF instruction
X001
ON
ON
ON
ON during
one operation cycle
M0
ON
M8000
ANDF instruction
X002
M1
ON
ON
ON
ON
ON during
one operation cycle
In the example shown above, M0 or M1 is ON during only one operation cycle when X000 to X002 turn OFF from ON.
196
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
1
Introduction
<Pulse instruction>
X010
X010
M6
PLS
M6
Overview
X010
M 6
Operation
cycle
Operation
cycle
In each circuit, M6 is ON during only one operation cycle when X010 turns from OFF to ON.
X020
FNC 12
MOV
Instruction
List
D0
X020
FNC 12
MOVP
K10
D0
In each circuit, MOV instruction is executed only once when X020 turns from OFF to ON.
Devices
in Detail
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
197
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
M0
SET
M50
X000
M0
[2] M0
[3]
SET
M51
SET
M52
M0
[4] M0
M53
<M2800 to M3071>
M2800
M2800
X000
M2800
M2800
M2800
M2800
M2800
SET
M0
SET
M1
M2800
SET
M2
SET
M3
Block B
SET
M4
SET
M5
SET
M6
M2800
M7
198
Block A
Block C
From M2800 driven by X000, the program is divided into the upper
block (block A) and the lower block (block B). In each of the blocks
A and B, only the first contact which detects the rising or falling edge
is activated.
Because of LD instruction, the contact in the block C is conductive
while M2800 is ON.
By utilizing these characteristics, "transition of state by same signal"
in a step ladder circuit can be efficiently programmed.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
1. Cautions when the LDP, LDF, ANDP, ANDF, ORP, or ORF instruction programmed in the same
step is executed two or more times within one operation cycle
When LDP, LDF, ANDP, ANDF, ORP or ORF instruction programmed in the same step is executed two or more times
within one operation cycle, the following operation results:
FNC 09
NEXT
2)
4
Devices
in Detail
1)
Instruction
List
Operation
X000
FNC 08
FOR
2
Overview
Introduction
Cautions
OFF
Not executed
Not executed
ON
Executed*1
Not executed
FNC00-FNC09
Program Flow
*1.
7
Basic
Instruction
6
Before
Programming
2)
5
Specified the
Device &
Constant
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
199
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
7.6
7.6 ORB
ORB
Outline
A circuit in which two or more contacts are connected in series is called serial circuit block.
1. Instruction format
Basic Instruction
ORB
1 step
Mnemonic
ORB
OR Block
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Applicable devices
Bit Devices
Instruction
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
List program
X001
Y006
ORB instruction
X002
X003
ORB instruction
X004
Appropriate program
0000 LD
X000
0001 AND X001
0002 LD
X002
0003 AND X003
0004 ORB
0005 LDI X004
0006 AND X005
0007 ORB
0008 OUT Y006
Inappropriate program
0000 LD
X000
0001 AND X001
0002 LD
X002
0003 AND X003
0004 LDI X004
0005 AND X005
0006 ORB
0007 ORB
0008 OUT Y006
X005
Caution
There is no limitation in the number of parallel circuits which can be connected by ORB instructions (in the case of
appropriate program shown above).
Though ORB instructions can be used at one time, note that the repeated use of LD or LDI instruction is limited to 8 or
less (in the case of inappropriate program shown above).
200
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
ANB
Introduction
7.7
7.7 ANB
Outline
1. Instruction format
Basic Instruction
ANB
1 step
Mnemonic
ANB
3
Instruction
List
AND Block
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
ANB
X000
List program
LD
X002
X003
Y007
X004
X005
X006
Parallel block
LD
OR
LD
AND
LDI
AND
ORB
OR
ANB
OR
OUT
X000
X001
X002
X003
X004
X005
It is connected to the
preceding circuit in series.
Basic
Instruction
X003
ORB
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
Before
Programming
X001
Specified the
Device &
Constant
4
Devices
in Detail
Instruction
2
Overview
Use ANB instruction to connect a branch circuit (parallel circuit block) to the preceding circuit in series.
Use LD or LDI instruction at the start of branch. After completing a parallel circuit block, connect the parallel circuit
block to the preceding circuit in series by ANB instruction.
When there are many parallel circuits, ANB instruction can be used in each circuit block to connect them.
FNC00-FNC09
Program Flow
Caution
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
201
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
7.8
Outline
FX3G, FX3U FX3GC and FX3UC PLCs have 11 memories called "Stack" which store the intermediate result (ON or OFF)
of operations.
1. Instruction format
Basic Instruction
MPS
1 step
Memory Point Store
Basic Instruction
MRD
1 step
Mnemonic
MRD
Memory Read
Basic Instruction
MPP
Mnemonic
MPS
1 step
Mnemonic
MPP
Memory POP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Applicable devices
Bit Devices
Instruction
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
Index
C D R U \G
MPS
MRD
MPP
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
1. MPS, MRD, and MPP instructions (stores the current result of the internal PLC operations, reads
the current result of the internal PLC operations, and pops (recalls and removes) the currently
stored result)
18
MPS
X004 X005
X006
MRD
MRD
MPP
Y002
Y003
Y004
X007
Y005
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
LD
MPS
AND
OUT
MRD
AND
OUT
MRD
OUT
MPP
AND
OUT
END
X004
X005
Y002
1
2
3
X006
Y003
Y004
X007
Y005
[2]
[1]
MPP
MRD
MPS
MPP
10
11
Stack
Use MPS instruction to store the intermediate result of operation, and then drive the output Y002.
Use MRD instruction to read the stored data, and then drive the output Y003.
MRD instruction can be programmed as many times as necessary.
In the final output circuit, use MPP instruction instead of MRD instruction.
MPP instruction reads the stored data described above, and then resets it.
Error
MPS instruction can be used two or more times.
However, the difference between number of MPS instructions and the number of MPP instructions should be 11 or
less, and should be 0 at the end.
202
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
1)
Introduction
Program examples
Program example 1: One stack
Only one stack is used in this example.
Circuit program
List program
MPS
X001
X002
Y000
Y001
MPP
MPS
X004
Y002
X005
Y003
MPP
X006
X007
Y004
X010
Y005
X011
MRD
X012
Y006
Y007
2)
Y001
X003
X004
Y002
X005
Y003
X006
X007
Y004
X010
Y005
X011
Y006
X012
Y007
Before
Programming
MPP
X002
Y000
Specified the
Device &
Constant
MRD
X000
X001
Devices
in Detail
MPS
LD
AND
MPS
AND
OUT
MPP
OUT
LD
MPS
AND
OUT
MPP
AND
OUT
LD
MPS
AND
OUT
MRD
AND
OUT
MRD
AND
OUT
MPP
AND
OUT
Instruction
List
X003
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
Overview
X000
List program
MPS
X001
Y000
X002
X003
X004
Y001
X005
X006
X007
Y002
MPP
X010
X011
X000
X001
X002
Y000
X003
X004
X005
X006
9
FNC10-FNC19
Move & Compare
Y003
Y001
X007
Y002
X010
X011
10
FNC20-FNC29
Arith. & Logic
Operation
LD
MPS
LD
OR
ANB
OUT
MRD
LD
AND
LD
AND
ORB
ANB
OUT
MPP
AND
OUT
LD
OR
ANB
OUT
FNC00-FNC09
Program Flow
MRD
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
Basic
Instruction
X000
Y003
203
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
List program
X001
X002
Y000
MPS
X003
MPS
Y001
MPP
X004
X005
Y002
MPP
X006
MPS
Y003
MPP
4)
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
LD
MPS
AND
MPS
AND
OUT
MPP
AND
OUT
MPP
AND
MPS
AND
OUT
MPP
AND
OUT
X000
X001
X002
Y000
X003
Y001
X004
X005
Y002
X006
Y003
List program
MPS
X001
MPS
X002
MPS
X003
X004
Y000
Y001
MPP
Y002
MPP
Y003
0000
0001
0002
0003
0004
0005
0006
0007
0008
LD
MPS
AND
MPS
AND
MPS
AND
MPS
AND
0000
0001
0002
0003
0004
0005
0006
0007
0008
0009
LD
OUT
AND
OUT
AND
OUT
AND
OUT
AND
OUT
X000
X001
X002
X003
X004
0009
0010
0011
0012
0013
0014
0015
0016
0017
OUT
MPP
OUT
MPP
OUT
MPP
OUT
MPP
OUT
Y000
Y001
Y002
Y003
Y004
MPP
Y004
MPP
X000
Y004
X001
Y003
X002
Y002
X003
Y001
X004
X000
Y004
X001
Y003
X002
Y002
X003
Y001
X004
Y000
Y000
In programming a circuit on the upper side, it is necessary to MPS instruction three times.
By changing the circuit on the upper side into the circuit on the lower side, the same contents can be programmed
easily without MPS instruction.
204
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
MC, MCR
Introduction
7.9
Outline
2
Overview
When MC instruction is executed, the bus line (LD or LDI point) is moved to a position after MC contact.
The bus line can be returned to the original position by MCR instruction.
By changing a device (Y or M) number, MC instruction can be used as many times as necessary.
If the same device number is used twice, however, it results in the double coil operation in the same way as OUT
instruction.
1. Instruction format
Basic Instruction
MC
Mnemonic
Master Control
Basic Instruction
MCR
2 steps
Mnemonic
MCR
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Devices
in Detail
Master Control
Reset
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Instruction
List
MC
2. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
MCR
1. MC and MCR instructions (denotes the start of a master control block and denotes the end of a
master control block)
MC
N 0
M100
X001
M100
Y000
X002
Y001
N 0
0004
0005
0006
0007
0008
LD
MC
SP
LD
OUT
LD
OUT
MCR
X000
N000
Three-step instruction
M100
X001
Y000
X002
Y001
N 0 Two-step instruction
10
FNC20-FNC29
Arith. & Logic
Operation
MCR
0000
0001
FNC10-FNC19
Move & Compare
N0
List program
8
FNC00-FNC09
Program Flow
Circuit program
7
Basic
Instruction
When MC instruction is executed, the bus line is moved to a position after MC contact.
Drive instructions connected to the bus line after the MC contact execute each operation only when the MC instruction
is executed, and execute each operation in the contact OFF status regardless of the contact status before drive
instructions when a MC instruction is not executed. If an instruction (such as FOR/NEXT, EI and DI instruction) not
requiring a contact instruction exists in a circuit using master control, such an instruction is executed regardless of the
MC instruction execution command.
In the program example below, the instructions from MC to MCR are executed as they are while the input X000 is ON.
However, while the input X000 is OFF, each driven device offers the following operation:
Timers (except retentive type timers) and devices driven by OUT instruction: Turn OFF.
Retentive type timers, counters and devices driven by SET/RST instruction: Hold the current status.
The expressions of circuit programs used to explain operations are circuits (for reading or monitoring) of GX Works2
and GX Developer.
Before
Programming
X000
5
Specified the
Device &
Constant
Instruction
205
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
Caution
1. A circuit error (Error code: 6611) occurs when an instruction connected the bus line (such as LD
and LDI) is not present just after the MC instruction.
2. Cautions on writing during RUN
The PLC cannot detect errors if an instruction is added between the MC instruction and the N instruction by write
during RUN.
The PLC can detect errors after it is set to the STOP mode once and then to the RUN mode again.
Program examples
1)
List program
X000
MC
N0
N 0
M100
M100
X001
Y000
X002
0000
0001
0004
0005
0006
0007
0008
LD
MC
SP
LD
OUT
LD
OUT
MCR
X000
N000
Three-step instruction
M100
X001
Y000
X002
Y001
N000 Two-step instruction
Y001
MCR
N 0
M150
X003
MC
N0
N 0
M150
X004
Y002
X005
Y003
MCR
206
N 0
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
Circuit program
While X000
is OFF
X000
MC
M100
N0
M100
X001
Level N0
The bus line B is active while X000 is ON.
Y000
[B]
N1
X002
MC
N 1
M101
N1
Devices
in Detail
While
X002 is
OFF
Instruction
List
[A]
N0
N 0
2
Overview
Introduction
2)
M101
Level N1
The bus line C is active while both X000 and
X002 are ON.
X003
Y001
[C]
X004
N2
M102
MC
N 2
M102
N2
6
Y002
MCR
N 2
Before
Programming
Level N2
The bus line D is active while all of X000,
X002 and X004 are ON.
X005
[D]
Specified the
Device &
Constant
While
X004
is OFF
X006
Basic
Instruction
N2
Level N1
The bus line returns to the status of the bus
line C by "MCR N2".
Y003
8
MCR
N 1
N1
X007
Level N0
The bus line returns to the status of the bus
line B by "MCR N1".
Y004
[B]
N 0
X010
Y005
N0
[A]
207
10
FNC20-FNC29
Arith. & Logic
Operation
Initial status
The bus line returns to the initial status of the
bus line A by "MCR N0". Accordingly, Y005
turns ON or OFF by turning ON or OFF of
X010 regardless of X000, X002 and X004.
FNC10-FNC19
Move & Compare
MCR
FNC00-FNC09
Program Flow
[C]
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
7.10
7.10 INV
INV
Outline
1. Instruction Format
INV instruction inverts the operation result up to just before INV instruction, and does not require device number
specification.
Basic Instruction
INV
1 step
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
INV
Inverse
2. Applicable devices
Bit Devices
Instruction
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
E
" "
Circuit program
Timing chart
ON
X000
Y000
X000 OFF
0 LD
X000
1 INV
2 OUT Y000
OFF
Y000 ON
OFF
ON
OFF
ON
ON
OFF
Inverted
In the figure above, Y000 turns ON when X000 is OFF, and Y000 turns OFF when X000 is ON.
INV instruction can be used in the same position as serial contact instructions (AND, ANI, ANDP and ANDF).
Different from LD, LDI, LDP and LDF instructions shown in the list, INV instruction cannot execute connection to bus
lines. Different from OR, ORI, ORP and ORF instructions, INV instruction cannot be used independently in parallel to
a contact instruction.
LD
LD
LD
LD
LD
LD
INV instruction inverts the operation result after LD, LDI, LDP or LDF instruction located before INV instruction.
Accordingly, if INV instructions are used inside ORB and ANB instructions, blocks after LD, LDI, LDP or LDF
instruction seen from each INV instruction are regarded as the target of INV operation.
208
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
MEP, MEF
Introduction
7.11
Outline
MEP and MEF commands are instructions that change the operation results to pulses so that device numbers do not
have to be specified.
1)
MEP
The operation results up to the MEP instruction become conductive when the driving contacts turn from OFF to
ON.
The use of MEP instructions simplifies the process of changing driving contacts to pulses when multiple contact
points connect in a series.
Overview
2)
MEF
The operation results up to the MEF instruction become conductive when the driving contacts turn from ON to
OFF.
The use of MEF instructions simplifies the process of changing driving contacts to pulses when multiple contact
points connect in a series.
1 step
MEP
Mnemonic
MEP
Basic Instruction
MEF
1 step
MEF
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
5
Specified the
Device &
Constant
MEF
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Devices
in Detail
Basic Instruction
MEP
2. Applicable devices
Bit Devices
Instruction
Word Devices
System User
Digit Specification
System User
C D R U \G
Index
V
MEF
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
List program
SET
M0
0
1
2
3
LD
X000
AND X001
MEP
SET M0
Basic
Instruction
Timing chart
X000
OFF
X001
OFF
ON
M0
OFF
ON
ON
8
FNC00-FNC09
Program Flow
List program
SET
M0
0
1
2
3
LD
X000
AND X001
MEP
SET M0
Timing chart
X000
OFF
X001
OFF
M0
OFF
9
ON
OFF
ON
FNC10-FNC19
Move & Compare
X000 X001
6
Before
Programming
Others
Special
Unit
MEP
Circuit Program
Instruction
List
1. Instruction format
OFF
ON
10
FNC20-FNC29
Arith. & Logic
Operation
209
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
Caution
1. MEP and MEF instructions may not operate normally if the indexed contact is modified and
changed to pulses by sub-routine programs, the FOR and NEXT instructions, etc.
2. As the MEP and MEF instructions operate using the operation results immediately before them,
use at the list program as the AND instruction.
The MEP and MEF instructions cannot be used at the list program as LD or OR.
3. When programmed in a branch, the MEP/MEF instruction judges the rising/falling edge based on
the rung status up to just before the MEP/MEF instruction in the branch.
Circuit program
M0
List program
M1
SET
Y001
M2
0
1
2
3
4
5
LD
LD
MEP
OR
ANB
SET
M0
M1
M2
Y001
Judges the rising/falling edge based on the rung status in this range.
2)
MEP Instruction
MEF Instruction
OFF
OFF (non-conductive)
OFF (non-conductive)
ON
ON (conductive)
OFF (non-conductive)
Error
There are no calculation errors in the MEP and MEF instructions.
210
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
PLS, PLF
Introduction
7.12
Outline
1. Instruction format
Basic Instruction
PLS
Mnemonic
PLS
Basic Instruction
PLF
Mnemonic
Pulse Falling
PLF
3
Instruction
List
Pulse
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Applicable devices
Bit Devices
System User
Word Devices
Digit Specification
System User
PLS
PLF
Others
Special
Unit
C D R U \G
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S2
1
S
S2
6
Before
Programming
List program
PLS
M0
Timing chart
0000 LD
X000
0001 PLS M 0
X000
PLS
instruction
M 0
Basic
Instruction
X000
ON
ON during
one operation
cycle
In the figure above, M0 is ON during only one operation cycle when X000 changes from OFF to ON.
List program
X000
PLF
M1
FNC00-FNC09
Program Flow
5
Specified the
Device &
Constant
Devices
in Detail
Instruction
2
Overview
When PLS instruction is executed, an applicable device is activated during only one operation cycle after a drive input
turns ON.
When PLF instruction is executed, an applicable device is activated during only one operation cycle after a drive input
turns OFF.
Timing chart
0000 LD X000
0001 PLF M 1
X000
PLF
instruction
ON
ON during
one operation
cycle
M 1
9
FNC10-FNC19
Move & Compare
In the figure above, M1 is ON during only one operation cycle when X000 changes from ON to OFF.
10
FNC20-FNC29
Arith. & Logic
Operation
211
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
<PLS instruction>
M1
M0
X000
X000
PLS
M0
M1
ON
X000
ON during
one operation
cycle
M 0
ON
M 1
In each case, M0 is ON during only one operation cycle when X000 changes from OFF to ON.
<PLS instruction>
X000
M0
X000
FNC 12
MOV
PLS
M0
K10
D0
FNC 12
MOVP
K10
D0
In each case, MOV instruction is executed only once when X000 changes from OFF to ON.
Caution
1. Cautions on writing during RUN
1)
2)
OFF
Not executed
Not executed
ON
Executed*1
Not executed
*1.
212
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
1
The ZRST instruction resets the last stage for the PLS instruction and PLF instruction of the applicable device. In
addition, the reset state of T and C is also reset.
Introduction
3. Caution for simultaneous instances of the ZRST instruction and the PLS instruction
Circuit program
M0
ZRST
M100
PLS
M0
Overview
M0
X000
Timing chart
X000
Instruction
List
one operation
cycle
one operation
cycle
M 0
4
Devices
in Detail
PLS instruction
execution
ZRST instruction
execution
PLS instruction
execution
ZRST instruction
execution
5
Specified the
Device &
Constant
M0
M100
X000
When the PLC mode is switched in the way "RUN STOP RUN (or power supply ON (RUN) power supply OFF
power supply ON (RUN))" while a drive input remains ON, PLS M600 does not operate. However, it is possible to
operate PLS M600 (latched device) by resetting once using the ZRST instruction.
Timing chart
M8002
ZRST
M600
M700
PLS
M600
X000
X000
RUN/STOP
RUN
STOP
ON during one
operation cycle
RUN
ON during one
operation cycle
8
FNC00-FNC09
Program Flow
PLS
M600
instruction (latched device)
7
Basic
Instruction
Circuit program
Before
Programming
M0
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
213
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
7.13
SET, RST
Outline
1)
Setting a bit device (SET instruction (set bit device latch ON))
When the command input turns ON, SET instruction sets to ON an output relay (Y), auxiliary relay (M), state relay
(S) and bit specification (D .b) of word device.
Even if the command input turns OFF after that, the device which was set to ON by SET instruction remains ON.
2)
3)
Clearing the present value of a word device (RST instruction reset bit device OFF))
RST instruction clears the current value of a timer (T), counter (C), data register (D), extension register (R) or
index register (V)(Z).
RST instruction can be used to clear to "0" the contents of a data register (D) or index register (V)(Z). (The same
result can be obtained by MOV instruction which transfers the constant K0.)
RST instruction can be used also to reset the current value and return the contact of retentive type timers T246 to
T255.
SET and RST instructions can be used for the same device as many times as necessary in an arbitrary order.
1. Instruction format
Basic Instruction
SET
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
SET
SET
Basic Instruction
RST
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
RST
Reset
2. Applicable devices
Bit Devices
Instruction
System User
Word Devices
Digit Specification
System User
S1:
S2:
S3:
S4:
214
S
1
S S2
2 S4
S S S2
1 2 S4
C D
Others
Special
Unit
U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S4
S S S2
1 2 S3
S S
2 2
S4
Special auxiliary relays (M) and 32-bit counters (C) cannot be indexed with index registers (V and Z).
Index modifiers (V and Z) are not available.
This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
This function is supported only in FX3U/FX3UC PLCs.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
SET instruction drives the coil for an output relay (Y), auxiliary relay (M), state relay (S) and bit specification of data
register (D).
Introduction
SET instructions located in parallel can be used consecutively as many times as necessary.
In the program example shown below, "RST Y000" after "SET Y000" corresponds to this usage.
List program
X000
SET
X001
RST
Y000
LD
SET
LD
RST
X000
Y000
X001
Y000
Timing chart
X000
ON
X001
Y000
ON
3
Instruction
List
0
1
2
3
Y000
Overview
Circuit program
ON
SET
instruction
RST
instruction
C 0
K10
C 0
Y000
RST
CUUU
Counting coil
CUUU
K or D
CUUU
8
FNC00-FNC09
Program Flow
X012
7
Basic
Instruction
X011
Sequence reset
circuit
6
Before
Programming
2)
5
Specified the
Device &
Constant
C 0
Devices
in Detail
1)
Y002
10
FNC20-FNC29
Arith. & Logic
Operation
215
FNC10-FNC19
Move & Compare
As a contact driving the counting coil of a high-speed counter, program a contact which is normally ON when highspeed counting is executed.
If an input relay (X000 to X005) assigned for high-speed counters is used for driving the counting coil, accurate
counting cannot be achieved.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
Cautions on using RST instruction for a jumped program, subroutine program or interrupt program
When RST instruction for a timer or counter is executed in a jumped program, subroutine program or interrupt
program, the timer or counter may be kept in the reset status and the timer or counter may be disabled.
For details, refer to the following sections:
For a jumped program, refer to Subsection 8.1.1.
For a subroutine program, refer to Subsection 8.2.1.
For an interrupt program, refer to Subsection 36.2.3.
3. Indexing*1
Devices used in SET and RST instructions can be indexed with index registers (V)(Z).
(State relays (S), special auxiliary relays (M), 32-bit counters, "D .b", and word devices cannot be indexed.)
Circuit program
List program
X000
SET Y000Z0
X001
0000 LD
0001 SET
0004 LD
0005 RST
X000
Y000Z0
X001
Y000Z0
RST Y000Z0
*1.
List program
X000
SET
D0.3
RST
D0.3
X001
*1.
0000 LD
0001 SET
0004 LD
0005 RST
X000
D0.3
X001
D0.3
Caution
When SET and RST instructions are executed for an output relay (Y) in the same operation, the result of the
instruction located nearest the END instruction (which specifies the end of program) is output.
Errors
When an I/O number used in SET or RST instruction does not exist due to indexing, M8316 (Non-existing I/O
specification error) turns ON.
When the device number of a device (M, T or C) other than I/O used in SET or RST instruction does not exist due
to indexing, an operation error (error code: 6706) occurs.
216
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
NOP
Introduction
7.14
7.14 NOP
Outline
1. Instruction format
1 step
Mnemonic
NOP
No Operation
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Instruction
List
Basic Instruction
NOP
2. Applicable devices
Instruction
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
Devices
in Detail
Bit Devices
2
Overview
5
Specified the
Device &
Constant
ANI NOP
Contact becomes
short-circuit.
Before
Programming
AND NOP
OR NOP
Circuit is
disconnected.
7
Basic
Instruction
ORI NOP
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
217
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
7.15
7.15 END
END
Outline
END instruction specifies the end of a program.
(Do not write the END instruction in the middle of a program.)
1. Instruction format
Basic Instruction
END
1 step
Mnemonic
END
END
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Applicable devices
Bit Devices
Instruction
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
LD
X000
OUT
END
NOP
NOP
Y000
NOP
Output processing
Caution
Do not write END instruction in the middle of a program.
When a program is transferred from a programming tool, all steps after END instruction are replaced with NOP (no
operation) instructions.
218
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
7 Basic Instruction
Device
SET
RST
PLS, PLF
LDP, LDF,
ANDP,
ANDF, ORP,
ORF
MC
M0 to M1535
M1536 to M3583
M3584 to M7679
S0 to S1023
S1024 to S4095
T0 to T191,
T200 to T245
T192 to T199,
T246 to T511
C0 to C199
C200 to C255
X000 to X357
Y000 to Y357
M0 to M7679
T0 to T511
C200 to C255
D0 to D7999,
Special data registers
D8000 to D8511
R0 to R32767
Word devices
with index
D0 to D7999,
Special data registers
D8000 to D8511,
R0 to R32767
Bit specification
in word device
D .b,
Special auxiliary relays
D .b
Word devices
8
FNC00-FNC09
Program Flow
C0 to C199
Basic
Instruction
S0 to S4095
Before
Programming
Y000 to Y357
Specified the
Device &
Constant
X000 to X357
Devices
in Detail
Bit devices
with index
OUT
Instruction
List
Bit devices
LD, LDI,
AND, ANI,
OR, ORI
2
Overview
Instruction
Introduction
7.16
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
219
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
8.
220
FNC No.
Mnemonic
00
CJ
01
CALL
02
SRET
03
IRET
04
Symbol
Function
Reference
CJ
Pn
Conditional Jump
Section 8.1
CALL
Pn
Call Subroutine
Section 8.2
SRET
Subroutine Return
Section 8.3
IRET
Interrupt Return
Section 8.4
EI
EI
Enable Interrupt
Section 8.5
05
DI
DI
Disable Interrupt
Section 8.6
06
FEND
FEND
Section 8.7
07
WDT
WDT
Section 8.8
08
FOR
Section 8.9
09
NEXT
Section 8.10
FOR
NEXT
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
8.1
Outline
Overview
CJ or CJP instruction jumps to a pointer (P); The sequence program steps between CJ or CJP instruction and the
pointer are not executed.
CJ and CJP instructions reduce the scan time, and allow programs with double coils.
1. Instruction format
16-bit Instruction
3 steps
Mnemonic
Operation Condition
32-bit Instruction
CJ
CJP
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
3
Instruction
List
FNC 00
CJ
2. Set data
Operand type
Data type
Pointer number
Devices
in Detail
Pn
Description
Pointer number (P) indicating the label number for the jump destination
(FX3S: n=0 to 255, FX3G/FX3GC: n=0 to 2047, FX3U/FX3UC: n=0 to 4095)
(P63 jumps to END instruction.)
3. Applicable devices
Bit Devices
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
Pn
While the command input is ON, CJ or CJP instruction executes a program with a specified label (pointer number).
In the case of CJ instruction
User program
FNC 00
CJ
Pn
User program
which is skipped and is not executed when the command turns ON
Label
Pn
CJ
User program
FNC00-FNC09
Program Flow
2)
Command ON
input
Basic
Instruction
Command
FNC 00
CJP
Pn
Pn
User program
which is skipped and is not executed in one operation cycle
when the command turns ON
ON
CJP
Executed in one scan.
User program
10
FNC20-FNC29
Arith. & Logic
Operation
Label
Pn
Command
input
FNC10-FNC19
Move & Compare
Command
Before
Programming
5
Specified the
Device &
Constant
Operand
Type
221
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Cautions
1. Relationship between the label input position and the list program
The figure below shows programming of a label.
When creating a circuit program, move the cursor to the left side of the bus line in the ladder diagram, and input a label
(P) at the head of the circuit block.
X030
FNC 00
CJ
LD
CJ
P 20
X031
Pointer
Y010
X032
Label
P 20
Bus
line
Y011
X030
P 20
LD
X031
OUT Y010
P 20
LD
X032
OUT Y011
Label
X022
FNC 00
CJ
P 10
FNC 00
CJ
P 9
FNC 00
CJ
P 9
X021
Label
P 9
X030
Bad
Label
P9
User program
Label
P9
User program
FNC 00
CJ
P9
Good
FNC 00
CJ
P9
Good
END
222
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
2
Overview
Label
P 63
P 63
END
X000
P15
Bad
FNC 01
CALLP
P15
Good
C0
K10
FNC 06
FEND
M8000
RUN monitor
(normally ON)
Subroutine program
dedicated to CALL
instruction
User program
Specified the
Device &
Constant
Label
P15
4
Devices
in Detail
X001
FNC 00
CJ
Instruction
List
FNC 02
SRET
M8000
RUN monitor
FNC 00
CJ
P5
7
Basic
Instruction
User program
(It is skipped, and is not executed.)
Label
P5
6
Before
Programming
Because M8000 is normally ON while a PLC is operating, unconditional jump is specified when M8000 is used in the
following example:
User program
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
223
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
1. When a jump is necessary after OFF processing
In one operation cycle after X023 changes from OFF to ON, the CJ P7 instruction becomes valid.
By using this method, jump can be executed after all outputs between the CJ P7 instruction and the label P7 turn OFF.
X023
M0
PLS
M0
FNC 00
CJ
P7
X023
Label
P7
224
User program
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1st
circuit
0
4
8
11
18
22
X002
X003
X004
X005
X006
X007
X010
29
Label
P 8
35
40
X000
X012
M1
S1
T0
When the reset (RST) instruction for the retentive type timer
T246 is located outside the jump area
Even if the counting coil (OUT T246) is jumped, reset (return
of the contact and clearing of the current value) is valid.
K 10
RST
T246
T246 K1000
RST
C0
C 0
K 20
FNC 12
MOV
FNC 00
CJ
K 3
D 0
P 9
Y001
Label
P 9
42
X013
T246
RST
C 0
10 ms timer and
100 ms timer (T0)
X004 OFF
X004 ON
X005 OFF
X006 OFF
X005 OFF
X006 ON
Counting is continued (, and the contact is activated after X000 turns OFF).
X007 OFF
X010 OFF
X007 OFF
X010 ON
X011 OFF
X011 ON
9
FNC10-FNC19
Move & Compare
Applied instruction
(MOV)
FNC00-FNC09
Program Flow
Counter
(C0)
Y, M, S
(Y001, M1, S1)
1 ms timer
(T246)
Basic
Instruction
RST
Before
Programming
11th
circuit
X011
Y001
Specified the
Device &
Constant
25
P 8
Devices
in Detail
15
X001
FNC 00
CJ
Instruction
List
X000
2
Overview
Introduction
8.1.1
10
FNC20-FNC29
Arith. & Logic
Operation
225
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. Circuit example 2 for explaining operations (when only an RST instruction for a timer or counter
is jumped)
X012
C0
X011
K10
FNC 00
CJ
X010
P0
RST
C0
Label
P0
Timing chart
Jump operation by CJ
instruction driven by X011
X012
Because C0 remains
Current
value of C0
X010
ON
RST
C0
Remains reset.
Program example for activating a timer and counter even during a jump
X012
C0
X011
K10
FNC 00
CJ
X010
P0
RST
C0
RST
C0
Label
P0
M8000
Timing chart
Jump operation by CJ
instruction driven by X011
X012
Current
value of C0
Counter
is reset.
X010
ON
RST
C0
*1
226
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
The figure below shows the contents of operation and the relationship between the master control instruction.
Avoid using [2], [4] and [5] because the operation will be complicated.
CJ P 0
MC N 0 M 1
CJ P 4
MCR N 0
CJ P 2
CJ P 3
MCR N 0
Specified the
Device &
Constant
MCR N 0
P 4
Devices
in Detail
P 2
Master control
MC N 0 M 2
[3] Jump from inside MC to
inside MC
Jump is disabled while
M0 is OFF.
3
Instruction
List
P 1
Master control
MC N 0 M 0
Overview
CJ P 1
Master control
8.1.2
P 3
6
Before
Programming
P 0
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
227
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
8.2
Outline
This instruction calls and executes a program which should be processed commonly in a sequence program.
This instruction reduces the number of program steps, and achieves efficient program design.
For creating a subroutine program, FEND (FNC 06) and SRET (FNC 02) instructions are required.
1. Instruction format
FNC 01
CALL
16-bit Instruction
3 steps
Mnemonic
Operation Condition
32-bit Instruction
Mnemonic
CALL
CALLP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
Pointer number (P) indicating the label number for the jump destination
(FX3S: P0 to P62 and P64 to P255, FX3G/FX3GC: P0 to P62 and P64 to P2047,
FX3U/FX3UC: P0 to P62 and P64 to P4095)
Pn
Pointer number
P63 is dedicated to CJ (FNC 00) instruction (for jump to END step), it cannot be used as a pointer for CALL (FNC 01)
instruction.
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
Pn
FNC 01
CALL
User program
Label
Pn
Main program
Program area from the step 0 to FEND
instruction
FNC 06
FEND
M8000
RUN monitor
(normally ON)
User program
FNC 02
SRET
228
Pn
Pn
Subroutine program
Program area from a label Pn
instruction
to SRET
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
Caution
1. Using a label (P) number two or more times
In CALL instructions, the same number can be used two or more times in operands (P).
However, do not use a label (P) and number used in another instruction (CJ instruction).
FNC 00
CJ
P9
X030
FNC 01
CALLP
P9
2
Overview
X020
Bad
3
User program
Instruction
List
Label
P9
Program examples
FNC 01
CALL
Devices
in Detail
X000
P 10
Main program
While X000 is ON, the program execution jumps to a
step with the label P10.
FNC 06
FEND
5
Specified the
Device &
Constant
Label
P 10
Subroutine program
When SRET instruction is executed after the subroutine
program has executed, the program execution returns to
the original step +1.
FNC 02
SRET
6
Before
Programming
END
P 11
FNC 06
FEND
Label
P 11
Label
P 12
FNC 01
CALL
FNC 02
SRET
P 12
Main program
When X001 turns from OFF to ON, the program execution
jumps to the label P11 only once.
Subroutine program 1
When SRET instruction is executed, the program
execution returns to the main program.
If X002 is ON while the subroutine program 1 is
executed, the program execution jumps to a step with the
label P12.
FNC00-FNC09
Program Flow
X002
Basic
Instruction
X001
X003
FNC10-FNC19
Move & Compare
FNC 02
SRET
Subroutine program 2
The subroutine program with P12 is executed, and then
the program execution returns to the subroutine program
with P11 by SRET instruction.
END
10
FNC20-FNC29
Arith. & Logic
Operation
229
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
8.2.1
Program example
X000
FNC 01
CALLP
X001
C0
P0
K10
FNC 06
FEND
P0
X000
RST
C0
Y007
FNC 02
SRET
2)
Timing chart
Execution of
subroutine P0
triggered by X000
Subroutine is executed.
X001
Current
value of C0
Counter
is reset.
RST
C0
Remains reset.
Y007
230
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
1)
Introduction
FNC 01
CALLP
X001
X002
K10
RST
Y007
Overview
C0
P0
FNC 06
FEND
X000
RST
C0
RST
C0
Instruction
List
P0
3
A
M8001
Devices
in Detail
RUN monitor
(normally OFF)
Y007
FNC 02
SRET
Timing chart
Specified the
Device &
Constant
2)
Subroutine is
executed.
Execution of P0 is
triggered by X000
X001
RST
C0
Before
Programming
Current
value of C0
7
Basic
Instruction
Y007
X002
Y007 is reset.
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
231
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
8.3
Outline
This instruction returns the program execution from a subroutine to the main program.
1. Instruction format
FNC 02
SRET
1 step SRET
Operation Condition
Continuous
Operation
2. Set data
Operand type
Description
Data type
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
232
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
8.4
Outline
Overview
This instruction returns the program execution from an interrupt routine to the main program.
1. Instruction format
FNC 03
IRET
1 step IRET
Operation Condition
Continuous
Operation
Instruction
List
2. Set data
Operand type
Description
Data type
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
When an interrupt (input, timer or counter) is generated while the main program is executed, the program execution
jumps to an interrupt (I) routine.
IRET instruction returns the program execution to the main routine.
The table below shows three types of jump to an interrupt routine.
Function
Interrupt No.
Description
Reference
I00* to I50*
Timer interrupt
I6** to I8**
Section 36.5
Counter interrupt*1
I010 to I060
Section 36.6
*1.
7
Basic
Instruction
Input interrupt
Executes the interrupt processing when an input (X) signal turns ON or Section 36.3 and
OFF.
Section 36.4
6
Before
Programming
5
Specified the
Device &
Constant
Devices
in Detail
3. Applicable devices
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
233
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Program example
FNC 04
EI
M8000
C255
Main program
Interrupt
pointer
I001
FNC 06
FEND
The rising edge of X000 is detected.
FNC 03
IRET
Interrupt
pointer
I620
Interrupt
pointer
I010
Input interrupt
routine
Interrupt every 20 ms
FNC 03
IRET
Timer interrupt
routine
High-speed counter
FNC 03
IRET
END
234
High-speed counter
routine
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
8.5
Outline
Overview
1. Instruction format
Independent Inst. Mnemonic
1 step EI
Operation Condition
Continuous
Operation
Instruction
List
FNC 04
EI
2. Set data
Operand type
Description
Data type
Devices
in Detail
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
5
Specified the
Device &
Constant
Others
Special
Unit
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
235
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
8.6
Outline
This instruction disables interrupts after interrupts were enabled by EI (FNC 04) instruction.
1. Instruction format
FNC 05
DI
1 step DI
Operation Condition
Continuous
Operation
2. Set data
Operand type
Description
Data type
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
Cautions
Interrupts (requests) generated after DI instruction are processed after EI (FNC 04) instruction is executed
236
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
8.7
Outline
Overview
1. Instruction format
FNC 06
FEND
Operation Condition
Continuous
Operation
1 step FEND
Instruction
List
2. Set data
Operand type
Description
Data type
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
Main routine
program
FNC 00
CJ
P 20
Main routine
program
Jump
X010
Basic
Instruction
FNC 06
FEND
FNC 06
FEND
When X010 is ON
Main routine
program
8
FNC00-FNC09
Program Flow
P20
6
Before
Programming
5
Specified the
Device &
Constant
Devices
in Detail
3. Applicable devices
9
FNC10-FNC19
Move & Compare
END
10
FNC20-FNC29
Arith. & Logic
Operation
237
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 01
CALL
P 21
Main routine
program
When X011
is ON
FNC 06
FEND
P21
Subroutine
program
I100
Interrupt routine
program
END
Cautions
1. When FEND instruction is programmed two or more times
Put a subroutine program or interrupt routine program between last FEND instruction and END instruction.
238
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
8.8
Outline
FNC 07
WDT
1 step
WDT
WDTP
Overview
1. Instruction format
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operand type
Description
Instruction
List
2. Set data
Data type
3. Applicable devices
Bit Devices
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
Command
contact
Command
input
FNC 07
WDTP
6
Before
Programming
Command
contact
Command
input
FNC 07
WDT
7
Basic
Instruction
Each scan is
executed.
Related device
Watchdog timer time
Description
Up to 32767 ms can be set in units of ms (initial value: 200 ms).
FNC00-FNC09
Program Flow
D8000
Name
5
Specified the
Device &
Constant
When the operation cycle (time until END or FEND instruction is executed after the step 0) of a PLC exceeds 200 ms,
a watchdog timer error (indicating abnormal operation) occurs; The ERROR (ERR) LED lights, and the PLC stops.
When the operation cycle is long, insert WDT instruction in the middle of the program to avoid the watchdog timer
error.
Device
Devices
in Detail
Operand
Type
Cautions
1. When a watchdog timer error occurs
A watchdog timer error may occur in the following cases. To avoid the error, input a program shown below near the
head step to extend the watchdog timer time, or shift FROM/TO instruction execution timing.
2)
3)
239
10
FNC20-FNC29
Arith. & Logic
Operation
FNC10-FNC19
Move & Compare
1)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 12
MOV
0
Initial pulse
FNC 07
WDT
K300
D8000
Program examples
1. When the operation cycle is long and causes an error
For example, by dividing a program whose operation cycle is 240 ms into two portions and inserting WDT instruction
between them, the operation cycle becomes less than 200 ms in both the former half portion and the latter half portion.
Program whose
operation cycle
is 120 ms
Program
whose
operation cycle
is 240 ms
FNC 07
WDT
Program whose
operation cycle
is 120 ms
END
END
2. When a label (P) of CJ instruction is located in a step number smaller than the step number of CJ
instruction
Put WDT instruction after the label (P).
M8000
Label
Pn RUN monitor
FNC 07
WDT
Program
Command
FNC 00
Pn
CJ
240
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
8.9
Outline
FOR instruction specifies the number of repetition of the loop between FOR and NEXT (FNC 09) instructions.
Overview
1. Instruction format
FNC 08
FOR
16-bit Instruction
3 steps
Mnemonic
Operation Condition
32-bit Instruction
Continuous
Operation
FOR
Mnemonic
Operation Condition
3
Instruction
List
2. Set data
Operand type
Description
Data type
[ S
= K1 to K32767]
(A value from 32768 to 0 is handled as "1".)
4
Devices
in Detail
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
U \G
S1
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S2
5
Specified the
Device &
Constant
C D
Others
Special
Unit
6
Before
Programming
Related instruction
FOR instruction and NEXT (FNC 09) instruction are set as a pair in programming.
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
241
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
8.10
Outline
NEXT instruction specifies the end position of the loop.
1. Instruction format
FNC 09
NEXT
Operation Condition
Continuous
Operation
1 step NEXT
2. Set data
Operand type
Description
Data type
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S
FNC 09
NEXT
Repeated " S
times.
"
Related instruction
NEXT instruction and FOR (FNC 08) instruction are set as a pair in programming.
Caution
1. Limitation in the number of nesting
FOR-NEXT loop can be nested up to 5 levels.
FNC 08
FOR
FNC 08
FOR
FNC 08
FOR
FNC 08
FOR
1st
level
FNC 09
NEXT
FNC 08
FOR
FNC 09
NEXT
242
1st
2nd 3rd
level level level
2nd
level
FNC 08
FOR
1st
level
FNC 09
NEXT
FNC 09
NEXT
FNC 09
NEXT
FNC 09
NEXT
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 08
FOR
FNC 08
FOR
FNC 09
NEXT
3
Instruction
List
FNC 09
NEXT
Not programmed
FNC 08
FOR
FNC 06
FEND
FNC 09
NEXT
FNC 09
NEXT
Not programmed
5
Specified the
Device &
Constant
FNC 08
FOR
4
Devices
in Detail
FNC 08
FOR
END
6
Before
Programming
FNC 09
NEXT
Program example
1. Program with three FOR-NEXT loops
7
Basic
Instruction
FNC 08
FOR
K 4
The loop [3] is repeated 4 times.
FNC 08
FOR
D 0Z
FNC 00
CJ
P 22
FNC 08
FOR
K1X000
P 22
FNC 09
NEXT
7
times
6
times
4
times
[2]
[3]
X010 = OFF
7 6 4 =168 times
6 4 = 24 times
4 times
10
X010 = ON
0 time
24 times
4 times
FNC20-FNC29
Arith. & Logic
Operation
FNC 09
NEXT
[1]
FNC10-FNC19
Move & Compare
FNC 09
NEXT
FNC00-FNC09
Program Flow
X010
2
Overview
FNC 09
NEXT
Introduction
Errors
243
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
9.
244
FNC No.
Mnemonic
Symbol
Function
10
CMP
CMP
11
ZCP
12
MOV
13
SMOV
14
CML
15
BMOV
16
FMOV
17
XCH
XCH
D1 D2
18
BCD
BCD
19
BIN
BIN
Reference
Compare
Section 9.1
Zone Compare
Section 9.2
Move
Section 9.3
Shift Move
Section 9.4
Complement
Section 9.5
BMOV S D n
Block Move
Section 9.6
FMOV S D n
Fill Move
Section 9.7
Exchange
Section 9.8
S D
Section 9.9
S D
Conversion to Binary
Section 9.10
ZCP
S1 S2 D
S1 S2 S D
MOV
S D
SMOV S m1 m2 D n
CML
S D
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
9.1
Outline
1. Instruction format
FNC 10
CMP
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Operation Condition
DCMP
13 steps
DCMPP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
3
Instruction
List
CMP
CMPP
Continuous
Operation
Pulse (Single)
Operation
2
Overview
This instruction compares two values, and outputs the result (smaller, equal or larger) to bit devices (3 points).
For the contact comparison instruction, refer to Chapter 28.
For floating point comparison, refer to Section 18.1.
Data Type
16- or 32-bit binary
S2
Bit
4
Devices
in Detail
S1
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
Index
U \G
S1
S2
S3
S2
S2
S3
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S1
Before
Programming
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
S1
S2
+2 turns ON.
+2
51
50
49
48
S2
D
D
+1
+2
S1
9
FNC10-FNC19
Move & Compare
Command
input
FNC00-FNC09
Program Flow
S2
D
Basic
Instruction
5
Specified the
Device &
Constant
Operand
Type
Latched
Latched
Even if the command input turns OFF and CMP instruction is not executed,
the status just before the command input turns OFF from ON.
, D
+1 and
+2 latch
245
10
FNC20-FNC29
Arith. & Logic
Operation
Latched
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
+1,
S1
+1, S1
] [ S2
+1, S2
+1 or
+1,
S2
+2 turns ON.
Command
input
FNC 10
DCMP
S1
S2
D +1
D +2
51
50
49
S2 +1, S2
48
S1 +1, S1
D
Latched
D +1
Latched
D +2
Even if the command input turns OFF and DCMP instruction is not executed,
the status just before the command input turns OFF from ON.
D ,
D +1 and
Latched
D +2 latch
Caution
1. Number of occupied devices
From the device specified as
, three devices are occupied. Make sure not to use those devices in another control.
Program examples
1. When comparing the current value of a counter
S1
X000
S2
D
X000
FNC 10
CMP
M 0
M 1
M 2
K100
C 20
M 0
101
100
C20
99
M0
M1
M2
1)
2)
246
RST instruction
X000
RST
M0
RST
M1
RST
M2
ZRST instruction
X000
FNC 40
ZRST
M0
M2
M0 to M2 are reset.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
9.2
Outline
2
Overview
This instruction compares two values (zone) with the comparison source, and outputs the result (smaller, equal or
larger) to bit devices (3 points).
For the contact comparison instruction, refer to Chapter 28.
For floating point comparison, refer to Section 18.2.
1. Instruction format
16-bit Instruction
9 steps
Mnemonic
Operation Condition
ZCP
ZCPP
Operation Condition
DZCP
17 steps
DZCPP
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
3
Instruction
List
FNC 11
ZCP
2. Set data
Operand Type
Description
Data Type
S2
Bit
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
C D
U \G
S2
S3
S2
S2
S3
S2
S3
Index
V
Z Modify K
Real
CharacPointer
Number ter String
E
" "
6
Before
Programming
S1
Constant
S1
Specified the
Device &
Constant
Operand
Type
4
Devices
in Detail
S1
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
7
Basic
Instruction
S1
S2
+1 or
+2 turns ON.
FNC00-FNC09
Program Flow
FNC 11
ZCP
D
S1
S2
+1
+2
FNC10-FNC19
Move & Compare
] ".
>
S2
10
] ".
, D
+1 and
+2 latch
247
FNC20-FNC29
Arith. & Logic
Operation
Even if the command input turns OFF and ZCP instruction is not executed,
the status just before the command input turns OFF from ON.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
+1,
+1, S1
+1, S2
+1
+2 turns ON.
FNC 11
DZCP
D
S1
S2
Even if the command input turns OFF and DZCP instruction is not executed,
the status just before the command input turns OFF from ON.
D ,
D +1 and
D +2 latch
Cautions
1. Number of occupied devices
From the device specified as
control.
, three devices are occupied. Make sure not to use devices used in another
FNC 11
ZCP
M 3
M 4
M 5
2)
S2
K100
K120
C30
M3
M 3
M 4
M 5
X000
C30
99
119
120
121
100
M3
M4
FNC 11
ZCP
S1
X000
248
M5
S1
S2
K120
K100
C30
M3
It is handled as
K120 S1 .
Turns ON in the case of
"K120 > C30 (Current value)" .
Turns ON in the case of
"K120 = C30 (Current value)" .
Turns ON in the case of
"K120 < C30 (Current value)" .
X000
C30
M3
M4
M5
99
100
119
120
121
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
9.3
Outline
Overview
1. Instruction format
FNC 12
MOV
16-bit Instruction
5 steps
Mnemonic
Operation Condition
MOV
MOVP
Continuous
Operation
Pulse (Single)
Operation
9 steps
Operation Condition
DMOV
DMOVP
Continuous
Operation
Pulse (Single)
Operation
Instruction
List
2. Set data
Operand Type
Description
Data Type
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
C D
U \G
S1
S2
S1
S2
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
Before
Programming
FNC 12
MOV
D
S
Basic
Instruction
Command
input
After
execution
K1X000 K1Y000
:K1X000
S
X3 X2 X1 X0
D :K1Y000
Y3 Y2 Y1 Y0
ON OFFOFF ON
ON ON ON OFF
X3 X2 X1 X0
Transfer
ON OFFOFF ON
Command contact
S
Y3 Y2 Y1 Y0
ON OFFOFF ON
X000
ON
X001
OFF
X002
OFF
X003
ON
Y000 OFF
ON
Y001 ON
OFF
Y002 ON
OFF
Y003
10
FNC20-FNC29
Arith. & Logic
Operation
ON
FNC10-FNC19
Move & Compare
Before
execution
FNC 12
MOV
8
FNC00-FNC09
Program Flow
Command
input
5
Specified the
Device &
Constant
Index
4
Devices
in Detail
3. Applicable devices
Operand
Type
ON
249
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 12
MOV
S
Before
execution
D10
D50
:D10
K50
:D50
Command contact
ON
K0
50
S
Transfer
After
execution
K50
K50
50
+1,
Command
input
FNC 12
DMOV
+1, S
+1,
] [
+1, D
S
:K8X000
X37 to X1 X0
D :K8Y000
Y37 to Y1 Y0
ON OFFOFF ON
ON ON ON OFF
Transfer
X37 to X1 X0
Y37 to Y1 Y0
ON OFFOFF ON
Command contact
ON OFFOFF ON
ON
X000
ON
X001
OFF
After
execution
K8X000 K8Y000
OFF
X037
ON
Y000 OFF
ON
Y001 ON
OFF
Before
execution
FNC 12
DMOV
ON
OFF
Y037
ON
Before
execution
FNC 12
DMOV
S
D10
D50
:D11,D10
K500000
:D51,D50
Command contact
250
ON
K4321
S
After
execution
500000
Transfer
K500000
K500000
].
+1,
4321
500000
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
Program examples
1. When reading the current value of a timer and counter
X001
FNC 12
MOV
T 0
D 20
2
Overview
K100
D 10
(K100) (D 10)
FNC 12
MOV
K 50
D 10
(K50) (D 10)
M 0
T 20
D 10
3
Instruction
List
X002
FNC 12
MOV
The program written by basic instructions shown on the right can be expressed using MOV instruction as shown
below.
Devices
in Detail
X000
Y000
Y001
M8000
X002
RUN monitor
Y002
FNC 12
MOV
Specified the
Device &
Constant
X001
K1X000 K1Y000
X003
Y003
Make sure to use DMOV instruction for transferring the operation result of an applied instruction (such as MUL) whose
operation result is output in 32 bits, and for transferring a 32-bit numeric value or transferring the current value of a
high-speed counter (C235 to C255) which is a 32-bit device.
Command
input
FNC 12
DMOV
FNC 12
DMOV
D0(D1) D10(D11)
C235
D20(D21)
7
Basic
Instruction
Command
input
Before
Programming
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
251
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
9.4
Outline
This instruction distributes and composes data in units of digit (4 bits).
1. Instruction format
FNC 13
SMOV
16-bit Instruction
11 steps
Mnemonic
Operation Condition
SMOV
SMOVP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
16-bit binary
m1
16-bit binary
m2
16-bit binary
16-bit binary
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S2
S1
S2
m1
m2
D
n
252
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
9999) respectively. "m2" digits starting from the "m1"th digit are transferred to the transfer destination
from the "n"th digit, converted into binary, and then stored to the transfer destination
D
When the command input turns ON, only the specified digits in the transfer destination
transfer source
Command
input
m1
m2
3
[1]
103
102
101
100
2. Extension function
When M8168 is set to ON first and then SMOV instruction is executed, conversion from binary to BCD is not executed.
Data is moved in units of 4 bits.
X010
K 2
D 2
K 3
Basic
Instruction
M8168
K 4
Program example
The data on three-digit digital switches are composed, and stored as binary data to D2.
101
100
X003 to X000
1
8
M8000
FNC 19
BIN
K2X020
D 2
FNC 19
BIN
K1X000
D 1
8
FNC00-FNC09
Program Flow
102
X027 to X020
D 1
K 1
K 1
D 2
K 3
FNC10-FNC19
Move & Compare
PLC
FNC 13
SMOV
6
Before
Programming
M8168
X010
FNC 13 D 1
SMOV
5
Specified the
Device &
Constant
Data is automatically
converted. [3]
Do not change.
Devices
in Detail
transferred to
digit.
converted. [1]
S
102
101
100
Command contact = ON
Data is automatically
103
do not change.
Instruction
List
FNC 13
SMOV
starting
Overview
Introduction
10
FNC20-FNC29
Arith. & Logic
Operation
253
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
9.5
Outline
This instruction inverts data in units of bit, and then transfers (copies) the inverted data.
1. Instruction format
FNC 14
CML
Mnemonic
16-bit Instruction
Operation Condition
CML
CMLP
5 steps
Operation Condition
DCML
9 steps
DCMLP
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S2
S1
S2
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
" "
This operation is useful when a logically inverted output is required as an output from a PLC.
Command
input
FNC 14
CML
b15 b14
1
0
b13
1
b12
0
b11
1
b10
0
b9
1
b8
0
b7
0
b6
0
b4
1
b3
1
b2
0
b1
1
b0
0
254
n5
1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Each bit of devices specified as [ S
[ D
+1,
+1,
].
+1,
This operation is useful when a logically inverted output is required as an output from a PLC.
FNC 14
DCML
b30
0
b29
1
b28
0
b27
1
b26
0
+1, S
b25
1
to
b7
0
+1, D
b6
0
n5
1
b4
1
b3
1
b2
0
b1
1
b0
0
3
Instruction
List
b31
1
Overview
Command
input
Introduction
Devices
in Detail
Program examples
1. When receiving an inverted input
The sequence program shown below can be written by CML instruction.
X000
M0
Specified the
Device &
Constant
X000
M0
X001
X001
M1
M1
X002
X002
M2
M2
Before
Programming
X003
X003
M3
M3
7
FNC 14
CML
RUN monitor
K1X000
Basic
Instruction
M8000
K1M0
2. When four bits are specified for a device with digit specification
b15
1
b14
0
D 0
K1Y000
b13
1
b12
0
b11
1
(D 0) (K1Y000)
b10
0
b9
1
b8
0
b7
1
b6
0
n5
1
b4
0
b3
1
b2
0
b1
1
b0
0
FNC10-FNC19
Move & Compare
S
D0
FNC 14
CML
FNC00-FNC09
Program Flow
X000
X000 = ON
0
1
0
1
D
K1Y000 Y017 Y016 Y015 Y014 Y013 Y012 Y011 Y010 Y007 Y006 Y005 Y004 Y003 Y002 Y001 Y000
10
Inverted data is
transferred.
FNC20-FNC29
Arith. & Logic
Operation
Do not change.
255
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
9.6
Outline
This instruction transfers (copies) a specified number of data all at once.
1. Instruction format
FNC 15
BMOV
16-bit Instruction
7 steps
Mnemonic
Operation Condition
BMOV
BMOVP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
D
n
Description
Data Type
16-bit binary
16-bit binary
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Special
Unit
System User
C D
Others
U \G
S1
S2
S1
S2
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
E
" "
to
all at once.
If the device number range is exceeded, data is transferred within the possible range.
S +1
D +1
FNC 15
BMOV
Command
input
S +(n-1)
"n" points
D +(n-1)
FNC 15
BMOV
D10
D9
K3
D10
D11
D12
X002
FNC 15
BMOV
D10
D11
K3
D10
D11
D12
256
[1]
[2]
[3]
[3]
[2]
[1]
D9
D10
D11
D11
D12
D13
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
By controlling the direction inverse flag M8024*1 for BMOV (FNC 15) instruction, data can be transferred in two
directions in one program.
X001
*1
M8024
FNC 15
BMOVP
D5
D10
M8001
Transfer
direction
M8024*1 : OFF
D5 D10
D6 D11
D7 D12
M8024*1 : ON
D5 D10
D6 D11
D7 D12
K3
*1BMOV
M8024 is cleared when the PLC mode is changed from RUN to STOP.
Caution
When specifying digits of bit devices, specify the same number of digits for
FNC 15
BMOV
S
D
K1M0
K1Y000
and
n
K 2
Y000
M 1
Y001
M 2
Y002
M 3
Y003
5
Specified the
Device &
Constant
M 0
n=2
M 4
Y004
M 5
Y005
M 6
Y006
M 7
Y007
Devices
in Detail
M8000
Instruction
List
M8024 direction
inverse flag:
OFF
Normally OFF
during operation
*1.
Overview
X000
BMOV
direction
inverse flag
n
Introduction
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
257
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
9.6.1
Outline of setting
File registers (D1000 to D7999) do not exist in the initial status. They are valid only when some number of file
registers are secured by parameter setting in a programming tool.
2)
3)
Contents of transfer
Remarks
BMOV instruction
Can read from and write to the file register area [A]
inside the program memory.
Other applied
instructions
Can read from and write to the data register area Because the data register area [B] is provided inside the
[B] inside the program memory in the same way as system RAM in PLCs, its contents can be arbitrarily
general data registers.
changed regardless of the memory cassette format
When restoring the power, data registers set as file registers are automatically copied from the file register area
[A] to the data register area [B].
Inside built-in memory
or memory cassette
Program
memory
Program/
comment
D1000
500 points
File register
14 blocks
[A]
maximum
(7000 points
maximum)
Inside system
RAM
D0
Data
When power
memory
is turned ON
When PLC
Data register
mode is
changed from
D1000
STOP to
Data register
RUN
[B]
D7999
2. Cautions on use
1)
When updating the contents of a file register with the same number (same-number register update mode), make
sure that the file register number is equivalent between
and
2)
When using file registers in the same-number register update mode, make sure that the number of transfer points
specified by "n" does not exceed the file register area.
3)
If the file register area is exceeded while file registers are used in the same-number register update mode, an
operation error (M8067) is caused and the instruction is not executed.
4)
258
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
9)
If a file register is not specified as the destination in BMOV (FNC 15) instruction, the file register is not accessed.
a) Outline of memory operation
D0
D200
Program
memory
Inside system
RAM
Image
memory
D1000
500 points
14 blocks
maximum
(7000 points
maximum)
File register
[A]
8
FNC00-FNC09
Program Flow
b) Program example
When X000 is set to ON, the data register area [B] is read.
S
X000
D1100
D200
K400
259
10
FNC20-FNC29
Arith. & Logic
Operation
FNC10-FNC19
Move & Compare
FNC 15
BMOVP
Basic
Instruction
Program/
comment
Before
Programming
Specified the
Device &
Constant
8)
Devices
in Detail
Instruction
List
7)
Overview
6)
Introduction
5)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
9.7
Outline
This instruction transfers same data to specified number of devices.
1. Instruction format
FNC 16
FMOV
16-bit Instruction
7 steps
Mnemonic
Operation Condition
FMOV
FMOVP
Operation Condition
DFMOV
DFMOVP
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
13 steps
2. Set data
Operand Type
Description
Data Type
Head word device number of transfer destination (Same data is transferred from the
transfer source at one time.)
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
C D
U \G
S1
S2
S1
S2
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
While the command input is ON, the data of the transfer source
When a constant (K) is specified as the transfer source
Command
input
FNC 16
FMOV
D
D
+1
+2
+3
+4
260
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
The contents of [ S
+1,
+1,
Introduction
The contents will be the same among all of "n" 32-bit devices.
If the number of points specified by "n" exceeds the device number range, data is transferred within the possible
range.
+1,
While the command input is ON, the data of the transfer source [ S
When a constant (K) is specified as the transfer source [ S
X000
FNC 16
DFMOV
+1,
+1, S
+1, D
+3, D
+2
+5, D
+4
+7, D
+6
+9, D
+8
Devices
in Detail
5
Specified the
Device &
Constant
Program example
1. When writing specified data to two or more devices
FNC 16
FMOV
K 0
D 0
S
K0
Before
Programming
X000
Instruction
List
+1,
Overview
K 5
Before
execution
After
execution
K 3
K 0
K0
D1
K 5
K 0
K0
D2
K 65
K 0
K0
D3
K 7
K 0
K0
D4
K100
K 0
8
FNC00-FNC09
Program Flow
D0
Basic
Instruction
K0
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
261
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
9.8
Outline
This instruction exchanges data between two devices.
1. Instruction format
FNC 17
XCH
Mnemonic
16-bit Instruction
Operation Condition
XCH
XCHP
5 steps
Operation Condition
DXCH
9 steps
DXCHP
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
D1
D2
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
D1
D2
FNC 17
XCHP
D1
and D2
D2
Before
execution
D1
D2
After
execution
D1
K10
K36
D1
D2
K10
K36
Exchange
D2
FNC 17
DXCHP
D1
+1, D1
D2
D1
] and [ D2
+1, D1
Before execution
262
+1, D2
D2
].
+1, D2
After execution
K1433600 =
D1
+1, D1
D2
+1, D2
D1
+1, D1
K10000
D2
+1, D2
K10000
K1433600
Exchange
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
When the instruction is executed while M8160 is ON, high-order 8 bits (byte) and low-order 8 bits (byte) of a word
device are exchanged with each other.
Because this instruction works in the same way as SWAP (FNC147) instruction, use SWAP instruction when
programming a new exchange.
In a 32-bit operation, high-order 8 bits (byte) and low-order 8 bits (byte) of each word device are exchanged for each
other.
M8160
SWAP
FNC 17
DXCH
D10
D10
Error
When M8160 is ON, and the device number is different between D1
and D2
4
Devices
in Detail
An operation error occurs in the following case. The error flag M8067 turns ON, and the error code is stored in D8067.
Instruction
List
M8160
D10
D11
M8000
2
Overview
X000
Introduction
Extension function (function compatible between the FX2 Series and the FX2C Series)
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
263
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
9.9
Outline
This instruction converts binary (BIN) data into binary-coded decimal (BCD) data.
Binary data is used in operations in PLCs. Use this instruction to display numeric values on the seven-segment
display unit equipped with BCD decoder.
1. Instruction format
FNC 18
BCD
16-bit Instruction
5 steps
Mnemonic
Operation Condition
BCD
BCDP
Operation Condition
DBCD
9 steps
DBCDP
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
C D
U \G
S1
S2
S1
S2
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
E
" "
FNC 18
BCD
and
PLC
BCD (FNC 18)
BIN
BCD
264
Number of digits
Data range
K1Y000
0 to 9
K2Y000
00 to 99
K3Y000
000 to 999
K4Y000
0000 to 9999
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
This instruction converts the binary (BIN) data of [ S
transfers the converted BCD data to [ D
The data of [ S
+1,
+1,
+1,
] and [ D
].
BIN
PLC
DBCD (FNC 18)
+1,
Overview
FNC 18
DBCD
+1,
].
Introduction
3
Instruction
List
BCD
4
+1, D
Number of digits
Devices
in Detail
[ D
Data range
K1Y000
0 to 9
K2Y000
00 to 99
K3Y000
000 to 999
K4Y000
0000 to 9999
K5Y000
00000 to 99999
K6Y000
000000 to 999999
K7Y000
0000000 to 9999999
K8Y000
00000000 to 99999999
5
Specified the
Device &
Constant
Instruction
BIN (FNC 19)
Before
Programming
Related instruction
Function
Converts binary-coded decimal (BCD) data into binary (BIN) data.
Cautions
Because conversion between binary-coded decimal data and binary data is automatically executed in SEGL (FNC 74)
and ARWS (FNC 75) instructions, BCD instruction is not required.
Basic
Instruction
When outputting data to the seven-segment display unit handling binary-coded decimal (BCD) data, use BCD (FNC
18) instruction for converting binary data into BCD data.
Errors
S
In DBCD or DBCDP (32-bit type) instructions, an operation error occurs when the
from 0 to 99,999,999.
FNC10-FNC19
Move & Compare
In BCD or BCDP (16-bit type) instructions, an operation error occurs when the
0 to 9999.
FNC00-FNC09
Program Flow
When receiving the digital switch information in the binary-coded decimal (BCD) format into a PLC, use BIN (FNC
19) instruction for converting BCD data into binary data.
10
FNC20-FNC29
Arith. & Logic
Operation
265
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program examples
1. When the seven-segment display unit has 1 digit
X000
FNC 18
BCD
D0
K1Y000
PLC
FNC 18
BCD
D0
PLC
K2Y000
Output
destination
K4
K3
K2
K1
FNC 18
DBCD
D0
PLC
K5Y000
D1,D0
In the case of 5 digits: K5
In the case of 6 digits: K6
In the case of 7 digits: K7
In the case of 8 digits: K8
Output
destination
K8
266
K7
K6
K5
K4
K3
K2
K1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Introduction
9.10
Outline
1. Instruction format
FNC 19
BIN
16-bit Instruction
Operation Condition
Operation Condition
DBIN
9 steps
DBINP
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
Word device number storing the conversion source (binary-coded decimal) data
4
Devices
in Detail
3
Instruction
List
5 steps
Mnemonic
BIN
BINP
2
Overview
This instruction converts binary-coded decimal (BCD) data into binary (BIN) data.
Use this instruction to convert a binary-coded decimal (BCD) value such as a value set by a digital switch into binary
(BIN) data and to receive the converted binary data so that the data can be handled in operations in PLCs.
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
Constant
Index
Real
CharacPointer
Number ter String
S1
S2
S1
S2
Specified the
Device &
Constant
Operand
Type
C D
U \G
Z Modify K
" "
Before
Programming
FNC 19
BIN
and
.
BCD
FNC00-FNC09
Program Flow
When "K4X000"
is specified
X014 X010 X004 X000
X017 X013 X007 X003
Number of digits
BIN
FNC10-FNC19
Move & Compare
0 to 9
K2X000
00 to 99
K3X000
000 to 999
K4X000
0000 to 9999
10
FNC20-FNC29
Arith. & Logic
Operation
K1X000
7
Basic
Instruction
The data of
267
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
+1,
+1,
FNC 19
DBIN
+1,
].
+1,
] and [ D
+1,
].
BCD
2
When "K8X000"
is specified
X034 X030 X024 X020 X014 X010 X004 X000
X037 X033 X027 X023 X017 X013 X007 X003
DBIN (FNC 19)
PLC
[ S
Number of digits
Data range
K1X000
0 to 9
K2X000
00 to 99
K3X000
000 to 999
K4X000
0000 to 9999
K5X000
00000 to 99999
K6X000
000000 to 999999
K7X000
0000000 to 9999999
K8X000
00000000 to 99999999
+1, S
BIN
Related instruction
Instruction
BCD (FNC 18)
Function
Converts binary (BIN) data into binary-coded decimal (BCD) data.
Cautions
1. When using DSW (FNC 72) instruction
Because conversion between binary-coded decimal data and binary data is automatically executed in DSW (FNC 72)
instruction, BIN instruction is not required.
Error
When the data of S
is not binary-coded decimal (BCD), M8067 (operation error) turns ON. But M8068 (operation
error latch) does not turn ON.
268
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
Introduction
Program examples
1. When the digital switch has 1 digit
X000
FNC 19
BIN
K1X000
D0
Overview
FNC 12
MOV
K1X000
D0
PLC
X000
FNC 19
BIN
K2X000
K3
K2
K1
D0
Output
destination
K4
Instruction
List
4
Devices
in Detail
Digital switch
input
PLC
K5X000
K8
K7
K6
K5
K4
K3
K2
K1
D0
Output
destination
Specified the
Device &
Constant
FNC 19
DBIN
Digital switch
input
6
Before
Programming
PLC
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
269
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Mnemonic
Symbol
Function
20
ADD
ADD
S1 S2 D
Addition
Section 10.1
21
SUB
SUB
S1 S2 D
Subtraction
Section 10.2
22
MUL
MUL
S1 S2 D
Multiplication
Section 10.3
23
DIV
DIV
S1 S2 D
Division
Section 10.4
24
INC
INC
Increment
Section 10.5
25
DEC
DEC
Decrement
Section 10.6
26
WAND
WAND S1 S2 D
Section 10.7
27
WOR
WOR S1 S2 D
Logical Word OR
Section 10.8
28
WXOR
WXOR S1 S2 D
Logical Exclusive OR
Section 10.9
29
NEG
NEG
Reference
Section
10.10
Negation
Instruction mnemonic
Contents of processing
120
[D]EADD
121
[D]ESUB
122
[D]EMUL
123
[D]EDIV
270
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Introduction
10.1
Outline
1. Instruction format
FNC 20
ADD
Mnemonic
16-bit Instruction
7 steps
Operation Condition
ADD
ADDP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DADD
DADDP
2. Set data
Operand type
Description
3
Instruction
List
Continuous
Operation
Pulse (Single)
Operation
2
Overview
This instruction executes addition by two values to obtain the result (A + B = C).
For the floating point addition instruction EADD (FNC120), refer to Section 18.8.
Data type
16- or 32-bit binary
S2
4
Devices
in Detail
S1
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
S1
S2
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
6
Before
Programming
are added to S1
FNC 20
ADD
S1
S2
S1
+ S2
Basic
Instruction
The contents of S2
or S2
+1, D1
S1
S2
] are added to [ S1
+1,
S1
].
S2
[ S1 +1, S1
] + [ S2
+1, S2
][ D
+1, D
The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is added algebraically.
5500 + (8540) = 3040
+1, S1
] or [ S2
+1, S2
10
FNC20-FNC29
Arith. & Logic
Operation
FNC10-FNC19
Move & Compare
Command
input
+1,
8
FNC00-FNC09
Program Flow
The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is added algebraically.
5 + (8) = 3
The contents of [ S2
5
Specified the
Device &
Constant
Operand
Type
271
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Related devices
1. Relationship between the flag operation and the sign (positive or negative) of a numeric value
For the flag operations, refer to Subsection 6.5.2.
Device
Name
Description
ON : When the operation result is 0
OFF : When the operation result is not 0
M8020
Zero
M8021
Borrow
ON : When the operation result is less than 32768 (in 16-bit operation) or 2,147,483,648 (in 32-bit operation)
OFF : When the operation result is not less than 32768 (in 16-bit operation) or 2,147,483,648 (in 32-bit operation)
M8022
Carry
ON : When the operation result is more than 32767 (in 16-bit operation) or 2,147,483,647 (in 32-bit operation)
OFF : When the operation result is not more than 32767 (in 16-bit operation) or 2,147,483,647 (in 32-bit operation)
Zero flag
Zero flag
2,
1,
0,
32768
Borrow flag
Zero flag
2,
1,
0,
1,
0,
The most
significant bit of
data becomes
"1".
Borrow flag
32767,
The most
significant bit
of data
becomes "0".
1,
2,147,483,648
Zero flag
0,
1,
1,
Carry flag
Zero flag
2,147,483,647,
Zero flag
0,
0,
Carry flag
Cautions
1. When using a 32-bit operation instruction (DADD or DADDP)
When specifying word devices, a 16-bit word device on the low-order side is specified first, and a word device with the
subsequent device number is automatically set for the high-order 16 bits.
To prevent number overlap, it is recommended to always specify an even number, for example.
FNC 20
ADD
D 0
K 25
D 0
(D 0) + 25(D 0)
Program example
1. Difference between ADD instruction and INC instruction caused by a program for adding "+1"
When ADD[P] is executed, "1" is added to the contents of D0 every time X001 turns from OFF to ON.
ADD[P] instruction is similar to INCP instruction described later except the contents shown in the table below:
ADD, ADDP, DADD or DADDP
instruction
Operates
Operation result
+(+1)= D
+327670+1+2
+327673276832767
+(1)= D
21032768
32-bit
operation
+(+1)= D
+2,147,483,6470+1+2
+2,147,483,6472,147,483,6482,147,483,647
+(1)= D
2102,147,483,648
X001
X001
272
S1
S2
FNC 20
ADDP
D 0
K 1
D 0
FNC 24
INCP
D 0
(D 0) + 1(D 0)
(D 0) + 1(D 0)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Introduction
10.2
Outline
1. Instruction format
FNC 21
SUB
Mnemonic
16-bit Instruction
7 steps
Operation Condition
SUB
SUBP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DSUB
DSUBP
3
Instruction
List
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
2
Overview
This instruction executes subtraction using two values to obtain the result (A B = C).
For the floating point subtraction instruction ESUB (FNC121), refer to Section 18.9.
Description
Data type
16- or 32-bit binary
S2
4
Devices
in Detail
S1
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
Index
U \G
S1
S1
S2
S2
S1
S2
S1
S2
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
Specified the
Device &
Constant
Operand
Type
6
Before
Programming
FNC 21
SUB
S2
S1
S2
The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is subtracted
algebraically.
5 (8) = 13
or S2
+1, S2
is transferred to [ D1
+1, D1
].
FNC 21
DSUB
S1
9
S2
[ S1 +1, S1
] [ S2
+1, S2
][ D
+1, D
FNC10-FNC19
Move & Compare
Command
input
+1, S1
FNC00-FNC09
Program Flow
7
Basic
Instruction
The contents of S2
The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is subtracted
algebraically.
5500 (8540) = 14040
+1, S1
] or [ S2
+1, S2
273
10
FNC20-FNC29
Arith. & Logic
Operation
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Related devices
1. Relationship between the flag operation and the sign (positive or negative) of a numeric value
For the flag operations, refer to Subsection 6.5.2.
Device
Name
Description
ON : When the operation result is 0
OFF : When the operation result is other than 0
M8020
Zero
M8021
Borrow
ON : When the operation result is less than 32768 (in 16-bit operation) or 2,147,483,648 (in 32-bit operation)
OFF : When the operation result is not less than 32768 (in 16-bit operation) or 2,147,483,648 (in 32-bit operation)
M8022
Carry
ON : When the operation result is more than 32767 (in 16-bit operation) or 2,147,483,647 (in 32-bit operation)
OFF : When the operation result is not more than 32767 (in 16-bit operation) or 2,147,483,647 (in 32-bit operation)
Zero flag
Zero flag
2,
1,
0,
32768
Borrow flag
Zero flag
2,
1,
0,
1,
0,
The most
significant bit of
data becomes
"1".
Borrow flag
32767,
The most
significant bit
of data
becomes "0".
1,
2,147,483,648
Zero flag
0,
0,
1,
Carry flag
Zero flag
2,147,483,647,
Zero flag
1,
0,
Carry flag
Cautions
1. When using a 32-bit operation instruction (DSUB or DSUBP)
When specifying word devices, a 16-bit word device on the low-order side is specified first, and then a word device
with the subsequent device number is automatically set for the high-order 16 bits.
To prevent number overlap, it is recommended to always specify an even number, for example.
Program example
1. Difference between the SUB instruction and the DEC instruction used by a program for
subtracting "1"
When SUB[P] is executed, "1" is subtracted from the contents of D0 every time X001 turns from OFF to ON.
SUB[P] instruction is similar to DECP instruction described later except the contents shown in the table below:
[D] SUB [P] instruction
Operation result
16-bit
operation
(+1)= D
21032768
(1)= D
+327670+1+2
32-bit
operation
(+1)= D
2102,147,483,648
2,147,483,648+2,147,483,647+2,147,483,646
(1)= D
+2,147,483,6470+1+2
X001
X001
274
Operates
S1
S2
FNC 21
SUBP
D 0
K 1
D 0
FNC 25
DECP
D 0
(D 0) 1(D 0)
(D 0) 1(D 0)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Introduction
10.3
Outline
1. Instruction format
FNC 22
MUL
16-bit Instruction
7 steps
Mnemonic
Operation Condition
MUL
MULP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DMUL
DMULP
2. Set data
Operand type
Description
3
Instruction
List
Continuous
Operation
Pulse (Single)
Operation
2
Overview
This instruction executes multiplication by two values to obtain the result (A x B = C).
For the floating point multiplication instruction EMUL (FNC122), refer to Section 18.10.
Data type
16- or 32-bit binary
S2
4
Devices
in Detail
S1
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
S1
S2
Index
V
Constant
Modify K
Real
CharacPointer
Number ter String
" "
S3
Before
Programming
S1
[ D
].
+1, D1
Command
input
FNC 22
MUL
are multiplied by
S1
S2
S2
BIN
BIN
BIN
( S1 ) ( S2 ) ( D +1, D
16 bits
16 bits
32 bits
FNC00-FNC09
Program Flow
The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is multiplied
algebraically.
5 (8) = 40
When a constant (K) is specified in S1
or S2
Basic
Instruction
5
Specified the
Device &
Constant
Operand
Type
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
275
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
FNC 22
MUL
S1
S2
K53
K15
K2Y000
K53(H0035)
S1
K15(H000F)
S2
0
0
1
1
0
0
0
1
1
0
1
1
Not output
+1, S1
transferred to 64-bit [ D
Command
input
FNC 22
DMUL
+3,
] are multiplied by [ S2
D
S1
+2,
+1,
+1, S2
S2
BIN
BIN
[ S1 +1, S1 ] [ S2 +1, S2
32 bits
32 bits
BIN
] [ D +3, D
64 bits
+2, D
+1,
The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is multiplied
algebraically.
5500 (8540) = 46,970,000
When a constant (K) is specified in [ S1
binary format.
+1, S1
] or [ S2
+1, S2
FNC 22
DMUL
S1
S2
D50
K150
D100
FNC 12
DMOV
D100
K8Y000
FNC 12
DMOV
D102
K8Y040
(D51,D50)
(D103,D102,D101,D100)
K100 K150 K15000
Related devices
1. Relationship between flag operation and numeric value
Device
M8304
276
Name
Zero
Description
ON: When the operation result is 0.
OFF: When the operation result is a number other than 0.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
1. Devices specified in
Introduction
Cautions
D
2
Overview
Even if word devices are used, the operation result (64 bits) cannot be monitored at one time.
In such a case, floating point operation is recommended.
For the floating point operation, refer to Chapter 18.
Program examples
1. 16-bit operation
FNC 22
MUL
S1
S2
D 0
D 2
D 4
S1
S2
D 0
D 2
D 4
Instruction
List
X000
(D 0) (D 2) (D 5,D 4)
8
9
72
2. 32-bit operation
FNC 22
DMUL
Devices
in Detail
X001
5
Specified the
Device &
Constant
FX3G
FX3GC
FX3U
FX3UC
Ver. 1.00
or later
Ver. 1.00
or later
Ver. 1.40
or later
Ver. 2.30
or later
Ver. 2.30
or later
Item
Zero Flag
Function Summary
Turns M8304 ON when the operation result of MUL instruction is 0.
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
277
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
10.4
Outline
This instruction executes division by two values to obtain the result (A B = C ... ).
For the floating point division instruction EDIV (FNC123), refer to Section 18.11.
1. Instruction format
FNC 23
DIV
Mnemonic
16-bit Instruction
7 steps
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
DIV
DIVP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DDIV
DDIVP
2. Set data
Operand type
Description
Data type
S1
S2
Head word device number storing the division result (quotient and remainder)
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
S1
S2
Index
V
Constant
Real
CharacPointer
Number ter String
Modify K H
" "
S3
transferred to
Command
input
FNC 23
DIV
S2
+1.
S1
S2
The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is divided algebraically.
36 (5) = 7 (quotient) ... 1 (remainder)
Two devices in total starting from D
are occupied to store the operation result (quotient and remainder). Make
sure that these two devices are not used for another control.
When a constant (K) is specified as S1
278
or S2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
1
[ S1
+1,
S1
[ D
+1,
Command
input
FNC 23
DDIV
S1
S2
+2].
S2
Divisor
BIN
] [ S2 +1, S2
32 bits
Quotient
BIN
] [ D +1, D
32 bits
Remainder
BIN
] ... [ D +3, D
32 bits
Overview
Dividend
BIN
[ S1 +1, S1
32 bits
+1,
+2]
The most significant bit of each data indicates the sign (positive: 0 or negative: 1), and data is divided algebraically.
5500 (540) = 10 (quotient) ... 100 (remainder)
+1, S1
] or [ S2
+1, S2
Name
Devices
in Detail
Related devices
Device
Description
Zero
M8306
Carry
ON : Carry flag operates when the operation result is over 32,767 (16-bit operation) or
2,147,483,647 (32-bit operation).
OFF : When the operation result is less than 32,767 (16-bit operation) or 2,147,483,647
(32-bit operation).
Cautions
1. Operation result
The most significant bit of the quotient and remainder indicates the sign (positive: 0, negative: 1) respectively.
The remainder is not obtained when a bit device is specified with digit specification.
D
Basic
Instruction
Error
When the divisor S2
6
Before
Programming
5
Specified the
Device &
Constant
M8304
2. Device specified as
3
Instruction
List
Introduction
A operation error results when the operation result is over 32,767 (16-bit operation) or 2,147,483,647 (32-bit
operation). (Turns the carry flag ON.)
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
279
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Program examples
1. 16-bit operation
X000
FNC 23
DIV
S1
S2
D 0
D 2
D 4
S1
S2
D 0
D 2
D 4
2. 32-bit operation
X001
FNC 23
DDIV
Dividend
Divisor
Quotient
Remainder
(D 1,D 0) (D 3,D 2) (D 5,D 4) ... (D 7,D 6)
100,000
3333
30
10
Ver. 1.00
or later
280
FX3G
Ver. 1.00
or later
FX3GC
Ver. 1.40
or later
FX3U
Ver. 2.30
or later
FX3UC
Ver. 2.30
or later
Item
Function Summary
Zero Flag
Carry Flag
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Introduction
10.5
Outline
Overview
1. Instruction format
FNC 24
INC
16-bit Instruction
Mnemonic
Operation Condition
INC
3 steps
Continuous
Operation
Pulse (Single)
Operation
INCP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
5 steps DINC
DINCP
3
Instruction
List
2. Set data
Operand type
Description
Data type
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
C D
U \G
S1
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
S2
FNC 24
INCP
Before
Programming
Command
input
+1 D
+1,
].
Command
input
FNC 24
DINCP
[ D
+1, D
]+1[ D
+ 1,
Basic
Instruction
The contents of [ D
5
Specified the
Device &
Constant
The contents of
4
Devices
in Detail
3. Applicable devices
8
FNC00-FNC09
Program Flow
Cautions
1. Note that data is incremented in every operation cycle in a continuous operation type
instruction.
2. Flag operations
16-bit operation
When "+32767" is incremented by "1", the result is "32768". Flags (zero, carry and borrow) are not activated at
this time.
2)
32-bit operation
When "+2,147,483,647" is incremented by "1", the result is "2,147,483,648". Flags (zero, carry and borrow) are
not activated at this time.
FNC10-FNC19
Move & Compare
1)
10
FNC20-FNC29
Arith. & Logic
Operation
281
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Program example
X010
FNC 12
MOVP
K 0
FNC 18
BCDP
C 0Z
K4Y000
FNC 24
INCP
FNC 10
CMPP
K 10
0 (Z)
(C 0Z) (K4Y000)
BIN
BCD
(Z) + 1 (Z)
M 1
X011
282
M 0
When Z is "10",
M1 turns ON.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Introduction
10.6
Outline
Overview
1. Instruction format
FNC 25
DEC
16-bit Instruction
3 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
DEC
DECP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
5 steps DDEC
DDECP
3
Instruction
List
2. Set data
Operand type
Description
Data type
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
C D
R
S1
Others
Special
Unit
Index
U \G
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
S2
FNC 25
DECP
Before
Programming
Command
input
1 D
+1,
].
Command
input
FNC 25
DDECP
[ D
+1, D
]1[ D
+ 1, D
Basic
Instruction
The contents of [ D
5
Specified the
Device &
Constant
The contents of
4
Devices
in Detail
3. Applicable devices
1. Flag operations
16-bit operation
When "32768" is decremented by "1", the result is "+32767". Flags (zero, carry and borrow) are not activated at
this time.
2)
32-bit operation
When "2,147,483,648" is decremented by "1", the result is "+2,147,483,647". Flags (zero, carry and borrow) are
not activated at this time.
9
FNC10-FNC19
Move & Compare
1)
FNC00-FNC09
Program Flow
Cautions
10
FNC20-FNC29
Arith. & Logic
Operation
283
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
10.7
Outline
This instruction executes the logical product (AND) operation of two numeric values.
1. Instruction format
W FNC 26
D
AND
Mnemonic
16-bit Instruction
7 steps
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
WAND
WANDP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DAND
DANDP
2. Set data
Operand type
Description
Data type
S1
Data used for logical product or word device number storing data
S2
Data used for logical product or word device number storing data
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
C D
U \G
S1
S1
S2
S2
S1
S2
S1
S2
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
FNC 26
WAND
and
S1
S2
.
S1
S2
S1
S2
While the command input is OFF, the data of the transfer destination
While the command input is ON, the data of the transfer sources S1
When a constant (K) is specified in the transfer sources S1
format.
and S2
and S2
do not change.
The logical product operation is executed in units of bit as shown in the table below (1 1 = 1, 0 1 = 0, 1 0 = 0,
0 0 = 0).
1: ON, 0: OFF
Logical operation
(unit: bit)
284
S1
S2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
1
The logical product (AND) operation is executed to the contents of [ S1
bit, and the result is transferred to [ D
Command
input
FNC 26
DAND
S1
+1,
S2
+1, S1
] and [ S2
+1, S2
] in units of
].
S1
+1, S1
+1,
S2
While the command input is ON, the data of the transfer source [ S1
change.
When a constant (K) is specified in the transfer source [ S1
converted into binary format.
+1, S1
+1,
+1, D
+1, S1
] [ S2
] [ S2
+1, S2
+1, S2
] do not
], it is automatically
S1
S1
S2
+1,
S2
+1,
4
Devices
in Detail
Logical operation
(unit: bit)
+1,
3
Instruction
List
The logical product operation is executed in units of bit as shown in the table below (1 1 = 1, 0 1 = 0, 1 0 = 0,
0 0 = 0).
1: ON, 0: OFF
Overview
While the command input is OFF, the data of the transfer destination [ D
S2
Introduction
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
285
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
10.8
Outline
This instruction executes the logical sum (OR) operation of two numeric values.
1. Instruction format
W FNC 27
D
OR
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
WOR
WORP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DOR
DORP
2. Set data
Operand type
Description
Data type
S1
Data used for logical sum or word device number storing data
S2
Data used for logical sum or word device number storing data
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
S1
S2
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
FNC 27
WOR
and
S1
S2
.
S1
S2
S1
S2
While the command input is OFF, the data of the transfer destination
While the command input is ON, the data of the transfer sources S1
When a constant (K) is specified in the transfer sources S1
format.
and S2
and S2
do not change.
The logical sum operation is executed in units of bit as shown in the table below (1 1 = 1, 0 1 = 1,
0 0 = 0, 1 0 = 1).
1: ON, 0: OFF
Logical operation
(unit: bit)
286
S1
S2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
1
The logical sum (OR) operation is executed to the contents of [ S1
and the result is transferred to [ D
Command
input
FNC 27
DOR
S1
+1,
D
D
S2
+1, S1
] and [ S2
+1, S2
] in units of bit,
].
S1
S2 +1, S2
+1, S1
While the command input is ON, the data of the transfer source [ S1
change.
When a constant (K) is specified in the transfer source [ S1
converted into binary format.
+1, S1
+1,
+1, D
+1, S1
] [ S2
+1, S2
] [ S2
+1, S2
] do not
], it is automatically
S1
S1
S2
+1,
S2
+1,
4
Devices
in Detail
Logical operation
(unit: bit)
+1,
3
Instruction
List
The logical sum operation is executed in units of bit as shown in the table below (1 1 = 1, 0 1 = 1,
0 0 = 0, 1 0 = 1).
1: ON, 0: OFF
Overview
While the command input is OFF, the data of the transfer destination [ D
Introduction
5
Specified the
Device &
Constant
6
Before
Programming
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
287
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
10.9
Outline
This instruction executes the exclusive logical sum (XOR) operation of two numeric values.
1. Instruction format
W FNC 28
D
XOR
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
WXOR
WXORP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DXOR
DXORP
2. Set data
Operand type
Description
Data type
S1
Data used for exclusive logical sum or word device number storing data
S2
Data used for exclusive logical sum or word device number storing data
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
S1
S2
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
" "
FNC 28
WXOR
S1
S1
and
S2
.
D
S2
S1
S2
While the command input is OFF, the data of the transfer destination
While the command input is ON, the data of the transfer sources S1
When a constant (K) is specified in the transfer sources S1
format.
and S2
and S2
do not change.
The logical exclusive sum operation is executed in units of bit as shown in the table below (1 1 = 0, 0 0 = 0,
1 0 = 1, 0 1 = 1).
1: ON, 0: OFF
Logical operation
(unit: bit)
288
S1
S2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
1
The exclusive logical sum (XOR) operation is executed to the contents of [ S1
units of bit, and the result is transferred to [ D
Command
input
FNC 28
DXOR
S1
+1,
S2
D
S1
+1, S1
] and [ S2
+1, S2
] in
].
+1, S1
S2
+1, S2
While the command input is ON, the data of the transfer source [ S1
change.
When a constant (K) is specified in the transfer source [ S1
converted into binary format.
+1, S1
+1,
+1, D
+1, S1
] [ S2
] [ S2
+1, S2
+1, S2
] do not
], it is automatically
S1
+1,
S2
+1,
S2
+1,
Program example
D 10
D 12
FNC 14
CML
D 14
D 14
D 14
6
Before
Programming
FNC 28
WXOR
Specified the
Device &
Constant
By combining WXOR and CML (FNC 14) instructions, the exclusive logical sum not (XORNOT) operation can be
executed.
X000
4
Devices
in Detail
Logical operation
(unit: bit)
S1
3
Instruction
List
The exclusive logical sum operation is executed in units of bit as shown in the table below (1 1 = 0, 0 0 = 0,
1 0 = 1, 0 1 = 1).
1: ON, 0: OFF
Overview
While the command input is OFF, the data of the transfer destination [ D
Introduction
7
Basic
Instruction
8
FNC00-FNC09
Program Flow
9
FNC10-FNC19
Move & Compare
10
FNC20-FNC29
Arith. & Logic
Operation
289
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Outline
This instruction obtains the complement of a numeric value (by inverting each bit and adding "1").
This instruction can be used to negate the sign of a numeric value.
For the Floating point negation ENEG (FNC128), refer to Section 18.16.
1. Instruction format
FNC 29
NEG
16-bit Instruction
3 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
NEG
NEGP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
5 steps DNEG
DNEGP
2. Set data
Operand type
Description
Data type
Word device number which stores data for obtaining complement and will store the
operation result (The operation result will be stored in the same word device number.)
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
is inverted (0 1, 1 0), "1" is added, and then the result is stored in the original device.
FNC 29
NEGP
( D
)+1 D
+1,
FNC 29
DNEGP
] is inverted (0 1, 1 0), "1" is added, and then the result is stored in the original
( D
+ 1, D
) +1 = ( D
+ 1, D
Caution
Note that the complement is obtained in every operation cycle in a continuous operation type instruction.
290
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
1
Introduction
Program examples
The program examples below are provided to obtain the absolute value of a negative binary value.
M 0
D 10
M 0
FNC 29
NEGP
D 10
D10 D10
K 15
M 10
D 10
D 20
M 10
FNC 21
SUB
D 10
D 20
D 30
FNC 21
SUB
D 20
D 10
D 30
4
Devices
in Detail
FNC 10
CMP
Instruction
List
Even if NEG instruction is not used, D30 always stores the absolute value of the difference.
X000
M 11
M 12
2
Overview
RUN monitor
FNC 44
BON
(D 10) = 2
Before
Programming
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
(D 10) = 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
(D 10) = 0
Basic
Instruction
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(D 10) = 1
(D 10) + 1 = 1
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
(D 10) = 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
(D 10) + 1 = 2
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0
......
......
(D 10) = 32767
(D 10) = 32768
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
(D 10) + 1 = 32767
0 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1
FNC10-FNC19
Move & Compare
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
FNC00-FNC09
Program Flow
1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0
Specified the
Device &
Constant
(D 10) + 1 = 32768
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
10
FNC20-FNC29
Arith. & Logic
Operation
291
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
292
FNC No.
Mnemonic
Symbol
Function
30
ROR
ROR
D n
Rotation Right
Section 11.1
31
ROL
ROL
D n
Rotation Left
Section 11.2
32
RCR
RCR
D n
Section 11.3
33
RCL
RCL
D n
Section 11.4
34
SFTR
SFTR S D n1 n2
Section 11.5
35
SFTL
SFTL
Section 11.6
36
WSFR
WSFR S D n1 n2
Section 11.7
37
WSFL
WSFL S D n1 n2
Section 11.8
38
SFWR
SFWR S D n
Section 11.9
39
SFRD
SFRD S D n
S D n1 n2
Reference
Section
11.10
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
11.1
Outline
This instruction shifts and rotates the bit information rightward by the specified number of bits without the carry flag.
FNC 30
ROR
16-bit Instruction
5 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
ROR
RORP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DROR
DRORP
Operand Type
D
n
Data Type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
S1
S1
S1
C D
Others
Special
Unit
Index
U \G
S2
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S3
S2
16
FNC80-FNC89
External FX
Device
RORP
17
FNC100-FNC109
Data
Transfer 2
Command
input
FNC 30
18
Before
execution
Low order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
After the
instruction
is executed
once
19
"n1" bits
Rightward
rotation
High order
After
execution
Carry flag
FNC140-FNC149
Data
Operation 2
"n" bits
M8022
FNC110-FNC139
Floating Point
High order
Low order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
Before shift
b15 to b4
20
Carry flag
M8022
FNC150-FNC159
Positioning
Control
Before shift
b3 to b0
15
FNC70-FNC79
External FX I/O
Device
System User
14
FMC60-FNC69
Handy
Instruction
*1.
Description
13
FNC50-FNC59
High-Speed
Processing
2. Set data
12
FNC40-FNC49
Data Operation
1. Instruction format
The contents of
b3 are stored.
293
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
DRORP
+1,
Low order
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Carry flag
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
M8022
After the
instruction is
executed once
"n" bits
b0 to b3 (n1)
are moved.
The status of the bit "n1" is
copied.
Rightward
rotation
High order
After
execution
The status of
the bit "n1" is
copied.
Low order
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
Before shift
b3 to b0
0
Carry flag
M8022
Before shift
b31 to b4
The contents of
b3 are stored.
Related device
For the carry flag use method, refer to Subsection 6.5.2.
Device
Name
M8022
Carry
Description
Turns ON when the bit shifted last from the lowest position is "1".
Cautions
In the case of continuous operation type instructions (ROR and DROR)
Note that shift and rotation are executed in every scan time (operation cycle).
When a device with digit specification is specified as D
Only K4 (16-bit instruction) or K8 (32-bit instruction) is valid (examples: K4Y010 or K8M0).
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DROR D100 R0", "n" is [R1, R0].
294
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
11.2
Outline
This instruction shifts and rotates the bit information leftward by the specified number of bits without the carry flag.
FNC 31
ROL
16-bit Instruction
5 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
ROL
ROLP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DROL
DROLP
Operand Type
D
n
Data Type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
S1
U \G
S2
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S3
S2
16
FNC80-FNC89
External FX
Device
ROLP
17
FNC100-FNC109
Data
Transfer 2
Command
input
FNC 31
18
M8022
Low order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
After the
instruction
is executed
once
High order
Leftward
rotation
b12 (16n) to
b15 are moved.
19
FNC140-FNC149
Data
Operation 2
The status of
the bit "16n" is
copied.
After
execution
FNC110-FNC139
Floating Point
High order
Before
execution
"n" bits
Low order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1
Carry flag
M8022
20
Before shift
b15 to b12
FNC150-FNC159
Positioning
Control
The contents of
b12 are stored.
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
Before shift
b11 to b0
15
FNC70-FNC79
External FX I/O
Device
S1
C D
Others
Special
Unit
14
FMC60-FNC69
Handy
Instruction
*1.
Description
13
FNC50-FNC59
High-Speed
Processing
2. Set data
12
FNC40-FNC49
Data Operation
1. Instruction format
295
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
+1,
DROLP
Before
execution
High order
Low order
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
M8022
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
"16n" bits
The status of
the bit "32n"
is copied.
After the
instruction is
executed once
Leftward
rotation
"n" bits
High order
After
execution
Low order
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
Carry
flag
M8022
Before shift
b27 to b0
Before shift
b31 to b28
The contents of
b28 are stored.
Related device
For the carry flag use method, refer to Subsection 6.5.2.
Device
Name
M8022
Carry
Description
Turns ON when the bit shifted last from the highest position is "1".
Cautions
In the case of continuous operation type instructions (ROL and DROL)
Note that shift and rotation are executed in every scan time (operation cycle).
When a device with digit specification is specified as D
Only K4 (16-bit instruction) or K8 (32-bit instruction) is valid (examples: K4Y010 or K8M0).
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DROL D100 R0", "n" is [R1, R0].
296
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
11.3
Outline
This instruction shifts and rotates the bit information rightward by the specified number of bits together with the carry
flag.
FNC 32
RCR
Mnemonic
16-bit Instruction
5 steps
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
RCR
RCRP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DRCR
DRCRP
Operand Type
D
n
Data Type
16- or 32-bit binary
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
, K4M
, K8M
and K4S
and K8S
are valid.
are valid.
16
FNC80-FNC89
External FX
Device
RCRP
17
FNC100-FNC109
Data
Transfer 2
Command
input
FNC 32
Low order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
18
b3 (n1)
to b0 are
moved.
Rightward
rotation
High order
19
Low order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
0 0 0 1 1 1 1 1 1 1 1 1 0 0 0 0
Before
shift
b2 to b0
FNC140-FNC149
Data
Operation 2
After
execution
Carry flag
M8022
1
When M8022 is ON
FNC110-FNC139
Floating Point
After the
instruction
b3 (n1)
is
executed
once
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
14
FMC60-FNC69
Handy
Instruction
*1.
Description
Word device number storing data to be rotated rightward
13
FNC50-FNC59
High-Speed
Processing
2. Set data
FNC40-FNC49
Data Operation
1. Instruction format
12
Before shift b3
0
Carry flag
M8022
Before shift
Carry flag M8022
297
20
FNC150-FNC159
Positioning
Control
The carry flag is intervened in the rotation loop. If M8022 has been set to ON or OFF before the rotation instruction, the
carry flag is transferred to the destination.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
DRCRP
+1,
n
"n" bits (in the case of K4)
High order
Low order
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Before
execution
1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 0 0 0
After the
instruction is
executed once
Rightward
rotation
High order
After
execution
Low order
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0
Before
shift
b2 to b0 Before shift
Carry flag M8022
The status
of the final
bit b3 (bit
"n1") is
stored.
Related device
For the carry flag use method, refer to Subsection 6.5.2.
Device
Name
M8022
Carry
Description
Turns ON when the bit shifted last from the lowest position is "1".
Cautions
In the case of continuous operation type instructions (RCR and DRCR)
Note that shift and rotation are executed every scan time (operation cycle).
When a device with digit specification is specified as D
Only K4 (16-bit instruction) or K8 (32-bit instruction) is valid (examples: K4Y010 or K8M0).
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DRCR D100 R0", "n" is [R1, R0].
298
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
11.4
Outline
This instruction shifts and rotates the bit information leftward by the specified number of bits together with the carry
flag.
FNC 33
RCL
Mnemonic
16-bit Instruction
Operation Condition
RCL
5 steps
Continuous
Operation
Pulse (Single)
Operation
RCLP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DRCL
DRCLP
Operand Type
D
n
Data Type
16- or 32-bit binary
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
, K4M
, K8M
and K4S
and K8S
are valid.
are valid.
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
RCLP
b15 to b12
(16n) are
moved.
18
1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0
After the
instruction is
executed once
Leftward
rotation
"n" bits
FNC110-FNC139
Floating Point
High order
19
Low order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
The status
of the final
bit b12 (bit
"16n") is
stored.
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
Before shift b11 to b0
FNC140-FNC149
Data
Operation 2
After
execution
Low order
b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Carry flag
When M8022
is ON
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
14
FMC60-FNC69
Handy
Instruction
*1.
Description
Word device number storing data to be rotated leftward
13
FNC50-FNC59
High-Speed
Processing
2. Set data
FNC40-FNC49
Data Operation
1. Instruction format
12
299
20
FNC150-FNC159
Positioning
Control
The carry flag is intervened in the rotation loop. If M8022 has been set to ON or OFF before the rotation instruction, the
carry flag is transferred to the destination.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
+1,
DRCLP
b31 to b28
(b32n)
are
moved.
Low order
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1 1 1 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0
1
After the
instruction is
executed once
Carry flag
When M8022
is ON
The status
After
of the final
execution bit b28 (bit
"32n") is
stored.
Leftward
rotation
High order
Low order
b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1
Before shift b27 to b0
Before shift
b31 to b29
Before shift
Carry flag M8022
Related device
For the carry flag use method, refer to Subsection 6.5.2.
Device
Name
M8022
Carry
Description
Turns ON when the bit shifted last from the highest position is "1".
Cautions
In the case of continuous operation type instructions (RCL and DRCL)
Note that shift and rotation are executed every scan time (operation cycle).
When a device with digit specification is specified as D
Only K4 (16-bit instruction) or K8 (32-bit instruction) is valid (examples: K4Y010 or K8M0).
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DRCL D100 R0", "n" is [R1, R0].
300
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
11.5
Outline
This instruction shifts bit devices of the specified bit length rightward by the specified number of bits.
After shift, the bit device S
is transferred by "n2" bits from the most significant bit.
12
FNC 34
SFTR
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
SFTR
SFTRP
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand Type
Description
Data Type
Head bit device number to be stored to the shift data after rightward shift
Bit
14
n1
16-bit binary
Bit
n2
16-bit binary
FMC60-FNC69
Handy
Instruction
*1.
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
15
Others
Special
Unit
U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S1
16
FNC80-FNC89
External FX
Device
n1
n2
FNC70-FNC79
External FX I/O
Device
Operand
Type
FNC40-FNC49
Data Operation
1. Instruction format
S2
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
301
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 34
SFTRP
n1
n2
+2
+1
Before
execution
+8 D
+7 D
+6 D
D
S
+4 D
+3 D
+2 D
[2]
"n2" bits are
shifted rightward
(n2=3).
[3] Copy
After
execution
+5 D
+8 D
+2 to S
+7 D
+6 D
+5 D
D
+4 D
+8 to D
+3 D
+1
[1]
Overflow (data to
be deleted)
+2 D
+1
Caution
Note that "n2" bits are shifted every time the command input turns from OFF to ON in the SFTRP instruction, but that
"n2" bits are shifted in each scan time (operation cycle) in SFTR instruction.
Error
If the transfer source S
is equivalent to the shifted device
(error code: K6710).
An operation error does not occur in FX3S/FX3G/FX3GC PLCs.
302
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
11.6
Outline
This instruction shifts bit devices of the specified bit length leftward by the specified number of bits.
After shift, the bit device S
is transferred by "n2" bits from the least significant bit.
12
FNC 35
SFTL
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
SFTL
SFTLP
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand Type
Description
Data Type
Head bit device number to be stored to the shift data after leftward shift
Bit
n1
16-bit binary
n2
16-bit binary
14
Bit
FMC60-FNC69
Handy
Instruction
*1.
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
15
Others
Special
Unit
U \G
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S1
16
D
n1
FNC80-FNC89
External FX
Device
S2
n2
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
17
FNC100-FNC109
Data
Transfer 2
SFTLP
n1
n2
18
S
Before
execution
+2
+1
+2 D
+1
FNC110-FNC139
Floating Point
+8 D
+7 D
+6 D
+4 D
19
+3 D
[2]
"n2" bits are
shifted rightward
(n2=3).
[1]
Overflow (data to
be deleted)
+8 D
D
+7 D
to D
+6 D
+5 D
+4 D
[3] Copy
+3 D
S
+2 D
+2 to S
+1
20
FNC150-FNC159
Positioning
Control
+5 D
FNC140-FNC149
Data
Operation 2
After
execution
FNC70-FNC79
External FX I/O
Device
Operand
Type
FNC40-FNC49
Data Operation
1. Instruction format
303
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Caution
Note that "n2" bits are shifted every time the command input turns from OFF to ON in the SFTLP instruction, but that
"n2" bits are shifted in each operation cycle in the SFTL instruction.
Error
If the transfer source S
is equivalent to the shifted device
(error code: K6710).
An operation error does not occur in FX3S/FX3G/FX3GC PLCs.
M8046
M8046
Head data
M0
Data
input
X000
S0
X001
S1
X002
*1
FNC 35
SFTL
M0
S0
K8
K1
S7
M8000
X000
FNC 12
MOV
M8047
K2S0
K2Y000
END
X000
X001
X007
Y000
Y001
Y007
304
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
1. F1/F2 PLCs
12
FNC40-FNC49
Data Operation
Circuit program
X000 data input
OUT
0000
0001
0002
0003
0004
0005
M100
SFT
X002 reset input
RST
LD
OUT
LD
SFT
LD
RST
X000
M100
X001
M100
X002
M100
13
FNC50-FNC59
High-Speed
Processing
M117
14
M101 to M115 (decimal number): 15-step shift register
M100
X001 shift input
FNC 35
SFTLP
Fixed value
M100
M101
FNC 40
ZRST
M101
M115
K 15
K 1
15
Number Shift by
of steps 1 bit
FNC70-FNC79
External FX I/O
Device
FMC60-FNC69
Handy
Instruction
2. FX3S/FX3G/FX3GC/FX3U/FX3UC PLCs
X000 data input
FNC30-FNC39
Rotation and
Shift
11.6.1
Head
device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
305
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11.7
Outline
This instruction shifts word devices with "n1" data length rightward by "n2" words.
1. Instruction format
FNC 36
WSFR
Mnemonic
16-bit Instruction
9 steps
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
WSFR
WSFRP
Operation Condition
2. Set data
Operand Type
Data Type
Head device number to be stored to the shift data after rightward shift
16-bit binary
16-bit binary
n1
n2
*1.
Description
16-bit binary
*1
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
Index
U \G
S1
S2
S1
S2
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
n1
S1
n2
WSFRP
, "n2" words are shifted rightward ([1] and [2] shown below).
are shifted to "n2" words starting from [ D +n1-n2] ([3] shown below).
D
S
n1
n2
+2
+1
Before
execution
+8 D
+7 D
+6 D
D
S
306
+4 D
+3 D
+2 D
[2]
"n2" bits are
shifted rightward
(n2=3).
[3] Copy
After
execution
+5 D
+8 D
+2 to S
+7 D
+6 D
+5 D
D
+4 D
+8 to D
+3 D
+1
[1]
Overflow (data to
be deleted)
+2 D
+1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Note that "n2" words are shifted when the drive input turns ON in the WSFRP instruction, but that "n2" words are
shifted in each operation cycle in the WSFR instruction.
Error
If the transfer source
K1X000 K1Y000
n1
n2
K 4
K 2
13
FNC50-FNC59
High-Speed
Processing
FNC 36
WSFRP
D
12
FNC40-FNC49
Data Operation
Program example
X000
FNC30-FNC39
Rotation and
Shift
Caution
14
FMC60-FNC69
Handy
Instruction
[2]
15
[1]
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
307
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11.8
Outline
This instruction shifts the word data information leftward by the specified number of words.
1. Instruction format
FNC 37
WSFL
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
WSFL
WSFLP
Operation Condition
2. Set data
Operand Type
Data Type
Head device number to be stored to the shift data after leftward shift
16-bit binary
16-bit binary
n1
16-bit binary
n2
*1.
Description
512*1
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S2
S1
S2
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
n1
S1
n2
WSFLP
308
D
S
D
, "n2" words are shifted leftward ([1] and [2] shown below).
are shifted to "n2" words starting from D
([3] shown below).
n1
n2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
+2
+1
12
+8 D
+7 D
+6 D
+5 D
+2 D
+1
+8 D
D
+7 D
+5 D
+6 D
+5 to D
+4 D
[3] Copy
+3 D
S
+2 D
+2 to S
+1
13
FNC50-FNC59
High-Speed
Processing
+3 D
[2]
"n2" bits are
shifted leftward
(n2=3).
[1]
Overflow (data to
be deleted)
After
execution
+4 D
FNC40-FNC49
Data Operation
14
Note that "n2" words are shifted every time the drive input turns from OFF to ON in the WSFLP instruction, but that
"n2" words are shifted in each operation cycle in the WSFL instruction.
Error
If the transfer source
K1X000 K1Y000
n1
n2
K 4
K 2
16
FNC80-FNC89
External FX
Device
FNC 37
WSFLP
D
15
FNC70-FNC79
External FX I/O
Device
Program example
X000
FMC60-FNC69
Handy
Instruction
Caution
17
FNC100-FNC109
Data
Transfer 2
Y017 Y016 Y015 Y014 Y013 Y012 Y011 Y010 Y007 Y006 Y005 Y004 Y003 Y002 Y001Y000
[3]
18
[1]
FNC110-FNC139
Floating Point
[2]
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
309
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11.9
Outline
This instruction writes data for first-in first-out (FIFO) and last-in first-out (LIFO) control.
1. Instruction format
FNC 38
SFWR
16-bit Instruction
Mnemonic
Operation Condition
SFWR
7 steps
Continuous
Operation
Pulse (Single)
Operation
SFWRP
Operation Condition
2. Set data
Operand Type
S
D
n
*1.
Description
Data Type
16-bit binary
Head word device number storing data (The first word device works as the pointer, and
data is stored in
16-bit binary
+1 and later)
16-bit binary
512
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S2
S1
S2
310
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Command
input
FNC 38
SFWRP
S
13
D+n
FNC50-FNC59
High-Speed
Processing
Before
execution
... D+10 D+9 D+8 D+7 D+6 D+5 D+4 D+3 D+2 D+1 D
Pointer
(K0)
... D+10 D+9 D+8 D+7 D+6 D+5 D+4 D+3 D+2 S
After
execution
Pointer
D
(K1)
+1 D
(K2)
15
D
Pointer
2)
3)
Data is stored from the right end in the same way, and the number of stored data is specified by the contents of
the pointer D .
are stored to
+1
17
Related device
M8022
Name
Carry
Description
When the contents of the pointer D
and the carry flag M8022 turns ON.
FNC100-FNC109
Data
Transfer 2
16
FNC80-FNC89
External FX
Device
1)
FNC70-FNC79
External FX I/O
Device
14
(K1)
S
D+n
+1 D
FMC60-FNC69
Handy
Instruction
D+n
12
FNC40-FNC49
Data Operation
The contents of S
are written to "n-1" devices from D +1, and "1" is added to the number of data stored in
D .
For example, when D
= 0, the contents of S
are written to D +1. When D
= 1, the contents of S
are written to D +2.
FNC30-FNC39
Rotation and
Shift
18
Instruction
FNC110-FNC139
Floating Point
Related instructions
Description
POP (FNC212)
19
Caution
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
311
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
1. Example of first-in first-out control
For a program example of FILO, refer to Section 27.3.
In the example below, the shift write (SFWR) and shift read (SFRD) instructions are used.
1)
2)
Contents of operation
- In this circuit example, a product number to be taken out now is output according to "first-in first-out" rule while
products which were put into a warehouse with their product numbers registered are taken out of the warehouse.
- The product number is hexadecimal, and up to 4 digits. Up to 99 products can be stored in the warehouse.
Program
Button for request to put a
product into warehouse
X020
FNC 12
MOVP
K4X000
D256
FNC 38
SFWRP
D256
D257
K100
Pointer
D257: Data register for storing the product number
D258 to D356 (99 points)
K100
FNC 39
SFRDP
D257
D357
FNC 12
MOV
D357
K4Y000
X017 to X000
Request to
take a
product out
of warehouse
X20
X21
Command
Y017 to Y000
Command
MOV instruction
1
2
3
4
5
6
7
99
100
312
6
0320
0232
0462
0539
0142
1234
0
0
0
+1
D257
D258
D259
MOV instruction D260
D261
D262
D263
D256 1234
D355
SFWRP instruction D356
is executed.
5
0320
0232
0462
0539
0142
0
0
0
0
1
D357 0320
SFRDP instruction
is executed.
4
0232
0462
0539
0142
0
0
0
0
0
Shift
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
12
FNC 39
SFRD
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
SFRD
SFRDP
FNC40-FNC49
Data Operation
1. Instruction format
Operation Condition
13
Operand Type
S
D
*1.
Data Type
16-bit binary
+1 and later.)
"1"*1
14
16-bit binary
16-bit binary
2 n 512
FMC60-FNC69
Handy
Instruction
Description
FNC50-FNC59
High-Speed
Processing
2. Set data
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S2
S1
S2
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
16
FNC80-FNC89
External FX
Device
Command
input
FNC 39
SFRDP
S1
+1
17
FNC100-FNC109
Data
Transfer 2
S1 +1 written in turn by SFWR (FNC 38) instruction is transferred (read) to D , and "n-1" words from
are shifted rightward by 1 word. "1" is subtracted from the number of data, stored in S .
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
313
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Before
execution
S+n
... S+10 S+9 S+8 S+7 S+6 S+5 S+4 S+3 S+2 S+1 S
=n
1 S
1 S
Pointer
Executed at the 1st time
S+1
D
S+n S+n
After
execution
... S+10 S+9 S+8 S+7 S+6 S+5 S+4 S+3 S+2
S
Pointer
S+2
D
S+n S+n S+n
1)
2)
Related device
For the zero flag use method, refer to Subsection 6.5.2.
Device
Name
M8020
Zero
Description
Data is always read from
M8020 turns ON.
Related instructions
Instruction
Description
POP (FNC212)
Caution
1. Data after reading was executed
The contents of
3. When pointer S
+n do not change.
is 0
do not change.
Program example
Refer to the program example provided for SFWR (FNC 38) instruction.
For the program example, refer to Section 11.9.
314
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Mnemonic
Symbol
Function
40
ZRST
41
DECO
42
ENCO
43
SUM
44
BON
45
MEAN
46
ANS
47
ANR
48
SQR
SQR
49
FLT
FLT
Reference
Zone Reset
Section 12.1
DECO S D n
Decode
Section 12.2
ENCO S D n
Encode
Section 12.3
Section 12.4
Section 12.5
MEAN S D n
Mean
Section 12.6
ANS
Section 12.7
Annunciator Reset
Section 12.8
FNC70-FNC79
External FX I/O
Device
FNC No.
12
FNC40-FNC49
Data Operation
FNC 40 to FNC 49 provide instructions for executing complicated processing for fundamental applied instructions FNC
10 to FNC 39 and for executing special processing.
S D
Square Root
Section 12.9
16
S D
ZRST D1 D2
S D n
S m D
ANR
15
FNC80-FNC89
External FX
Device
Section
12.10
14
FMC60-FNC69
Handy
Instruction
BON
S D
FNC50-FNC59
High-Speed
Processing
SUM
13
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
315
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
12.1
Outline
This instruction resets devices located in a zone between two specified devices at one time.
Use this instruction for restarting operation from the beginning after pause or after resetting control data.
1. Instruction format
FNC 40
ZRST
16-bit Instruction
5 steps
Mnemonic
Operation Condition
ZRST
ZRSTP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
D11
S
D2
16-bit binary
D11 D2
S
Specify same type of
devices.
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
C D
U \G
D11
S
S1
S2
D2
S1
S2
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
" "
and D21
to D21
Command
input
Before
execution
FNC 40
ZRST
D2
D1
D2
to D21
at one time.
D1 +9 D1 +8 D1 +7 D1 +6 D1 +5 D1 +4 D1 +3 D1 +2 D1 +1
D1
Executed
OFF
After
execution
OFF
316
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
OFF
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
and D21
D2
D1
D2
to D21
at one time.
12
D1 +9 D1 +8 D1 +7 D1 +6 D1 +5 D1 +4 D1 +3 D1 +2 D1 +1
D1
Executed
13
K0
K0
K0
K0
K0
K0
K0
K0
K0
K0
K0
FNC50-FNC59
High-Speed
Processing
After
execution
K0
FNC40-FNC49
Data Operation
Before
execution
FNC 40
ZRST
FNC30-FNC39
Rotation and
Shift
When D1
14
Related instructions
As an independent reset instruction for devices, RST instruction can be used for bit devices (Y, M and S) and word
devices (T, C, D and R).
X001
FMC60-FNC69
Handy
Instruction
1. RST instruction
15
M0
M0 is reset.
RST
T0
RST
D0
D0 is reset.
FNC70-FNC79
External FX I/O
Device
RST
16
FMOV (FNC 16) instruction is provided to write a constant (example: K0) at one time. By using this instruction, "0" can
be written to word devices (KnY, KnM, KnS, T, C, D and R) at one time.
X002
FNC 16
FMOV
K0
D0
K100
17
FNC100-FNC109
Data
Transfer 2
Cautions
1. Caution on specifying devices
Specify same type of devices in D1
device number of D21
and D21
.
is larger than the device number of D21 , only one device specified in D1
is reset.
and D21
.
and D21
C180
C199
FNC140-FNC149
Data
Operation 2
FNC 40
ZRST
C180
C230
16-bit 32-bit
counter counter
Command
input
19
FNC 40
ZRST
FNC 40
ZRST
C200
C230
20
Example
Command
input
18
FNC110-FNC139
Floating Point
FNC80-FNC89
External FX
Device
FNC150-FNC159
Positioning
Control
317
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3. Caution for simultaneous instances of the ZRST instruction and the PLS instruction
The ZRST instruction resets the last stage for the PLS instruction and PLF instruction of the applicable device. In
addition, the reset state of T and C is also reset.
Circuit program
M0
FNC 40
ZRST
M0
M100
PLS
M0
X000
Timing chart
X000
one operation
cycle
one operation
cycle
M0
PLS instruction
execution
ZRST instruction
execution
PLS instruction
execution
ZRST instruction
execution
FNC 40
ZRST
M0
M100
X000
M0
318
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
The ZRST instruction resets also the last stage and reset state of T and C coils.
Accordingly, if the drive contact of X000 is ON in the following program, the counter executes counting after the ZRST
instruction is executed.
Circuit program
M0
C0
C100
RST
M0
13
K10
X000
FNC50-FNC59
High-Speed
Processing
C0
Timing chart
one operation one operation one operation one operation
cycle
cycle
cycle
cycle
ON
14
ON
OFF
OFF
FMC60-FNC69
Handy
Instruction
X000
ON
M0
OFF
Current
value
of C0
15
FNC70-FNC79
External FX I/O
Device
Counting is
executed when
X000 is ON.
OUT instruction ZRST instruction OUT instruction OUT instruction
execution
execution
execution
execution
Program in the following way to disable counting after execution of the ZRST instruction:
16
Circuit program
FNC 40
ZRST
C0
C100
RST
M0
FNC80-FNC89
External FX
Device
M0
17
FNC100-FNC109
Data
Transfer 2
K10
X000
C0
Program example
18
In the program shown below, when the power to the PLC is turned ON or when the PLC mode is changed to RUN, the
specified ranges of bit devices and word devices are reset at one time.
FNC 40
ZRST
M500
M599
D1
D2
C235
C255
D1
D2
S500
S599
19
20
FNC150-FNC159
Positioning
Control
FNC 40
ZRST
D2
FNC140-FNC149
Data
Operation 2
Initial pulse
FNC 40
ZRST
D1
FNC110-FNC139
Floating Point
M8002
12
FNC40-FNC49
Data Operation
FNC 40
ZRST
FNC30-FNC39
Rotation and
Shift
319
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
12.2
Outline
This instruction converts numeric data into ON bit.
A bit number which is set to ON by this instruction indicates a numeric value.
1. Instruction format
FNC 41
DECO
16-bit Instruction
7 steps
Mnemonic
Operation Condition
DECO
DECOP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
SS1
16-bit binary
16-bit binary
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
C D
U \G
SS1
S1
S2
SD2
S1
S2
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
E
" "
to DD1
value.
is decoded to DD1 .
-When all bits of DS1 are "0", the bit device DD1 turns ON.
-When "n" is "8", 28 points (= 256 bits which is the maximum value) are occupied.
Command
input
FNC 41
DECO
n
(1 n 8)
When it is Y, M or S
8 bits
Ignored
is D0
16
32
64
128
0 0 0 0 1 1 1 0 When S
2n
K8 K7 K6 K5 K4 K3 K2 K1
n
Turns ON when all
bits of S are OFF.
Up to Up to Up to Up to
M255
M127
M63
M31
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 When D
M15 M14 M13 M12 M11 M10 M9 M8 M7 M6 M5 M4 M3 M2 M1 M0
M255
Up to 256 bits (The number of occupied bits varies depending on the specified "n" value.)
320
is M0
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
When DD1
is a word device (1 n 4)
is decoded to DD1
FNC30-FNC39
Rotation and
Shift
2)
turns ON.
12
When it is T,C,D,R,U\G
DECO
S
D
FNC40-FNC49
Data Operation
Command
input
FNC 41
n
(1
4)
Ignored
4 bits
13
0 0 1 0 1 0 0 1 1 1 1
K4 K3 K2 K1
When S is D0
2n
n
Turns ON when all bits
of S are OFF.
When D is D2
Up to 16 bits
14
FMC60-FNC69
Handy
Instruction
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
FNC50-FNC59
High-Speed
Processing
1 0 1 0 0
15
FNC70-FNC79
External FX I/O
Device
Caution
While the command input is OFF, the instruction is not executed. The activated decode output is held in the
previous ON/OFF status.
When "n" is "0", the instruction executes no processing.
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
321
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
1. When setting bit devices to ON according to the value of a data register
The value of D0 (whose current value is "14" in this example) is decoded to M0 to M15.
D
D 0
M 0
n
K 4
128
b15
16
4 bits
Ignored
(D0 b0 to b3)
(D0 b4 to b15)
7 6 5 4 3 2 1 b0
0 0 0 0 1 1 1 0
32
FNC 41
DECO
64
M8000
S
When the value of b0 to
2n b3 of D0 is "14"
n = K4
K8 K7 K6 K5 K4 K3 K2 K1
is M0
When the value of b0 to b3 of D0 is "14 (= 0 + 2 + 4 + 8)", M14 (which is the 15th from M0) becomes "1" (turn ON).
When the value of D0 is "0", M0 becomes "1" (turns ON).
When "n" is set to "K4", either one point among M0 to M15 turns ON according to the value of D0 (0 to 15).
By changing "n" from K1 to K8, D0 can correspond to numeric values from 0 to 255.
However, because the device range of DD1
be used for another control.
2. Turning ON the bit out of word devices according to the contents of bit devices
The value expressed by X000 to X002 is decoded to D0 (X000 and X001 are ON, and X002 is OFF in this example.).
n
X000
D0
K3
X2 X1 X0
0 1 1
1
FNC 41
DECO
M8000
S
2n
K3 K2 K1
n
Turns ON when all
bits of S
are OFF.
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0
=D0
When the values expressed by X000 to X002 are "3 (= 1 + 2 + 0)", b3 (which is the 4th from b0) becomes 1 (turns
ON).
When all of X000 to X002 are "0" (OFF), b0 becomes "1" (turns ON).
322
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
12.3
Outline
This instruction obtains positions in which bits are ON in data.
12
FNC 42
ENCO
16-bit Instruction
7 steps
Mnemonic
Operation Condition
ENCO
ENCOP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13
Description
Data type
16-bit binary
16-bit binary
16-bit binary
14
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
15
SS1
S1
S2
SD2
S1
S2
FNC70-FNC79
External FX I/O
Device
Others
Special
Unit
FMC60-FNC69
Handy
Instruction
SS1
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand type
FNC40-FNC49
Data Operation
1. Instruction format
16
FNC80-FNC89
External FX
Device
FNC100-FNC109
Data
Transfer 2
1)
17
is a bit device (1 n 8)
28
is "0" (OFF) from the most significant bit to the low-order bit "n".
18
When it is Y, M or S
S
ENCO
FNC110-FNC139
Floating Point
Command
input
FNC 42
n
(1 n 8)
M16
0
6
M15
0
5
M14
0
4
M13
1
(3)
M12
0
2
M11
0
1
M10
0
0
= M10
20
FNC150-FNC159
Positioning
Control
b15
D10
4 (2) (1)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
b0
All of them are "0".
19
When "n" is 3
FNC140-FNC149
Data
Operation 2
M17
0
323
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2)
When DS1
is a word device (1 n 4)
is "0" (OFF) from the most significant bit to the low-order bit "n".
When it is T, C, D, R, U \G , V or Z
Command
input
FNC 42
ENCO
n
(1 n 4)
D0
2n = 8 (When "n" is 3)
b15
b0
0 1 0 1 0 1 0 1 0 0 0 0 1 0 0 0
6 5 4 (3) 2 1 0
7
Ignored
b15
4 (2) (1)
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1
b0
All of these bits are 0.
D2
Cautions
1. When two or more bits are ON in the DS1
data
The low-order side is ignored, and only the ON position on the high-order side is encoded.
324
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC30-FNC39
Rotation and
Shift
12.4
11
Outline
This instruction counts the number of "1" (ON) bits in the data of a specified device.
12
FNC 43
SUM
16-bit Instruction
5 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
SUM
SUMP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DSUM
DSUMP
Operand type
Description
Data type
SS1
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S2
SD2
S1
S2
Z Modify K
Real
CharacPointer
Number ter String
E
" "
16
FNC80-FNC89
External FX
Device
After
execution
K21847
K9
17
D
16-bit data
0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
18
0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
19
32 16 8 4 2 1
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
FNC140-FNC149
Data
Operation 2
K0
ON status in S
FNC110-FNC139
Floating Point
K21847
Word data
Before
execution
FNC100-FNC109
Data
Transfer 2
FNC 43
SUM
15
FNC70-FNC79
External FX I/O
Device
SS1
Index
Constant
14
FMC60-FNC69
Handy
Instruction
3. Applicable devices
13
FNC50-FNC59
High-Speed
Processing
2. Set data
FNC40-FNC49
Data Operation
1. Instruction format
20
FNC150-FNC159
Positioning
Control
325
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
+1, DS1
The number of bits in the ON status are stored in DD1 , and K0 is stored in DD1 +1.
When all bits are OFF in [ DS1
Command
input
FNC 43
DSUM
+1, DS1
Before
execution
K0
0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
(Number of "1" (ON)) 9 8 7 6 5 4 3 2 1
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
K0
K0
32-bit data
b31
b31
K21847
After
execution
+1, D
K0 is written
Word data
K21847
] D
+1, S
0 0 0 0 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
32 16 8 4 2 1
0 0 0 0 0 00 00 00 00 0 0 0 01 00 00 01 0 1 0 0 1
K9
S
b14
b13
b12
b11
b10
b9
b8
b7
b6
b5
b4
b3
b2
b1
b0
Decimal
Hexadecimal
0000
ON
0001
OFF
0002
OFF
0003
OFF
0004
OFF
0005
OFF
0006
OFF
0007
OFF
0008
OFF
0009
OFF
10
000A
OFF
11
000B
OFF
M8020
(zero
flag)
b15
OFF
FFFB
15
OFF
FFFC
14
OFF
FFFD
15
OFF
FFFE
15
OFF
FFFF
16
OFF
326
Word device
Bit device
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Caution
While the command input is OFF, the instruction is not executed.
The output of the number of bits in the ON status is latched in the previous status.
Program example
12
When X000 is ON, the number of bits in the ON status in D0 is counted, and stored to D2.
FNC 43
SUM
D 0
D 2
FNC40-FNC49
Data Operation
X000
13
D 2 = K0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
M8020=ON
FNC50-FNC59
High-Speed
Processing
D 0 = K0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Zero flag
D 0 = K21847
D 2 = K9
0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 1
0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
32 16 8 4 2 1
FMC60-FNC69
Handy
Instruction
M8020=OFF
14
Zero flag
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
327
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
12.5
Outline
This instruction checks whether a specified bit position in a specified device is ON or OFF.
1. Instruction format
FNC 44
BON
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
BON
BONP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DBON
DBONP
2. Set data
Operand type
Description
SS1
Data type
16- or 32-bit binary
Bit
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
U \G
S2
SS1
Others
Special
Unit
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S3
S1
SD2
S2
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
is output to DD1
FNC 44
BON
is set to OFF.]
(n = K0 to K15)
S
b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1
0
1
0
0
0
0
1
0
1
0
0
1
1
1
1
K15 K14 K13 K12 K11 K10 K9 K8 K7 K6 K5 K4 K3 K2 K1 K0
n
n=5
n=8
328
D
0
1
bit device
(OFF)
(ON)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
The status (ON or OFF) of the bit "n" in [ DS1
[When the bit "n" is ON, DD1
+1, DS1
] is output to DD1
DBON
[ S
+1, S
is set to OFF.]
], it is automatically converted into binary
(n = K0 to K31)
S
+1, S
13
K31 K30 K29 K17 K16 K15 K14 K13 K12 K11 K10 K9 K8 K7 K6 K5 K4 K3 K2 K1 K0
n=5
n = 29
FNC50-FNC59
High-Speed
Processing
b31 b30 b29 b17 b16 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
1
0
1 1
1
1
0
1
0
0
0
0
1
0
1
0
0
1
1
1
1
n
bit device
(OFF)
(ON)
14
FMC60-FNC69
Handy
Instruction
Caution
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DBON D0 M0 R0", "n" is [R1, R0].
15
FNC70-FNC79
External FX I/O
Device
Program example
When the bit 9 (n = 9) in D10 is "1" (ON), M0 is set to "1" (ON).
S
X000
FNC 44
BON
D 10
D
M 0
12
FNC40-FNC49
Data Operation
Command
input
FNC 44
+1, DS1
FNC30-FNC39
Rotation and
Shift
n
K9
16
1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0
b15
b0
b8 b7
n=9
M 0 = ON
FNC80-FNC89
External FX
Device
0 0 1 0 1 0 0 0 0 0 1 0 1 0 1 0
b15
b0
n=9
M 0 = OFF
17
D 10
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
329
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
12.6
Outline
This instruction obtains the mean value of data.
1. Instruction format
FNC 45
MEAN
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DMEAN
DMEANP
Continuous
Operation
Pulse (Single)
Operation
MEAN
MEANP
2. Set data
Operand type
SS1
D
n
Description
Data type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Special
Unit
System User
C D
Others
U \G
SS1
S1
S2
SD2
S1
S2
S1
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
is stored to DD1
FNC 45
MEAN
+ S
+ 1 + + S
+n1
+1, DS1
[ S
FNC 45
DMEAN
+ 1, S
]+[ S
+ 3, S
+ 2] + + [{ S
n
330
+ n 2 1}, { S
+ n 2 2}]
[ D
+ 1, D
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Caution
When a device number is exceeded, "n" is handled as a smaller value in the possible range.
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DMEAN D0 D100 R0", "n" is [R1, R0].
12
Error
FNC40-FNC49
Data Operation
When "n" is any value outside the range from "1" to "64", an operation error (M8067) is caused.
Program example
The data of D0, D1 and D2 are summed, divided by "3", and then stored to D10.
S
FNC 45
MEAN
D 0
D
D 10
13
n
K 3
(D 0) + (D 1) + (D 2)
3
FNC50-FNC59
High-Speed
Processing
X000
(D 10)
14
FMC60-FNC69
Handy
Instruction
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
331
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
12.7
Outline
This instruction sets a state relay as an annunciator (S900 to S999).
1. Instruction format
FNC 46
ANS
Mnemonic
16-bit Instruction
7 steps
Operation Condition
Continuous
Operation
ANS
Operation Condition
2. Set data
Operand type
Description
Data type
16-bit binary
16-bit binary
SS1
Bit
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Special
Unit
System User
T
Others
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
SS1
m
S2
S1 : T0 to T199
S2 : S900 to S999
],
DD1 is set.
When the command input remains ON for less than the evaluation time [m 100 ms] and then turns OFF, the current
value of the timer for evaluation DS1 is reset and DD1 is not set.
When the command input turns OFF, the timer for evaluation is reset.
Command
input
FNC 46
ANS
Command input
S
D
Equivalent to or
Less than
evaluation time longer than
evaluation time
(m 100 ms)
(m 100 ms)
Related devices
Device
332
Name
Description
M8049
Enable annunciator
M8048
Annunciator ON
When M8049 is ON and one of the state relays S900 to S999 is ON, M8048 turns ON.
D8049
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
M8000
M8049
RUN monitor
Y005
X000
Forward Forward
movement end
12
X002
Upper
limit
Lower
limit
X003
X004
Continuous Cycle
T 0
K 10
S900
FNC 46
ANS
T 1
K 20
S901
If both the upper limit input X001 and the lower limit
input X002 are OFF for 2 seconds or more due to a dog
error, S901 turns ON.
FNC 46
ANS
T 2
K100 S902
X005
30
Y005
Y006
Annunciator ON
X007
34
36
Fault display
FNC 47
ANRP
END
16
FNC80-FNC89
External FX
Device
Reset
FNC70-FNC79
External FX I/O
Device
M8048
14
15
Forward
movement
32
13
FMC60-FNC69
Handy
Instruction
21
X001
FNC 46
ANS
FNC50-FNC59
High-Speed
Processing
12
FNC40-FNC49
Data Operation
When the program for external fault diagnosis shown below is created and the content of D8049 (smallest state relay
number in the ON status) is monitored, the smallest state relay number in the ON status from S900 to S999 is
displayed.
If two or more faults are present at the same time, the next smallest fault number is displayed after the fault of the
smallest fault number is cleared.
FNC30-FNC39
Rotation and
Shift
Program example
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
333
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
12.8
Outline
This instruction resets an annunciator (S900 to S999) in the ON status with the smallest number.
1. Instruction format
FNC 47
ANR
16-bit Instruction
Mnemonic
Operation Condition
1 step ANR
ANRP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
FNC 47
ANRP
Related devices
Device
Name
Description
M8049
Enable annunciator
M8048
Annunciator ON
When M8049 is ON and either one among the state relays S900 to S999 is ON, M8048 turns ON.
D8049
Caution
1. Execution in each operation cycle
When ANR instruction is used, annunciators in the ON status are reset in turn in each operation cycle.
When ANRP instruction is used, an annunciator in the ON status is reset only in one operation cycle (only once).
Program example
Refer to ANS (FNC 46) instruction.
For a program example, refer to Section 12.7.
334
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
12.9
Outline
1. Instruction format
FNC 48
SQR
16-bit Instruction
Mnemonic
Operation Condition
SQR
5 steps
SQRP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DSQR
DSQRP
2. Set data
Operand type
Data type
SS1
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
SS1
D
16
FNC80-FNC89
External FX
Device
FNC 48
SQR
17
FNC100-FNC109
Data
Transfer 2
FNC 48
DSQR
+ 1, S
+ 1, D
18
FNC110-FNC139
Floating Point
Caution
1. Operation result
1)
The obtained square root is an integer because the decimal point is ignored.
When the calculated value is ignored, M8021 (borrow flag) turns ON.
2)
When the calculated value is true "0", M8020 (zero flag) turns ON.
19
FNC140-FNC149
Data
Operation 2
Program example
The square root of D10 is stored to D12.
The value of D10 is "100".
S
X000
D 10
20
D
D 10 D 12
D 12
=
FNC150-FNC159
Positioning
Control
FNC 48
SQR
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
14
FMC60-FNC69
Handy
Instruction
DS1
Description
Word device number storing data whose square root is obtained
13
FNC50-FNC59
High-Speed
Processing
Continuous
Operation
Pulse (Single)
Operation
12
FNC40-FNC49
Data Operation
100 10
335
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1. Instruction format
FNC 49
FLT
16-bit Instruction
Mnemonic
Operation Condition
FLT
5 steps
Continuous
Operation
Pulse (Single)
Operation
FLTP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DFLT
DFLTP
2. Set data
Operand type
Description
Data type
SS1
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
SS1
S1
S2
S1
S2
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
" "
FNC 49
FLT
is converted into binary floating point (real number), and stored to [ DD1
S
S
Binary
integer
( D
+ 1, D
+1, DD1
].
+1, DD1
DS1
].
Command
input
FNC 49
DFLT
( S
+ 1, S
Binary integer
)( D
+1, D
Related instruction
Instruction
INT (FNC129)
Description
Inverse of the FLT instruction, converts binary floating point into binary integer.
Caution
1. It is not necessary to convert a constant (K or H) into a floating point value.
The value of a K or H specified in each instruction for binary floating point (real number) operation is automatically
converted into binary floating point (real number). It is not necessary to convert such a constant with the FLT
instruction.
(K and H cannot be specified in RAD, DEG, EXP and LOGE instructions.)
336
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Program example
1. Arithmetic operations by binary floating point operations
The sequence program shown below is constructed as follows:
1)
Calculation example
(X017 to X010)
2-digit BCD
(1)
(2)
(5)
(7)
(4)
(D27, D26)
Binary floating
point operation
(8)
(D13, D12)
Scientific notation operation
for monitoring
13
(D15, D14)
32-bit binary integer
FNC50-FNC59
High-Speed
Processing
(D22)
BIN
(D21, D20)
Binary floating
point operation
(6)
12
FNC40-FNC49
Data Operation
(D0)
16-bit binary
K34.5
(3)
(D25, D24)
Binary floating
point operation
(D29, D28)
Binary floating
point operation
FMC60-FNC69
Handy
Instruction
2)
14
Sequence program
M8000 (1)
D20
(2)
FNC 19
BIN
K2X010
D22
(3)
FNC 49
FLT
D22
D24
(4)
FNC123
DEDIV
K345
K10
D26
(5)
FNC123
DEDIV
D20
D24
D28
(6)
FNC122
DEMUL
D28
D26
D10
(7)
FNC118
DEBCD
D10
D12
(8)
FNC129
DINT
D10
D14
15
16
FNC80-FNC89
External FX
Device
D0
FNC70-FNC79
External FX I/O
Device
FNC 49
FLT
17
FNC100-FNC109
Data
Transfer 2
(D11, D10)
(D13, D12)
Binary floating
Scientific notation operation
point operation
for monitoring
(D11, D10)
(D15, D14)
Binary floating
32-bit binary integer
point operation
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
337
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
338
FNC No.
Mnemonic
Symbol
50
REF
51
REFF
52
MTR
53
HSCS
54
HSCR
55
HSZ
56
SPD
SPD
57
PLSY
58
59
Function
Reference
Refresh
Section 13.1
Section 13.2
Input Matrix
Section 13.3
HSCS S1 S2 D
Section 13.4
HSCR S1 S2 D
Section 13.5
Section 13.6
Speed Detection
Section 13.7
PLSY S1 S2 D
Pulse Y Output
Section 13.8
PWM
PWM S1 S2 D
Section 13.9
PLSR
PLSR S1 S2 S3 D
REF
D n
REFF
MTR
HSZ
S D1 D2 n
S1 S2 S D
S1 S2 D
Acceleration/deceleration setup
Section
13.10
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
13.1
Outline
This instruction immediately outputs the latest input (X) information or the current output (Y) operation result in the
middle of a sequence program.
FNC40-FNC49
Data Operation
1. Instruction format
FNC 50
REF
16-bit Instruction
5 steps
Mnemonic
Operation Condition
REF
REFP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand Type
Description
Data Type
Bit
14
16-bit binary
System User
X
Word Devices
Digit Specification
System User
Others
Special
Unit
Index
V Z Modify
Constant
K
Real
CharacPointer
Number ter String
E
" "
S1 S2
S3 S3
Up to the final input number (whose least significant digit number is "0")
Up to the final output number (whose least significant digit number is "0")
K8 (H8) or K16 (H10)
K8 (H8) or K16 (H10): Up to K128 (H80) (which is a multiple of 8)
K8 (H8) or K16 (H10): Up to K256 (H100) (which is a multiple of 8)
16
FNC80-FNC89
External FX
Device
15
FNC70-FNC79
External FX I/O
Device
Bit Devices
FMC60-FNC69
Handy
Instruction
3. Applicable devices
Operand
Type
12
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
339
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 50
REF
Head Number
device of points
number
- When this instruction is executed, the output latch memory is refreshed to the output status in the specified
range.
Image memory output (Y)
REF instruction (executed)
END instruction
processing (output)
Output refresh
REF instruction + END processing
ON
ON
ON
Improved response
delay time
2)
Improved response
delay time
FNC 50
REF
Head Number
device of points
number
- If the input information is turned ON approximately 10 ms (response delay time of the input filter) before the
instruction is executed, the input image memory turns ON when the instruction is executed.
- In X000 to X017*1, the response delay time of the input filter can be changed.
*1.
340
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
5ms
20ms
12
ON
10ms
10ms
FNC40-FNC49
Data Operation
10ms
Filter time
REF instruction (executed)
END instruction (input) processing
13
ON
FNC50-FNC59
High-Speed
Processing
Input refresh
REF instruction + END processing
ON
Improved response
delay time
14
FMC60-FNC69
Handy
Instruction
Cautions
1. Setting the number of refreshed points "n"
Set a multiple of 8 such as "K8 (H8), K16 (H10) K256 (H100)". Any other numeric value causes an error.
Program examples
1. When refreshing inputs
16
FNC 50
REF
X010
K 8
FNC80-FNC89
External FX
Device
X000
17
FNC 50
REF
Y000
K 24
FNC100-FNC109
Data
Transfer 2
Y000 to Y007, Y010 to Y017 and Y020 to Y027 (24 points in total) are refreshed.
X001
15
FNC70-FNC79
External FX I/O
Device
D
Make sure that the least significant digit number is "0" such as "X000, X010, X020 "or " Y000, Y010, Y020 "
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
341
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
13.1.1
2)
3)
3. When using the REF instruction between FOR and NEXT instructions or between a pointer (with
a lower step number) and CJ instruction (with a higher step number)
Inputs and outputs can be refreshed even when the input information or immediate output is required in the middle of
a routine program during control.
342
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
13.2
Outline
1. Instruction format
FNC 51
REFF
16-bit Instruction
3 steps
Mnemonic
Operation Condition
REFF
REFFP
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
n
Description
Data Type
14
16-bit binary
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S S
16
FNC80-FNC89
External FX
Device
FNC 51
REFF
15
FNC70-FNC79
External FX I/O
Device
Command
input
FMC60-FNC69
Handy
Instruction
3. Applicable devices
Operand
Type
12
FNC40-FNC49
Data Operation
The digital input filter time of the inputs X000 to X017 can be changed using this instruction or D8020.
Using this instruction, the status of inputs X000 to X017 can be refreshed at an arbitrary step in the program for the
specified input filter time, and then transferred to the image memory.
n
K0 to K60 (Filter constant from 0 to 60 ms)
When the command input is ON, the REFF instruction is executed in each operation cycle.
When the command input is OFF, the REFF instruction is not executed, and the input filter of X000 to X017 uses
the set value of D8020 (which is the value used during input processing).
17
FNC100-FNC109
Data
Transfer 2
When the input turns ON "n 1 ms" before the instruction is executed, the image memory is set to ON. When the
input turns OFF "n 1 ms" before the instruction is executed, the image memory is set to OFF.
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
343
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Cautions
1. Setting the filter time "n"
Set "n" within the range from K0 (H0) to K60 (H3C) [0 to 60 ms].
X000 to X005
5 s*1
X006, X007
50 s
*2
200 s*2
X010 to X017
*1.
When setting the input filter time to "5 s", perform the following actions:
- Make sure that the wiring length is 5 m or less.
- Connect a bleeder resistor of 1.5 k (1 W or more) to the input terminal, and make sure that the load
current in the open collector transistor output of the external equipment is 20 mA or more including the
input current of the main unit.
*2.
The filter time is fixed to 10 ms for X010 to X017 in 16-point type FX3U PLCs and 16-point type FX3UC PLCs.
Program example
1. Relationship between the program and the filter time
X010
n
FNC 51
REFF
K1
X000
When X010 is ON
The image memory of X000 to
X017 is refreshed with an input
filter of 1 ms.
Input
processing
Sequence
program
X001
REFF instruction
1 ms
M8000
FNC 51
REFF
K20
REFF instruction
X000
20ms
END
END
344
Output
processing
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
The input filter initial value (10 ms) for X000 to X017 is set in special data register D8020.
By changing this value using the MOV instruction, etc., the input filter value for X000 to X017 which is used during
execution of the END instruction can be changed.
REFF
instruction
X000 to X017
*1.
Digital filter
Initial value: 10 ms
C-R filter
Fixed to 10 ms
14
Input image
memory
FMC60-FNC69
Handy
Instruction
Input terminal
X020 and
later
FNC50-FNC59
High-Speed
Processing
Input terminal
13
D8020
When the
command is ON
12
FNC40-FNC49
Data Operation
FNC30-FNC39
Rotation and
Shift
13.2.1
15
FNC70-FNC79
External FX I/O
Device
Regardless of the change in the filter time executed by the REFF instruction, when the following functions and
instruction are executed, the input filter value is automatically changed (to 5 s in X000 to X005 and 50 s in X006 and
X007).
However, if the digital filter is used in any other functions or instructions than the ones listed, the digital filter uses the
time set in D8020. As a result, the program will not run correctly if the ON or OFF duration of the corresponding input
signal is less than the input filter time.
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
345
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
13.3
Outline
This instruction reads matrix input as 8-point input "n"-point output (transistor) in the time division method.
1. Instruction format
FNC 52
MTR
Mnemonic
16-bit Instruction
9 steps
Operation Condition
Continuous
Operation
MTR
Operation Condition
2. Set data
Operand Type
Description
Data Type
Bit
D1
Bit
D2
Bit
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
X
Digit Specification
System User
Others
Special
Unit
Index
V Z Modify
Real
CharacConstant
Pointer
Number ter String
K
" "
and "n"
S
D1
D2
n
FNC 52
MTR
D2 .
Number
ON
of
output
Output
number destination columns
D1
D2
For each output, the I/O processing is executed immediately in turn in interrupt at every 20 ms under consideration
of the input filter response delay of 10 ms.
346
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
D2 +17
D2 +16
D2 +15
D2 +14
D2 +13
D2 +12
D2 +11
D2 +10
Diode
0.1A(50V)
2nd
column
Command
contact
D2 +7
D2 +6
D2 +5
D2 +4
D2 +3
D2 +2
D2 +1
[1]
[3]
FNC40-FNC49
Data Operation
D2
12
1st
column
FNC30-FNC39
Rotation and
Shift
The figure below shows an example of the FX3U series main unit (sink input/sink output).
For wiring details, refer to the Hardware Edition of each PLC.
[5]
[2]
[6]
[4]
20ms
24V 0V S/S
S +1 S +2 S +3 S +4 S +5 S +6 S +7
PLC
COM
D1
13
M8029 (execution
complete)
FNC50-FNC59
High-Speed
Processing
D1 +1 D1 +2 D1 +3 D1 +4 D1 +5 D1 +6 D1 +7
14
FMC60-FNC69
Handy
Instruction
"n" points
are
occupied.
15
FNC70-FNC79
External FX I/O
Device
Related device
Device
Name
Description
M8029
16
Cautions
FNC80-FNC89
External FX
Device
Eight input points are occupied from the input device number specified in
2)
"n" output points are occupied from the output device number specified in
D1 .
D1
D2 .
17
FNC100-FNC109
Data
Transfer 2
output specified in
3. Wiring
18
FNC110-FNC139
Floating Point
4. Output format
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
347
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
n=Three outputs (Y020, Y021 and Y022) are set to ON in turn repeatedly.
Every time an output is set to ON, eight inputs in the 1st, 2nd and 3rd columns are received in turn repeatedly, and
stored to M30 to M37, M40 to M47 and M50 to M57 respectively.
In this program example, the FX3U series main unit (sink input/sink output) is used.
For wiring details, refer to the Hardware Edition of each PLC.
n
X020
Y020
M30
K3
Input
number
Output
number
M 57
M 56
ON
Number
output
of
destination columns
M 55
M 54
D2
M 53
D1
M 52
Diode
0.1A(50V)
3rd
column
M 50
FNC 52
MTR
M 51
M0
M 47
M 46
M 45
M 44
M 43
M 42
M 41
Diode
0.1A(50V)
2nd
column
M 40
M 37
M 36
M 35
M 34
M 33
M 31
M 30
M 32
Sink input
Sink output
COM Y020Y021Y022Y023Y024Y025Y026Y027
348
Y020
Y021
[1]
[4]
2nd column input is received.
[2]
[5]
Y022
[3]
[6]
20ms
PLC
Diode
0.1A(50V)
1st
column
M0
M8029 (execution
complete)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
13.3.1
1. Command input
1)
FNC 52
MTR
X020
Y040
M0
12
FNC40-FNC49
Data Operation
M{{
(normally Open)
K8
13
2)
The figure below shows an example of the FX3U Series main unit (sink input/sink output).
15
FNC70-FNC79
External FX I/O
Device
Matrix
circuit
24V
S/S
0V
14
FMC60-FNC69
Handy
Instruction
FNC50-FNC59
High-Speed
Processing
1)
Refer to the
previous page.
16
FX3U-64MT/ES
FNC80-FNC89
External FX
Device
Transistor output
COM5 Y020 Y021 Y022 Y023 Y024 Y025 Y026 Y027
3.3k /0.5W
17
FNC100-FNC109
Data
Transfer 2
18
Pull-up resistor
80 ms 80 ms
*3.
160 ms
20
FNC150-FNC159
Positioning
Control
*2.
160 ms
19
FNC140-FNC149
Data
Operation 2
FNC110-FNC139
Floating Point
*1.
349
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
13.4
Outline
This instruction compares a value counted by a high-speed counter with a specified value, and immediately sets an
external output (Y) if the two values are equivalent each other.
For the counter interrupt using HSCS instruction, refer to Section 36.6.
1. Instruction format
FNC 53
HSCS
16-bit Instruction
Mnemonic
Operation Condition
13 steps
Operation Condition
Continuous
Operation
DHSCS
2. Set data
Operand Type
Description
Data Type
S1
Data to be compared with the current data value of a high-speed counter or word device
number.
32-bit binary
S2
32-bit binary
Bit device number to be set to ON when the compared two values are equivalent to each
other
Bit
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
X
Digit Specification
System User
R
S2
S1
Others
Special
Unit
U \G
Index
Real
CharacConstant
Pointer
Number ter String
V Z Modify
" "
S3
S2
S4
S1
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
S4: When using the counter interrupt function in FX3U/FX3UC PLCs, specify an interrupt pointer.
For counter interrupt using HSCS instruction, refer to Section 36.6.
+1,
S1
S2
] (for example, when the current value changes from "199" to "200" or from "201" to "200" if the
K2,147,483,647
Comparison Comparison Output
value
source
destination
FNC 53
DHSCS
350
S1
S2
Set to ON.
S1
= S2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
M8000
C255
K2,147,483,647
RUN monitor
Comparison
value
K100
C255
12
Set to ON.
Y010
FNC40-FNC49
Data Operation
FNC 53
DHSCS
Comparison Output
source
destination
Related instructions
13
Instruction name
DHSCS
FNC 53
DHSCR
FNC 54
DHSZ
FNC 55
DHCMOV
FNC189
DHSCT
FNC280
FNC50-FNC59
High-Speed
Processing
Instruction
14
FMC60-FNC69
Handy
Instruction
Cautions
1. Selection of the count comparison method
1)
D100
K0
SET
Y010
Y010
K8
18
FNC110-FNC139
Floating Point
FNC 50
REF
D100
17
FNC100-FNC109
Data
Transfer 2
K100
C251
16
FNC80-FNC89
External FX
Device
FNC229
LDD<=
FNC189
DHCMOV
15
FNC70-FNC79
External FX I/O
Device
FX3U/FX3UC PLC
When the HSCS instruction is used in FX3U/FX3UC PLCs, hardware counters (C235, C236, C237, C238, C239,
C240, C244 (OP), C245 (OP), C246, C248 (OP), C251 and C253) are automatically switched to software
counters, and the maximum frequency and total frequency of each counter are affected.
Refer to the counting operation described below, and select according to the contents of control whether to use
HSCS instruction or general-purpose comparison instruction.
a) Case to select DHSCS instruction
- When the output should be given when the counting result becomes equivalent to the comparison value
regardless of the scan time of the PLC
b) Cases to select a general-purpose comparison instruction
- When the frequency is beyond the counting performance of software counters (and below the counting
performance of hardware counters)
- When counting is regarded as important, but the effect of the scan time can be ignored in operations
according to the counting result
- When one instruction is executed in 33 or more positions at the same time
M8000
FNC30-FNC39
Rotation and
Shift
Operation
When the current value of the high-speed counter C255 changes from "99" to "100" or from "101" to "100", Y010 is set
to ON (output refresh).
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
351
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FX3S/FX3G/FX3GC PLCs
When the HSCS instruction is used in FX3S/FX3G/FX3GC PLCs, the total frequency of each counter is affected.
Refer to the counting operation described below, and select according to the contents of control whether to use
the HSCS instruction or a general-purpose comparison instruction.
a) Case to select the HSCS instruction
- When the output should be given if the counting result becomes equivalent to the comparison value
regardless of the scan time of the PLC
b) Cases to select a general-purpose comparison instruction
- When counting is regarded as important, but the effect of the scan time can be ignored in operations
according to the counting result
- When one instruction is executed in 7 or more positions at the same time
FNC229
LDD<=
K100
C251
FNC 50
REF
SET
Y010
Y010
K8
4. Priority order in operation among HSCS (FNC 53), HSCR (FNC 54), and HSZ (FNC 55)
instructions for the same high-speed counter
For details, refer to "6. Priority order in operations among HSCS (FNC 53), HSCR (FNC 54), and HSZ (FNC
55) instructions for the same high-speed counter" in Subsection 13.4.1.
6. For other cautions on using HSCS instruction, refer to the description later.
For details, refer to the next page.
Program example
With regard to the current value of a counter, different outputs (Y) are arbitrary set to ON by two values.
M8000
C255
K2,147,483,647
RUN monitor
FNC 53
DHSCS
FNC 53
DHSCS
S1
S2
D
K100
C255
Y010
S1
S2
D
K150
C255
Y011
Comparison Comparison
Output
value
source
destination
C255
Y010
Y011
352
99
100
101
149
150
151
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
12
FX3U/FX3UC PLCs
DHSCS, DHSCR and DHSZ instructions can be used as many times as necessary in the same way as general
instructions. However, the number of simultaneously driven instructions is limited. The DHSCT instruction can
only be used once in any program.
Instruction
DHSCR
DHSZ
DHSCT
2)
DHSCS
DHSCR
6 instructions
15
DHSZ
2)
When using two or more instructions for high-speed counter and non-consecutive output (Y) numbers
A program example is shown below:
K100
C255
Y000
FNC 53
DHSCS
K100
C255
Y010
18
When C255 reaches K100, the output Y000 is driven by interrupt. Y010 is driven when END processing is
executed.
If interrupt drive is required, use an output number ranging from Y001 to Y007 whose high-order two digits are
equivalent.
FNC110-FNC139
Floating Point
FNC 53
DHSCS
17
FNC100-FNC109
Data
Transfer 2
1)
16
FNC80-FNC89
External FX
Device
When the DHSZ or DHSCT instruction is used in FX3U/FX3UC PLCs, the maximum response frequency and total
frequency of every software counter are limited.
When the DHSCS, DHSCR or DHSZ instruction is used in FX3S/FX3G/FX3GC PLCs, the total frequency of high-speed
counters is limited.
For the total frequency in FX3S/FX3G/FX3GC PLCs, refer to Subsection 4.7.7.
For the maximum response frequency and total frequency in FX3U/FX3UC PLCs, refer to Subsection 4.8.10.
FNC70-FNC79
External FX I/O
Device
M8000
14
FMC60-FNC69
Handy
Instruction
FX3S/FX3G/FX3GC PLCs
DHSCS, DHSCR and DHSZ instructions can be used as many times as necessary in the same way as general
instructions. However, the number of simultaneously driven instructions is limited.
Instruction
13
FNC50-FNC59
High-Speed
Processing
DHSCS
FNC40-FNC49
Data Operation
FNC30-FNC39
Rotation and
Shift
13.4.1
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
353
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2)
Operation
Even if the condition for setting the output to ON or OFF is given as the comparison result, the comparison result
does not change when an instruction is simply driven.
Program
If an instruction for the high-speed counter is used while M8025*1 is driven, the instruction is executed again when
the current value of the high-speed counter C241 is cleared by an external reset terminal. And the comparison
result is output even if a counting input is not given.
M8000
RUN monitor
*1.
2)
354
K9,999
K0
C241
Y000
M8025 is cleared when the PLC mode is changed from RUN to STOP.
It is not necessary to drive M8025 in FX3S/FX3G/FX3GC PLCs.
Operation
When the external reset input X001 turns ON while the current value of C241 is "100", for example, the current
value of C241 is reset to "0". And Y000 is reset at this time even if a counting input is not given.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
1)
M8000
C235
K500
C235
Y000
(1)
FNC 53
DHSCS
K500
C235
Y001
(2)
K250
K500
C235
Y003
FNC 11
DZCPP
K250
K500
C235
Y003
FNC 54
DHSCR
K500
C235
Y006
FNC 54
DHSCR
K500
M8000
Y002
(3)
DHSCS (1)
DHSCS (1)
DHSCS (2)
DHSZ (4)
DHSCS (2)
DHSCS (2)
DHSCR (3)
DHSCS (1)
DHSCR (3)
DHSCR (3)
DHSZ (4)
DHSCS (2)
DHSZ (4)
(Not supported)
DHSCR (5)
DHSCR (3)
DHSCR (5)
DHSCR (5)
DHSCR (5)
DHSCR (6)
(self-reset)
DHSCR (6)
(self-reset)
DHSCR (6)
(self-reset)
(4)
15
(5)
16
C235
FNC80-FNC89
External FX
Device
C235
(6)
Self-reset program
Operation of FX3S/FX3G/FX3GC/
FX1S/FX1N/FX1NC/FX2N/FX2NC PLCs [reference]
Present value
17
500
Present value
250
250
FNC100-FNC109
Data
Transfer 2
500
0
Y000 to Y002 and Y006 do not change.*1
Y003
ON
OFF
OFF
Y000,Y001
ON
Y002
OFF
Y003
It does not change.*2
Y004
Y005
ON
ON
*3
19
Present value:1
355
20
FNC150-FNC159
Positioning
Control
The comparison instruction for high-speed counter is executed at the END instruction for the scan in which the
comparison instruction is driven.
When the comparison value is changed, the changed comparison instruction also becomes effective at the END
instruction for the scan in which the comparison instruction is driven.
FNC140-FNC149
Data
Operation 2
Y005
*1. To change the comparison results by the instructions (1)
to (3) and (5), change the comparison value "K500" in the
instructions (1) to (3) and (5) to "K0".
*2. To set Y005 to ON in the HSZ instruction (4), set a value
smaller than the comparison value "K500". However, due
to the response delay at the output, the output may not
operate within the short time before the counter's present
value is reset to "0".
ON
18
Present value:1
FNC110-FNC139
Floating Point
Y004
ON
14
FNC70-FNC79
External FX I/O
Device
FNC 55
DHSZ
C235
DHSCR (6)
(self-reset)
FX1N/FX1NC/
FX1S
FMC60-FNC69
Handy
Instruction
K500
DHSCS (1)
FX3S/
FX3U/FX3UC FX3G/FX3GC/
FX2N/FX2NC
FNC50-FNC59
High-Speed
Processing
M8000
Program
sequence
FNC 53
DHSCS
FNC 54
DHSCR
13
Processing sequence
K10000
12
FNC40-FNC49
Data Operation
2)
FX3U/FX3UC PLCs
When the same comparison value is used for the same high-speed counter in the HSCS, HSCR and HSZ
instructions, reset (self-reset) of the comparison target high-speed counter for the HSCR instruction is executed
with the highest priority (as shown in the table below).
In this case, the comparison results do not change in HSCS, HSCR, and HSZ instructions whose comparison
value is programmed to be the same as the comparison value for self-reset by HSCR instruction.
To change the comparison results, set the comparison value to "K0".
FX3S/FX3G/FX3GC PLCs
In FX3S/FX3G/FX3GC PLCs, the HSCS, HSCR and HSZ instructions are executed in the order of programming.
FNC30-FNC39
Rotation and
Shift
6. Priority order in operations among HSCS (FNC 53), HSCR (FNC 54), and HSZ (FNC 55)
instructions for the same high-speed counter
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
13.5
Outline
This instruction compares the value counted by a high-speed counter with a specified value at each count, and
immediately resets an external output (Y) when both values become equivalent to each other.
1. Instruction format
FNC 54
HSCR
16-bit Instruction
Mnemonic
Operation Condition
13 steps
Operation Condition
Continuous
Operation
DHSCR
2. Set data
Operand Type
Description
Data Type
S1
Data to be compared with the current value of a high-speed counter or word device
number storing the data to be compared
32-bit binary
S2
32-bit binary
Bit device number to be reset (set to OFF) when both values become equivalent each
other.
Bit
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
R
S3
S1
Others
Special
Unit
U \G
Index
V Z Modify
Constant
K
Real
CharacPointer
Number ter String
E
" "
S4
S2
S1
S2
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: The same counter as S2 can be specified also. (Refer to the program example shown later.)
S3: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S4: This function is supported only in FX3U/FX3UC PLCs.
+1,
S1
S2
] (for example, when the current value changes from "199" to "200" or from "201" to "200" if the
S2
K2,147,483,647
Comparison Comparison
value
source
FNC 54
DHSCR
S1
S2
Output
destination
Reset.
S1
= S2
Operation
When the present value of the high-speed counter C255 changes (counts) from "99" to "100" or from "101" to "100",
Y010 is reset (output refresh).
M8000
RUN
monitor
C255
K2,147,483,647
Comparison Comparison
value
source
FNC 54
DHSCR
356
K100
C255
Output
destination
Y010
Reset.
K100 = C255 Y010
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Related instructions
The following instructions can be combined with high-speed counters:
FNC No.
DHSCS
FNC 53
Instruction name
DHSCR
FNC 54
DHSZ
FNC 55
DHCMOV
FNC189
DHSCT
FNC280
12
FNC40-FNC49
Data Operation
Instruction
Cautions
13
D100
M8000
2)
C251
FNC 50
REF
D100
K0
RST
Y010
Y010
K8
16
FNC80-FNC89
External FX
Device
FNC229
LDD<= K10000
FNC189
DHCMOV
Y010
Y010
K8
19
FNC140-FNC149
Data
Operation 2
FNC 50
REF
RST
18
FNC110-FNC139
Floating Point
M8000
C251
17
FNC100-FNC109
Data
Transfer 2
FX3S/FX3G/FX3GC PLCs
When the HSCR instruction is used in FX3S/FX3G/FX3GC PLCs, the total frequency of each counter is affected.
Refer to the counting operation described below, and select according to the contents of control whether to use
the HSCR instruction or a general-purpose comparison instruction.
a) Case to select the HSCR instruction
- When the output should be given if the counting result becomes equivalent to the comparison value
regardless of the scan time of the PLC
b) Cases to select a general-purpose comparison instruction
- When counting is regarded as important, but the effect of the scan time can be ignored in operations
according to the counting result
- When one instruction is executed in 7 or more positions at the same time
FNC229
K10000
LDD<=
15
FNC70-FNC79
External FX I/O
Device
M8000
14
FMC60-FNC69
Handy
Instruction
FX3U/FX3UC PLCs
When the HSCR instruction is used in FX3U/FX3UC PLCs, hardware counters (C235, C236, C237, C238, C239,
C240, C244 (OP), C245 (OP), C246, C248 (OP), C251 and C253) are automatically switched to software
counters, and the maximum frequency and total frequency of each counter are affected.
Refer to the counting operation described below, and select according to the contents of control whether to use
HSCR instruction or general-purpose comparison instruction.
a) Case to select DHSCR instruction
- When the output should be given when the counting result becomes equivalent to the comparison value
regardless of the scan time of the PLC
b) Cases to select a general-purpose comparison instruction
- When the frequency is beyond the counting performance of software counters (and below the counting
performance of hardware counters)
- When counting is important, but the effect of the scan time can be ignored in operations depending on the
counting result
- When one instruction is executed in 33 or more positions at the same time
FNC50-FNC59
High-Speed
Processing
1)
20
FNC150-FNC159
Positioning
Control
357
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3. Priority order in operation among HSCS (FNC 53), HSCR (FNC 54), and HSZ (FNC 55)
instructions for the same high-speed counter
For details, refer to "6. Priority order in operations among HSCS (FNC 53), HSCR (FNC 54), and HSZ (FNC
55) instructions for the same high-speed counter" in Subsection 13.4.1.
Program example
1. Example of self-reset circuit
When the current value of C255 becomes "400", C255 is immediately reset. Its current value becomes "0", and the
output contact is set to OFF.
M8000
C255
K300
RUN monitor
FNC 54
DHSCR
K400
C255
C255
Current value
of C255
Output contact
of C255
358
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
13.6
Outline
1. Instruction format
FNC 55
HSZ
16-bit Instruction
Mnemonic
Operation Condition
17 steps
13
Continuous
Operation
DHSZ
FNC50-FNC59
High-Speed
Processing
Operation Condition
2. Set data
Description
Data Type
S1
Data to be compared with the current value of a high-speed counter or word device
number storing data to be compared (comparison value 1)
32-bit binary
S2
Data to be compared with the current value of a high-speed counter or word device
number storing data to be compared (comparison value 2)
32-bit binary
32-bit binary
Head bit device number to which the comparison result is output based on upper and
lower comparison values
14
FMC60-FNC69
Handy
Instruction
Operand Type
Bit
15
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
U \G
S2
S3
S2
S2
S3
Constant
V Z Modify
Real
CharacPointer
Number ter String
E
" "
S
S1
16
FNC80-FNC89
External FX
Device
S1
Index
FNC70-FNC79
External FX I/O
Device
3. Applicable devices
Operand
Type
12
FNC40-FNC49
Data Operation
This instruction compares the current value of a high-speed counter with two values (one zone), and outputs the
comparison result to three bit devices (refresh).
For the table high-speed comparison mode, refer to Subsection 13.6.2.
For the frequency control mode, refer to Subsection 13.6.3.
17
FNC100-FNC109
Data
Transfer 2
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
value", "inside the comparison zone" or "larger than the upper comparison value", one among
+1 and
18
FNC110-FNC139
Floating Point
19
S
K2,147,483,647
Comparison
value 1
FNC 55
DHSZ
S1
Comparison
value 2
S2
Comparison
source
Output
destination
FNC140-FNC149
Data
Operation 2
Command
input
Set to ON.
D
>
S1
S2
+1
> S2
+2
20
FNC150-FNC159
Positioning
Control
S1
359
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Comparison points
Make sure that the comparison value 1 and the comparison value 2 have the following relationship:
[ S1
] [ S2
+1, S1
+1, S2
Comparison point
Comparison value 1
S1
+1, S1
Comparison value 2
S2
+1, S2
Operation
When the current value of the high-speed counter C251 changes (counts) as shown below, the comparison result is
output to one of the outputs Y000, Y001 or Y002.
M8000
C251
RUN monitor
K2,147,483,647
Comparison
value 1
FNC 55
DHSZ
Comparison Comparison
Output
value 2
source
destination
K1000
K2000
C251
ON
Y000
Y000
Comparison pattern
1000 >
S1
S1
>
<
S2
Y000
Y001
Y002
ON
OFF
OFF
OFF
999 1000
ON OFF
OFF ON
999 1000
OFF ON
ON OFF
OFF
999 1000
ON OFF
OFF ON
OFF
999 1000
OFF ON
ON OFF
OFF
OFF
ON
OFF
1000
S2
2000
2000 2001
OFF
ON OFF
OFF ON
2000 2001
OFF
OFF ON
ON OFF
2000 2001
OFF
ON OFF
OFF ON
2000 2001
OFF
OFF ON
ON OFF
> 2000
OFF
OFF
ON
Related instructions
The following instructions can be combined with high-speed counters:
360
Instruction
FNC No.
DHSCS
FNC 53
Instruction name
DHSCR
FNC 54
DHSZ
FNC 55
DHCMOV
FNC189
DHSCT
FNC280
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
D100
FNC229
LDD <= K10000
D100
FNC226
LDD < K20000
D100
M8000
14
K0
Y010
FNC238
ANDD >= K20000
D100
Y011
15
Y012
FNC 50
REF
Y010
K8
17
18
C251
FNC229 K10000
LDD<=
C251
FNC226
K20000
LDD<
C251
Y010
FNC238
K20000
ANDD>=
C251
FNC110-FNC139
Floating Point
FNC225 K10000
LDD>
Y011
19
Y012
FNC 50
REF
Y010
FNC140-FNC149
Data
Operation 2
M8000
16
FNC100-FNC109
Data
Transfer 2
FX3S/FX3G/FX3GC PLCs
When the HSZ instruction is used in FX3S/FX3G/FX3GC PLCs, the total frequency of each counter is affected.
Refer to the counting operation described below, and select according to the contents of control whether to use
the HSZ instruction or a general-purpose comparison instruction.
a) Case to select the HSZ instruction
- When the output should be given if the counting result becomes equivalent to the comparison value
regardless of the scan time of the PLC
b) Cases to select a general-purpose comparison instruction
- When counting is regarded as important, but the effect of the scan time can be ignored in operations
according to the counting result
- When one instruction is executed in 7 or more positions at the same time
FNC80-FNC89
External FX
Device
2)
D100
FNC70-FNC79
External FX I/O
Device
FNC225
LDD > K10000
C251
FMC60-FNC69
Handy
Instruction
FNC189
DHCMOV
13
FNC50-FNC59
High-Speed
Processing
M8000
12
FNC40-FNC49
Data Operation
FX3U/FX3UC PLCs
When the HSZ instruction is used in FX3U/FX3UC PLCs, hardware counters (C235, C236, C237, C238, C239,
C240, C244 (OP), C245 (OP), C246, C248 (OP), C251 and C253) are automatically switched to software
counters, and the maximum frequency and total frequency of each counter are affected.
Refer to the counting operation described below, and select according to the contents of control whether to use
the DHSZ instruction or general-purpose comparison instruction.
a) Case to select the DHSZ instruction
- When the output should be given when the counting result becomes equivalent to the comparison value
regardless of the scan time of the PLC
b) Cases to select a general-purpose comparison instruction
- When the frequency is beyond the counting performance of software counters (and below the counting
performance of hardware counters)
- When counting is important, but the effect of the scan time can be ignored in operations depending on the
counting result
- When one instruction is executed in 33 or more positions at the same time
FNC30-FNC39
Rotation and
Shift
Cautions
K8
20
FNC150-FNC159
Positioning
Control
361
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
The DHSZ instruction executes comparison and outputs the result only when a counting pulse is input to a highspeed counter.
(When S1 is "1000" and S2 is "1999", the output
changes from "999" to "1000" or from "1999" to "2000".)
2)
Because the comparison result cannot be obtained when restoring the power or when the PLC mode switches
from STOP to RUN, the result is not output even if the comparison condition is provided.
For details, refer to "13.6.1. Program in which comparison result is set to ON when power is turned ON
[ZCP (FNC 11) instruction]".
6. Priority order in operation among HSCS (FNC 53), HSCR (FNC 54), and HSZ (FNC 55)
instructions for the same high-speed counter
For details, refer to "6. Priority order in operations among HSCS (FNC 53), HSCR (FNC 54), and HSZ (FNC
55) instructions for the same high-speed counter" in Subsection 13.4.1.
2)
or S2
respectively.
D
(FX3G/FX3GC/FX3U/FX3UC)
When Y
6 or Y
7 is specified as an output (Y), the refresh timing of the three outputs (Y) occupied by the DHSZ
instruction is different for each output.
To make the refresh timing of three points simultaneous, specify Y
0 to Y
5.
Example: When Y006 is specified as an output (Y), the refresh timing is different between Y006, Y007 and Y010.
362
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Explanation of operation
The outputs Y010 to Y012 are as shown below:
Y010 = ON
1000
13
Y012 = ON
FNC50-FNC59
High-Speed
Processing
Y011 = ON
1200
Current value of C235
Program example
14
RST
C235
FNC 40
ZRST
Y010
M8000
C235
Y012
FMC60-FNC69
Handy
Instruction
X010
15
Start
FNC 11
DZCPP
K1200
C235
Y010
S1
S2
K1000
K1200
C235
Y010
16
FNC80-FNC89
External FX
Device
FNC 55
DHSZ
K1000
FNC70-FNC79
External FX I/O
Device
RUN monitor
X010
12
FNC40-FNC49
Data Operation
DHSZ instruction outputs the comparison result only when a counting pulse is input. Even if the current value of C235
is "0", Y010 remains OFF at the time of startup.
For initializing Y010, compare the current value of C235 with K1000 and K1200 and drive Y010 by DZCPP instruction
(for general zone comparison) as pulse operation only at the time of startup.
Refer to the program example shown below.
FNC30-FNC39
Rotation and
Shift
13.6.1
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
363
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Timing chart
In the part [1] in the timing chart, Y010 remains OFF if the current value of a high-speed counter (C235 in the example
below) is "0" when restoring the power.
1)
For initializing Y010, the current value of C235 is compared with K1000 and K1200, and Y010 is driven using the
DZCPP instruction (for general zone comparison) as pulse operation only upon startup.
2)
The comparison result in Y010 is latched until an input pulse is input and the comparison output is driven by the
DHSZ instruction.
3)
According to the current value of the counter, the DHSZ instruction drives the output (A), (B) or (C).
X000
(input pulse for
C235)
X010
(Start)
Y010
[1]
(smaller than
zone)
Y011
(inside zone)
Y012
(larger than zone)
1200
1000
0
364
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
13.6.2
1. Set data
Operand Type
Description
Data Type
32-bit binary
S2
32-bit binary
32-bit binary
M8130 (special auxiliary relay for declaring the table high-speed comparison mode)
13
FNC50-FNC59
High-Speed
Processing
S1
Head word device number storing the data table (only data register D)
Bit
14
When the special auxiliary relay M8130 for declaring the table high-speed comparison mode is specified as
the DHSZ instruction, the special function shown below is provided.
S
K2,147,483,647
FNC 55
DHSZ
15
Number Comparison
of lines
source
S1
S2
S
FNC70-FNC79
External FX I/O
Device
Head
device
M8130
Table high-speed comparison mode
16
Comparison table
Output (Y) number
+ 1, S1
S1
+2
S1
+3
+4
S1
+6
S1
+7
S1
+ 9, S1
+8
S1
+ 10
S1
+ 11
+ [ S2
4 - 4]
S1
4 - 2]
+ [ S2
S1
2)
S2
4 - 1]
S2
18
.
4 devices are occupied from S1
4)
5)
19
FNC140-FNC149
Data
Operation 2
Comparison data
Make sure that the comparison data is 32 bits.
3)
FNC110-FNC139
Floating Point
+[
S1
4 - 3],
17
20
K1/H1
Reset (OFF)
K0/H0
FNC150-FNC159
Positioning
Control
Contents of setting
Set (ON)
FNC100-FNC109
Data
Transfer 2
+ 5, S1
1)
+ [ S2
S1
S1
SET/RST
FNC80-FNC89
External FX
Device
S1
in
FMC60-FNC69
Handy
Instruction
Command
input
12
FNC40-FNC49
Data Operation
This section explains the table high-speed comparison mode (high-speed pattern output) of the DHSZ instruction.
When two or more outputs should be activated at one time, use the HSCT instruction which can change up to 16
outputs.
365
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. Operation
M8002
Command
input
C251
Reset
command
input
366
FNC 12
DMOV
K123
D200
Comparison data
FNC 12
MOV
H10
D202
FNC 12
MOV
K1
D203
FNC 12
DMOV
K234
D204
Comparison data
FNC 12
MOV
H10
D206
FNC 12
MOV
K0
D207
FNC 12
DMOV
K345
D208
Comparison data
FNC 12
MOV
H11
D210
FNC 12
MOV
K1
D211
FNC 12
DMOV
K456
D212
Comparison data
FNC 12
MOV
H11
D214
FNC 12
MOV
K0
D215
FNC 12
DMOV
K567
D216
Comparison data
FNC 12
MOV
H11
D218
FNC 12
MOV
K1
D219
K2,147,483,647
FNC 55
DHSZ
Head
device
D200
RST
C251
RST
Y011
Number Comparison
of lines
source
K5
C251
M8130
Table high-speed comparison mode
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Present value
of C251
SET/RST
D201,D200
K123
D 202
H10
D 203
K1
D205,D204
K234
D 206
H10
D 207
K0
567
D209,D208
K345
D 210
H11
D 211
K1
456
D213,D212
K456
D 214
H11
D 215
K0
D 219
K1
Repeated from
"0".
D217,D216
K567
1)
2)
D 218
H11
Table counter
A program to reset
the counter is
required.
345
234
13
123
12
Y010
4)
5)
The steps 2) and 3) are repeated until the current value of the table counter D8130 becomes "4".
When the current value becomes "4", the program execution returns to the step 1), and the table counter D8130 is
reset to "0".
At this time, the complete flag M8131 turns ON.
6)
When the command contact is set to OFF, execution of the instruction is stopped and the table counter D8130 is
reset to "0".
17
FNC100-FNC109
Data
Transfer 2
16
FNC80-FNC89
External FX
Device
Cautions
15
FNC70-FNC79
External FX I/O
Device
3)
14
FMC60-FNC69
Handy
Instruction
A program to reset
Y011
the output is
When the current value of the high-speed
required.
counter C251 is equivalent to the comparison
target data table, the output (Y) number
specified in the table is set or reset.
This output processing is directly executed regardless of completion of output refresh by END instruction.
FNC50-FNC59
High-Speed
Processing
Output (Y)
number
FNC40-FNC49
Data Operation
Comparison
data
FNC30-FNC39
Rotation and
Shift
Comparison table
Execution of the instruction is aborted, and the table counter D8130 is reset to K0.
However, outputs which have been set or reset remain in the current status.
18
FNC110-FNC139
Floating Point
After the DHSZ instruction is first executed, creation of the table is completed by END instruction. After that, the DHSZ
instruction becomes valid.
Accordingly, the output is activated from the second scan.
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
367
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
13.6.3
When the special auxiliary relay M8132 for declaring the frequency control mode is specified as
instruction, the special function shown below is provided if DPLSY instruction is combined.
At this time, only a data register D can be specified as S1
available range is limited to "1 K, H 128".
in the DHSZ
. The
1. Control example
Example of table configuration and data setting
368
Comparison data
Frequency
D 301,D 300
K 20
D 302, D 303
K300
D 305,D 304
K600
D 306, D 307
K500
D 309,D 308
K700
D 310, D 311
K200
D 313,D 312
K800
D 314, D 315
K100
D 317,D 316
K 0
D 318, D 319
K 0
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC 12
DMOVP
K300
D302
Frequency
FNC 12
DMOVP
K600
D304
Comparison data
FNC 12
DMOVP
K500
D306
Frequency
FNC 12
DMOVP
K700
D308
Comparison data
FNC 12
DMOVP
K200
D310
Frequency
FNC 12
DMOVP
K800
D312
Comparison data
FNC 12
DMOVP
K100
D314
Frequency
FNC 12
DMOVP
K0
D316
Comparison data
FNC 12
DMOVP
K0
D318
Frequency
Head
device
FNC 55
DHSZ
M10
S2
13
14
15
Frequency
control
mode
M8132
16
M10
FNC80-FNC89
External FX
Device
PLS
S1
Number Comparison
source
of lines
12
FNC70-FNC79
External FX I/O
Device
Comparison data
FMC60-FNC69
Handy
Instruction
D300
FNC50-FNC59
High-Speed
Processing
K20
FNC40-FNC49
Data Operation
FNC 12
DMOVP
FNC30-FNC39
Rotation and
Shift
Command
input
Pulse quantity
(K0 specifies
continuous Pulse
Frequency
output
output.)
D8132
K0
17
Y000
FNC100-FNC109
Data
Transfer 2
FNC 57
DPLSY
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
369
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
300
200
100
0
1)
2)
20
Write prescribed data in advance to data registers constructing the table as shown in this program example.
The output frequency of the PLSY instruction remains in the value (D303, D302) until the current value of a highspeed counter specified in S
becomes equivalent to (D301, D300). (D302 specifies low-order 16 bits. D303
specifies high-order 16 bits, but is always "0".)
3)
The operation in the 2nd line is started after that, and then the operation in each line is executed in turn.
4)
When the operation in the last line is completed, the complete flag M8133 turns ON. The program execution
returns to the 1st line, and the operation is repeated.
5)
For stopping the operation in the last line, set the frequency in the last table to K0.
6)
When the command input is set to OFF, the pulse output turns OFF and the table counter D8131 is reset.
7)
After the DHSZ instruction is first executed, creation of the table is completed at the END instruction. The DHSZ
instruction becomes valid after that.
8)
Accordingly, the contact of PLS M10 is used so that the PLSY instruction is executed from the second scan after
the command input has been set to ON.
Data can be written to the table in a program as shown in this example or directly using keys in peripheral equipment.
1)
M8132
This is the special auxiliary relay for declaring the frequency control mode
2)
D8132
In the frequency control mode, the frequency set in the table is received by D8132 sequentially according to the
table counter count D8131.
3)
Cautions
370
1)
2)
With regard to the DHSCS (FNC 53), DHSCR (FNC 54), DHSZ (FNC 55) and DHSCT (FNC280) instructions used
for other purposes, up to 32 instructions including the DHSZ instruction can be driven at one time.
3)
Because the table is created when the END instruction is executed, it is necessary to delay execution of the PLSY
(FNC 57) instruction until creation of the table is completed.
4)
Do not change the data table while the DHSZ instruction is driven.
5)
In the frequency control mode, simultaneous output to Y000 to Y001 is not permitted.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
13.7
Outline
This instruction counts the input pulse for a specified period of time as interrupt input.
The function of this instruction varies depending on the version.
12
FNC40-FNC49
Data Operation
1. Instruction format
FNC 56
SPD
16-bit Instruction
7 steps
Mnemonic
SPD
Operation Condition
Continuous
Operation
13 steps
Operation Condition
Continuous
Operation
DSPD
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand Type
Description
Data Type
S1
S2
14
FMC60-FNC69
Handy
Instruction
Bit
3. Applicable devices
Operand
Type
System User
X
Word Devices
Digit Specification
System User
Others
Special
Unit
U \G
Index
V Z Modify
Constant
K
Real
CharacPointer
Number ter String
E
" "
S1
S2
S2
S2
S3
15
FNC70-FNC79
External FX I/O
Device
S1
Bit Devices
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
371
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1)
FNC 56
SPD
S1
S2
+2 (ms).
will store the pulse density (which is proportional to the
Timing chart
Command
input
S1
D
+1
Current value
Measured
value
S2
.
D
is
started again.
S2 ms
Counting time
ms
D
D
+1 is reset, and
+2
2)
Input X000
N (rpm)
N=
Proximity switch
"n" pulses/rotation
372
60 D
nt
10 3(r/min)
t: Measurement time duration specified as S2
(ms)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
The input pulse
S1
+3,
+1,
S1
S2
+1,
+4]
13
Timing chart
Command
input
S1
14
[ D +3, D +2]
Current value
15
[ S2 +1, S2 ] ms
16
+1,
FNC80-FNC89
External FX
Device
[ D +5, D +4]
Remaining time (ms)
FNC70-FNC79
External FX I/O
Device
[ S2 +1, S2 ] ms [ S2 +1, S2 ] ms
Counting time
Counting time
FMC60-FNC69
Handy
Instruction
[ D +1, D ]
Measured value
2)
12
FNC50-FNC59
High-Speed
Processing
1)
FNC 56
DSPD
+1,
+5,
FNC40-FNC49
Data Operation
S2
FNC30-FNC39
Rotation and
Shift
17
FNC100-FNC109
Data
Transfer 2
Input X000
N (rpm)
Proximity switch
"n" pulses/rotation
+1,
nt
18
103
(r/min)
+1,
] (ms)
FNC110-FNC139
Floating Point
N=
60 [
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
373
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Cautions
1. Input specifications of the input S1
An input device X000 to X007 specified as S1
- High-speed counter
- Input interrupt
- Pulse catch
- Pulse width/Pulse period
- DSZR instruction
- DVIT instruction
- ZRN instruction
X000,X001
60 kHz
X002,X003,X004,X005
10 kHz
- FX3G/FX3GC PLCs
Used input number
X000,X001,X003,X004
60 kHz
X002,X005,X006,X007
10 kHz
- FX3U/FX3UC PLCs
Maximum input frequency
Used input number
X000 to X005
100
X006,X007
*1.
FX3U PLC
FX3UC PLC
Main unit
kHz*1
100
10 kHz
kHz*1
10 kHz
FX3U-4HSX-ADP
200 kHz
When receiving pulses within the response frequency range of 50 k to 100 kHz, perform the following actions:
- Make sure that the wiring length is 5 m or less.
- Connect a bleeder resistor of 1.5 k (1 W or more) to the input terminal, and make sure that the load
current in the open collector transistor output of the external equipment is 20 mA or more.
2. Occupied devices
1)
2)
*2.
*2.
*2
The value is updated by interrupt processing from the CPU, not every scan time (operation cycle) of the PLC.
S2
When the value of the word device is changed while the SPD instruction is being executed, the operation varies
depending on the PLC model.
- FX3U/FX3UC PLCs
The changed value of the word device is reflected on the operation at every scan time (operation cycle).
- FX3S/FX3G/FX3GC PLCs
The changed value of the word device is not reflected on the operation at every scan time (operation cycle), and
the PLC operates using the value specified when execution of the SPD instruction started.
The PLC operates using the changed value after the command input of the SPD instruction is turned OFF once
and turned ON again.
374
FX3S
FX3G
FX3GC
FX3U
FX3UC
Ver. 1.00
or later
Ver. 1.00
or later
Ver. 1.40
or later
Ver. 2.20
or later
Ver. 2.20
or later
Item
Outline of function
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
13.8
Outline
This instruction generates a pulse signal.
For the frequency control mode, refer to Subsection 13.6.3.
FNC40-FNC49
Data Operation
1. Instruction format
FNC 57
PLSY
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Continuous
Operation
PLSY
13 steps
Operation Condition
Continuous
Operation
DPLSY
13
Description
Data Type
S1
S2
14
Bit
FMC60-FNC69
Handy
Instruction
3. Applicable devices
Operand
Type
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand Type
12
Bit Devices
Word Devices
System User
Y
Special
Unit
System User
U \G
S1
S2
S3
S2
S2
S3
Index
Constant
V Z Modify
Real
CharacPointer
Number ter String
" "
S1
16
FNC80-FNC89
External FX
Device
S1: Specify a transistor output on the main unit or Y000 or Y001 on a special high-speed output adapter*1.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
*1. High-speed output special adapters can be connected only to FX3U PLC.
17
Command
input
FNC 57
PLSY
S1
S2
FNC100-FNC109
Data
Transfer 2
15
FNC70-FNC79
External FX I/O
Device
Digit Specification
Others
Pulse quantity
D
S1
18
Frequency
FNC110-FNC139
Floating Point
.
D
19
FNC140-FNC149
Data
Operation 2
Specify the output (Y) number from which pulses are to be output in
Allowable setting range: Y000, Y001
20
FNC150-FNC159
Positioning
Control
375
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
+1,
S1
+1,
S2
Command
input
[ S2
FNC 57
DPLSY
S1
S2
+ 1, S2
Pulse quantity ]
D
[ S1
+ 1, S1
Frequency ]
].
Specify the output (Y) number from which pulses are output in D .
Allowable setting range: Y000, Y001
For the method to output pulses without any limitation, refer to the program example later.
Related devices
1. Instruction execution complete flag
The instruction execution complete flag M8029 used for PLSY instruction can be used also for other instructions.
When using other instructions, setting the M8029 flag to ON or OFF, or using two or more PLSY instructions, make
sure to use each M8029 flag just after an instruction to be monitored.
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Device
Name
Description
M8029
Command
input 1
FNC 57
PLSY
Command
input 1
K1000
K0
Y000
Command
input 2
M8029
Command
input 2
K1000
K0
Y000
FNC 57
DPLSY
K1000
K0
Y001
Command
input 1 M8029
FNC 57
DPLSY
M8029
376
FNC 57
PLSY
K1000
K0
Y000
Command
input 2 M8029
Changes by DPSLY
instruction corresponding to
the command input 2.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Contents of data
High
order
Low
order
D8141
D8140
D8143
D8142
D8137
D8136
Total accumulated number of pulses output from Y000 and Y001 by PLSY and
PLSR instructions
12
FNC 12
DMOV
K0
FNC50-FNC59
High-Speed
Processing
Command
input
When the special auxiliary relays (M) shown below are set to ON, the pulse output is stopped.
Description
FX3U/FX3UC
M8145, M8349
M8349
M8146, M8359
M8359
15
To restart pulse output, set the device (FX3S/FX3G/FX3GC : M8145, M8146, M8349, M8359
FX3U/FX3UC : M8349, M8359) corresponding to the output signal to OFF, and then drive the pulse output instruction
again.
FNC70-FNC79
External FX I/O
Device
FX3S/FX3G/FX3GC
14
FMC60-FNC69
Handy
Instruction
When the command input is set to OFF, the pulse generation is immediately stopped. When the command input is
set to ON again, pulse generation operation restarts from the beginning.
Device
FNC40-FNC49
Data Operation
13
The contents of each data register can be cleared using the following program:
16
Cautions
FNC80-FNC89
External FX
Device
S1
or S2
When the value of the word device is changed while the instruction is executed, the following operation results:
is changed, the change (new value) becomes valid the next time the instruction is driven.
FNC100-FNC109
Data
Transfer 2
2. Frequency S1
When using transistor outputs in the main unit, set the output frequency S1 to "100,000 Hz" or less.
If the load is operated using pulses at a frequency higher than 100,000 Hz, the PLC may be damaged.
Do not set the output frequency to "0".
3. Pulse output
in D .
When using the PLSY (FNC 57) instruction with a relay output type or triac output type FX3U PLC, a special highspeed output adapter is required.
*1. High-speed output special adapters can be connected only to FX3U PLC.
The duty cycle of the pulse ON/OFF time is 50 % inside the PLC.
However, 50 % may not be output depending on the frequency due to the effect of the output circuit.
19
turns OFF.
FNC140-FNC149
Data
Operation 2
The pulse output is controlled by the dedicated hardware not affected by the sequence program (operation cycle).
D
18
FNC110-FNC139
Floating Point
Only a transistor output on the main unit or Y000 or Y001 on a special high-speed output adapter*1 can be specified
If the command input is set to OFF during continuous pulse output, the output from
17
20
FNC150-FNC159
Positioning
Control
377
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Item
External
power
supply
Description
5 to 24V DC
10 to 100 mA
Output frequency
Equipment
load
resistor
PLC
(transistor output)
[sink output]
Dummy
resistor
Y000
COM1
2)
Set the pulse output type setting switch in a special high-speed output adapter to the "pulse chain + direction"
(PLS DIR) side.
If the switch is set to the "forward rotation pulse chain reverse rotation pulse chain" (FP RP) side, normal
operations are disabled. The pulse output destination changes depending on the PLC output status as shown in
the table below.
Pulse output
destination
Output affecting
operation
Operation
= Y000
Y004
While Y004 is ON, pulses are output from Y000 in the high-speed output adapter.
While Y004 is OFF, pulses are output from Y004 in the high-speed output adapter.
= Y001
Y005
While Y005 is ON, pulses are output from Y001 in the high-speed output adapter.
While Y005 is OFF, pulses are output from Y005 in the high-speed output adapter.
3)
Set the pulse output type setting switch while the PLC is stopped or while the power is OFF.
Do not manipulate the pulse output form setting switch while pulses are being output.
4)
When special high-speed output adapters are connected, the same output numbers in the main unit are assigned
as shown in the table below.
Only wire the appropriate output terminals.
Outputs in special high-speed output adapters and the main unit operate as shown below.
Assignment of output numbers in special high-speed output adapters
Status of output form setting
switch
Signal name
Output number
1st unit
2nd unit
1st axis
2nd axis
3rd axis
4th axis
Y000
Y001
Y002
Y003
Y004
Y005
Y006
Y007
Pulse chain
Y000
Y001
Y002
Y003
Direction
Y004
Y005
Y006
Y007
Output operation
Output operation
Relay output type/triac output type main While instruction is activated, relevant output is ON. (LED is also ON.)
unit
Use a special high-speed adapter.
378
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
1)
Types of pulse output, positioning and other relevant instructions and their target output numbers
Classification
Pulse output
Acceleration/deceleration setup
Y000,Y001
DSZR (FNC150)
Y000,Y001,Y002*1,Y003*2
DVIT (FNC151)*3
Interrupt positioning
Y000,Y001,Y002,Y003*2
ZRN (FNC156)
Zero return
Y000,Y001,Y002*1,Y003*2
PLSV (FNC157)
Y000,Y001,Y002*1,Y003*2
DRVI (FNC158)
Drive to increment
Y000,Y001,Y002*1,Y003*2
DRVA (FNC159)
Drive to absolute
Y000,Y001,Y002*1,Y003*2
Y000,Y001,Y002*1,Y003*2
*1.
Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLCs.
*2.
Y003 is available only when two high-speed output special adapters are connected to the FX3U PLC.
*3.
14
When using the same output relay (Y000 or Y001) in several instructions.
While a pulse output monitor (BUSY/READY) flag is ON a pulse output instruction and positioning instruction for
the same output relay cannot be executed.
While a pulse output monitor flag is ON even after the instruction drive contact is set to OFF, a pulse output
instruction or positioning instruction for the same output relay cannot be executed.
Before executing such an instruction, wait until the pulse output monitor flag turns OFF and one or more operation
cycles pass.
Pulse output destination device
Y000
M8340
Y001
M8350
"Frequency control mode" in which DHSZ (FNC 55) and PLSY (FNC 57) instructions are combined can only be
used once in a program.
Command
input
K0
Y000
17
Y000
FNC100-FNC109
Data
Transfer 2
FNC 57
DPLSY
16
FNC80-FNC89
External FX
Device
15
FNC70-FNC79
External FX I/O
Device
3)
13
FMC60-FNC69
Handy
Instruction
2)
12
FNC50-FNC59
High-Speed
Processing
High-speed
processing
Instruction name
Pulse Y output
FNC40-FNC49
Data Operation
Positioning
Instruction
PLSY (FNC 57)
FNC30-FNC39
Rotation and
Shift
6. Others
1000Hz
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
379
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
13.9
Outline
This instruction outputs pulses with a specified period and ON duration.
1. Instruction format
FNC 58
PWM
Mnemonic
16-bit Instruction
7 steps
Operation Condition
Continuous
Operation
PWM
Operation Condition
2. Set data
Operand Type
Description
Data Type
S1
16-bit binary
S2
Period (ms)
16-bit binary
Bit
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
X
Digit Specification
System User
Others
Special
Unit
U \G
S1
S2
S3
S2
S2
S3
Index
V Z Modify
Real
CharacConstant
Pointer
Number ter String
K
" "
S1
S1: Specify transistor output Y000, Y001, or Y002*1 on the main unit or Y000, Y001, Y002, or Y003 on a special highspeed output adapter*2.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
*1. Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLCs.
*2. High-speed output special adapters can be connected only to FX3U PLC.
FNC 58
PWM
ms.
t
S1
S2
T0
380
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Cautions
1. Setting the pulse width and period
Make sure that the pulse width S1
and period S2
S2
".
2. Pulse output
D
12
FNC40-FNC49
Data Operation
- When using special high-speed output adapters*1: Y000, Y001, Y002*2, or Y003*2
- When transistor outputs in the main unit are used: Y000, Y001, or Y002*3
High-speed output special adapters can be connected only to FX3U PLC.
Use a transistor output type PLC.
*2.
When specifying Y002 or Y003 on a special high-speed output adapter, a second special high-speed output
adapter is required.
*3.
Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLCs.
The pulse output is controlled by interrupt processing not affected by the sequence program (operation cycle).
If the command input is set to OFF, the output from
turns OFF.
Y000
M8340
Y001
M8350
Y002
M8360
Y003
M8370
15
FNC70-FNC79
External FX I/O
Device
16
2)
Set the pulse output type setting switch of a special high-speed output adapter to the "pulse chain + direction"
(PLS DIR) side.
If the switch is set to the "forward rotation pulse chain reverse rotation pulse chain" (FP RP) side, normal
operations are not possible. The pulse output destination changes depending on the output status as shown in the
table below.
17
Operation
Y004
While Y004 is ON, pulses are output from Y000 on the high-speed output adapter.
While Y004 is OFF, pulses are output from Y004 on the high-speed output adapter.
= Y001
Y005
While Y005 is ON, pulses are output from Y001 on the high-speed output adapter.
While Y005 is OFF, pulses are output from Y005 on the high-speed output adapter.
= Y002
Y006
While Y006 is ON, pulses are output from Y002 on the high-speed output adapter.
While Y006 is OFF, pulses are output from Y006 on the high-speed output adapter.
Y007
While Y007 is ON, pulses are output from Y003 on the high-speed output adapter.
While Y007 is OFF, pulses are output from Y007 on the high-speed output adapter.
= Y003
Set the pulse output type setting switch while the PLC is stopped or while the power is OFF.
Do not adjust the pulse output type setting switch while pulses are being output.
18
FNC110-FNC139
Floating Point
= Y000
FNC100-FNC109
Data
Transfer 2
3)
Output affecting
operation
FNC80-FNC89
External FX
Device
1)
Pulse output
destination
14
FMC60-FNC69
Handy
Instruction
While a pulse output monitor (BUSY/READY) flag is ON, a pulse output or positioning instruction for the same
output relay cannot be executed.
While a pulse output monitor flag is ON even after the instruction drive contact is set to OFF, a pulse output or
positioning instruction for the same output relay cannot be executed.
Before executing a pulse output or positioning instruction, wait until the pulse output monitor flag turns OFF and
one or more operation cycles pass.
13
FNC50-FNC59
High-Speed
Processing
*1.
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
381
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
When special high-speed output adapters are connected, the same output numbers in the main unit are assigned
as shown in the table below.
Only wire the appropriate output terminals.
Outputs in special high-speed output adapters and the main unit operate as shown below.
Assignment of output numbers in special high-speed output adapters
Setting status of output form
setting switch
Signal name
Output number
1st unit
2nd unit
1st axis
2nd axis
3rd axis
4th axis
Y000
Y001
Y002
Y003
Y004
Y005
Y006
Y007
Pulse chain
Y000
Y001
Y002
Y003
Direction
Y004
Y005
Y006
Y007
Output operation
Output operation
Relay output type main unit
Do not use the PWM (FNC 58) instruction with relay-output type main units.
(Considerable output response delay may be generated, chattering may occur in
contacts, or the contact life may be shortened.)
Do not use the PWM (FNC 58) instruction with triac-output type main units.
(Considerable output response delay may be generated.)
Operated.
Program example
When the contents of D10 are changed ranging from "0" to "50" in the program example shown below, the average
output from Y000 will be ranging from 0 to 100%.
An error will occur if the contents of D10 exceed 50.
In this program example the FX3U series main unit (sink output) is used. For wiring details, refer to the Hardware
Edition of each PLC.
X0
FNC 58
PWM
D10
D10
K50
Y000
Y000
50ms
0V
24V
510
R
(1k)
1k
PLC
5V
1k
12V
P
22
1k
COM1 Y000 Y001 Y002 Y003
R >> P
= P(k) C(F) = 470ms >> T0
The time constant of the filter should be considerably larger than the pulse cycle T0.
The ripple value "e" in the mean output current "e" is approximately "e/e T0/"
10V
+
C
470F
1k
382
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
12
FNC 59
PLSR
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
PLSR
17 steps
FNC40-FNC49
Data Operation
1. Instruction format
Operation Condition
Continuous
Operation
DPLSR
13
2. Set data
Description
Data Type
16- or 32-bit binary
S2
S3
Bit
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
X
Digit Specification
System User
Others
Special
Unit
U \G
S2
S3
S2
S2
S3
S3
S2
S3
" "
S1
16
Specify a transistor output on the main unit or Y000 or Y001 on a special high-speed output adapter*1.
This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
This function is supported only in FX3U/FX3UC PLCs.
High-speed output special adapters can be connected only to FX3U PLC.
17
S2
(ms).
Pulse frequency
(Hz)
Maximum frequency
S1
Maximum
frequency
(HZ)
S2
S3
Total Acceleration/
number deceleration
of output
time
pulses
(ms)
(PLS)
S2
S3
Total number of
output pulses
S2 (PLS)
19
S3
Acceleration/
deceleration time
S3
Acceleration/
deceleration time
20
FNC150-FNC159
Positioning
Control
Output
number
(Y000,
Y001)
18
S1
FNC140-FNC149
Data
Operation 2
S1
D
FNC110-FNC139
Floating Point
FNC 59
PLSR
FNC100-FNC109
Data
Transfer 2
Command
input
15
FNC80-FNC89
External FX
Device
S1:
S2:
S3:
*1.
V Z Modify
FNC70-FNC79
External FX I/O
Device
S1
Index
Real
CharacConstant
Pointer
Number ter String
14
FMC60-FNC69
Handy
Instruction
S1
FNC50-FNC59
High-Speed
Processing
Operand Type
383
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 59
DPLSR
+1, S1
S1
S2
Maximum
frequency
(HZ)
+1, S2
](ms).
S3
+1, S3
] with acceleration/deceleration
Total Acceleration/
number deceleration
of output
time
pulses
(ms)
(PLS)
Output
number
(Y000,
Y001)
[ S1
+1, S1
[ S2
+1, S2
[ S3
+1, S3
S3
S3
Acceleration/
deceleration time
Acceleration/
deceleration time
50 to 5000 ms
50 to 5000 ms
Output processing
The pulse output is controlled by the dedicated hardware regardless of the operation cycle.
Data change while the instruction is executed
Even if operands are overwritten while the instruction is executed, such changes are not reflected immediately. The
changes become valid the next time the instruction is driven.
384
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Name
Description
M8029
13
Device
Description
Contents of data
Low
order
D8141
D8140
D8143
D8142
D8137
D8136
Total accumulated number of pulses output from Y000 and Y001 by PLSY and
PLSR instructions
FNC50-FNC59
High-Speed
Processing
High
order
15
When the command input is set to OFF, the pulse generation is immediately stopped. When the command input is
set to ON again, pulse generation operation restarts from the beginning.
When the special auxiliary relays (M) shown below are set to ON, the pulse output is stopped.
16
Description
M8145,M8349
M8349
M8146,M8359
M8359
To restart pulse output pulses again, set the device (FX3S/FX3G/FX3GC : M8145, M8146, M8349, M8359
FX3U/FX3UC : M8349, M8359) corresponding to the output signal to OFF, and then drive the pulse output instruction
again.
1. Frequency S1
When using transistor outputs on the main unit, set the output frequency S1 to "100,000 Hz" or less.
If the load is operated using pulses at a frequency higher than 100,000 Hz from transistor outputs in the main unit, the
PLC may be damaged.
The pulse output is controlled by the dedicated hardware not affected by the sequence program (operation cycle).
If the command input is set to OFF during continuous pulse output, the output from
turns OFF.
19
FNC140-FNC149
Data
Operation 2
Only a transistor output on the main unit or Y000 or Y001 on a special high-speed output adapter*1 can be specified
in D .
*1. High-speed output special adapters can be connected only to FX3U PLC.
When using the PLSR (FNC 59) instruction with a relay output type or triac output type FX3U PLC, a special
high-speed output adapter is required.
The duty cycle of the pulse ON/OFF time is 50 % inside the PLC.
However, 50 % may not be output depending on the frequency due to the effect of the output circuit.
18
FNC110-FNC139
Floating Point
2. Pulse output
17
FNC100-FNC109
Data
Transfer 2
Cautions
FNC80-FNC89
External FX
Device
FX3U/FX3UC
FNC70-FNC79
External FX I/O
Device
Device
14
FMC60-FNC69
Handy
Instruction
The contents of each data register can be cleared using the following program:
Command
input
Low-order device shown in
FNC 12
K0
above table
DMOV
FX3S/FX3G/FX3GC
12
FNC40-FNC49
Data Operation
OFF: The input command is OFF, or pulses are being output. (This flag does not turn ON if the
Instruction execution com- pulse output is interrupted in the middle of output.)
plete
ON: Output of the number of pulses set in S2 is completed.
FNC30-FNC39
Rotation and
Shift
Related devices
20
FNC150-FNC159
Positioning
Control
385
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Description
5 to 24V DC
10 to 100 mA
Output frequency
When the load is smaller, connect a dummy resistor in parallel to the outside of a used output terminal (Y000 or Y001)
as shown in the circuit diagram below so that the specified current shown above flows in the output transistor.
External
power
supply
Equipment
load
resistor
PLC
(transistor output)
[sink output]
Dummy
resistor
Y000
COM1
2)
Set the pulse output type setting switch in a special high-speed output adapter to the "pulse chain + direction"
(PLS DIR) side.
If the switch is set to the "forward rotation pulse chain reverse rotation pulse chain" (FP RP) side, normal
operations are disabled. The pulse output destination changes depending on the PLC output status as shown in
the table below.
Pulse output
destination
Output affecting
operation
Operation
= Y000
Y004
While Y004 is ON, pulses are output from Y000 in the high-speed output adapter.
While Y004 is OFF, pulses are output from Y004 in the high-speed output adapter.
= Y001
Y005
While Y005 is ON, pulses are output from Y001 in the high-speed output adapter.
While Y005 is OFF, pulses are output from Y005 in the high-speed output adapter.
3)
Set the pulse output type setting switch while the PLC is stopped or while the power is OFF.
Do not manipulate the pulse output type setting switch while pulses are being output.
4)
When special high-speed output adapters are connected, the same output numbers in the main unit are assigned
as shown in the table below.
Only wire the appropriate output terminals.
Outputs in special high-speed output adapters and the main unit operate as shown below.
Assignment of output numbers in special high-speed output adapter
Setting status of output form
setting switch
Signal name
Output number
1st unit
2nd unit
1st axis
2nd axis
3rd axis
4th axis
Y000
Y001
Y002
Y003
Y004
Y005
Y006
Y007
Pulse chain
Y000
Y001
Y002
Y003
Direction
Y004
Y005
Y006
Y007
Output operation
Output operation
Relay output type/triac output type main While instruction is active, associated output is ON. (LED is also ON.)
unit
Use a special high-speed adapter.
386
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
1)
Types of pulse output, positioning and other relevant instructions and their target output numbers
Classification
Pulse output
*1.
Acceleration/deceleration setup
Y000,Y001
DSZR (FNC150)
Y000,Y001,Y002*1,Y003*2
DVIT (FNC151)*3
Interrupt positioning
Y000,Y001,Y002,Y003*2
ZRN (FNC156)
Zero return
Y000,Y001,Y002*1,Y003*2
PLSV (FNC157)
Y000,Y001,Y002*1,Y003*2
DRVI (FNC158)
Drive to increment
Y000,Y001,Y002*1,Y003*2
DRVA (FNC159)
Drive to absolute
Y000,Y001,Y002*1,Y003*2
Y000,Y001,Y002*1,Y003*2
13
Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLCs.
*2.
Y003 can be used only when two special high-speed output adapters are connected to an FX3U PLC.
*3.
14
When using the same output relay (Y000 or Y001) in several instructions.
While a pulse output monitor (BUSY/READY) flag is ON, a pulse output or positioning instruction for the same
output relay cannot be executed.
While a pulse output monitor flag is ON, even after the instruction drive contact is set to OFF, a pulse output or
positioning instruction for the same output relay cannot be executed.
Before executing a pulse output or positioning instruction, wait until the pulse output monitor flag turns OFF and
one or more operation cycles pass.
Pulse output monitor flag
Y000
M8340
Y001
M8350
15
FNC70-FNC79
External FX I/O
Device
FMC60-FNC69
Handy
Instruction
2)
12
FNC50-FNC59
High-Speed
Processing
High-speed
processing
Instruction name
Pulse Y output
FNC40-FNC49
Data Operation
Positioning
Instruction
PLSY (FNC 57)
FNC30-FNC39
Rotation and
Shift
5. Others
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
387
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
388
FNC No.
Mnemonic
60
IST
61
SER
62
ABSD
63
Symbol
Function
Reference
Initial State
Section 14.1
Section 14.2
ABSD S1 S2 D n
Section 14.3
INCD
INCD S1 S2 D n
Section 14.4
64
TTMR
TTMR D n
Teaching Timer
Section 14.5
65
STMR
STMR S m D
Special Timer
Section 14.6
66
ALT
Alternate State
Section 14.7
67
RAMP
RAMP S1 S2 D n
Section 14.8
68
ROTC
ROTC S m1 m2 D
Section 14.9
69
SORT
SORT S m1 m2 D n
IST
SER
S D1 D2
S1 S2 D n
ALT
Section
14.10
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
14.1
Outline
1. Instruction format
FNC 60
IST
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Continuous
Operation
IST
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand type
Description
Data type
Head bit device number of the selector switch in the operation mode
SS1
Bit
Smallest state relay number of practical state relays in the automatic mode
(
D1
<
D2
Largest state relay number of practical state relays in the automatic mode
D2
D1
<
D2
14
Bit
FMC60-FNC69
Handy
Instruction
D1
Bit
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
15
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S1
SS1
S2
D2
S2
16
FNC80-FNC89
External FX
Device
D21
S
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: S20 to S899 and S1000 to S4095 in the FX3G, FX3GC, FX3U and FX3UC PLCs.
S20 to S255 in the FX3S PLC.
17
D1
FNC100-FNC109
Data
Transfer 2
Command
input
D2
Individual operation
Switch function
+1
X021
+2
X022
Stepping
+3
X023
Cycle operation
+4
X024
Continuous operation
+5
X025
+6
X026
Automatic start
+7
X027
Stop
20
FNC150-FNC159
Positioning
Control
19
FNC140-FNC149
Data
Operation 2
18
FNC110-FNC139
Floating Point
Selector switches in the operation mode occupy eight devices from the head device S , and the switch
functions shown in the table below are assigned to each of them.
When X020 is assigned as shown below, it is necessary to set X020 to X024 as rotary switches so that they do not
turn ON at the same time.
It is not necessary to wire unused switches, but they cannot be used for any other purpose because they are
occupied by IST instruction.
Source
FNC70-FNC79
External FX I/O
Device
Operand
Type
12
FNC40-FNC49
Data Operation
This instruction automatically controls the initial state and special auxiliary relays in a step ladder program.
For SFC programs and step ladder, refer to Chapter 35.
389
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Operation function
Device number
Operation function
S0
Transfer start
S1
Start pulse
S2
M8045
M8047*2
Operation function
Occupied for the initial state
S0 to S9
S10 to S19
S0 to S2 are used for individual operation, zero return and automatic operation as shown above.
S3 to S9 can be used arbitrarily.
If the devices are switched among individual operation (X020), zero return (X021) and automatic operation (X022,
X023 and X024) while the zero return complete device (M8043) is OFF, all outputs are set to OFF.
Automatic operation can be started again after zero return is completed.
For introducing IST instruction, refer to "14.1.2 Example of IST instruction introduction (example of
workpiece transfer mechanism)".
Cautions
1. Device specified as DS1
390
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
12
1. Equivalent circuit
M8041
X027
Stepping
X022 operation
Stop
Cycle
X023 operation
Continuous
X024 operation
Transfer
start
*1
X020
PLS M8042
Individual
operation
Start pulse
X022Stepping operation
Start pulse
STL transfer
disable
X023Cycle X027Stop
operation
15
FNC70-FNC79
External FX I/O
Device
M8040 Self-holding
M8000 RUN monitor
M8047
*1
M8044
S 0
S 1
*1
M8043
Zero return
complete
Zero point
condition
X025
RST M8043
Zero return
start
Zero return
complete signal is
reset
M8041
17
FNC100-FNC109
Data
Transfer 2
*1
16
S 2
Automatic Zero return
Transfer start
operation complete
*1. Because the above equivalent circuit is provided only for explanation, it cannot be actually programmed.
Automatic
X022 to X024
S2
M8045
Switched
to X021
(zero
return
operation)
in OUT
391
20
FNC150-FNC159
Positioning
Control
Even if the mode is switched from automatic operation to zero return operation while S2 is ON, state relays
(except initial state relays) and outputs are not reset.
*2.
19
FNC140-FNC149
Data
Operation 2
Individual
operation
X020
18
FNC110-FNC139
Floating Point
When the operation mode is switched among the individual operation, zero return operation and automatic operation,
all outputs and conventional states are reset at one time unless the machine is located in the zero point. (Reset of all
outputs*2 is not executed when M8045 is driven.)
S1 M8043
Zero return
Switched
Conventional states and
X021
Zero return
to X020
corresponding outputs are
S2 complete
(individual
Automatic
reset at one time.
operation)
X022 to X024
FNC80-FNC89
External FX
Device
Individual
X020 operation
14
FMC60-FNC69
Handy
Instruction
Zero
X021 return X027Stop
13
FNC50-FNC59
High-Speed
Processing
M8041
FNC40-FNC49
Data Operation
Continuous
operation
X024
FNC30-FNC39
Rotation and
Shift
14.1.1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
14.1.2
1. Operation mode
Stepping
operation
Zero return
Zero return
operation mode
X021
PB
X025
Cycle
operation mode
X023
Individual
operation mode
X020
Leftward
Moving up
Unclamping
travel
PB
X006
Rightward
Moving down travel
Continuous
Power supply
operation mode
X024
PB
PB
PB
X007
Start X026
PB
X005
X022
Moving Lower
up
limit X001
PB
PB
PB
PB
PB
X010
X011
X012
Stop X027
Clamping Y001
Unclamping Y001
Workpiece
Automatic
mode
Y000
Emergency stop
Clamping
Point A
Point B
Contents of operation
Individual
operation mode
Zero return
operation mode
When the pushbutton switch for zero return is pressed, the machine automatically returns to the zero point.
Stepping
operation mode
Every time the start button is pressed, the machine performs one process.
When the start button is pressed while the machine is located at the zero point, the machine performs one
cycle of automatic operation and stops at the zero point.
Cycle operation
If the stop button is pressed in the middle of one cycle, the machine stops immediately. When the start
mode
button is pressed after that, the machine performs the continuous operation from the last position, and
automatically stops at the zero point.
Continuous
operation mode
When the start button is pressed while the machine is located at the zero point, the machine starts
continuous operation.
When the stop button is pressed, the machine finishes the current cycle until the zero point, and then stops
at the zero point.
2. Transfer mechanism
Start
X026
(4) Rightward Y003
Zero point
(8) Leftward Y004
(1) Moving
down
Y000
Lower
limit
X001
Upper
limit
X002
Right limit
X003
(1) Moving down
Y000
Lower
limit
What is the zero point condition? X001
Upper limit X002 is ON, left limit
Clamping
X004 is ON and unclamping Y001
(2) Clamping is OFF.
Y001 ON
(7) Moving up
Y002
Unclamping
(6) Unclamping
Y001 OFF
The upper left position is regarded as the zero point. The machine transfers a workpiece from the left to the right in the
order "moving down clamping moving up rightward travel moving down unclamping moving up
leftward travel".
Double-solenoid type solenoid valves (with two inputs for driving and non-driving) are adopted for moving down,
moving up, leftward travel and rightward travel. Single type solenoid valves (which operate only while the power is ON)
are adopted for clamping.
392
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Example:
X030:Zero return operation mode
X031:Continuous operation mode
X032:Automatic mode start zero
return start
X033:Stop
14
FMC60-FNC69
Handy
Instruction
Example:
X030:Individual operation mode
X035:Zero return operation mode
X033:Stepping operation mode
X040:Cycle operation mode
X032:Continuous operation mode
X034:Zero return start
X026:Automatic mode start
X041:Stop
13
FNC50-FNC59
High-Speed
Processing
12
FNC40-FNC49
Data Operation
For using IST instruction, it is necessary to assign inputs having consecutive device numbers as shown below for
mode inputs.
When using non-consecutive inputs or omitting some modes, change the layout by using an auxiliary relay as the
head input for mode specification as shown in the figure below.
- X020: Individual operation mode
- X021: Zero return operation mode
- X022: Stepping operation mode
- X023: Cycle operation mode
- X024: Continuous operation
- X025: Zero return start
- X026: Automatic mode start
- X027: Stop
FNC30-FNC39
Rotation and
Shift
15
Individual
operation mode
M 1
Zero return
operation mode
M 2
Stepping
operation mode
M 3
Cycle operation
mode
X035
X033
X040
Continuous
operation
M 5
Zero return
start
M 6
Automatic
mode start
M 7
Stop
X034
X026
X041
M8000
Does not
operate
Zero return
operation mode
X030
M 0
M 1
Does not
operate
M 2
M 3
Does not
operate
M 3
M 4
Continuous
operation
M 5
Zero return
start
M 6
Automatic
mode start
M 7
Stop
X032
X033
16
M8000
M 2
X031
Individual
operation mode
X031
M 4
17
Continuous
operation
M8000
M 5
X032
M 6
Automatic
mode start
M 7
Stop
18
FNC110-FNC139
Floating Point
M 4
M 0
RUN monitor
X030
M 1
FNC100-FNC109
Data
Transfer 2
X032
M8000
FNC80-FNC89
External FX
Device
M 0
FNC70-FNC79
External FX I/O
Device
X030
X033
M8000
M 0
S 20
19
S 29
FNC140-FNC149
Data
Operation 2
RUN
monitor
FNC 60
IST
20
FNC150-FNC159
Positioning
Control
393
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
2)
394
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
1)
13
Ladder block
X002
Left limit
M8000
Y001
Upper
limit Unclamping
FNC 60
IST
X020
M8044
S 20
S 27
14
Initial state
FMC60-FNC69
Handy
Instruction
RUN
monitor
FNC50-FNC59
High-Speed
Processing
X004
15
State number
Initial state
for individual
operation
SET
Y001
RST
Y001
Moving-up
X005 command Y000
Leftward travel
X006 command X002 Y003
Upper limit
Y000 Moving
down
Y004 Leftward
travel
17
FNC100-FNC109
Data
Transfer 2
Rightward travel
X011 command X002 Y004
16
Moving
Y002 up
FNC80-FNC89
External FX
Device
Moving-down
X010 command Y002
FNC70-FNC79
External FX I/O
Device
Clamping
0
12
FNC40-FNC49
Data Operation
Circuit diagram
In the sequence circuit shown below, all areas except shaded areas are standard.
Program the shaded areas according to the contents of control.
a) Initial circuit
While the machine is operating, the operation mode can be switched arbitrarily (among stepping operation,
cycle operation and continuous operation) in the automatic mode.
When the operation mode is switched between the individual operation mode, zero return operation mode and
automatic mode while the machine is operating, all outputs are reset once to assure safety, after which the
following mode becomes valid.
(While M8045 (All output reset disable) is ON, outputs are not reset at all.)
FNC30-FNC39
Rotation and
Shift
5. Program example
Y003 Rightward
travel
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
395
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
State number
1 Initial state for zero return
X025
Zero return start
10
RST
Y001 Unclamping
RST
Y002
Moving up
X002
Upper limit
11
TRAN
RST
Y004
X004
TRAN
Y003
Rightward
travel reset
Leftward travel
TRAN
Left limit
12
SET
M8043
S 12 Reset
396
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
d) Automatic mode (stepping operation mode, cycle operation mode or continuous operation mode)
SFC block
State number
2 Initial state for
automatic mode
12
M8044
FNC40-FNC49
Data Operation
M8041
TRAN
Moving down
Y000
X001
13
TRAN
21
SET
Y001 Clamping
T 0
K 10
T0
Y002
Upper limit
23
TRAN
Rightward
travel
15
Moving up
X002
Y003
FNC70-FNC79
External FX I/O
Device
X003
TRAN
Right limit
24
14
TRAN
FMC60-FNC69
Handy
Instruction
22
FNC50-FNC59
High-Speed
Processing
Down limit
Y000
Moving down
X001
16
TRAN
25
RST
Y001
T 1
K 10
26
Y002
X002
TRAN
17
Moving up
TRAN
Upper limit
27
Unclamping
FNC100-FNC109
Data
Transfer 2
T1
FNC80-FNC89
External FX
Device
Down limit
Y004
Leftward travel
X004
18
FNC110-FNC139
Floating Point
TRAN
Left limit
S2
RET
END
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
397
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
6. List program
Individual
operation
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
LD X 004
AND X 002
ANI Y 001
OUT M8044
LD M8000
IST
60
(SP) X 020
(SP) S 20
(SP) S 27
STL S
0
LD X 012
SET Y 001
LD X 007
RST Y 001
LD X 005
ANI Y 000
OUT Y 002
LD X 010
ANI Y 002
OUT Y 000
LD X 006
AND X 002
ANI Y 003
OUT Y 004
LD X 011
AND X 002
ANI Y 004
OUT Y 003
(RET)
398
32
33
34
36
37
38
39
40
41
43
44
45
46
47
49
50
52
53
55
56
57
58
60
61
62
63
65
66
67
STL S
1
LD X 025
SET S 10
STL S 10
RST Y 001
RST Y 000
OUT Y 002
LD X 002
SET S 11
STL S 11
RST Y 003
OUT Y 004
LD X 004
SET S 12
STL S 12
SET M8043
LD M8043
RST S 12
(RET)
STL S
2
LD M8041
AND M8044
SET S 20
STL S 20
OUT Y 000
LD X001
SET S 21
STL S 21
SET Y 001
OUT T
0
(SP) K 10
Automatic mode
0
1
2
3
5
6
Initial circuit
The list program for the circuit diagram shown on the previous page is as shown below:
70
71
73
74
75
76
78
79
80
81
83
84
85
86
88
89
90
LD
SET
STL
OUT
LD
SET
STL
OUT
LD
SET
STL
OUT
LD
SET
STL
RST
OUT
(SP)
93 LD
94 SET
96 STL
97 OUT
98 LD
99 SET
101 STL
102 OUT
103 LD
104 OUT
106 RET
107 END
T
S
S
Y
X
S
S
Y
X
S
S
Y
X
S
S
Y
T
K
T
S
S
Y
X
S
S
Y
X
S
0
22
22
002
002
23
23
003
003
24
24
000
001
25
25
001
1
10
1
26
26
002
002
27
27
004
004
2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC30-FNC39
Rotation and
Shift
14.2
11
Outline
12
This instruction searches for the same data, maximum value and minimum value in a data table.
FNC40-FNC49
Data Operation
1. Instruction format
FNC 61
SER
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
SER
SERP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
17 steps DSER
DSERP
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Description
Data type
S1
S
Head device number in which same data, maximum value and minimum value are
searched
S2
Head device number storing number of same data, maximum value and minimum value
detected by search
Number of data in which same data, maximum value and minimum value are searched
[16-bit instruction: 1 to 256, 32-bit instruction: 1 to 128]
14
FMC60-FNC69
Handy
Instruction
Operand type
15
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
S1
S2
S2
S1
S2
SD2
S1
S2
S1
Modify
Real
CharacPointer
Number ter String
E
" "
16
FNC80-FNC89
External FX
Device
S1
S
Index
Constant
17
, same data as
S2
to
18
FNC 61
SER
S1
S2
FNC110-FNC139
Floating Point
Command
input
1)
S1
+4.
FNC100-FNC109
Data
Transfer 2
FNC70-FNC79
External FX I/O
Device
Operand
Type
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
399
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2)
Operation example
a) Example of search result table configuration and data
Searched device
Searched data
Comparison data
S1 value
(example)
S2 value
(example)
S1
S1
Search result
Data
position
K100
S1
+1
K111
S1
+2
K100
S1
+3
K 98
S1
+4
K123
S1
+5
K 66
S1
+6
K100
S1
+7
K 95
S1
+8
K210
S1
+9
K 88
Maximum value
Same
D
+4
Minimum value
D
+3
(first
position)
K100
5
(last
position)
Contents
+1
+2
+3
+4
+1,
Command
input
FNC 61
S1
DSER
S1
+1,
] to [ D
S1
], same data as [ S2
+9,
S2
S2
1)
S2
n
D
+1, S1
+1,
+8].
+1, D
+1, S2
400
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Operation example
a) Example of search result table configuration and data
Searched data
Searched device
S1
S1 value
(example)
Comparison
data
S2
Search result
Maximum
value
Data
position
K100000
[ S1
+ 3, S1
+ 2]
K110100
[ S1
+ 5, S1
+ 4]
K100000
[ S1
+ 7, S1
+ 6]
K 98000
[ S1
+ 9, S1
+ 8]
K123000
[ S1
+ 11, S1
+ 10]
K 66000
[ S1
+ 13, S1
+ 12]
K100000
[ S1
+ 15, S1
+ 14]
K 95000
[ S1
+ 17, S1
+ 16]
K910000
[ S1
+ 19, S1
+ 18]
K910000
K100000
+7, +6
(first
position)
13
5
(last
position)
14
FMC60-FNC69
Handy
Instruction
+ 1,
Contents
15
[ D
+ 3,
+ 2]
[ D
+ 5,
+ 4]
[ D
+ 7,
+ 6]
[ D
+ 9,
+ 8]
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
Cautions
Comparison of values
It is executed algebraically.
(example: 10 < 2)
+1, DD1
18
DD1
+5, DD1
+4], [ DD1
+7, DD1
+9,
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DSER D0 D100 D200 R0", "n" is [R1, R0].
FNC110-FNC139
Floating Point
17
FNC100-FNC109
Data
Transfer 2
12
FNC50-FNC59
High-Speed
Processing
+ 1, S1
Minimum
value
FNC40-FNC49
Data Operation
[ S1
+9, +8
Same
FNC30-FNC39
Rotation and
Shift
2)
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
401
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
14.3
Outline
This instruction creates many output patterns corresponding to the current value of a counter.
1. Instruction format
FNC 62
ABSD
Mnemonic
16-bit Instruction
9 steps
Operation Condition
Continuous
Operation
ABSD
17 steps
Operation Condition
Continuous
Operation
DABSD
2. Set data
Operand type
Description
Data type
S1
S
Head device number storing the data table (with rising and falling point data)
S2
Counter number for monitoring the current value compared with the data table
Bit
Number of lines in the table and the number of output bit devices
[1 n 64]
16-bit binary
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
R
S2
S1
S
Others
Special
Unit
U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S3
S2
S1
SD2
n
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
D21
S
of the counter is compared with the data table with "n" lines starting from
occupies "n" lines 2 devices), and consecutive "n" outputs starting from DD1
one rotation.
Command
input
S2
FNC 62
ABSD
S1
S2
X001
RST
X001
S2
S2
K360
402
D1
S
(which
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
D1
Write the following data to S
Rising point
Falling point
S1
Target output
40
S1
+1
140
12
+3
200
+1
S1
+4
160
S1
+5
60
+2
S1
+6
240
S1
+7
280
+3
S1
+ 2n-2
S1
+ 2n - 1
+n1
S1
100
+2
FNC40-FNC49
Data Operation
S1
FNC30-FNC39
Rotation and
Shift
1)
13
2)
Output pattern
When the command input is set to ON, "n" points starting from DD1
D1
Each rising point/falling point can be changed respectively by overwriting the data in S
40
D1 +2n 1.
to S
14
140
100
+1
+2
FMC60-FNC69
Handy
Instruction
200
60
160
240
15
280
FNC70-FNC79
External FX I/O
Device
+3
z
0
360
180
16
In this example, outputs are controlled to ON or OFF by one rotation (0 to 360 using the rotation angle signal of
1/pulse).
D21
S
D1 +1,
of the counter is compared with the data table having "n" lines starting from [ S
S1 ] (which occupies "n" lines 4 devices), and consecutive "n" outputs starting from DD1
D
OFF during one rotation.
S2
FNC 62
DABSD
S1
S2
X001
RST
X001
S2
18
K360
FNC110-FNC139
Floating Point
S2
17
FNC100-FNC109
Data
Transfer 2
Command
input
are controlled to ON or
FNC80-FNC89
External FX
Device
FNC50-FNC59
High-Speed
Processing
For example, store rising point data and falling point data alternately.
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
403
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
D1 , S
D1 +1] to [ S
D1 +4n-2, S
D1
Write the following data to [ S
Rising point
Data value
(example)
Data value
(example)
Target output
+ 1, S1
40
[ S1
+ 3, S1
+ 2]
140
[ S1
+ 5, S1
+ 4]
100
[ S1
+ 7, S1
+ 6]
200
+1
[ S1
+ 9, S1
+ 8]
160
[ S1
+ 11, S1
+ 10]
60
+2
[ S1
+ 13, S1
240
[ S1
+ 15, S1
+ 14]
280
+3
[ S1
+ 4n - 3, S1
[ S1
+ 4n - 1, S1
+n1
+ 12]
+ 4n - 4]
[ S1
+ 4n - 2]
1)
For example, store rising point data and falling point data alternately.
2)
Output pattern
When the command input is set to ON, "n" points starting from DD1
D1 +1, S
D1 ] to
Each rising point/falling point can be changed respectively by overwriting the data in [ S
D1
[ S
D1
+4n-1, S
+4n-2].
40
140
D
100
D
+1
+2
60
200
160
240
280
+3
z
0
180
360
Cautions
1. Specifying a high-speed counter (C235 to C255)
D21 .
In DABSD instruction, a high-speed counter can be specified as S
When the high-speed counter is specified, the output pattern contains response delay caused by the scan cycle with
regard to the current value of a counter.
When high responsivity is required in FX3U/FX3UC PLCs, use the table high-speed comparison function offered by the
HSZ instruction, or use the HSCT instruction.
D1
2. When specifying digits of a bit device as S
1)
2)
Device number
Specify a multiple of 16 (0, 16, 32, 64 ...).
Number of digits
- In ABSD instruction (16-bit operation): Only K4 is available.
- In DABSD instruction (32-bit operation): Only K8 is available.
3. Other cautions
The value "n" determines the number of target outputs (1 n 64).
Even if the command input is set to OFF, the ON/OFF status of outputs does not change.
404
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
14.4
Outline
12
FNC 63
INCD
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
INCD
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand type
Description
Data type
16-bit binary
S2
16-bit binary
14
FMC60-FNC69
Handy
Instruction
S1
S
Bit
16-bit binary
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
R
S2
S1
S
Others
Special
Unit
U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S3
S2
16
S1
SD2
FNC80-FNC89
External FX
Device
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
17
of a counter is compared with the data table having "n" lines starting from
D1
S
(which
D21 is equivalent to the table data, the current output is reset, and the next
occupies "n" lines x 1 device). When S
output is set to ON. In this way, the ON/OFF status of specified outputs is controlled in turn.
FNC 63
INCD
Count signal
S2
S1
S2
18
FNC110-FNC139
Floating Point
Command
input
FNC100-FNC109
Data
Transfer 2
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
FNC40-FNC49
Data Operation
1. Instruction format
K9999
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
405
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Operation
X000
FNC 63
INCD
M8013
S1
S2
D300
C0
M0
K4
K9999
C0
1 sec clock
1)
Timing chart
Suppose that the following data is written in advance by a transfer instruction:
Device storing data
Output
S1
D300 = 20
M0
S1
+1
D301 = 30
+1
M1
S1
+2
D302 = 10
+2
M2
S1
+3
D303 = 40
+3
M3
Example
S1
+n1
+n1
X000
40
30
Current
value of
C0
Current
value of
C1
20
20
20
10
3
0
M0
M1
M2
M3
M8029 Complete flag
2)
When the command contact turns ON, the output M0 turns ON.
3)
When the current value of C0 reaches the comparison value D300, the output M0 is reset. "1" is added to the
count value of the process counter C1, and the current value of the counter C0 is reset.
4)
5)
When the current value of C0 reaches the comparison value D301, the output M1 is reset. "1" is added to the
count value of the process counter C1, and the current value of the counter C0 is reset.
6)
The current value is compared for up to "n (K4)" outputs in the same way (1 n 64).
7)
When the final process specified by "n" is finished, the execution complete flag M8029 turns ON and remains ON
for one operation cycle.
M8029 is used for many instructions as the instruction execution complete flag. Use M8029 as a contact just after
a corresponding instruction.
8)
The program execution returns to the beginning, and outputs are repeated.
Caution
D11
1. When specifying digits of a bit device as S
406
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
14.5
Outline
12
1. Instruction format
FNC 64
TTMR
Mnemonic
16-bit Instruction
5 steps
Operation Condition
Continuous
Operation
TTMR
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand type
Description
Data type
16-bit binary
16-bit binary
14
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
SD2
n
16
The period of time to press and hold the command input (pushbutton switch) is measured in 1-second units, multiplied
by the magnification (10n), and then transferred to DD1
FNC 64
TTMR
Command
contact
D
17
+1
+1
FNC100-FNC109
Data
Transfer 2
D
D
Magnification
K0
K1
100
10
K2
1000
100
18
FNC110-FNC139
Floating Point
FNC80-FNC89
External FX
Device
Command
input
15
FNC70-FNC79
External FX I/O
Device
Others
Special
Unit
FMC60-FNC69
Handy
Instruction
FNC40-FNC49
Data Operation
This instruction measures the period of time in which TTMR instruction is ON.
Use this instruction to adjust the set value of a timer by a pushbutton switch.
19
FNC140-FNC149
Data
Operation 2
Related instruction
There is a handy instruction as follows:
20
Description
HOUR (FNC169)
Measures the input contact ON time in 1-hour units, and outputs alarm when the measurement
result reaches a specified value.
407
FNC150-FNC159
Positioning
Control
Instruction
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Cautions
1. When the command contact turns OFF
The current value [ DD1 +1] of the pressing and holding time is reset, and the teaching time DD1
more.
DD1
: Teaching time
DD1
Program example
1. Writing the teaching time to 10 types of data registers
Suppose that the set value is written to D400 to D409 in advance.
D 400
T 1
D 401
T 0
T 9
M8000
RUN
monitor
X010
Teaching
button
D 409
FNC 19
BIN
K1X000
FNC 64
TTMR
D300
K 0
PLF
10 timers to be set
Because the timers T0 to T9 are the 100 ms type, the actual
operating time (sec) is 1/10 of the teaching data.
M 0
X010
M 0
408
FNC 12
MOV
D300
D400Z
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
14.6
Outline
12
This instruction can easily make off-delay timers, one-shot timers and flicker timers.
FNC 65
STMR
Mnemonic
16-bit Instruction
7 steps
Operation Condition
Continuous
Operation
STMR
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand type
Description
Data type
16-bit binary
16-bit binary
Head bit number to which the set value is output (Four devices are occupied.)
SS1
14
FMC60-FNC69
Handy
Instruction
Bit
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
SS1
m
S
SD2
16
FNC 65
STMR
18
FNC 65
STMR
K100
FNC110-FNC139
Floating Point
17
FNC100-FNC109
Data
Transfer 2
from DD1 .
Create a proper program according to the purpose while referring to the example shown below.
FNC80-FNC89
External FX
Device
Command
input
15
FNC70-FNC79
External FX I/O
Device
System User
Others
Special
Unit
FNC40-FNC49
Data Operation
1. Instruction format
M0
: Off-delay timer which turns OFF with delay of the timer set value after the command contact
turned OFF
M1 [ DD1
+1]
: One-shot timer which turns ON after the command contact turned OFF from ON, and turns OFF
after the timer set value
M2 [ DD1
+2]
M3 [ DD1
+3]
: Occupied.
19
FNC140-FNC149
Data
Operation 2
M0 [ DD1
20
FNC150-FNC159
Positioning
Control
409
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Command
input
M0
M1
+1
M2
+2
M3
+3
10s
10s
10s
10s
10s
Flicker
In the program shown below which turns OFF STMR instruction at the NC contact of
DD1
+1 and DD1
DD1
and DD1
DD1
+2.
+3 are occupied.
S
Command
M3
input
FNC 65
STMR
T10
m
K100
M0
M0 [ DD1
: Occupied (, and can be used for off-delay timer). (Refer to the previous page.)
M1 [ DD1
+1]
: Flicker (NO contact) which turns ON and OFF repeatedly at the interval of timer set value
M2 [ DD1
+2]
: Flicker (NC contact) which turns ON and OFF repeatedly at the interval of timer set value
M3 [ DD1
+3]
: Occupied.
Command
input
M2
+2
M1
+1
10s
10s
10s
10s
10s
Cautions
1. Handling of a specified timer
The timer number specified in this instruction cannot be used in other general circuits (such as OUT instruction).
If the timer number is used in other general circuits, the timer malfunctions.
Off-delay timer
One-shot timer
Flicker
Off-delay timer
Occupied
+1
One-shot timer
+2
Occupied
+3
Occupied
410
, DD1
+1 and DD1
DD1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
14.7
Outline
12
This instruction alternates a bit device (from ON to OFF or from OFF to ON) when the input turns ON.
FNC 66
ALT
16-bit Instruction
3 steps
Mnemonic
Operation Condition
ALT
13
FNC50-FNC59
High-Speed
Processing
ALTP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
14
Bit
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
15
FNC70-FNC79
External FX I/O
Device
SD2
FMC60-FNC69
Handy
Instruction
3. Applicable devices
Operand
Type
FNC40-FNC49
Data Operation
1. Instruction format
16
S: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
Every time the command input turns from OFF to ON, a bit device specified in DD1
from OFF to ON).
Command
input
FNC 66
ALTP
ON
Command input
ON
ON
17
FNC100-FNC109
Data
Transfer 2
ON
ON
18
1st step
FNC 66
ALTP
M0
M0
D
ON
ON
ON
ON
ON
ON
19
2nd step
M1
D
FNC140-FNC149
Data
Operation 2
Command
input
FNC110-FNC139
Floating Point
Command
input
D
FNC80-FNC89
External FX
Device
ON
20
FNC150-FNC159
Positioning
Control
411
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Caution
1. When using (continuous operation type) ALT instruction
When ALT instruction is used, a specified bit device is alternated in every operation cycle.
To alternate a specified device by turning the command ON or OFF, use the (pulse operation type) ALTP
instruction, or use a pulse operation type command contact such as LDP.
Program examples
1. Start and stop by one input
1)
When the pushbutton switch X000 is pressed, the start output Y001 is set to ON.
2)
When the pushbutton switch X000 is pressed again, the stop output Y000 is set to ON.
X000
FNC 66
ALTP
M0
Y000
Stop
Y001
Start
M0
M0
2. Flicker operation
1)
When the input X006 is set to ON, the contact of the timer T2 turns ON instantaneously every 5 seconds.
2)
Every time the contact of T2 turns ON, the output Y007 is set to ON or OFF alternately.
X006
T2
T2
X006
T2
FNC 66
ALT
ON
X006
K50
T2
Y007
ON
ON
ON
3. Alternating output operation using auxiliary relays (M) (operation equivalent to ALT instruction)
The circuit below is provided as an example of alternating operation using basic instructions and auxiliary relays (M)
which is equivalent to ALT instruction.
1)
When X000 is set to ON, M0 turns ON and remains ON for only one operation cycle.
2)
When M0 turns ON for the first time, Y000 is latched. When M0 turns ON the second time, Y000 becomes
unlatched.
X000
M1
M0
X000
M1
M0
Y000
Y000
M0
412
Y000
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
14.8
Outline
1. Instruction format
FNC 67
RAMP
Mnemonic
16-bit Instruction
9 steps
Operation Condition
Continuous
Operation
RAMP
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand type
Description
Data type
16-bit binary
S2
16-bit binary
16-bit binary
16-bit binary
14
FMC60-FNC69
Handy
Instruction
S1
S
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Special
Unit
R U \G
S1
S
S2
SD2
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
16
D21
and the end value S
have been specified and the command input is set to ON, the
FNC 67
RAMP
< S2
S2
"
S1
S2
> S2
18
"
FNC110-FNC139
Floating Point
S1
D
S2
S1
19
+1
"n" scans
Number of scans D
+1
in DD1
again, DD1
D1 .
is cleared, and the operation is started from S
413
20
FNC150-FNC159
Positioning
Control
FNC140-FNC149
Data
Operation 2
"n" scans
Number of scans D
17
FNC100-FNC109
Data
Transfer 2
15
FNC80-FNC89
External FX
Device
S:
Others
FNC70-FNC79
External FX I/O
Device
Operand
Type
12
FNC40-FNC49
Data Operation
This instruction obtains the data which changes between the start value (initial value) and the end value (target value)
over the specified "n" times.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
After transfer is completed, the instruction execution complete flag M8029 turns ON, and the DD1
D1
returned to the S
value is
value.
Command
S2
S1
(M8029)
When acquiring the operation result at a constant time interval (constant scan mode)
Write a prescribed scan time (which is longer than the actual scan time) to D8039 and set M8039 to ON to select
the constant scan mode in the PLC.
For example, when "20 ms" is written to D8039 and "n" is set to 100, the DD1
D21
S
D1
value will change from S
to
in 2 seconds.
DD1
are same as the case "2) When M8026 is ON" below regardless of
2)
Command
Command
S2
S2
S1
When M8026 is ON
S1
(M8029)
(M8029)
Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Device
M8029
M8026*1
*1.
Name
Description
Instruction
execution complete
Turns ON when
RAMP mode
becomes equivalent to
S2
M8026 is available only in FX3U/FX3UC PLCs, and is cleared when the PLC mode switches from RUN to
STOP.
Caution
1. When specifying a latched (battery backed) type device as DD1
When setting PLC to the RUN mode while the command input is ON, clear DD1
414
in advance.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
14.9
Outline
This instruction is suitable for efficient control of the rotary table for putting/taking a product into/out of the rotary table.
FNC 68
ROTC
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
ROTC
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand type
Description
Data type
16-bit binary
Number of divisions
16-bit binary
m2
16-bit binary
14
FMC60-FNC69
Handy
Instruction
S
m1
Bit
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S
m1
m2
SD2
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
FNC40-FNC49
Data Operation
1. Instruction format
12
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
415
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 68
ROTC
m1
m2
D200
K10
K2
M0
Calling
Number
condition
of
register divisions
(word device)
Port No. 0
Zero point
detection
Product
8
X000(M0)
Detection
switch
1
Port No. 1
1)
416
Forward rotation
5
X001(M1)
4
3
Rotary table
2)
Number
Calling
of lowcondition
speed
register
sections (bit device)
+1
+2
A phase signal
+1
B phase signal
+2
+3
+4
+5
Stop
+6
+7
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
The conditions required to use this instruction are as shown in the example below.
1)
X000
M0
X001
+1
+2
M1
X002
M2
3)
+1 and DS1
+2
15
+1.
+2.
When the above conditions are specified, forward/backward rotation and high-speed/low-speed/stop are output to
DD1
16
17
+7.
+3 to DD1
to DD1
For example, when the rotation detection signal ( DD1 to DD1 +2) is activated 10 times in one division, set a value
multiplied by "10" to each division, port No. to be called and product No. to be called.
As a result, an intermediate value of the division number can be set to a low-speed section.
When the zero point detection signal (M2) turns ON while the command input is ON, the contents of the register for
counting DS1 are cleared to "0".
This clear operation should be executed before starting the operation.
18
FNC110-FNC139
Floating Point
FNC100-FNC109
Data
Transfer 2
FNC80-FNC89
External FX
Device
Cautions
DD1
FNC70-FNC79
External FX I/O
Device
14
FMC60-FNC69
Handy
Instruction
2)
13
FNC50-FNC59
High-Speed
Processing
A
phase
Up-counting signal during forward rotation
B
phase
12
FNC40-FNC49
Data Operation
2-phase switch
D
FNC30-FNC39
Rotation and
Shift
Operation conditions
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
417
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Outline
This instruction sorts a data table consisting of data (lines) and group data (columns) based on a specified group data
(column) sorted by line in ascending order. This instruction stores the group data (columns) in serial devices.
On the other hand, SORT2 (FNC149) instruction stores the data (lines) in serial devices facilitating the addition of data
(lines), and sorts a table in either ascending or descending order.
For SORT2 (FNC149) instruction, refer to Section 19.7.
1. Instruction format
FNC 69
SORT
16-bit Instruction
11 steps
Mnemonic
Operation Condition
Continuous
Operation
SORT
Operation Condition
2. Set data
Operand type
SS1
Description
Data type
Head device number storing the data table [which occupies m1 m2 points]
m1
m2
Head device number storing the operation result [which occupies m1 m2 points]
Column number of the group data (column) used as the basis of sorting [1 to m2]
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
SS1
m1
m2
SD
2
n
FNC 69
SORT
m1
m2
418
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
columns (m1 = K3, m2 = K4). For the sorting result data table, understand DS1
Column No.
Line No.
Control number
Height
Weight
Age
+3
+6
+9
+1
+4
+7
+10
+2
+5
+8
+11
12
2. Operation examples
When the instruction is executed with "n = K2 (column No. 2)" and "n = K3 (column No. 3) for the following sorting
source data, the operations shown below are acquired.
It is recommended to put a serial number such as a control number in the first column so that the original line number
can be estimated based on the contents.
Column No.
Line No.
Control number
Height
Weight
Age
Number of
data
m1 = K5
1)
150
+1
2
+2
+6
+7
+3
+8
+4
+9
+ 11
+ 12
+ 13
+ 16
40
70
+ 17
30
+ 14
16
+ 18
20
150
15
+ 15
20
50
100
+ 10
45
160
180
+5
FNC80-FNC89
External FX
Device
FNC70-FNC79
External FX I/O
Device
50
+ 19
45
Sorting result when the instruction is executed with "n = K2 (column No. 2)"
Column No.
Control number
Height
Weight
100
+1
1
+2
+3
+7
+8
+9
180
+ 11
+ 12
+ 13
+ 14
50
18
+ 17
45
70
+ 16
20
50
+15
8
45
160
+4
150
+6
+ 10
Age
20
150
+5
17
FNC110-FNC139
Floating Point
FNC100-FNC109
Data
Transfer 2
Line No.
+ 18
30
14
FMC60-FNC69
Handy
Instruction
13
FNC50-FNC59
High-Speed
Processing
When the command input turns ON, data sorting is started. Data sorting is completed after "m1" scans, and the
instruction execution complete flag M8029 is set to ON.
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
FNC40-FNC49
Data Operation
Number of
data
m1 = K3
as DD1 .
FNC30-FNC39
Rotation and
Shift
The data table configuration is explained in an example in which the sorting source data table has 3 lines and 4
+ 19
19
40
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
419
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Sorting result when the instruction is executed with "n = K3 (column No. 3)"
Column No.
Line No.
Control number
Height
Weight
Age
100
+1
1
+2
+3
+7
+8
+9
+ 11
+ 12
+ 13
+ 17
40
50
160
+ 16
20
50
+ 15
8
45
150
+4
+ 10
20
180
+6
150
+5
+ 18
45
+ 14
70
+ 19
30
Related device
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Device
M8029
Name
Instruction
execution complete
Description
Turns ON when sorting is completed.
Cautions
Do not change the contents of operands and data while the instruction is executed.
Before executing the instruction again, set the command input to OFF.
Limitation in the number of instructions
Only one instruction can be used in a program.
When the same device is specified in DS1 and DD1
The source data is overwritten by the data acquired by sorting.
Take special care so that the contents of DS1
420
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
12
FNC40-FNC49
Data Operation
FNC 70 to FNC 79 provide instructions to receive data from and send data to external devices mainly using inputs and
outputs in PLC.
Because these instructions easily achieve complicated controls with a minimum required sequence program and
external wiring, they are similar to handy instructions described in the preceding chapter.
FROM and TO instructions, essential for controlling special units and special blocks, are included in this group. (In
FX3U and FX3UC PLCs, transfer can be also executed using a MOV instruction.)
13
Function
TKY
71
HKY
HKY
72
DSW
DSW
73
SEGD
SEGD S D
74
SEGL
SEGL S D n
75
ARWS
76
ASC
77
PR
78
FROM
79
TO
Section 15.1
S D1 D2 D3
Hexadecimal Input
Section 15.2
S D1 D2 n
Section 15.3
Section 15.4
Section 15.5
ARWS S D1 D2 n
Arrow Switch
Section 15.6
ASC
Section 15.7
Section 15.8
FROM m1 m2 D n
Section 15.9
TO
S D1 D2
S
PR
D
S D
m1 m2 S n
Section
15.10
14
15
16
17
FNC100-FNC109
Data
Transfer 2
TKY
FNC80-FNC89
External FX
Device
70
Reference
FNC70-FNC79
External FX I/O
Device
Symbol
FMC60-FNC69
Handy
Instruction
Mnemonic
FNC50-FNC59
High-Speed
Processing
FNC No.
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
421
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
15.1
Outline
This instruction sets data for timers and counters through ten key inputs ranging from "0" to "9".
1. Instruction format
FNC 70
TKY
16-bit Instruction
7 steps
Mnemonic
Operation Condition
32-bit Instruction
Continuous
Operation
TKY
13 steps
Mnemonic
Operation Condition
Continuous
Operation
DTKY
2. Set data
Operand Type
Description
Data Type
Head bit device number from which one of the ten keys is input [10 devices are occupied]
Bit
D1
D2
Head bit device number storing the key pressing information [11 devices are occupied]
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
D1
S
D2
to
to D2
+10.
422
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
to D2
+10]
TKY
to D2
D2
Ten keys 0
+1
+2
+3
+9
D2
+1
14
D2
+2
D2
+3
D2
+9
D2
+10 [1]
[2]
[1]
[3]
13
S S S S S S S S S
+1 +2 +3 +4 +5 +6 +7 +8 +9
PLC
FMC60-FNC69
Handy
Instruction
D2
24V 0V S/S S
15
[3]
[4]
"2130" is stored in D1 .
+1, D1
to
Output information for key pressing and key sensing are output to D2
1)
+10.
to D2
D1
+10]
to D2
18
D2
For the ten-key connection example and key pressing information, refer to the 16-bit operation (TKY) shown above.
Cautions
19
FNC140-FNC149
Data
Operation 2
to D2
FNC110-FNC139
Floating Point
DTKY
17
FNC100-FNC109
Data
Transfer 2
2)
to D2
16
FNC80-FNC89
External FX
Device
FNC70-FNC79
External FX I/O
Device
[2]
[ D1
12
FNC50-FNC59
High-Speed
Processing
[4]
FNC40-FNC49
Data Operation
FNC30-FNC39
Rotation and
Shift
2)
20
FNC150-FNC159
Positioning
Control
423
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2)
Eleven bit devices are occupied from D2 for outputting the key pressing information.
Make sure that these devices are not used in other controls for the machine.
-
D2
to D2
+9: Turn ON or OFF according to input of the ten keys "0" to "9".
D2
+10: Is ON while either one among "0" to "9" keys is pressed (key sensing output).
Program example
In the program example shown below, the input X000 is set as the head bit device, and the ten keys "0" to "9" are
connected.
1. Program
X030
FNC 70
TKY
D1
D2
X000
D0
M10
2. Connection diagram
This connection diagram shows an example of FX3U PLC (sink input).
For wiring details, refer to the following manual.
FX3U Hardware Edition
FX3UC Hardware Edition
Ten keys 0
24V
0V
S/S X000 X001 X002 X003 X004 X005 X006 X007 X010 X011
PLC
3. Timing chart
1)
2)
3)
When the ten keys are pressed in the order "[1] [2] [3]
[4]" shown in the figure, "2130" is stored in (D0).
When an input value is larger than "9999", it overflows from
the most significant digit.
(An input numeric value is stored in binary format in D0).
X000
[4]
[2]
X001
X002
X003
M 10
[1]
[3]
X011
M 11
M 12
M 13
M 19
M 20
[1]
424
[2]
[3]
[4]
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
15.2
Outline
1. Instruction format
16-bit Instruction
9 steps
Mnemonic
Operation Condition
32-bit Instruction
Continuous
Operation
HKY
17 steps
Mnemonic
Operation Condition
DHKY
Continuous
Operation
13
Data Type
FNC50-FNC59
High-Speed
Processing
FNC 71
HKY
2. Set data
Operand Type
Description
Bit
D1
Bit
D2
D3
Bit
14
FMC60-FNC69
Handy
Instruction
3. Applicable devices
Word Devices
System User
Digit Specification
System User
15
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
16
D1
FNC80-FNC89
External FX
Device
D2
S
D3
17
to
+3] and [ D1
to D1
+7 turns ON.
Command
input
FNC 71
HKY
D1
D2
to D3
+6
18
FNC110-FNC139
Floating Point
FNC100-FNC109
Data
Transfer 2
D3
FNC70-FNC79
External FX I/O
Device
Operand
Type
Bit Devices
12
FNC40-FNC49
Data Operation
This instruction multiplexes four X-devices and four Y-devices to allow for 16 key (0 to F) 4-digit (byte) input. Keys 0 to
9 stores numerical values, and keys A to F represent function keys.
When the extension function is set to ON, hexadecimal keys 0 to F all store their corresponding numerical values.
D3
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
425
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2)
in binary.
Key
D3
D3
+3
+1
D3
+4
+2
D3
+5
A
B
D3
D3
to
+3] and [ D1
to D1
FNC 71
DHKY
D1
D2
to
D3
D3
2)
D2
+6 turns ON.
Command
input
1)
+1,
+7 turns ON.
+1, D2
] in binary.
Extension function
When M8167 is set to ON making the extension function valid, the numerical values for keys 0 to F are stored in
binary.
When the extension function is valid, the function and operation are the same except for the following.
M8167
FNC 71
HKY
426
D1
D2
D3
in binary.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Hexadecimal numerical value data input using keys 0 to F is shifted into [ D2
byte.
1)
+1,
D2
Command
input
12
+1, D2
] in
M8167
S
D1
D2
13
D3
FNC50-FNC59
High-Speed
Processing
FNC 71
DHKY
Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Name
M8167
M8029
Description
Turns ON/OFF the hexadecimal data handling function of HKY (FNC 71) instruction.
OFF: Ten-keys and function keys
ON:
Hexadecimal keys
OFF:
Instruction execution comON:
plete flag
to
D1
D1
to
D1
16
FNC80-FNC89
External FX
Device
to D3
+7 turn OFF.
17
2)
3)
Eight devices are occupied from the head device D3 for outputting the key pressing information.
Make sure that these devices are not used by other machine controls.
D3
to D3
D3
D3
18
20
FNC150-FNC159
Positioning
Control
7. Output format
19
FNC140-FNC149
Data
Operation 2
HKY and DHKY instructions are executed in synchronization with the operation cycle of the PLC.
8 scan cycles are required to finish reading the keys.
To prevent key input receiving errors caused by the filter delay, utilize the "constant scan mode" and "timer interrupt"
function.
FNC110-FNC139
Floating Point
FNC100-FNC109
Data
Transfer 2
1)
15
FNC70-FNC79
External FX I/O
Device
Cautions
14
FMC60-FNC69
Handy
Instruction
Device
FNC40-FNC49
Data Operation
FNC30-FNC39
Rotation and
Shift
427
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
S
X004
FNC 71
HKY
X000
D1
D2
D3
Y000
D 0
M 0
The figure below shows an example of the FX3U series main unit (sink input/sink output).
For wiring details, refer to the following manual.
FX3U Hardware Edition
FX3UC Hardware Edition
External
wiring
24V
0V
428
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
15.3
Outline
This instruction reads the set value of digital switches.
This instruction can read a set of 4 digits (n = K1) or two sets of 4 digits (n = K2).
12
FNC40-FNC49
Data Operation
1. Instruction format
FNC 72
DSW
16-bit Instruction
9 steps
Mnemonic
Operation Condition
32-bit Instruction
Mnemonic
Continuous
Operation
DSW
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand Type
Description
Data Type
Bit
D1
Bit
D2
16-bit binary
16-bit binary
14
FMC60-FNC69
Handy
Instruction
3. Applicable devices
Bit Devices
System User
Word Devices
Digit Specification
System User
15
Others
Special
Unit
U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
16
D1
S2
FNC80-FNC89
External FX
Device
S1
D2
n
17
is input by the time division method (in which the value is input in
.
18
FNC110-FNC139
Floating Point
turn from the 1st digit by the output signal at the interval of 100 ms), and stored to D2
Strobe
Command
signal
input
FNC 72
S
D1
D2
n
DSW
Data D1
- A numeric value from 0 to 9999 (up to 4 digits) can be read.
- A numeric value is stored in binary format.
, and the second set is stored to D2
19
+1.
FNC140-FNC149
Data
Operation 2
FNC100-FNC109
Data
Transfer 2
1)
FNC70-FNC79
External FX I/O
Device
Operand
Type
20
FNC150-FNC159
Positioning
Control
429
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
to
to
to
to
.
+4 to
to
+1.
Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Device
M8029
Name
Description
OFF:
Instruction execution comON:
plete flag
to
D1
D1
to
D1
Cautions
1. When the command contact turns OFF
Though the contents of D2
to D1
+3 turn OFF.
When two sets of 4 digits (n = K2) are used, two devices are occupied starting from D2
When one set of 4 digits is used, four devices are occupied starting from
used, eight devices are occupied starting from
5. Digital switches
Use BCD output type digital switches.
Program example
In the program example shown below, digital switches are connected to inputs starting from X010 and outputs from
Y010.
1. Program
S
X000
430
FNC 72
DSW
X010
D1
D2
Y010
D 0
K 1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
2. Connection diagram
The figure below shows an example of the FX3U series main unit (sink input/sink output).
For wiring details, refer to the Hardware Edition of each PLC.
BCD type
digital
switch
101
102
103
BCD type
digital
switch
Diode of
0.1 A, 50 V
is required.
0V
13
1
1
2
4
8
S/S X010 X011 X012 X013
Inputs of first set
1
2
3
4
FNC50-FNC59
High-Speed
Processing
24V
12
FNC40-FNC49
Data Operation
100
100 To
101 second
102 set
103
To
second
set
14
FMC60-FNC69
Handy
Instruction
PLC
15
3. Timing chart
Y010
Y011
Repeated
operation
0.1 sec
0.1 sec
FNC70-FNC79
External FX I/O
Device
X000
0.1 sec
0.1 sec
Y012
0.1 sec
While X000 is ON, Y010 to Y013 turn ON in turn at every 100 ms. After one cycle is finished, the execution complete
flag M8029 turns ON.
By providing a "digital switch read input", this instruction can be used in a relay output type PLC.
When the push button switch (X000) is pressed, DSW (FNC 72) instruction executes a series of operations.
Accordingly, with regard to this program, it is not necessary to consider the relay contact life even if Y010 to Y013 are
relay outputs.
18
SET
M 0
FNC 72
DSW
X010
RST
M 0
Y010
D 0
FNC110-FNC139
Floating Point
X000
M 0
17
FNC100-FNC109
Data
Transfer 2
FNC80-FNC89
External FX
Device
Y013
16
Pause
0.1 sec
K 1
M8029
19
While M0 (digital switch read input) is ON, DSW (FNC 72) is driven.
2)
DSW (FNC 72) completes one cycle of operation, and remains driven until the execution complete flag (M8029)
turns ON.
FNC140-FNC149
Data
Operation 2
1)
20
FNC150-FNC159
Positioning
Control
431
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
15.4
Outline
This instruction decodes data, and turns the seven-segment display unit (1 digit) ON.
1. Instruction format
FNC 73
SEGD
16-bit Instruction
5 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
SEGD
SEGDP
Operation Condition
2. Set data
Operand Type
Description
Data Type
16-bit binary
Word device number storing the data to be displayed in the seven-segment display unit
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S
D
432
FNC 73
SEGD
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
S
b3
b2
b1
b0
Seven-segment
configuration
B15
...
Display
data
B8
B7
B6
B5
B4
B3
B2
B1
B0
14
FMC60-FNC69
Handy
Instruction
Hexadecimal number
FNC30-FNC39
Rotation and
Shift
12
FNC40-FNC49
Data Operation
13
FNC50-FNC59
High-Speed
Processing
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
Caution
1. Number of occupied devices
Low-order 8 bits of
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
433
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
15.5
Outline
This instruction controls one or two sets of 4-digit seven-segment display units having the latch function.
1. Instruction format
FNC 74
SEGL
16-bit Instruction
7 steps
Mnemonic
Operation Condition
32-bit Instruction
Mnemonic
Continuous
Operation
SEGL
Operation Condition
2. Set data
Operand Type
Description
Data Type
16-bit binary
Bit
16-bit binary
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
U \G
S1
Others
Special
Unit
V
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S2
D
n
FNC 74
SEGL
to
434
For
is converted from binary into BCD, and each digit is output in turn from
+4 to
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Example of connecting one seven-segment display unit
The figure below shows an example of the FX3U series main unit (sink output).
For wiring details, refer to the Hardware Edition of each PLC.
FNC30-FNC39
Rotation and
Shift
3)
12
D +1 D +2 D +3
4
8
2
COM
102
103
FNC40-FNC49
Data Operation
101
13
100
1
2
4
8
FNC50-FNC59
High-Speed
Processing
V+
1st set
14
For selection of "n", refer to Subsection 15.5.2.
1)
to
is converted from binary into BCD, and its each digit is output in turn
+10 to
+4 to
+1 is converted from binary into BCD, and its each digit is output in
+4 to
2)
For
3)
and
+4 to
+7 are shared
17
FNC100-FNC109
Data
Transfer 2
PLC
(transistor output type)
COM
D
1
D +1 D +2 D +3
4
8
2
102
101
100
COM
V+
103
102
101
1
2
4
8
18
100
V+
19
FNC140-FNC149
Data
Operation 2
1
2
4
8
D +4 D +5 D +6 D +7
100 101 102 103
2nd set
1st set
Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
M8029
Name
Description
20
FNC150-FNC159
Positioning
Control
Device
FNC110-FNC139
Floating Point
103
16
FNC80-FNC89
External FX
Device
second set of 4-digit seven-segment display unit. (The strobe signal outputs
by the 1st and 2nd sets.)
15
FNC70-FNC79
External FX I/O
Device
FMC60-FNC69
Handy
Instruction
435
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Cautions
1. Time to update the 4-digit seven-segment display
The scan time (operation cycle) multiplied by 12 is required to update (one or two sets of) the 4-digit display.
8 devices are occupied from the head device specified in D . Even if the
number of digits is smaller than 4, unused devices cannot be used for any
other purpose.
When two sets of 4 digits are used:
Twelve devices are occupied from the head device specified in D . Even
if the number of digits is smaller than 4, unused devices cannot be used for
any other purpose.
436
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
15.5.2
The seven-segment display unit has the BCD decoding and latch functions
13
14
Pull-up
resistor
Y000
LOW
COM1
PLC
16
HIGH
Y000
ON
ON
Pulldown
resistor
Logic 1
PLC
Because transistor output (sink) is provided, the output Because transistor output (source) is provided, the output
becomes low level (0 V) when the internal logic is "1 (ON becomes high level (V+) when the internal logic is "1 (ON
output)". This is called "negative logic".
output)". This is called "positive logic".
Check
17
FNC100-FNC109
Data
Transfer 2
Description
Logic 1
V+
FNC80-FNC89
External FX
Device
Output circuit
+V0
15
FNC70-FNC79
External FX I/O
Device
Negative logic
Sink output ( common)
FMC60-FNC69
Handy
Instruction
The parameter "n" should be determined according to the data input logic (positive or negative) of the seven-segment
display unit, the logic (positive or negative) of the strobe signal and the number of sets of 4 digits to be controlled (1 or
2).
Logic
FNC50-FNC59
High-Speed
Processing
The value set to the parameter "n" varies depending on the signal logic of the seven-segment display. Select "n" as
described below.
The check column is provided at the bottom of the table. Check a corresponding type of logic (positive or negative),
and utilize it for parameter setting.
Output type
12
FNC40-FNC49
Data Operation
2)
The input voltage and current characteristics of the data input and strobe signal satisfy the output specifications of
the PLC.
- The input signal voltage (Lo) is approximately 1.5 V or less
- The input voltage is from 5V DC to 30V DC
FNC30-FNC39
Rotation and
Shift
15.5.1
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
437
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Data input
Logic
Negative logic
D
Timing chart
+1
+2
+3
Description
1
2
4
8
Positive logic
H
L
H
H
+1
+2
+3
1
2
4
8
H
H
Seven-segment
display
Seven-segment
display
Check
Strobe signal
Logic
Negative logic
D
...
...
...
D
Timing chart
Positive logic
+3
D +4 to D
Change in
strobe display
+7
Nothing
1
8
+3
D +4 to D
Change in
strobe display
Nothing
...
2)
+7
Nothing
Nothing
Latch
Description
Latch
Data latched at high level is held.
Check
Data input
Negative logic (match)
Negative logic
Positive logic (mismatch)
Positive logic (match)
Positive logic
Negative logic (mismatch)
Strobe signal
Parameter "n"
4 digits 1 set
4 digits 2 sets
2)
Data input
Negative logic (match)
Negative logic
Positive logic (mismatch)
438
Strobe signal
Parameter "n"
4 digits 1 set
4 digits 2 sets
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
15.6
Outline
This instruction inputs data through arrow switches used for shifting the digit and incrementing/decrementing the
numeric value in each digit.
FNC40-FNC49
Data Operation
1. Instruction format
FNC 75
ARWS
16-bit Instruction
9 steps
Mnemonic
Operation Condition
32-bit Instruction
Mnemonic
Continuous
Operation
ARWS
Operation Condition
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand Type
Description
Data Type
D1
D2
Bit
14
16-bit binary
Bit
FMC60-FNC69
Handy
Instruction
16-bit binary
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S
D1
16
D2
FNC80-FNC89
External FX
Device
to D2
to
D1
D2
18
FNC110-FNC139
Floating Point
FNC 75
ARWS
17
FNC100-FNC109
Data
Transfer 2
Command
input
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
12
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
439
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
103
102
101
Display for
selected digit
100
D2
+7
D2
+6
D2
+5
D2
+4
Strobe output
Display/operation panel
To outputs in
PLC
4
Increment
2
S
Higher
digit
S +3
+1
Lower
digit
S +2
S
D2
+3
D2
+2
D2
+1
D2
S
+3
+2
+1
Numeric value
output
To outputs in
PLC
Switches
To inputs in
PLC
Decrement
Arrow switches
Provided to select a digit and increment or
decrement the numeric value in the selected digit.
1)
Specifying the number of digits of the seven-segment display unit having the BCD decoder n
In the explanation below, "n" is set to "4" (up to the 103 digit).
2)
3)
+4 to D2
+7)
A specified digit can be displayed by the LED offered by the strobe signals D2
4)
+7.
440
+4 to D2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
13
FNC50-FNC59
High-Speed
Processing
2)
14
FMC60-FNC69
Handy
Instruction
Program example
1. When changing the timer number and displaying the current value
1)
12
FNC40-FNC49
Data Operation
FNC30-FNC39
Rotation and
Shift
Cautions
15
FNC70-FNC79
External FX I/O
Device
X010
X011
X012
X013
16
8 4 2 1
102
Y012
2)
8 4 2 1
101
Y011
FNC80-FNC89
External FX
Device
8 4 2 1
100
Y010
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
Y015
Write
1
Y000
2
Y001
4
Y002
8
Y003
Read
Set
Write
X004 X003 X002 X000 X001
19
In reading
Set the timer number using the digital switch, and then press the set switch (X003).
In writing
Set a numeric value using the arrow switches while looking at the seven-segment display unit, and then press the
switch X003.
FNC140-FNC149
Data
Operation 2
Explanation of operation
Every time the read/write key is pressed, the read/write LED lights alternately.
20
FNC150-FNC159
Positioning
Control
441
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program
T0
D300
T1
D301
T99
D399
M0
Decrement
M1
Increment
M2
Higher digit
M3
RUN monitor
Lower digit
X000
X001
X002
M8000
X004
FNC 66
ALTP
Read/write
M100
M100
Read indication
Y015
Write indication
Read Set
Y014
Read
Y015
Write
Y015 X003
442
M100
Y014
Y014 X003
Write Set
Practical
timer circuit
K1
4 digits 1 set
4 digits 1 set
FNC 74
T0Z
Y000
K 1
Negative logic
SEGL
T0Z Seven-segment display unit
FNC 12
MOVP
D300Z
D511
FNC 75
M0
D511 Y000
K1
ARWS
(M 0 to M 3) (D511) (Y000 to Y007)
Seven-segment display unit
4 digits 1 set
FNC 12 D511 D300Z
MOVP
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
15.7
Outline
This instruction converts a half-width alphanumeric character string into ASCII codes.
Use this instruction for selecting one among two or more messages and displaying it on an external display unit.
12
FNC40-FNC49
Data Operation
1. Instruction format
FNC 76
ASC
16-bit Instruction
11 steps
Mnemonic
Operation Condition
Mnemonic
32-bit Instruction
Continuous
Operation
ASC
Operation Condition
13
Operand Type
S
D
Data Type
Character string
(only ASCII codes)
16-bit binary
The number of characters is fixed to 8. When ASCII code less than 8 characters is input, the space character
(H20) is stored in remaining D .
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
*2
S
D
It is not necessary to attach quotes (" ") to the character string specified in
16
FNC80-FNC89
External FX
Device
*2.
S can handle half-width characters A to Z, 0 to 9 and symbols (, but cannot handle regular-width characters).
A character string is entered when a program is created with a programming tool.
D
stores converted ASCII codes in the order of low-order 8 bits and high-order 8 bits by 2 characters/byte at
one time.
Low-order 8
bits
42 (B)
41 (A)
18
+1
44 (D)
43 (C)
+2
46 (F)
45 (E)
19
+3
48 (H)
47 (G)
FNC140-FNC149
Data
Operation 2
Example: ABCDEFGH
High-order 8
bits
FNC110-FNC139
Floating Point
FNC 76
ASC
17
FNC100-FNC109
Data
Transfer 2
Command
input
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
14
FMC60-FNC69
Handy
Instruction
*1.
Description
FNC50-FNC59
High-Speed
Processing
2. Set data
20
FNC150-FNC159
Positioning
Control
443
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Extension function
When M8161 is set to ON for making the extension function valid, a half-width alphanumeric character string specified
in
is converted into ASCII codes, and transferred in turn only to low-order 8 bits (1 byte) of
Command
input
M8161
FNC 76
ASC
D
Example: ABCDEFGH
M8000
M8161
High-order 8 bits
Low-order 8 bits
Character string
00
41
+1
00
42
+2
00
43
+3
00
44
+4
00
45
+5
00
46
+6
00
47
+7
00
48
Related devices
Device
M8161
Name
Description
8-bit processing mode for ASC (FNC 76), RS (FNC 80), ASCI (FNC 82), HEX (FNC 83) and
CCD (FNC 84) instructions
OFF: Two characters are stored to low-order 8 bits and high-order 8 bits in this order at one
time (2 characters/word).
ON:
One character is stored to low-order 8 bits at one time (1 character/word).
Caution
1. Number of occupied devices
1)
2)
2. When using RS (FNC 80), ASCI (FNC 82), HEX (FNC 83) and/or CCD (FNC 84) instructions
The extension function flag M8161 is also used for other instructions.
When using an instruction described above and the ASC instruction in the same program, make sure to set M8161 to
ON or OFF just before the ASC instruction so that M8161 does not apply to another instruction.
444
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
15.8
Outline
This instruction outputs ASCII code data to outputs (Y) in parallel.
12
FNC 77
PR
Mnemonic
16-bit Instruction
5 steps
Operation Condition
32-bit Instruction
Mnemonic
Continuous
Operation
PR
FNC40-FNC49
Data Operation
1. Instruction format
Operation Condition
13
Operand Type
Description
Data Type
Character string
(only ASCII codes)
Bit
14
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FNC 77
PR
+3 are output to
to
to
+3 at the end.
S
S +1
S +2
S +3
high-order 8 bits low-order 8 bits high-order 8 bits low-order 8 bits high-order 8 bits low-order 8 bits high-order 8 bits low-order 8 bits
B (H42)
A (H41)
D (H44)
C (H43)
F (H46)
E (H45)
H (H48)
G (H47)
17
18
2. Timing chart
FNC110-FNC139
Floating Point
Command input
D to D +7 Data
T0
B
T0
19
FNC140-FNC149
Data
Operation 2
T0
D +8 Strobe
D +9 Execution flag
to
+8:
Strobe signal
+9:
20
FNC150-FNC159
Positioning
Control
16
FNC100-FNC109
Data
Transfer 2
FNC80-FNC89
External FX
Device
Command
input
to
15
FNC70-FNC79
External FX I/O
Device
FMC60-FNC69
Handy
Instruction
3. Applicable devices
Operand
Type
FNC50-FNC59
High-Speed
Processing
2. Set data
445
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Extension function
1. 16-byte serial output
The number of output characters varies depending on the ON/OFF status of the special auxiliary relay M8027.
While M8027 is OFF, 8-byte serial output (fixed to 8 characters) is executed. While M8027 is ON, 16-byte serial output
(1 to 16 characters) is executed.
In the example shown below, up to 16 characters (1 character/byte) are output to the display unit (external display unit
A6FD*1, for example).
It is supposed that data to be displayed is stored in hexadecimal codes in D300 to D307.
1)
Program
X000
M8027
FNC 77
PR
D300
Y020
2)
COM1 Y020 Y021 Y022 Y023 Y024 Y025 Y026 Y027 COM2 Y030 Y031 Y032 Y033
NC
12V
24V
AC100/200V
COM D 0 D 1 D 2 D 3 D 4 D 5 D 6 D 7
STR
*1.
3)
AC
AC
LG
A6FD was distributed only inside Japan, however, production of the external display unit A6FD was
terminated in November 2002.
Timing chart (while M8027 is ON)
Operation is started when X000 turns ON from OFF.
Drive input X000
Data Y020 to Y027
Head
character
Last
character*2
T: Operation cycle
or interrupt time
Strobe Y030
Execution flag Y031
Execution complete flag M8029
*2.
If "H00 (NULL code)" is contained in the data (16 characters), the character just before "H00 (NULL code)" is
handled as the last character.
Related devices
Device
Name
M8027*3
PR mode
*3.
446
Description
OFF:
ON:
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
13
FNC50-FNC59
High-Speed
Processing
12
FNC40-FNC49
Data Operation
FNC30-FNC39
Rotation and
Shift
Cautions
4. When "00H (NULL code)" is contained in the data (while M8027 is ON)
The instruction is executed completely, and the data after "00H" is not output.
M8029 remains ON during one operation cycle.
14
FMC60-FNC69
Handy
Instruction
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
447
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
15.9
Outline
This instruction reads the contents of buffer memories (BMF) in a special function unit/block attached to a PLC.
When a large capacity of buffer memory (BFM) data is read by this instruction, a watchdog timer error may occur.
When bad effect is not given to the control even if data to be read is divided, use RBFM (FNC278) instruction.
For RBFM (FNC278) instruction, refer to Section 31.1.
1. Instruction format
FNC 78
FROM
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
FROM
FROMP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
17 steps DFROM
DFROMP
2. Set data
Operand Type
Description
Data Type
m1
m2
D
n
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
m1
m2
D
n
FNC 78
FROM
m1
m2
inside a PLC.
n
Number of transfer points
n = 1 to 32767
Transfer destination (PLC)
Transfer source BFM#
(Special extension unit/block)
m2 = 0 to 32766
Unit No.
m1 = 0 to 7
448
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Special extension unit/block (BFM) PLC (word device)
"n" 32-bit data starting from the buffer memory (BFM) # [m2+1, m2] inside a special extension unit/block No. m1 are
transferred (read) to "n" devices starting from [ D
Command
input
] inside a PLC.
12
m1
m2
FNC40-FNC49
Data Operation
FNC 78
DFROM
+1,
13
FNC50-FNC59
High-Speed
Processing
Unit No.
m1 = 0 to 7
M8028
Name
Description
14
FMC60-FNC69
Handy
Instruction
Related devices
Device
FNC30-FNC39
Rotation and
Shift
15
FNC70-FNC79
External FX I/O
Device
Cautions
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
449
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program examples
In programs, the contents of buffer memories (BFMs) in special extension units/blocks are read (transferred) to data
registers (D), extension registers (R) and auxiliary relays (M) with digit specification using the FROM instruction and
direct specification of buffer memories*1.
*1.
Example: When the BFM#4 (abnormal station information) in the CC-Link/LT master unit (whose unit number is fixed
to "0") built in the FX3UC-32MT-LT(-2) is read to D0
-In case of FROM instruction
M8000
FNC 78
FROM
K0
K4
Unit
No. 0
BFM#4
D0
K1
Transfer Number of
destination transfer
points
FNC 12
MOV
U0\G4
D0
Unit No. 0
Transfer
BFM#4 destination
Example: When the BFMs#0 to 3 (remote station connection information) in the CC-Link/LT master unit (whose unit
number is fixed to "0") built in the FX3UC-32MT-LT(-2) are read to D10 to D13
-In case of FROM instruction
M0
FNC 78
FROMP
K0
K0
Unit
No. 0
BFM#0
D10
Transfer Number of
destination transfer
points
FNC 15
BMOVP
U0\G0
D10
K4
Unit No. 0
Transfer Number of
BFM#0 destination transfer
points
450
K4
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
15.9.1
12
Unit
No. 0
Built-in
CC-Link/LT
I/O
extension
block
Unit
No.2
Special
extension
block
Special
extension
block
Unit
No.3
I/O
extension
block
13
Special
extension
block
When BFMs are handled in a 32-bit instruction, a specified BFM stores low-order 16 bits, and a consecutive BFM
stores high-order 16-bits.
High-order
16 bits
Low-order
16 bits
BFM#10
BFM#9
16
FNC80-FNC89
External FX
Device
BFM#5
#6
#7
#8
#9
Specified devices
D100
D101
D102
D103
Specified BFMs
BFM#5
#6
#7
#8
18
FNC110-FNC139
Floating Point
D100
D101
D102
D103
D104
Specified BFMs
17
FNC100-FNC109
Data
Transfer 2
Specified devices
15
FNC70-FNC79
External FX I/O
Device
Up to 32767 16-bit RAM memories are built into a special extension unit/block, and they are called buffer memories.
Buffer memory numbers range from "0" to "32766" and their contents vary depending on the function of the extension
equipment.
Setting range: K0 to K32766
14
FMC60-FNC69
Handy
Instruction
A unit number is automatically assigned to each special extension unit/block connected to a PLC.
The unit number is assigned in the way "No. 0 No. 1 No. 2 ..." starting from the equipment nearest to the main
unit.
When the main unit is the FX3UC-32MT-LT(-2), the unit number is assigned in the way "No. 1 No. 2 No. 3 ..."
starting from the equipment nearest to the main unit because the CC-Link/LT master is built into the FX3UC-32MT-LT
(-2).
FNC50-FNC59
High-Speed
Processing
FX3UC32MTLT(-2)
main unit
Unit
No.1
FNC40-FNC49
Data Operation
Use the unit number to specify which equipment FROM/TO instruction works for.
Setting range: K0 to K7
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
451
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. While M8028 is ON
When an interrupt is generated during the execution of a FROM/TO instruction, the FROM/TO operation is
momentarily paused while the interrupt program executes. FROM/TO instructions cannot be used in interrupt
programs.
2)
2. Countermeasures
1)
For divided BFM read [RBFM (FNC278) instruction], refer to Section 31.1.
For divided BFM write [WBFM (FNC279) instruction], refer to Section 31.2.
2)
FNC 12
MOV
FNC 07
WDT
3)
K300
D8000
452
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
1. Instruction format
FNC 79
TO
Mnemonic
16-bit Instruction
Continuous
Operation
Pulse (Single)
Operation
TOP
Operation Condition
13
Continuous
Operation
Pulse (Single)
Operation
17 steps DTO
DTOP
FNC50-FNC59
High-Speed
Processing
9 steps
Operation Condition
TO
2. Set data
Operand Type
Description
Data Type
16- or 32-bit binary
m2
15
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
m1
16
m2
FNC80-FNC89
External FX
Device
S
n
17
m2
18
FNC110-FNC139
Floating Point
FNC 79
TO
FNC100-FNC109
Data
Transfer 2
For the common items between FROM instruction and TO instruction, refer to Subsection 15.9.1.
Command
input
FNC70-FNC79
External FX I/O
Device
Operand
Type
14
FMC60-FNC69
Handy
Instruction
m1
12
FNC40-FNC49
Data Operation
This instruction writes data from a PLC to buffer memories (BFM) in a special function unit/block.
When a large capacity of data is written to buffer memories (BFM) by this instruction, a watchdog timer error may
occur. When splitting the data to be written does not affect the control, use WBFM (FNC279) instruction.
For WBFM (FNC279) instruction, refer to Section 31.2.
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
453
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 79
DTO
m1
m2
n
Number of transfer points
n = 1 to 16383
Transfer source (PLC)
Transfer destination (Special
extension unit/block) BFM#
m2 = 0 to 32765
Unit No.
m1 = 0 to 7
Related devices
Device
M8028
Name
Description
Cautions
Digit specification in bit device S
For the 16-bit operation instruction, specify K1 to K4. For the 32-bit operation instruction, specify K1 to K8.
Note that the 32-bit values [m1+1, 1], [m2+1, m2] and [n+1, n] are valid when D or R is specified as "m1", "m2" or
"n" in a 32-bit instruction.
In the case of "DTO D0 D2 D100 R0", "m1" is [D1, D0], "m2" is [D3, D2], and "n" is [R1, R0].
Program examples
In programs, the contents of data registers (D), extension registers (R), auxiliary relays (M) with digit specification and
constants (K and H) are written (transferred) to buffer memories (BFMs) in special extension units/blocks using the TO
instruction and direct specification of buffer memories*1.
*1.
Example: When writing "H0" to the BFM#27 (command) in the CC-Link/LT master unit (whose unit number is fixed to
"0") built in the FX3UC-32MT-LT(-2)
-In case of TO instruction
M1
FNC 79
TOP
K0
K27
Unit
No. 0
BFM#27
FNC 12
MOVP
H0
U0\G27
454
H0
K1
Transfer Number of
source
Transfer
data
points
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
12
Mnemonic
Symbol
80
RS
81
PRUN
82
ASCI
ASCI
83
HEX
84
CCD
85
VRRD
86
VRSC
87
RS2
88
PID
89
Function
Reference
Serial Communication
Section 16.1
Section 16.2
S D n
Section 16.3
HEX
S D n
Section 16.4
CCD
S D n
Check Code
Section 16.5
VRRD S D
Volume Read
Section 16.6
VRSC S D
Volume Scale
Section 16.7
Serial Communication 2
Section 16.8
FNC70-FNC79
External FX I/O
Device
FNC No.
FNC40-FNC49
Data Operation
FNC 80 to FNC 89 provide control instructions for special adapters mainly connected to serial ports.
PID control loop instruction is included in this group.
Section 16.9
16
RS
S m D n
S1 S2 S3 D
15
FNC80-FNC89
External FX
Device
PID
S m D n n1
14
FMC60-FNC69
Handy
Instruction
RS2
FNC50-FNC59
High-Speed
Processing
PRUN S D
13
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
455
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
16.1
Outline
This instruction sends and receives data using non-protocol communication by way of a serial port (only ch1) in
accordance with RS-232C or RS-485 provided in the main unit.
1. Instruction format
FNC 80
RS
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
RS
Operation Condition
2. Set data
Operand type
SS1
m
D
n
Description
Data type
16-bit binary or
character string
16-bit binary
16-bit binary or
character string
Head device of data registers storing received data when receiving is completed
Number of bytes to be received [setting range: 0 to 4096]
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
SS1
SD2
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
456
FNC 80
RS
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
For detailed explanation, refer to the Data Communication Edition manual.
Device
Name
M8063*1
M8121*2
Device
Name
Error code number of serial communication error
D8120*3
M8122*2
Sending request
D8122*4
M8123*2
D8123*4
M8124
D8124
Header
M8129
D8125
Terminator
*4
D8129*3
M8161
12
FNC40-FNC49
Data Operation
D8063*1
D8419
13
*1.
Cleared when PLC power supply is turned from OFF to ON (in FX3S, FX3G, FX3GC, FX3U and FX3UC PLCs).
Cleared when the PLC mode is changed from STOP to RUN (in other PLCs).
*2.
*3.
*4.
14
FMC60-FNC69
Handy
Instruction
System configuration
Communication type
RS-232C communication
FX3S
Option
FX3G-232-BD or FX3U-232ADP(-MB) (with FX3S-CNV-ADP)
FX3G-485-BD(-RJ) or FX3U-485ADP(-MB) (with FX3S-CNV-ADP)
RS-232C communication
RS-485 communication
FX3GC,
FX3UC(D,DS,DSS)
RS-232C communication
FX3U-232ADP(-MB)
RS-485 communication
FX3U-485ADP(-MB)
FX3U,
FX3UC-32MT-LT(-2)
RS-232C communication
RS-485 communication
FX3G
16
FNC80-FNC89
External FX
Device
RS-485 communication
17
Header size
Terminator size
1 to 4 characters (bytes)
Up to 1 character
(byte)
Remarks
For the RS2 instruction, up to 4 characters (bytes)
can be specified as a header or terminator.
ch1
Cautions
For other cautions, refer to the Data Communication Edition manual.
The RS (FNC 80) instruction can be used for ch1 only (cannot be used for ch0/ch2).
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)" instruction and an "IVCK (FNC270) to IVMC (FNC275)",
"ADPRW (FNC276)", "FLCRT (FNC300) to FLSTRD (FNC305)" instruction for the same port.
457
19
20
FNC150-FNC159
Positioning
Control
Do not drive two or more RS (FNC 80) and/or RS2 (FNC 87) instructions for the same port at the same time.
18
FNC140-FNC149
Data
Operation 2
1 to 4 characters (bytes)
Up to 1 character
(byte)
FNC110-FNC139
Floating Point
Attachment of check
sum
RS instruction
RS2 instruction
FNC100-FNC109
Data
Transfer 2
Differences between the RS (FNC 80) instruction and RS2 (FNC 87) instruction
Item
15
FNC70-FNC79
External FX I/O
Device
To use this instruction, it is necessary to attach one of the products shown in the table below to the main unit.
For the system configuration, refer to the respective PLC Hardware Edition manual.
For detailed explanation, refer to the Data Communication Edition manual.
PLC
FNC50-FNC59
High-Speed
Processing
D8405
FNC30-FNC39
Rotation and
Shift
Related devices
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
16.2
Outline
This instruction handles the device number of
numbers, and transfers data.
as octal
1. Instruction format
FNC 81
PRUN
16-bit Instruction
5 steps
Mnemonic
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DPRUN
DPRUNP
Continuous
Operation
Pulse (Single)
Operation
PRUN
PRUNP
2. Set data
Operand type
SS1
D
*1.
Description
Digit
Data type
specification*1
destination*1
Make sure that the least significant digit of a specified device number is "0".
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
SS1
SD2
S
FNC 81
PRUN
K4X000
D
K4M0
458
M8
X7
X6
X5
X4
X3
X2
X1
X0
M7
M6
M5
M4
M3
M2
M1
M0
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Command
input
FNC 81
PRUN
K4M0
K4Y000
FNC30-FNC39
Rotation and
Shift
12
Not transferred
M8
M7
M6
M5
M4
M3
M2
M1
M0
Y7
Y6
Y5
Y4
Y3
Y2
Y1
Y0
FNC40-FNC49
Data Operation
13
FNC50-FNC59
High-Speed
Processing
S
K6X000
K6M0
14
FMC60-FNC69
Handy
Instruction
FNC 81
DPRUN
X10
X7
X6
X5
X4
X3
X2
X1
X0
M10 M9
M8
M7
M6
M5
M4
M3
M2
M1
M0
X20 X17
15
FNC70-FNC79
External FX I/O
Device
M27
16
K6M0
K6Y000
Y27
17
Not transferred
M10 M9
M8
M7
M6
M5
M4
M3
M2
M1
M0
Y10
Y7
Y6
Y5
Y4
Y3
Y2
Y1
Y0
Y20 Y17
FNC100-FNC109
Data
Transfer 2
M27
FNC80-FNC89
External FX
Device
Command
input
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
459
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
16.3
Outline
This instruction converts hexadecimal code into ASCII code.
On the other hand, BINDA (FNC261) instruction converts binary data into ASCII code, and ESTR (FNC116) instruction
converts binary floating point data into ASCII code.
For BINDA (FNC261) instruction, refer to Section 29.6.
For ESTR (FNC116) instruction, refer to Section 18.4.
1. Instruction format
FNC 82
ASCI
16-bit Instruction
7 steps
Mnemonic
Operation Condition
ASCI
ASCIP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
SS1
16-bit binary
Character string
(only ASCII code)
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
SS1
S1
S2
SD2
S1
S2
S1
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
and later are converted into ASCII code, and then stored to
the devices D
and later.
The 16-bit mode and 8-bit mode options are available for this instruction. For operation in each mode, refer to the
proceeding pages.
Command
input
460
FNC 82
ASCI
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Each digit of hexadecimal data stored in
and later is converted into ASCII code, and transferred to the high-
M8000
M8161 16-bit mode
Command
input
13
FNC50-FNC59
High-Speed
Processing
FNC 82
ASCI
Operation
In the following program, conversion is executed as follows:
M8000
M8161
FNC 82
ASCI
D100
D200
14
16-bit mode
FMC60-FNC69
Handy
Instruction
X010
K4
Devices after S
D100 = 0ABCH
D101 = 1234H
D102 = 5678H
15
FNC70-FNC79
External FX I/O
Device
K1
K2
K3
K4
K5
K6
K7
K8
K9
[C]
[B]
[A]
[0]
[4]
[3]
[2]
[1]
[8]
[C]
[A]
[0]
[4]
[3]
[2]
[1]
[B]
[A]
[0]
[4]
[3]
[2]
[B]
[A]
[0]
[4]
[3]
[C]
[B]
[A]
[0]
[4]
[C]
[B]
[A]
[0]
[C]
[B]
[A]
[C]
[B]
[C]
17
FNC100-FNC109
Data
Transfer 2
[B]
[C]
16
FNC80-FNC89
External FX
Device
[C]
D 200
0 1
A
0
[C] 43H
C
1
[0] 30H
1
ASCII code
[0] = 30H [1] = 31H
[A] = 41H [2] = 32H
[B] = 42H [3] = 33H
[C] = 43H [4] = 34H
18
[5] = 35H
[6] = 36H
[7] = 37H
[8] = 38H
19
[B] 42H
When outputting data in the BCD format for a printer, for example, it is necessary to convert binary data into BCD
data before executing this instruction.
FNC140-FNC149
Data
Operation 2
[A] 41H
D 201
0 1
FNC110-FNC139
Floating Point
D 100 = 0ABCH
0 0 0 0 1
0
12
FNC40-FNC49
Data Operation
Each ASCII code is stored in either the high-order 8 bits or low-order 8 bits of each device D
and later.
M8161 is used also for RS, HEX, CCD and CRC instructions. When using the 16-bit mode, set M8161 to normally
OFF. M8161 is cleared when the PLC mode is changed from RUN to STOP.
FNC30-FNC39
Rotation and
Shift
2. 16-bit conversion mode (while M8161 is OFF) (M8161 is also used for the RS, HEX, CCD and CRC
instructions.)
20
FNC150-FNC159
Positioning
Control
461
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
and later. The number of digits (characters) to be converted is specified by "n". "0" is
M8000
M8161 8-bit mode
Command
input
FNC 82
ASCI
Low-order 8 bits
Destination
Operation
In the following program, conversion is executed as follows:
M8000
M8161
X010
FNC 82
ASCI
D100
D200
8-bit mode
K4
Devices after S
D100 = 0ABCH
D101 = 1234H
D102 = 5678H
Number of specified digits (characters) and conversion result
n
K1
D
D 200
[C]
D 201
K2
K3
[B]
[C]
D 202
K4
K5
K6
[A]
[0]
[4]
[3]
[2]
[1]
[8]
[B]
[A]
[0]
[4]
[3]
[2]
[1]
[B]
[A]
[0]
[4]
[3]
[2]
[C]
[B]
[A]
[0]
[4]
[3]
[C]
[B]
[A]
[0]
[4]
[C]
[B]
[A]
[0]
[B]
[A]
[C]
D 203
D 204
D 205
D 206
K7
[C]
D 207
K8
[C]
D 208
K9
[B]
[C]
ASCII codes
[0] = 30H [1] = 31H
[A] = 41H [2] = 32H
[B] = 42H [3] = 33H
[C] = 43H [4] = 34H
[5] = 35H
[6] = 36H
[7] = 37H
[8] = 38H
0
4
0
3
When outputting data in the BCD format for a printer, for example, it is necessary to convert binary data into BCD
data before executing this instruction.
462
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
16.4
Outline
1. Instruction format
13
Mnemonic
16-bit Instruction
Operation Condition
HEXP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
HEX
7 steps
14
2. Set data
Data type
Character string
SS1
16-bit binary
16-bit binary
15
Make sure to use only ASCII codes "0" to "9" and "A" to "F".
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FNC70-FNC79
External FX I/O
Device
*1.
Description
FMC60-FNC69
Handy
Instruction
Operand type
FNC50-FNC59
High-Speed
Processing
FNC 83
HEX
12
FNC40-FNC49
Data Operation
16
SS1
S1
S2
SD2
S1
S2
S1
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
and later, "n" characters are converted into hexadecimal codes, and then
Command
input
FNC 83
HEX
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
463
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 83
HEX
Operation
In the following program, conversion is executed as follows:
M8000
M8161
X010
FNC 83
HEX
D200
D100
16-bit mode
K4
Hexadecimal code
30H
41H
42H
43H
31H
32H
33H
34H
35H
D 102
D 101
D 100
D 200
0ABH
D 201
0H
ABC1H
0AH
BC12H
0ABH
C123H
0ABCH
1234H
ABC1H
2345H
0H
D 100
0
0
30H [0]
43H [C]
0ABCH
41H [A]
0AH
0H
1
2
42H [B]
1
A
When the input data is in BCD format, it is necessary to convert BCD data into binary data after executing this
instruction.
If ASCII code is not stored in
hexadecimal code is disabled. Especially, note that ASCII code should be stored in high-order 8 bits of
when M8161 is OFF.
464
also
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Each ASCII code stored in the low-order 8 bits of each device
M8000
M8161 8-bit mode
Command
input
FNC 83
HEX
16 bits
Ignored
Low-order 8 bits
Source data
13
FNC50-FNC59
High-Speed
Processing
Operation
In the following program, conversion is executed as follows:
M8000
M8161
X010
D200
D100
8-bit mode
14
K4
FMC60-FNC69
Handy
Instruction
FNC 83
HEX
30H
D 201
41H
D 202
42H
D 203
43H
D 204
31H
D 205
32H
D 206
33H
D 207
34H
D 208
35H
15
FNC70-FNC79
External FX I/O
Device
ASCII code
D 200
16
FNC80-FNC89
External FX
Device
D 101
D 200
Does not change
0ABH
D 201
0ABCH
0AH
BC12H
0ABH
C123H
8
0H
0ABCH
1234H
ABC1H
2345H
41H [A]
D 100
0
0
0
A
19
FNC140-FNC149
Data
Operation 2
When the input data is in BCD format, it is necessary to convert BCD data into binary data after executing this
instruction.
18
FNC110-FNC139
Floating Point
ABC1H
30H [0]
0AH
0H
17
0H
1
2
D 100
FNC100-FNC109
Data
Transfer 2
D 102
12
FNC40-FNC49
Data Operation
FNC30-FNC39
Rotation and
Shift
20
FNC150-FNC159
Positioning
Control
465
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
16.5
Outline
This instruction calculates the horizontal parity value and sum check value in the error check methods used in
communication. There is another check method, CRC (cyclic redundancy check) also. For obtaining CRC value, use
CRC instruction.
For CRC instruction, refer to Section 24.4.
For complement [NEG (FNC 29) instruction], refer to Section 10.10.
1. Instruction format
FNC 84
CCD
Mnemonic
16-bit Instruction
7 steps
Operation Condition
CCD
CCDP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
SS1
16-bit binary or
character string
16-bit binary or
character string
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
SS1
S1
SD2
S1
S1
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S2
to
466
FNC 84
CCD
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
With regard to "n" data starting from
, the addition data and horizontal parity data of high-order 8 bits and low-
13
FNC50-FNC59
High-Speed
Processing
12
FNC40-FNC49
Data Operation
M8000
Command
input
FNC30-FNC39
Rotation and
Shift
D100
D0
14
K10
FMC60-FNC69
Handy
Instruction
FNC 84
CCD
16-bit mode
S
Low-order 8 bits of D100
K100
= 01100100
= 0110111 (1)
K100
= 01100100
K 98
= 01100010
K123
= 0111101 (1)
K 66
= 01000010
K100
= 01100100
K 95
= 0101111 (1)
K210
= 11010010
K 88
= 01011000
Total
K1091
Horizontal parity
15
16
1000010 (1)
FNC80-FNC89
External FX
Device
K111
FNC70-FNC79
External FX I/O
Device
17
0
"1091" in BCD
D1
Horizontal parity
FNC100-FNC109
Data
Transfer 2
D0
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
467
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
, the addition data and horizontal parity data of only low-order 8 bits are
stored to D
and D +1 respectively.
M8161 is also used for the RS, ASCI, HEX and CRC instructions. When using the 8-bit mode, set M8161 to normally
ON. M8161 is cleared when the PLC mode is changed from RUN to STOP.
M8000
M8161 8-bit mode
Command
input
16 bits
Ignored
FNC 84
CCD
Low-order 8 bits
Source data
FNC 84
CCD
D100
K10
S
D 100
K100
= 01100100
D 101
K111
= 0110111 (1)
D 102
K100
= 01100100
D 103
K 98
= 01100010
D 104
K123
= 0111101 (1)
D 105
K 66
= 01000010
D 106
K100
= 01100100
D 107
K 95
= 0101111 (1)
D 108
K210
= 11010010
D 109
K 88
= 01011000
Total
K1091
Horizontal parity
468
D0
8-bit mode
1000010 (1)
D0
"1091" in BCD
D1
Horizontal parity
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
16.6
Outline
12
This instruction reads the analog value of a variable analog potentiometer board attached to the PLC main unit.
FNC 85
VRRD
16-bit Instruction
Mnemonic
Operation Condition
VRRD
5 steps
VOLUME READ
VRRDP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand type
Description
Data type
SS1
16-bit binary
16-bit binary
14
Bit Devices
System User
Word Devices
Digit Specification
System User
T
Others
Special
Unit
R U \G
SD2
Modify
Real
CharacPointer
Number ter String
E
" "
16
VRRD
17
FNC100-FNC109
Data
Transfer 2
Program example
1. Example in which the read analog value is used as the set value of an analog timer
Volume
Read
number destination
FNC 85
VRRD
K0
D0
18
FNC110-FNC139
Floating Point
The analog value of the variable analog potentiometer No.0 is converted into binary 8-bit data, and the value ranging
from 0 to 255 is transferred to D0.
The value of D0 is used as the set value of a timer.
X000
FNC80-FNC89
External FX
Device
This instruction reads the analog value of a variable analog potentiometer board attached the PLC main unit.
Command
input
FNC 85
15
FNC70-FNC79
External FX I/O
Device
SS1
Index
Constant
FMC60-FNC69
Handy
Instruction
3. Applicable devices
Operand
Type
FNC40-FNC49
Data Operation
1. Instruction format
19
T0
D0
When a value larger than 255 is required as the set value of a timer, the read value multiplied by a constant using the
MUL (FNC 22) instruction can be set indirectly as the timer constant.
FNC140-FNC149
Data
Operation 2
X001
20
FNC150-FNC159
Positioning
Control
469
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. Example in which the analog values of the variable analog potentiometers Nos. 0 to 7 are read in
turn, and used as analog timers
K0 to K7 are specified in SS1 of the VRRD instruction in accordance with the values of the variable potentiometers
VR0 to VR7.
Index (Z = 0 to 7) is used for indexing in the sequence below, and K0Z indicates K0 to K7.
M8000
0
RUN
monitor
M8000
7
RST
FNC 08
FOR
K8
FNC 85
VRRD
K0Z
FNC 24
INC
D200Z
Z+1Z
FNC 09
NEXT
16
X000
T0
17
D200
T0
Y000
21
X001
T1
23
D201
T1
Y001
27
X007
T7
59
D207
T7
63
Y007
Cautions
In FX3S PLC, the variable analog potentiometer board can be connected to the option connector.
In this case, the communication function is not available when the VRRD or VRSC instruction is used.
In 14-point and 24-point type FX3G PLCs, the variable analog potentiometer board can be connected to the option
connector 1, and occupies communication channel ch1.
In this case, the communication function using communication channel ch1 is not available when the VRRD or
VRSC instruction is used.
In 40-point and 60-point type FX3G PLCs, the variable analog potentiometer board can be connected only to the
option connector 2, and occupies communication channel ch2.
In this case, the communication function using communication channel ch2 is not available when the VRRD or
VRSC instruction is used.
The communication function is not available for ch1 when the VRRD or VRSC instruction is used in the program in
FX3U/FX3UC PLCs.
For details, refer to the Data Communication Edition manual.
FX3S/FX3G PLCs support the FX3G-8AV-BD.
FX3U/FX3UC-32MT-LT(-2) PLCs support the FX3U-8AV-BD.
470
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
16.7
Outline
12
1. Instruction format
FNC 86
VRSC
16-bit Instruction
5 steps
Operation Condition
VRSC
VRSCP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13
FNC50-FNC59
High-Speed
Processing
VOLUME SCALE
Mnemonic
2. Set data
Operand type
Description
Data type
16-bit binary
16-bit binary
14
FMC60-FNC69
Handy
Instruction
SS1
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
R U \G
SS1
SD2
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
16
This instruction reads the value of a variable analog potentiometer on the variable analog potentiometer board
attached to the main unit as a numeric value ranging from 0 to 10.
However, the actual scale value does not always correspond to the switching position of the variable analog
potentiometer scale (0 to 10).
This instruction converts into a binary value the scale value of a variable analog potentiometer specified in SS1 , and
VRSC
17
FNC100-FNC109
Data
Transfer 2
Command
input
FNC 86
FNC80-FNC89
External FX
Device
15
FNC70-FNC79
External FX I/O
Device
System User
Others
Special
Unit
FNC40-FNC49
Data Operation
This instruction reads the value of a variable analog potentiometer on the variable analog potentiometer board
attached to the PLC main unit as a numeric value ranging from 0 to 10.
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
471
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
1. Example in which the scale value is used as a rotary switch
One of the auxiliary relays from M0 to M10 turns ON in accordance with the scale value ranging from 0 to 10 of the
specified variable analog potentiometer.
X000
X001
FNC 86
VRSC
K1
D1
FNC 41
DECO
D1
M0
K4
M0
M0 turns ON when the scale value is "0".
M1
M0 turns ON when the scale value is "1".
M10
M0 turns ON when the scale value is "10".
Cautions
In FX3S PLC, the variable analog potentiometer board can be connected to the option connector.
In this case, the communication function is not available when the VRRD or VRSC instruction is used.
In 14-point and 24-point type FX3G PLCs, the variable analog potentiometer board can be connected to the option
connector 1, and occupies communication channel ch1.
In this case, the communication function using communication channel ch1 is not available when the VRRD or
VRSC instruction is used.
In 40-point and 60-point type FX3G PLCs, the variable analog potentiometer board can be connected only to the
option connector 2, and occupies communication channel ch2.
In this case, the communication function using communication channel ch2 is not available when the VRRD or
VRSC instruction is used.
The communication function is not available for ch1 when the VRRD or VRSC instruction is used in the program in
FX3U/FX3UC PLCs.
For details, refer to the Data Communication Edition manual.
FX3S/FX3G PLCs support the FX3G-8AV-BD.
FX3U/FX3UC-32MT-LT(-2) PLCs support the FX3U-8AV-BD.
472
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
16.8
Outline
1. Instruction format
16-bit Instruction
11 steps
Mnemonic
Operation Condition
Continuous
Operation
RS2
Operation Condition
2. Set data
Operand type
D
n
*1.
14
Data type
16-bit binary or
character string
16-bit binary
16-bit binary or
character string
Head device of data registers storing received data when receiving is completed
Number of bytes to be received [setting range: 0 to 4,096]
15
16-bit binary
ch2]*1
16-bit binary
FNC70-FNC79
External FX I/O
Device
n1
Description
FMC60-FNC69
Handy
Instruction
SS1
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
R U \G
S
SD2
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
17
FNC100-FNC109
Data
Transfer 2
SS1
16
Others
Special
Unit
n1
18
19
n1
FNC140-FNC149
Data
Operation 2
FNC 87
RS2
FNC110-FNC139
Floating Point
Command
input
FNC80-FNC89
External FX
Device
Operand
Type
13
FNC50-FNC59
High-Speed
Processing
FNC 87
RS2
12
FNC40-FNC49
Data Operation
This instruction sends and receives data using non-protocol communication by way of serial ports in accordance with
RS-232C or RS-485 provided in the main unit.
In FX3G/FX3GC PLCs, data can be sent and received using non-protocol communication by way of the standard builtin port (RS-422).
20
FNC150-FNC159
Positioning
Control
473
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related devices
Device
ch0*1
ch1
M8371
M8401
Device
Name
ch2*1
ch0*1
ch1
D8370
D8400
ch2*1
Name
M8372
M8402
M8422 Sending
M8373
M8403
D8372
D8402
M8404
D8373
D8403
M8405
M8379
M8409
M8062
*1.
M8063
request*2
D8405
D8379
D8409
D8380
D8410
D8430 Header 1, 2
D8381
D8411
D8431 Header 3, 4
D8382
D8412
D8432 Terminator 1, 2
D8383
D8413
D8433 Terminator 3, 4
D8384
D8414
D8385
D8415
D8386
D8416
D8389
D8419
D8062
D8063
*2.
*3.
Available in all FX3G/FX3GC PLCs and FX3U/FX3UC PLCs Ver. 2.30 or later.
*4.
System configuration
For using this instruction, it is necessary to attach one of the products shown in the table below to the main unit.
For the system configuration, refer to the respective PLC Hardware Edition manual.
For detailed explanation, refer to the Data Communication Edition manual.
PLC
FX3S
Communication type
Option
RS-232C communication
RS-485 communication
FX3G
RS-232C communication
RS-232C/RS-422 converter*5
(FX-232AW, FX232AWC and FX-232AWC-H)
RS-485 communication
RS-232C communication
FX3GC
FX3U,
FX3UC-32MT-LT(-2)
FX3UC(D,DS,DSS)
*5.
474
RS-232C/RS-422 converter*5
(FX-232AW, FX232AWC and FX-232AWC-H)
RS-485 communication
FX3U-485ADP(-MB)
RS-232C communication
FX3U-232-BD or FX3U-232ADP(-MB)
RS-485 communication
FX3U-485-BD or FX3U-485ADP(-MB)
RS-232C communication
FX3U-232ADP(-MB)
RS-485 communication
FX3U-485ADP(-MB)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Item
RS2 instruction
RS instruction
Remarks
1 to 4 characters (bytes)
Up to 1 character (byte)
Terminator size
1 to 4 characters (bytes)
Up to 1 character (byte)
Attachment of
check sum
ch1
Used channel
number
Ver. 1.00
or later
FX3GC
Ver. 1.40
or later
FX3U
Ver. 2.30
or later
FX3UC
Item
ch1
Ver. 2.30 Data Set Ready (DSR) Flag
or later ch2
Data Set Ready (DSR) Flag
Function Summary
Turns M8405 ON when the DR (DSR)
signal of ch1 is ON.
Turns M8425 ON when the DR (DSR)
signal of ch2 is ON.
15
FNC70-FNC79
External FX I/O
Device
Ver. 1.00
or later
FX3G
14
FMC60-FNC69
Handy
Instruction
13
FNC50-FNC59
High-Speed
Processing
Cautions
12
FNC40-FNC49
Data Operation
Header size
FNC30-FNC39
Rotation and
Shift
Differences between the RS (FNC 80) instruction and RS2 (FNC 87) instruction
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
475
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
16.9
Outline
This instruction executes PID control which changes the output value according to the input variation.
For details, refer to the Analog Control Edition.
1. Instruction format
FNC 88
PID
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
PID
Operation Condition
2. Set data
Operand type
Description
Data type
SS11
16-bit binary
SS12
16-bit binary
16-bit binary
16-bit binary
S3
SD1
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
SS11
S1
S2
SS12
S1
S2
SS23
S1
SD
1
S1
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S2
S1 , measured value
S2 , and parameters
FNC 88
PID
S1
S2
S3
S3
to
D
Output value (MV)
Parameter
Measured value (PV)
Target value (SV)
476
S3 .
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Set item
Target value
(SV)
S2
Measured value
(PV)
2)
Parameter*1
1)
2)
3)
S3 .
25
20
to
S3
Setting Value
Remarks
1 to 32767 (ms)
bit0
0: Forward operation,
1: Backward operation
Operation direction
bit1
bit2
bit3
Not available
bit4
bit5
bit6
17
FNC100-FNC109
Data
Transfer 2
18
Not available
S3 +2
0 to 99 (%)
S3 +3
1 to 32767 (%)
S3 +4
S3 +5
0 to 100 (%)
S3 +6
0 to 32767 ( 10 ms)
S3 +7
:
These devices are occupied for internal processing in PID control loop. Do not change the data.
FNC110-FNC139
Floating Point
bit7 to bit15
16
FNC80-FNC89
External FX
Device
Operation
setting (ACT)
14
15
S3 +28
Set item
S3 +1
S3 .
When auto tuning is not used, the number of points is the same as the number in the step
response method are occupied.
3. List of parameters
S3
13
FNC70-FNC79
External FX I/O
Device
*1.
29
FMC60-FNC69
Handy
Instruction
Output value
(MV)
S3 .
FNC50-FNC59
High-Speed
Processing
1)
12
b)
FNC40-FNC49
Data Operation
S1
S3
Number of
occupied
points
Description
FNC30-FNC39
Rotation and
Shift
2. Set items
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
S3 +19
477
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Set item
S3 +20*1
Setting Value
S3 +22*1
S3 +23*1
0 to 32767
S3 +1 for
0 to 32767
S3 +1 for
0 to 32767
32768 to 32767
Remarks
32768 to 32767
bit0
bit1
bit2
bit3
The setting below is required when the limit cycle method is used (when bit 6 is set to "ON" in the operation setting (ACT)).
S3 +25
PV value threshold
(hysteresis) width (SHPV)
S3 +26
S3 +27
S3 +28
*1.
478
S3 +20 to
(ACT).
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
S3 ,
and other operands specified in each instruction are different to each other.
S3 .
13
S3 .
S3 .
3. When specifying a device in the latched area backed up against power failure
M8002
Initial pulse
RST
D***
14
FMC60-FNC69
Handy
Instruction
For the output value (MV) in the PID instruction, specify a data register outside the latched area.
When specifying a data register in the latched area, make sure to clear the latched (backed up) contents when the
PLC mode is set to RUN using the following program.
Program example
FNC50-FNC59
High-Speed
Processing
12
FNC40-FNC49
Data Operation
1)
S3
FNC30-FNC39
Rotation and
Shift
Cautions
15
When an operation error occurs, the special auxiliary relay M8067 turns ON, and the error code is stored in the special
data register D8067.
For the error code, refer to Section 38.4.
FNC70-FNC79
External FX I/O
Device
Error
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
479
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
480
FNC No.
Mnemonic
100
101
102
ZPUSH
103
ZPOP
104
105
160
107
108
109
Symbol
Function
Reference
ZPUSH D
Section 17.1
ZPOP D
Section 17.2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
17.1
Outline
1. Instruction format
FNC 102
ZPUSH P
16-bit Instruction
Mnemonic
Operation Condition
ZPUSH
3 steps
32-bit Instruction
Mnemonic
2. Set data
Operand Type
Description
Data Type
14
D +1 to
destination
FMC60-FNC69
Handy
Instruction
Head device number batch-storing the present value of the index registers V0 to V7 and
Z0 to Z7
16-bit binary
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
15
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
16
FNC80-FNC89
External FX
Device
17
3)
18
In this case, the occupied points are incremented by "16" after D every time the ZPUSH (FNC102) instruction
is executed. Secure sufficient area for the number of the next structure in advance.
FNC110-FNC139
Floating Point
2)
FNC100-FNC109
Data
Transfer 2
1)
FNC102
ZPUSH
FNC70-FNC79
External FX I/O
Device
Operand
Type
13
FNC50-FNC59
High-Speed
Processing
ZPUSHP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
12
FNC40-FNC49
Data Operation
This instruction temporarily batch-stores the present value of the index registers V0 to V7 and Z0 to Z7.
For restoring the present value of temporarily batch-stored index registers, use the ZPOP (FNC103) instruction.
For the ZPOP (FNC103) instruction, refer to Section 17.2.
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
481
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
4)
and later.
Z2
+15
+16
+17
+18
+19
+20
Z7
V7
Z0
V0
Z1
V1
...
batchstorage
D =1
*1
Z0
V0
Z1
V1
Z2
...
Z7
V7
[4] ZPOP
instruction
Number of times
of batch-storage
D :0
+1
+2
+3
+4
+5
...
Z7
V7
...
...
[2] ZPOP
instruction
Number of times of
batch-storage
+15
D is
+16
decremented by
"1".
V1
Z2
V2
D +0
...
...
Z7
V7
+4
+5
+6
...
Z2
V2
Batchstored data
16 points
for 1
nesting
Related instruction
Instruction
Description
ZPOP (FNC103)
Restores the index registers V0 to V7 and Z0 to Z7 which were batch-stored temporarily by the ZPUSH
(FNC102) instruction.
Cautions
When not using the nest structure, clear the number of batch-storage times
(FNC102) instruction.
When using the nest structure, clear the number of batch-storage times
instruction the first time.
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the range of points used after
range (error code: K6706)
482
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
In the program shown below, the contents of the index registers Z0 to Z7 and V0 to V7 before execution of subroutine
program are batch-stored in D0 and later when index registers are used in the subroutine after the pointer P0.
M8002
RST
D0
FNC 12
MOVP
K5
V0
X005
FNC 12
MOVP
K10
V0
X000 V0
13
Y000
FNC 01
CALL
FNC50-FNC59
High-Speed
Processing
X000
Label
P0
12
FNC40-FNC49
Data Operation
X005
P0
FNC 06
FEND
M8000
RUN monitor
X006
FNC 12
MOVP
K5
V0
X006
FNC 12
MOVP
K10
V0
15
FNC70-FNC79
External FX I/O
Device
X030
14
D0
FMC60-FNC69
Handy
Instruction
FNC102
ZPUSH
T0
D100V0
M8000
FNC103
ZPOP
FNC30-FNC39
Rotation and
Shift
Program example
V0
16
FNC80-FNC89
External FX
Device
FNC 02
SRET
END
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
483
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
17.2
Outline
This instruction restores the contents of the index registers V0 to V7 and Z0 to Z8 which were batch-stored temporarily
by ZPUSH (FNC102) instruction.
For ZPUSH (FNC102) instruction, refer to Section 17.1.
1. Instruction format
FNC 103
ZPOP P
Mnemonic
16-bit Instruction
3 steps
Operation Condition
32-bit Instruction
Mnemonic
ZPOP
ZPOPP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
Head device number temporarily batch-storing the contents of the index registers V0 to V7
and Z0 to Z7
D +1 to
destination
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
1)
FNC103
ZPOP
The contents of the index registers V0 to V7 and Z0 to Z7 which were batch-stored temporarily to D and later
are restored to the original index registers. When the contents of the index registers are restored, the number of
times of batch-storage
2)
is decremented by "1".
Related instruction
Instruction
ZPUSH (FNC102)
Description
Temporarily batch-stores the present value of the index registers V0 to V7 and Z0 to Z7.
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the number of times of batch-storage (D) stores "0" or a negative value while ZPOP (FNC103) instruction is
executed (error code: K6706)
Program example
For a program example, refer to Section 17.1.
484
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
FNC No.
Mnemonic
Symbol
Function
Reference
110
ECMP
ECMP S1 S2 D
111
EZCP
EZCP S1 S2 S D
112
EMOV
EMOV S D
113
114
115
Section 18.1
Section 18.2
Section 18.3
13
Section 18.5
Section 18.6
119
EBIN
EBIN
Section 18.7
120
EADD
EADD S1 S2 D
Section 18.8
121
ESUB
ESUB S1 S2 D
Section 18.9
122
EMUL
EMUL S1 S2 D
Section
18.10
123
EDIV
EDIV S1 S2 D
Section
18.11
124
EXP
Section
18.12
125
LOGE
LOGE S D
Section
18.13
126
LOG10
LOG10
Section
18.14
127
ESQR
ESQR S D
Section
18.15
128
ENEG
ENEG D
Section
18.16
EXP
S D
S D
S D
485
16
17
18
19
20
FNC150-FNC159
Positioning
Control
EBCD S D
FNC140-FNC149
Data
Operation 2
EBCD
FNC110-FNC139
Floating Point
118
S D
FNC100-FNC109
Data
Transfer 2
EVAL
FNC80-FNC89
External FX
Device
EVAL
15
FNC70-FNC79
External FX I/O
Device
117
14
FMC60-FNC69
Handy
Instruction
Section 18.4
ESTR
FNC50-FNC59
High-Speed
Processing
116
ESTR S1 S2 D
12
FNC40-FNC49
Data Operation
FNC110 to FNC119, FNC120 to FNC129 and FNC130 to FNC139 provide instructions for conversion, comparison,
arithmetic operations, square root operation, trigonometry, etc. for floating point operations.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
486
FNC No.
Mnemonic
Symbol
Function
Reference
129
INT
INT
S D
Section
18.17
130
SIN
SIN
S D
Section
18.18
131
COS
COS
S D
Section
18.19
132
TAN
TAN
S D
Section
18.20
133
ASIN
ASIN
S D
Section
18.21
134
ACOS
ACOS S D
Section
18.22
135
ATAN
ATAN S D
Section
18.23
136
RAD
RAD
S D
Section
18.24
137
DEG
DEG
S D
Section
18.25
138
139
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
18.1
Outline
1. Instruction format
FNC 110
ECMP P
Operation Condition
Operation Condition
13 steps DECMP
DECMPP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Data Type
S1
S2
Head bit device number to which the comparison result is output (Three devices are
occupied.)
14
Bit
FMC60-FNC69
Handy
Instruction
*1.
Description
Device number storing binary floating point data to be compared
When a constant (K or H) is specified, it is automatically converted from binary into binary floating point (real
number) when the instruction is executed.
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
S1
S2
S3
S2
S2
S3
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
16
S1
FNC80-FNC89
External FX
Device
S1: "D .b" is available only in FX3U/FX3UC PLCs, and cannot be indexed with index registers (V and Z).
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
S1
S2
18
D
D +1
D +2
19
Even if the command input turns OFF before the DECMP instruction is fully executed, D to D +2 hold the status.
20
FNC150-FNC159
Positioning
Control
Caution
FNC140-FNC149
Data
Operation 2
D
FNC110-FNC139
Floating Point
FNC110
DECMP
17
FNC100-FNC109
Data
Transfer 2
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
13
FNC50-FNC59
High-Speed
Processing
12
FNC40-FNC49
Data Operation
This instruction compares two data values (binary floating point), and outputs the result (larger, same or smaller) to
three consecutive bit devices.
For handling of floating point, refer to Subsection 5.1.3.
+2).
487
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
18.2
Outline
This instruction compares data (binary floating point) with two values (one zone), and outputs the comparison result to
three consecutive bit devices.
For handling of floating point, refer to Subsection 5.1.3.
1. Instruction format
FNC 111
EZCP P
Operation Condition
Operation Condition
17 steps DEZCP
DEZCPP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
*1.
Description
Data Type
S1
S2
Head bit device number to which the comparison result is output (Three devices are
occupied.)
Bit
When a constant (K or H) is specified, it is automatically converted from binary into binary floating point (real
number) when the instruction is executed.
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
S1
S2
S
488
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
+1,
S1
], [ S2
+1,
S2
+1, and
FNC 111
EDZCP
D
D +2
S2
S
], it is
D
13
[ S2 +1, S2 ] ".
14
FMC60-FNC69
Handy
Instruction
Even if the command input turns OFF before the DEZCP instruction is fully executed, D to D +2 will hold their
previous status.
15
Cautions
FNC70-FNC79
External FX I/O
Device
+2).
2. Comparison values [ S1
] [ S2
+1, S2
16
] > [ S2
+1, S2
+1, S2
] is regarded as [ S1
+1, S1
FNC80-FNC89
External FX
Device
[ S1
12
FNC50-FNC59
High-Speed
Processing
D +1
S1
+1,
FNC40-FNC49
Data Operation
+1,
FNC30-FNC39
Rotation and
Shift
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
489
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
18.3
Outline
This instruction transfers binary floating point data.
For handling of floating point, refer to Subsection 5.1.3.
1. Instruction format
FNC 112
EMOV P
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DEMOV
DEMOVP
2. Set data
Operand Type
Description
Data Type
Binary floating point data (transfer source) or device number storing data
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
U \G
S1
S2
S1
S2
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FNC112
DEMOV
] are transferred to [ D
+1,
.
S
+1,
+1
+1
Transfer
4.23542
4.23542
Program examples
1. In the program example shown below, a real number stored in D11 and D10 is transferred to D1
and D0 when X007 turns ON
X007
FNC112
DEMOVP
D10
D0
D11
D10
D1
36.475
D0
36.475
END
2. In the program shown below, a real number "-1.23" is transferred to D11 and D10 when X007
turns ON
X007
FNC112
DEMOVP
E1.23
D10
END
490
D11
1.23
D10
1.23
].
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
18.4
Outline
13
1. Instruction format
16-bit Instruction Mnemonic
Operation Condition
Operation Condition
13 steps DESTR
DESTRP
Continuous
Operation
Pulse (Single)
Operation
14
Operand Type
Description
Data Type
S1
S2
Head device number storing the display specification of a numeric value to be converted
16-bit binary
Character string
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
16
FNC80-FNC89
External FX
Device
S1
15
FNC70-FNC79
External FX I/O
Device
3. Applicable devices
FMC60-FNC69
Handy
Instruction
2. Set data
Operand
Type
FNC50-FNC59
High-Speed
Processing
FNC 116
D ESTR P
12
FNC40-FNC49
Data Operation
This instruction converts binary floating point data into a character string (ASCII codes) having a specified number of
digits.
On the other hand, STR (FNC200) instruction converts binary data into a character string (ASCII codes).
For a character string, refer to Section 5.3.
For handling of floating point, refer to Subsection 5.1.3.
For STR (FNC200) instruction, refer to Section 26.1.
S2
17
, S2
be directly specified as S1
Command
input
S1
+1,
S1
S2
S2
+2
19
FNC140-FNC149
Data
Operation 2
S2
+1
0: Decimal point
format
1: Exponent
format
Total number of
digits
Number of digits
of decimal part
18
The data after conversion varies depending on the display specification stored in S2
S2
FNC110-FNC139
Floating Point
FNC116
DESTR
+1 and S2
FNC100-FNC109
Data
Transfer 2
20
FNC150-FNC159
Positioning
Control
491
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
+1
S2
+2
Decimal point
format
Total number of
digits
Number of digits
of decimal part
b15
D
+1
S1
b0
ASCII code for sign
+1
+2
+3
+4
Sign
S1
b8 b7
0000H
The total number of digits which can be specified by S2 +1 is as follows (24 digits maximum):
When the number of digits of the decimal part is "0", Total number of digits 2
When the number of digits of the decimal part is any value other than "0", Total number of digits (Number of digits
of decimal part + 3)
The number of digits of the decimal part which can be specified by S2 +2 is from 0 to 7.
However, the following must be satisfied, "Number of digits of decimal part (Total number of digits - 3)"
For example, when the total number of digits is "8", the number of digits of the decimal part is "3", and
"-1.23456" is specified, data is stored in
Total
number
of digits
S2
S2
+1
S2
+2
Number of
digits of
decimal part
D
1
2 3 5
Sign
S1
+1
b8 b7
b15
S1
b0
20H(space)
2DH(-)
+1
31H(1)
20H(space)
+2
32H(2)
2EH(.)
+3
35H(5)
33H(3)
+4
0000H
1.23456
0000H is automatically stored at the end of the
character string.
0: Decimal point
format
S2
+1
8 (Total number of
digits)
S2
+2
2 (Number of digits
of decimal part)
S1
+1
S1
1.23456
492
Total
number of
digits
2 3 4 5 6
Low-order
digits of
decimal part
Rounded.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
0: Decimal point
format
S2
+1
8 (Total number of
digits)
S2
+2
2 (Number of digits
of decimal part)
S1
+1
Total
number of
digits
12
FNC40-FNC49
Data Operation
S2
2 3
Low-order digits of decimal
part
S1
Automatically added.
1.23456
S2
+1
S2
+2
2
+1
14
2 3
Low-order digits of decimal
part
S1
FMC60-FNC69
Handy
Instruction
S1
Total
number of
digits
1.23456
- "00H" or "0000H" is automatically stored at the end of the converted character string.
15
S2
+1
S2
+2
+1
+2
+3
+4
45H(E)
+5
+6
Total number of
digits
Number of digits
of decimal part
S1
+1
S1
Automatically
added.
17
0000H
The total number of digits which can be specified by S2 +1 is as follows (24 digits maximum):
When the number of digits of the decimal part is "0" Total number of digits 6
When the number of digits of the decimal part is any value other than "0" Total number of digits (Number of digits
of decimal part + 7)
18
FNC110-FNC139
Floating Point
FNC100-FNC109
Data
Transfer 2
16
FNC80-FNC89
External FX
Device
Exponent format
b0
FNC70-FNC79
External FX I/O
Device
b8 b7
b15
S2
13
FNC50-FNC59
High-Speed
Processing
- When the total number of digits subtracted by the digits for sign, decimal point and decimal part is larger than the
integer part of the binary floating point data, "20H (space)" is stored between the sign and the integer part.
S2
FNC30-FNC39
Rotation and
Shift
- When the number of digits of the decimal part is set to any value other than "0", "2EH (.)" is automatically stored
in "specified number of digits of decimal part + 1"th digit.
When the number of digits of the decimal part is "0", "2EH (.)" is not stored.
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
493
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
The number of digits of the decimal part which can be specified by S2 +2 is from 0 to 7.
However, the following must be satisfied, "Number of digits of decimal part (Total number of digits - 7)"
For example, when the total number of digits is "12", the number of digits of the decimal part is "4", and
"-12.34567" is specified, data is stored in
1
S2
S2
+1
12
S2
+2
Total number
of digits
b15
2 3 4 6E+ 0 1
Fixed to 2 digits
S1
+1
b8 b7
Number of
digits of
decimal
part
S1
12.34567
b0
20H space
2DH(-)
+1
2EH(.)
31H(1)
+2
33H(3)
32H(2)
+3
36H(6)
34H(4)
+4
2BH(+)
45H(E)
+5
31H(1)
30H(0)
+6
0000H
0000H is automatically stored at the end of the
character string.
S2
S2
+1
12
Fixed to 1 digit
S2
+2
S1
+1
2 3 4 6E+ 0 1
"20H (space)" is stored.
S1
12.34567
- If the decimal part of the binary floating point data cannot be accommodated in the number of digits of the
decimal part, low-order digits of the decimal part are rounded.
1
S2
S2
+1
12
S2
+2
S1
+1
S1
2 3 4 6 6 7E+ 0 1
Number of digits of
decimal part (4)
Cut by rounding.
12.34567
- When the number of digits of the decimal part is set to any value other than "0", "2EH (.)" is automatically stored
in "specified number of digits of decimal part + 1"th digit.
When the number of digits of the decimal part is "0", "2EH (.)" is not stored.
1
S2
S2
+1
12
S2
+2
S1
+1
S1
12.34567
2 3 4 6E+ 0 1
Number of digits of
decimal part (4)
Automatically added.
- For the sign of the exponent part, "2BH (+)" is stored when the exponent is positive, and "2DH (-)" is stored when
the exponent is negative.
494
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Total number of digits (12)
S2
S2
+1
12
S2
+2
Fixed to 2 digits.
1
12
2 3 4 6E+ 0 1
FNC40-FNC49
Data Operation
+1
S1
FNC30-FNC39
Rotation and
Shift
S1
12.34567
- "00H" or "0000H" is automatically stored at the end of the converted character string.
13
Instruction
FNC50-FNC59
High-Speed
Processing
Related instructions
Description
EVAL (FNC117)
Converts a character string (ASCII codes) into binary floating point data.
STR (FNC200)
VAL (FNC201)
14
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When S1
126
0, 2
S1
15
< 2128
is any value other than "0" or "1" (error code: K6706)
When the conversion result exceeds the specified total number of digits (error code: K6706)
17
FNC100-FNC109
Data
Transfer 2
When the number of digits of the decimal part specified by S2 +2 is not located within the following range (error
code: K6706)
In the case of decimal point format: Number of digits of decimal part (Total number of digits - 3)
In the case of exponent format: Number of digits of decimal part (Total number of digits - 7)
16
FNC80-FNC89
External FX
Device
When the total number of digits specified by S2 +1 is not located within the following range (error code: K6706)
In the case of decimal point format:
When the number of digits of the decimal part is "0", Total number of digits 2
When the number of digits of the decimal part is any value other than "0", Total number of digits (Number of
digits of decimal part + 3)
In the case of exponent format:
When the number of digits of the decimal part is "0", Total number of digits 6
When the number of digits of the decimal part is any value other than "0", Total number of digits (Number of
digits of decimal part + 7)
FNC70-FNC79
External FX I/O
Device
FMC60-FNC69
Handy
Instruction
Errors
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
495
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program examples
1)
In the program example shown below, the contents (binary floating point data) of R0 and R1 are converted
according to the contents specified by R10 to R12, and then stored to D0 and later when X000 turns ON
X000
FNC116
DESTRP
R0
R10
D0
END
R10
R11
R12
Conversion
format
Total number
of digits
Number of digits
of decimal part
b15
Total number
of digits
0
Space
R1
R0
0.0327457
0 3 3
Number of
digits of
decimal part
b8 b7
b0
D0
20H(space)
20H(space)
D1
2EH(.)
30H(0)
D2
33H(3)
30H(0)
D3
00H
33H(3)
2)
In the program shown below, the contents (binary floating point data) of R0 and R1 are converted according to the
contents specified by R10 to R12, and then stored to D10 and later when X000 turns ON
X000
FNC116
DESTRP
R0
R10
D10
END
R10
1 (exponent
format)
R11
12
R12
Conversion
format
Total number
of digits
Number of digits
of decimal part
R1
R0
0.0327457
Total number
of digits
3
Space
2 7 4 6E
0 2
Number of digits
of decimal part
b15
b8 b7
b0
D10
20H(space)
20H(space)
D11
2EH(.)
33H(3)
D12
37H(7)
32H(2)
D13
36H(6)
34H(4)
D14
2DH(-)
45H(E)
D15
32H(2)
30H(0)
D16
0000H
0000H is automatically stored at the
end of the character string.
496
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
18.5
Outline
1. Instruction format
13
16-bit Instruction Mnemonic
Operation Condition
Operation Condition
9 steps DEVAL
DEVALP
Continuous
Operation
Pulse (Single)
Operation
FNC50-FNC59
High-Speed
Processing
FNC 117
D EVAL
P
14
2. Set data
Description
Data Type
Head device number storing character string data to be converted into binary floating point
data
Character string
FMC60-FNC69
Handy
Instruction
Operand Type
15
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FNC70-FNC79
External FX I/O
Device
Operand
Type
12
FNC40-FNC49
Data Operation
This instruction converts a character string (ASCII codes) into binary floating point data.
On the other hand, the VAL (FNC201) instruction converts a character string (ASCII codes) into binary data.
For a character string, refer to Section 5.3.
For handling of floating point, refer to Subsection 5.1.3.
For VAL (FNC201) instruction, refer to Section 26.2.
16
FNC80-FNC89
External FX
Device
+1,
].
A specified character string may be in the decimal point format or exponent format. A character string in either format
can be converted into binary floating point data.
b15
b0
+1
+2
+3
+4
+1
18
FNC110-FNC139
Floating Point
b8 b7
17
FNC100-FNC109
Data
Transfer 2
Command
input
19
FNC140-FNC149
Data
Operation 2
00H
20
FNC150-FNC159
Positioning
Control
497
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
b8 b7
b0
31H(1)
2DH(-)
+1
30H(0)
2EH(.)
+2
38H(8)
37H(7)
+3
32H(2)
31H(1)
+4
+1
1.07812
Binary floating point
(real number)
00H
1
0 7 8 1 2
b8 b7
b0
20H(space)
2DH(-)
+1
2EH(.)
31H(1)
+2
32H(2)
33H(3)
+3
31H(1)
30H(0)
+4
2BH(+)
45H(E)
+5
30H(0)
31H(1)
+6
+1
1.3201E+10
Binary floating point
(real number)
00H
1
3 2 0 1E+ 1 0
b8 b7
b0
20H(space)
2DH(-)
+1
31H(1)
20H(space)
+2
33H(3)
2EH(.)
+3
31H(1)
30H(0)
+4
36H(6)
35H(5)
+5
31H(1)
38H(8)
+6
00H
32H(2)
1
3 0 1 5 6 8 1 2
Rounded.
498
+1
1.30156
Up to 6 digits are securely
equivalent.
Binary floating point
(real number)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
b15
b8 b7
b0
20H(.)
2DH(-)
2EH(.)
31H(1)
+2
35H(5)
33H(3)
+3
33H(3)
30H(0)
+4
31H(1)
34H(4)
+5
45H(E)
32H(2)
+6
30H(0)
2DH(-)
00H
32H(2)
3 5 0 3 4 1 2E
+1
12
1.35034E2
Up to 6 digits are
securely equivalent.
Binary floating point
(real number)
13
FNC50-FNC59
High-Speed
Processing
+1
FNC40-FNC49
Data Operation
FNC30-FNC39
Rotation and
Shift
0 2
Rounded.
When "2BH (+)" is specified as the sign in the exponent format or when the sign is omitted, a character string is
converted into a positive exponent.
When "2DH (-)" is specified as the sign, a character string is converted into a negative exponent.
When "20H (space)" or "30H (0)" exists between numbers except the first "0" in a character string specified by
, "20H" or "30H" is ignored during conversion.
b15
b8 b7
b0
2DH(-)
+1
31H(1)
30H(0)
+2
32H(2)
2EH(.)
+3
31H(1)
33H(3)
+4
16
1.231
Binary floating point
(real number)
00H
0 1
+1
FNC80-FNC89
External FX
Device
20H(space)
2 3 1
17
When "30H (0)" exists between a number and "E" in a character string in the exponent format, "30H" is ignored
during conversion.
b8 b7
b0
2DH(-)
2EH(.)
31H(1)
34H(4)
30H(0)
33H(3)
35H(5)
2BH(+)
45H(E)
33H(3)
30H(0)
18
D
+1
FNC110-FNC139
Floating Point
20H(space)
1.0453E+3
19
FNC140-FNC149
Data
Operation 2
00H
1
FNC100-FNC109
Data
Transfer 2
Ignored.
b15
15
FNC70-FNC79
External FX I/O
Device
14
FMC60-FNC69
Handy
Instruction
When "2BH (+)" is specified as the sign in the floating point format or when the sign is omitted, a character string is
converted into a positive value.
When "2DH (-)" is specified as the sign, a character string is converted into a negative value.
0 4 5 3E+ 0 3
20
Ignored.
FNC150-FNC159
Positioning
Control
499
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related devices
For the use methods of the zero, borrow and carry flags, refer to Subsection 6.5.2.
Description
Device
Name
M8020
Zero flag
M8021
Borrow flag
M8022
Carry flag
Condition
Operation
Related instructions
Instruction
Description
ESTR (FNC116)
Converts binary floating point data into a character string (ASCII codes).
STR (FNC200)
VAL (FNC201)
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When any character other than "30H (0)" to "39H (9)" exists in the integer part or decimal part (error code: K6706)
When "2EH (.)" exists in two or more positions in a character string specified by
When any character other than "45H (E)", "2BH (+)" or "2DH (-)" exists in the exponent part, or when two or more
exponent parts exist (error code: K6706)
When "00H" does not exist in the corresponding device range starting from
When the number of characters after
Program examples
1)
In the program example shown below, a character string stored in R0 and later is converted into binary floating
point, and stored to D0 and D1 when X000 turns ON
X000
FNC117
DEVALP
R0
D0
END
b15
b8 b7
R0
2DH(-)
R1
31H(1)
30H(0)
R2
32H(2)
2EH(.)
R3
34H(4)
33H(3)
R4
32H(2)
35H(5)
R5
00H
31H(1)
0 1
Ignored.
500
b0
20H(space)
2 3 4 5 2 1
Rounded.
D0
D1
1.23452
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
In the program shown below, a character string stored in D10 and later is converted into binary floating point, and
stored to D100 and D101 when X000 turns ON
X000
FNC117
DEVALP
D10
END
12
b8 b7
FNC40-FNC49
Data Operation
b15
D100
FNC30-FNC39
Rotation and
Shift
2)
b0
20H(space)
20H(space)
D11
2EH(.)
31H(1)
D12
33H(3)
32H(2)
D13
35H(5)
34H(4)
D14
2DH(-)
45H(E)
D15
32H(2)
30H(0)
13
D101
D100
1.2345E2
FNC50-FNC59
High-Speed
Processing
D10
14
00H
D16
2 3 4 5E
Ignored.
FMC60-FNC69
Handy
Instruction
0 2
Rounded.
15
Operation
The value of D
M8021 turns ON.
is the minimum value (2126) of 32-bit real numbers and the borrow flag
is the maximum value (2128) of 32-bit real numbers and the carry flag M8022
The value of
turns ON.
16
FNC80-FNC89
External FX
Device
FNC70-FNC79
External FX I/O
Device
Condition
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
501
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
18.6
Outline
This instruction converts binary floating point into scientific notation.
For handling of floating point, refer to Subsection 5.1.3.
1. Instruction format
FNC 118
EBCD P
Operation Condition
Operation Condition
9 steps DEBCD
DEBCDP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S
D
FNC118
DEBCD
+1,
[ S
+1,
][ D
+1,
Scientific notation
High order
Before
execution
+1,
Low order
b31 b30 b29 b28 b27 b26 b25 b24 b23 b22 b21 b20 b19 b18 b17 b16 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
+1
S
After execution
High order
After
execution
Low order
b31 b30 b29 b28 b27 b26 b25 b24 b23 b22 b21 b20 b19 b18 b17 b16 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Exponent part
Mantissa part
+1
10
+1
Caution
1. Handling of floating point
In floating point operations, all data is handled in binary floating point.
Because binary floating point is difficult to understand (requiring a dedicated monitoring method), it is converted into
scientific notation so that monitoring can be easily executed by peripheral equipment.
GX Works2, GX Developer and GOT have the function to directly monitor and display binary floating point.
502
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
18.7
Outline
1. Instruction format
FNC 119
P
EBIN
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13
FNC50-FNC59
High-Speed
Processing
9 steps DEBIN
DEBINP
2. Set data
Operand Type
Description
Data Type
14
Real number
(decimal)
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S
D
16
+1,
+1,
].
Command
input
[ S
+1,
][ D
Scientific notation
+1,
High order
Before
execution
Low order
b31 b30 b29 b28 b27 b26 b25 b24 b23 b22 b21 b20 b19 b18 b17 b16 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Exponent part
Mantissa part
18
10
After execution
19
FNC110-FNC139
Floating Point
+1
+1
FNC140-FNC149
Data
Operation 2
High order
After
execution
17
FNC100-FNC109
Data
Transfer 2
FNC119
DEBIN
Low order
b31 b30 b29 b28 b27 b26 b25 b24 b23 b22 b21 b20 b19 b18 b17 b16 b15 b14 b13 b12 b11 b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0
Sign (1 bit)
+1
20
FNC150-FNC159
Positioning
Control
FNC80-FNC89
External FX
Device
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
FMC60-FNC69
Handy
Instruction
12
FNC40-FNC49
Data Operation
This instruction converts scientific notation stored in devices into binary floating point.
For handling of floating point, refer to Subsection 5.1.3.
503
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
By DEBIN instruction, a numeric value containing the decimal point can be directly converted into binary floating point.
Example: Converting "3.14" into binary floating point
3.14 = 314 102 (scientific notation)
X002
FNC 12
MOVP
K314
D0
K314 D0
FNC 12
MOVP
K -2
D1
K -2 D1
FNC119
DEBIN
D0
D 10
[D1]
314 102
[D0]
(D1,D0) (D11,D10)
314 102 Binary floating point
504
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
18.8
Outline
1. Instruction format
16-bit Instruction Mnemonic
Operation Condition
13
Operation Condition
13 steps DEADD
DEADDP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
14
Data Type
S1
Word device number storing binary floating point data used in addition
S2
Word device number storing binary floating point data used in addition
FMC60-FNC69
Handy
Instruction
*1.
Description
Real number
(binary)*1
When a constant (K or H) is specified, it is automatically converted into binary floating point (real number)
when the instruction is executed.
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
Index
U \G
S1
S2
S2
S1
S2
S1
S2
Z Modify K
Real
CharacPointer
Number ter String
" "
17
S1
S2
S1
S2
+1,
S1
] or [ S2
18
] + [ S2
+1, S2
][ D
+1,
S2
+1, D
19
[ S1
+1, S1 ]
Binary floating point
+[
K2346
][ D
Automatically
converted into binary
floating point
+1, D
Caution
FNC140-FNC149
Data
Operation 2
DEADD
+1, S1
[ S1
+1, S1
].
FNC110-FNC139
Floating Point
Command
input
+1,
FNC100-FNC109
Data
Transfer 2
16
FNC80-FNC89
External FX
Device
S1
Constant
15
FNC70-FNC79
External FX I/O
Device
3. Applicable devices
Operand
Type
FNC50-FNC59
High-Speed
Processing
FNC 120
D EADD P
12
FNC40-FNC49
Data Operation
20
The same device number can be specified in [ S1 +1, S1 ],[ S2 +1, S2 ] and [ D +1, D ].
In this case, note that the addition result changes in every operation cycle when the continuous operation type
instruction (DEADD) is used.
505
FNC150-FNC159
Positioning
Control
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
18.9
Outline
This instruction executes subtraction of two binary floating point data.
For program examples of floating point operations, refer to Section 12.10.
For handling of floating point, refer to Subsection 5.1.3.
For flag operations, refer to Subsection 6.5.2.
1. Instruction format
FNC 121
D ESUB P
Operation Condition
Operation Condition
13 steps DESUB
DESUBP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
*1.
Description
Data Type
S1
Word device number storing binary floating point data used in subtraction
S2
Word device number storing binary floating point data used in subtraction
When a constant (K or H) is specified, it is automatically converted into binary floating point (real number)
when the instruction is executed.
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
S1
S2
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
" "
+1,
S2
FNC121
DESUB
S1
S2
FNC121
DESUB
+1, S1
S1
S2
+1,
S1
[ S1
] [ S2
[ S1
+1,
] or [ S2
+1, S1 ]
Binary floating point
+1, S2 ] [ D
+1,
+1,
S2
S1
], and the
].
+1, D
K2346
][ D
Automatically
converted into binary
floating point
+1, D
Caution
1. When the same device is specified
The same device number can be specified in [ S1 +1, S1 ],[ S2 +1, S2 ] and [ D +1, D ].
In this case, note that the subtraction result changes in every operation cycle when the continuous operation type
instruction (DESUB) is used.
506
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Outline
1. Instruction format
FNC 122
EMUL P
Operation Condition
Operation Condition
13 steps DEMUL
DEMULP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
14
Data Type
S1
Word device number storing binary floating point data used in multiplication
S2
Word device number storing binary floating point data used in multiplication
When a constant (K or H) is specified, it is automatically converted into binary floating point (real number)
when the instruction is executed.
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
Index
U \G
S1
S2
S2
S1
S2
S1
S2
Z Modify K
Real
CharacPointer
Number ter String
E
" "
17
S1
S1
S2
] [ S2
S1
S2
+1,
S1
] or [ S2
S2
S2
], and the
+1, S2
18
][ D
+1,
+1,
].
+1, D
19
[ S1
+1, S1 ]
Binary floating point
K100
][ D
Automatically
converted into binary
floating point
+1, D
FNC140-FNC149
Data
Operation 2
FNC122
DEMUL
+1, S1
[ S1
FNC110-FNC139
Floating Point
Command
input
+1,
FNC100-FNC109
Data
Transfer 2
16
FNC80-FNC89
External FX
Device
S1
Constant
15
FNC70-FNC79
External FX I/O
Device
3. Applicable devices
FMC60-FNC69
Handy
Instruction
*1.
Description
13
FNC50-FNC59
High-Speed
Processing
12
FNC40-FNC49
Data Operation
20
FNC150-FNC159
Positioning
Control
507
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Outline
This instruction executes division of two binary floating point.
For program examples of floating point operations, refer to Section 12.10.
For handling of floating point, refer to Subsection 5.1.3.
For flag operations, refer to Subsection 6.5.2.
1. Instruction format
FNC 123
D
P
EDIV
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DEDIV
DEDIVP
2. Set data
Operand Type
*1.
Description
Data Type
S1
Word device number storing binary floating point data used in division
S2
Word device number storing binary floating point data used in division
Data register number storing binary floating point data obtained by division
When a constant (K or H) is specified, it is automatically converted into binary floating point (real number)
when the instruction is executed.
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
S1
S2
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
" "
+1, S1
DEDIV
S2
508
FNC123
DEDIV
[ S1
+1, S1
Divisor
] [ S2
+1, S2 ]
Binary floating point
+1,
S1
] or [ S2
+1,
Dividend
S1
K100
[ S1
+1, S1
].
Dividend
S1
+1,
+1, S2
S2
[ D
+1, D
][
K100
Automatically
converted into binary
floating point
][ D
+1, D
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Outline
1. Instruction format
FNC 124
P
EXP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DEXP
DEXPP
2. Set data
Operand Type
Description
Data Type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
16
FNC124
DEXP
+1,
FNC80-FNC89
External FX
Device
].
17
FNC100-FNC109
Data
Transfer 2
+1
+1
18
An operation error occurs in the following case; The error flag M8067 turns ON, and the error code is stored in D8067.
FNC110-FNC139
Floating Point
15
FNC70-FNC79
External FX I/O
Device
Others
Special
Unit
14
FMC60-FNC69
Handy
Instruction
Head device number storing binary floating point data used in exponential operation.
13
FNC50-FNC59
High-Speed
Processing
Operation Condition
12
FNC40-FNC49
Data Operation
When the operation result is outside the following range (error code: K6706)
2126 | Operation result | < 2128
19
Error
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
509
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
In the program example shown below, the exponential operation is executed for a value set in the 2-digit BCD format
in X020 to X027, and the operation result is stored in the binary floating point format to D0 and D1 when X000 turns
ON.
X000
FNC 19
BIN
FNC224
LD >
D20
M0
K2X20
K88
D20
M0
FNC 49
FLT
D20
D10
FNC124
DEXP
D10
D0
END
[1]
Conversion
BCD value
Binary value
BIN
FLT
D11
D10
[3]
Exponential
operation
13
Binary floating point
(real number) value
EXP
D1
D0
442413.4
Binary floating point
(real number) value
Points
1)
The operation result becomes less than "2128" when the BCD value set in X020 to X027 is "88" or less because of
"loge2128 = 88.7".
If a value "89" or more is set, an operation error occurs. To prevent this operation error, when a value more than
"89" is set, M0 is set to ON so that the exponential operation is not executed.
2)
+1,
10X=
510
].
X
0.4342945
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Outline
1. Instruction format
FNC 125
LOGE P
Operation Condition
Operation Condition
9 steps DLOGE
DLOGEP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Data Type
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
Special
Unit
System User
Others
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
S
D
16
+1,
S
S
+1
S
S
.
D
+1
17
loge
Binary floating point
(real number)
+1,
18
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
FNC110-FNC139
Floating Point
Errors
FNC100-FNC109
Data
Transfer 2
FNC125
DLOGE
+1,
FNC80-FNC89
External FX
Device
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
14
FMC60-FNC69
Handy
Instruction
Description
Head device number storing binary floating point data used in the natural logarithm
operation
13
FNC50-FNC59
High-Speed
Processing
12
FNC40-FNC49
Data Operation
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
511
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
In the program example shown below, natural logarithm of "10" set in D50 is calculated, and stored to D30 and D31
when X000 turns ON.
X000
FNC 12
MOV
K10
D50
FNC 49
FLT
D50
D40
FNC125
DLOGE
D40
D30
END
[1]
10
MOV
512
FLT
D41
D40
[3] Logarithm
operation
10
Binary floating point
(real number) value
LOGE
D31
D30
2.302585
Binary floating point
(real number) value
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Outline
1. Instruction format
FNC 126
LOG10 P
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DLOG10
DLOG10P
2. Set data
Operand Type
Data Type
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
S
D
16
+1,
S
S
+1
.
D
+1
17
log10
Binary floating point
(real number)
+1,
18
An operation error occurs in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
FNC110-FNC139
Floating Point
Errors
FNC100-FNC109
Data
Transfer 2
FNC126
DLOG10
+1,
FNC80-FNC89
External FX
Device
15
FNC70-FNC79
External FX I/O
Device
Operand
Type
14
FMC60-FNC69
Handy
Instruction
Description
Head device number storing binary floating point data used in the common logarithm
operation
13
FNC50-FNC59
High-Speed
Processing
Operation Condition
12
FNC40-FNC49
Data Operation
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
513
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
In the program example shown below, common logarithm of "15" set in D50 is calculated, and stored to D30 and D31
when X000 turns ON.
X000
FNC 12
MOV
K15
D50
FNC 49
FLT
D50
D40
FNC126
DLOG10
D40
D30
END
[1]
10
MOV
514
FLT
D41
D40
[3] Logarithm
operation
15
Binary floating point
(real number) value
DLOG10
D31
D30
1.176091
Binary floating point
(real number) value
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Outline
1. Instruction format
FNC 127
ESQR P
Operation Condition
Operation Condition
9 steps DESQR
DESQRP
Continuous
Operation
Pulse (Single)
Operation
Data Type
Real number (binary)*1
14
2. Set data
Operand Type
Word device number storing binary floating point data whose square root is calculated
Data register number storing the square root of binary floating point data
When a constant (K or H) is specified, it is automatically converted into binary floating point (real number)
when the instruction is executed.
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
15
Others
Special
Unit
U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S1
S2
S1
S2
16
FNC80-FNC89
External FX
Device
FNC70-FNC79
External FX I/O
Device
Operand
Type
FMC60-FNC69
Handy
Instruction
*1.
Description
13
FNC50-FNC59
High-Speed
Processing
12
FNC40-FNC49
Data Operation
+1,
+1, S1
] is calculated (in the binary floating point operation), and the result is transferred
].
Command
input
FNC127
DESQR
[ S
+1, S
] [ D
+1, D
18
M8020
Zero flag
Description
Turns ON when the operation result is true "0".
FNC110-FNC139
Floating Point
Related device
Device
17
FNC100-FNC109
Data
Transfer 2
19
The contents of [ S1 +1, S1 ] are valid only when a positive value is set. When a negative value is set, the
operation error flag M8067 turns ON, and the instruction is not executed.
FNC140-FNC149
Data
Operation 2
Error
20
FNC150-FNC159
Positioning
Control
515
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Outline
This instruction inverts the sign of binary floating point (real number) data.
For handling of floating point, refer to Subsection 5.1.3.
1. Instruction format
FNC 128
ENEG P
Operation Condition
Operation Condition
5 steps DENEG
DENEGP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
Head device number storing binary floating data whose sign is to be inverted
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
+1,
+1,
].
Command
input
FNC128
DENEG
Program example
In the program example shown below, the sign of floating point data stored in D100 and D101 is inverted, and the
negation result is stored to D100 and D101 when X000 turns ON.
X000
FNC128
DENEGP
D100
END
D101
D100
1.2345
516
D101
D100
1.2345
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Outline
1. Instruction format
16-bit Instruction
5 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
INT
INTP
13
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DINT
DINTP
FNC50-FNC59
High-Speed
Processing
FNC 129
D
P
INT
2. Set data
Operand Type
14
Data Type
Data register number storing binary floating point data to be converted into a binary
integer
Bit Devices
Word Devices
Digit Specification
System User
C D
15
Others
Special
Unit
U \G
S1
S2
S1
S2
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
16
FNC80-FNC89
External FX
Device
17
FNC129
INT
+1,
S +1, S
Binary floating
point
FNC100-FNC109
Data
Transfer 2
D
16-bit binary integer
The decimal part is cut.
+1,
+1,
].
FNC129
DINT
+1, S
S
Binary floating
point
19
FNC140-FNC149
Data
Operation 2
Command
input
18
FNC110-FNC139
Floating Point
FNC70-FNC79
External FX I/O
Device
System User
FMC60-FNC69
Handy
Instruction
Description
3. Applicable devices
Operand
Type
12
FNC40-FNC49
Data Operation
This instruction converts binary floating point data into a binary integer which is a normal data format inside PLCs
(binary floating point binary integer).
For program examples of floating point operations, refer to Section 12.10.
For handling of floating point, refer to Subsection 5.1.3.
D +1, D
32-bit binary integer
The decimal part is cut.
517
20
FNC150-FNC159
Positioning
Control
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related devices
For the methods of zero, borrow and carry flags, refer to Subsection 6.5.2.
Device
Name
M8020
Zero flag
M8021
Borrow flag
M8022
Carry flag
Description
Turns ON when the operation result is 0
Turns ON when the conversion result is cut in the decimal part.
Turns ON when the operation result is outside the range from 32768 to 32767
(in 16-bit operation) or from 2,147,483,583 to 2,147,483,583 (in 32-bit operation) and overflow
occurs. (The operation result is not reflected.)
Caution
1. Caution in the operation
Values after the decimal point are rounded.
518
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Outline
1. Instruction format
FNC 130
P
SIN
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DSIN
DSINP
Description
Data Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
+1,
].
FNC130
DSIN
+1
+1
Sine value
Binary floating point
17
FNC100-FNC109
Data
Transfer 2
18
Program example
X002
M8000
K 45
D 0
(K45) (D 0)
FNC 12
MOVP
K 90
D 0
(K90) (D 0)
FNC 49
FLTP
D0
D 4
FNC123
DEDIV
FNC122
DEMUL
K31415926 K1800000000
D 4
FNC130
DSIN
D 30
D 30
19
20
D
D100
FNC150-FNC159
Positioning
Control
D 20
D 20
FNC140-FNC149
Data
Operation 2
RUN
monitor
FNC 12
MOVP
FNC110-FNC139
Floating Point
X001
16
FNC80-FNC89
External FX
Device
+1,
15
FNC70-FNC79
External FX I/O
Device
to [ D
14
FMC60-FNC69
Handy
Instruction
3. Applicable devices
Operand
Type
13
FNC50-FNC59
High-Speed
Processing
2. Set data
Operand Type
12
FNC40-FNC49
Data Operation
519
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Outline
This instruction obtains the cosine value of an angle (in radians).
For handling of floating point, refer to Subsection 5.1.3.
1. Instruction format
FNC 131
P
COS
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DCOS
DCOSP
2. Set data
Operand Type
Description
Data Type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
+1,
Command
input
FNC131
DCOS
520
+1,
].
+1
+1
Cosine value
Binary floating point
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Outline
1. Instruction format
FNC 132
P
TAN
Operation Condition
Operation Condition
2. Set data
Operand Type
Description
Data Type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
16
+1,
FNC132
DTAN
+1,
].
+1
+1
Tangent value
Binary floating point
18
FNC110-FNC139
Floating Point
17
FNC100-FNC109
Data
Transfer 2
FNC80-FNC89
External FX
Device
15
FNC70-FNC79
External FX I/O
Device
Others
Special
Unit
14
FMC60-FNC69
Handy
Instruction
13
FNC50-FNC59
High-Speed
Processing
Continuous
Operation
Pulse (Single)
Operation
9 steps DTAN
DTANP
12
FNC40-FNC49
Data Operation
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
521
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Outline
This instruction executes SIN1 (arc sine) operation.
For handling of floating point, refer to Subsection 5.1.3.
1. Instruction format
FNC 133
P
ASIN
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DASIN
DASINP
2. Set data
Operand Type
Description
Data Type
SIN1
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
+1,
" "
S
D
FNC133
DASIN
+1
+1,
], and stored to [ D
].
+1
SIN1
Binary floating point
(real number)
+1,
The angle (operation result) stored in [ D +1, D ] is expressed in radians (from /2 to /2).
For conversion between radians and degrees, refer to the RAD (FNC136) and DEG (FNC137) instructions.
For the RAD (FNC136) instruction, refer to Section 18.24.
For the DEG (FNC137) instruction, refer to Section 18.25.
Error
An operation error is caused in the following case; The error flag M8067 turns ON, and the error code is stored in
D8067.
When a value specified in
522
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
In the program example shown below, the SIN1 value of data (binary floating point) stored in D0 and D1 is calculated,
and the angle is output in 4-digit BCD to Y040 to Y057 when X000 turns ON.
X000
FNC133
DASIN
D0
D10
12
D20
FNC129
INT
D20
D30
FNC 18
BCD
D30
K4Y40
END
D0
0.5
Binary floating point
(real number) value
D20
30
Binary floating point
(real number) value
[3]
Conversion
into binary
INT
D11
D10
0.5235988
Binary floating point
(real number) value
[2] Conversion into degrees
DDEG
D30
b15
b0
30
Binary
value
[4] BCD
operation
BCD
15
FNC70-FNC79
External FX I/O
Device
D21
DASIN
14
FMC60-FNC69
Handy
Instruction
D1
13
FNC50-FNC59
High-Speed
Processing
D10
FNC40-FNC49
Data Operation
FNC137
DDEG
[1]
Conversion
by SIN1
operation
FNC30-FNC39
Rotation and
Shift
Program example
Y057 Y040
0 0 3 0
BCD
value
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
523
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Outline
This instruction executes COS1 (arc cosine) operation.
For handling of floating point, refer to Subsection 5.1.3.
1. Instruction format
FNC 134
ACOS P
Operation Condition
Operation Condition
9 steps DACOS
DACOSP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
COS1
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
S
D
FNC134
DACOS
+1
+1,
], and stored to [ D
+1,
].
+1
COS1
Binary floating point
(real number)
+1,
Error
An operation error is caused in the following case; The error flag M8067 turns ON, and the error code is stored in
D8067.
When a value specified in
524
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
In the program example shown below, the COS1 value of data (binary floating point) stored in D0 and D1 is
calculated, and the angle is output in 4-digit BCD to Y040 to Y057 when X000 turns ON.
X000
FNC134
DACOS
D0
D10
12
D20
FNC129
INT
D20
D30
FNC 18
BCD
D30
K4Y40
END
D0
0.5
Binary floating point
(real number) value
D20
60
Binary floating point
(real number) value
[3]
Conversion
into binary
INT
D11
D10
1.047198
Binary floating point
(real number) value
[2] Conversion into degrees
DDEG
D30
b15
b0
60
Binary
value
[4] BCD
operation
BCD
15
FNC70-FNC79
External FX I/O
Device
D21
DACOS
14
FMC60-FNC69
Handy
Instruction
D1
13
FNC50-FNC59
High-Speed
Processing
D10
FNC40-FNC49
Data Operation
FNC137
DDEG
[1]
Conversion
by COS1
operation
FNC30-FNC39
Rotation and
Shift
Program example
Y057 Y040
0 0 6 0
BCD
value
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
525
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Outline
This instruction executes the TAN1 (arc tangent) operation.
For handling of floating point, refer to Subsection 5.1.3.
1. Instruction format
FNC 135
ATAN P
Operation Condition
Operation Condition
9 steps DATAN
DATANP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
TAN1
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S
D
FNC135
DATAN
+1
+1,
], and stored to [ D
+1,
].
+1
TAN1
Binary floating point
(real number)
The angle (operation result) stored in [ D +1, D ] is expressed in radians (from /2 to +/2).
For conversion between radians and degrees, refer to RAD (FNC136) and DEG (FNC137) instructions.
For RAD (FNC136) instruction, refer to Section 18.24.
For DEG (FNC137) instruction, refer to Section 18.25.
526
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
In the program example shown below, the TAN1 value of data (binary floating point) stored in D0 and D1 is
calculated, and the angle is output in 4-digit BCD to Y040 to Y057 when X000 turns ON.
X000
FNC135
DATAN
D0
D10
12
D20
FNC129
INT
D20
D30
FNC 18
BCD
D30
K4Y40
END
D0
1
Binary floating point
(real number) value
D20
45
Binary floating point
(real number) value
[3]
Conversion
into binary
INT
D11
D10
0.785398
Binary floating point
(real number) value
[2] Conversion into degrees
DDEG
D30
b15
b0
45
Binary
value
[4] BCD
operation
BCD
15
FNC70-FNC79
External FX I/O
Device
D21
DATAN
14
FMC60-FNC69
Handy
Instruction
D1
13
FNC50-FNC59
High-Speed
Processing
D10
FNC40-FNC49
Data Operation
FNC137
DDEG
[1]
Conversion
by TAN1
operation
FNC30-FNC39
Rotation and
Shift
Program example
Y057 Y040
0 0 4 5
BCD
value
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
527
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Outline
This instruction converts a value in degrees into a value in radians.
For handling of floating point, refer to Subsection 5.1.3.
1. Instruction format
FNC 136
P
RAD
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DRAD
DRADP
2. Set data
Operand Type
Description
Data Type
Head device number storing a value in degrees to be converted into a value in radians
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
+1,
] is converted from degrees into radians, and the operation result is stored to [ D
].
DRAD
+1
+1
rad
Binary floating point
(real number)
528
180
+1,
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
In the program example shown below, a 4-digit BCD value set in degrees in X020 to X037 is converted into a binary
floating point value in radians, and stored to D20 and D21 when X000 turns ON.
X000
FNC 19
BIN
K4X20
D0
12
D0
D10
FNC136
DRAD
D10
D20
13
FNC50-FNC59
High-Speed
Processing
D11
D10
[3]
Conversion
into radians
120
FLT
D21
D20
2.094395 ...
DRAD
14
FMC60-FNC69
Handy
Instruction
b15
120
Binary
value
FNC40-FNC49
Data Operation
FNC 49
FLT
END
[1]
Conversion
X037 X020 into binary
0 1 2 0
BCD
BIN
value
FNC30-FNC39
Rotation and
Shift
Program example
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
529
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Outline
This instruction converts a value in radians into a value in degrees.
For handling of floating point, refer to Subsection 5.1.3.
1. Instruction format
FNC 137
D
P
DEG
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DDEG
DDEGP
2. Set data
Operand Type
Description
Data Type
Head device number storing a value in radians to be converted into a value in degrees
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
Constant
Index
C D R U \G
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S
D
+1,
] is converted from radians into degrees, and the operation result is stored to [ D
+1
FNC137
DDEG
+1
+1,
rad
Binary floating point
(real number)
180
Program example
In the program example shown below, a binary floating point value set in radians in D20 and D21 is converted into a
BCD value in degrees, and stored to Y040 and Y057 when X000 turns ON.
X000
A value in radians is converted into a value in
FNC137
D20
D10
degrees ([1]).
DDEG
FNC129
INT
D10
D0
FNC 18
BCD
D0
K4Y40
END
D21
D20
1.435792
Binary floating point
value (real number)
530
[1]
Conversion
into degrees
DDEG
D11
D10
82.26482
Binary floating point
value (real number)
[2]
Conversion
into binary
value
INT
D0
b15
[3]
Conversion
b0 into BCD
82
Binary
value
BCD
Y057 Y040
0 0 8 2
BCD
value
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
Symbol
Function
Reference
140
WSUM
WSUM S D n
Section 19.1
141
WTOB
WTOB S D n
WORD to BYTE
Section 19.2
142
BTOW
BTOW S D n
BYTE to WORD
Section 19.3
143
UNI
UNI
S D n
Section 19.4
144
DIS
DIS
S D n
Section 19.5
145
146
147
SWAP
148
149
SORT2
13
14
FMC60-FNC69
Handy
Instruction
Mnemonic
FNC50-FNC59
High-Speed
Processing
FNC No.
12
FNC40-FNC49
Data Operation
FNC140 to FNC149 provide instructions for executing complicated processing for fundamental applied instructions
and for executing special processing.
15
Byte Swap
Section 19.6
FNC70-FNC79
External FX I/O
Device
SWAP S
16
Sort Tabulated Data 2
Section 19.7
FNC80-FNC89
External FX
Device
SORT2 S m1 m2 D n
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
531
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
19.1
Outline
This instruction calculates the sum of consecutive 16-bit or 32-bit data.
When calculating the addition data (sum value) in units of byte (8 bits), use the CCD (FNC 84) instruction.
For CCD (FNC 84) instruction, refer to Section 16.5.
1. Instruction format
FNC 140
WSUM P
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
WSUM
WSUMP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DWSUM
DWSUMP
2. Set data
Operand type
Description
Data type
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
" "
S
D
n
FNC140
WSUM
S
K4444
K3333
K1234
K-5426
K326
K10000
+0
+1
+2
+3
+4
+5
+1,
].
Sum of
"n" data
"n"
points
(n = 6)
[
D
+1, D ]
K13911
Command
input
[
[
[
[
532
+1,
+3,
].
FNC140
DWSUM
[ S +1, S ]
S +3, S +2]
S +5, S +4]
S +7, S +6]
S +9, S +8]
K32767000
K6000
K35392000
K-11870000
K12345000
"n"
points
(n = 5)
Sum of
"n" data
[ D
+2,
+1,
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Instruction
FNC30-FNC39
Rotation and
Shift
Related instruction
Description
Check code
Calculates the sum of 16-bit data in units of byte (8 bits) and the horizontal parity.
12
Caution
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DWSUM D0 D100 R0", "n" is [R1, R0].
13
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
S
14
FMC60-FNC69
Handy
Instruction
When
Program example
In the program shown below, the sum of 16-bit data stored in D10 to D14 is stored in [D101, D100].
X010
D10
D100
K5
END
D10
D11
D12
D13
D14
K4500
K2500
K-3276
K6780
K4444
15
WSUMP
instruction [D101,D100]
K14948
FNC70-FNC79
External FX I/O
Device
FNC140
WSUMP
FNC50-FNC59
High-Speed
Processing
Errors
FNC40-FNC49
Data Operation
In the 32-bit operation, the acquired sum is 64-bit data. FX3U and FX3UC PLCs cannot handle 64-bit data. When the
sum is within the numeric range of 32-bit data (K-2,147,483,648 to K2,147,483,647), however, FX3U and FX3UC
PLCs can handle the low-order 32 bits of 32-bit data as the sum while ignoring the high-order 32 bits.
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
533
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
19.2
Outline
This instruction separates consecutive 16-bit data in byte units (8 bits).
1. Instruction format
FNC 141
WTOB P
16-bit Instruction
7 steps
Mnemonic
Operation Condition
WTOB
WTOBP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
16-bit binary
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Constant
Index
V
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S
D
n
and later is separated into "n" bytes, and stored in "n" devices starting from
as shown below.
Command
input
b15
FNC141
WTOBP
b8 b7
S +0 High-order byte
+1 High-order byte
High-order byte
n
b15
b0
Low-order byte
Low-order byte
...
...
*1
+n/2
Low-order byte
D +0
b8 b7
00H
00H
00H
00H
+1
+2
+3
2)
534
"n" bytes
...
...
b0
Low-order byte
High-order byte
Low-order byte
High-order byte
00H
00H
+n-2
+n-1
Low-order byte
High-order byte
"00H" is stored.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
When "n" is an odd number, only the low-order byte (8 bits) of the final separation source device is regarded as
the target data as shown in the figure below.
For example, when "n" is "5", the data from
b15
S
+2 is stored in
to
+4.
b8 b7
12H
56H
FEH
b0
b15
39H
78H
DCH
+0
+1
+2
+3
+4
It is ignored when
"n" is "5".
b8 b7
b0
00H
00H
00H
00H
00H
12
39H
12H
78H
56H
DCH
When "n"
is "5"
"00H" is stored.
13
FNC50-FNC59
High-Speed
Processing
Related instruction
Instruction
BTOW (FNC142)
Description
Combines the low-order 8 bits (low-order byte) of consecutive 16-bit data.
14
Caution
b15
b8 b7
32H
34H
36H
b15
b0
31H
33H
35H
=D12
D13
D14
D15
D16
b8 b7
00H
00H
00H
00H
00H
b0
31H
32H
33H
34H
35H
When "n"
is "5"
"00H" is stored.
15
FNC70-FNC79
External FX I/O
Device
=D12
D13
D14
FMC60-FNC69
Handy
Instruction
Devices storing the separation source data can overlap devices storing the separated data.
When "n" is an odd number, however, the high-order byte (8 bits) of the final separation source device is overwritten
and erased.
S
FNC40-FNC49
Data Operation
+0
+1
+2
FNC30-FNC39
Rotation and
Shift
3)
16
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the separation source devices S
to S +n/2 are outside the specified device range (error code:
K6706)
When "n" is an odd number, the number of a rounded up value decides the number of devices. (error code: K6706)
D
to
Program example
END
b15
b8 b7
FDH
57H
34H
b15
b0
58H
E2H
44H
D20
D21
D22
D23
D24
D25
b8 b7
00H
00H
00H
00H
00H
00H
b0
58H
FDH
E2H
57H
44H
34H
19
FNC140-FNC149
Data
Operation 2
D10
D11
D12
18
FNC110-FNC139
Floating Point
In the program shown below, the data stored in D10 to D12 is separated in byte units, and stored in D20 to D25.
X000
FNC141
D10
D20
K6
WTOBP
17
FNC100-FNC109
Data
Transfer 2
FNC80-FNC89
External FX
Device
Errors
6 bytes
20
"00H" is stored.
FNC150-FNC159
Positioning
Control
535
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
19.3
Outline
This instruction combines the low-order 8 bits (low-order byte) of consecutive 16-bit data.
1. Instruction format
FNC 142
BTOW P
16-bit Instruction
7 steps
Mnemonic
Operation Condition
BTOW
BTOWP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Special
Unit
System User
Others
Index
C D R U \G
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
S
D
n
as shown below.
Command
input
FNC142
BTOWP
b15
b8 b7
S +0
n
b15
b0
1st byte data
2nd byte data
3rd byte data
D +0
+1
"n"th byte
"n-1"th byte
2)
3)
When "n" is an odd number, "00H" is stored in the high-order byte (8 bits) of the final one among the combination
result destination devices as shown below.
For example, when "n" is "5", the low-order byte (8 bits) of S
to S +4 is stored in D
to D +2, and
"00H" is stored in the high-order byte (8 bits) of
b15
S
When
"n" is
"5"
+0
+1
+2
+3
+4
b8 b7
ABH
CDH
EFH
ABH
CDH
+2.
b15
b0
12H
34H
56H
78H
9AH
4)
536
b0
1st byte
3rd byte
...
...
...
*1
+n/2
+n-1
b8 b7
2nd byte
4th byte
...
+1
+2
"n"
bytes
+0
+1
+2
b8 b7
34H
78H
00H
When "n" is "5",
"00H" is stored.
b0
12H
56H
9AH
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Instruction
FNC30-FNC39
Rotation and
Shift
Related instruction
Description
WTOB (FNC141)
Caution
b15
S
b8 b7
b0
ABH
CDH
EFH
ABH
CDH
EFH
b15
12H
34H
56H
78H
9AH
BCH
=D10
D11
D12
D13
D14
D15
D16
b8 b7
34H
78H
BCH
EFH
ABH
CDH
EFH
b0
13
12H
56H
9AH
56H
78H
9AH
BCH
FNC50-FNC59
High-Speed
Processing
When
"n" is
"6"
=D11
D12
D13
D14
D15
D16
14
It is not changed.
FMC60-FNC69
Handy
Instruction
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
S
to
In the program shown below, the low-order byte (8 bits) data stored in D20 to D25 is combined, and stored in D10 to
D12.
X000
FNC142
BTOWP
D20
D10
17
K6
FNC100-FNC109
Data
Transfer 2
END
b15
b8 b7
00H
31H
36H
44H
48H
49H
b0
78H
12H
49H
55H
67H
31H
b15
D10
D11
D12
b8 b7
12H
55H
31H
b0
78H
49H
67H
18
FNC110-FNC139
Floating Point
D20
D21
6 bytes D22
D23
D24
D25
16
FNC80-FNC89
External FX
Device
Program example
15
FNC70-FNC79
External FX I/O
Device
12
FNC40-FNC49
Data Operation
Devices storing the combination source data may be equivalent to devices storing the combined data.
After combination, however, the high-order byte (8 bits) of the combination source data stored in the devices used for
the combination destination data is erased and overwritten with the data acquired by combining the high-order byte (8
bits).
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
537
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
19.4
Outline
This instruction combines the low-order 4 bits of consecutive 16-bit data.
1. Instruction format
FNC 143
P
UNI
16-bit Instruction
7 steps
Mnemonic
Operation Condition
UNI
UNIP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
16-bit binary
Number of data to be combined (0 to 4, When "n" is "0", UNI instruction is not executed.)
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Special
Unit
System User
Others
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
D
n
"n"
points
FNC143
UNIP
b15
+0
1
2
3
3)
as shown below.
b15
b12b11
b8 b7
b4 b3
b0
Combined data
to
high-order 4 bits of
b15
+0
+1
+2
b4 b3
b0
Low-order 4 bits
Low-order 4 bits
Low-order 4 bits
Ignored
538
b4 b3
b0
Low-order 4 bits
Low-order 4 bits
Low-order 4 bits
Low-order 4 bits
Ignored
2)
Combined data
b15
D
b12b11
0 0 0 0
b8 b7
b4 b3
b0
, and the
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Instruction
FNC30-FNC39
Rotation and
Shift
Related instruction
Description
DIS (FNC144)
Errors
When
to
When "n" is outside the range from "0 to 4" (error code: K6706)
13
Program example
FNC143
UNIP
D0
D10
FNC50-FNC59
High-Speed
Processing
In the program below, the low-order 4 bits of D0 to D2 are combined and stored in D10 when X000 turns ON.
X000
K3
END
14
FMC60-FNC69
Handy
Instruction
b15
b4 b3
b0
D0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
b15
b12b11
b4 b3
b0
D10 0 0 0 0 1 0 0 1 0 1 0 1 0 0 0 1
D1 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
D2 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
15
Because "n" is "K3",
they are set to "0".
FNC70-FNC79
External FX I/O
Device
Combined data
12
FNC40-FNC49
Data Operation
An operation error occurs in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
539
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
19.5
Outline
This instruction separates 16-bit data into 4 bit units.
1. Instruction format
FNC 144
P
DIS
Mnemonic
16-bit Instruction
Operation Condition
DIS
7 steps
DISP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand type
Description
Data type
16-bit binary
Number of data to be separated (0 to 4) (When "n" is "0", DIS instruction is not executed.)
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
Index
C D R U \G
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
S
D
n
b15
FNC144
DISP
b12b11
b4 b3
b0
b15
+0
+1
+2
+3
as shown below.
b4 b3
b0
Low-order 4 bits
Low-order 4 bits "n"
Low-order 4 bits points
Low-order 4 bits
2)
3)
Related instruction
Instruction
UNI (FNC143)
540
Description
Combines low-order 4 bits of 16-bit data.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
An operation error occurs in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When
to
When "n" is outside the range from "0 to 4" (error code: K6706)
12
FNC40-FNC49
Data Operation
Program example
In the program below, D0 is separated into 4 bit units and stored in D10 to D13 when X000 turns ON.
X000
FNC144
DISP
D0
D10
FNC30-FNC39
Rotation and
Shift
Errors
K4
13
b15
b12b11
b8 b7
b4 b3
b0
D10 1 1 0 0 1 0 0 1 0 1 0 1 0 0 0 1
FNC50-FNC59
High-Speed
Processing
END
b15
b4 b3 b2 b1 b0
D10 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
14
D11 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
D13 0 0 0 0 0 0 0 0 0 0 0 0 1 1 0 0
They are set to "0".
Data storage
area
FMC60-FNC69
Handy
Instruction
D12 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
541
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
19.6
Outline
This instruction swaps the high-order 8 bits and low-order 8 bits of a word device.
1. Instruction format
FNC 147
D SWAP P
16-bit Instruction
3 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
SWAP
SWAPP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
5 steps DSWAP
DSWAPP
2. Set data
Operand type
SS1
Description
Data type
Word device whose high-order 8 bits and low-order 8 bits are swapped for each other
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
SS1
S
FNC147
SWAPP
High-order 8 bits
Low-order 8 bits
S
FNC147
DSWAPP
+1
S
, High-order 8 bits Low-order 8 bits
Caution
When the continuous operation type instruction is used, swapping is executed in each operation cycle.
This instruction works in the same way as the extension function of the XCH (FNC 17) instruction.
542
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
19.7
Outline
13
1. Instruction format
16-bit Instruction
11 steps
Mnemonic
Operation Condition
Continuous
Operation
SORT
21 steps
Operation Condition
Continuous
Operation
DSORT2
14
Operand type
Description
FMC60-FNC69
Handy
Instruction
2. Set data
Data type
Head device number storing the data table [which occupies m1 m2 points]
S
m1
m2
Column number of group data (column) used as the basis of sorting [1 to m2]
Bit Devices
Word Devices
System User
Digit Specification
System User
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S
m1
m2
16
FNC80-FNC89
External FX
Device
Others
Special
Unit
15
FNC70-FNC79
External FX I/O
Device
Head device number storing the operation result [which occupies m1 m2 points]
3. Applicable devices
Operand
Type
FNC50-FNC59
High-Speed
Processing
FNC 149
SORT2
12
FNC40-FNC49
Data Operation
This instruction sorts a data table consisting of data (lines) and group data (columns) based on a specified group data
(column) sorted by line in either ascending or descending order. This instruction stores the data (lines) in serial
devices facilitating the addition of data (lines).
On the other hand, the SORT (FNC 69) instruction stores the group data (columns) in serial devices, and sorts a table
in ascending order only.
For SORT (FNC 69) instruction, refer to Section 14.10.
17
FNC100-FNC109
Data
Transfer 2
x m2 points) from
.
For operation examples, refer to Page 545.
Command
input
FNC149
SORT2
m1
m2
19
FNC140-FNC149
Data
Operation 2
18
FNC110-FNC139
Floating Point
20
FNC150-FNC159
Positioning
Control
543
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
The data table configuration is explained in an example in which the sorting source data table has 3 lines and 4
columns (m1 = K3, m2 = K4). For the sorting result data table, understand
Column No.
Line No.
Control number
Height
Weight
Age
Number of
data
m1 =K3
as
+1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
Descending order
M8165=OFF
Ascending order
When the command input turns ON, data sorting is started. Data sorting is completed after "m1" scans, and the
instruction execution complete flag M8029 is set to ON.
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
+1,
].
For operation examples, refer to next page.
Command
input
FNC149
DSORT2
m1
m2
The data table configuration is explained in an example in which the sorting source data table has 3 lines and 4
columns (m1 = K3, m2 = K4). For the sorting result data table, understand
Column No.
Line No.
Number of
data
m1 =K3
Control number
Height
Weight
Age
2
3
as
[
[
S
S
+1,
+3,
+2]
+5,
+4]
+7,
+6]
+9,
+8]
+11,
+10]
+13,
+12]
+15,
+14]
+17,
+16]
+19,
+18]
+21,
+20]
+23,
+22]
Descending order
M8165=OFF
Ascending order
When a data register D or extension register (R) is used for "m1", the data length is 32 bits.
For example, when "m1" is specified in D0, "m1" is 32-bit data stored in [D1, D0].
When the command input turns ON, data sorting is started. Data sorting is completed after "m1" scans, and the
instruction execution complete flag M8029 is set to ON.
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
544
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
When the instruction is executed with "n = K2 (column No. 2)" and "n = K3 (column No. 3)" for the following sorting
source data, the operations shown below result.
The operation examples below indicate 16-bit operations. In the case of 32-bit operation, construct the data table with
32-bit binary data.
It is recommended to put a serial number such as a control number in the first column so that the original line number
can be estimated based on the contents.
Line No.
Control number
Height
Weight
Age
2
Number of
data
m1 =K5
1)
150
+4
+8
+5
+9
+13
+6
+14
150
+7
+11
14
30
20
+17
13
+3
40
+10
S
20
70
100
+16
+2
50
160
+12
S
45
180
+1
+15
8
+18
50
+19
45
15
Column No.
Weight
Age
100
+4
+8
+5
+12
+9
+16
+13
8
+6
+10
+17
+14
+11
45
70
180
D
20
50
160
+2
45
150
D
20
150
+1
+15
17
30
+18
50
FNC100-FNC109
Data
Transfer 2
16
2
Height
FNC80-FNC89
External FX
Device
+7
1
Control number
+3
FNC70-FNC79
External FX I/O
Device
Sorting result when the instruction is executed with "n = K2 (column No. 2)"
(in the case of ascending order)
Line No.
2)
FMC60-FNC69
Handy
Instruction
FNC50-FNC59
High-Speed
Processing
+19
40
Sorting result when the instruction is executed with "n = K3 (column No. 3)"
(in the case of descending order)
Column No.
Control number
Height
Weight
Age
160
+4
+8
+5
+12
+16
+9
+13
150
+17
100
+2
+6
+10
20
+7
19
+11
45
+14
+18
45
+3
40
50
D
30
50
150
D
70
180
+1
FNC140-FNC149
Data
Operation 2
18
FNC110-FNC139
Floating Point
Line No.
12
FNC40-FNC49
Data Operation
FNC30-FNC39
Rotation and
Shift
3. Operation examples
+15
20
+19
20
FNC150-FNC159
Positioning
Control
545
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Device
Name
M8029
Description
M8165
Descending order
Related instruction
Instruction
Description
Cautions
Do not change the contents of operands and data during operation.
To execute SORT2 instruction again, set the command input to OFF once, then ON again.
Limitation in number of SORT2 instructions
Up to two SORT2 instructions can be simultaneously driven in a program.
Writing during RUN is disabled for a circuit block including SORT2 instruction.
When the same device is specified in S and D
The source data is overwritten with the data acquired by sorting.
Pay close attention not to change the contents of
Ensure that the sorted data does not overlap with the source data.
D10
D2
D30
D10
D30
Source Data
Source Data
D22
D20
Sorted Data
D10
D40
Sorted Data
D10
D30
Source Data
D30
Source Data
D10
D30
D35
Sorted Data
D55
Sorted Data
D50
D70
Source Data
D20
D40
Sorted Data
Note that the 32-bit values [m1+1, m1] and [n+1, n] are valid when D or R is specified as "m1" or "n" in a 32-bit
instruction.
In the case of "DSORT2 D0 D50 K4 D100 R0", "m1" is [D51, D50], and "n" is [R1, R0].
546
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
FNC No.
Mnemonic
Symbol
Function
150
DSZR
DSZR S1 S2 D1 D2
Section 20.1
151
DVIT
DVIT
Interrupt Positioning
Section 20.2
152
TBL
Section 20.3
153
154
155
ABS
156
ZRN
157
PLSV
158
DRVI
159
DRVA
TBL
D n
13
Section 20.5
Section 20.6
DRVI S1 S2 D1 D2
Drive to Increment
Section 20.7
DRVA S1 S2 D1 D2
Drive to Absolute
Section 20.8
S1 S2 S3 D
PLSV
S D1 D2
Target instruction
DSZR (FNC150)
FNC110-FNC139
Floating Point
19
TBL (FNC152)
ZRN (FNC156)
PLSV (FNC157)
DRVA (FNC159)
FNC140-FNC149
Data
Operation 2
DRVI (FNC158)
18
DVIT (FNC151)
17
FNC100-FNC109
Data
Transfer 2
During RUN, avoid writing while any positioning control instruction (FNC150, FNC151, or FNC156 to
FNC159) is executed (that is, while pulses are output).
If program write is executed during RUN to a circuit block including a target instruction below while pulses are being
output, the PLC executes the operation shown below.
16
FNC80-FNC89
External FX
Device
Zero Return
ZRN
15
FNC70-FNC79
External FX I/O
Device
Section 20.4
S D1 D2
14
FMC60-FNC69
Handy
Instruction
ABS
FNC50-FNC59
High-Speed
Processing
S1 S2 D1 D2
Reference
12
FNC40-FNC49
Data Operation
FNC150 to FNC159 provide positioning instructions using the built-in pulse output function of the PLC.
For details, refer to the Positioning Control Edition manual.
20
FNC150-FNC159
Positioning
Control
547
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
20.1
Outline
This instruction executes a zero return, and aligns the mechanical position with a present value register inside the
PLC.
In addition, this instruction enables the following functions not supported by the ZRN (FNC156) instruction:
DOG search function
Zero return by the near-point (dog) signal and zero-phase signal
It is not possible, however, to count the zero-phase signal and then determine the zero point.
For explanation of the instruction, refer to the Positioning Control Edition manual.
For cautions on using special high-speed output adapters,
refer to the Positioning Control Edition manual.
1. Instruction format
FNC 150
DSZR
16-bit Instruction
9 steps
Mnemonic
Operation Condition
Continuous
Operation
DSZR
Operation Condition
2. Set data
Operand type
Description
Data type
S1
S2
D1
D2
Bit
3. Applicable devices
Operand
Type
Bit Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S1
S1
S2
Word Devices
S
2
D1
S
3
D2
S
4
S1
S1 : "D .b" is available only in FX3U/FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2 : In the case of FX3G/FX3GC/FX3U/FX3UC PLCs, specify X000 to X007.
In the case of FX3S PLC, specify X000 to X005.
S3 : Specify Y000, Y001 or Y002*1 transistor output from the main unit, or specify Y000, Y001, Y002*3 or Y003*3
from a high-speed output special adapter*2.
*1.
Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLCs.
*2.
*3.
To use Y002 and Y003 with a high-speed output special adapter, connected a second high-speed output
special adapter.
Points
When using a relay output type or triac output type FX3U PLC, a special high-speed output adapter is required.
Outputs of special high-speed output adapters work as differential line drivers.
548
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
D1
=Y000
D2
=Y004
D1
=Y001
D2
=Y005
D1
=Y002
D2
=Y006
D1
=Y003
D2
=Y007
12
FNC40-FNC49
Data Operation
Pulse output
13
S1
S2
D1
FNC50-FNC59
High-Speed
Processing
Command
input
FNC150
D2
Applicable version
FX3G
FX3GC
FX3U
FX3UC
Item
Outline of function
16
FNC80-FNC89
External FX
Device
15
FNC70-FNC79
External FX I/O
Device
The function of FNC150 instruction is changed depending on the version as shown in the table below.
For explanation of the instruction and the contents of function change,
refer to the Positioning Control Edition.
14
FMC60-FNC69
Handy
Instruction
During RUN, avoid writing while the DSZR (FNC150) instruction is executed (that is, while a pulse is output).
Note that if writing is executed during RUN to a circuit block including the FNC150 instruction while pulses are output,
the PLC decelerates and stops pulse output.
FX3S
FNC30-FNC39
Rotation and
Shift
S4 : When using a special high-speed output adapter for the pulse output destination in an FX3U PLC, the rotation
direction signal must be used by the following table output.
When using a built-in transistor output for the pulse output destination in an FX3S/FX3G/FX3GC/FX3U/FX3UC
PLCs, the rotation direction signal must use transistor output.
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
549
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
20.2
Outline
This instruction executes one-speed interrupt constant quantity feed.
For explanation of the instruction, refer to the Positioning Control Edition manual.
For cautions on using special high-speed output adapters,
refer to the Positioning Control Edition manual.
1. Instruction format
FNC 151
DVIT
16-bit Instruction
9 steps
Mnemonic
Operation Condition
32-bit Instruction
Continuous
Operation
DVIT
17 steps
Mnemonic
Operation Condition
Continuous
Operation
DDVIT
2. Set data
Operand type
Description
Data type
interrupt*1
S1
S2
D1
D2
*1.
*2.
Bit
Setting range
FX3U PLC
10 to 200,000 (Hz)
FX3U/FX3UC PLC
10 to 100,000 (Hz)
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S1
S2
D1
S
1
D2
S
2
S3
S1 : Specify Y000, Y001 or Y002 transistor output from the main unit, or specify Y000, Y001, Y002*4 or Y003*4 from
a high-speed output special adapter*3.
*3.
*4.
To use Y002 and Y003 with a high-speed output special adapter, connected a second high-speed output
special adapter.
Points
When using a relay output type or triac output type FX3U PLC, a special high-speed output adapter is required.
Outputs of special high-speed output adapters work as differential line drivers.
550
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
D1
=Y000
D2
=Y004
D1
=Y001
D2
=Y005
D1
=Y002
D2
=Y006
D1
=Y003
D2
=Y007
12
FNC40-FNC49
Data Operation
Pulse output
13
FNC50-FNC59
High-Speed
Processing
S1
DVIT
S2
D1
FNC30-FNC39
Rotation and
Shift
S2 : When using a special high-speed output adapter for the pulse output destination in an FX3U PLC, the rotation
direction signal must be used by the following table output.
When using a built-in transistor output for the pulse output destination in an FX3U/FX3UC PLC, the rotation
direction signal must use transistor output.
D2
14
During RUN, avoid writing while the DVIT (FNC151) instruction is executed (that is, while a pulse is output).
Note that if writing is executed during RUN to a circuit block including the FNC151 instruction while pulses are output,
the PLC decelerates and stops pulse output.
15
Applicable version
FX3UC
Outline of function
When M8336 is set to ON, the interrupt input signal corresponding to Y000
to Y003 is changed to an input number (X000 to X007) specified by D8336.
When using a transistor output in the main unit, Y003 cannot be specified.
17
FNC100-FNC109
Data
Transfer 2
16
FNC80-FNC89
External FX
Device
Item
FNC70-FNC79
External FX I/O
Device
The functions of FNC151 instruction are changed depending on the version as shown in the table below.
For explanation of the instruction and the contents of function change,
refer to the Positioning Control Edition.
FX3U
FMC60-FNC69
Handy
Instruction
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
551
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
20.3
Outline
This instruction executes one specified table operation from the data table set in GX Works2 etc.
For explanation of the instruction, refer to the Positioning Control Edition manual.
For cautions on using special high-speed output adapters,
refer to the Positioning Control Edition manual.
Instruction
Description
*1
Interrupt positioning
DVIT (FNC151)
PLSV (FNC157)
DRVI (FNC158)
Drive to increment
DRVA (FNC159)
Drive to absolute
*1.
1. Instruction format
FNC 152
TBL
16-bit Instruction
Mnemonic
Operation Condition
32-bit Instruction
17 steps
Mnemonic
Operation Condition
Continuous
Operation
DTBL
2. Set data
Operand type
Description
Data type
Bit
32-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
C D R U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S
1
D
n
S1 : Specify Y000, Y001 or Y002*2 transistor output from the main unit, or specify Y000, Y001, Y002*4 or Y003*4
from a high-speed output special adapter*3.
*2.
Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3GC PLC.
*3.
*4.
To use Y002 and Y003 with a high-speed output special adapter, connected a second high-speed output
special adapter.
Points
When using a relay output type or triac output type FX3U PLC, a special high-speed output adapter is required.
Outputs of special high-speed output adapters work as differential line drivers.
FNC152
DTBL
552
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
20.4
Outline
1. Instruction format
16-bit Instruction
Mnemonic
Operation Condition
32-bit Instruction
13 steps
Mnemonic
Operation Condition
Continuous
Operation
DABS
2. Set data
Operand type
Description
14
Data type
Bit
FMC60-FNC69
Handy
Instruction
32-bit binary
15
Head device number inputting absolute (ABS) data output signal sent from servo amplifier
Head device number outputting absolute (ABS) data control signal to servo amplifier
D1
D1
D2
Bit Devices
System User
Digit Specification
C D
Others
Special
Unit
U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S
1
S2
S3
S4
17
FNC100-FNC109
Data
Transfer 2
D1
18
D2
FNC110-FNC139
Floating Point
DABS
16
FNC80-FNC89
External FX
Device
S2
D2
S1:
S2:
S3:
S4:
System User
D1
Word Devices
FNC70-FNC79
External FX I/O
Device
3. Applicable devices
Operand
Type
13
FNC50-FNC59
High-Speed
Processing
FNC 155
D
ABS
12
FNC40-FNC49
Data Operation
This instruction reads the absolute position (ABS) data when the servo amplifier (equipped with the absolute position
detection function) MR-J4 A, MR-J3 A, MR-J2(S) A, or MR-H A is connected. The data is converted into a pulse
when being read.
For explanation of the instruction, refer to the Positioning Control Edition.
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
553
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
20.5
Outline
This instruction executes a zero return, and aligns the mechanical position with a present value register inside the
PLC.
When the dog search function is required, use DSZR (FNC150) instruction.
For explanation of the instruction, refer to the Positioning Control Edition manual.
For cautions on using special high-speed output adapters,
refer to the Positioning Control Edition manual.
1. Instruction format
FNC 156
ZRN
16-bit Instruction
9 steps
Mnemonic
Operation Condition
32-bit Instruction
Continuous
Operation
ZRN
17 steps
Mnemonic
Operation Condition
Continuous
Operation
DZRN
2. Set data
Operand type
*1.
Description
Data type
speed*1
S1
S2
S3
Bit
Setting range
10 to 200,000 (Hz)
10 to 100,000 (Hz)
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
Others
Special
Unit
U \G
S1
S3
S4
S2
S3
S4
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S1
S3
D
Index
Constant
S
2
S1 : "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2 : Specify Y000, Y001 or Y002*2 transistor output from the main unit, or specify Y000, Y001, Y002*4 or Y003*4
from a high-speed output special adapter*3.
*2.
Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLCs.
*3.
*4.
To use Y002 and Y003 with a high-speed output special adapter, connected a second high-speed output
special adapter.
Points
When using a relay output type or triac output type FX3U PLC, a special high-speed output adapter is required.
Outputs of special high-speed output adapters work as differential line drivers.
S3 : This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S4 : This function is supported only in FX3U/FX3UC PLCs.
554
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
Command
input
FNC156
ZRN
S1
S2
S3
FNC30-FNC39
Rotation and
Shift
12
During RUN, avoid writing while the ZRN (FNC156) instruction is executed (that is, while pulses are output).
Note that if writing is executed during RUN to a circuit block including the FNC156 instruction while pulses are output,
the PLC decelerates and stops pulse output.
Applicable version
FX3S
FX3G
FX3GC
FX3U
FX3UC
Item
Outline of function
14
FMC60-FNC69
Handy
Instruction
13
FNC50-FNC59
High-Speed
Processing
The function of FNC156 instruction is changed depending on the version as shown in the table below.
For explanation of the instruction and the contents of function change,
refer to the Positioning Control Edition.
FNC40-FNC49
Data Operation
15
FNC70-FNC79
External FX I/O
Device
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
555
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
20.6
Outline
This instruction outputs variable speed pulses with an assigned rotation direction.
For explanation of the instruction, refer to the Positioning Control Edition manual.
For cautions on using special high-speed output adapters,
refer to the Positioning Control Edition manual.
1. Instruction format
FNC 157
D PLSV
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Continuous
Operation
PLSV
Mnemonic
32-bit Instruction
13 steps
Operation Condition
Continuous
Operation
DPLSV
2. Set data
Operand type
*1.
Description
Data type
*1
S1
D1
D2
Bit
Setting range
*2.
When operation without acceleration/deceleration (M8338 = OFF), setting range of FX3S/FX3G/FX3GC PLC is
-32,768 to -10 Hz, +10 to 32,767 Hz.
*3.
When operation without acceleration/deceleration (M8338 = OFF), setting range of FX3S/FX3G/FX3GC PLC is
-100,000 to -10 Hz, +10 to 100,000 Hz.
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C D
R
S4
S1
D1
S
1
D2
S
2
Others
Special
Unit
U \G
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
" "
S5
S3
S1 : Specify Y000, Y001 or Y002*4 transistor output from the main unit, or specify Y000, Y001, Y002*6 or Y003*6
from a high-speed output special adapter*5.
*4.
*5.
*6.
002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLC.
High-speed output special adapters can be connected only to FX3U PLC.
To use Y002 or Y003 with a high-speed output special adapter, connected a second high-speed output
special adapter.
Points
When using a relay output type or triac output type FX3U PLC, a special high-speed output adapter is required.
Outputs of special high-speed output adapters work as differential line drivers.
S2 : When using a special high-speed output adapter for the pulse output destination in an FX3U PLC, the rotation
direction signal must be used by the following table output.
When using a built-in transistor output for the pulse output destination in an FX3S/FX3G/FX3GC/FX3U/FX3UC
PLCs, the rotation direction signal must use transistor output.
Special high-speed output adapter No.
No. 1 (1st unit)
556
Pulse output
D1
=Y000
D2
=Y004
D1
=Y001
D2
=Y005
D1
=Y002
D2
=Y006
D1
=Y003
D2
=Y007
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
FNC30-FNC39
Rotation and
Shift
S3 : "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S4 : This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S5 : This function is supported only in FX3U/FX3UC PLCs.
S1
D1
12
D2
FNC40-FNC49
Data Operation
Command
input
FNC157
14
Only available for FX3UC PLC Ver. 2.20 or later and FX3S/FX3G/FX3GC/FX3U PLCs.
FX3G
FX3GC
FX3U
FX3UC
Item
Acceleration/
Ver. 1.00 Ver. 1.00 Ver. 1.40 Ver. 2.20 Ver. 2.20
deceleration
or later
or later
or later
or later
or later
operation function
Outline of function
When M8338 is set to ON, the PLC accelerates or
decelerates up to
S1
time corresponding to
D1
if
S1
changes.
15
FNC70-FNC79
External FX I/O
Device
Applicable version
FMC60-FNC69
Handy
Instruction
*1.
13
FNC50-FNC59
High-Speed
Processing
During RUN, avoid writing while PLSV (FNC157) instruction is executed (that is, while pulses are output).
Note that if writing is executed during RUN to a circuit block including FNC157 instruction while pulses are output, the
PLC executes the operation shown below.
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
557
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
20.7
Outline
This instruction executes one-speed positioning by incremental drive. The movement distance from the present
position can be specified, positive or negative.
For explanation of the instruction, refer to the Positioning Control Edition manual.
For cautions on using special high-speed output adapters,
refer to the Positioning Control Edition manual.
1. Instruction format
FNC 158
D
DRVI
16-bit Instruction
9 steps
Mnemonic
Operation Condition
32-bit Instruction
Continuous
Operation
DRVI
17 steps
Mnemonic
Operation Condition
Continuous
Operation
DDRVI
2. Set data
Operand type
Description
Data type
address)*1
S1
S2
D1
D2
Bit
*1.
*2.
Setting range
10 to 200,000 (Hz)
10 to 100,000 (Hz)
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
S1
S2
D1
S
1
D2
S
2
C D
Others
Special
Unit
U \G
S4
S5
S4
S5
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S3
S1 : Specify Y000, Y001 or Y002*3 transistor output from the main unit, or specify Y000, Y001, Y002*5, or Y003*5
from a high-speed output special adapter*4.
*3.
Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLC.
*4.
*5.
To use Y002 or Y003 with a high-speed output special adapter, connected a second high-speed output
special adapter.
Points
When using a relay output type or triac output type FX3U PLC, a special high-speed output adapter is required.
Outputs of special high-speed output adapters work as differential line drivers.
558
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
12
D1
=Y000
D2
=Y004
D1
=Y001
D2
=Y005
D1
=Y002
D2
=Y006
D1
=Y003
D2
=Y007
FNC40-FNC49
Data Operation
Pulse output
13
FNC50-FNC59
High-Speed
Processing
S3 : "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S4 : This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S5 : This function is supported only in FX3U/FX3UC PLCs.
S1
S2
D1
14
D2
15
FNC70-FNC79
External FX I/O
Device
During RUN, avoid writing while DRVI (FNC158) instruction is executed (that is, while pulses are output).
Note that if writing is executed during RUN to a circuit block including FNC158 instruction while pulses are output, the
PLC decelerates and stops pulse output.
FMC60-FNC69
Handy
Instruction
DRVI
FNC30-FNC39
Rotation and
Shift
S2 :When using a special high-speed output adapter for the pulse output destination in an FX3U PLC, the rotation
direction signal must be used by the following table output.
When using a built-in transistor output for the pulse output destination in an FX3S/FX3G/FX3GC/FX3U/FX3UC
PLCs, the rotation direction signal must use transistor output.
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
559
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
20.8
Outline
This instruction executes one-speed positioning by absolute drive. The movement distance from the zero point can be
specified.
For explanation of the instruction, refer to the Positioning Control Edition manual.
For cautions on using special high-speed output adapters,
refer to the Positioning Control Edition manual.
1. Instruction format
FNC 159
D DRVA
16-bit Instruction
9 steps
Mnemonic
Operation Condition
32-bit Instruction
Continuous
Operation
DRVA
17 steps
Mnemonic
Operation Condition
Continuous
Operation
DDRVA
2. Set data
Operand type
Description
Data type
address)*1
S1
S2
D1
D2
*1.
*2.
Bit
Setting range
10 to 200,000 (Hz)
10 to 100,000 (Hz)
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
S1
S2
D1
S
1
D2
S
2
C D
Others
Special
Unit
U \G
S4
S5
S4
S5
Index
V
Constant
Z Modify K
Real
CharacPointer
Number ter String
E
" "
S3
S1 : Specify Y000, Y001 or Y002*3 transistor output from main unit, or specify Y000, Y001, Y002*5 or Y003*5 from a
high-speed output special adapter*4.
*3.
Y002 is not available in FX3G PLC (14-point and 24-point type) and FX3S/FX3GC PLC.
*4.
*5.
To use Y002 or Y003 with a high-speed output special adapter, connected a second high-speed output
special adapter.
Points
When using a relay output type or triac output type FX3U PLC, a special high-speed output adapter is required.
Outputs of special high-speed output adapters work as differential line drivers.
560
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
12
D1
=Y000
D2
=Y004
D1
=Y001
D2
=Y005
D1
=Y002
D2
=Y006
D1
=Y003
D2
=Y007
FNC40-FNC49
Data Operation
Pulse output
13
FNC50-FNC59
High-Speed
Processing
S3 : "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S4 : This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S5 : This function is supported only in FX3U/FX3UC PLCs.
S1
S2
D1
14
D2
15
FNC70-FNC79
External FX I/O
Device
During RUN, avoid writing while DRVA (FNC159) instruction is executed (that is, while pulses are output).
Note that if writing is executed during RUN to a circuit block including FNC159 instruction while pulses are output, the
PLC decelerates and stops pulse output.
FMC60-FNC69
Handy
Instruction
DRVA
FNC30-FNC39
Rotation and
Shift
S2 : When using a special high-speed output adapter for the pulse output destination in an FX3U PLC, the rotation
direction signal must be used by the following table output.
When using a built-in transistor output for the pulse output destination in an FX3S/FX3G/FX3GC/FX3U/FX3UC
PLCs, the rotation direction signal must use transistor output.
16
FNC80-FNC89
External FX
Device
17
FNC100-FNC109
Data
Transfer 2
18
FNC110-FNC139
Floating Point
19
FNC140-FNC149
Data
Operation 2
20
FNC150-FNC159
Positioning
Control
561
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
562
FNC No.
Mnemonic
Symbol
Function
160
TCMP
TCMP S1 S2 S3 S D
161
TZCP
TZCP S1 S2 S D
162
TADD
163
Reference
Section 21.1
Section 21.2
TADD S1 S2 D
Section 21.3
TSUB
TSUB S1 S2 D
Section 21.4
164
HTOS
HTOS S D
Section 21.5
165
STOH
STOH S D
Section 21.6
166
TRD
TRD
Section 21.7
167
TWR
TWR
Section 21.8
168
169
HOUR
HOUR S D1 D2
Hour Meter
Section 21.9
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
21.1
Outline
This instruction compares the comparison time with the time data, and turns ON or OFF bit devices according to the
comparison result.
FNC 160
TCMP P
16-bit Instruction
11 steps
Mnemonic
Operation Condition
TCMP
TCMPP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
23
FNC180
Alternate
Instructions
2. Set data
Operand type
Description
Data type
16-bit binary
S2
16-bit binary
S3
16-bit binary
16-bit binary
24
FNC181-FNC189
Others
S1
S
Bit
25
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
U \G
S3
S2
S2
S3
S3
S2
S3
S2
S3
SD2
Modify
Real
CharacPointer
Number ter String
E
" "
26
FNC200-FNC209
Character String
Control
S1
S
S2
Index
Constant
FNC190-FNC199
Block Data
Operation
3. Applicable devices
Operand
Type
FNC170-FNC179
External Device
1. Instruction format
22
S1
27
FNC210-FNC219
Data
Operation 3
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
563
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC160
TCMP
S1
S2
+1, and
S3
S1
, S2
(hour)
>
(hour)
D +2
turn ON or
(hour)
+2 (second)
(hour)
S +1 (minute) "
S3 (second)
+2 (second)
S1
(hour)
(hour)
S +1 (minute) "
<
S3 (second)
S +1 (minute) "
S3 (second)
S1
D +1
, and S3
+2 (second)
Even if the command contact turns OFF from ON and TCMP instruction is not
executed, D , D +1 and D +2 hold the status before the command
contact turned OFF.
Cautions
1. Number of occupied devices
Three devices are occupied respectively by S
and D .
Make sure that these devices are not used in other controls for the machine.
2. When utilizing the time (hour, minute, and second) of the built-in PLC real time clock
Read the values of special data registers by TRD (FNC166) instruction, and then specify those word devices as the
operands.
Program example
X000
FNC160
TCMP
S1
S2
S3
K10
K30
K50
D0
M0
10:30:50
M0
D0 (hour)
Turns ON in the case of "10:30:50 > D1 (minute)
M1
"
D2 (second)
S1
D0 (hour)
S2
"
D2 (second)
M2
D0 (hour)
Turns ON in the case of "10:30:50 < D1 (minute)
D2 (second)
564
"
S3
, D
+1, D
+2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
21.2
Outline
This instruction compares two comparison time (comparison time zone) with the time data, and turns ON or OFF the
specified bit devices according to the comparison results.
FNC 161
TZCP P
16-bit Instruction
9 steps
Mnemonic
Operation Condition
TZCP
TZCPP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
23
Description
FNC180
Alternate
Instructions
2. Set data
Operand type
Data type
16-bit binary
S2
Specifies "hour" of the upper limit comparison time (hour, minute, and second).
(Three devices are occupied.)
16-bit binary
16-bit binary
24
FNC181-FNC189
Others
S1
S
Specifies "hour" of the lower limit comparison time (hour, minute, and second).
(Three devices are occupied.)
Bit
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
T
U \G
S1
S
S2
S3
S2
S2
S3
S2
S3
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
26
S1
FNC200-FNC209
Character String
Control
SD2
S1: "D .b" is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
FNC161
TZCP
S1
S2
>
S1 +2 (second)
S +2 (second)
S1
(hour)
S1 +1 (minute)
S1 +2 (second)
D +2
(hour)
S +1 (minute)
S2
S2 +1 (minute) ".
S +2 (second)
S2 +2 (second)
S2
(hour)
S +1 (minute)
S +2 (second)
Even if the command contact turns OFF from ON and TZCP instruction is not executed,
D +1 and D +2 hold the status before the command contact turned OFF.
>
29
(hour)
(hour)
S2 +1 (minute) ".
S2 +2 (second)
30
FNC270-FNC276
Ex-Device
(hour)
S +1 (minute) ".
FNC250-FNC269
Data Table
Operation
D +1
(hour)
S1 +1 (minute)
28
FNC220-FNC249
Data
Comparison
S1
27
FNC210-FNC219
Data
Operation 3
The lower limit and upper limit comparison time (hour, minute, and second) are compared with the time data (hour,
minute, and second) stored in three devices S , S +1, and S +2. Three devices starting from D
turn
ON or OFF according to the comparison result.
Command
input
25
FNC190-FNC199
Block Data
Operation
Operand
Type
FNC170-FNC179
External Device
1. Instruction format
22
D ,
565
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Cautions
1. Number of occupied devices
Three devices are occupied respectively by S1 , S2 , S3 , and D .
Make sure that these devices are not used in other controls for the machine.
2. When utilizing the time (hour, minute, and second) of the built-in PLC real time clock
Read the values of special data registers by TRD (FNC166) instruction, and then specify those word devices as the
operands.
Program example
X000
FNC161
TZCP
M3
M4
S1
S2
D 20
D 30
D0
M3
D20 (hour)
D0 (hour)
>
D22 (second)
D2 (second)
D20 (hour)
D0 (hour)
D22 (second)
M5
D1 (minute)
D1 (minute)
D 30 (hour)
D 31 (minute) ".
D2 (second)
D 32 (second)
D0 (hour)
D 30 (hour)
".
>
D 31 (minute) ".
D 32 (second)
S1
S1
+1 and S1
+2 : Specify the lower limit of the comparison time zone in "hour", "minute" and "second.
S2
S2
+1 and S2
+2 : Specify the upper limit of the comparison time zone in "hour", "minute" and "second.
+1 and
+1 and
566
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
21.3
Outline
This instruction executes addition of two time data, and stores the addition result to word devices.
22
FNC 162
TADD P
16-bit Instruction
7 steps
Mnemonic
Operation Condition
TADD
TADDP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
23
FNC180
Alternate
Instructions
2. Set data
Operand type
Description
Data type
16-bit binary
S2
Specifies "hour" of the second time data (hour, minute, and second) used in addition.
(Three devices are occupied.)
16-bit binary
Stores the addition result (hour, minute, and second) of two time data.
(Three devices are occupied.)
16-bit binary
24
FNC181-FNC189
Others
S1
S
Specifies "hour" of the first time data (hour, minute, and second) used in addition.
(Three devices are occupied.)
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
U \G
S1
S
S1
S2
S2
S1
S2
SD2
S1
S2
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
26
FNC200-FNC209
Character String
Control
S1 +1 (minute)
S1 +2 (second)
S1
+1, and
S1
S2
+1, and
S2
+2.
( S1 , S1 +1, S1 +2)+( S2 , S2 +1, S2 +2)
FNC162
TADD
(hour)
S1
+1, and
S1
S2
S2
(hour)
S2 +1 (minute)
S2 +2 (second)
28
( D , D +1, D +2)
(hour)
27
When the operation result becomes "0" (0:0:0), the zero flag turns ON.
29
FNC250-FNC269
Data Table
Operation
When the operation result exceeds 24 hours, the carry flag turns ON, and the value simply acquired by addition
subtracted by 24 hours is stored as the operation result.
FNC220-FNC249
Data
Comparison
S1
S2
FNC210-FNC219
Data
Operation 3
25
FNC190-FNC199
Block Data
Operation
Operand
Type
FNC170-FNC179
External Device
1. Instruction format
30
FNC270-FNC276
Ex-Device
567
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Cautions
1. Number of occupied devices
Three devices are occupied by S1 , S2 and D
respectively.
Make sure that these devices are not used in other controls for the machine.
2. When utilizing the time (hour, minute, and second) of the built-in PLC real time clock
Read the values of special data registers using the TRD (FNC166) instruction, and then specify those word devices as
the operands.
Program example
X000
FNC162
TADD
S1
10 (hour)
S1 +1 30 (minute)
S1 +2 10 (second)
S1
S2
D 10
D 20
D 30
10:30:10
S2
3 (hour)
S2 +1 10 (minute)
S2 +2 5 (second)
3:10:5
13 (hour)
D +1 40 (minute)
D +2 15 (second)
13:40:15
568
S2
10 (hour)
20 (minute)
5 (second)
10:20:5
4 (hour)
30 (minute)
35 (second)
4:30:35
18+10=28(24)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
21.4
Outline
This instruction executes subtraction of two time data, and stores the subtraction result to word devices.
22
FNC 163
TSUB P
16-bit Instruction
Mnemonic
Operation Condition
TSUB
7 steps
TSUBP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
23
FNC180
Alternate
Instructions
2. Set data
Operand type
Description
Data type
16-bit binary
S2
Specifies "hour" of the time data (hour, minute, and second) used in subtraction.
(Three devices are occupied.)
16-bit binary
Stores the subtraction result (hour, minute, and second) of two time data.
(Three devices are occupied.)
16-bit binary
24
FNC181-FNC189
Others
S1
S
Specifies "hour" of the time data (hour, minute, and second) used in subtraction.
(Three devices are occupied.)
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
S1
S
S1
S2
S2
S1
S2
SD2
S1
S2
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
26
FNC200-FNC209
Character String
Control
(hour)
S1 +2 (second)
S1
+1, and
S1
+1, and
S2
S1
+1, and
S2
+2.
( S1 , S1 +1, S1 +2)( S2 , S2 +1, S2 +2)
FNC163
TSUB
S1 +1 (minute)
S1
S2
S2
(hour)
S2 +1 (minute)
S2 +2 (second)
28
( D , D +1, D +2)
27
29
FNC250-FNC269
Data Table
Operation
When the operation result is smaller than 0 hour, the borrow flag turns ON, and the value simply acquired by
subtraction added by 24 hours is stored as the operation result.
When the operation result becomes "0" (0:0:0), the zero flag turns ON.
FNC220-FNC249
Data
Comparison
S1
S2
FNC210-FNC219
Data
Operation 3
25
FNC190-FNC199
Block Data
Operation
Operand
Type
FNC170-FNC179
External Device
1. Instruction format
30
FNC270-FNC276
Ex-Device
569
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Cautions
1. Number of occupied devices
Three devices are occupied by S1 , S2 and D
respectively.
Make sure that these devices are not used in other controls for the machine.
2. When utilizing the time (hour, minute, and second) of the built-in PLC real time clock
Read the values of special data registers using the TRD (FNC166) instruction, and then specify those word devices as
the operands.
Program example
X000
FNC163
TSUB
D 10 10 (hour)
D 11 30 (minute)
D 12 10 (second)
10:30:10
S1
S2
D 10
D 20
D 30
D 20 3 (hour)
D 21 10 (minute)
D 22 5 (second)
D 30 7 (hour)
D 31 20 (minute)
D 32 5 (second)
3:10:5
7:20:5
S2
5 (hour)
18 (hour)
20 (minute)
40 (second)
5:20:40
570
10 (minute)
5 (second)
18:10:5
11 (hour)
10 (minute)
35 (second)
11:10:35
518=13 (<0)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
21.5
Outline
This instruction converts the time data in units of "hour, minute, and second" into data in units of "second".
22
FNC 164
HTOS P
16-bit Instruction
5 steps
Mnemonic
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DHTOS
DHTOSP
Continuous
Operation
Pulse (Single)
Operation
HTOS
HTOSP
Description
Data type
SS1
Head device number storing the time data (hour, minute and second) before conversion
16-bit binary
16- or 32-bit binary
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
SS1
hour
(0 to 9)
+1
minute
(0 to 59)
+2
second
(0 to 59)
27
D
second
For example, when "4 hours 29 minutes 31 seconds" is specified, the operation is as follows:
4
+1
29
+2
31
28
FNC220-FNC249
Data
Comparison
26
FNC210-FNC219
Data
Operation 3
FNC164
HTOS
FNC200-FNC209
Character String
Control
25
FNC190-FNC199
Block Data
Operation
SD2
24
FNC181-FNC189
Others
3. Applicable devices
Operand
Type
23
FNC180
Alternate
Instructions
2. Set data
Operand type
FNC170-FNC179
External Device
1. Instruction format
16171
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
571
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC164
DHTOS
+1,
hour
+1, and
(0 to 32767)
+1
minute
(0 to 59)
+2
second
(0 to 59)
+1
second
For example, when "35 hours 10 minutes 58 seconds" is specified, the operation is as follows:
S
35
+1
10
+2
58
+1
126658
Error
An operation error is caused in the following case; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the data of
+ 1 or
Program example
In the program shown below, the time data read from the built-in PLC real time clock is converted into data in units of
"second", and stored to D100 and D101 when X020 turns ON.
X020
FNC166
TRD
FNC164
DHTOS
D13
D10
D100
END
Operation
Clock data reading operation by TRD (FNC166) instruction
Real time
clock
D10
2004
Year
D11
Month
D12
31
Day
D13
20
Hour
D14
21
Minute
D15
23
Second
D16
Day of week
Clock data
Time data
572
D13
20
D101,D100
D14
21
73283
D15
23
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
21.6
Outline
This instruction converts the time data in units of "second" into data in units of "hour, minute, and second".
22
FNC 165
STOH P
16-bit Instruction
Mnemonic
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
9 steps DSTOH
DSTOHP
Continuous
Operation
Pulse (Single)
Operation
STOH
5 steps
STOHP
Description
Data type
SS1
Head device number storing the time data (hour, minute and second) after conversion
24
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
SS1
Command
input
+1, and
FNC165
STOH
D
D
S
Second (0 to 32767)
Hour
(0 to 9)
+1
Minute
(0 to 59)
+2
Second
(0 to 59)
27
FNC210-FNC219
Data
Operation 3
29011
28
+1
+2
31
FNC220-FNC249
Data
Comparison
26
FNC200-FNC209
Character String
Control
stored to
25
FNC190-FNC199
Block Data
Operation
SD2
FNC181-FNC189
Others
3. Applicable devices
Operand
Type
23
FNC180
Alternate
Instructions
2. Set data
Operand type
FNC170-FNC179
External Device
1. Instruction format
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
573
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC165
DSTOH
+1
+1 and
+1, and
Second
(0 to 117964799)
Hour
(0 to 32767)
+1
Minute
(0 to 59)
+2
Second
(0 to 59)
+1
45325
12
+1
35
+2
25
Error
An operation error is caused in the following case; The error flag M8067 turns ON, and the error code is store in
D8067.
When the data of
Program example
In the program shown below, the time data in units of "second" stored in D0 and D1 is converted into data in units of
"hour, minute, and second", and stored to D100, D101, and D102 when X020 turns ON.
X020
FNC165
DSTOH
D0
D100
END
Operation
Converting the data in second into the data in hour, minute and second using STOHP instruction
(when "40,000 seconds" is specified by D1 and D0)
D1,D0
574
40000
D100
11
D101
D102
40
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
21.7
Outline
This instruction reads the clock data of the built-in PLC real time clock.
22
FNC 166
P
TRD
Mnemonic
16-bit Instruction
Operation Condition
TRD
3 steps
Continuous
Operation
Pulse (Single)
Operation
TRDP
Operation Condition
23
Description
Data type
FNC180
Alternate
Instructions
2. Set data
Operand type
16-bit binary
3. Applicable devices
Word Devices
System User
Digit Specification
System User
T
R
S1
SD2
24
Others
Special
Unit
U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S2
25
FNC190-FNC199
Block Data
Operation
to
+6.
Command
input
FNC166
This instruction reads the real time clock data in a PLC, and transfers it to seven
data registers.
Clock data
D8018
Year
0 to 99
(lower two digits)
D8017
Month
1 to 12
D8016
Day
1 to 31
D8015
Hour
0 to 23
D8014
Minute
0 to 59
D8013
Second
0 to 59
D8019
Day of week
0 (Sunday) to
6 (Saturday)
Device
Item
D0
Year
D1
Month
D2
Day
D3
Hour
D4
Minute
D5
Second
D6
Day of week
27
28
29
FNC250-FNC269
Data Table
Operation
Item
FNC220-FNC249
Data
Comparison
Device
FNC210-FNC219
Data
Operation 3
TRD
26
FNC200-FNC209
Character String
Control
to
FNC181-FNC189
Others
Operand
Type
Bit Devices
FNC170-FNC179
External Device
1. Instruction format
30
Caution
FNC270-FNC276
Ex-Device
575
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21.8
Outline
This instruction writes the clock data to the built-in PLC real time clock.
1. Instruction format
FNC 167
P
TWR
Mnemonic
16-bit Instruction
3 steps
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
TWR
TWRP
Operation Condition
2. Set data
Operand type
Description
Data type
Specifies the head device number to which the clock data is written.
(Seven devices are occupied.)
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
R
S1
Others
Special
Unit
U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S2
TWRP
to
+6 is written to D8013 to D8019 for the built-in PLC real time clock.
Device
Item
Clock data
D 10
Year
0 to 99
(lower two digits)
D 11
Month
1 to 12
D 12
Day
1 to 31
D 13
Hour
0 to 23
D 14
Minute
0 to 59
D 15
Second
o to 59
D 16
Day of week
0 (Sunday) to
6 (Saturday)
Device
Item
D8018
Year
D8017
Month
D8016
Day
D8015
Hour
D8014
Minute
D8013
Second
D8019
Day of week
- D8018 (year data) can be converted into the 4-digit mode. (Refer to the program example shown later.)
- When TWR (FNC167) instruction is executed, the clock data of the real time clock is immediately changed.
Accordingly, transfer the clock data several minutes ahead to S
to S +6 in advance, and then execute
FNC167 instruction when the accurate time has come.
- When setting the clock data (time) using this instruction, it is not necessary to control the special auxiliary relay
M8015 (time stop and time setting).
- If a numeric value indicating impossible date/time is set, the clock data is not changed.
Set the correct clock data, and then write it.
- The day of the week (D8019) is automatically corrected in accordance with the date without regard to the written
numeric value.
576
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
Caution
1. Number of occupied devices
Seven devices are occupied by S .
Make sure that these devices are not used in other controls for the machine.
22
FNC170-FNC179
External Device
Program example
1. Example of setting the clock data (time)
In the program example shown below, the real time clock is set (to 15:20:30 on Tuesday, April 25, 2001).
X000
FNC 12
MOV
K4
D1
Month
FNC 12
MOV
K25
D2
Day
FNC 12
MOV
K15
D3
Hour
FNC 12
MOV
K20
D4
Minute
FNC 12
MOV
K30
D5
Second
FNC 12
MOV
K2
D6
Day of week
FNC167
TWR
D0
23
24
25
FNC190-FNC199
Block Data
Operation
D0
FNC181-FNC189
Others
K1
FNC180
Alternate
Instructions
FNC 12
MOV
X001
M8017
26
When setting the time, it is recommended to set the time to several minutes ahead in advance, and then set X000
to ON when the accurate time is reached. The set time is then immediately written to the real time clock, and the
clock data is updated.
When handling the year in the 4-digit mode, add the following program.
D8018 will specify the 4-digit year mode in the second scan and later after the PLC mode is changed to RUN.
M8002
Initial pulse
FNC 12
MOV
K2000
D8018
27
FNC210-FNC219
Data
Operation 3
Every time X001 is set to ON, the current time can be corrected by 30 seconds.
FNC200-FNC209
Character String
Control
28
29
FNC250-FNC269
Data Table
Operation
When the data access unit FX-10DU-E/20DU-E/25DU-E is connected, select the 2-digit year mode. If the 4-digit
year mode is selected, the year is not correctly displayed in the current version of the FX-10DU-E/20DU-E/25DU-E.
Note that the clock is changed to the 2-digit year mode when the clock is set from the FX-10DU-E/20DU-E/25DU-E
while the PLC is operating in the 4-digit year mode.
FNC220-FNC249
Data
Comparison
- A PLC is normally operating in the 2-digit year mode. When the above instruction is executed and "K2000 (fixed
value)" is transferred to D8018 (year) in only one operation cycle after the PLC mode was changed to RUN, the
year mode is switched to the 4-digit mode.
- Execute this program every time the PLC mode is changed to RUN. Even if "K2000" is transferred, only the
display format is changed to the 4-digit year mode. The current date and time are not affected.
- In the 4-digit year mode, the set values "80 to 99" correspond to "1980 to 1999", and "00 to 79" correspond to
"2000 to 2079".
Examples:
"80" indicates 1980. "99" indicates 1999. "00" indicates 2000. "79" indicates 2079.
30
FNC270-FNC276
Ex-Device
577
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21.9
Outline
This instruction measures the ON time of the input contact in units of hour.
1. Instruction format
FNC 169
HOUR
Mnemonic
16-bit Instruction
7 steps
Operation Condition
Continuous
Operation
HOUR
13 steps
Operation Condition
Continuous
Operation
DHOUR
2. Set data
Operand type
Description
D2
Data type
16- or 32-bit binary
SS1
D11
S
Current value (unit: hour) (latched (battery backed) type data register latched (battery
backed))
D2
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
SS1
S2
D11
S
S2
Others
Special
Unit
U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S3
S1
D22
S
S1: D .b is available only in FX3U and FX3UC PLCs. However, index modifiers (V and Z) are not available.
S2: This function is supported only in FX3G/FX3GC/FX3U/FX3UC PLCs.
S3: This function is supported only in FX3U/FX3UC PLCs.
S
D1
D1
D2
D1
D2
is set to ON.
D1
+1
Specify a latched (battery backed) type data register as D1 so that the current value data can be continuously
used even after the PLC turns OFF.
If a general type data register is used, the current value data is cleared when the power to the PLC is turned OFF or
when the PLC mode switches from STOP to RUN.
Even after the alarm output D2
To begin measuring the ON time again, clear the current value stored in D1
When the current value is cleared, alarm output is turned OFF.
When the current value D1
+1.
578
and D1
and D1
+1.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
Command
input
[ S
+1,
FNC169
DHOUR
D1
D2
+2
D1
FNC170-FNC179
External Device
+1, D1
22
is set to ON
FNC160-FNC169
Real Time Clock
Control
2. 32-bit operation
D2
and D1
Specify a latched (battery backed) type data register as D1 so that the current value data can be continuously
used even after the PLC turns OFF.
If a general data type register is used, the current value data is cleared when the power to the PLC is turned OFF or
when the PLC mode switches from STOP to RUN.
Even after the alarm output D2
+1, D1
to D1
+2.
to D1
+2.
25
FNC190-FNC199
Block Data
Operation
Caution
1. Number of occupied devices
Two (16-bit operation) or three (32-bit operation) devices are occupied by D1
Make sure that these devices are not used in other controls for the machine.
26
Program example
S
X000
K300
D2
D 200
Y005
27
FNC210-FNC219
Data
Operation 3
D1
D2
FNC169
HOUR
D1
+1
28
FNC220-FNC249
Data
Comparison
It turns ON when the current value D1 reaches or exceeds the time specified in
(In this example, it turns ON when the current value becomes 300 hours.)
FNC200-FNC209
Character String
Control
In the program example shown below, when the accumulated X000 ON time exceeds 300 hours, Y005 turns ON.
The current value less than one hour is stored in D201 in units of second.
D1
24
FNC181-FNC189
Others
When measures the ON time beginning again, clear the current value stored in D1
When the current value is clear, alarm output is turned OFF.
23
FNC180
Alternate
Instructions
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
579
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
580
FNC No.
Mnemonic
Symbol
Function
Reference
170
GRY
GRY
S D
Section 22.1
171
GBIN
GBIN
S D
Section 22.2
172
173
174
175
176
RD3A
RD3A m1 m2 D
177
WR3A
WR3A m1 m2 S
178
179
Section 22.3
Section 22.4
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
22.1
Outline
22
This instruction converts a binary value into a gray code, and transfers it.
FNC 170
D
P
GRY
16-bit Instruction
5 steps
Mnemonic
Operation Condition
GRY
GRYP
Continuous
Operation
Pulse (Single)
Operation
9 steps
Operation Condition
DGRY
DGRYP
Continuous
Operation
Pulse (Single)
Operation
Description
Data Type
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
U \G
S2
S1
S2
Modify
Real
CharacPointer
Number ter String
E
" "
26
FNC200-FNC209
Character String
Control
BIN 1234
is K1234 and D
27
FNC210-FNC219
Data
Operation 3
When S
FNC170
GRY
25
FNC190-FNC199
Block Data
Operation
S1
Index
Constant
24
FNC181-FNC189
Others
3. Applicable devices
Operand
Type
23
FNC180
Alternate
Instructions
2. Set data
Operand Type
FNC170-FNC179
External Device
1. Instruction format
is K3Y10
b0
b15
0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0
28
-
FNC220-FNC249
Data
Comparison
GRY 1234
Y23
Y20 Y17
Y10
0 1 1 0 1 0 1 1 1 0 1 1
29
FNC250-FNC269
Data Table
Operation
Caution
The data conversion speed depends on the scan time of the PLC.
30
FNC270-FNC276
Ex-Device
581
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
22.2
Outline
This instruction converts a gray code into a binary value, and transfers it.
1. Instruction format
FNC 171
D
P
GBIN
16-bit Instruction
5 steps
Mnemonic
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
DGBIN
9 steps
DGBINP
Continuous
Operation
Pulse (Single)
Operation
GBIN
GBINP
2. Set data
Operand Type
Description
Data Type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
U \G
S1
S2
S1
S2
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
When S
FNC171
GBIN
is K3X000 and D
GRY 1234
D10
BIN 1234
is D10
X10 X7
X0
X13
0 1 1 0 1 0 1 1 1 0 1 1
b0
b15
0 0 0 0 0 1 0 0 1 1 0 1 0 0 1 0
- This instruction can be used for detecting an absolute position by a gray code type encoder.
-
Caution
When an input relay (X) is specified as S , the response relay will be Scan time of PLC + Input filter constant.
The input filter value in X000 to X017*1 can be converted using the REFF (FNC51) instruction or D8020 (filter
adjustment) so that the delay caused by the filter constant is eliminated.
*1.
582
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
22.3
Outline
22
This instruction reads an analog input value from the analog block FX0N-3A*1 or FX2N-2AD.
FNC170-FNC179
External Device
1. Instruction format
FNC 176
RD3A P
16-bit Instruction
7 steps
Mnemonic
Operation Condition
RD3A
RD3AP
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
23
FNC180
Alternate
Instructions
2. Set data
Operand Type
Description
Data Type
16-bit binary
m2
16-bit binary
16-bit binary
24
FNC181-FNC189
Others
m1
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
m1
m2
26
FNC200-FNC209
Character String
Control
m2
FNC176
RD3A
m1
m2
27
FNC210-FNC219
Data
Operation 3
m1
28
FNC220-FNC249
Data
Comparison
Read data
A value read from the analog block is stored.
FX0N-3A*1 : 0 to 255 (8 bits)
FX2N-2AD : 0 to 4095 (12 bits)
29
The FX0N-3A is available only for the FX3U and FX3UC PLCs.
FNC250-FNC269
Data Table
Operation
*1.
25
FNC190-FNC199
Block Data
Operation
Operand
Type
30
FNC270-FNC276
Ex-Device
583
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
22.4
Outline
This instruction writes a digital value to the analog block FX0N-3A*1 or FX2N-2DA.
1. Instruction format
FNC 177
WR3A P
16-bit Instruction
7 steps
Mnemonic
Operation Condition
WR3A
WR3AP
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
Description
Data Type
m1
16-bit binary
m2
16-bit binary
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
m1
m2
m1
m2
FNC177
WR3A
m1
m2
Data to be written
Specify a value output to the analog block.
FX0N-3A*1 : 0 to 255 (8 bits)
FX2N-2DA : 0 to 4095 (12 bits)
*1.
584
The FX0N-3A is available only for the FX3U and FX3UC PLCs.
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
22
Outline
Description
EXTR K10
FNC270
IVCK
EXTR K11
FNC271
IVDR
Inverter drive
EXTR K12
FNC272
IVRD
EXTR K13
FNC273
IVWR
FNC274
IVBWR*1
FNC275
IVMC
24
FNC181-FNC189
Others
*1.
FX3S/FX3G/FX3GC/FX3U/FX3UC
23
FNC180
Alternate
Instructions
FNC170-FNC179
External Device
23.1
25
FNC190-FNC199
Block Data
Operation
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
585
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
586
FNC No.
Mnemonic
181
182
COMRD
183
184
RND
185
186
DUTY
187
188
CRC
189
HCMOV
Symbol
Function
Reference
COMRD S D
Section 24.1
RND
Section 24.2
DUTY n1 n2 D
Section 24.3
S D n
Section 24.4
HCMOV S D n
Section 24.5
CRC
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
24.1
Outline
1. Instruction format
FNC 182
COMRD P
16-bit Instruction
Mnemonic
Operation Condition
COMRD
5 steps
COMRDP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
23
FNC180
Alternate
Instructions
2. Set data
Operand Type
Description
Data Type
Device name
Character string
Bit Devices
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
26
and later.
FNC200-FNC209
Character String
Control
Command
input
D
b15
D
+0
+1
+2
+3
b8 b7
b0
...
.......
27
16
characters
can be
stored.
28
is "LineNo.1Start", it is stored in
b15
D
b8 b7
69H(i)
65H(e)
6FH(o)
31H(1)
74H(t)
72H(r)
20H(space)
20H(space)
b0
29
4CH(L)
6EH(n)
4EH(N)
2EH(.)
53H(S)
61H(a)
74H(t)
20H(space)
FNC250-FNC269
Data Table
Operation
Comment of S
LineNo.1Start
30
FNC270-FNC276
Ex-Device
+0
+1
+2
+3
+4
+5
+6
+7
+8
FNC220-FNC249
Data
Comparison
- When M8091 is OFF, "0000H" is written to the device following the final character.
- When M8091 is ON, the device following the final character does not change.
FNC210-FNC219
Data
Operation 3
25
FNC190-FNC199
Block Data
Operation
1)
24
FNC181-FNC189
Others
3. Applicable devices
Operand
Type
22
FNC170-FNC179
External Device
This instruction reads the comment data for registered devices written to the PLC by programming software such as
GX Works2.
0000H
- When M8091 is OFF, "0000H" is written to the next device following the final character.
- When M8091 is ON, the device following the final character does not change.
587
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2)
ON/OFF status
Contents of processing
M8091 = OFF
When M8091 is OFF, "0000H" is written to in the device following the final character.
M8091 = ON
When M8091 is ON, the device following the final character does not change.
Related device
Device
Name
Description
M8091
Caution
Specify a device number in device
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When a comment is not registered for the device
When the range of points used from
(error code: K6706)
Program example
In the program shown below, the comment "Target Line A" registered to D100 is stored in ASCII code in D0 and later
when X010 is set to ON. And since M8091 is OFF "0000H" is written to the device following the last character.
X010
FNC182
COMRDP
RST
M8091
D100
D0
END
b15
Comment of D100
Target Line A
588
D0
D1
D2
D3
D4
D5
D6
D7
D8
b8 b7
61H(a)
67H(g)
74H(f)
4CH(L)
6EH(n)
20H(space)
20H(space)
20H(space)
b0
54H(T)
72H(r)
65H(e)
20H(space)
69H(i)
65H(e)
41H(A)
20H(space)
0000H
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
24.2
Outline
22
FNC170-FNC179
External Device
1. Instruction format
FNC 184
P
RND
Mnemonic
16-bit Instruction
Operation Condition
RND
RNDP
3 steps
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
23
Operand Type
Description
Data Type
FNC180
Alternate
Instructions
2. Set data
16-bit binary
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
25
This instruction generates a pseudo-random number ranging from 0 to 32767, and stores it as a random number to
D .
In the pseudo-random number sequence, the source value of a random number is calculated at every time, and this
instruction calculates a pseudo-random number using the source value.
26
FNC200-FNC209
Character String
Control
FNC 184
RND
*1.
To (D8311, D8310), write a non-negative value (0 to 2,147,483,647) only once when the PLC mode switches
from STOP to RUN.
[K1 is written to (D8311, D8310) as the initial value when the power is restored.]
Program example
M8002
FNC166
TRD
FNC164
DHTOS
D0
D3
D14
D0
D1
D10
FNC 23
MUL
D10
D2
D12
FNC 20
DADD
D14
D12
D8310
30
D100
FNC270-FNC276
Ex-Device
FNC184
RNDP
29
FNC250-FNC269
Data Table
Operation
FNC 20
ADD
28
FNC220-FNC249
Data
Comparison
In the program example shown below, a random number is stored to D100 every time X010 turns ON.
When the PLC mode switches from STOP to RUN, the time data converted into seconds and added by the value
(Year + Month) Day is written to D8311 and D8310.
27
FNC210-FNC219
Data
Operation 3
X010
FNC190-FNC199
Block Data
Operation
Command
input
24
FNC181-FNC189
Others
Operand
Type
END
589
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
24.3
Outline
This instruction generates the timing signal whose one cycle corresponds to the specified number of operation cycles.
1. Instruction format
FNC 186
DUTY
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Continuous
Operation
DUTY
Operation Condition
2. Set data
Operand Type
Description
Data Type
n1
n2
16-bit binary
Bit
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
n1
n2
FNC186
DUTY
is set to ON and OFF with the ON duration for "n1" scans and OFF
n1
n2
0
"n1+n2" scans
2)
Specify either one among M8330 to M8334 as the timing clock output destination device
3)
The counted number of scans is stored among D8330 to D8334 in accordance with the timing clock output
destination device D .
The counted number of scans stored among D8330 to D8334 is reset when the counted value reaches "n1+n2" or
when the command input (instruction) is set to ON.
Timing clock output destination device
590
M8330
D8330
M8331
D8331
M8332
D8332
M8333
D8333
M8334
D8334
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
When the command input is set to ON, the operation is started. The timing clock output destination device D
is set to ON or OFF by the END instruction.
Even if the command input is set to OFF, the operation is not stopped.
In the STOP mode, the operation is suspended. When the power to the PLC is turned OFF, the operation is
stopped.
5)
ON/OFF status
n1 = 0, n2 0
Fixed to OFF
n1 > 0, n2 = 0
Fixed to ON
23
Related devices
Name
FNC180
Alternate
Instructions
Device
Description
M8330
M8331
M8332
M8333
M8334
D8330
Counted number of scans for timing clock output 1 in the DUTY (FNC186) instruction
D8331
Counted number of scans for timing clock output 2 in the DUTY (FNC186) instruction
D8332
Counted number of scans for timing clock output 3 in the DUTY (FNC186) instruction
D8333
Counted number of scans for timing clock output 4 in the DUTY (FNC186) instruction
D8334
Counted number of scans for timing clock output 5 in the DUTY (FNC186) instruction
24
FNC181-FNC189
Others
25
FNC190-FNC199
Block Data
Operation
26
Caution
It is not permitted, however, to use the same timing clock output destination device
(FNC186) instructions.
Errors
When "n1" and/or "n2" is less than "0" (error code: K6706)
When any device other than M8330 to M8334 is set to
Program example
28
In the program shown below, when X000 is set to ON, M8330 is set to ON for 1 scan and OFF for 3 scans.
FNC186
DUTY
K1
K3
FNC220-FNC249
Data
Comparison
X000
M8330
END
29
FNC250-FNC269
Data Table
Operation
OFF ON
M8330 OFF ON
1 scan
3 scans
30
FNC270-FNC276
Ex-Device
3
2
D8330
current value
1
0
27
FNC210-FNC219
Data
Operation 3
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
FNC200-FNC209
Character String
Control
X000
22
FNC170-FNC179
External Device
n1/n2 status
FNC160-FNC169
Real Time Clock
Control
4)
1
0
591
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
24.4
Outline
This CRC instruction calculates the CRC (cyclic redundancy check) value which is an error check method used in
communication.
In addition to CRC value, there are other error check methods such as parity check and sum check. For obtaining the
horizontal parity value and sum check value, CCD (FNC 84) instruction is available.
For the generation of CRC value (CRC-16), the CRC instruction uses X16 + X15 + X2 + 1 as a polynomial and uses
"FFFFH" as a default value.
For CCD instruction (check code), refer to Section 16.5.
1. Instruction format
FNC 188
P
CRC
16-bit Instruction
Mnemonic
Operation Condition
CRC
CRCP
7 steps
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
Description
Data Type
Head device number storing data for which the CRC value is generated
16-bit binary
Number of 8-bit (1-byte) data for which the CRC value is generated or the device number
storing the number of data
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
S
D
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
592
FNC188
CRC
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
in
M8000
22
FNC170-FNC179
External Device
Command
input
Example:
= D100
Device
+1
+2
01H
High-order byte
03H
Low-order byte
03H
High-order byte
02H
Low-order byte
00H
High-order byte
14H
0203H
1400H
Low-order byte
Low-order bits of D0
E4H
High-order byte
High-order bits of D0
41H
41E4H
, and high-order
+1.
M8000
M8161 8-bit conversion mode
Command
input
FNC188
CRC
27
D
n=
= D0
6
Device
Low-order byte
01H
+1
Low-order byte
03H
+2
Low-order byte
03H
+3
Low-order byte
02H
+4
Low-order byte
00H
+5
Low-order byte
14H
...
+n-1
+1
29
Low-order byte
Low-order byte
Low-order bits of D0
E4H
Low-order byte
Low-order bits of D1
41H
28
FNC250-FNC269
Data Table
Operation
S
Device storing the
generated CRC value
= D100
FNC220-FNC249
Data
Comparison
FNC210-FNC219
Data
Operation 3
Example:
26
FNC200-FNC209
Character String
Control
24
25
High-order byte
0301H
FNC190-FNC199
Block Data
Operation
Low-order byte
+n/2-1
16 bits
...
...
8 bits
Low-order byte
FNC181-FNC189
Others
23
= D0
6
FNC180
Alternate
Instructions
D
n=
FNC160-FNC169
Real Time Clock
Control
30
FNC270-FNC276
Ex-Device
593
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. Related device
Related device
Description
M8161*1
*1.
ON
OFF
Caution
In this instruction, X16 + X15 + X2 + 1 is used as a polynomial for generating the CRC value (CRC-16). There are
many other standard polynomials for generating the CRC value. Note that the CRC value completely differs if an
adopted polynomial is different.
Reference: Major polynomials for generating the CRC value
Name
Polynomial
CRC-12
X12
x11
X15
X3
X2
CRC-16
16
X2
CRC-32
+1
CRC-CCITT
X16 + X12 + X5 + 1
+X+1
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When any digits other than 4 digits are specified as
K6706)
or
594
+n-1 or
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
In the program example shown below, the CRC value of the ASCII code 0123456 stored in D100 to D106 is
generated and stored to D0 when M0 turns ON.
M0
FNC188
CRC
D100
D0
22
FNC170-FNC179
External Device
M8161
K7
23
Contents of data
D101
3332H
D102
3534H
D103
Device storing generated CRC value
3736H
D0
2ACFH
Low-order byte
30H
High-order byte
31H
Low-order byte
32H
High-order byte
33H
Low-order byte
34H
High-order byte
35H
Low-order byte
36H
Low-order byte
CFH
High-order byte
2AH
24
FNC181-FNC189
Others
3130H
FNC180
Alternate
Instructions
Target data
D100
25
FNC190-FNC199
Block Data
Operation
FNC188
CRC
D100
D0
26
K7
FNC200-FNC209
Character String
Control
D100
Low-order byte
30H
D101
Low-order byte
31H
D102
Low-order byte
32H
D103
Low-order byte
33H
D104
Low-order byte
34H
D105
Low-order byte
35H
D106
Low-order byte
36H
D0
Low-order byte
CFH
D1
Low-order byte
2AH
27
FNC210-FNC219
Data
Operation 3
FNC160-FNC169
Real Time Clock
Control
Program example
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
595
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
24.5
Outline
This instruction updates the current value of a specified high-speed counter or ring counter.
The function of this instruction varies depending on the PLC version.
1. Instruction format
FNC 189
D HCMOV
16-bit Instruction
Mnemonic
Operation Condition
Operation Condition
Continuous
Operation
13 steps DHCMOV
2. Set data
Operand Type
*1.
Description
Data Type
Specification to clear the current value of high-speed counter or ring counter*1 (transfer
source) after transfer [clear (K1), no clear (K0)]
32-bit binary
16-bit binary
Ring counters (D8099 and D8398) cannot be specified in FX3UC PLCs before Ver. 2.20.
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S S
S
D
n
S: Only high-speed counters (C235 to C255) and ring counters (D8099 and D8398) can be specified.
FNC189
DHCMOV
Ring counter
[
C235 to C255
D8099
D8398
+1,
+1,
].
is transferred to [
+1,
+1,
"0" is stored in
+1.
After transfer, the current value of the high-speed counter or ring counter is processed as shown in the table below
depending on the set value of "n":
"n" set value
596
Operation
K0 (H0)
K1 (H1)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
1)
Software counter
By using DHCMOV instruction, the current value can be updated and transferred when it is executed.
2)
23
Program EI (FNC 04) and FEND (FNC 06) instructions in the main program. They are necessary to execute an
input interrupt program.
For EI (FNC 04) and FEND (FNC 06) instructions, refer to Section 8.5 and Section 8.7.
2)
When programming DHCMOV instruction in the 1st line in an input interrupt program, make sure to use the
pattern program shown below. Make sure to use the command contact M8394. Do not add, change, or delete this
pattern program when writing during RUN. Interrupt programs may not operate normally.
M8394
FNC189
DHCMOV
27
FNC210-FNC219
Data
Operation 3
1)
26
FNC200-FNC209
Character String
Control
When programming DHCMOV instruction in an input interrupt program, the following points should be observed.
For assignment of pointers for input interrupt and inputs, refer to the table shown in 5) below.
25
FNC190-FNC199
Block Data
Operation
Cautions
24
FNC181-FNC189
Others
When DHCMOV instruction is used just before a comparison instruction (CMP, ZCP or comparison contact
instruction), the latest value of a high-speed counter is used in comparison. The following points must be kept
in mind when using the DHCMOV command.
- When the current value of a high-speed counter is compared using CMP, ZCP or comparison contact
instruction (not using a designated high-speed counter comparison instruction), a hardware counter does
not change into a software counter.
For the condition in which a hardware counter is handled as a software counter, refer to Subsection 4.8.9.
- When the number of high-speed software counter comparison instructions is reduced, the total frequency
limitation is decreased.
For the limitation in software counters by the total frequency, refer to Subsection 4.8.10.
- When it is necessary to execute comparison and change an output contact (Y) as soon as the current value
of a high-speed counter changes, use a designated high-speed counter comparison instruction (HSCS,
HSCR or HSZ).
- DHCMOV instruction can be used as many times as necessary.
FNC180
Alternate
Instructions
By using both input interrupt and DHCMOV instruction, the current value of a high-speed counter can be
received at the rising edge or falling edge of an external input (at reception of input interrupt).
Refer to the Program example 2.
22
FNC170-FNC179
External Device
FNC160-FNC169
Real Time Clock
Control
2. High-speed counter current value update timing and the effect of DHCMOV instruction
28
FNC220-FNC249
Data
Comparison
FNC 03
IRET
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
597
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
If two or more DHCMOV instructions are used in one input interrupt program, only the first instruction (just after
the interrupt pointer) is executed when the interrupt is generated.
The rest of the interrupt, including additional DHCMOV instructions, is executed according to normal interrupt
processing.
Do not use M8394 as the command contact for the DHCMOV instructions following the first.
I301
M8394
M8000
FNC189
DHCMOV
FNC189
DHCMOV
'
D
'
n'
FNC 03
IRET
4)
It is not permitted to use DHCMOV instruction for the same counter in two or more input interrupt programs.
I000 M8394
FNC189
DHCMOV
C236
D0
FNC03
IRET
Same counter
I200
M8394
FNC189
DHCMOV
K0
C236
D2
K1
FNC03
IRET
5)
While input interrupts are disabled by the interrupt disable flags (shown in the table below), DHCMOV instructions
are not executed when they are placed inside a corresponding interrupt.
Interrupt disable flag
M8050*1
I000,I001
X000
M8051*1
I100,I101
X001
M8052*1
I200,I201
X002
M8053*1
I300,I301
X003
M8054*1
I400,I401
X004
M8055*1
I500,I501
X005
If an input interrupt is generated while input interrupts are disabled by something other than the interrupt disable
flags M8050 to M8055 (after execution of DI instruction and before execution of EI instruction), DHCMOV
instruction is immediately executed, but execution of the interrupt program is held. The interrupt program will be
executed after EI instruction is executed and interrupts are enabled.
FX3UC
Ver. 2.20 or
later
Ver. 2.20 or
later
Item
Target device
Outline of function
Ring counter (D8099 and D8398) can be specified in
Error
An operation error occurs in the following case; The error flag M8067 turns ON, and the error code is stored in D8067.
When a device specified in
598
or [ D
+1,
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
1. Program example 1
In the program example below, the current value of the high-speed counter C235 is compared in each operation cycle,
and then the output Y000 is set to ON if the current value is "K500" or more (when the current value of C235 is not
cleared).
FNC189
DHCMOV
FNC238
DAND>=
D0
C235
D0
K500
K0*1
Y000
23
FNC180
Alternate
Instructions
END
*1.
K0: The current value of the high-speed counter is not cleared when DHCMOV instruction is executed.
K1: The current value of the high-speed counter is cleared when DHCMOV instruction is executed.
2. Program example 2
FNC 04
EI
25
M8394
FNC189
DHCMOV
C235
D200
K1*2
*2.
26
FNC200-FNC209
Character String
Control
FNC 03
IRET
FNC190-FNC199
Block Data
Operation
FNC 06
FEND
I101
24
FNC181-FNC189
Others
In the program example shown below, the current value of C235 is transferred to D201 and D200, and the current
value of C235 is cleared when X001 turns from OFF to ON.
0
22
FNC170-FNC179
External Device
M8000
FNC160-FNC169
Real Time Clock
Control
Program examples
K0: The current value of the high-speed counter is not cleared when DHCMOV instruction is executed.
K1: The current value of the high-speed counter is cleared when DHCMOV instruction is executed.
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
599
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
600
FNC No.
Mnemonic
Symbol
Function
Reference
190
191
192
BK+
BK+
S1 S2 D n
Section 25.1
193
BK
BK-
S1 S2 D n
Section 25.2
194
BKCMP=
BKCMP= S1 S2 D n
S1 = S2
Section 25.3
195
BKCMP>
BKCMP> S1 S2 D n
S1 > S2
Section 25.3
196
BKCMP<
BKCMP< S1 S2 D n
S1 < S2
Section 25.3
197
BKCMP<>
BKCMP<> S1 S2 D n
S1 S2
Section 25.3
198
BKCMP<=
BKCMP<= S1 S2 D n
S1 S2
Section 25.3
199
BKCMP>=
BKCMP>= S1 S2 D n
S1 S2
Section 25.3
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
25.1
Outline
22
FNC 192
P
BK+
16-bit Instruction
9 steps
Mnemonic
Operation Condition
BK+
BK+P
Operation Condition
DBK+
17 steps
DBK+P
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
FNC180
Alternate
Instructions
24
Description
S2
FNC181-FNC189
Others
S1
Number of data
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S1
S2
26
FNC200-FNC209
Character String
Control
FNC192
BK+
S1
27
S2
S2
+(n-2)
+(n-1)
S2
"n"
points
+0
+1
+2
+(n-2)
+(n-1)
K-1234
K4000
b15
b0
K4000
K1234
K-1234
+0
+1
+2
"n"
points
+(n-2)
+(n-1)
K5000
K4321
K-1234
K4000
S2
K4321
28
"n"
points
K3766
K8321
29
"n"
points
b15
b0
K5234
K5801
K-3234
+0
+1
+2
+(n-2)
+(n-1)
b15
b0
K5555
K8888
K2321
"n"
points
30
K3087
K8321
FNC270-FNC276
Ex-Device
+(n-2)
+(n-1)
b15
b0
K1234
K4567
K-2000
+0
+1
+2
, and the
FNC250-FNC269
Data Table
Operation
2)
b15
b0
K1234
K4567
K-2000
S1
FNC220-FNC249
Data
Comparison
S1
FNC210-FNC219
Data
Operation 3
1)
25
FNC190-FNC199
Block Data
Operation
Operand
Type
23
Data Type
2. Set data
Operand Type
FNC170-FNC179
External Device
1. Instruction format
601
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1)
FNC192
DBK+P
S1
S2
+1, S1
+1,
S2
[ S1 +1, S1 ]
[ S1 +3, S1 +2]
[ S1 +5, S1 +4]
b31
b0
K1234
K40000
K-2000
"n"
points +
K-1234
K4000
[ S1 +2n-3, S1 +2n-4]
[ S1 +2n-1, S1 +2n-2]
[ S2 +1, S2 ]
[ S2 +3, S2 +2]
[ S2 +5, S2 +4]
b31
b0
K4000
K1234
K-1234
+1,
].
"n"
points
K5000
K4321
[ S2 +2n-3, S2 +2n-4]
[ S2 +2n-1, S2 +2n-2]
[ D +1, D ]
[ D +3, D +2]
[ D +5, D +4]
2)
b31
b0
K5234
K41234
K-3234
[ D +2n-3, D +2n-4]
[ D +2n-1, D +2n-2]
K3766
K8321
+1, S2
[ S1 +1, S1 ]
[ S1 +3, S1 +2]
[ S1 +5, S1 +4]
b31
b0
K1234
K40000
K-2000
[ S1 +2n-3, S1 +2n-4]
[ S1 +2n-1, S1 +2n-2]
"n"
points
[ S2 +1, S2 ]
"n"
points
].
K4321
K-1234
K4000
[ D +1, D ]
[ D +3, D +2]
[ D +5, D +4]
b31
b0
K5555
K44321
K2321
[ D +2n-3, D +2n-4]
[ D +2n-1, D +2n-2]
"n"
points
K3087
K8321
Related instruction
Instruction
BK- (FNC193)
Description
Subtracts binary block data.
Caution
When underflow or overflow occurs in the operation result, the following processing is executed. At this time, the
carry flag does not turn ON.
- In the case of 16-bit operation
K32767(H7FFF)
K2(H0002)
K-32767(H8001)
K-32768(H8000)
K-2(HFFFE)
K32766(H7FFE)
K2(H00000002)
K-2,147,483,647(H80000001)
K-2,147,483,648(H80000000)
K-2(HFFFFFFFE)
K2,147,483,646(H7FFFFFFE)
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DBK+ D0 D100 D200 R0", "n" is [R1, R0].
602
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
, S2
starting from
D
D
, and/or
23
Program example
FNC192
BK+
D100
D150
D200
D0
When D0 is "4"
24
b15
b0
D0
b15
D150
D151
D152
D153
b0
1234
2032
-3252
-1000
b15
D200
D201
D202
D203
b0
8023
9853
2180
2520
25
FNC190-FNC199
Block Data
Operation
6789
7821
5432
3520
FNC181-FNC189
Others
END
D100
D101
D102
D103
FNC180
Alternate
Instructions
In the program shown below, the specified number of data stored in D150 to D0 are added to the specified number of
data stored in D100 to D0 when X020 is set to ON, and the operation result is stored in D200 and later.
X020
22
FNC170-FNC179
External Device
FNC160-FNC169
Real Time Clock
Control
Errors
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
603
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
25.2
Outline
This instruction subtracts binary block data.
1. Instruction format
FNC 193
P
BK
16-bit Instruction
9 steps
Mnemonic
Operation Condition
BK
BKP
Operation Condition
DBK
17 steps
DBKP
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
S1
S2
Number of data
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S1
S2
D
n
1)
FNC193
BK-P
S1
S2
+0
+1
+2
+(n-2)
+(n-1)
2)
+0
+1
+2
S2
"n"
points
K5000
K4352
+(n-2)
+(n-1)
b15
b0
K1234
K5678
K9876
+0
+1
+2
+(n-2)
+(n-1)
b15
b0
K8765
K8888
K9325
K5000
K4352
+0
+1
+2
"n"
points
K4321
K4000
b15
b0
K7531
K3210
K-551
.
b15
S2
K8880
b0
+0
+1
+2
K-115
K8
K445
+(n-2)
+(n-1)
K-3880
K-4528
"n"
points
"n"
points
K679
K352
+(n-2)
+(n-1)
604
b15
b0
K8765
K8888
K9325
"n"
points
, and the
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
Command
input
1)
FNC193
DBK-P
S1
S2
+1,
S2
b0
K8765
K8888
K9325
[ S1 +2n-3, S1 +2n-4]
[ S1 +2n-1, S1 +2n-2]
K50000
K4352
b31
"n"
points
].
b0
[ S2 +1, S2 ]
[ S2 +3, S2 +2]
[ S2 +5, S2 +4]
K1234
K5678
K9876
[ S2 +2n-3, S2 +2n-4]
[ S2 +2n-1, S2 +2n-2]
K4321
K4000
23
"n"
points
b31
K7531
K3210
K-551
[ D +2n-3, D +2n-4]
[ D +2n-1, D +2n-2]
K45679
K352
[ S1 +2n-3, S1 +2n-4]
[ S1 +2n-1, S1 +2n-2]
"n"
points
[ S2 +1, S2 ]
+1, S2
"n"
points
].
25
K8880
K50000
K4352
b31
26
b0
K-115
K8
K445
"n"
points
K41120
K-4528
27
FNC210-FNC219
Data
Operation 3
Related instruction
Instruction
FNC200-FNC209
Character String
Control
[ D +1, D ]
[ D +3, D +2]
[ D +5, D +4]
[ D +2n-3, D +2n-4]
[ D +2n-1, D +2n-2]
BK+ (FNC192)
24
FNC190-FNC199
Block Data
Operation
b31
b0
[ S1 +1, S1 ]
K8765
[ S1 +3, S1 +2]
K8888
[ S1 +5, S1 +4]
K9325
b0
[ D +1, D ]
[ D +3, D +2]
[ D +5, D +4]
FNC181-FNC189
Others
2)
22
FNC180
Alternate
Instructions
[ S1 +1, S1 ]
[ S1 +3, S1 +2]
[ S1 +5, S1 +4]
+1,
FNC170-FNC179
External Device
[ S1
FNC160-FNC169
Real Time Clock
Control
Description
Adds binary block data.
28
When underflow or overflow occurs in the operation result, the following processing is executed. At this time, the
carry flag does not turn ON.
- In the case of 16-bit operation
K-32768(H8000)
K2(H0002)
K32766(H7FFE)
K32767(H7FFF)
K-2(HFFFE)
K-32767(H8001)
FNC220-FNC249
Data
Comparison
Caution
29
FNC250-FNC269
Data Table
Operation
K2(H00000002)
K2,147,483,646(H7FFFFFFE)
K2,147,483,647(H7FFFFFFF)
K-2(HFFFFFFFE)
K-2,147,483,647(H80000001)
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DBK - D0 D100 D200 R0", "n" is [R1, R0].
30
FNC270-FNC276
Ex-Device
605
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When "n" ("2n" in 32-bit operation) devices starting from S1
device range (error code: K6706)
, S2
starting from
, and/or
Program example
In the program shown below, the constant "8765" is subtracted from the data stored in D100 to D102 when X010 is set
to ON, and the operation result is stored in D200 and later.
X010
FNC193
BK-P
D100
K8765
D200
K3
END
D100
D101
D102
606
b15
b0
K12345
K8701
K3502
b15
b0
K8765
D200
D201
D202
b15
b0
K3580
K-64
K-5263
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC194~199 BKCMP=, >, <, < >, <=, >= / Block Data Compare
FNC160-FNC169
Real Time Clock
Control
25.3
25.3 FNC194~199 BKCMP=, >, <, < >, <=, >= / Block Data Compare
Outline
22
These instructions compare block data in the comparison condition set in each instruction.
FNC 194
D BKCMP= P
16-bit Instruction
9 steps
FNC 197
D BKCMP<> P
16-bit Instruction
FNC 198
D BKCMP<= P
16-bit Instruction
FNC 199
D BKCMP>= P
16-bit Instruction
9 steps
Mnemonic
Mnemonic
17 steps
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
DBKCMP<
DBKCMP<P
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
DBKCMP<>
17 steps
DBKCMP<>P
Operation Condition
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
DBKCMP>=
17 steps
DBKCMP>=P
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
DBKCMP<=
17 steps
DBKCMP<=P
Continuous
Operation
Pulse (Single)
Operation
BKCMP>=
9 steps
BKCMP>=P
DBKCMP>
DBKCMP>P
Continuous
Operation
Pulse (Single)
Operation
BKCMP<=
9 steps
BKCMP<=P
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
BKCMP<>
9 steps
BKCMP<>P
Mnemonic
17 steps
Operation Condition
BKCMP<
BKCMP<P
Mnemonic
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
Continuous
Operation
Pulse (Single)
Operation
S2
28
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
S2
D
29
FNC250-FNC269
Data Table
Operation
Operand
Type
27
FNC220-FNC249
Data
Comparison
26
Bit
Data Type
S1
25
FNC210-FNC219
Data
Operation 3
Description
24
23
FNC200-FNC209
Character String
Control
16-bit Instruction
Operation Condition
BKCMP>
BKCMP>P
Operation Condition
DBKCMP=
17 steps
DBKCMP=P
FNC190-FNC199
Block Data
Operation
FNC 196
D BKCMP< P
9 steps
Mnemonic
Continuous
Operation
Pulse (Single)
Operation
FNC181-FNC189
Others
16-bit Instruction
Operation Condition
FNC180
Alternate
Instructions
FNC 195
D BKCMP> P
Mnemonic
BKCMP=
BKCMP=P
FNC170-FNC179
External Device
1. Instruction format
30
FNC270-FNC276
Ex-Device
607
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
25.3 FNC194~199 BKCMP=, >, <, < >, <=, >= / Block Data Compare
S1
S1
+0
+1
+2
K1234
K5678
K5000
+n-2
+n-1
K7777
K4321
S1
S2
+0
+1
+2
K5321
K3399
K5678
+n-2
+n-1
K6543
K1200
S2
"n"
points
*3
>
, and the
.
*1 The number out of 194 to 199 is put in "OOO".
*2 The symbol out of "=", ">", "<", "<>", "<=", or
">=" corresponding to the FNC No. is put in .
Comparison result
+0
OFF(0)
+1
ON(1)
+2
OFF(0)
"n"
points
"n"
points
+n-2
+n-1
ON(1)
ON(1)
2)
K32000
K4321
K32000
K1234
K5678
S2
*4
S1
3)
K32000
608
Comparison result
+0
ON(1)
OFF(0)
+1
ON(1)
+2
"n"
points
"n"
points
OFF(0)
OFF(0)
+n-2
+n-1
4)
BKCMP= (FNC194)
S1
S2
S1
<>
S2
BKCMP> (FNC195)
S1
>
S2
S1
<=
S2
BKCMP< (FNC196)
S1
<
S2
S1
>=
S2
BKCMP<> (FNC197)
S1
<>
S2
S1
S2
BKCMP<= (FNC198)
S1
<=
S2
S1
>
S2
BKCMP>= (FNC199)
S1
>=
S2
S1
<
S2
When the comparison result is ON (1) in all of "n" points starting from
turns ON.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
25.3 FNC194~199 BKCMP=, >, <, < >, <=, >= / Block Data Compare
21
1)
+1, S2
+1,
S1
Command
input
FNCOOO*1
DBKCMP
S1
*2
S2
[ S1 +2n-3, S1 +2n-4]
[ S1 +2n-1, S1 +2n-2]
K40000
K4321
"n"
points
[ S2 +1, S2 ]
[ S2 +3, S2 +2]
[ S2 +5, S2 +4]
K5321
K3399
K5678
[ S2 +2n-3, S2 +2n-4]
[ S2 +2n-1, S2 +2n-2]
K6543
K1200
*3
>
"n"
points
+1, S1
[ S2 +2n-3, S2 +2n-4]
[ S2 +2n-1, S2 +2n-2]
K1234
K5678
25
"n"
points
FNC200-FNC209
Character String
Control
OFF(0)
OFF(0)
27
FNC210-FNC219
Data
Operation 3
The table below shows the comparison result for each instruction:
Instruction
DBKCMP= (FNC194)
[ S1
+1, S1
] = [ S2
+1, S2
DBKCMP> (FNC195)
[ S1
+1, S1
] > [ S2
+1, S2
[ S1
+1, S1
] <= [ S2
+1, S2
DBKCMP< (FNC196)
[ S1
+1, S1
]< [ S2
+1, S2
[ S1
+1, S1
] >= [ S2
+1, S2
DBKCMP<> (FNC197)
[ S1
+1, S1
] [ S2
+1, S2
[ S1
+1, S1
] = [ S2
+1, S2
DBKCMP<= (FNC198)
[ S1
+1, S1
] <= [ S2
+1, S2
[ S1
+1, S1
] > [ S2
+1, S2
DBKCMP>= (FNC199)
[ S1
+1, S1
] >= [ S2
+1, S2
[ S1
+1, S1
] < [ S2
+1, S2
[ S1
+1, S1
] [ S2
+1, S2
28
FNC220-FNC249
Data
Comparison
29
For the block comparison signal use method, refer to Subsection 6.5.2.
FNC250-FNC269
Data Table
Operation
4)
26
Comparison result
+0
ON(1)
+1
OFF(0)
+2
ON(1)
"n"
points
+n-2
+n-1
3)
When the comparison result is ON (1) in all of "n" points starting from [ D
comparison signal) turns ON.
+1,
Related device
Device
Name
Description
Turns ON when all comparison results are "ON (1)" in a block data instruction.
DBKCMP= (FNC194), DBKCMP> (FNC195), DBKCMP< (FNC196), DBKCMP<> (FNC197),
DBKCMP<= (FNC198), and DBKCMP>= (FNC199)
609
30
FNC270-FNC276
Ex-Device
M8090
24
FNC190-FNC199
Block Data
Operation
K32000
K4321
K32000
K32000
].
[ S2 +1, S2 ]
[ S2 +3, S2 +2]
[ S2 +5, S2 +4]
*4
[ S1 +1, S1 ]
ON(1)
ON(1)
FNC181-FNC189
Others
22
23
Comparison result
+0
OFF(0)
+1
ON(1)
+2
OFF(0)
"n"
points
+n-2
+n-1
2)
].
FNC180
Alternate
Instructions
K1234
K5678
K5000
FNC170-FNC179
External Device
[ S1 +1, S1 ]
[ S1 +3, S1 +2]
[ S1 +5, S1 +4]
+1,
FNC160-FNC169
Real Time Clock
Control
2. 32-bit operation (DBKCMP=, >, <, <>, <=, >= / DBKCMP=P, >P, <P, <>P, <=P, and >=P)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
25.3 FNC194~199 BKCMP=, >, <, < >, <=, >= / Block Data Compare
Caution
When using 32-bit counters (including 32-bit high-speed counters)
For comparing 32-bit counters and 32-bit high-speed counters (C200 to C255), make sure to use an instruction for
32-bit operation (DBKCMP=, DBKCMP>, DBKCMP<, DBKCMP<>, DBKCMP<=, or DBKCMP>=).
If an instruction for 16-bit operation (BKCMP=, BKCMP>, BKCMP<, BKCMP<>, BKCMP<=, or BKCMP>=) is used,
an operation error is caused (error code: K6705).
Note that the 32-bit value [n+1, n] is valid when D or R is specified as "n" in a 32-bit instruction.
In the case of "DBKCMP = D0 D100 M0 R0", "n" is [R1, R0].
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the range of "n" ("2n" in 32-bit operation) points starting from S1
corresponding device range (error code: K6706)
When the range of "n" points starting from
When data registers starting from
from S1
exceeds the
specified as "D .b" overlap "n" ("2n" in 32-bit operation) points starting
specified as "D .b" overlap "n" ("2n" in 32-bit operation) points starting
and/or S2
When a 32-bit counter (C200 to C255) is specified in S1 and/or S2 in 16-bit operation (error code: K6705)
For comparing 32-bit counters, make sure to use an instruction for 32-bit operation (DBKCMP=, DBKCMP>,
DBKCMP<, DBKCMP<>, DBKCMP<=, or DBKCMP>=).
Program example
1)
In the program shown below, four 16-bit binary data starting from D100 are compared with four 16-bit binary data
starting from D200 by BKCMP= (FNC194) instruction when X020 is set to ON, and the comparison result is stored
in four points starting from M10.
When the comparison result is "ON (1)" in all of the four points starting from M10, Y000 is set to ON.
X020
FNC194
BKCMP=
M8090
D100
D200
M10
K4
Y000
END
D100
D101
D102
D103
K1000
K2000
K3000
K4000
D200
D201
D202
D203
K1000
K2000
K5000
K4000
M10
M11
M12
M13
Comparison
result
ON
ON
OFF
ON
Y000
OFF
2)
In the program shown below, the constant K1000 is compared with four data starting from D10 when X010 is set
to ON, and the comparison result is stored in b4 to b7 of D0.
X010
FNC197
BKCMP<>
K1000
D10
D0.4
K4
END
K1000
610
<>
D10
D11
D12
D13
K2000
K1000
K1000
K2222
b7
b4
b0
b15
D0 before
operation 0 1 0 0 0 0 1 0 0 0 1 0 0 0 0 0
D0 after
operation
b15
b7
b4
b0
0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
Symbol
Function
200
STR
STR
S1 S2 D
201
VAL
VAL
S D1 D2
202
$+
$+
S1 S2 D
203
LEN
204
RIGHT
205
LEN
S D
Reference
Section 26.1
Section 26.2
Section 26.3
Section 26.4
23
Section 26.5
LEFT
LEFT
S D n
Section 26.6
206
MIDR
MIDR S1 D S2
Section 26.7
207
MIDW
MIDW S1 D S2
Section 26.8
208
INSTR
INSTR S1 S2 D n
Section 26.9
209
$MOV
$MOV S D
Section
26.10
25
26
FNC200-FNC209
Character String
Control
S D n
FNC190-FNC199
Block Data
Operation
RIGHT
24
FNC181-FNC189
Others
Mnemonic
FNC180
Alternate
Instructions
FNC No.
22
FNC170-FNC179
External Device
FNC200 to FNC209 provide instructions for controlling character strings such as linking character string data,
replacing some characters and extracting character string data.
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
611
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
26.1
Outline
This instruction converts binary data into character strings (ASCII codes).
On the other hand, the ESTR (FNC116) instruction converts floating point data into character strings.
For character strings, refer to Section 5.3.
For ESTR (FNC116) instruction, refer to Section 18.4.
1. Instruction format
FNC 200
D
P
STR
16-bit Instruction
7 steps
Mnemonic
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
STR
STRP
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DSTR
DSTRP
2. Set data
Operand Type
Description
Data Type
S1
Head device number storing the number of digits of a numeric value to be converted
S2
16-bit binary
16- or 32-bit binary
Character string
3. Applicable devices
Operand
Type
S1
S2
D
612
Bit Devices
System User
Word Devices
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
S1 +0
S1
S2
+0
of decimal part
+1
+2
+3
Sign
+1
b15
D
- 1 2
b8 b7
b0
+0
31H(1)
2DH(-)
+1
2EH(.)
32H(2)
+2
00H
33H(3)
For number of
all digits
S1 =5
-123
26
ranging from 2 to 8.
3)
4)
5)
- As the sign, "space" (20H) is stored when the 16-bit binary data stored in S2
3 4
Number of digits of
decimal part
It is automatically
added.
Number of
digits of
decimal part
16-bit
binary data
12
28
29
0 1 2
It is automatically
added.
FNC250-FNC269
Data Table
Operation
Number of
all digits
1 2
27
FNC220-FNC249
Data
Comparison
FNC210-FNC219
Data
Operation 3
FNC200-FNC209
Character String
Control
2)
25
FNC190-FNC199
Block Data
Operation
S2
24
5
1
16-bit binary
data
For number of
all digits
For value
stored in S1
FNC181-FNC189
Others
S1 +0
23
0000H
+4
16-bit binary
data
b0
FNC180
Alternate
Instructions
+1 Number of digits
S2
b8 b7
b15
Number of all
digits
22
FNC170-FNC179
External Device
Command
input
FNC200
STR
and later.
FNC160-FNC169
Real Time Clock
Control
30
FNC270-FNC276
Ex-Device
613
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Number of
all digits
Number of
digits of
decimal part
16-bit
binary data
-123
1 2
3
"20H" (space) is
stored in each digit.
excluding the sign and decimal point is smaller than the number of digits of 16-bit binary data stored in
S2 , an error is caused.
- "00H" indicating the end of a character string is automatically stored at the end of a converted character string.
When the number of all digits is even, "0000H" is stored in the device after the last character.
When the number of all digits is odd, "00H" is stored in the high-order byte (8 bits) of the device storing the final
character.
All digits (specified by S1 ) of 32-bit binary data stored in [ S2 +1, S2 ] are converted into ASCII codes
while the decimal point is added to the position specified by the device storing the number of digits of the decimal
part ( S1
Command
input
FNC200
DSTR
S1 +0
S1
and later.
D
S2
D +0
Number of digits
+1 of decimal part
+1
+2
+3
Sign
S2 +1
b31
S2
b8 b7
b15
Number of all
digits
S2
b16 b15
+4
b0
00H
+5
b8 b7
b15
- 6 5 4
S2 +1
For number of
all digits
For value
stored in S1
S1 +0
32-bit
binary data
b0
ASCII code
indicating sign
b0
D +0
36H(6)
2DH(-)
+1
34H(4)
35H(5)
+2
33H(3)
2EH(.)
+3
31H(1)
3 2 1
S2
-654321
+4
32H(2)
For number of
all digits
S1 =8
0000H
0000H is automatically stored at
the end of a character string.
614
2)
3)
Set the number of digits of the decimal part S1 +1 ranging from 0 to 10.
Make sure to satisfy "Number of digits of decimal part <= (Number of all digits -3)".
4)
+1, S2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
Converted character string data is stored in
- For the sign, "space" (20H) is stored when the 32-bit binary data stored in S2
23
Number of
all digits
13
Number of
digits of
decimal part
10
16-bit
binary data
54321
Number of
all digits
13
Number of
digits of
decimal part
32-bit
binary data
0 0 0 0 0 5 4 3 2 1
It is automatically added.
5 4 3 2
1 0
-543210
25
excluding the sign and decimal point is smaller than the number of digits of 32-bit binary data stored in
Instruction
Description
ESTR (FNC116)
Converts binary floating point data into a character string (ASCII codes) with a specified number of digits.
Converts a character string (ASCII codes) into binary floating point data.
VAL (FNC201)
27
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
is outside the following range (error code: K6706)
28
Setting range
2 to 8
32-bit operation
2 to 13
Setting range
0 to 5
32-bit operation
0 to 10
29
including the digit for sign and the digit for decimal point is smaller
+1, S2
and later storing a character string exceeds the corresponding device range (error code:
615
30
FNC270-FNC276
Ex-Device
FNC250-FNC269
Data Table
Operation
16-bit operation
FNC220-FNC249
Data
Comparison
16-bit operation
FNC210-FNC219
Data
Operation 3
Errors
26
FNC200-FNC209
Character String
Control
Related instructions
EVAL (FNC117)
24
FNC190-FNC199
Block Data
Operation
S1
22
FNC181-FNC189
Others
6 7 8
Number of digits of
decimal part
It is automatically added.
FNC180
Alternate
Instructions
1 2 3 4 5
FNC170-FNC179
External Device
FNC160-FNC169
Real Time Clock
Control
5)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
In the program below, the 16-bit binary data stored in D10 is converted into a character string in accordance with the
digit specification by D0 and D1 when X000 is set to ON, and then stored in D20 to D23.
X000
FNC200
STRP
FNC 12
MOVP
K12672
D10
FNC 12
MOVP
K6
D0
FNC 12
MOVP
K0
D1
D10
D20
D0
END
b15
616
D10
12672
D0
D1
6
0
"
12672"
D20
D21
D22
D23
31H(1)
36H(6)
32H(2)
b8 b7
b0
20H(space)
32H(2)
37H(7)
0000H
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
26.2
Outline
1. Instruction format
16-bit Instruction
Mnemonic
Operation Condition
VAL
7 steps
Continuous
Operation
Pulse (Single)
Operation
VALP
23
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
13 steps DVAL
DVALP
2. Set data
Operand Type
Description
24
Data Type
Head device number storing a character string to be converted into binary data
D1
Head device number storing the number of all digits of the binary data acquired by
conversion
Character string
D2
16-bit binary
16- or 32-bit binary
25
3. Applicable devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
T
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
FNC190-FNC199
Block Data
Operation
Bit Devices
Operand
Type
FNC181-FNC189
Others
FNC180
Alternate
Instructions
FNC 201
D
P
VAL
22
FNC170-FNC179
External Device
This instruction converts a character string (ASCII codes) into binary data.
On the other hand, EVAL (FNC117) instruction converts a character string (ASCII codes) into floating point data.
For character strings, refer to Section 5.3.
For EVAL (FNC117) instruction, refer to Section 18.5.
26
FNC200-FNC209
Character String
Control
D1
27
D2
and later is converted into 16-bit binary data. The number of all digits of the
D1
b15
D1
28
D2
b8 b7
Number of all
digits
D1 +0
+1 Number of digits
b0
+1
+2
+3
00H
of decimal part
D2
Integer value in
which decimal
point is ignored
29
FNC250-FNC269
Data Table
Operation
7th character
30
FNC270-FNC276
Ex-Device
2nd character
1st character
Sign
S +0
+4
FNC220-FNC249
Data
Comparison
Command
input
FNC201
VAL
FNC210-FNC219
Data
Operation 3
1)
617
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
D1
as shown below.
b15
b8 b7
D1 +0
+1
b0
S +0
31H(1)
2DH(-)
+1
33H(3)
32H(2)
+2
34H(4)
2EH( )
+3
00H
35H(5)
- 1 2 3
4 5
D2
7
2
-12345
2)
2 to 8
32768 to +32767
Example: 123.45 12345
Sign
"Space" (20H)
"" (2DH)
Decimal point
"." (2EH)
Number
3)
D1 stores the number of all digits. The number of all digits indicates the number of all characters (including the
number, sign and decimal point).
4)
D1 +1 stores the number of digits of the decimal part. The number of digits of the decimal part indicates the
number of all characters after the decimal point "." (2EH).
5)
D2
stores 16-bit data (bin) converted from a character string with the decimal point ignored.
1 2 3
Ignored
618
4 5
Number of all
digits
Number of digits
of decimal part
16-bit binary
data
8
2
-12345
0
Sign
0 0 1 2
Ignored
Number of all
digits
Number of digits
of decimal part
16-bit binary
data
7
4
12
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
1)
and later is converted into 32-bit binary data. The number of all digits of the
D1
D1
+1, D2
].
Command
input
FNC201
DVAL
b15
D1
Number of all
digits
D1 +0
+1 Number of digits
b0
+1
+2
+3
+4
+5
of decimal part
D2 +1
D2
Integer value in
which decimal
point is ignored
32-bit binary
data
24
and D2
25
as shown below.
b8 b7
b0
31H(1)
2DH(-)
+1
33H(3)
32H(2)
+2
35H(5)
34H(4)
+3
36H(6)
2EH(.)
+4
38H(8)
37H(7)
D1 +0
+1
- 1 2 3 4 5
6 7 8
10
3
-12345678
D2 +1
D2
00H
+5
27
Description
2 to 13
2,147,483,648 to +2,147,483,647
Example: 12345.678 "12345678"
FNC210-FNC219
Data
Operation 3
28
Character type
Positive numeric value
Negative numeric value
FNC220-FNC249
Data
Comparison
Sign
"Space" (20H)
"" (2DH)
Decimal point
"." (2EH)
Number
26
FNC200-FNC209
Character String
Control
S +0
2)
FNC190-FNC199
Block Data
Operation
b15
23
FNC181-FNC189
Others
22
FNC180
Alternate
Instructions
12th character
2nd character
1st character
Sign
S +0
00H
D2
b8 b7
+6
FNC170-FNC179
External Device
In conversion from a character string into binary data, the data from
handled as a character string in byte units.
FNC160-FNC169
Real Time Clock
Control
D1 stores the number of all digits. The number of all digits indicates the number of all characters (including the
number, sign and decimal point).
4)
D1 +1 stores the number of digits of the decimal part. The number of digits of the decimal part indicates the
number of all characters after the decimal point "." (2EH).
29
FNC250-FNC269
Data Table
Operation
3)
30
FNC270-FNC276
Ex-Device
619
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
5)
[ D2 +1, D2 ] stores 16-bit data (bin) converted from a character string with the decimal point ignored.
For the character string located in S
and later, the "space" (20H) and "0" (30H) characters between the sign
and the first number other than "0" are ignored in the conversion to 32-bit binary data.
6 5 4 3
2 1
Ignored
0 0 0 5 4 3 2 1
Sign
Ignored
12
2
-654321
11
54321
Related instructions
Instruction
ESTR (FNC116)
Description
Converts binary floating point data into a character string (ASCII code) with a specified number of digits.
EVAL (FNC117)
Converts a character string (ASCII code) into binary floating point data.
STR (FNC200)
Caution
Store sign data, "space (20H)" or "- (2DH)", must be stored in the 1st byte (lower order 8 bits of the head device set
in S ).
Only the ASCII code data "0 (30H)" to "9 (39H)", "space (20H)" and "decimal point (2EH)" can be stored from the 2nd
byte to the "00H" at the end of the character string in S .
If "- (2DH)" is stored in the 2nd byte or later, an operation error (error code: K6706) occurs.
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the number of characters of the character string to be converted ( S
ranges (error code: K6706)
Setting range
16-bit operation
2 to 8
32-bit operation
2 to 13
When the number of characters after the decimal point of the character string to be converted ( S
outside the following ranges (error code: K6706)
and later) is
Setting range
16-bit operation
0 to 5
32-bit operation
0 to 10
When the relationship between the number of all characters in the character string to be converted ( S
and
later) and the number of characters after the decimal point does not satisfy the following (error code: K6706)
(Number of all characters -3) Number of characters after the decimal point
When the sign is set to any ASCII code other than "space" (20H) and "-" (2DH) (error code: K6706)
When a digit of a number is set to any ASCII code other than "0" (30H) to "9" (39H) or a decimal point "." (2EH)
(error code: K6706)
When the decimal point "." (2EH) is set two or more times in the character string to be converted ( S
(error code: K6706)
When the binary data acquired by conversion is outside the following range (error code: K6706)
Setting range
16-bit operation
32768 to 32767
32-bit operation
2,147,483,648 to 2,147,483,647
620
and later)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
1)
In the program below, the character string data stored in D20 to D22 is regarded as an integer value, converted
into a binary value, and stored in D0 when X000 is set to ON.
X000
FNC201
VALP
D20
D10
D0
22
FNC170-FNC179
External Device
END
b15
b8 b7
31H(1)
2EH(.)
34H(4)
b0
2DH(-)
36H(6)
35H(5)
00H
D0
-1654
D10
D11
6
2
23
FNC180
Alternate
Instructions
D20
D21
D22
D23
2)
In the program below, the character string data stored in D20 to D24 is regarded as an integer value, converted
into a binary value, and stored in D0 when X000 is set to ON.
X000
D20
D10
D0
END
b15
37H(7)
31H(1)
30H(0)
36H(6)
31H(1)
b8 b7
b0
20H(space)
39H(9)
30H(0)
2EH(.)
31H(1)
00H
D0
D10
D11
D1
7910
10
3
25
D0
0611
FNC190-FNC199
Block Data
Operation
D20
D21
D22
D23
D24
D25
24
FNC181-FNC189
Others
FNC201
DVALP
FNC160-FNC169
Real Time Clock
Control
Program example
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
621
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
26.3
Outline
This instruction links a character string to another character string.
For handling of character strings, refer to Section 5.3.
1. Instruction format
FNC 202
P
$+
Mnemonic
16-bit Instruction
Operation Condition
$+
$+P
7 steps
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
Description
S1
Head device number storing the link source data (character string) or directly specified
character string
Data Type
S2
Head device number storing the link data (character string) or directly specified character
string
Character string
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S1
S2
D
and later is linked to the end of the character string data stored in S1
S1
S1
S1
FNC202
$+
S1
b15---b8 b7----b0
46H(F) 48H(H)
+1 2DH(-) 41H(A)
00H
+2
S1
or
S2
S2
S2
S2
S2
and
or later indicates the data from the specified device to the first "00H" in
b15---b8 b7----b0
35H(5) 31H(1)
+1 39H(9) 33H(3)
41H(A)
+2 00H
D
D
D
D
D
b15---b8 b7---b0
46H(F) 48H(H)
S1
+1 2DH(-) 41H(A)
+2 35H(5) 31H(1)
S1
+3 39H(9) 33H(3)
41H(A)
+4 00H
S2
+1
S2
+2
+1
S2
00H is automatically
stored.
622
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
or
and S2
start from "00H" (that is, when the number of characters is 0), "0000H"
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
, S2
and
When 00H is not set within the corresponding device range after the device specified by S1
code: K6706)
or S2
(error
In the program example shown below, a character string stored in D10 to D12 (abcde) is linked to the character string
ABCD, and the result is stored to D100 and later when X000 turns ON.
X000
D10
ABCD
25
D100
FNC190-FNC199
Block Data
Operation
FNC202
$+
END
00H
65H(e)
ABCD
D100
b15---b8 b7----b0
62H(b) 61H(a)
26
D101
64H(d) 63H(c)
FNC200-FNC209
Character String
Control
b15---b8 b7----b0
D10 62H(b) 61H(a)
24
FNC181-FNC189
Others
Program example
23
FNC180
Alternate
Instructions
When the number of devices after a device number specified by D is smaller than the number of devices
required to store all linked character strings (that is, when 00H cannot be stored after all character strings and the
last character) (error code: K6706)
22
FNC170-FNC179
External Device
is stored in
FNC160-FNC169
Real Time Clock
Control
Cautions
D102
41H(A) 65H(e)
D103
43H(C) 42H(B)
D104
00H
44H(D)
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
623
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
26.4
Outline
This instruction detects the number of characters (bytes) of a specified character string.
For handling of character strings, refer to Section 5.3.
1. Instruction format
FNC 203
P
LEN
Mnemonic
16-bit Instruction
Operation Condition
LEN
LENP
5 steps
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
Description
Data Type
Character string
Device number storing the detected character string length (number of bytes)
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S
D
FNC203
LEN
b15----------b8 b7-------------b0
S
+n
00H
b15---------------b0
Character string
length
nth character
624
b15----------b8 b7-------------b0
42H(B)
41H(A)
S
S
+1
44H(D)
43H(C)
+2
46H(F)
45H(E)
+3
48H(H)
47H(G)
+4
00H
49H(I)
ABCDEFGHI
D
b15---------------b0
9
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
This instruction can handle character codes other than ASCII codes, but the character string length is handled in
byte units (8 bits). Accordingly, in the case of character codes in which 2 bytes express 1 character such as shift
JIS codes, the length of 1 character is detected as 2.
22
Errors
When 00H is not set within the corresponding device range after a device specified by
When the detected number of characters is 32768 or more (error code: K6706)
23
Program example
X000
D0
D10
FNC 18
BCD
D10
K4Y40
24
FNC181-FNC189
Others
FNC203
LEN
END
25
D10
10
D1 53H(S) 54H(T)
D2 42H(B) 55H(U)
49H(I)
49H(I)
48H(H)
D4
00H
D6 43H(C) 42H(B)
Y057 to Y040
0 0 1 0
BCD
BCD value
26
FNC200-FNC209
Character String
Control
D5 41H(A)
MITSUBISHI
(Characters
ABC.......
after 00H are
ignored.)
Conversion
into BCD
FNC190-FNC199
Block Data
Operation
b15---b8 b7----b0
49H(I) 4DH(M)
D3 53H(S)
FNC180
Alternate
Instructions
In the program example shown below, the length of a character string stored in D0 and later is output in 4-digit BCD to
Y040 to Y057 when X000 turns ON.
D0
FNC170-FNC179
External Device
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
FNC160-FNC169
Real Time Clock
Control
Caution
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
625
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
26.5
26.5 FNC204 RIGHT / Extracting Character String Data from the Right
Outline
This instruction extracts a specified number of characters from the right end of a specified character string.
For handling of character strings, refer to Section 5.3.
1. Instruction format
FNC 204
RIGHT P
16-bit Instruction
Mnemonic
Operation Condition
RIGHT
RIGHTP
7 steps
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
Description
Data Type
Character string
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S
D
n
and
and later.
S
S
626
FNC204
RIGHT
b15----------------------b8b7-----------------------b0
ASCII code for 2nd
ASCII code for 1st
character
character
ASCII code for 4th
ASCII code for 3rd
+1
character
character
b15----------------------b8b7-----------------------b0
D
D
+1
00H
00H
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
26.5 FNC204 RIGHT / Extracting Character String Data from the Right
21
b15----------------------b8b7-----------------------b0
32H(2)
31H(1)
+1
44H(D)
43H(C)
+1
34H(4)
33H(3)
+2
46H(F)
45H(E)
+2
00H
35H(5)
+3
32H(2)
31H(1)
+4
34H(4)
33H(3)
+5
00H
12345
ASCII code for 5th character
35H(5)
ABCDEF12345
and later indicates data stored in devices from the specified device until "00H" is
Cautions
23
FNC180
Alternate
Instructions
22
FNC170-FNC179
External Device
FNC160-FNC169
Real Time Clock
Control
In the case of n = 5
b15----------------------b8b7-----------------------b0
S
42H(B)
41H(A)
When handling character codes other than ASCII codes, note the following contents:
The number of characters is handled in byte units (8 bits). Accordingly, in the case of character codes in which 2
bytes express 1 character such as shift JIS codes, the length of 1 character is detected as 2.
FNC181-FNC189
Others
When extracting characters from a character string including character codes in which 2 bytes express 1 character
such as shift JIS codes, consider the number of characters to be extracted in units of character codes for 1
character.
Note that the expected character code is not given if only 1 byte is executed out of a 2-byte character code.
24
25
Errors
When 00H is not set within the corresponding device range after a device specified by S
When n exceeds the number of characters specified by
Program example
X000
FNC204
RIGHTP
R0
D0
K4
END
28
b15----------------------b8b7-----------------------b0
45H(E)
30H(0)
D0
R1
31H(1)
32H(2)
D1
R2
45H(E)
30H(0)
D2
R3
41H(A)
46H(F)
BA210EFA
41H(A)
46H(F)
0000H
0EFA
29
FNC250-FNC269
Data Table
Operation
00H
R4
FNC220-FNC249
Data
Comparison
b15----------------------b8b7-----------------------b0
41H(A)
42H(B)
R0
27
FNC210-FNC219
Data
Operation 3
In the program example shown below, 4 characters are extracted from the right end of the character string data stored
in R0 and later, and stored to D0 and later when X000 turns ON.
26
FNC200-FNC209
Character String
Control
FNC190-FNC199
Block Data
Operation
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
30
FNC270-FNC276
Ex-Device
627
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
26.6
26.6 FNC205 LEFT / Extracting Character String Data from the Left
Outline
This instruction extracts a specified number of characters from the left end of a specified character string.
For handling of character strings, refer to Section 5.3.
1. Instruction format
FNC 205
P
LEFT
16-bit Instruction
Mnemonic
Operation Condition
LEFT
LEFTP
7 steps
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
Description
Data Type
Character string
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S
D
n
and
and later.
S
S
628
FNC205
LEFT
b15----------------------b8b7-----------------------b0
ASCII code for 2nd
ASCII code for 1st
character
character
ASCII code for 4th
ASCII code for 3rd
+1
character
character
ASCII code for n-1
character
ASCII code for n+1
character
00H
D
D
b15----------------------b8b7-----------------------b0
ASCII code for 2nd
ASCII code for 1st
character
character
+1 ASCII code for 4th
ASCII code for 3rd
character
character
ASCII code for n-1
character
00H
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
26.6 FNC205 LEFT / Extracting Character String Data from the Left
21
+1
44H(D)
43H(C)
+1
44H(D)
43H(C)
+2
46H(F)
45H(E)
+2
46H(F)
45H(E)
+3
32H(2)
31H(1)
+3
00H
+4
34H(4)
+5
00H
33H(3)
22
FNC170-FNC179
External Device
31H(1)
"ABCDEF1"
35H(5)
"ABCDEF12345"
and later indicates data stored in devices from the specified device until "00H" is
23
FNC180
Alternate
Instructions
FNC160-FNC169
Real Time Clock
Control
Cautions
When handling character codes other than ASCII codes, note the following contents:
The number of characters is handled in byte units (8 bits). Accordingly, in the case of character codes in which 2
bytes express 1 character such as shift JIS codes, the length of 1 character is detected as 2.
FNC181-FNC189
Others
When extracting characters from a character string including character codes in which 2 bytes express 1 character
such as shift JIS codes, consider the number of characters to be extracted in units of character codes for 1
character.
Note that the expected character code is not given if only 1 byte is executed out of a 2-byte character code.
24
25
Errors
When 00H is not set within the corresponding device range after a device specified by S
When n exceeds the number of characters specified by
Program example
X010
FNC205
LEFTP
D100
R10
D0
28
END
FNC220-FNC249
Data
Comparison
b15----------------------b8b7-----------------------b0
51H(Q)
53H(S)
R10
b15----------------------b8b7-----------------------b0
51H(Q)
53H(S)
D101
4EH(N)
4FH(O)
R11
4EH(N)
4FH(O)
D102
44H(D)
48H(H)
R12
44H(D)
48H(H)
D103
42H(B)
41H(A)
R13
SQONHDAB
ASCII code for 6th character
00H
D0
29
0000H
SQONHD
FNC250-FNC269
Data Table
Operation
D104
27
FNC210-FNC219
Data
Operation 3
In the program example shown below, the number of characters which is equivalent to the number stored in D0 are
extracted from the left end of the character string data stored in D100 and later, and stored to R10 and later when
X010 turns ON.
26
FNC200-FNC209
Character String
Control
FNC190-FNC199
Block Data
Operation
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
30
FNC270-FNC276
Ex-Device
629
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
26.7
Outline
This instruction extracts a specified number of characters from arbitrary positions of a specified character string.
For handling of character strings, refer to Section 5.3.
1. Instruction format
FNC 206
P
MIDR
16-bit Instruction
7 steps
Mnemonic
Operation Condition
MIDR
MIDRP
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
Description
Data Type
S1
Character string
Head device number specifying the head position and number of characters to be
extracted
S2
S2
S2
16-bit binary
3. Applicable devices
Operand
Type
S1
D
S2
630
Bit Devices
System User
Word Devices
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC206
MIDR
S1
S2
44H(D)
b15------------------b8b7-------------------b0
46H(F)
45H(E)
43H(C)
+1
48H(H)
46H(F)
45H(E)
+2
00H
+3
48H(H)
47H(G)
+4
4AH(J)
S1
+1
S1
+2
S1
S1
49H(I)
S1
+5
5
47H(G)
49H(I)
"EFGHI"
5th character
S2
25
+1
and later indicates data stored in devices from the specified device until 00H is
+1 is 0, the extraction processing is not
and later.
S1
S1
+1
44H(D)
43H(C)
+1
48H(H)
47H(G)
S1
+2
46H(F)
45H(E)
+2
4AH(J)
49H(I)
S1
+3
48H(H)
47H(G)
+3
00H
S1
+4
4AH(J)
49H(I)
S1
+5
00H
4BH(K)
28
FEGHIJK
5th character
S2
FNC220-FNC249
Data
Comparison
S2
S2
4BH(K)
ABCDEFGHIJK
27
b15-----------------b8b7-------------------b0
46H(F)
45H(E)
FNC210-FNC219
Data
Operation 3
b15-----------------b8 b7-------------------b0
42H(B)
41H(A)
+1
26
FNC200-FNC209
Character String
Control
24
FNC190-FNC199
Block Data
Operation
00H
4BH(K)
"ABCDEFGHIJK"
S2
S2
1st character
FNC181-FNC189
Others
b15-----------------b8b7-------------------b0
42H(B)
41H(A)
S1
23
FNC180
Alternate
Instructions
Command
input
22
FNC170-FNC179
External Device
FNC160-FNC169
Real Time Clock
Control
-1
29
When handling character codes other than ASCII codes, note the following contents:
The number of characters is handled in byte units (8 bits). Accordingly, in the case of character codes in which 2
bytes express 1 character such as shift JIS code, the length of 1 character is regarded as 2 characters.
631
30
FNC270-FNC276
Ex-Device
When extracting characters from a character string including character codes in which 2 bytes express 1 character
such as shift JIS codes, consider the number of characters to be extracted in units of character codes for 1
character.
Note that the expected character code is not given if only 1 byte is executed out of a 2-byte character code.
FNC250-FNC269
Data Table
Operation
Cautions
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When 00H is not set within the corresponding device range after a device specified by S1
When the value specified by S2
When S2
When S2
When S2
Program example
In the program example shown below, four characters are extracted from the 3rd character from the left end of the
character string data stored in D10 and later, and then stored to D0 and later when X000 turns ON.
X000
FNC206
MIDRP
D10
D0
R0
END
b15---------------------b8 b7-----------------------b0
41H(A)
42H(B)
D10
3rd character
b15----------------------b8b7-----------------------b0
31H(1)
32H(2)
D0
D11
31H(1)
32H(2)
D1
D12
46H(E)
33H(3)
D2
D13
00H
45H(D)
BA213ED
Four characters
starting from 3rd character
632
R0
R1
Extracted characters
46H(E)
33H(3)
0000H
213E
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
26.8
Outline
1. Instruction format
FNC 207
MIDW P
Mnemonic
16-bit Instruction
7 steps
Operation Condition
MIDW
MIDWP
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
23
FNC180
Alternate
Instructions
2. Set data
Operand Type
Description
Data Type
S1
Character string
S2
S2
16-bit binary
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
25
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
26
S1
S2
b15---------------b8b7-----------------b0
31H(1)
30H(0)
S1
1st
character
Before execution
b15---------------b8b7-----------------b0
42H(B)
41H(A)
+1
33H(3)
32H(2)
+1
44H(D)
43H(C)
S1
+2
35H(5)
34H(4)
+2
46H(F)
45H(E)
S1
+3
37H(7)
36H(6)
+3
48H(H)
47H(G)
S1
+4
00H
38H(8)
012345678
+4
6th character
+1
00H
49H(I)
ABCDEFGHI
29
After execution
b15---------------b8b7-----------------b0
42H(B)
41H(A)
D
D
+1
31H(1)
30H(0)
+2
33H(3)
32H(2)
+3
35H(5)
34H(4)
+4
00H
28
3rd
character
FNC250-FNC269
Data Table
Operation
S2
1st
character
3rd
character
FNC220-FNC249
Data
Comparison
S1
27
FNC210-FNC219
Data
Operation 3
Command
input
FNC200-FNC209
Character String
Control
S2
S2
FNC190-FNC199
Block Data
Operation
Operand
Type
24
FNC181-FNC189
Others
Head device number specifying the head position and number of characters to be
overwritten
S2
22
FNC170-FNC179
External Device
This instruction replaces the characters in arbitrary positions inside designated character string with a specified
character string.
For handling of character strings, refer to Section 5.3.
30
FNC270-FNC276
Ex-Device
49H(I)
AB012345I
Six characters starting from 3rd
character (overwritten character string)
633
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
string stored in
Before execution
b15---------------b8b7-----------------b0
31H(1)
30H(0)
S1
+1
44H(D)
43H(C)
34H(4)
+2
46H(F)
45H(E)
36H(6)
+3
48H(H)
47H(G)
38H(8)
012345678
+4
+1
33H(3)
32H(2)
S1
+2
35H(5)
S1
+3
37H(7)
S1
+4
00H
S2
S2
+1
When S2
00H
49H(I)
ABCDEFGHI
After execution
b15---------------b8b7-----------------b0
42H(B)
41H(A)
D
D
+1
44H(D)
43H(C)
+2
31H(1)
30H(0)
+3
33H(3)
32H(2)
+4
00H
34H(4)
ABCD01234
Characters from the 5th character to the last
character are overwritten. Excessive
characters, 35H (5) to 37H (7) , are not
stored.
1st
character
2nd
Before execution
character
b15---------------b8b7-----------------b0
42H(B)
41H(A)
D
+1
44H(D)
43H(C)
S1
+1
33H(3)
32H(2)
+2
46H(F)
45H(E)
S1
+2
35H(5)
34H(4)
+3
48H(H)
47H(G)
S1
+3
00H
+4
4AH(J)
49H(I)
+5
00H
4BH(K)
Last character
S2
2
+1
-1
5th
character
and
and later.
b15---------------b8b7-----------------b0
31H(1)
30H(0)
S2
5th
character
+1 (the number of characters to be extracted) is -1, the entire character string stored in S1
later is stored to
S1
b15---------------b8b7-----------------b0
42H(B)
41H(A)
D
D
S1
8th character
1st
character
012345
1st
character
ABCDEFGHIJK
2nd
After execution
character
b15---------------b8b7-----------------b0
41H(A)
30H(0)
D
+1
32H(2)
31H(1)
+2
34H(4)
33H(3)
+3
48H(H)
35H(5)
+4
4AH(J)
49H(I)
+5
00H
4BH(K)
A012345HIJK
Six characters from the 2nd
character are overwritten.
634
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
This instruction can handle character codes other than ASCII codes, but please note the following:
The number of characters is handled in byte units (8 bits). Accordingly, in the case of character codes in which 2
bytes express 1 character such as shift JIS code, the length of 1 character is regarded as 2 characters.
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
or
(error
When S2
(error
24
Program example
X010
FNC207
MIDWP
D0
D100
R0
END
45H(E)
46H(F)
D2
33H(3)
30H(0)
00H
D3
21FE03
R0
R1
Before execution
1st
character
D100
b15---------------b8b7-----------------b0
53H(S)
55H(U)
D101
59H(Y)
43H(C)
D102
31H(1)
5AH(Z)
D103
42H(B)
30H(0)
D104
1st
character
3rd
character
27
0000H
USCYZ10B
FNC210-FNC219
Data
Operation 3
D1
26
FNC200-FNC209
Character String
Control
4th
character
b15---------------b8b7-----------------b0
31H(1)
32H(2)
D0
After execution
28
D101
31H(1)
32H(2)
D102
45H(E)
46H(F)
D103
42H(B)
30H(0)
FNC220-FNC249
Data
Comparison
b15---------------b8b7-----------------b0
D100
53H(S)
55H(U)
D104
25
FNC190-FNC199
Block Data
Operation
In the program example shown below, 4 characters are extracted from the character string data stored in D0 and later,
and stored to the 3rd character (from the left end) and later for the character string data stored in D100 and later when
X010 turns ON.
FNC181-FNC189
Others
When S2
and
23
FNC180
Alternate
Instructions
When 00H is not set within the corresponding device range after a device specified by S1
code: K6706)
22
FNC170-FNC179
External Device
When overwriting a character string including character codes in which 2 bytes express 1 character such as shift
JIS codes, consider the number of characters to be extracted in units of character codes for 1 character.
Note that the expected character code is not given if only 1 byte is overwritten out of a 2-byte character code.
FNC160-FNC169
Real Time Clock
Control
Cautions
3rd
character
29
FNC250-FNC269
Data Table
Operation
0000H
US21FE0B
30
FNC270-FNC276
Ex-Device
635
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
26.9
Outline
This instruction searches a specified character string within another character string.
1. Instruction format
FNC 208
INSTR P
16-bit Instruction
Mnemonic
Operation Condition
INSTR
INSTRP
9 steps
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
Description
Data Type
S1
Character string
S2
Character string
D
n
16-bit binary
16-bit binary
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
S2
D
n
search begins at the "n"th character from the left end (head character) of S2
D
. The search result provides the first matching character (located from the left end (head character)) in
S2
Command
input
FNC208
INSTR
S2
636
S1
S2
2)
3)
When the search start position "n" is a negative number or "0", search processing is not executed.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
A character string can be directly specified in the character string S1
S2
Character string S1
"AB"
D100
22
FNC170-FNC179
External Device
FNC160-FNC169
Real Time Clock
Control
4)
"1234AB56AB"
23
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the search start position "n" exceeds the number of characters stored in S2
When "00H (NULL)" is not located within the corresponding device range starting from S2
Program example
In the program example below, the character string "CI23" (D0 and later) is searched from the 5th character from
the left end (head character) of the character string "CI2312CIM" (R0 and later) when X000 is set to ON. The
search result is stored in D100
FNC208
INSTR
D0
R0
D100
K5
END
26
Character string D0
b15
b8 b7
b0
D0
49H(I)
43H(C)
D1
33H(3)
32H(2)
D2
00H
FNC200-FNC209
Character String
Control
25
FNC190-FNC199
Block Data
Operation
X000
24
FNC181-FNC189
Others
When "00H (NULL)" is not located within the corresponding device range starting from S1
1)
FNC180
Alternate
Instructions
Errors
"CI23"
27
FNC210-FNC219
Data
Operation 3
"CI2312CIM"
D100
0
Because the searched
character string is not
detected, "0" is stored.
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
637
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Outline
This instruction transfers character string data.
For handling of character strings, refer to Section 5.3.
1. Instruction format
FNC 209
$MOV P
Mnemonic
16-bit Instruction
Operation Condition
$MOV
$MOVP
5 steps
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
Description
Data Type
Directly specified character string (up to 32 characters) or head device number storing
character string which is handled as the transfer source
Character string
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S
D
and later.
FNC209
$MOV
b15
S
to a device after that which stores 00H in its high-order or low-order byte
b8 b7
b0
b15
2nd character
1st character
b8 b7
2nd character
1st character
+1
4th character
3rd character
+1
4th character
3rd character
+2
6th character
5th character
+2
6th character
5th character
00H
nth character
00H
nth character
b0
to
+n storing the transfer source character string data overlaps the device
range D
to D +n/2 storing the transferred character string data, transfer is executed.
For example, when a character string stored in D10 to D13 is transferred to D11 to D14, the transfer is executed as
shown below:
Command
input
638
FNC209
$MOV
D10
D11
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
32H(2)
31H(1)
D10
32H(2)
31H(1)
b0
... It is the same as the
D11
34H(4)
33H(3)
D11
32H(2)
31H(1)
character string
before transfer.
D12
36H(6)
35H(5)
D12
34H(4)
33H(3)
00H
D13
36H(6)
35H(5)
b15
b8 b7
b15
b0
D14
22
FNC170-FNC179
External Device
D13
b8 b7
0000H
D14
Caution
of
+n, 00H is stored to both the high-order byte and low-order byte
+n.
Command
input
FNC209
$MOV
24
b8 b7
b15
b0
42H(B)
41H(A)
b8 b7
FNC181-FNC189
Others
b15
23
FNC180
Alternate
Instructions
FNC160-FNC169
Real Time Clock
Control
D10
b0
42H(B)
41H(A)
+1
44H(D)
43H(C)
+1
44H(D)
43H(C)
+2
45H(E)
00H
+2
00H
00H
25
00H is automatically
stored in the high-order
byte.
FNC190-FNC199
Block Data
Operation
Errors
When 00H does not exist in the range specified from device
When the specified character string cannot be stored in devices from the device specified by
device (error code: K6706)
to the last
27
In the program example shown below, character string data stored in D10 to D12 is transferred to D20 through D22.
FNC209
$MOV
D10
D20
28
END
b8 b7
b0
b15
b8 b7
b0
D10
4DH(M)
2AH(*)
D20
4DH(M)
2AH(*)
D11
45H(E)
45H(E)
D21
45H(E)
45H(E)
00H
D22
29
0000H
FNC250-FNC269
Data Table
Operation
D12
FNC220-FNC249
Data
Comparison
b15
FNC210-FNC219
Data
Operation 3
Program example
X000
26
FNC200-FNC209
Character String
Control
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
30
FNC270-FNC276
Ex-Device
639
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
640
FNC No.
Mnemonic
Symbol
Function
Reference
210
FDEL
FDEL
S D n
Section 27.1
211
FINS
FINS
S D n
Section 27.2
212
POP
POP
S D n
Section 27.3
213
SFR
SFR
D n
16-bit data n
Bit Shift Right with Carry
Section 27.4
214
SFL
SFL
D n
16-bit data n
Bit Shift Left with Carry
Section 27.5
215
216
217
218
219
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
27.1
Outline
22
FNC170-FNC179
External Device
1. Instruction format
FNC 210
P
FDEL
16-bit Instruction
Mnemonic
Operation Condition
FDEL
FDELP
7 steps
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
23
FNC180
Alternate
Instructions
2. Set data
Operand Type
Description
24
16-bit binary
FNC181-FNC189
Others
Data Type
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S
D
n
26
D +0
+1
When "n" is "2"
+2
+3
+4
+5
0
S
Data table
4
5432
4444
1234
5678
0
Number of
stored data
28
Data table
range
"0" is stored.
...
-1
...
Data table
(having D
data starting
from D +1)
Data table
5
5432
3333
4444
1234
5678
Deleted data
3333
29
The device range used in a data table should be controlled by the user.
The data table has D
number of stored data starting from ( D +1).
Refer to the program example.
FINS (FNC211)
30
FNC270-FNC276
Ex-Device
Related instruction
FNC250-FNC269
Data Table
Operation
Caution
Instruction
FNC220-FNC249
Data
Comparison
D +0
+1
+2
+3
+4
+5
...
Number of
stored data
...
27
FNC210-FNC219
Data
Operation 3
FNC200-FNC209
Character String
Control
Command
input
FNC210
FDELP
25
FNC190-FNC199
Block Data
Operation
System User
Others
Special
Unit
Description
Inserts data into an arbitrary position in a data table.
641
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the table position "n" of the data to be deleted exceeds the amount of data stored (error code: K6706)
When the value "n" exceeds the device range of the data table
When the FDEL (FNC210) instruction is executed under the condition "n 0" (error code: K6706)
When the amount of data stored specified in
When the data table range exceeds the corresponding device range (error code: K6706)
Program example
In the program shown below, the 2nd data value entry is deleted from the data table stored in D100 to D105, and the
deleted data is stored in D0.
When the amount of data stored is "0", however, the FDEL (FNC210) instruction is not executed. (The device range
used in the data table is D100 to D107).
X010
FNC234
AND<
K0
D100
FNC237
AND<=
D100
K7
FNC210
FDELP
D0
D100
K2
END
X010:ON
Amount of
data stored
Device range used in
data table
Data
table
range
D100
D101
D102
D103
D104
D105
D106
D107
Data table
5
-123
4444
3210
1234
5432
0
0
-1
D100
D101
D102
D103
D104
D105
D106
D107
D0
642
Data table
4
-123
3210
1234
5432
0
0
0
4444
Amount of
data stored
Data table
range
Deleted data
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
27.2
Outline
22
This instruction inserts a data value into an arbitrary position in a data table.
FNC170-FNC179
External Device
1. Instruction format
FNC 211
P
FINS
16-bit Instruction
7 steps
Mnemonic
Operation Condition
FINS
FINSP
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
23
FNC180
Alternate
Instructions
2. Set data
Operand Type
Description
24
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
Index
V
Z Modify K H
" "
S
D
n
26
27
D +0
+1
+2
+3
+4
+5
Data table
4
5432
4444
1234
-123
0
0
S
28
Data table
range
...
+1
...
...
Data table
3
5432
1234
-123
0
0
FNC220-FNC249
Data
Comparison
Number of
D +0
stored data
+1
Data table
+2
range
+3
+4
+5
...
FNC210-FNC219
Data
Operation 3
0
When "n" is "2"
4444
29
The device range used in a data table should be controlled by the user.
The data table has D
number of stored data starting from ( D +1).
Refer to the program example.
FDEL (FNC210)
30
FNC270-FNC276
Ex-Device
Related instruction
FNC250-FNC269
Data Table
Operation
Caution
Instruction
FNC200-FNC209
Character String
Control
Command
input
FNC211
FINSP
25
FNC190-FNC199
Block Data
Operation
ConReal
CharacPointer
stant Number ter String
FNC181-FNC189
Others
Data Type
Description
Deletes an arbitrary data entry from a data table.
643
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the table position "n" for data insertion exceeds the amount of stored data plus 1 (error code: K6706)
When the value "n" exceeds the device range of the data table
When FNC211 instruction is executed under the condition "n 0" (error code: K6706)
When the data table range exceeds the corresponding device range (error code: K6706)
Program example
In the program shown below, data stored in D100 is inserted into the 3rd position of the data table stored in D0 to D4.
When the amount of data stored exceeds "7", however, the FINS (FNC211) instruction is not executed. (The device
range used in the data table is D0 to D7).
X010
FNC237
AND<=
K0
FNC234
AND<
D0
D0
FNC211
FINSP
K7
D100
D0
K3
END
X010:ON
Amount of
data stored
Data
table
range
D0
D1
D2
D3
D4
D5
D6
D7
D100
644
Data table
4
1234
4444
-123
5000
0
0
0
-3210
+1
D0
D1
D2
D3
D4
D5
D6
D7
Data table
5
1234
4444
-3210
-123
5000
0
0
Amount of
data stored
Data table
range
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
27.3
Outline
1. Instruction format
FNC 212
P
POP
16-bit Instruction
7 steps
Mnemonic
Operation Condition
POP
POPP
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
23
FNC180
Alternate
Instructions
2. Set data
Operand Type
Description
Data Type
24
FNC181-FNC189
Others
3. Applicable devices
Operand
Type
Word Devices
System User
Digit Specification
Special
Unit
System User
T
25
Others
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FNC190-FNC199
Block Data
Operation
Bit Devices
22
FNC170-FNC179
External Device
This instruction reads the last data written by a shift write (SFWR) instruction for FILO control.
For SFWR (FNC 38) instruction, refer to Section 11.9.
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
Command
input
28
Description
+1
+2
+3
+n-3
+n-2
+n-1
29
...
Data area
(First-in data written by shift write (SFWR) instruction)
FNC250-FNC269
Data Table
Operation
is read to
to
+n-1, a device S
+ Pointer data
. (The last data entry written by the shift write (SFWR) instruction for first-in first-out control
645
30
FNC270-FNC276
Ex-Device
FNC220-FNC249
Data
Comparison
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Data area
+n-1
+n-2
+6
+5
Pointer
S
+4
+3
+2
+1
S
In the case of K4
No data area
+n-1
+n-2
+6
+5
Pointer
S
+4
+3
+2
+1
K4K3
Related device
For the zero flag use method, refer to Subsection 6.5.2.
Device
Name
M8020
Zero flag
Description
Turns ON when the instruction is executed while the pointer
is 0.
Related instructions
Instruction
Description
Cautions
When this instruction is programmed in the continuous operation type, the instruction is executed in every operation
cycle. As a result, an expected operation may not be achieved.
Usually, program this instruction in the pulse operation type, or let this instruction be executed by a pulsed
command contact.
When the current value of the pointer
executed.
is 1, 0 is written to
satisfies 1
n-1,
Error
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
646
When
When
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
Among values stored in D20 input first to D101 to D106, the last value input is stored to D10, and 1 is subtracted
from the number of stored data (pointer D100) every time X000 turns ON.
First-in command
D20
D100
K7
FNC212
POP
D100
D10
K7
22
FNC170-FNC179
External Device
FNC 38
SFWR
END
23
FNC180
Alternate
Instructions
Data
D100
K3
D101
H1234
H5678
D103
HABCD
D104
H0000
D105
H0000
D106
H0000
24
FNC181-FNC189
Others
D102
FNC160-FNC169
Real Time Clock
Control
Program example
25
D20
D106
D105
D104
D103
D102
D101
D100
FNC190-FNC199
Block Data
Operation
D100:
D100:
D100:
K2K3 K1K2 K0K1
H0000
H0000
H0000
HABCD
H5678
H1234
K3
26
First-in command
FNC200-FNC209
Character String
Control
D105
D104
D103
D102
D101
D100
D10
H0000
H0000
H0000
HABCD
H5678
H1234
K3K2
HABCD
27
FNC210-FNC219
Data
Operation 3
Do not change
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
647
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
27.4
Outline
This instruction shifts 16 bits stored in a word device rightward by n bits.
1. Instruction format
FNC 213
P
SFR
16-bit Instruction
5 steps
Mnemonic
Operation Condition
SFR
SFRP
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
D
n
Description
Data Type
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
D
n
FNC213
SFRP
1)
2)
The ON (1)/OFF (0) status of the nth bit (bit n-1) in the word device
M8022.
3)
648
In the case of n = 6
D
Carry flag
M8022
1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
Command
input
M8 M7
0 1
M8 M7
0 1
K4
M4 M3
0 1
M4 M3
0 1
22
0
M0
0
M0
0
23
Carry flag
M8022
FNC180
Alternate
Instructions
M11
0 0
K3M0
FNC170-FNC179
External Device
M11
1 0
FNC213
SFRP
FNC160-FNC169
Real Time Clock
Control
Become 0.
24
For the carry flag use method, refer to Subsection 6.5.2.
Device
Name
M8022
Carry flag
Description
Shifts the ON/OFF status of bit n-1.
FNC181-FNC189
Others
Related device
25
Error
When a negative value is set to n (error code: K6706)
Program example
X020
FNC213
SFRP
K3Y010
D0
27
END
D0
Y20 Y17
0 1 0
Y14 Y13
0 1 0
FNC210-FNC219
Data
Operation 3
Y23
1 0
26
FNC200-FNC209
Character String
Control
In the program example shown below, the contents of Y010 to Y023 are shifted rightward by the number of bits
specified by D0 when X020 turns ON.
FNC190-FNC199
Block Data
Operation
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
Y10
0
28
4
Y20 Y17
0 0 1 0
Y14 Y13
1 0 1 0
Y10
1 0
Carry flag
M8022
FNC220-FNC249
Data
Comparison
Y23
0 0
Become 0.
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
649
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
27.5
Outline
This instruction shifts 16 bits stored in a word device leftward by n bits.
1. Instruction format
FNC 214
P
SFL
16-bit Instruction
5 steps
Mnemonic
Operation Condition
SFL
SFLP
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
2. Set data
Operand Type
Description
Data Type
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
D
n
FNC214
SFLP
1)
2)
The ON (1)/OFF (0) status of the n+1th bit (bit n) in the word device
M8022.
3)
In the case of n = 8
Carry flag
M8022
1
650
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
Command
input
FNC214
SFL
K2M10
22
M14M13
1 0 0
M10
1
23
M17
1 0
FNC180
Alternate
Instructions
Carry flag
M8022
K3
FNC170-FNC179
External Device
M17
0 0
FNC160-FNC169
Real Time Clock
Control
M14M13 M12
M10
1 1 0 0 0
Become 0.
24
For the carry flag use method, refer to Subsection 6.5.2.
Device
Name
M8022
Carry flag
Description
Shifts the ON/OFF status of bit n.
FNC181-FNC189
Others
Related device
25
Error
When a negative value is set to n (error code: K6706)
Program example
X020
FNC214
SFLP
K2Y10
D0
27
END
Y14 Y13
1 0 0
Y10
1
Y17
1 0
28
D0
FNC220-FNC249
Data
Comparison
Carry flag
M8022
FNC210-FNC219
Data
Operation 3
Y17
0 0
26
FNC200-FNC209
Character String
Control
In the program example shown below, the contents of Y010 to Y017 are shifted leftward by the number of bits
specified by D0 when X020 turns ON.
FNC190-FNC199
Block Data
Operation
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
651
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
652
FNC No.
Mnemonic
Symbol
Function
Reference
220
221
222
223
224
LD=
LD=
S1 S2
Load Compare
S1 = S2
Section 28.1
225
LD>
LD>
S1 S2
Load Compare
S1 > S2
Section 28.1
226
LD<
LD<
S1 S2
Load Compare
S1 < S2
Section 28.1
227
228
LD<>
LD<> S1 S2
Load Compare
S1 S2
Section 28.1
229
LD<=
LD<= S1 S2
Load Compare
S1 <= S2
Section 28.1
230
LD>=
LD>= S1 S2
Load Compare
S1 >= S2
Section 28.1
231
232
AND=
AND= S1 S2
AND Compare
S1 = S2
Section 28.2
233
AND>
AND> S1 S2
AND Compare
S1 > S2
Section 28.2
234
AND<
AND< S1 S2
AND Compare
S1 < S2
Section 28.2
235
236
AND<>
AND<> S1 S2
AND Compare
S1 S2
Section 28.2
237
AND<=
AND<= S1 S2
AND Compare
S1 <= S2
Section 28.2
238
AND>=
AND>= S1 S2
AND Compare
S1 >= S2
Section 28.2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
Mnemonic
239
240
OR=
OR=
S1 S2
OR>
S1 S2
OR>
Function
Reference
22
OR Compare
S1 = S2
Section 28.3
OR Compare
S1 > S2
Section 28.3
OR Compare
S1 < S2
Section 28.3
FNC170-FNC179
External Device
241
Symbol
FNC160-FNC169
Real Time Clock
Control
FNC No.
23
OR<
OR<
243
S1 S2
FNC180
Alternate
Instructions
242
24
OR<> S1 S2
245
OR<=
246
OR>=
OR<= S1 S2
OR>= S1 S2
OR Compare
S1 S2
Section 28.3
OR Compare
S1 <= S2
Section 28.3
OR Compare
S1 >= S2
Section 28.3
FNC190-FNC199
Block Data
Operation
OR<>
FNC181-FNC189
Others
244
26
248
249
FNC200-FNC209
Character String
Control
247
25
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
653
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
28.1
Outline
These instructions compare numeric values, and set a contact to ON when the condition agrees so that an operation is
started.
1. Instruction format
FNC 224
LD=
16-bit Instruction
FNC 225
LD>
16-bit Instruction
FNC 226
LD<
16-bit Instruction
FNC 228
LD<>
16-bit Instruction
FNC 229
LD<=
16-bit Instruction
FNC 230
LD>=
16-bit Instruction
5 steps
5 steps
5 steps
5 steps
5 steps
5 steps
Mnemonic
Operation Condition
LD=
Mnemonic
Operation Condition
Mnemonic
9 steps
Operation Condition
9 steps
Operation Condition
9 steps
Operation Condition
9 steps
Operation Condition
Continuous
Operation
LDD<
Operation Condition
Continuous
Operation
LDD<>
Operation Condition
Continuous
Operation
LDD<=
Continuous
Operation
LD>=
Continuous
Operation
Continuous
Operation
Operation Condition
LDD>
Continuous
Operation
LD<=
Continuous
Operation
Continuous
Operation
LD<>
Mnemonic
9 steps
Operation Condition
LDD=
Continuous
Operation
LD<
Mnemonic
9 steps
Operation Condition
LD>
Mnemonic
Continuous
Operation
Operation Condition
Continuous
Operation
LDD>=
Description
Data Type
S1
S2
Bit Devices
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
654
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
32-bit instruction
224
LD=
LDD=
ON condition
OFF condition
S1
= S2
225
LD>
LDD>
S1
> S2
S1
<= S2
226
LD<
LDD<
S1
< S2
S1
>= S2
228
LD<>
LDD<>
S1
S2
S1
= S2
229
LD<=
LDD<=
S1
<= S2
S1
> S2
230
LD>=
LDD>=
S1
>= S2
S1
< S2
S1
S2
22
FNC170-FNC179
External Device
FNC No.
FNC160-FNC169
Real Time Clock
Control
23
FNC180
Alternate
Instructions
Cautions
1. Negative value
S1
or
S2
24
25
FNC190-FNC199
Block Data
Operation
FNC181-FNC189
Others
When programming in GX Works2 and GX Developer, symbols "" and "" cannot be input.
Separate "" into "<" and "=", and separate "" into ">" and "=".
<Input example for 16-bit operation>
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
Program example
S2
FNC224
LD=
K200
C10
FNC225
LD>
D200
K-30
Y11
M50
X001
FNC225 K678493
LDD>
C200
SET
M3
29
FNC250-FNC269
Data Table
Operation
Y10
FNC220-FNC249
Data
Comparison
S1
30
FNC270-FNC276
Ex-Device
655
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
28.2
28.2 FNC232~238 AND=, >, <, < >, <=, >= / Data Comparison
FNC232~238 AND=, >, <, < >, <=, >= / Data Comparison
Outline
These instructions compare numeric values, and set a contact to ON when the condition agrees.
1. Instruction format
FNC 232
AND=
16-bit Instruction
FNC 233
D AND>
16-bit Instruction
FNC 234
AND<
16-bit Instruction
FNC 236
AND<>
16-bit Instruction
FNC 237
AND<=
16-bit Instruction
FNC 238
AND>=
16-bit Instruction
5 steps
5 steps
5 steps
5 steps
5 steps
5 steps
Mnemonic
Operation Condition
AND=
Mnemonic
Operation Condition
Operation Condition
9 steps
Operation Condition
9 steps
Operation Condition
AND>=
9 steps
Operation Condition
Continuous
Operation
Operation Condition
Continuous
Operation
Operation Condition
Continuous
Operation
ANDD<=
Continuous
Operation
Continuous
Operation
ANDD<>
Continuous
Operation
Operation Condition
ANDD<
Continuous
Operation
AND<=
Mnemonic
9 steps
Continuous
Operation
ANDD>
Continuous
Operation
AND<>
Mnemonic
9 steps
Operation Condition
ANDD=
Continuous
Operation
AND<
Mnemonic
9 steps
Operation Condition
AND>
Mnemonic
Continuous
Operation
Operation Condition
Continuous
Operation
ANDD>=
Description
Data Type
S1
S2
Bit Devices
System User
Word Devices
Digit Specification
System User
T
C D
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
656
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
28.2 FNC232~238 AND=, >, <, < >, <=, >= / Data Comparison
21
FNC232 to FNC237 are data comparison instructions connected to other contacts in series.
The contents of S1 are compared with the contents of S2 in binary format, and a contact becomes conductive
(ON) or non-conductive (OFF) depending on the comparison result.
16-bit instruction
32-bit instruction
ON condition
OFF condition
232
AND=
ANDD=
S1
= S2
233
AND>
ANDD>
S1
> S2
S1
<= S2
234
AND<
ANDD<
S1
< S2
S1
>= S2
236
AND<>
ANDD<>
S1
S2
S1
= S2
237
AND<=
ANDD<=
S1
<= S2
S1
< S2
238
AND>=
ANDD>=
S1
>= S2
S1
> S2
S2
S1
22
FNC170-FNC179
External Device
FNC No.
FNC160-FNC169
Real Time Clock
Control
23
FNC180
Alternate
Instructions
Cautions
1. Negative value
S1
or
S2
24
Make sure to execute the 32-bit operation (such as "ANDD=", "ANDD>" and "ANDD<") when comparing 32-bit
counters (C200 to C255).
If a 32-bit counter is specified in the 16-bit operation (such as "AND=", "AND>" and "AND<"), a program error or
operation error will occur.
25
FNC190-FNC199
Block Data
Operation
When programming in GX Works2 and GX Developer, symbols "" and "" cannot be input.
Separate "" into "<" and "=", and separate "" into ">" and "=".
FNC181-FNC189
Others
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
Program example
X001
FNC232
AND=
K200
C10
FNC236
AND<>
K-10
D0
FNC233 K678493
ANDD>
D10
SET
Y10
Y11
M50
29
FNC250-FNC269
Data Table
Operation
X002
S2
FNC220-FNC249
Data
Comparison
X000
S1
M3
30
FNC270-FNC276
Ex-Device
657
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
28.3
28.3 FNC240~246 OR=, >, <, < >, <=, >= / Data Comparison
FNC240~246 OR=, >, <, < >, <=, >= / Data Comparison
Outline
These instructions compare numeric values, and set a contact to ON when the condition agrees.
1. Instruction format
FNC 240
OR=
16-bit Instruction
FNC 241
OR>
16-bit Instruction
FNC 242
D
OR<
16-bit Instruction
FNC 244
OR<>
16-bit Instruction
FNC 245
D OR<=
16-bit Instruction
FNC 246
D OR>=
16-bit Instruction
5 steps
5 steps
5 steps
5 steps
5 steps
5 steps
Mnemonic
Operation Condition
OR=
Mnemonic
Operation Condition
Operation Condition
9 steps
Operation Condition
9 steps
Operation Condition
9 steps
Operation Condition
Continuous
Operation
Operation Condition
Continuous
Operation
Operation Condition
Continuous
Operation
ORD<=
Continuous
Operation
OR>=
Continuous
Operation
ORD<>
Continuous
Operation
Operation Condition
ORD<
Continuous
Operation
OR<=
Mnemonic
9 steps
Continuous
Operation
ORD>
Continuous
Operation
OR<>
Mnemonic
9 steps
Operation Condition
ORD=
Continuous
Operation
OR<
Mnemonic
9 steps
Operation Condition
OR>
Mnemonic
Continuous
Operation
Operation Condition
Continuous
Operation
ORD>=
Description
Data Type
S1
S2
Bit Devices
System User
Word Devices
Digit Specification
System User
T
C D
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
658
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
28.3 FNC240~246 OR=, >, <, < >, <=, >= / Data Comparison
21
FNC240 to 246 are data comparison instructions connected to other contacts in parallel.
The contents of S1 are compared with the contents of S2 in binary format, and a contact becomes conductive
(ON) or non-conductive (OFF) depending on the comparison result.
16-bit instruction
32-bit instruction
240
OR=
ORD=
ON condition
OFF condition
S1
= S2
241
OR>
ORD>
S1
> S2
S1
<= S2
242
OR<
ORD<
S1
< S2
S1
>= S2
244
OR<>
ORD<>
S1
S2
S1
= S2
245
OR<=
ORD<=
S1
<= S2
S1
> S2
246
OR>=
ORD>=
S1
>= S2
S1
< S2
S1
S2
22
FNC170-FNC179
External Device
FNC No.
FNC160-FNC169
Real Time Clock
Control
23
FNC180
Alternate
Instructions
Cautions
1. Negative value
S1
or
S2
24
Make sure to execute the 32-bit operation (such as "ORD=", "ORD>" and "ORD<") when comparing 32-bit counters
(C200 to C255).
If a 32-bit counter is specified in the 16-bit operation (such as "OR=", "OR>" and "OR<"), a program error or operation
error will occur.
25
FNC190-FNC199
Block Data
Operation
FNC181-FNC189
Others
When programming in GX Works2 and GX Developer, symbols "" and "" cannot be input.
Separate "" into "<" and "=", and separate "" into ">" and "=".
<Input example for 16-bit operation>
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
X001
Y000
FNC240
OR=
S2
K200
C10
29
M30
M60
FNC246
ORD>=
D100
FNC250-FNC269
Data Table
Operation
X002
S1
FNC220-FNC249
Data
Comparison
Program example
K100000
30
FNC270-FNC276
Ex-Device
659
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
660
FNC No.
Mnemonic
Symbol
250
251
252
253
254
255
256
LIMIT
LIMIT S1 S2 S3 D
Limit Control
Section 29.1
257
BAND
BAND S1 S2 S3 D
Section 29.2
258
ZONE
ZONE S1 S2 S3 D
Zone Control
Section 29.3
259
SCL
Section 29.4
260
DABIN
DABIN S D
Section 29.5
261
BINDA
BINDA S D
Section 29.6
262
263
264
265
266
267
268
269
SCL2
SCL
Function
S1 S2 D
SCL2 S1 S2 D
Reference
Section 29.7
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
29.1
Outline
1. Instruction format
FNC 256
P
LIMIT
16-bit Instruction
9 steps
Mnemonic
Continuous
Operation
Pulse (Single)
Operation
DLIMIT
DLIMITP
17 steps
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
S1
S2
Data Type
S3
Head device number storing the output value controlled by the upper and lower limit
values
3. Applicable devices
Bit Devices
System User
Word Devices
Digit Specification
System User
25
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
S2
26
FNC200-FNC209
Character String
Control
S3
D
S3
S1
28
D Output value
D Output value
FNC220-FNC249
Data
Comparison
In the case of S1 Lower limit value S3 Input value S2 Upper limit value
.... S3 Input value D
Output ( D )
value
Input
value
Output value
29
S2 Specified
Input ( S3 )
value
When controlling the output value using only the upper limit value, set -32768 to the lower limit value specified in
.
661
30
FNC270-FNC276
Ex-Device
S1 Specified
FNC250-FNC269
Data Table
Operation
Output
value
27
FNC210-FNC219
Data
Operation 3
S1
FNC190-FNC199
Block Data
Operation
Operand
Type
24
FNC181-FNC189
Others
23
FNC180
Alternate
Instructions
Operation Condition
LIMIT
LIMITP
22
FNC170-FNC179
External Device
This instruction provides the upper limit value and lower limit value for an input numeric value, and controls the output
value using these limit values.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
When controlling the output value using only the lower limit value, set 32767 to the upper limit value specified
in S2
+1, S1
] and [ S2
FNC256
DLIMIT
S1
S1
+1, S2
S3
S2
+1, S1
S3
+1,
+1,
D
S3
] is controlled.
+1, S3
+1, S1
S1
+1, D
In the case of Lower limit value > Input value .................................... Lower limit value Output value
S2
+1, S2
S3
S2
+1, S3
+1, S2
+1, D
In the case of Upper limit value < Input value .................................... Upper limit value Output value
S1
+1, S1
S3
+1, S3
S2
+1, S2
S3
+1, S3
In the case of Lower limit value Input value Upper limit value .... Input value
Output
value
Output
( D
value
+1, D
Output value
+1, D
)
S2 +1, S2
Specified
Input
value
Input value
( S3
+1, S3
S1 +1, S1
Specified
When controlling the output value using only the upper limit value, set -2,147,483,648 to the lower limit value
specified in [ S1
+1, S1
].
When controlling the output value using only the lower limit value, set 2,147,483,647 to the upper limit value
specified in [ S2
+1, S2
].
Error
An operation error is caused when the instruction is executed in the setting status shown below; The error flag M8067
turns ON, and the error code (K6706) is stored in D8067.
Relationship
662
16-bit operation
S1
32-bit operation
[ S1
S2
+1, S1
] [ S2
+1, S2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
1. Program example 1
In the program example shown below, the BCD data set in X020 to X037 is controlled by the limit values 500 to
5000, and the controlled value is output to D1 when X000 turns ON.
X000
K500
D0
K5000
D1
D0
22
FNC170-FNC179
External Device
FNC256
LIMIT
FNC 19 K4X020
BIN
END
23
FNC180
Alternate
Instructions
Operation
In the case of D0 < 500, 500 is output to D1.
FNC160-FNC169
Real Time Clock
Control
Program examples
Output (D1)
24
500
5000
Input (D0)
2. Program example 2
X000
FNC 19 K8X020
DBIN
FNC256 K10000 K1000000
DLIMIT
D0
D0
D10
26
FNC200-FNC209
Character String
Control
END
Operation
In the case of (D1, D0) < 10000, 10000 is output to (D11,
D10).
27
Output (D11,D10)
1,000,000
10000
10000 1,000,000
Input (D1,D0)
FNC210-FNC219
Data
Operation 3
25
FNC190-FNC199
Block Data
Operation
In the program example shown below, the BCD data set in X020 to X057 is controlled by the limit values 10000 and
1,000,000, and the controlled value is output to D11 and D10 when X000 turns ON.
FNC181-FNC189
Others
5000
500
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
663
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
29.2
Outline
This instruction provides the upper limit value and lower limit value of the dead band for an input numeric value, and
controls the output value using these limit values.
1. Instruction format
FNC 257
D BAND P
Mnemonic
16-bit Instruction
Operation Condition
BAND
BANDP
9 steps
Continuous
Operation
Pulse (Single)
Operation
17 steps
Operation Condition
DBAND
DBANDP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
S1
S2
S3
Device number storing the output value controlled by the dead band
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
S2
S3
D
and S2
Command
input
FNC257
BAND
S1
is controlled.
S2
S3
Output value
Input
value
Output value ( D )
Lower limit value of
dead band
( S1 )
Input value ( S3 )
Output
Output value = 0
664
Output
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
Depending on how the input value (32-bit binary value) specified by [ S3
range between [ S1 +1, S1 ] and [ S2 +1, S2
The output value is controlled as shown below:
Command
input
] is controlled.
S3
S2
S3 +1, S3
S3 +1, S3
+1, S1
In the case of Lower limit value > Input value ...............Input value
S3
S3
+1, S3
S1 +1, S1
D +1, D
Lower limit value Output value
+1, S3
S2
In the case of Upper limit value < Input value ..............Input value
+1, S1
S3
+1, S3
S2
+1, S2
23
+1, D
FNC180
Alternate
Instructions
+1, S2
FNC170-FNC179
External Device
S1
S1
S1
S3
+1,
22
FNC257
DBAND
S2
+1,
FNC160-FNC169
Real Time Clock
Control
+1, S2
+1, D
In the case of Lower limit value Input value Upper limit value ................................ 0 Output value
Input
value
+1, D
24
FNC181-FNC189
Others
Output
[ D
value
Output value
Output
Input value
[ S3
+1, S3
25
FNC190-FNC199
Block Data
Operation
Output
Output value = 0
Caution
= 10
= -32768
27
+1, S3
] = 1000
] = -2,147,483,648
28
FNC220-FNC249
Data
Comparison
Input value [ S3
+1, S1
Error
An operation error is caused when the instruction is executed in the setting status shown below; The error flag M8067
turns ON, and the error code (K6706) is stored in D8067.
S1
32-bit operation
[ S1
> S2
+1, S1
] > [ S2
+1, S2
29
FNC250-FNC269
Data Table
Operation
Relationship
16-bit operation
FNC210-FNC219
Data
Operation 3
26
FNC200-FNC209
Character String
Control
30
FNC270-FNC276
Ex-Device
665
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program examples
1. Program example 1
In the program example shown below, the BCD data set in X020 to X037 is controlled by the dead band from -1000
to +1000, and a controlled value is output to D1 when X000 turns ON.
X000
FNC257 K-1000
BAND
Output
FNC 19 K4X020
BIN
D0
K1000
D1
D0
Input
END
Operation
In the case of D0 < -1000, D0 - (-1000) is output to D1.
In the case of -1000 D0 +1000, 0 is output to D1.
Output
0
1000
Input
2. Program example 2
In the program example shown below, the BCD data set in X020 to X057 is controlled by the dead band from -10000
to +10000, and a controlled value is output to D11 and D10 when X000 turns ON.
X000
Output
FNC 19 K8X020
DBIN
FNC257 K-10000 K10000
DBAND
D0
D0
D10
Input
END
Operation
In the case of (D1, D0) < -10000, (D1, D0) - (-10000) is output to
(D11, D10).
In the case of -10000 (D1, D0) +10000, 0 is output to (D11,
D10).
In the case of (D1, D0) > +10000, (D1, D0) - 10000 is output to
(D11, D10).
Output
-10000 0
+10000
666
Input
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
29.3
Outline
1. Instruction format
FNC 258
D ZONE P
16-bit Instruction
9 steps
Mnemonic
Operation Condition
ZONE
ZONEP
17 steps
Operation Condition
DZONE
DZONEP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
24
S2
S3
Head device number storing the output value controlled by the zone
3. Applicable devices
System User
Digit Specification
System User
25
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S1
26
S2
FNC200-FNC209
Character String
Control
S3
D
27
or S2
specified by D .
The bias value is added as shown below:
S1
S2
S3
28
In the case of S3
Output value
In the case of S3
Output value
In the case of S3
Output value
Input value + S2
Output ( D
value
Positive bias value
( S2
Input
value
29
FNC250-FNC269
Data Table
Operation
Output
value
Input value + S1
FNC220-FNC249
Data
Comparison
FNC258
ZONE
FNC210-FNC219
Data
Operation 3
Command
input
FNC190-FNC199
Block Data
Operation
Operand
Type
Word Devices
FNC181-FNC189
Others
S1
Bit Devices
23
FNC180
Alternate
Instructions
Continuous
Operation
Pulse (Single)
Operation
22
FNC170-FNC179
External Device
Depending on how the input value compares to positive or negative, the output value is controlled by the bias value
specified.
)
0
Input ( S3
value
30
FNC270-FNC276
Ex-Device
667
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
+1, S1
] or [ S2
FNC258
DZONE
S3
S1
S2
+1, S2
+1,
S3
+1, S3
+1,
S3
+1, S3
].
S1
+
+1, S1
+1, D
+1, S3
+1, D
+1, S3
S3
+1, S3
S2
+
+1, S2
+1, D
Output value [ D
+1, D
Input
value
Input value
[ S3 +1, S3
Caution
When the output value overflows, it is handled as follows:
- In the 16-bit operation
The operation result is a 16-bit binary value with sign. Accordingly, if the output value is outside the range from
-32768 to +32767, it is handled as follows:
Negative bias value S1
Input value S3
= -100
= -32768
668
+1, S3
+1, S1
] = -1000
] = -2,147,483,648
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
1. Program example 1
In the program example shown below, the BCD data set in X020 to X037 is controlled by the zone from -1000 to
+1000, and the controlled value is output to D1 when X000 turns ON.
X000
D0
K1000
D1
D0
22
FNC170-FNC179
External Device
FNC258 K-1000
ZONEP
FNC 19 K4X020
BIN
FNC160-FNC169
Real Time Clock
Control
Program examples
END
23
FNC180
Alternate
Instructions
Operation
In the case of D0 < 0, D0 + (-1000) is output to D1.
Output
24
-1000
0
1000
Input
-1000
FNC181-FNC189
Others
1000
25
In the program example shown below, the BCD data set in X020 to X057 is controlled by the zone from -10000 to
+10000, and the controlled value is output to D11 and D10 when X000 turns ON.
X000
FNC 19 K8X020
DBIN
D0
26
D0
FNC200-FNC209
Character String
Control
FNC190-FNC199
Block Data
Operation
2. Program example 2
D10
END
27
In the case of (D1, D0) < 0, (D1, D0) + (-10000) is output to (D11,
D10).
FNC210-FNC219
Data
Operation 3
Operation
Output
28
10000
10000
Input
-10000
FNC220-FNC249
Data
Comparison
-10000 0
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
669
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
29.4
Outline
This instruction executes scaling of the input value using a specified data table, and outputs the result.
SCL2 (FNC269) is also available with a different data table configuration for scaling.
For SCL2 (FNC269) instruction, refer to Section 29.7.
1. Instruction format
FNC 259
D
P
SCL
Mnemonic
16-bit Instruction
Operation Condition
SCL
SCLP
7 steps
Continuous
Operation
Pulse (Single)
Operation
13 steps
Operation Condition
DSCL
DSCLP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
S1
Input value used in scaling or device number storing the input value
S2
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
S2
. Conversion for scaling is executed based on the data table stored in a device
Command
input
FNC259
SCL
Y
S1
Set item
Point 2
Output
value
( D )
Point 5
Point 1
Point 3
Point 1
Operation
error
S2
Input value ( S1
Point 2
Point 4
)
Operation is enabled.
X
Operation
error
Point 3
Point 4
Point 5
670
Device assignment in
setting data table
S2
X coordinate
S2
+1
Y coordinate
S2
+2
X coordinate
S2
+3
Y coordinate
S2
+4
X coordinate
S2
+5
Y coordinate
S2
+6
X coordinate
S2
+7
Y coordinate
S2
+8
X coordinate
S2
+9
Y coordinate
S2
+10
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
The input value specified in [ S1
+1,
S1
+1,
22
FNC259
DSCL
Y
S1
S2
X coordinate
[ S2
+3, S2
+2]
23
Y coordinate
[ S2
+5, S2
+4]
X coordinate
[ S2
+7, S2
+6]
Y coordinate
[ S2
+9, S2
+8]
X coordinate
[ S2
+11, S2
+10]
Y coordinate
[ S2
+13, S2
+12]
X coordinate
[ S2
+15, S2
+14]
Y coordinate
[ S2
+17, S2
+16]
X coordinate
[ S2
+19, S2
+18]
Y coordinate
[ S2
+21, S2
+20]
Point 5
Output
value
( D )
Point 3
Point 2
Point 4
Point 1
Input value ( S1 )
Point 3
Operation is enabled.
Point 4
Point 5
The conversion table for scaling is set based on the data table stored in a device specified in [ S2 +1, S2 ] and
later.
The data table has the following configuration:
For a setting example, refer to the following.
Device assignment in setting data table
16-bit operation
[ S2
+1, S2
+1
[ S2
+3, S2
+2]
Y coordinate
S2
+2
[ S2
+5, S2
+4]
X coordinate
S2
+3
[ S2
+7, S2
+6]
Y coordinate
S2
+4
[ S2
+9, S2
+8]
X coordinate
S2
+2n-1
[ S2
+4n-1, S2
+4n-2]
Y coordinate
S2
+2n
[ S2
+4n+1, S2
+4n]
27
...
...
S2
...
X coordinate
...
Point n (last)
32-bit operation
FNC210-FNC219
Data
Operation 3
Point 2
S2
28
FNC220-FNC249
Data
Comparison
29
Point 2
(20,30)
Point 1(5,7)
Point 6(200,250)
Point 5
(200,70)
Point 4(200,25)
Point 7
(250,90)
FNC250-FNC269
Data Table
Operation
Point 3
(50,100)
26
FNC200-FNC209
Character String
Control
Set item
25
FNC190-FNC199
Block Data
Operation
24
FNC181-FNC189
Others
Operation
error
FNC180
Alternate
Instructions
+1, S2
Device assignment in
setting data table
Set item
Point 2
Operation
error
[ S2
FNC170-FNC179
External Device
Command
input
FNC160-FNC169
Real Time Clock
Control
Point 8(350,90)
Point 9
(350,30)
30
Point 10(400,7)
FNC270-FNC276
Ex-Device
671
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
When R0 is specified in
S2
Number of coordinate points
Point 1
Point 2
Point 3
Point 4
Point 5
Point 6
Point 7
Point 8
Point 9
Point 10
S2
Setting
contents
R0
K10
X coordinate
S2
+1
R1
K5
Y coordinate
S2
+2
R2
K7
X coordinate
S2
+3
R3
K20
Y coordinate
S2
+4
R4
K30
X coordinate
S2
+5
R5
K50
Y coordinate
S2
+6
R6
K100
X coordinate
S2
+7
R7
K200
Y coordinate
S2
+8
R8
K25
X coordinate
S2
+9
R9
K200
Y coordinate
S2
+10
R10
K70
X coordinate
S2
+11
R11
K200
Y coordinate
S2
+12
R12
K250
X coordinate
S2
+13
R13
K250
Y coordinate
S2
+14
R14
K90
X coordinate
S2
+15
R15
K350
Y coordinate
S2
+16
R16
K90
X coordinate
S2
+17
R17
K350
Y coordinate
S2
+18
R18
K30
X coordinate
S2
+19
R19
K400
Y coordinate
S2
+20
R20
K7
Remarks
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the Xn data is not set in the ascending order in the data table (error code: K6706)
The data table is searched from the low-order side of device numbers in the data table in the operation.
Accordingly, even if only some Xn data is set in the ascending order in the data table, the instruction is executed
without operation error up to the area of the data table in which the Xn data is set in the ascending order.
When S1
When the value exceeds the 32-bit data range in the middle of operation (error code: K6706)
In this case, verify that the distance between points is not 65535 or more.
If the distance is 65535 or more, reduce the distance between points.
672
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
In the program example shown below, the value input to D0 is processed by scaling based on the conversion table for
scaling set in R0 and later, and output to D10.
Program
M8000
R0
D0
22
D10
FNC170-FNC179
External Device
FNC259
SCL
FNC160-FNC169
Real Time Clock
Control
Program example
END
23
Operation
Y
Point 3
(30,100)
Set item
Number of coordinate points
Point 2
(10,50)
Point 5
(50,30)
Point 1
(0,0)
Point 2
Point 3
Input value(D0)=7
Point 6
(60,0)
X
Point 4
Point 6
R0
K6
X coordinate
R1
K0
Y coordinate
R2
K0
X coordinate
R3
K10
Y coordinate
R4
K50
X coordinate
R5
K30
Y coordinate
R6
K100
X coordinate
R7
K40
Y coordinate
R8
K45
X coordinate
R9
K50
Y coordinate
R10
K30
X coordinate
R11
K60
Y coordinate
R12
K0
24
25
FNC190-FNC199
Block Data
Operation
Point 5
Setting
contents
FNC181-FNC189
Others
Output value
(D10)=35
Point 1
Point 4
(40,45)
Device
FNC180
Alternate
Instructions
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
673
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
29.5
Outline
This instruction converts numeric data expressed in decimal ASCII codes (30H to 39H) into binary data.
1. Instruction format
FNC 260
D DABIN P
16-bit Instruction
5 steps
Mnemonic
Operation Condition
DABIN
DABINP
Continuous
Operation
Pulse (Single)
Operation
9 steps
Operation Condition
DDABIN
DDABINP
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
Head device number storing data (ASCII codes) to be converted into binary data
Character string
16- or 32-bit binary
3. Applicable devices
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
Data stored in
to
+2 expressed in decimal ASCII codes (30H to 39H) is converted into 16-bit binary
Command
input
FNC260
DABINP
b15
b8 b7
b0
Sign data
+0 ASCII code for 10000's digit
+1 ASCII code for 100's digit ASCII code for 1000's digit
ASCII code for 10's digit
+2 ASCII code for 1's digit
b15
b0
b15
674
to
as follows:
+0
+1
+2
b8 b7
32H(2)
31H(1)
38H(8)
b0
2DH(-)
35H(5)
30H(0)
b0
b15
D
2)
3)
As "sign data" (low-order byte of S ), "20H (space)" is set when the data to be converted is positive, and "2DH
(-)" is set when the data to be converted is negative.
to
-25108
4)
5)
When an ASCII code for each digit is "20H (space)" or "00H (NULL)", it is handled as "30H".
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
1)
Data stored in
to
+5 expressed in decimal ASCII codes (30H to 39H) is converted into 32-bit binary
+1,
S
stored in [ D
+1,
+1
b16 b15
High-order 16 bits
b0
Low-order 16 bits
32-bit data
24
b0
2DH(-)
32H(2)
34H(4)
34H(4)
32H(2)
30H(0)
+1
-1234543210
25
to
+5 is ignored.
As "sign data" (low-order byte of S ), "20H (space)" is set when the data to be converted is positive, and "2DH
(-)" is set when the data to be converted is negative.
An ASCII code for each digit is ranging from "30H" to "39H".
5)
When an ASCII code for each digit is "20H (space)" or "00H (NULL)", it is handled as "30H".
26
FNC200-FNC209
Character String
Control
4)
Related instructions
Instruction
Description
Converts hexadecimal codes into ASCII codes.
Converts ASCII codes into hexadecimal codes.
Converts binary data into a character string (ASCII codes).
VAL (FNC201)
27
FNC210-FNC219
Data
Operation 3
BINDA (FNC261)
Errors
is any value other than "20H (space)" or "2DH (-)" (error code: K6706)
to
to
29
16-bit operation
32768 to 32767
2,147,483,648 to 2,147,483,647
When
to
FNC250-FNC269
Data Table
Operation
Setting range
32-bit operation
28
FNC220-FNC249
Data
Comparison
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the sign data stored in
FNC190-FNC199
Block Data
Operation
FNC181-FNC189
Others
31H(1)
33H(3)
35H(5)
33H(3)
31H(1)
(Ignored)
23
] as follows:
b8 b7
+0
+1
+2
+3
+4
+5
to
b31
FNC180
Alternate
Instructions
b15
2)
b0
Sign data
FNC170-FNC179
External Device
b8 b7
22
b15
+0
+1
+2
+3
+4
+5
].
FNC160-FNC169
Real Time Clock
Control
30
FNC270-FNC276
Ex-Device
675
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Program example
In the program below, the sign and decimal ASCII codes in five digits stored in D20 to D22 are converted into a binary
value and stored in D0 when X000 is set to ON.
X000
FNC260
DABINP
D20
D0
END
D20
D21
D22
b15
b8 b7
b0
20H(space)
2DH(-)
32H(2)
20H(space)
36H(6)
37H(7)
"-
676
276"
D0
-276
(It is regarded as
"-00276".)
Binary
value
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
29.6
Outline
22
This instruction converts binary data into decimal ASCII codes (30H to 39H).
FNC170-FNC179
External Device
1. Instruction format
FNC 261
D BINDA P
16-bit Instruction
Mnemonic
Operation Condition
BINDA
BINDAP
5 steps
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
DBINDA
DBINDAP
9 steps
Continuous
Operation
Pulse (Single)
Operation
23
FNC180
Alternate
Instructions
2. Set data
Operand Type
Description
Data Type
24
Character string
Bit Devices
Operand
Type
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
26
and later.
Command
input
FNC261
BINDAP
27
b15
b8 b7
b0
Sign data
D +0 ASCII code for 10000's digit
+1 ASCII code for 100's digit ASCII code for 1000's digit
+2 ASCII code for 1's digit
ASCII code for 10's digit
+3
0000H or source data
b0
b0
b15
-12345
b8 b7
31H(1)
2DH(-)
33H(3)
32H(2)
35H(5)
34H(4)
0000H or source data
2)
3)
b0
29
M8091=OFF: 0000H
M8091=ON: Does not change.
30
is as follows:
D
positive, and "2DH (-)" is set when 16-bit binary data stored in
is negative.
677
is
FNC270-FNC276
Ex-Device
28
FNC250-FNC269
Data Table
Operation
D +0
+1
+2
+3
M8091=OFF: 0000H
M8091=ON: Does
not change.
FNC220-FNC249
Data
Comparison
FNC210-FNC219
Data
Operation 3
b15
FNC200-FNC209
Character String
Control
25
FNC190-FNC199
Block Data
Operation
1)
FNC181-FNC189
Others
3. Applicable devices
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
b) "20H (space)" is stored for "0" on the left side of the effective digits (zero suppression).
00 325
Effective digits
20H
c)
ON/OFF status
Contents of processing
M8091=OFF
M8091=ON
+1,
and later.
Command
input
FNC261
DBINDAP
S +1
D
b15
D +0
+1
+2
+3
+4
+5
High-order 16 bits
Low-order 16 bits
b8 b7
b0
Sign data
M8091=OFF:00H
M8091=ON:20H
+1,
D +0
+1
+2
+3
+4
+5
S +1
S
-12345678
b8 b7
20H(space)
31H(1)
33H(3)
35H(5)
37H(7)
00H or 20H
and later as
b0
2DH(-)
20H(space)
32H(2)
34H(4)
36H(6)
38H(8)
M8091=OFF:00H
M8091=ON:20H
2)
3)
is as follows:
+1,
S ] is positive, and "2DH (-)" is set when 32-bit binary data stored in [ S +1, S
b) "20H (space)" is stored for "0" on the left side of the effective digits (zero suppression).
] is negative.
00 1 2 0 3 4 5 6 0
Effective digits
20H
ON/OFF status
678
Contents of processing
M8091=OFF
M8091=ON
+1,
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
Device
Name
Description
M8091
FNC160-FNC169
Real Time Clock
Control
Related devices
D
D
D
D
22
FNC170-FNC179
External Device
Related instructions
Instruction
Description
Converts hexadecimal values into ASCII code.
STR (FNC200)
VAL (FNC201)
23
FNC180
Alternate
Instructions
DABIN (FNC260)
Converts numeric data expressed in decimal ASCII code (30H to 39H) into binary data.
24
Cautions
The table below shows the occupied device points of
OFF and 32-bit operation (DBINDA/DBINDAP).
Occupied Points of
M8091=ON
25
M8091=OFF
FNC190-FNC199
Block Data
Operation
16-bit operation
32-bit operation
Errors
An operation error is caused in the following case; The error flag M8067 turns ON, and the error code is stored in
D8067.
D
Program example
X000
M8091
SET
M8027
FNC261
BINDAP
D1000
D0
FNC 77
PR
D0
Y040
28
FNC220-FNC249
Data
Comparison
RST
29
FNC250-FNC269
Data Table
Operation
END
16-bit binary
data
b15
b8 b7
b0
20H(space)
20H(space)
31H(1)
35H(5)
36H(6)
32H(2)
0000H
PR (FNC 77)
instruction
30
Y040 to Y051
"
FNC270-FNC276
Ex-Device
D1000
5126
D0
D1
D2
D3
27
FNC210-FNC219
Data
Operation 3
In the program below, 16-bit binary data stored in D1000 is converted into decimal ASCII codes when X000 is set to
ON, and the ASCII codes converted by the PR (FNC 77) instruction are output one by one by the time division method
to Y040 to Y051.
By turning to OFF the output character selector signal M8091 and setting to ON PR mode flag M8027, ASCII codes up
to "00H" are output.
For PR mode flag and the PR (FNC 77) instruction, refer to Section 15.8.
26
FNC200-FNC209
Character String
Control
FNC181-FNC189
Others
5126" is
output.
M8091=OFF
679
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
29.7
Outline
This instruction executes scaling of the input value using a specified data table, and outputs the result.
SCL (FNC259) is also available with a different data table configuration for scaling.
SCL2 instruction is supported in the FX3UC Series Ver. 1.30 or later.
For SCL (FNC259) instruction, refer to Section 29.4.
1. Instruction format
FNC 269
D
P
SCL2
Mnemonic
16-bit Instruction
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
DSCL2
DSCL2P
SCL2
SCL2P
7 steps
13 steps
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
2. Set data
Operand Type
Description
Data Type
S1
Input value used in scaling or device number storing the input value
S2
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
S2
. Conversion for scaling is executed based on the data table stored in a device
Command
input
FNC 269
SCL2
Y
S1
Point 5
Point 3
Point 1
Input value ( S1
X coordinate
Point 4
)
Operation is enabled.
X
Operation
error
Y coordinate
680
Device assignment in
setting data table
Set item
Point 2
Output
value
( D )
Operation
error
S2
S2
Point 1
S2
+1
Point 2
S2
+2
Point 3
S2
+3
Point 4
S2
+4
Point 5
S2
+5
Point 1
S2
+6
Point 2
S2
+7
Point 3
S2
+8
Point 4
S2
+9
Point 5
S2
+10
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
The input value specified in [ S1
+1,
S1
+1,
22
FNC 269
DSCL2
Y
S1
S2
Point 2
Output
value
( D )
Point 3
X coordinate
Point 4
Point 1
Input value ( S1 )
Operation
error
Operation is enabled.
Y coordinate
23
Point 1
[ S2
+3, S2
+2]
Point 2
[ S2
+5, S2
+4]
Point 3
[ S2
+7, S2
+6]
Point 4
[ S2
+9, S2
+8]
Point 5
[ S2
+11, S2
+10]
Point 1
[ S2
+13, S2
+12]
Point 2
[ S2
+15, S2
+14]
Point 3
[ S2
+17, S2
+16]
Point 4
[ S2
+19, S2
+18]
Point 5
[ S2
+21, S2
+20]
The conversion table for scaling is set based on the data table stored in a device specified in [ S2 +1, S2 ] and
later.
The data table has the following configuration:
For a setting example, refer to the next page.
Device assignment in setting data table
16-bit operation
32-bit operation
S2
[ S2
+1, S2
S2
+1
[ S2
+3, S2
+2]
Point 2
S2
+2
[ S2
+5, S2
+4]
Point n (last)
S2
+n
[ S2
+2n+1, S2
+2n]
Point 1
S2
+n+1
[ S2
+2n+3, S2
+2n+2]
Point 2
S2
+n+2
[ S2
+2n+5, S2
+2n+4]
S2
+2n
[ S2
+4n+1, S2
X coordinate
FNC210-FNC219
Data
Operation 3
...
...
...
Point n (last)
27
...
...
Y coordinate
...
Point 1
28
+4n]
FNC220-FNC249
Data
Comparison
29
Point 2
(20,30)
Point 1(5,7)
Point 6(200,250)
Point 5
(200,70)
Point 4(200,25)
Point 7
(250,90)
FNC250-FNC269
Data Table
Operation
Point 3
(50,100)
26
FNC200-FNC209
Character String
Control
Set item
25
FNC190-FNC199
Block Data
Operation
24
FNC181-FNC189
Others
Operation
error
FNC180
Alternate
Instructions
Point 5
+1, S2
Device assignment in
setting data table
Set item
FNC170-FNC179
External Device
Command
input
FNC160-FNC169
Real Time Clock
Control
Point 8(350,90)
Point 9
(350,30)
30
Point 10(400,7)
FNC270-FNC276
Ex-Device
681
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
When R0 is specified in
S2
Point 1
S2
Point 2
X coordinate
Y coordinate
S2
Remarks
Setting
contents
R0
K10
+1
R1
K5
S2
+2
R2
K20
Point 3
S2
+3
R3
K50
Point 4
S2
+4
R4
K200
Point 5
S2
+5
R5
K200
Point 6
S2
+6
R6
K200
Point 7
S2
+7
R7
K250
Point 8
S2
+8
R8
K350
Point 9
S2
+9
R9
K350
Point 10
S2
+10
R10
K400
Point 1
S2
+11
R11
K7
Point 2
S2
+12
R12
K30
Point 3
S2
+13
R13
K100
Point 4
S2
+14
R14
K25
Point 5
S2
+15
R15
K70
Point 6
S2
+16
R16
K250
Point 7
S2
+17
R17
K90
Point 8
S2
+18
R18
K90
Point 9
S2
+19
R19
K30
Point 10
S2
+20
R20
K7
Refer to *1.
Refer to *2.
Refer to *1.
Refer to *2.
*1.
When coordinates are specified using three points as shown in the points 4, 5 and 6, the output value can be
set to an intermediate value.
In this example, the output value (intermediate value) is specified by the Y coordinate of the point 5.
If the X coordinate is same at three points or more, the value at the second point is output also.
*2.
When coordinates are specified using two points as shown in the points 8 and 9, the output value is the Y
coordinate at the next point.
In this example, the output value is specified by the Y coordinate of the point 9.
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the Xn data is not set in the ascending order in the data table (error code: K6706)
The data table is searched from the low-order side of the device numbers in the data table in the operation.
Accordingly, even if only some Xn data is set in the ascending order in the data table, the instruction is executed
without operation error up to the area of the data table in which the Xn data is set in the ascending order.
When S1
When the value exceeds the 32-bit data range in the middle of operation (error code: K6706)
In this case, verify that the distance between points is not 65535 or more.
If the distance is 65535 or more, reduce the distance between points.
682
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
In the program example shown below, the value input to D0 is processed by scaling based on the conversion table for
scaling set in R0 and later, and output to D10.
Program
M8000
R0
D0
22
D10
FNC170-FNC179
External Device
FNC 269
SCL2
FNC160-FNC169
Real Time Clock
Control
Program example
END
23
Operation
Y
Point 3
(30,100)
Set item
Number of coordinate points
Point 4
(40,45)
Point 1
(0,0)
Input value(D0)=7
X coordinate
Point 5
(50,30)
X
Y coordinate
R0
K6
Point 1
R1
K0
Point 2
R2
K10
Point 3
R3
K30
Point 4
R4
K40
Point 5
R5
K50
Point 6
R6
K60
Point 1
R7
K0
Point 2
R8
K50
Point 3
R9
K100
Point 4
R10
K45
Point 5
R11
K30
Point 6
R12
K0
24
25
FNC190-FNC199
Block Data
Operation
Point 6
(60,0)
Setting
contents
FNC181-FNC189
Others
Output value
(D10)=35
Point 2
(10,50)
Device
FNC180
Alternate
Instructions
26
FNC200-FNC209
Character String
Control
27
FNC210-FNC219
Data
Operation 3
28
FNC220-FNC249
Data
Comparison
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
683
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
684
FNC No.
Mnemonic
Symbol
Function
Reference
270
IVCK
IVCK S1 S2 D n
Section 30.1
271
IVDR
IVDR S1 S2 S3 n
Inverter Drive
Section 30.2
272
IVRD
IVRD S1 S2 D n
Section 30.3
273
IVWR
IVWR S1 S2 S3 n
Section 30.4
274
IVBWR
IVBWR S1 S2 S3 n
Section 30.5
275
IVMC
IVMC S1 S2 S3 D n
Section 30.6
276
ADPRW
ADPRW S S1 S2 S3 S4/D
Section 30.7
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
30.1
Outline
1. Instruction format
Mnemonic
16-bit Instruction
9 steps
Operation Condition
IVCK
Continuous
Operation
23
Operation Condition
FNC180
Alternate
Instructions
FNC 270
IVCK
2. Set data
Operand Type
S2
24
Data Type
FNC181-FNC189
Others
16-bit binary
25
Ch2 is not available in FX3G PLC (14-point and 24-point type) and FX3S PLC.
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
S1
S2
S2
S1
S2
S1
S2
Modify
Real
CharacPointer
Number ter String
" "
27
Command
input
S1
S2
of an inverter connected to
D
29
FNC250-FNC269
Data Table
Operation
*2.
FNC270
IVCK
S2
28
FNC220-FNC249
Data
Comparison
FNC210-FNC219
Data
Operation 3
26
FNC200-FNC209
Character String
Control
S1
Index
Constant
FNC190-FNC199
Block Data
Operation
*1.
Description
S1
22
FNC170-FNC179
External Device
This instruction reads the operation status of an inverter to a PLC using the computer link operation function of the
inverter. Applicable inverters vary depending on the version.
This instruction corresponds to the EXTR (K10) instruction in the FX2N/FX2NC Series.
For detailed explanation of the instruction, refer to the Data Communication Edition manual.
30
FNC270-FNC276
Ex-Device
685
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
S2
Inverter Instruction
code (hexadecimal)
*1.
Read contents
H7B
Operation mode
H6F
Output frequency
(speed)
F700
A700
E700
D700
V500
F500
A500
E500
S500
*1
H70
Output current
H71
Output voltage
H72
Special monitor
H73
H74
Alarm definition
H75
Alarm definition
H76
Alarm definition
H77
Alarm definition
H79
H7A
H6E
*1
H6D
*1
H7F
H6C
Please write "0" to instruction code HFF (Link parameter expansion setting) just before the IVCK instruction
when reading frequency.
When "0" is not written, reading of the frequency may not be executed normally.
3. Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Number
ch1
M8029
Number
Description
ch2
Description
ch1
ch2
D8063
D8438
D8150
D8155
M8063
M8438
Serial communication
M8151
M8156
Inverter communicating
D8151
D8156
M8152
M8157
D8152
D8157
M8153
M8158
D8153
D8158
D8154
D8159
M8154
*2.
*3.
*4.
M8159
error*2
*3
Cautions
For other cautions, refer to the Data Communication Edition manual.
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"FLCRT (FNC300) to FLSTRD
(FNC305)" instruction and an "IVCK (FNC270) to IVMC (FNC275)" instruction for the same port.
Two or more inverter communication instructions (FNC270 to FNC275) can be driven for the same port at the same
time.
FREQROL-V500/F500/A500/E500/S500
FX3G
FX3GC
FX3U
FX3UC
686
FREQROL-F700/A700
FX3S
FREQROL-E700/D700
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
30.2
Outline
1. Instruction format
16-bit Instruction
9 steps
Mnemonic
Operation Condition
IVDR
Continuous
Operation
23
Operation Condition
FNC180
Alternate
Instructions
FNC 271
IVDR
2. Set data
Operand Type
24
Data Type
S2
S3
Set value to be written to the inverter parameter or device number storing the data to be
set
FNC181-FNC189
Others
16-bit binary
25
FNC190-FNC199
Block Data
Operation
*1.
Description
S1
Ch2 is not available in FX3G PLC (14-point and 24-point type) and FX3S PLC.
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
C
Others
Special
Unit
U \G
S1
S1
S2
S2
S1
S2
S3
S1
S2
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
27
*2.
FNC271
IVDR
29
FNC250-FNC269
Data Table
Operation
Command
input
of an inverter connected to
28
FNC220-FNC249
Data
Comparison
FNC210-FNC219
Data
Operation 3
26
FNC200-FNC209
Character String
Control
22
FNC170-FNC179
External Device
This instruction writes a inverter operation required control value to an inverter using the computer link operation
function of the inverter.
This instruction corresponds to the EXTR (K11) instruction in the FX2N/FX2NC Series.
For detailed explanation of the instruction, refer to the Data Communication Edition manual.
S1
S2
S3
30
FNC270-FNC276
Ex-Device
687
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
S2
Inverter Instruction
code (hexadecimal)
Write contents
HFB
Operation mode
HF3
F700
A700
E700
D700
V500
HF9
HFA
Run command
HEE
*3
HED
*3
HFD*1
Inverter
F500
A500
E500
S500
reset*2
HF4
HFC
HFC
User clear
HFF
*1.
The instruction code "HFD (inverter reset)" does not request a response from the inverter.
Accordingly, even if inverter reset is executed to a station number at which an inverter is not connected, error
does not occur.
It takes about 2.2 seconds to complete execution of inverter reset.
*2.
When resetting the inverter, please specify H9696 as the operand S3 of the IVDR instruction.
Do not use H9966.
Please write "0" to instruction code HFF (Link parameter expansion setting) just before the IVDR instruction
when writing frequency.
When "0" is not written, writing of the frequency may not be executed normally.
*3.
3. Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Number
ch1
M8029
Number
Description
ch2
Description
ch1
ch2
D8063
D8438
D8150
D8155
M8063
M8438
Serial communication
M8151
M8156
Inverter communicating
D8151
D8156
M8152
M8157
D8152
D8157
M8153
M8158
D8153
D8158
M8154
M8159
D8154
D8159
*4.
*5.
*6.
IVBWR instruction
error*4
error*5
Cautions
For other cautions, refer to the Data Communication Edition manual.
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"FLCRT (FNC300) to FLSTRD
(FNC305)" instruction and an "IVCK (FNC270) to IVMC (FNC275)" instruction for the same port.
Two or more inverter communication instructions (FNC270 to FNC275) can be driven for the same port at the same
time.
FREQROL-V500/F500/A500/E500/S500
FX3G
FX3GC
FX3U
FX3UC
688
FREQROL-F700/A700
FX3S
FREQROL-E700/D700
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
30.3
Outline
1. Instruction format
FNC 272
IVRD
Mnemonic
16-bit Instruction
Operation Condition
IVRD
9 steps
Continuous
Operation
23
FNC180
Alternate
Instructions
Operation Condition
2. Set data
Operand Type
S2
Data Type
24
FNC181-FNC189
Others
S1
16-bit binary
*1.
Description
Inverter station number (K0 to K31)
25
Ch2 is not available in FX3G PLC (14-point and 24-point type) and FX3S PLC.
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
FNC190-FNC199
Block Data
Operation
3. Applicable devices
Operand
Type
22
FNC170-FNC179
External Device
This instruction reads an inverter parameter to the PLC using the computer link operation function of the inverter.
This instruction corresponds to the EXTR (K12) instruction in the FX2N/FX2NC Series.
For detailed explanation of the instruction, refer to the Data Communication Edition manual.
S2
S2
S1
S2
S1
S2
FNC200-FNC209
Character String
Control
26
S1
S1
27
For detailed explanation of the instruction, refer to the Data Communication Edition manual.
, and output to
FNC272
IVRD
S1
S2
D
S2
28
FNC220-FNC249
Data
Comparison
number is S1
FNC210-FNC219
Data
Operation 3
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
689
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Number
ch1
M8029
Number
Description
ch2
M8063
M8438
M8151
M8156
Inverter communicating
*1
error*2
Description
ch1
ch2
D8063
D8438
D8150
D8155
D8151
D8156
D8152
D8157
M8152
M8157
Inverter communication
M8153
M8158
D8153
D8158
M8154
M8159
D8154
D8159
*1.
*2.
*3.
Initial value: -1
Cautions
For other cautions, refer to the Data Communication Edition manual.
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"FLCRT (FNC300) to FLSTRD
(FNC305)" instruction and an "IVCK (FNC270) to IVMC (FNC275)" instruction for the same port.
Two or more inverter communication instructions (FNC270 to FNC275) can be driven for the same port at the same
time.
FREQROL-V500/F500/A500/E500/S500
FX3G
FX3GC
FX3U
FX3UC
690
FREQROL-F700/A700
FX3S
FREQROL-E700/D700
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
30.4
Outline
1. Instruction format
FNC 273
IVWR
Mnemonic
16-bit Instruction
Continuous
Operation
Operation Condition
23
FNC180
Alternate
Instructions
9 steps
Operation Condition
IVWR
22
FNC170-FNC179
External Device
This instruction writes an inverter parameter of an inverter using the computer link operation function of the inverter.
This instruction corresponds to the EXTR (K13) instruction in the FX2N/FX2NC Series.
For detailed explanation of the instruction, refer to the Data Communication Edition manual.
2. Set data
Operand Type
24
Data Type
S2
S3
Set value to be written to the inverter parameter or device number storing the data to be
set
FNC181-FNC189
Others
S1
*1.
Description
16-bit binary
25
Ch2 is not available in FX3G PLC (14-point and 24-point type) and FX3S PLC.
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
U \G
S2
S2
S1
S2
S3
S1
S2
Modify
Real
CharacPointer
Number ter String
E
" "
27
28
Command
input
FNC273
IVWR
is written to a parameter S2
S1
S2
S3
FNC220-FNC249
Data
Comparison
station number is S1
FNC210-FNC219
Data
Operation 3
A value specified in S3
26
FNC200-FNC209
Character String
Control
S1
S1
Index
Constant
FNC190-FNC199
Block Data
Operation
3. Applicable devices
29
FNC250-FNC269
Data Table
Operation
30
FNC270-FNC276
Ex-Device
691
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Number
ch1
M8029
Number
Description
ch2
ch1
ch2
Description
D8063
D8438
M8063
M8438
D8150
D8155
M8151
M8156
Inverter communicating
D8151
D8156
D8152
D8157
error*2
M8152
M8157
Inverter communication
M8153
M8158
D8153
D8158
M8154
M8159
D8154
D8159
*1.
*2.
*3.
Cautions
For other cautions, refer to the Data Communication Edition manual.
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"FLCRT (FNC300) to FLSTRD
(FNC305)" instruction and an "IVCK (FNC270) to IVMC (FNC275)" instruction for the same port.
Two or more inverter communication instructions (FNC270 to FNC275) can be driven for the same port at the same
time.
Cautions on using the password function in the D700 Series.
1)
2)
*4.
The FX PLC executes the first communication, and then retries communication twice (3 time in total).
*5.
When "display of the number of times of password reset error" is made valid in the D700 Series using Pr297
and when a password reset error occurs 5 times, the "reading/writing restriction" cannot be reset even if the
right password is input.
For recovery from this status, it is necessary to all-clear all parameters in the D700 Series.
*6.
When the value given as a result of reading Pr297 is "0" to "4", registration of the password is completed
normally.
FREQROL-V500/F500/A500/E500/S500
FX3G
FX3GC
FX3U
FX3UC
692
FREQROL-F700/A700
FX3S
FREQROL-E700/D700
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
30.5
Outline
1. Instruction format
FNC 274
IVBWR
Mnemonic
16-bit Instruction
Operation Condition
IVBWR
9 steps
Continuous
Operation
Operation Condition
23
Data Type
FNC180
Alternate
Instructions
16-bit binary
24
2. Set data
Operand Type
Description
Station number of an inverter (K0 to K31)
S2
S3
FNC181-FNC189
Others
S1
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
S2
26
S3
FNC274
IVBWR
S1
S3
S2
and S3
all at once.
28
S3
FNC220-FNC249
Data
Comparison
S2
S3
1st parameter
+2
S3
+3
S3
+2 S2
-4
S3
+2 S2
-3
S3
+2 S2
-2
S3
+2 S2
-1
2nd parameter
Parameter number
Set value
...
...
30
Parameter number
S2
-1th parameter
Set value
FNC270-FNC276
Ex-Device
S3
29
Set value
FNC250-FNC269
Data Table
Operation
+1
Parameter number
...
S3
Parameter number
S2
th parameter
27
FNC210-FNC219
Data
Operation 3
FNC200-FNC209
Character String
Control
*1.
25
FNC190-FNC199
Block Data
Operation
Operand
Type
22
FNC170-FNC179
External Device
This instruction writes parameters of an inverter at one time using the computer link operation function of the inverter.
For detailed explanation of the instruction, refer to the Data Communication Edition manual.
Set value
693
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Number
ch1
M8029
Number
Description
ch2
M8063
M8438
Serial communication
M8151
M8156
Inverter communicating
error*1
error*2
ch2
D8063
D8438
D8150
D8155
D8151
D8156
D8152
D8157
M8152
M8157
Inverter communication
M8153
M8158
D8153
D8158
M8154
M8159
D8154
D8159
*1.
Description
ch1
*2.
*3.
Initial value: -1
Cautions
For other cautions, refer to the Data Communication Edition manual.
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"FLCRT (FNC300) to FLSTRD
(FNC305)" instruction and an "IVCK (FNC270) to IVMC (FNC275)" instruction for the same port.
Two or more inverter communication instructions (FNC270 to FNC275) can be driven for the same port at the same
time.
694
FREQROL-V500/F500/A500/E500/S500
FREQROL-F700/A700
FREQROL-E700/D700
Ver. 2.32 or later
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
30.6
Outline
1. Instruction format
32-bit Instruction Mnemonic Operation Condition
2. Set data
Operand Type
Data Type
S1
S2
S3
Head device which stores data to be written to the inverter (Occupies 2 points.)
Head device which stores values to be read from the inverter (Occupies 2 points.)
24
FNC181-FNC189
Others
16-bit binary
*1.
Description
Inverter station number (K0 to K31)
Ch2 is not available in FX3G PLC (14-point and 24-point type) and FX3S PLC.
25
3. Applicable devices
Bit Devices
Word Devices
System User
Digit Specification
Others
Special
Unit
System User
U \G
S2
S2
S1
S2
S3
S1
S2
S1
S2
Modify
Real
CharacPointer
Number ter String
E
" "
26
FNC200-FNC209
Character String
Control
S1
S1
Index
Constant
27
For detailed explanation of the instruction, refer to the Data Communication Edition manual.
FNC275
IVMC
S2
S1
29
S2
The table below shows valid send data 1 and 2 and receive data 1 and 2 specified by the send/receive data type
S2
S2
Send/receive
data type
Send data
(Write contents to Inverter)
Data 1 ( S3
H0001
H0010
H0011
Data 2 ( S3
+1)
Set frequency
(RAM, EEPROM)
Data 1 ( D
Data 2 ( D
+1)
Special monitor
Output frequency (speed)
Special monitor
695
30
FNC270-FNC276
Ex-Device
H0000
Receive data
(Read contents from Inverter)
FNC250-FNC269
Data Table
Operation
S3
28
FNC220-FNC249
Data
Comparison
This instruction executes multiple commands of an inverter connected to a communication port n whose station
number is specified in S1 . Specify the send/receive data type using S2 , the head device which stores data to
be written to the inverter using S3 , and the head device which stores values to be read from the inverter using
D .
FNC210-FNC219
Data
Operation 3
Command
input
FNC190-FNC199
Block Data
Operation
Operand
Type
23
FNC180
Alternate
Instructions
FNC 275
IVMC
22
FNC170-FNC179
External Device
This instruction writes 2 types of settings (operation command and set frequency) to the inverter, and reads 2 types of
data (inverter status monitor, output frequency, etc.) from the inverter at the same time.
For detailed explanation of the instruction, refer to the Data Communication Edition manual.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
3. Related devices
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Number
ch1
M8029
Number
Description
ch2
ch1
Description
ch2
latch*2
*1.
*2.
*3.
Initial value: -1
Cautions
For other cautions, refer to the Data Communication Edition manual.
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"FLCRT (FNC300) to FLSTRD
(FNC305)" instruction and an "IVCK (FNC270) to IVMC (FNC275)" instruction for the same port.
Two or more inverter communication instructions (FNC270 to FNC275) can be driven for the same port at the same
time.
Number of occupied devices
Two devices are occupied respectively by S3 and D
Make sure not to use those devices in another control.
and S3
If any unspecified value is set in S2 , unexpected data may be written to and read from the inverter, and values
of D
and D +1 may be updated.
IVMC instruction reads the inverter status at the time of communication with the inverter, and stores the read status
to D . Accordingly, the status written by the IVMC instruction can be read by a next or later read instruction
(IVCK or IVMC).
Applicable inverters
This instruction is applicable to the following inverters:
Model name
SWDNC-GXW2-E
FX-30P
Compatible Versions
Ver. 1.492N or later
Ver. 1.50 or later
Remarks
-
Model name
SWDNC-GXW2-E
FX-30P
Compatible Versions
Ver. 1.62Q or later
Ver. 1.50 or later
Remarks
-
Model name
SWDNC-GXW2-E
FX-30P
Compatible Versions
Ver. 1.77F or later
Ver. 1.50 or later
Remarks
-
696
Model name
SWDNC-GXW2-E
Compatible Versions
Ver. 1.48A or later
Ver. 1.20 or later
Remarks
-
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
FNC160-FNC169
Real Time Clock
Control
30.7
22
Outline
For explanation of the instruction, refer to the MODBUS Communication Edition.
1. Instruction Format
32-bit Instruction Mnemonic Operation Condition
23
FNC180
Alternate
Instructions
FNC 276
ADPRW
2. Set Data
Operand Type
Description
Data Type
16-bit binary
S1
Command Code
16-bit binary
S2
16-bit binary
S3
16-bit binary
24
FNC181-FNC189
Others
S4
25
Bit Devices
System User
X Y M
Digit Specification
System User
R U \G
S1 S2
S1
S1 S2
S2
S1 S2
S3
S1 S2
S1
Others
Special
Unit
Index
V
Z Modify K H
" "
26
FNC200-FNC209
Character String
Control
S4
Word Devices
S1 S2
27
FNC210-FNC219
Data
Operation 3
S1: Except special auxiliary relay (M) and special data register (D).
S2: Only available for FX3G/FX3GC/FX3U/FX3UC PLCs.
28
FNC276
ADPRW
Slave
Node
Address
Command
code
S1
S2
S3
FNC220-FNC249
Data
Comparison
FNC190-FNC199
Block Data
Operation
3. Applicable Devices
Operand Type
FNC170-FNC179
External Device
This instruction allows the MODBUS Master to communicate (read/write data) with its associated Slaves.
29
S4 / D
FNC250-FNC269
Data Table
Operation
Command Parameters
depending on the
Command Code
Command Code
30
FNC270-FNC276
Ex-Device
697
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
S2
S4
S3
MODBUS Address:
0000H~FFFFH
2H
Read Discrete
Inputs
MODBUS Address:
0000H~FFFFH
3H
Read Holding
Register
MODBUS Address:
0000H~FFFFH
4H
Read Input
Register
MODBUS Address:
0000H~FFFFH
Device Count:1~2000
+ 15)16*1
( S3
+ 15)16*1
( S3
Applicable Devices DR
Block Length
S3
Applicable Devices DR
Block Length
S3
0 (fixed)
DRKHMXYS
Applicable Devices (DRMXYS can be
indexed.)
Block Length
6H
Write Single
Register
7H
Read Exception
State
(Available only
in FX3U and
FX3UC PLCs.)
1 Point
0 (fixed)
Applicable Devices
Block Length
DRKH
(DR can be indexed.)
1 Point
0 (fixed)
Block Length
1 Point
Sub-function Data
(loop-back data):0~65535
8H
Diagnosis
(Available only
in FX3U and
FX3UC PLCs.)
698
Sub-function: 1H
Restart
Communication
Sub-function Data:
0x0000: Do Not Reset
Event Log
0xFF00: Reset Event Log
Sub-function: 2H
Return
Diagnostic Register
0 (fixed)
1 Point
S3
Applicable Devices DR
Block Length
1 Point
1 Point
Sub-function: 3H
Sub-function Data (ASCII (Slave response: echo of S3
Change ASCII Input Mode End of Message Applicable Devices DR
Delimiter
Character): 00H~FFH
Block Length
1 Point
Sub-function: 4H
Force Listen Only 0 (fixed)
Mode
0 (fixed)
Sub-function: AH
Clear Counter and
Diagnostic Register
Applicable Devices DR
Block Length
0
S3
Applicable Devices DR
Block Length
1 Point
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
21
/
Sub-function: BH
Return Bus Message 0 (fixed)
Counter
Sub-function: CH
Return Bus
0 (fixed)
Communication Error
Counter
Sub-function: DH
Return Bus Exception 0 (fixed)
Error Counter
Sub-function: EH
Return Slave
Message Counter
Applicable Devices DR
Block Length
1 Point
Applicable Devices DR
Block Length
1 Point
Applicable Devices DR
Block Length
23
1 Point
Applicable Devices DR
Block Length
1 Point
Sub-function: 10H
Return NAK Counter
0 (fixed)
24
Applicable Devices DR
Block Length
1 Point
1 Point
Sub-function: 12H
Return Character
Overrun Counter
0 (fixed)
Applicable Devices DR
Block Length
1 Point
1 Point
: Programming State
+1: Event Counter
Applicable Devices DR
Block Length
2 Point
0 (fixed)
0 (fixed)
: Programming State
Applicable Devices DR
4~36 Point
MODBUS Address:
Device Count:1~1968
0000H~FFFFH
DRKHMXYS
Applicable Devices (DRMXYS can be
indexed.)
( S3
+ 15)16*1
MODBUS Address:
0000H~FFFFH
Device Count:1~123
Applicable Devices
Block Length
DRKH
(DR can be indexed.)
S3
29
FNC250-FNC269
Data Table
Operation
Block Length
28
FNC220-FNC249
Data
Comparison
Block Length
27
FNC210-FNC219
Data
Operation 3
CH
Get Comm.
Event Log
(Available only
in FX3U and
FX3UC PLCs.)
26
FNC200-FNC209
Character String
Control
25
FNC190-FNC199
Block Data
Operation
Sub-function: 11H
Return Slave Busy
Counter
FNC181-FNC189
Others
Sub-function: FH
Return Slave No
Response Counter
0 (fixed)
22
FNC180
Alternate
Instructions
BH
Get Comm.
Event Counter
(Available only
in FX3U and
FX3UC PLCs.)
S4
S3
FNC170-FNC179
External Device
8H
Diagnosis
(Available only
in FX3U and
FX3UC PLCs.)
S2
FNC160-FNC169
Real Time Clock
Control
S1
30
FNC270-FNC276
Ex-Device
699
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
S1
11H
Report Slave ID
(Available only
in FX3U and
FX3UC PLCs.)
16H
Mask Write
Register
(Available only
in FX3U and
FX3UC PLCs.)
S2
S4
S3
0 (fixed)
: Slave ID
Applicable Devices DR
Block Length
2 Point
OR Mask: 0000H~FFFFH
MODBUS Address:
AND Mask:
0000H~FFFFH
0000H~FFFFH
Applicable Devices
Block Length
DRKH
(DR can be indexed.)
1 Point
17H
Read/Write
Multiple
Registers
(Available only
in FX3U and
FX3UC PLCs.)
MODBUS Address:
S2
: Write Address
0000H~FFFFH
+1: Read
Address
0000H~FFFFH
S2
Device Count:
S3
: Write Count
1~121
S3
1~125
S4
: Write Data 1
S4
S4
+ (Write Count S3
Data ( S3
) -1: Write
S4
+ S3
: Read Data 1
S4
+ S3
S4
+ S3
Read Data ( S3
+1) -1:
+1)
Applicable Devices DR
Block Length
*1.
700
Write Count S3
Read Count S3
+1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
FNC No.
Mnemonic
Symbol
Function
Reference
277
278
RBFM
RBFM m1 m2 D n1 n2
Section 31.1
279
WBFM
WBFM m1 m2 S n1 n2
Section 31.2
32
FNC280-FNC289
High-Speed
Processing 2
FNC277 to FNC279 provide instructions for executing more complicated processing for fundamental applied
instructions and for special processing.
33
FNC290-FNC299
Extension File
Register Control
34
FNC300-FNC305
FX3U-CF-ADP
35
SFCSTL
Programming
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
701
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31.1
Outline
This instruction reads data from continuous buffer memories (BFM) in a special function unit/block over several
operation cycles by the time division method. This instruction is convenient for reading receive data, etc. stored in
buffer memories in a special function unit/block for communication by the time division method.
FROM (FNC 78) instruction is also available to read the buffer memory (BFM) data.
For FROM (FNC 78) instruction, refer to Section 15.9.
1. Instruction format
FNC 278
RBFM
16-bit Instruction
11 steps
Mnemonic
Operation Condition
Continuous
Operation
RBFM
Operation Condition
2. Set data
Operand Type
Description
Data Type
m1
Unit number [0 to 7]
m2
Head device number storing data to be read from buffer memory (BFM)
n1
n2
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
m1
m2
n1
n2
702
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
For the flag use methods for instruction execution complete and instruction execution
abnormally complete, refer to Subsection 6.5.2.
Device
Name
Description
M8328
Instruction non-execution
M8329
Related instructions
Instruction
FROM (FNC 78)
33
Description
Read from a special function block
FNC290-FNC299
Extension File
Register Control
TO (FNC 79)
WBFM (FNC279)
Errors
When the unit number "m1" does not exist (error code: K6708)
Common items between RBFM (FNC278) instruction and WBFM (FNC279) instruction
35
For the connection method of special function units/blocks, number of connectable units/blocks,
and handling of I/O numbers, refer to the manual of the PLC used and special function unit/block.
I/O
extension
block
Unit
No. 2
Special
function
block
Special
function
block
36
Interrupt
Function
FX3UC32MT-LT
(-2)
main unit
Unit
No. 1
Unit
No. 3
I/O
extension
block
SFCSTL
Programming
Unit No. 0
Built-in
CC-Link/LT
34
FNC300-FNC305
FX3U-CF-ADP
An operation error is caused in the following case; The error flag M8067 turns ON, and the error code is stored in
D8067.
31.1.1
32
FNC280-FNC289
High-Speed
Processing 2
M8029
FNC277-FNC279
Data
Transfer 3
Related devices
Special
function
block
37
Up to 32767 16-bit RAM memories are built in a special function unit/block, and they are called buffer memories.
The buffer memory number is from "0" to "32766", and the contents are determined according to each special function
unit/block.
Setting range: K0 to K32766
For the contents of buffer memories, refer to the manual of the special function unit/block used.
38
Error Code
Special Device
A unit number is automatically assigned to each special function unit/block connected to the PLC.
The unit number is assigned in the way "No. 0 No. 1 No. 2 ..." starting from the equipment nearest the main unit.
When the main unit is the FX3UC-32MT-LT(-2), the unit number is assigned in the way "No. 1 No. 2 No. 3 ..."
starting from the equipment nearest to the main unit because the CC-Link/LT master is built into the FX3UC-32MT-LT
(-2).
A
Version Up
Information
B
Execution Times
703
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Cautions
A watchdog timer error may occur when many numbers of points are transferred in one operation cycle. In such a
case, take one of the following countermeasures:
- Change the watchdog timer time
By overwriting the contents of D8000 (watchdog timer time), the watchdog timer detection time is changed (initial
value: K200).
When the program shown below is input, the sequence program will be monitored with the new watchdog timer
time.
M8002
FNC 12
MOV
0
Initial pulse
FNC 07
WDT
K300
D8000
Command
input
M{{
FNC278
RBFM
M8029
m1
m2
SET
M{{
n1
n2
RST
M{{
When indexing is executed, the contents of index registers at the beginning of execution are used.
Even if the contents of index registers are changed after the instruction, such changes do not affect the process of
the instruction.
The contents of "n1" devices starting from
execution of the instruction is completed, execute another instruction for "n1" devices starting from
704
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
In the example shown below, data is read from and written to the buffer memories (BFM) in the unit No. 2 as follows:
When X000 is set to ON, data stored in D100 to D179 (80 points) are written to the buffer memories (BFM) #1001
to 1080 in the special function unit/block whose unit number is No. 2 by 16 points in each operation cycle.
When X001 is set to ON, the buffer memories (BFM) #2001 to 2080 (80 points) in the special function unit/block
whose unit number is No. 2 are written to D200 to D279 by 16 points in each operation cycle.
M0
K80
K16
RST
M0
Y000
RST
M0
SET
M5
K80
K16
RST
M5
BFM write
start
M0
BFM write
start
FNC279
WBFM
K2
K1001
D100
M8029
33
FNC290-FNC299
Extension File
Register Control
SET
34
FNC300-FNC305
FX3U-CF-ADP
M8329
Instruction execution
abnormally complete
X001
35
BFM read
start
BFM read
start
FNC278
RBFM
K2
K2001
M8029
D200
SFCSTL
Programming
M5
M8329
RST
M5
36
Interrupt
Function
Y001
Instruction non-execution
32
FNC280-FNC289
High-Speed
Processing 2
X000
FNC277-FNC279
Data
Transfer 3
Program example
Instruction execution
abnormally complete
37
Special Device
END
38
Error Code
A
Version Up
Information
B
Execution Times
705
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31.2
Outline
This instruction writes data to continuous buffer memories (BFM) in a special function unit/block over several operation
cycles by the time division method. This instruction is convenient for writing send data, etc. to buffer memories in a
special function unit/block for communication by the time division method.
TO (FNC 79) instruction is also available for writing data to the buffer memory (BFM).
For TO (FNC 79) instruction, refer to Section 15.10.
1. Instruction format
FNC 279
WBFM
16-bit Instruction
11 steps
Mnemonic
Operation Condition
Continuous
Operation
WBFM
Operation Condition
2. Set data
Operand Type
Description
Data Type
m1
Unit number [0 to 7]
m2
n1
n2
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
m1
m2
n1
n2
706
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
For the flag use methods for instruction execution complete and instruction execution
abnormally complete, refer to Subsection 6.5.2.
Device
Name
Description
M8328
Instruction non-execution
M8329
Related instructions
Instruction
FROM (FNC 78)
33
Description
Read from a special function block
FNC290-FNC299
Extension File
Register Control
TO (FNC 79)
RBFM (FNC278)
32
FNC280-FNC289
High-Speed
Processing 2
M8029
FNC277-FNC279
Data
Transfer 3
Related devices
Errors
When the unit number "m1" does not exist (error code: K6708)
34
FNC300-FNC305
FX3U-CF-ADP
An operation error is caused in the following case; The error flag M8067 turns ON, and the error code is stored in
D8067.
35
SFCSTL
Programming
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
707
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
708
FNC No.
Mnemonic
Symbol
280
HSCT
281
282
283
284
285
286
287
288
289
HSCT S1 m S2 D n
Function
Reference
Section 32.1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
32.1
Outline
1. Instruction format
FNC 280
D HSCT
16-bit Instruction
Mnemonic
Operation Condition
21 steps
Operation Condition
DHSCT
Continuous
Operation
33
FNC290-FNC299
Extension File
Register Control
2. Set data
Operand Type
Description
Data Type
S1
m
16-bit binary
32-bit binary
D
n
Bit
16-bit binary
35
3. Applicable devices
Operand
Type
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
SFCSTL
Programming
Bit Devices
34
FNC300-FNC305
FX3U-CF-ADP
S2
32
FNC280-FNC289
High-Speed
Processing 2
This instruction compares the current value of a high-speed counter with a data table of comparison points, and then
sets or resets up to 16 output devices.
36
Interrupt
Function
S2
D
n
37
FNC280
DHSCT
and later, and the operation output set value (ON or OFF) specified in the data table is
+n-1.
S1
S2
S1
+2
S1
+4, S1
+3
S1
+5
S1
+7 S1
+6
S1
+8
m-2
S1
+3m-5, S1
+3m-6
S1
+3m-4
m-1
S1
+3m-2, S1
+3m-3
S1
+3m-1
to
+n-1
...
B
Execution Times
+1, S1
...
S1
...
Version Up
Information
Comparison
point number
38
Error Code
output to D
Command
input
Special Device
709
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1 0 1 0 0 1 1 1 0 0 0 1 0 1 1 0
D =
Y
0
1
1
Y
0
1
0
Y
0
0
7
Y
0
0
6
D +n-1
Y
0
0
5
Y
0
0
4
1)
When this instruction is executed, the data table is set as the comparison target.
2)
When the current value of the high-speed counter, specified in S2 , becomes equivalent to the
comparison value in the data table, the corresponding operation output specified in the data table is output to
D
to
+n-1.
If an output (Y) is specified in D , the output processing is executed immediately without waiting for the output
refresh executed by the END instruction.
When specifying an output (Y), make sure that the least significant digit of the device number is 0.
Examples: Y000, Y010 and Y020
3)
710
Immediately after step 2), 1 is added to the current table counter value D8138.
4)
5)
Steps 2) and 3) are repeated until the current value of the table counter D8138 becomes "m".
When the current value becomes "m", the instruction execution complete flag M8138 turns ON, and the execution
returns to step 1). At this time, the table counter D8138 is reset to "0".
6)
When the command contact is set to OFF, execution of the instruction is stopped and the table counter D8138 is
reset to 0.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
X010
FNC280
DHSCT
D200
M8000
K5
FNC 54
DHSCR
Y010
K3
K900
C235
C235
Comparison data
32
FNC280-FNC289
High-Speed
Processing 2
Comparison
point number
C235
FNC277-FNC279
Data
Transfer 3
Operation example
SET/RESET pattern
Device
Operation output
set value
D201,D200
K321
D202
H0001
D204,D203
K432
D205
H0007
D207,D206
K543
D208
H0002
D210,D209
K764
D211
H0000
D213,D212
K800
D214
H0003
4 (Repeated from 0)
33
FNC290-FNC299
Extension File
Register Control
Device
Comparison
value
Current value
of C235
34
900
900
800
800
675
543
764
764
543
432
450
35
432
0
Command
contact
ON
X010 OFF
Time
36
OFF*1
ON
Y011
OFF*1
ON
Y012
OFF*1
ON
3
HSCT
instruction
execution
complete flag
OFF
M8138
3
0
38
Error Code
*1.
ON
2. Related device
Name
Description
M8138
Turns ON when the operation for the final table No. "m-1" is completed.
D8138
Version Up
Information
Device
37
Special Device
0 1
Because DHSCT
instruction is not
executed, the
operation outputs are
not changed by this
instruction.
Interrupt
Function
Y010
HSCT table
counter
D8138
SFCSTL
Programming
321
321
225
FNC300-FNC305
FX3U-CF-ADP
900
B
Execution Times
711
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Cautions
This instruction can be executed only once in a program.
If this instruction is programmed two or more times, an operation error is caused by the second instruction and
later, and the instruction will not be executed. (error code: K6765)
This instruction constructs the data table at the END instruction of the first execution of the instruction. Accordingly,
the operation output works after the second scan and later.
With regard to DHSCT (FNC280), DHSCS (FNC 53), DHSCR (FNC 54) and DHSZ (FNC 55) instructions, up to 32
instructions can be executed in one operation cycle. An operation error is caused by the 33rd instruction and later,
and the instruction will not be executed. (error code: K6705)
If an output (Y) is specified in D , the output processing is executed immediately without waiting for the output
refresh executed by END instruction.
When specifying an output (Y), make sure that the least significant digit of the device number is 0.
Examples: Y000, Y010 and Y020
When a high-speed counter specified in S2
software counters.
For this instruction, only one comparison point (one line) is handled as the comparison target at one time.
Processing will not move to the next comparison point until the current counter value becomes equivalent to the
comparison point currently selected as the comparison target.
If the current value of a high-speed counter executes up counting using the comparison data table shown in the
operation example on the previous page, make sure to execute the instruction while the current value of the highspeed counter is smaller than the comparison value in comparison point No. 1.
When the DHSCT instruction is used with a hardware counter (C235, C236, C237, C238, C239, C240, C244 (OP),
C245 (OP), C246, C248 (OP), C251, C253), the hardware counter is automatically switched to a software counter,
and the maximum frequency and total frequency are affected.
Errors
An operation error occurs in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When any devices other than high-speed counters C235 to C255 are specified in S2
When the 3m-1th device from a device specified in S1
K6706)
When the nth device from a device specified in
When this instruction is used two or more times in a program (error code: K6765)
With regard to DHSCT (FNC280), DHSCS (FNC 53), DHSCR (FNC 54) and DHSZ (FNC 55) instructions, up to 32
instructions can be executed in one operation cycle. An operation error is caused by the 33rd instruction and later,
and the instruction will not be executed. (error code: K6705)
712
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
In the program shown below, the current value of C235 (counting X000) is compared with the comparison data table
set in R0 and later, and a specified pattern is output to Y010 to Y013.
M8000
M8235
32
H0008
K1Y010
K400
C235
C235
R0
C235
Y010
K4
K5
Initial output
33
FNC290-FNC299
Extension File
Register Control
FNC280
DHSCT
K0
FNC 12
MOVP
FNC 54
DHSCR
FNC280-FNC289
High-Speed
Processing 2
M8000
C235
FNC277-FNC279
Data
Transfer 3
Program example
END
34
FNC300-FNC305
FX3U-CF-ADP
Operation example
Comparison
point
Comparison data
SET/RESET pattern
Device
Operation output
set value
R1,R0
K100
R2
H0007
R4,R3
K150
R5
H0004
R7,R6
K200
R8
H0003
R10,R9
K250
R11
H0006
R13,R12
K300
R14
H0008
4 (Repeated from 0)
35
SFCSTL
Programming
Device
Comparison
value
36
Interrupt
Function
400
300
250
200
150
100
37
Special Device
Time
38
Y010 OFF ON
OFF ON
Y012
OFF ON
Y013
ON OFF
0 1
4
0
Version Up
Information
Table
counter
D8138
Error Code
Y011
B
Execution Times
713
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
714
FNC No.
Mnemonic
Symbol
Function
290
LOADR
291
SAVER
292
INITR
293
LOGR
294
RWER
295
INITER
296
297
298
299
LOADR S n
SAVER
S m D
INITR S n
LOGR S m D1 n D2
RWER S n
INITER
S n
Reference
Load From ER
Section 33.1
Save to ER
Section 33.2
Initialize R and ER
Section 33.3
Logging R and ER
Section 33.4
Rewrite to ER
Section 33.5
Initialize ER
Section 33.6
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
33.1
Outline
1. Instruction format
FNC 290
LOADR P
16-bit Instruction
5 steps
Operation Condition
Continuous
Operation
Pulse (Single)
Operation
Operation Condition
33
FNC290-FNC299
Extension File
Register Control
Mnemonic
LOADR
LOADRP
2. Set data
Operand Type
Description
Data Type
34
16-bit binary
FNC300-FNC305
FX3U-CF-ADP
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S
n
36
to
37
Special Device
Command
input
to
S
n
Read
(transfer)
+1
+1
+2
+2
+3
+3
+n-2
+n-2
+n-1
+n-1
38
Error Code
Interrupt
Function
35
SFCSTL
Programming
Others
Special
Unit
System User
32
FNC280-FNC289
High-Speed
Processing 2
This instruction reads the current values of extension file registers (ER) stored in the attached memory cassette (flash
memory or EEPROM) or EEPROM built into the PLC, and transfers them to extension registers (R) stored in the RAM
in the PLC.
A
Version Up
Information
Reading (transferring) is executed in device units. Up to 32,768 devices can be read (transferred).
As apposed to the SAVER (FNC291), INITR (FNC292) and LOGR (FNC293) instructions, it is not necessary to
execute this instruction in sector units.
Execution Times
715
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
In FX3G/FX3GC PLCs
a) When a memory cassette is connected (A memory cassette can be connected only to FX3G PLC.)
The contents (current values) of extension file registers (ER) stored in a memory cassette (EEPROM) with the
same numbers as the extension registers specified by
to
to
Command
input
FNC290
LOADRP
S
Read
(transfer)
S
S
S +1
S +1
S +2
S +2
S +3
S +3
S +n-2
S +n-2
S +n-1
S +n-1
Reading (transferring) is executed in device units. Up to 24,000 devices can be read (transferred).
b) When a memory cassette is not connected
In the program example below, the contents (current value) of extension file registers (ER) which are stored in
the EEPROM built in the PLC and have the same device numbers as extension registers S
to S +n1 are read, and transferred to extension registers (R) which are stored in the RAM built in the PLC and have
the device numbers
Command
input
FNC290
LOADRP
to
S
+n-1.
Read
(transfer)
S
S
S +1
S +1
S +2
S +2
S +3
S +3
S +n-2
S +n-2
S +n-1
S +n-1
Reading (transferring) is executed in device units. Up to 24,000 devices can be read (transferred).
716
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Errors
When the last device number to be transferred exceeds 32767 (error code: K6706)
At this time, devices up to R32767 are read and transferred.
When a memory cassette is not connected (error code: K6771)*1
*1.
An operation error is not caused in FX3G PLC because the contents of extension file registers stored in the
EEPROM built in the PLC are read if a memory cassette is not connected.
35
SFCSTL
Programming
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
34
FNC300-FNC305
FX3U-CF-ADP
In FX3G/FX3GC PLCs
Data can be written to the memory cassette (EEPROM) up to 10,000 times, and to the built-in memory (EEPROM)
up to 20,000 times.
Every time the RWER (FNC294) instruction is executed, it is counted as a write to the memory. Make sure not to
exceed the allowable number of writes.
When a continuous operation type instruction is used, data is written to the memory in every operation cycle of the
PLC. To prevent this, make sure to use a pulse operation type instruction.
Execution of the LOADR (FNC290)instruction is not counted as a write to the memory.
33
FNC290-FNC299
Extension File
Register Control
Execution of the LOADR (FNC290), SAVER (FNC291) or LOGR (FNC293) instruction is not counted as a write to
the memory. However, it is necessary to initialize the writing target sector before executing the SAVER (FNC291)
or LOGR (FNC293) instruction.
Every time the INITR (FNC292) or INITER (FNC295) instruction is executed, it is counted as a number of times of
writing to the memory. Make sure not to exceed the allowable number of writes.
32
FNC280-FNC289
High-Speed
Processing 2
In FX3U/FX3UC PLCs
Data can be written to the memory cassette (flash memory) up to 10,000 times.
Every time the INITR (FNC292), RWER (FNC294) or INITER (FNC295) instruction is executed, it is counted as a
write to the memory. Make sure not to exceed the allowable writes.
When a continuous operation type instruction is used, data is written to the memory in every operation cycle of the
PLC. To prevent this, make sure to use a pulse operation type instruction.
FNC277-FNC279
Data
Transfer 3
Caution
36
Interrupt
Function
Program example
In the program example shown below, the contents (current value) of 4,000 extension file registers ER1 to ER4000
inside the memory cassette are read, and transferred to 4,000 extension registers R1 to R4000 inside the built-in RAM.
M0
R1
ER2
Read
(transfer)
K100
K50
R2
K50
ER3
H0003
R3
H0003
ER4
H0101
R4
H0101
38
Error Code
ER1
37
K4000
Special Device
FNC290
LOADR
A
K55
R3999
K55
ER4000
K59
R4000
K59
Version Up
Information
ER3999
B
Execution Times
717
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
33.2
Outline
This instruction writes the current values of the extension registers (R) stored in the PLC's built-in RAM to extension
file registers (ER) stored in a memory cassette (flash memory) in sector units (2048 points).
The RWER (FNC294) instruction provided in FX3UC PLC Ver. 1.30 or later and FX3U PLC only writes (transfers) a
arbitrary number of points. It is not necessary to execute the INITR (FNC292) or the INITER (FNC295) instruction
when RWER instruction is used.
For RWER instruction, refer to Section 33.5.
1. Instruction format
FNC 291
SAVER
16-bit Instruction
7 steps
Mnemonic
Operation Condition
SAVER
Continuous
Operation
Operation Condition
2. Set data
Operand Type
Description
Data Type
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S
n
FNC291
SAVER
Write *1
(transfer)
S +1
E S +1
S +2
E S +2
S +2047
E S +2047
718
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Sector
number
Sector
number
R0
ER0 to ER2047
Sector 8
R16384
ER16384 to ER18431
Sector 1
R2048
ER2048 to ER4095
Sector 9
R18432
ER18432 to ER20479
Sector 2
R4096
ER4096 to ER6143
Sector 10
R20480
ER20480 to ER22527
Sector 3
R6144
ER6144 to ER8191
Sector 11
R22528
ER22528 to ER24575
Sector 4
R8192
ER8192 to ER10239
Sector 12
R24576
ER24576 to ER26623
Sector 5
R10240
ER10240 to ER12287
Sector 13
R26624
ER26624 to ER28671
Sector 6
R12288
ER12288 to ER14335
Sector 14
R28672
ER28672 to ER30719
Sector 7
R14336
ER14336 to ER16383
Sector 15
R30720
ER30720 to ER32767
When writing (transferring) of 2,048 points is finished, execution of the instruction is completed and the instruction
execution complete flag M8029 turns ON.
The number of already written points is stored in
34
2. Related device
Name
Description
Instruction execution
complete flag
M8029
When execution of the target instruction is completed, the instruction execution complete
flag M8029 turns ON.
In a program, however, there may be two or more instructions which use the flag M8029.
To avoid confusion, make sure to use the NO contact of this flag immediately under the
SAVER instruction so that this flag works only for the SAVER instruction.
M
FNC291
SAVER
S
S
D
38
Error Code
FNC295
INITERP
37
Special Device
Do not abort execution of this instruction in the middle of operation. If execution is aborted, unexpected data may
be written to extension file registers.
If execution of this instruction is aborted by turning OFF the power, execute the instruction again using step 2
described below after turning the power ON again.
M
36
Interrupt
Function
It takes about 340ms to write 2,048 points. If n is set to K0 or K2048, the operation cycle for executing this
instruction becomes longer than about 340ms.
If the operation cycle is severely affected, write data in two or more operation cycles.
When writing data in two or more operation cycles, set n ranging from K1 to K1024.
SET
35
SFCSTL
Programming
Cautions
Write
command
FNC300-FNC305
FX3U-CF-ADP
For the instruction execution complete flag use method, refer to Subsection 6.5.2.
Device number
33
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
Sector 0
FNC277-FNC279
Data
Transfer 3
A
Version Up
Information
B
Execution Times
719
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
720
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When any device number other than the head device number of a sector of extension file registers is set to
(error code: K6706)
FNC277-FNC279
Data
Transfer 3
Errors
32
FNC280-FNC289
High-Speed
Processing 2
When the protect switch of the memory cassette is set to ON (error code: K6770)
33
FNC290-FNC299
Extension File
Register Control
34
FNC300-FNC305
FX3U-CF-ADP
35
SFCSTL
Programming
36
Interrupt
Function
5) Write the data which was temporarily withdrawn to GX Works2 to the PLC.
[1] Select Online Write to PLC... to display
the Online Data Operation dialog box.
[2] Click "PLC Parameter/Network Parameter"
and MAIN to check mark each of them.
[3] Click [Execute] button.
37
Special Device
38
Error Code
6) Change the PLC mode from STOP to RUN, execute the program, and store the data to the extension file
registers inside the memory cassette.
A
Version Up
Information
B
Execution Times
721
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program examples
1)
In the case of FX3U PLC Ver. 2.20 or later and FX3UC PLC Ver. 1.30 or later
In the example shown below, only extension registers R10 to R19 (in sector 0) need to be updated in the
extension file registers (ER). When X000 is set to ON, sector 0 (head device R0) is written to the extension file
registers 128 points at a time. (128 points are written in one operation cycle)
Program
X000
M0
SET
M0
R0
K1
FNC295
INITERP
(1)
FNC 07
WDTP
FNC291
SAVER
R0
K128
D0
(2)
M0
END
Operation
Setting data
R0
K100
ER0
K100
ER0
HFFFF
R1
K105
ER1
K105
ER1
HFFFF
ER10
HFFFF
ER11
HFFFF
ER12
HFFFF
Changed data
.
.
.
.
.
.
.
.
R10
K200
ER10
K300
R11
K215
ER11
K330
R12
K400
ER12
K350
.
.
R19
.
.
K350
.
.
ER19
.
.
K400
R99
K1000
ER99
R100
HFFFF
.
.
.
.
.
.
Unused
R2047
.
.
HFFFF
.
.
.
.
.
.
(1)
INITER
instruction
.
.
.
.
ER19
.
.
HFFFF
K1000
.
.
ER99
.
.
HFFFF
ER100
HFFFF
ER100
HFFFF
.
.
.
.
.
.
.
.
ER2047
HFFFF
ER2047
(2)
SAVER
instruction
HFFFF
To the next page
722
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Setting backup data
Extension file registers
Number of
(ER)
Device number
Current
value
R0
K100
ER0
K100
R1
K105
ER1
K105
.
.
R10
.
.
K200
.
.
.
.
R11
K215
Changed data
Setting data
K400
.
.
.
.
ER12
K400
.
.
ER19
.
.
K350
.
.
.
.
33
ER100
HFFFF
.
.
.
.
ER127
.
.
HFFFF
ER128
HFFFF
.
.
ER255
.
.
HFFFF
ER256
HFFFF
.
.
ER1919
.
.
HFFFF
ER1920
HFFFF
.
.
ER2047
.
.
HFFFF
HFFFF
.
.
R255
.
.
HFFFF
R256
HFFFF
.
.
.
.
2nd operation
cycle
3rd to 15th
operation
cycle
HFFFF
HFFFF
.
.
R2047
.
.
HFFFF
K128
35
K256
36
K1920
Interrupt
Function
R1920
16th
operation
cycle
SFCSTL
Programming
R128
FNC300-FNC305
FX3U-CF-ADP
HFFFF
R127
K215
HFFFF
.
.
R1919
ER11
34
R100
K200
K1000
.
.
K1000
ER10
ER99
K350
.
.
R99
.
R19
.
Unused
SAVER
instruction
R12
1st operation
cycle
32
FNC290-FNC299
Extension File
Register Control
(2)
already written
points (D0)
FNC280-FNC289
High-Speed
Processing 2
Device number
FNC277-FNC279
Data
Transfer 3
Setting data
K2048
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
723
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
In the example shown below, only extension registers R10 to R19 (in sector 0) need to be updated in the
extension file registers (ER). When X000 is set to ON, sector 0 (head device R0) is written to the extension file
registers 128 points at a time. (128 points are written in one operation cycle)
Program
X000
M0
FNC 15
BMOVP
R0
FNC292
INITRP
SET
M0
R30720
K100
(1)
R0
K1
(2)
FNC 07
WDTP
FNC 15
BMOVP
R30720
R0
K100
(3)
FNC291
SAVER
R0
K128
D0
(4)
M0
END
Operation
Setting data
Extension registers (R)
R0
K100
ER0
K100
R30720
K100
R1
K105
ER1
K105
R30721
K105
R10
K200
ER10
K300
R30730
K200
R11
K215
ER11
K330
R30731
K215
R12
K400
ER12
K350
R30732
K400
R19
K350
ER19
Changed data
Unused
.
.
724
.
.
.
.
.
.
.
.
.
.
.
.
K400
.
R30819
K1000
.
.
ER99
.
.
K1000
R100
HFFFF
ER100
HFFFF
.
.
ER2047
BMOV
instruction
.
.
K350
.
.
K1000
.
.
HFFFF
(1)
.
.
.
.
R30739
.
.
R99
.
.
R2047
.
.
.
.
.
.
HFFFF
.
.
(2)
INITR
instruction
.
.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Setting backup data
Setting data
ER0
HFFFF
R0
K100
R1
HFFFF
ER1
HFFFF
R1
K105
R10
HFFFF
ER10
HFFFF
R10
K200
R11
HFFFF
ER11
HFFFF
R11
K215
R12
HFFFF
ER12
HFFFF
R12
K400
R19
K350
FNC290-FNC299
Extension File
Register Control
32
HFFFF
34
.
.
.
.
.
.
R19
.
.
HFFFF
.
.
ER19
(3)
BMOV
.
.
instruction
HFFFF
.
.
.
.
.
.
.
.
.
.
.
.
.
.
ER99
.
.
HFFFF
R99
K1000
R100
HFFFF
ER100
HFFFF
R100
HFFFF
.
.
ER2047
.
.
R2047
.
.
HFFFF
FNC300-FNC305
FX3U-CF-ADP
.
.
HFFFF
.
.
HFFFF
33
(4)
SAVER
instruction
.
.
.
.
R99
.
.
R2047
FNC280-FNC289
High-Speed
Processing 2
.
.
HFFFF
35
Setting backup data
Extension file registers
Number of
(ER)
already written
Current
Device number value
points (D0)
K100
ER0
K100
R1
K105
ER1
K105
.
.
.
.
.
.
ER10
.
.
K200
ER11
K215
ER12
K400
K200
R11
K215
1st operation
cycle
R12
K400
.
.
R19
.
.
K350
.
.
ER19
.
.
K350
.
.
R99
.
.
K1000
.
.
ER99
.
.
K1000
R100
HFFFF
ER100
HFFFF
.
.
R127
.
.
HFFFF
.
.
.
.
.
.
HFFFF
R256
.
.
.
R1919
HFFFF
.
.
.
HFFFF
HFFFF
.
.
.
.
R2047
HFFFF
2nd operation
cycle
3rd to 15th
operation
cycle
16th
operation
cycle
ER127
HFFFF
ER128
HFFFF
.
.
ER255
.
.
HFFFF
ER256
HFFFF
.
.
ER1919
.
.
HFFFF
ER1920
HFFFF
.
.
ER2047
.
.
HFFFF
38
K128
K256
K1920
Execution Times
R1920
.
Version Up
Information
HFFFF
.
.
R255
R128
Error Code
37
Special Device
Changed data
R10
Unused
36
Interrupt
Function
R0
.
SFCSTL
Programming
Setting data
Setting data
INITR
instruction
R0
.
.
(2)
FNC277-FNC279
Data
Transfer 3
Setting data
K2048
725
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
33.3
Outline
This instruction initializes extension registers (R) to HFFFF (<K-1>) in the RAM built into the PLC and extension file
registers in a memory cassette (flash memory) before data logging using the LOGR (FNC293) instruction.
In FX3UC PLC before Ver. 1.30, use this instruction to initialize extension file registers (ER) before writing data to
them using SAVER (FNC291) instruction.
In FX3UC PLC Ver. 1.30 or later and FX3U PLC, the INITER (FNC295) instruction is also provided to initialize only
extension file registers (ER) to "HFFFF" (<K-1>) in a memory cassette (flash memory) in units of sector.
For the SAVER (FNC291) instruction, refer to Section 33.2.
For the LOGR (FNC293) instruction, refer to Section 33.4.
For the INITER (FNC295) instruction, refer to Section 33.6.
1. Instruction format
FNC 292
INITR P
16-bit Instruction
5 steps
Mnemonic
Operation Condition
INITR
Continuous
Operation
Pulse (Single)
Operation
INITRP
Operation Condition
2. Set data
Operand Type
Description
Data Type
register*1
S
n
*1.
16-bit binary
When a memory cassette is not used, extension file registers (ER) are not initialized.
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S
n
726
FNC292
INITRP
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Sector
number
Head device
number
Sector
number
Head device
number
Sector 0
R0
R0 to R2047,
ER0 to ER2047
Sector 8
R16384
R16384 to R18431,
ER16384 to ER18431
Sector 1
R2048
R2048 to R4095,
ER2048 to ER4095
Sector 9
R18432
R18432 to R20479,
ER18432 to ER20479
Sector 2
R4096
R4096 to R6143,
ER4096 to ER6143
Sector 10
R20480
R20480 to R22527,
ER20480 to ER22527
Sector 3
R6144
R6144 to R8191,
ER6144 to ER8191
Sector 11
R22528
R22528 to R24575,
ER22528 to ER24575
Sector 4
R8192
R8192 to R10239,
ER8192 to ER10239
Sector 12
R24576
R24576 to R26623,
ER24576 to ER26623
33
Sector 5
R10240
R10240 to R12287,
ER10240 to ER12287
Sector 13
R26624
R26624 to R28671,
ER26624 to ER28671
Sector 6
R12288
R12288 to R14335,
ER12288 to ER14335
Sector 14
R28672
R28672 to R30719,
ER28672 to ER30719
Sector 7
R14336
R14336 to R16383,
ER14336 to ER16383
Sector 15
R30720
R30720 to R32767,
ER30720 to ER32767
FNC290-FNC299
Extension File
Register Control
FNC277-FNC279
Data
Transfer 3
The table below shows the head device number in each sector:
32
FNC280-FNC289
High-Speed
Processing 2
34
Device number
Before execution
After execution
H0010
HFFFF
Current value
Before execution
After execution
H1234
HFFFF
+1
H5678
HFFFF
+2
H0011
HFFFF
+2
H90AB
HFFFF
+(2048n)-1
+(2048n)-1
...
HFFFF
...
HABCD
...
HFFFF
...
H0020
...
+1
...
HCDEF
HFFFF
35
SFCSTL
Programming
FNC300-FNC305
FX3U-CF-ADP
36
Interrupt
Function
Caution
1. Initialization of two or more sectors
When a memory cassette is attached, 18 ms is required to initialize one sector.
(When a memory cassette is not attached, only 1 ms or less is required to initialize one sector.)
When initializing two or more sectors, take either measure shown below.
37
Special Device
Set a large value to the watchdog timer D8000 using the following program
Initial pulse
M8002
FNC 12
MOV
D8000
38
Error Code
2)
Set the current value of D8000 (unit: ms) to "1000" using the modify value function in GX Works2.
[Debug][Modify Value]
3)
Set the PLC mode to RUN, and execute the program. (Execute this instruction also.)
4)
Monitor the maximum scan time D8012 (unit: 0.1 ms) using the device/buffer memory batch monitor function in
GX Works2.
5)
Set the watchdog timer to the maximum scan time (D8012) or more.
D8012 stores the maximum scan time in increments of 0.1 ms.
Rough guide to the watchdog timer set value D8000 (unit: ms) is the "value stored in D8012 divided by 10" added
by 50 to 100.
A
Version Up
Information
Execution Times
727
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Setting the WDT (FNC 07) instruction just before and after the INITR instruction as shown below:
Command
input
FNC 07
WDT
FNC292
INITR
FNC 07
WDT
If the processing time of the INITR command exceeds 200ms, set the watchdog timer value D8000 (unit: ms) to the
processing time or more.
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When any device number other than the head device number of a sector of extension file registers is set to
(error code: K6706)
When a device number to be initialized exceeds "32767" (error code: K6706)
In this case, devices up to R32767 (ER32767) are initialized.
When the protect switch of the memory cassette is set to ON (error code: K6770)
Program example
In the program example shown below, the extension registers R0 to R2047 in the sector 0 are initialized.
Note that the extension file registers ER0 to ER2047 are also initialized if a memory cassette is attached.
X000
FNC 07
WDT
FNC292
INITR
R0
K1
FNC 07
WDT
END
After execution
R0
H1234
HFFFF
R1
H5678
HFFFF
R2
H90AB
HFFFF
...
...
...
R2047
728
Current value
Before execution
HCDEF
HFFFF
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
33.4
Outline
This instruction logs specified devices, and stores the logged data to extension registers (R) in the RAM and extension
file registers (ER) in a memory cassette.
FNC280-FNC289
High-Speed
Processing 2
1. Instruction format
FNC 293
LOGR P
16-bit Instruction
Mnemonic
Operation Condition
LOGR
11 steps
Continuous
Operation
Pulse (Single)
Operation
LOGRP
Operation Condition
33
FNC290-FNC299
Extension File
Register Control
2. Set data
Operand Type
Data Type
D1
34
FNC300-FNC305
FX3U-CF-ADP
16-bit binary
D2
*1.
Description
logged*1
35
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
36
Interrupt
Function
SFCSTL
Programming
3. Applicable devices
Operand
Type
32
D1
n
D2
37
D1
38
FNC293
LOGRP
D1
Error Code
Special Device
D2
A
Version Up
Information
B
Execution Times
729
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
+m-1
D1
+m
to
D1
+2m-1
D1
+2m
to
D1
Number of
stored data
D1
=m
D1
= 2m
D1
= 3m
+3m-1
.
.
.
.
.
.
.
.
.
.
.
.
.
.
...
D1 +(1926 n)-1
D1 +(2048 n)-1
Data writing
area
1926 n
Logging data
storage area
2048 n
.
.
.
.
.
.
.
Data writing
position control
area
122 n
The table below shows the head device number in each sector:
Sector
number
Head device
number
Sector
number
Head device
number
Sector 0
R0
R0 to R2047,
ER0 to ER2047
Sector 8
R16384
R16384 to R18431,
ER16384 to ER18431
Sector 1
R2048
R2048 to R4095,
ER2048 to ER4095
Sector 9
R18432
R18432 to R20479,
ER18432 to ER20479
Sector 2
R4096
R4096 to R6143,
ER4096 to ER6143
Sector 10
R20480
R20480 to R22527,
ER20480 to ER22527
Sector 3
R6144
R6144 to R8191,
ER6144 to ER8191
Sector 11
R22528
R22528 to R24575,
ER22528 to ER24575
Sector 4
R8192
R8192 to R10239,
ER8192 to ER10239
Sector 12
R24576
R24576 to R26623,
ER24576 to ER26623
Sector 5
R10240
R10240 to R12287,
ER10240 to ER12287
Sector 13
R26624
R26624 to R28671,
ER26624 to ER28671
Sector 6
R12288
R12288 to R14335,
ER12288 to ER14335
Sector 14
R28672
R28672 to R30719,
ER28672 to ER30719
Sector 7
R14336
R14336 to R16383,
ER14336 to ER16383
Sector 15
R30720
R30720 to R32767,
ER30720 to ER32767
Cautions
1. LOGR instruction
The LOGR instruction executes logging in each operation cycle in the continuous operation type.
When logging should be executed only once by one input, use the pulse operation type.
730
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Flash memory is adopted in a memory cassette. Make sure to initialize the data storage area in sector units before
starting logging.
If the LOGR instruction is executed without initializing the data storage area, an operation error (error code: K6770)
may be caused.
Logging data storage area initialization
command input
D1
*1
32
*2
FNC280-FNC289
High-Speed
Processing 2
FNC292
INITR
FNC277-FNC279
Data
Transfer 3
33
Errors
36
Interrupt
Function
37
Special Device
38
Error Code
When any device number other than the head device number of a sector of extension file registers is set to S
(error code: K6706)
While data is written, the remaining area and the data quantity to be written are compared with each other. If the
remaining storage area is insufficient, only a limited amount of data is written. (error code: K6706)
When the protect switch of the memory cassette is set to ON (error code: K6770)
When the collation result after data writing is "mismatch" due to omission of initialization or for another reason (error
code: K6770)
When this error occurs, the current values (data) of extension registers (R) may be lost. To avoid the data loss,
back up the data of extension registers (R) in advance using the following procedure:
1) Set the PLC mode to STOP.
2) Create a new project in GX Works2.
This step is not necessary if it is alright to overwrite the current project.
3) Read the contents of extension registers (R) to GX Works2.
[1] Select "Online" "Read from PLC..." to
display Online Data Operation dialog box.
[2] Click "PLC Parameter/Network Parameter"
and "Device Data/File Register" to check
mark each of them.
[3] Click [Execute] button.
[4] When reading is completed, save the project.
35
SFCSTL
Programming
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
34
FNC300-FNC305
FX3U-CF-ADP
Data can be written to the memory cassette (flash memory) up to 10,000 times.
Every time the INITR (FNC292), RWER (FNC294) or INITER (FNC295) instruction is executed, it is counted as a
write to the memory. Make sure not to exceed the allowable number of writes.
When a continuous operation type instruction is used, data is written to the memory in every operation cycle of the
PLC. To prevent this, make sure to use a pulse operation type instruction.
Execution of the LOADR (FNC290), SAVER (FNC291) or LOGR (FNC293) instruction is not counted as a write to
the memory. However, it is necessary to initialize the writing target sector before executing the SAVER (FNC291)
or LOGR (FNC293) instruction.
Every time the INITR (FNC292) or INITER (FNC295) instruction is executed, it is counted as a write to the memory.
Make sure not to exceed the allowable number of writes.
FNC290-FNC299
Extension File
Register Control
A
Version Up
Information
731
B
Execution Times
4) Change the current program inside the PLC to the program shown in Cautions on using a memory cassette in
Cautions on the previous page.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
5) To the PLC, write the data which was temporarily withdrawn to GX Works2.
[1] Select Online Write to PLC... to display
the Online Data Operation dialog box.
[2] Click "PLC Parameter/Network Parameter"
and "MAIN" to check mark each of them.
[3] Click [Execute] button to execute writing.
6) Change the PLC mode from STOP to RUN, execute the program, and store the data to the extension file
registers inside the memory cassette.
Program example
In the program example shown below, D1 and D2 are logged to the area from R2048 to R6143 every time X001 turns
ON.
X001
FNC293
LOGRP
D1
K2
R2048
K2
D100
X001
OFFON
1st time
X001
OFFON
2nd time
R2048 HFFFF
H1234
H1234
R2049 HFFFF
H5678
H5678
R2050 HFFFF
HFFFF
H9ABC
R2051 HFFFF
HFFFF
H1122
R2052 HFFFF
HFFFF
HFFFF
Initial value
Data writing
area
R5899 HFFFF
HFFFC
HFFF0
R5900 HFFFF
HFFFF
HFFFF
R5901 HFFFF
HFFFF
HFFFF
R6143 HFFFF
HFFFF
HFFFF
D100
732
D1
H1234
D1
H9ABC
D2
H5678
D2
H1122
H0000
H0002
H0004
Writing position
control area
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
33.5
Outline
1. Instruction format
33
16-bit Instruction
Mnemonic
Operation Condition
RWER
5 steps
Continuous
Operation
Pulse (Single)
Operation
RWERP
Operation Condition
FNC290-FNC299
Extension File
Register Control
FNC 294
RWER P
34
2. Set data
Description
Data Type
FNC300-FNC305
FX3U-CF-ADP
Operand Type
16-bit binary
Number of devices
[FX3G/FX3GC: 1 n 24000, FX3U/FX3UC: 0 n 32767] to be written (transferred)
35
3. Applicable devices
Bit Devices
System User
Word Devices
Digit Specification
System User
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
SFCSTL
Programming
Operand
Type
32
FNC280-FNC289
High-Speed
Processing 2
This instruction writes the current values of an arbitrary number of extension registers (R) stored in the RAM in the
PLC to extension file registers (ER) stored in a memory cassette (flash memory or EEPROM) or the EEPROM built
into the PLC.
Because RWER (FNC294) instruction is not supported in FX3UC PLC before Ver. 1.30, use the SAVER (FNC291)
instruction instead.
For the SAVER (FNC291) instruction, refer to Section 33.2.
36
Interrupt
Function
In FX3U/FX3UC PLCs
Command
input
FNC294
RWERP
*1
S +1
S +1
S +2
S +2
S +n-1
+n-1
A
Version Up
Information
*1.
Write
(transfer)
38
Error Code
37
Special Device
B
Execution Times
733
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
In FX3G/FX3GC PLCs
a) When a memory cassette is connected (A memory cassette can be connected only to FX3G PLC.)
The contents (current values) of n extension registers (R) starting from are written (transferred) to extension
file registers having with same device numbers in a memory cassette (flash memory).
Command
input
FNC290
RWERP
S
Write
(transfer)
*1
S +1
S +1
S +2
S +2
S +n-1
+n-1
FNC290
RWERP
S
734
Write
(transfer)
*2
S +1
S +1
S +2
S +2
S +n-1
*2.
+n-1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
1. Cautions on writing data to a memory cassette (flash memory) for FX3U/FX3UC PLCs
Memory cassettes use flash memory. Note the following contents when writing data to extension file registers in a
memory cassette with the RWER (FNC294) instruction.
M100
FNC 12
MOV
D8000
D200
D8000
K47 *1
D8000
33
FNC290-FNC299
Extension File
Register Control
FNC 20
ADD
PLS
FNC 07
WDT
R1000
K100
MOV
D200
D8000
34
FNC300-FNC305
FX3U-CF-ADP
FNC294
RWER
35
SFCSTL
Programming
FNC 07
WDT
The table below shows the head device number in each sector:
Sector number
Device range
32
FNC280-FNC289
High-Speed
Processing 2
Though extension file registers to be written can be specified arbitrarily, writing is executed in sector units.
It takes about 47 ms to write one sector. If the extension file registers to be written are located in two sectors, the
instruction execution time will be about 94 ms.
Make sure to change the set value of the watchdog timer D8000 before executing this instruction.
FNC277-FNC279
Data
Transfer 3
Cautions
Sector number
Device range
ER0 to ER2047
Sector 8
ER16384 to ER18431
Sector 1
ER2048 to ER4095
Sector 9
ER18432 to ER20479
Sector 2
ER4096 to ER6143
Sector 10
ER20480 to ER22527
Sector 3
ER6144 to ER8191
Sector 11
ER22528 to ER24575
Sector 4
ER8192 to ER10239
Sector 12
ER24576 to ER26623
Sector 5
ER10240 to ER12287
Sector 13
ER26624 to ER28671
Sector 6
ER12288 to ER14335
Sector 14
ER28672 to ER30719
Sector 7
ER14336 to ER16383
Sector 15
ER30720 to ER32767
36
Interrupt
Function
Sector 0
37
Do not turn OFF the power while this instruction is being executed. If the power is turned OFF, execution of this
instruction may be aborted. If execution is aborted, the data may be lost. Make sure to back up the data before
executing this instruction.
For the backup method, refer to the next page.
38
Error Code
Memory cassettes adopt the EEPROM. Note the following contents when writing data to extension file registers in a
memory cassette using the RWER (FNC294) instruction.
Special Device
Do not turn OFF the power while this instruction is being executed. If the power is turned OFF, execution of this
instruction may be aborted. If execution is aborted, the data may be lost. Make sure to back up the data before
executing this instruction.
For the backup method, refer to the next page.
A
Version Up
Information
B
Execution Times
735
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2)
3)
Read the contents of extension file registers (ER) and extension registers (R) to GX Works2.
[1] Select Online Read from PLC... to
display the Online Data Operation dialog box.
[2] Click "PLC Parameter/Network Parameter"
and "Device Data/File Register" to check mark
each of them.
*1.
736
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When the last device number to be transferred exceeds 32767*1 (error code: K6706)
At this time, data is read (and transferred) until the last device number R32767*1.
32
33
Program example
Program
X000
PLS
M0
MOV
D8000
D200
D8000
K47
D8000
34
M0
FNC300-FNC305
FX3U-CF-ADP
ADD
FNC 07
WDT
35
R10
K10
MOV
D200
D8000
SFCSTL
Programming
FNC294
RWER
36
Interrupt
Function
FNC 07
WDT
END
Operation
R0
K100
ER0
K100
R1
K105
ER1
K105
.
.
.
.
.
.
.
.
K200
ER10
K200
R11
K215
ER11
K215
R12
K400
ER12
K400
R19
K350
ER19
K350
R99
K1000
ER99
K1000
R100
HFFFF
ER100
HFFFF
R2047
HFFFF
ER2047
HFFFF
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
.
B
Execution Times
.
.
.
.
Write
(when X000
turns ON)
38
Version Up
Information
Changed data
R10
.
.
Unused
Error Code
37
Special Device
Setting data
FNC290-FNC299
Extension File
Register Control
In the program example shown below, the contents of extension registers R10 to R19 (sector 0) are transferred to
extension file registers (ER) when X000 turns ON.
FNC280-FNC289
High-Speed
Processing 2
When the protect switch of the memory cassette is set to ON (error code: K6770)
*1.
*2.
FNC277-FNC279
Data
Transfer 3
Errors
.
.
737
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
33.6
Outline
This instruction initializes extension file registers (ER) to HFFFF (<K-1>) in a memory cassette (flash memory) before
executing the SAVER (FNC291) instruction.
Because the INITER (FNC295) instruction is not supported in FX3UC PLC earlier than Ver. 1.30, use INITR (FNC292)
instruction instead.
For SAVER (FNC291) instruction, refer to Section 33.2.
For INITR (FNC292) instruction, refer to Section 33.3.
1. Instruction format
FNC 295
INITER P
16-bit Instruction
5 steps
Mnemonic
Operation Condition
INITER
Continuous
Operation
Pulse (Single)
Operation
INITERP
Operation Condition
2. Set data
Operand Type
S
n
Description
Data Type
Head device number of extension register sector with the same device number as the
extension file register to be initialized
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S
n
FNC295
INITERP
The table below shows the head device number in each sector:
Sector
number
738
Head device
number
Sector
number
Head device
number
Sector 0
R0
ER0 to ER2047
Sector 8
R16384
ER16384 to ER18431
Sector 1
R2048
ER2048 to ER4095
Sector 9
R18432
ER18432 to ER20479
Sector 2
R4096
ER4096 to ER6143
Sector 10
R20480
ER20480 to ER22527
Sector 3
R6144
ER6144 to ER8191
Sector 11
R22528
ER22528 to ER24575
Sector 4
R8192
ER8192 to ER10239
Sector 12
R24576
ER24576 to ER26623
Sector 5
R10240
ER10240 to ER12287
Sector 13
R26624
ER26624 to ER28671
Sector 6
R12288
ER12288 to ER14335
Sector 14
R28672
ER28672 to ER30719
Sector 7
R14336
ER14336 to ER16383
Sector 15
R30720
ER30720 to ER32767
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
Operation
Extension file registers (ER) [inside the memory cassette]
Current value
HFFFF
32
+1
H5678
HFFFF
+2
H90AB
HFFFF
...
H1234
...
After execution
...
Before execution
FNC280-FNC289
High-Speed
Processing 2
Device number
+(2048n)-1
HCDEF
HFFFF
33
FNC290-FNC299
Extension File
Register Control
Caution
About 25 ms is required to initialize one sector.
When initializing two or more sectors, take either measure shown below.
Set a large value to the watchdog timer D8000 using the following program
Initial pulse
M8002
34
D8000
FNC300-FNC305
FX3U-CF-ADP
FNC 12
MOV
35
2)
Set the current value of D8000 (unit: ms) to "1000" using the [Modify Value] function in GX Works2.
[Debug][Modify Value]
3)
Set the PLC mode to RUN, and execute the program. (Execute this instruction also.)
4)
Monitor the maximum scan time D8012 (unit: 0.1 ms) using the device/buffer memory batch monitor function in
GX Works2.
5)
Set the watchdog timer to the maximum scan time (D8012) or more.
D8012 stores the maximum scan time in increments of 0.1 ms.
Rough guide to the watchdog timer set value D8000 (unit: ms) is the "value stored in D8012 divided by 10" added
by 50 to 100.
SFCSTL
Programming
1)
FNC 07
WDT
FNC295
INITER
37
Special Device
Command
input
38
If the processing time of the INITER command exceeds 200 ms, set the watchdog timer value D8000 (unit: ms) to the
processing time or more.
Error Code
FNC 07
WDT
Interrupt
Function
Setting the WDT (FNC 07) instruction just before and after the INITER instruction as shown below:
36
739
B
Execution Times
Execution of the LOADR (FNC290), SAVER (FNC291) or LOGR (FNC293) instruction is not counted as a write to
the memory. However, it is necessary to initialize the writing target sector before executing the SAVER (FNC291)
or LOGR (FNC293) instruction.
Every time the INITR (FNC292) or INITER (FNC295) instruction is executed, it is counted as a write to the memory.
Make sure not to exceed the allowable number of writes.
A
Version Up
Information
Data can be written to the memory cassette (flash memory) up to 10,000 times.
Every time the INITR (FNC292), RWER (FNC294) or INITER (FNC295) instruction is executed, it is counted as a
write to the memory. Make sure not to exceed the allowable number of writes.
When a continuous operation type instruction is used, data is written to the memory in every operation cycle of the
PLC. To prevent this, make sure to use a pulse operation type instruction.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Errors
An operation error is caused in the following cases; The error flag M8067 turns ON, and the error code is stored in
D8067.
When any device number other than the head device number of a sector of extension file registers (ER) is set to
(error code: K6706)
Program example
In the program example shown below, the extension file registers ER0 to ER2047 in sector 0 are initialized.
X000
FNC 07
WDT
FNC295
INITER
R0
K1
FNC 07
WDT
END
After execution
ER0
H1234
HFFFF
ER1
H5678
HFFFF
ER2
H90AB
HFFFF
...
...
...
ER2047
740
Current value
Before execution
HCDEF
HFFFF
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
32
300
FLCRT
FLCRT S1 S2 S3 n
301
FLDEL
FLDEL S1 S2 n
302
FLWR
303
FLRD
304
FLCMD
FLCMD S n
305
FLSTRD
FLSTRD S D n
Function
Reference
Section 34.1
Section 34.2
FLWR S1 S2 S3 D n
Data write
Section 34.3
FLRD S1 S2 D1 D2 n
Data read
Section 34.4
FX3U-CF-ADP command
Section 34.5
Section 34.6
33
34
FNC300-FNC305
FX3U-CF-ADP
Symbol
FNC290-FNC299
Extension File
Register Control
Mnemonic
FNC280-FNC289
High-Speed
Processing 2
FNC No.
35
SFCSTL
Programming
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
741
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
34.1
Outline
The FLCRT instruction creates a file inside the CompactFlashTM card mounted in the FX3U-CF-ADP. When executed
after creation of a new file, the FLCRT instruction checks the association with the file ID, and evaluates it.
1. Instruction format
FNC 300
FLCRT
Mnemonic
16-bit Instruction
Operation Condition
FLCRT
9 steps
Operation Condition
Continuous
Operation
2. Set data
Operand Type
Description
Data Type
S1
S2
S3
16-bit binary
16-bit binary
16-bit binary
Character string
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
T
S1
S2
S3
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S:
S1
S2
S3
n
Used channel number
File creation parameter
File name
File ID
742
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Data Type
S1
File ID
This ID number is associated with the file name.
The FLCRT instruction creates a file, and associates the file name with the file ID at the same
time. The user should use the file ID for specifying a file after that.
Allowable setting range : K0 to K63 ("K0" indicates "FIFO file".)
16-bit binary
File name
When S1
is "K0 (FIFO file)"
Not used (ignored)
Use an unused device. (D or R)
*1.
16-bit binary
When S1
is "K0"
Set the CompactFlashTM card use ratio.
Specify the ratio (%) out of the whole CompactFlashTM card capacity to be used.
Allowable setting range : 10 to 90 (%)
16-bit binary
When S1
is "K1" to "K63"
File processing to be executed when the specified maximum number of lines is reached.
Set the file processing method to be executed when the number of lines reaches the specified
maximum value.
K0 : Stops execution. (The line position remains the specified maximum line position.)
K1 : Returns to the head (ring buffer file).
16-bit binary
16-bit binary
37
38
Error Code
+3
36
Special Device
S3
+2
16-bit binary
35
Interrupt
Function
S3
+1
Data type
Set the data type to be saved.
K0 : No data type specification (mixed type)
K1 : Bit type
K2 : Decimal type (16-bit)
K3 : Decimal type (32-bit)
K4 : Hexadecimal type (16-bit)
K5 : Hexadecimal type (32-bit)
K6 : Real numbers (Floating point data) Exponent expression type
K7 : Character string
SFCSTL
Programming
S3
16-bit binary
34
FNC300-FNC305
FX3U-CF-ADP
S3
33
FNC290-FNC299
Extension File
Register Control
When S1
is "K1" to "K63"
Character string
Specify the file name in up to 8 characters until "null" or "null + null".
Half-width alphanumeric characters and half-width symbols permitted in the MS-DOS are
available.
Half-width symbols : !, #, $, %, &, ', (, ), +, -, @, ^, _, ', ~
The extension is fixed to "CSV"
S2
32
FNC280-FNC289
High-Speed
Processing 2
Setting items
FNC277-FNC279
Data
Transfer 3
34.1.1
Adjust the maximum number of lines to specify the file size available in the used application software used.
Cautions
Version Up
Information
743
B
Execution Times
1) The user can create up to 63 files (within the CompactFlashTM card capacity).
2) The FLCRT instruction is completed abnormally if different file names are specified for the same file ID or if the
same file name is specified for different file IDs.
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"IVCK (FNC270) to IVMC
(FNC275)" instruction and an "FLCRT (FNC300) to FLSTRD (FNC305)" instruction for the same port.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
34.2
Outline
The FLDEL instruction deletes files stored in the CompactFlashTM card, or formats the CompactFlashTM card.
1. Instruction format
FNC 301
FLDEL
Mnemonic
16-bit Instruction
7 steps
Operation Condition
FLDEL
Operation Condition
Continuous
Operation
2. Set data
Operand Type
Description
Data Type
S1
S2
n
16-bit binary
16-bit binary
16-bit binary
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
S1
S2
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
" "
S:
FNC301
FNC270
FLDEL
IVCK
S1S1
S2S2
nD
n
Used channel number
File delete method
File ID
The FLDEL instruction deletes files stored in the CompactFlashTM card, or formats the CompactFlashTM card in the
following method.
Specify file deletion or file formatting using S1
- When S1
is "K-1 (H0FFFF)", the FLDEL instruction deletes all files whose ID is 0 to 63.
- When S1
is "K0" to "K63", the FLDEL instruction deletes the file associated with the specified file ID.
- When S1
744
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
S1
Description
Data Type
File ID
K-1(H0FFFF) : The FLDEL instruction deletes all files.
K0 to K63 : The FLDEL instruction deletes a file associated with the specified file ID.
16-bit binary
card.
When S1
is "K-1 (H0FFFF)" or "K0" to "K63"
Specify the deletion method.
K0 : The FLDEL instruction deletes the specified file.
K1 : The FLDEL instruction deletes the association between the file name and the file ID
(but does not delete the file itself).
However, when the file ID specified in
S1
16-bit binary
16-bit binary
Cautions
When the file ID "K0 (FIFO file)" or "K-1 (all files)" is specified, it may take approximately 1 minute to delete the files
depending on the number of stored files.
35
SFCSTL
Programming
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"IVCK (FNC270) to IVMC
(FNC275)" instruction and an "FLCRT (FNC300) to FLSTRD (FNC305)" instruction for the same port.
34
FNC300-FNC305
FX3U-CF-ADP
33
FNC290-FNC299
Extension File
Register Control
S2
32
FNC280-FNC289
High-Speed
Processing 2
CompactFlashTM
FNC277-FNC279
Data
Transfer 3
34.2.1
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
745
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
34.3
Outline
The FLWR instruction writes data to the CompactFlashTM card or to the buffer inside the FX3U-CF-ADP.
1. Instruction format
FNC 302
FLWR
Mnemonic
16-bit Instruction
Operation Condition
FLWR
11 steps
Operation Condition
Continuous
Operation
2. Set data
Operand Type
Description
Data Type
S1
S2
S3
16-bit binary
16-bit binary
16-bit binary
16-bit binary
-
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
T
Others
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S1
S2
S30
S:
FNC302
FLWR
S1
S2
S3
n
Used channel number
Position after data writing
Data write parameter
Head of devices which store data to be written
File ID
746
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
The FLWR instruction writes data specified by the device S2 to a file stored in the CompactFlash card specified
by the file ID or to the buffer inside the CF-ADP. The FLWR instruction can overwrite data in the line position specified
by the device S3 +1, and can write additional data (K-1). When the writing destination is the buffer inside the CFADP, the FLWR instruction can only execute additional writing. When writing is completed, the line position and
column position after writing are as follows.
Both additional writing and overwriting are executed to the maximum number of lines specified during file creation. If
data is written up to the final column position, the line position after writing varies depending on the file type and
setting.
In the case of a normal file in which processing returns to the head of the file from the end of the file (ring buffer file)
Line position after writing = K1
34
FNC300-FNC305
FX3U-CF-ADP
When the processing is stopped by the maximum line position in a normal file
Line position after writing = Maximum line position + K1
K-32768 when the maximum line position is "K32767"
33
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
TM
35
SFCSTL
Programming
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
747
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
34.3.1
Description
File ID : K0 to K63
S1
Data Type
16-bit binary
S2
S3
16-bit binary
S3
+1
Specify the line position of the writing destination, or specify additional writing.
Line position of the writing destination : K1 to specified maximum number of lines
Additional writing : K-1
16-bit binary
S3
+2
16-bit binary
S3
+3
16-bit binary
Writing destination
S3
D
+1
D
n
+4
K0 : CompactFlashTM card
K1 : Buffer inside the CF-ADP
16-bit binary
16-bit binary
16-bit binary
16-bit binary
Cautions
The FLWR instruction is completed abnormally if a CompactFlashTM card is not mounted.
The user should pay close attention to the number of times data is written when the writing destination is set to the
CompactFlashTM card because data is written every time the FLWR instruction is executed.
For example, if data is written to the CompactFlashTM card every one minute, data is written 100,000 times in
approximately 2 months.
Even if the writing destination is set to the buffer inside the CF-ADP, data is written to the CompactFlash TM card in
the case of overwriting.
The FLWR instruction writes data to the CompactFlashTM card after the internal buffer inside the CF-ADP becomes
full when the writing destination is set to the buffer. Data stored in the internal buffer inside the CF-ADP is erased
when a (instantaneous or long) power interruption occurs.
When the data type is a data name (K8), the user can specify only the head line position before writing other data.
Index and DATE TIME are added automatically.
The FLWR instruction may require several scans to acquire data. Take proper measures such as saving acquired
data in another device if data consistency is required.
It is necessary to set the device number in multiples of 16 when a bit device is specified in S2 and the data type
is set to anything other than bit type. When a word device is specified in S2 and the data type is set to bit, the
FLWR instruction acquires data to be written from the least significant bit of the specified device.
When S3 is "K7" or "K8", 00H, which indicates the end of the string, must be added to the end of the character
string.
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"IVCK (FNC270) to IVMC
(FNC275)" instruction and an "FLCRT (FNC300) to FLSTRD (FNC305)" instruction for the same port.
748
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
34.4
Outline
32
1. Instruction format
FNC 303
FLRD
Mnemonic
16-bit Instruction
Operation Condition
FLRD
11 steps
Operation Condition
33
Continuous
Operation
FNC290-FNC299
Extension File
Register Control
2. Set data
Operand Type
Description
Data Type
16-bit binary
S2
16-bit binary
D1
D2
Number of data points existing in the specified line (Refer to Subsection 34.4.1)
16-bit binary
16-bit binary
34
FNC300-FNC305
FX3U-CF-ADP
S1
35
Bit Devices
System User
Word Devices
Digit Specification
System User
T
S2
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
D1
S
D2
n
37
Special Device
S:
36
Interrupt
Function
S1
Others
Special
Unit
SFCSTL
Programming
3. Applicable devices
Operand
Type
FNC280-FNC289
High-Speed
Processing 2
38
S1
S2
D1
D2
n
Used channel number
Number of data points existing in the specified
line
Device which stores the read data
File ID
The FLRD instruction reads corresponding number of data from the position determined by the line position and
column position in the file specified by the file ID, and stores the read data to a device specified in D1
A
Version Up
Information
Error Code
FNC303
FLRD
B
Execution Times
749
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
34.4.1
S1
S2
Description
Data Type
File ID : K0 to K63
16-bit binary
16-bit binary
S2
+1
16-bit binary
S2
+2
16-bit binary
S2
+3
16-bit binary
16-bit binary
D1
Specify the head of devices which store the data read from the CompactFlashTM card.
D2
16-bit binary
16-bit binary
Cautions
The FLRD instruction is completed abnormally if a CompactFlashTM card is not mounted.
The FLRD instruction may require several scans to acquire data. Use the acquired data only after confirming
completion of the FLRD instruction if data consistency is required.
It is necessary to set the device number in a multiple of 16 when a bit device is specified in D1
type is anything other than bit. When a word device is specified in D1 and the read data type is bit, the FLRD
instruction stores data read from the least significant bit of the specified word device.
When the data type is anything other than character string and the number of devices which store the read data is
insufficient, the FLRD instruction does not read data from the CF-ADP. An error occurs.
When the data type is a character string, the character string length is unknown. The PLC stores as much read data
as possible. When reading is not completed even after the final device is reached, an error occurs.
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"IVCK (FNC270) to IVMC
(FNC275)" instruction and an "FLCRT (FNC300) to FLSTRD (FNC305)" instruction for the same port.
750
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
34.5
Outline
The FLCMD instruction gives instruction for operation to the FX3U-CF-ADP.
1. Instruction format
FNC 304
FLCMD
Mnemonic
16-bit Instruction
5 steps
Operation Condition
FLCMD
Operation Condition
33
Continuous
Operation
FNC290-FNC299
Extension File
Register Control
2. Set data
Operand Type
Description
Data Type
16-bit binary
16-bit binary
34
3. Applicable devices
Operand
Type
Bit Devices
Word Devices
System User
Digit Specification
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S
n
S:
35
SFCSTL
Programming
System User
Others
Special
Unit
FNC300-FNC305
FX3U-CF-ADP
32
FNC280-FNC289
High-Speed
Processing 2
36
Interrupt
Function
FNC304
FLCMD
37
Special Device
38
When S
is "K0" to "K63", the FLCMD instruction forcibly writes the buffered data of the specified file ID (stored
in the buffer inside the CF-ADP) to the CompactFlashTM card.
When S
is "K256 (H100)", the FLCMD instruction sets the CompactFlashTM card to the mounted status if it is in
the unmounted status.
When S
is "K1280 (H500)", the FLCMD instruction clears error codes stored in the CF-ADP.
A
Version Up
Information
When S
is "K512 (H200)", the FLCMD instruction sets the CompactFlashTM card to the unmounted status if it is
in the mounted status.
Error Code
When S
is "K-1", the FLCMD instruction forcibly writes all buffered data (stored in the buffer inside the
CF-ADP) to the CompactFlashTM card.
B
Execution Times
751
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
34.5.1
Description
Data Type
16-bit binary
*1.
*2.
16-bit binary
Cautions
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"IVCK (FNC270) to IVMC
(FNC275)" instruction and an "FLCRT (FNC300) to FLSTRD (FNC305)" instruction for the same port.
752
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
34.6
Outline
32
The FLSTRD instruction reads the status (including the error information and file information) of the FX3U-CF-ADP.
FNC280-FNC289
High-Speed
Processing 2
1. Instruction format
FNC 305
FLSTRD
Mnemonic
16-bit Instruction
Operation Condition
FLSTRD
7 steps
Operation Condition
Continuous
Operation
33
FNC290-FNC299
Extension File
Register Control
2. Set data
Operand Type
Description
Data Type
16-bit binary
Head device to which the read status is written (Refer to Subsection 34.6.1)
16-bit binary
16-bit binary
34
FNC300-FNC305
FX3U-CF-ADP
3. Applicable devices
Operand
Type
Bit Devices
System User
Word Devices
Digit Specification
System User
T
Special
Unit
R U \G
Index
Constant
Modify
Real
CharacPointer
Number ter String
E
" "
S:
35
SFCSTL
Programming
Others
36
Interrupt
Function
37
Special Device
FNC305
FLSTRD
38
The FLSTRD instruction reads the status information of the CF-ADP. The following contents can be read.
varies depending on the contents of the read status.
When S
file.
is "K0" to "K63" the FLSTRD instruction reads the final line position and final column position of each
When S
is "K256 (H100)" the FLSTRD instruction reads file IDs stored in the CompactFlashTM card.
When S
When S
is "K768 (H300)" the FLSTRD instruction reads the version information of the CF-ADP.
Error Code
When S
is "K1280 (H500)" the FLSTRD instruction reads error codes and error code details. Up to 5 of the
latest error codes and error code details can be stored.
Version Up
Information
When S
is "K1024 (H400)" the FLSTRD instruction reads the error information (error flag) for errors having
occurred in the CF-ADP.
B
Execution Times
753
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
34.6.1
Description
Data Type
16-bit binary
16-bit binary
When S
is "K0" to "K63"
The FLSTRD instruction reads the final line position and final column position of each file.
Setting items
Description
Final line position
K1 to the specified maximum line position
+1
When S
is "K256 (H100)"
The FLSTRD instruction reads file IDs stored in the CompactFlashTM card. For a file ID corresponding to the read
data, refer to the file ID correspondence table shown below.
When a file exists, a bit corresponding to the file ID turns ON.
Setting items
Description
D
D
+1
+2
+3
b15
b14
b13
b12
b11
b10
b9
b8
b7
b6
b5
b4
b3
b2
b1
b0
15
14
13
12
11
10
+1
31
30
29
28
27
26
25
24
23
22
21
20
19
18
17
16
+2
47
46
45
44
43
42
41
40
39
38
37
36
35
34
33
32
+3
63
62
61
60
59
58
57
56
55
54
53
52
51
50
49
48
When S
is "K512 (H200)"
The FLSTRD instruction reads the data capacity, used space and free space of the CompactFlashTM card to the
following devices respectively.
Setting items
754
Description
Data capacity of the CompactFlashTM card
(kB) Units, If the data capacity is less than 1 kB, "1" is stored.
+1, D
+3, D
+2
+5, D
+4
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Setting items
FNC277-FNC279
Data
Transfer 3
When S
is "K768 (H300)"
The FLSTRD instruction reads the version information of the CF-ADP.
Description
Stores the version of CF-ADP.
(Example) K100 = Ver. 1.00
32
Setting items
FNC280-FNC289
High-Speed
Processing 2
When S
is "K1024 (H400)"
The FLSTRD instruction reads the error information (error flag).
Description
Error detection signal
b0 : The CompactFlashTM card is not mounted.
33
When S
is "K1280 (H500)"
The FLSTRD instruction reads the error code and error code details for errors having occurred in the CF-ADP. Up
to 5 of the latest error codes and error code details can be stored.
Description
Error code 1
+2
Error code 2
+3
+4
Error code 3
+5
+6
Error code 4
+7
+8
Error code 5
+9
35
36
Interrupt
Function
+1
SFCSTL
Programming
34
FNC300-FNC305
FX3U-CF-ADP
Setting items
FNC290-FNC299
Extension File
Register Control
Cautions
It is not permitted to use an "RS (FNC 80)/RS2 (FNC 87)"/"ADPRW (FNC276)"/"IVCK (FNC270) to IVMC
(FNC275)" instruction and an "FLCRT (FNC300) to FLSTRD (FNC305)" instruction for the same port.
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
755
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
35.1
SFC Program
35.1.1
Outline
Sequence control using the SFC (sequential function chart) is available in FX PLCs.
In SFC programs, the role of each process and the overall control flow can be expressed easily based on machine
operations, so sequence design is easy. Accordingly, machine operations can be easily transmitted to any person,
and created programs are efficient in maintenance, specifications changes and actions against problems.
When SFC programs and step ladder instructions are programmed conforming to the same rules, they are compatible
with each other.
As a result, the same contents can be handled in relay ladder charts which are familiar and easy to understand.
35.1.2
Non-execution
(jump status)
756
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
*1
When X001
turns ON
Y030
31
Activated
SET
Y030
31
Y31
SET
X001
TRAN
Y31 programmed
in the SET instruction
remains ON even
TRAN if S31 turns OFF.
Y31
Transfer
condition
Y030
32
X002
3
TRAN
Activated
Y030
32
S32 is activated,
and S31 is
automatically
reset.
33
Y032
FNC290-FNC299
Extension File
Register Control
Y032
*1
X002
TRAN
Transfer condition
number
*1.
32
FNC280-FNC289
High-Speed
Processing 2
X001
2
FNC277-FNC279
Data
Transfer 3
34
FNC300-FNC305
FX3U-CF-ADP
35
SFCSTL
Programming
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
757
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
35.1.3
1. Operation example
Start
Moving
forward
LS2
Motor
Forward:
MC1
Backward:
MC2
1st time
Moving
backward
Stop
for
5 sec
Start
pushbutton
switch
LS1
LS2
Moving
forward
LS3
2nd time
Moving
backward
1)
When the start pushbutton switch is pressed, the truck moves forward. When the limit switch LS1 turns ON, the
truck immediately starts to move backward.
(The limit switch LS1 is normally OFF, and turns ON when the truck reaches the forward limit. Other limit switches
function in the same way.)
2)
When the truck moves backward and the limit switch LS2 turns ON, the truck stops for 5 seconds, and then starts
to move forward again. When the limit switch LS3 turns ON, the truck immediately starts to move backward.
3)
When LS2 turns ON after that, the truck driving motor stops.
4)
When the start pushbutton switch is pressed again after a series of operations finish, the above operation is
repeated.
2)
3)
Start switch
1st
process
1)
Initial
process
LS1
2nd
process
LS2
Stop
process
Stop timer
Timer
3rd
process
LS3
LS2
4th
process
758
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
3. Assigning devices
Assign devices of a PLC in the created process drawing.
1)
Y023
S20
X001
Y021
S21
X002
S22
S24
X002
33
Y023
Backward
K50
Stop timer
Y023
S23
X003
Forward
T0
Timer
T0
Y021
Y021
Forward
Y023
Backward
S0
Interrupt
Function
37
Special Device
SET
35
36
In this example, only the SFC program creating procedure is explained. In practical cases, a circuit for setting the initial
state relay to ON is required to execute the SFC program.
Create a circuit for setting the initial state relay to ON using the relay ladder.
At this time, use SET instruction to set the initial state relay to ON.
Initial pulse
M8002
34
SFCSTL
Programming
X000
FNC300-FNC305
FX3U-CF-ADP
4)
32
Start switch
FNC290-FNC299
Extension File
Register Control
3)
S0
FNC280-FNC289
High-Speed
Processing 2
2)
S0
38
Error Code
A
Version Up
Information
B
Execution Times
759
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Ladder block
M8002
SET
S0
0
X000
Y023
20
X001
Y021
21
X002
2
22
TRAN
Y021
TRAN
Y023
TRAN
T0
T0
Y023
23
X003
Y021
24
X002
K50
Input them as
internal circuits.
TRAN
Y021
TRAN
Y023
TRAN
S0
RET
760
END
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
35.1.4
32
In the example shown below, the initial state relay is driven by the special auxiliary relay M8002 which turns ON and
remains ON only momentarily when the PLC mode is changed from STOP to RUN.
General state relays other than initial state relays should be driven by another state relay. They cannot be driven by
any other device.
Ladder block
Initial pulse
M8002
SET
S0
34
FNC300-FNC305
FX3U-CF-ADP
SFC block
0
X000
Y023
20
X003
Y021
24
X002
35
Y021
TRAN
36
TRAN
Interrupt
Function
TRAN
SFCSTL
Programming
X001
Y023
TRAN
37
Special Device
S0
RET
END
Program the STL instruction for the initial state relay before the STL instructions for subsequent state relays.
Program the RET instruction at the end.
By this programming method, if there are two or more independent flows, they the separated from each other.
In the above example, even if the start button is pressed while the state relay S24 is ON, the command is invalid
(S0 does not turn ON).
As a result, double start is prevented.
A
Version Up
Information
38
Error Code
In inverse conversion from an instruction list into an SFC program, it is necessary to identify the top of the flow. For
this purpose, use the initial state relay S0 to S9.
If any other state relay number is used, inverse conversion is disabled.
35.1.5
33
FNC290-FNC299
Extension File
Register Control
The state relay which may be driven by a contact other than the STL instruction is there by defined as the initial
state relay, and should be described at the top of the flow.
FNC280-FNC289
High-Speed
Processing 2
The initial state relay is driven by way of another state relay (S24 in the example shown below). But it is necessary
to drive the initial state relay in advance by another measure at the start of operation.
761
Execution Times
In the latched (battery backed) type state relays, the ON/OFF status is backed up by the battery or EEPROM memory
against power failure.
Use this type of state relay if the operation should be restarted from the last point before power failure.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
35.1.6
35.1.7
ANB/ORB/MPS/MRD/
MPP
MC/MCR
Available
Available*1
Not available
Drive processing
Available
Available*1
Not available
Transfer processing
Available
Not available
Not available
State relay
The MPS instruction cannot be used immediately after a state relay (STL instruction), even in a drive
processing circuit.
Name
M8000
RUN monitor
M8002
Initial pulse
This relay turns ON and remains ON only momentarily when the PLC mode is changed from STOP to
RUN.
Use this relay for the initial setting of a program or for setting the initial state relay.
M8040
STL transfer
disable
When this relay is set to ON, transfer to the ON status is disabled among all state relays.
Because programs in state relays are operating even in the transfer disabled status, output coils do not
turn OFF automatically.
Use this relay to prevent simultaneous startup of another flow or as a process ON/OFF flag.
When M8047 is OFF, M8046 is normally OFF.
When M8047 is ON, M8046 operates as follows:
FX3S PLC
M8046*2
STL state ON
FX3G/FX3GC/FX3U/FX3UC PLCs
When at least one among the state relays S0 to S899 and S1000 to S4095 is ON: ON
When all of the state relays S0 to S899 and S1000 to S4095 are OFF: OFF
M8047*2
*2.
762
Enable STL
monitoring
When this relay is driven, the device number of a state relay in the ON status having the smallest device
number among S0 to S255(FX3S PLC), S0 to S899 and S1000 to S4095(FX3G/FX3GC/FX3U/FX3UC
PLCs) is stored to D8040, and the state relay number in the ON status having the next smallest device
number is stored to D8041. In this way, up to eight state relays in the ON status are stored in registers up
to D8047.
In the FX-PCS/WIN(-E), FX-30P, FX-20P(-E), and FX-10P(-E), when this relay is driven, the state
relays in the ON status are automatically read and displayed.
For details, refer to the appropriate peripheral equipment manual.
In the SFC monitor in GX Works2 and GX Developer, the automatic scroll monitoring function is valid
even if this relay is not driven.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
20
Y001
21
Y002
32
When S21 or
S22 is ON,
Y002 is output.
22
Y002
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
33
20
Y002
Y001
Forward
rotation
21
Y001
34
Y002
FNC300-FNC305
FX3U-CF-ADP
FNC290-FNC299
Extension File
Register Control
Interlock of outputs
Backward rotation
35
SFCSTL
Programming
T1
K10
T1
42
T1
Not
allowed
36
Interrupt
Function
41
K20
10
38
Y001
Error Code
X005
Y002
Y003
Change
Change
10
Y001
X005
Y003
X005
or
M8000
Y002
Move the
position.
Y001
RUN
monitor
Version Up
Information
10
37
Special Device
It is not permitted to program an instruction without a contact after an LD or LDI instruction from a bus line in a state
relay.
Change such a circuit as shown below.
Y002
Y003
Insert "Always ON"
contact.
B
Execution Times
763
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Operation of and V
Use to express transfer to a state relay in an upper position (repeat), transfer to a state relay in a lower position
(jump), or transfer to a state relay in a separate flow.
Use V to express reset of a state relay.
1)
Repeat
Jump
0
70
80
Jump to S80
19
0
Return to S0
2)
20
3)
X006
X007
65
764
Y003
TRAN
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
For output disability corresponding to emergency stop, follow Cautions on safety described in the PLC manual.
1)
SFC block
FNC 40
ZRST
S0
32
S50
FNC280-FNC289
High-Speed
Processing 2
Ladder block
0
State relays from S0 to
S50 are reset.
33
FNC290-FNC299
Extension File
Register Control
50
S0
2)
34
Ladder block
SET
SFC block
M10
Y001
M10
10
FNC300-FNC305
FX3U-CF-ADP
Output disable
35
Y005
When the output disable
contact turns ON, these
outputs turn OFF.
SFCSTL
Programming
M30
T4
3)
Output disable
M8034
37
Special Device
X003
MPS
X004
MRD
X005
38
Error Code
10
36
Interrupt
Function
Ladder block
FNC277-FNC279
Data
Transfer 3
Y001
Y002
A
Version Up
Information
Y003
MPP
STL bus line
B
Execution Times
765
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1
30
X004
Y000
X000 X001
30
Change
X004
Y000
X000 X001
TRAN
M0
X002 X003
X002 X003
M0
31
TRAN
3
31
3
Y030
2
X030
31
M100 M101
PLS
M100
PLS
M101
TRAN
Forward
rotation Y030
Pulse signal
M0
1
50
PLS
M1 M0
2
51
3
766
TRAN
TRAN
PLS
M2 M0
M1
M2
TRAN
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
X001 (Transfer input)
M2800
M2800
M2800
32
*1
SFC block
M2800
TRAN
50
M2800
TRAN
*1.
M2800
TRAN
S3
X013
M6
X013
X014
SET
M7
S70
36
S3
Change
Interrupt
Function
X014
35
SFCSTL
Programming
34
FNC300-FNC305
FX3U-CF-ADP
33
FNC290-FNC299
Extension File
Register Control
51
FNC280-FNC289
High-Speed
Processing 2
Ladder block
FNC277-FNC279
Data
Transfer 3
M6
SET
S70
M7
37
Special Device
When the ON status is transferred to S70 at the falling edge of X013 and then X014 turns OFF after that, the falling
edge of X014 is not detected at this point because S3 is OFF. When S3 turns ON the next time, the falling edge of
X014 is detected.
Accordingly, when S3 turns ON the next time, the ON status is immediately transferred to S70.
38
Error Code
A
Version Up
Information
B
Execution Times
767
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
35.1.8
2)
Jump
Direct transfer to a state relay in a lower position or transfer to a state relay in a different flow is called jump, and
the transfer destination state relay is indicated by " ".
20
20
21
22
40
30
21
31
41
31
41
22
22
32
42
32
42
23
23
40
Repeat
Transfer to a state relay in an upper position is called repeat, and the transfer destination state relay is indicated
by " " in the same way as "jump".
60
60
50
50
61
61
51
51
62
62
63
63
59
59
S0
768
42
30
60
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
When creating an SFC program having two or more initial state relays, separate the blocks for each initial state relay.
The ON status can be transferred among SFC programs created by block separation (jump to a different flow).
A state relay in a program created in a different block can be used as a contact for the internal circuit or transfer condition of
another state relay.
1. Separation of flow
20
40
21
41
22
42
33
34
FNC300-FNC305
FX3U-CF-ADP
FNC290-FNC299
Extension File
Register Control
SFC block 3
20
40
36
Interrupt
Function
41
35
SFCSTL
Programming
SFC block 1
21
41
42
37
Special Device
22
4
S40
TRAN
20
40
S20
1
21
38
Error Code
SFC block 1
S41
41
Y000
S21
TRAN
Y010
Version Up
Information
32
FNC280-FNC289
High-Speed
Processing 2
SFC block 1
FNC277-FNC279
Data
Transfer 3
Separation of flow
22
42
3
3
3
Execution Times
769
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
1. Selective branch
Either one among many flows is selected and executed.
Branch state
relay
Recombination
state relay
2. Parallel branch
All of many flows are executed at the same time.
Branch state
relay
Recombination
state relay
770
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
35.1.9
Selective branch
After making a branch, create a transfer condition.
32
X000
TRAN
11
21
X001
TRAN
21
31
X002
FNC280-FNC289
High-Speed
Processing 2
20
TRAN
33
41
FNC290-FNC299
Extension File
Register Control
Selective recombination
After creating a transfer condition, recombine.
39
X010
10
TRAN
X011
20
34
49
TRAN
X012
30
FNC300-FNC305
FX3U-CF-ADP
29
TRAN
35
50
SFCSTL
Programming
Parallel branch
After creating a transfer condition, make a branch.
36
X000
Interrupt
Function
20
TRAN
21
31
37
41
Special Device
Parallel recombination
After recombining, create a transfer condition.
10
X010
Error Code
39
29
38
49
TRAN
A
Version Up
Information
50
B
Execution Times
771
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
(Note)
......
16
It is not permitted to execute transfer or reset from a recombination line or state relay before recombination to a branch
state relay.
Make sure to provide a dummy state, then execute transfer or reset from a branch line to a separate state relay.
772
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
1. When a recombination line is directly connected to a branch line without a state relay
When a recombination line is directly connected to a branch line without a state relay as shown below, it is necessary
to provide a dummy state relay between the lines.
There are no dedicated numbers for dummy state relays.
Use a state relay number not used in a program as a dummy state relay.
30
40
20
30
40
20
30
20
30
32
FNC280-FNC289
High-Speed
Processing 2
20
FNC277-FNC279
Data
Transfer 3
33
60
60
40
50
40
50
FNC290-FNC299
Extension File
Register Control
50
50
34
FNC300-FNC305
FX3U-CF-ADP
Deform it
as follows.
20
30
60
30
state
101 Dummy
relay
50
60
40
20
30
20
30
Dummy
102 state
relay
state
103 Dummy
relay
40
40
50
35
36
50
Interrupt
Function
50
20
SFCSTL
Programming
state
100 Dummy
relay
40
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
773
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2. When there are selective branches continuously, reduce the number of branches.
20
X000
X001
TRAN
X004
21
TRAN
22
X007
TRAN
X014
TRAN
TRAN
12
13
TRAN
TRAN
15
28
26
X006
14
27
11
24
X003
X011
TRAN
25
10
23
X010
TRAN
X013
X017
TRAN
16
X016
TRAN
TRAN
29
Transform
as follows.
20
X000 X001
TRAN
21
X003 X007
24
TRAN
X006 X007
X010 X014
TRAN
11
26
TRAN
10
27
8
24
TRAN
X010 X011
25
5
22
774
TRAN
23
X000 X004
X013 X017
28
TRAN
12
X016 X017
TRAN
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
<*>
<*>
<*>
<*>
32
33
4. In the flow shown below, it is not determined whether a selective or parallel branch is provided.
Change it as shown below.
X000 X001
TRAN
X000
34
FNC300-FNC305
FX3U-CF-ADP
FNC290-FNC299
Extension File
Register Control
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
TRAN
35
SFCSTL
Programming
36
Interrupt
Function
X000 X001
TRAN
X000 X001
TRAN
37
Special Device
Error Code
38
A
Version Up
Information
B
Execution Times
775
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Change
Cross is not
allowed.
When the PLC mode is changed from STOP to RUN, the state relay S3 is driven by the initial pulse (M8002).
2)
The state relay S3 outputs Y000. One second later, the ON status transfers to the state relay S20.
3)
The state relay S20 outputs Y001. 1.5 seconds later, the ON status returns to the state relay S3.
Ladder block
M8002
SFC block
Y000
S3
Y000
T0
T0
Y001
1
1.5
second seconds
20
K10
TRAN
Y001
T1
1
3
776
SET
Initial pulse
T1
TRAN
K15
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Cyclic operation (X001 = OFF, X002 = OFF)
When the start button X000 is pressed, the outputs turn ON in the order Y000 (wait indication) Y001 (center
lamp) Y002 (center fountain) Y003 (loop line lamp) Y007 (loop line fountain) Y000 (wait indication),
and then the outputs return to the wait status.
Each output is switched in turn every 2 seconds by a timer.
2)
3)
M8000
M8047
RUN monitor
Stepping Start
M8002
Initial pulse
SET
M8040
S3
STL
transfer
disable
SFC
block
20
Center lamp
Y001
T1
T1
21
Center
fountain
Y002
T2
T2
2
22
K20
TRAN
27
Y007
T7
TRAN
20
Continuous
RET
END
Loop line
fountain
K2
0
T7 X001
5
TRAN
36
Interrupt
Function
T7 X001
K20
TRAN
SFCSTL
Programming
T3
3
35
Loop line
lamp
Y003
T3
34
K20
TRAN
FNC300-FNC305
FX3U-CF-ADP
33
Start button
X000
TRAN
Initial state
relay
Wait
indication
Y000
FNC290-FNC299
Extension File
Register Control
X002 X000
Enable
STL
monitoring
32
FNC280-FNC289
High-Speed
Processing 2
1)
FNC277-FNC279
Data
Transfer 3
3
Cyclic/stepping
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
777
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
X000
Start
Small backward
rotation
Small forward
rotation
X011
X010
Large backward
rotation
X013
X012
Origin
Large forward
rotation
Y021
Forward
rotation
M8000
M8047
RUN monitor
M8002
X000
Initial pulse
Start
M8040
Enable STL
monitoring
M8040
Y020
M8002
M8046
Initial pulse
STL
state
ON
M8034
SFC
block
521
Start
Y023
X011
Small forward
rotation
S6
522
Y020
X000
STL
transfer
disable
Y021
X010
Origin
indication
TRAN
Y021
Forward
rotation
TRAN
Y023
Backward
rotation
TRAN
Small backward
rotation
523
Y023
X013
Y021
Forward
rotation
TRAN
Large forward
rotation
524
4
6
RET
Y021
X012
Y023 Backward
rotation
TRAN
Large backward
rotation
END
778
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
Ladder block
M1
M8002
M2
Start
M3
4 seconds
M4
X001
4 seconds
3 seconds
M2
M1
33
X000
TRAN
Start
Motor M1 is
SET Y000 started.
20
T0
T0 X001
T1 X001
T2 X001
X001
Stop
T4
T6
X001
Stop
TRAN
35
TRAN
36
26
11
X001
25
TRAN
37
TRAN
38
TRAN
Y000
TRAN
Version Up
Information
27
0
RET
10
Motor
RST Y001 M2 is
stopped.
T6 K20
26
27
34
Error Code
T5
Stop
TRAN
Motor
RST Y002 M3 is
stopped.
T5 K30
25
X001
Motor
RST Y003 M4 is
stopped.
T4 K40
24
TRAN
Motor
SET Y003 M4 is
started.
23
4
TRAN
Motor
SET Y002 M3 is
started.
T2 K40
22
TRAN
Motor
SET Y001 M2 is
started.
T1 K30
21
K20
Special Device
2 seconds
Interrupt
Function
Stop
M3
SFC block
SFCSTL
Programming
M4
Initial pulse
FNC300-FNC305
FX3U-CF-ADP
Stop
32
S0
FNC290-FNC299
Extension File
Register Control
3 seconds
SET
FNC280-FNC289
High-Speed
Processing 2
2 seconds
In the case of stop in the middle of operation, the motors are stopped also in turn in the reverse order.
X000
Motor M1
RST Y000 is
stopped.
TRAN
END
779
Execution Times
This SFC program shows an example in which a part of the flow is skipped according to a condition, and the execution
is transferred to a state in a lower position.
The execution can be transferred to a state in an upper position.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
The partial skip flow shown on the previous page can be expressed in a flow of selective branches and recombination
as shown below.
Make sure that a flow proceeds from top to bottom, and that a flow does not cross except branch lines and
recombination lines.
Ladder block
M8002
SET
S0
Initial pulse
SFC block
0
X000
TRAN
Start
20
SET Y000
T0
T0 X001
1
21
T1 X001
22
T2 X001
23
24
T4
25
26
TRAN
X001
Stop
TRAN
30*
31*
32*
K40
10
S30
TRAN
K30
12
S31
TRAN
RST Y001
T6
27
K20
Y000
END
14
TRAN
RST Y000
780
TRAN
TRAN
T6
RET
Stop
RST Y002
T5
X001
K40
TRAN
T5
11
TRAN
RST Y003
T4
TRAN
TRAN
Stop
Stop
K30
SET Y003
X001
X001
SET Y002
T2
13
TRAN
SET Y001
T1
K20
TRAN
S32
TRAN
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
20
X000
TRAN
21
X010
TRAN
31
X002
8
42
32
TRAN
TRAN
41
5
22
X020
X012
TRAN
X022
33
TRAN
50
10
34
The figure below shows a mechanism which selects and carries large and small balls using conveyors.
The upper left position is regarded as the origin, and the mechanism performs in the order moving down suction
moving up moving rightward moving down release moving up moving leftward.
When the arm moves down and the electromagnet pushes a large ball, the lower limit switch LS2 turns OFF. When the
electromagnet pushes a small ball, LS2 turns ON.
X005
LS5
X003
LS3 Upper
limit switch
Origin
indication
Y007
X004
LS4
36
Interrupt
Function
Moving up:
Y002
Moving down:
Y000
CY1
37
Special Device
X002
LS2 Lower limit switch
Electromagnet
Y001
38
Small
Error Code
Proximity
switch
PS0
X000
35
SFCSTL
Programming
Moving
rightward:
Y003
Moving
leftward:
Y004
X001
LS1 Left limit switch
FNC300-FNC305
FX3U-CF-ADP
X026
Start
32
FNC290-FNC299
Extension File
Register Control
FNC280-FNC289
High-Speed
Processing 2
Large
A
Version Up
Information
B
Execution Times
781
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
In an SFC program for selecting large or small products and judging products as either accepted or rejected, selective
branches and recombination are adopted as shown in the figure below.
Ladder block
M8002
SET
S0
Initial pulse
X001 X003 Y001
Y007
Origin
indication
SFC block
When a product is small (when X002
0
X026
Start
Y007
TRAN
Origin
21
Y000
T0
T0
X002
Moving
down
K20
T0
TRAN
Moving
X004
Y003 Moving
X002
TRAN
31
X003
TRAN
Y003
X001
0
RET
END
Y004
X005
Y003
Moving
rightward
TRAN
K10
Y002 Moving
up
32
X001
X005
TRAN
33
TRAN
Y000 Moving
down
30
Moving
up
12
27
rightward
TRAN
Y002
X003
Y004
K10
TRAN
26
11
TRAN
X004
782
T1
T1
10
Y002 up
X003
25
K10
TRAN
23
TRAN
Lower limit
switch: OFF (large ball)
Lower limit
switch: ON (small ball)
22
X002
Y004
TRAN
Moving
leftward
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
When the operation is finished in each flow and X007 turns ON, the
recombination state relay S30 turns ON. S23, S26 and S29 turn OFF.
Such recombination is sometimes called wait recombination.
(The original flow continues its operation until all flows finish their
operations and join the original flow.)
X000
21
2
24
4
22
6
25
5
23
When the parts A, B and C are processed in parallel and then assembled
afterward, flows having parallel branches and recombination are used.
X007
27
28
7
26
29
TRAN
33
FNC290-FNC299
Extension File
Register Control
32
TRAN
FNC280-FNC289
High-Speed
Processing 2
In the example shown on the left, when X000 turns ON while S20 is ON,
S21, S24 and S27 turn ON at the same time and the operation is started in
each flow.
20
34
30
A pushbutton type crosswalk shown in the figure below can be expressed in flows having parallel branches and
recombination.
Y003: Green Y002: Yellow Y001: Red
FNC300-FNC305
FX3U-CF-ADP
35
SFCSTL
Programming
36
Interrupt
Function
37
Special Device
A
Version Up
Information
B
Execution Times
783
38
Error Code
The SFC program for a pushbutton type crosswalk is as shown below. In this example, a partial flow (jump to a state
relay located in an upper position) is repeated for blinking the green lamp on the crosswalk.
When the PLC mode is changed from STOP to RUN, the initial state relay S0 turns ON. Normally, the green lamp is
ON for the road and the red lamp is ON for the sidewalk.
When the crossing button X000 or X001 is pressed, the state relay S21 specifies road: green and the state relay
S30 specifies sidewalk: red. The signal lamp status is not changed.
30 seconds later, the yellow lamp turns ON for the road. 10 seconds later after that, the red lamp turns ON for the
road.
When the timer T2 (5 seconds) reaches timeout after that, the green lamp turns ON for the sidewalk.
15 seconds later, the green lamp starts to blink for the sidewalk. (S32 turns OFF the green lamp, and S33 turns ON
the green lamp.)
While the green lamp is blinking, S32 and S33 turn ON and OFF repeatedly. When the counter C0 (set value: 5)
turns ON, S34 turns ON. 5 seconds after the red lamp turns ON for the sidewalk, the signal lamps return to the
initial state.
Even if the crossing button X000 or X001 is pressed in the middle of operation, the pressing is ignored.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Ladder block
M8002
SET
S0
Initial pulse
SFC block
0
TRAN
X001
Crossing button
21
Y003
T0
T0
30
K300
T1
T1
23
Y001
T2
4
Road:
Red
K50
TRAN
31
K100
TRAN
TRAN
Road:
Y002
Yellow
22
Road:
Green
TRAN
32
T4
T4
Y006
C0
T5
34
C0
K5
T5
K5
8
0
RET
784
END
TRAN
C0
Sidewalk: Red
C0
T6
TRAN
Y005
RST
T6
K5
TRAN
33
K150
K50
T5
TRAN
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Step Ladder
35.2.1
Outline
31
FNC277-FNC279
Data
Transfer 3
35.2
35.2.2
35
SFCSTL
Programming
In a step ladder program, each process performed by the machine is expressed by a state relay.
A state relay consists of a drive coil and contact (STL contact) in the same way as other relays.
Use SET or OUT instructions to drive a coil, and use STL instructions for a contact.
Operations of internal circuits connected to state relays are classified into three types, execution in the
contact ON status, execution in the contact OFF status (for one operation cycle) and non-execution.
Execution in the contact ON status:
When a state relay turns ON, a connected circuit (internal circuit) is activated with a STL contact.
36
Interrupt
Function
37
Special Device
Non-execution:
An instruction is not executed in the contact OFF status after the operation cycle where the instruction was
executed in the contact OFF status (jump status).
The figure below shows the timing chart of the state relay (internal circuit) activation status.
38
Execution in the
contact ON status
Error Code
34
FNC300-FNC305
FX3U-CF-ADP
In a step ladder program, a state relay State S is regarded as one control process, and a sequence of input conditions
and output controls are programmed in a state relay.
Because the preceding process is stopped when the program execution proceeds to the next process, a machine can
be controlled using simple sequences for each process.
33
FNC290-FNC299
Extension File
Register Control
This section explains the expressions and cautions of step ladder programs in comparison with SFC programs, and
the input order in the list format.
32
FNC280-FNC289
High-Speed
Processing 2
In programs using step ladder instructions, a state relay State S is assigned to each process based on machine
operations, and sequences of input condition and output control are programmed as circuits connected to contacts
(STL contacts) of state relays in the same way as SFC programs.
The concept of program creation and the types and operations of state relays are the same as for SFC programs.
However, because the contents can be expressed in the ladder format, step ladder programs can be handled as
familiar relay ladder charts even though the actual contents are the same as those of SFC programs.
In step ladder programs, the list format is also available.
SFC programs and step ladder programs can be converted inter changeably if they are programmed according to the
same rules.
Non-execution
(jump status)
A
Version Up
Information
B
Execution Times
785
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
STL
S31
Y030
X001
SET
Y31
SET
S32
STL
S32
STL
*1
Process of
S31
When X001 turns ON,
S32 turns ON and S31
is automatically reset.
S31
Y030
X001
SET
Y31
SET
S32
STL
S32
*3
Y030
*2
Y032
X002
786
SET
*1
Y030
Process of
S32
S33
Activated
Y032
X002
SET
S33
*1.
*2.
*3.
The contact instruction can be omitted only immediately after the STL instruction.
If the contact instruction is omitted, the contact status follows the status of the corresponding state relay.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
M8002
X000
Y023
X001
X002
S0
STL
S0
SET
S20
STL
S20
Y021
Moving
Process of S20
forward
SET
S21
STL
S21
Y021
X002
S23
Y021
Moving
Process of S23
forward
STL
S24
20
Process of S22
S23
S24
Y021
X002
2
22
34
TRAN
Moving
Y021 forward
TRAN
TRAN
T0
T0
Y023
23
35
Moving
Y023
backward
K50
Internal
circuit
TRAN
Y021 Moving
forward
X003
Y021
24
37
TRAN
Y023 Moving
backward
X002
TRAN
S0
END
38
Error Code
RET
36
Special Device
X001
21
RET
END
Start
Y023
STL
SET
X000
S22
SET
33
Moving
K50
SFC block
T0
S0
Interrupt
Function
X003
SET
SFCSTL
Programming
Y023
M8002
Process of S0
STL
T0
Ladder block
FNC300-FNC305
FX3U-CF-ADP
Y021
SET
32
FNC290-FNC299
Extension File
Register Control
Start
<SFC program>
FNC280-FNC289
High-Speed
Processing 2
<Step ladder>
FNC277-FNC279
Data
Transfer 3
35.2.3
A
Version Up
Information
B
Execution Times
787
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
35.2.4
<SFC program>
STL
<Step ladder>
20
Y010
X010
STL
Y011
Y010
X011
1
X010
X000X001
Y011
X011
TRAN
X000 X001
SET
S20
21
SET
S21
<List program>
0
1
2
3
4
5
6
7
*1.
STL
OUT
LD
OR
OUT
LD
ANI
SET
S20
Y010
X010
X011
Y011
X000
X001
S21 *1
SET and RST instructions for a state relay are two-step instructions.
When every state relay used in an SFC program is defined, programming is complete.
Program a step ladder program starting from the initial state relay in the order of state relay ON status transfer.
Make sure to put the RET instruction at the end of a step ladder program.
<SFC program>
40
X001
<Step ladder>
Y001
STL
X001
X002
TRAN
X003
TRAN
X003
41
2
52
Jump/repeated part
788
X002
<List program>
S40
Y001
SET
S52
S41
STL
LD
OUT
LD
SET
LD
OUT
S40
X001
Y001
X002
S41
X003
S52
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
<SFC program>
52
<Step ladder>
X004
Y002
TRAN
X005
53
STL
LD
OUT
LD
SET
S52
Y002
SET
S53
S52
X004
Y002
X005
S53
32
FNC280-FNC289
High-Speed
Processing 2
STL
X004
X005
<List program>
List of sequence instructions available between the STL instruction and RET instruction
MC/MCR
Available
Available*1
Not available
Drive processing
Available
Available*1
Not available
Transfer processing
Available
Not available
Not available
35
SFCSTL
Programming
ANB/ORB/MPS/MRD/
MPP
State relay
The STL instruction cannot be used in interrupt programs and subroutine programs.
When using SFC programs (STL instruction), do not drive state relays S using SET or OUT instructions in an
interrupt program.
36
Interrupt
Function
It is not prohibited to use jump instructions in state relays, but it is not recommended because complicated
movements will result.
*1.
34
FNC300-FNC305
FX3U-CF-ADP
Instruction
LD/LDI/LDP/LDF,
AND/ANI/ANDP/ANDF,
OR/ORI/ORP/ORF,
INV,MEP/MEF,OUT,
SET/RST,PLS/PLF
FNC290-FNC299
Extension File
Register Control
35.2.5
33
MPS instruction cannot be used immediately after an STL instruction, even in a drive processing circuit.
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
789
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Name
M8000
RUN monitor
M8002
Initial pulse
This relay turns ON and remains ON only momentarily when the PLC mode is changed from STOP to
RUN.
Use this relay for the initial setting of a program or for setting the initial state relay.
M8040
STL transfer
disable
When this relay is set to ON, transfer of the ON status is disabled among all state relays.
Because programs in state relays are operating even in the transfer disabled status, output coils do not
turn OFF automatically.
Use this relay to prevent simultaneous startup of another flow or as a process ON/OFF flag.
When M8047 is OFF, M8046 is normally OFF.
When M8047 is ON, M8046 operates as follows:
M8046*1
STL state ON
FX3S PLC
FX3G/FX3GC/FX3U/FX3UC PLCs
When at least one among the state relays S0 to S899 and S1000 to S4095 is ON: ON
When all of the state relays S0 to S899 and S1000 to S4095 are OFF: OFF
M8047*1
*1.
Enable STL
monitoring
When this relay is driven, the device number of a state relay in the ON status having the smallest device
number among S0 to S255(FX3S PLC), S0 to S899 and S1000 to S4095(FX3G/FX3GC/FX3U/FX3UC
PLCs) is stored to D8040, and the state relay number in the ON status having the next smallest device
number is stored to D8041. In this way, up to eight state relays in the ON status are stored in registers up
to D8047.
In the FX-PCS/WIN(-E), FX-30P, FX-20P(-E), and FX-10P(-E), when this relay is driven, the state
relays in the ON status are automatically read and displayed.
For details, refer to the appropriate peripheral equipment manual.
In the SFC monitor in GX Works2 and GX Developer, the automatic scroll monitoring function is valid
even if this relay is not driven.
Block
A step ladder program is created as ladder circuits in the
same way as relay ladder. Accordingly, different from SFC
programs, it is not necessary to divide blocks for relay ladder
parts and SFC parts.
When there are ladder blocks and SFC blocks, put a RET
instruction at the end of each step ladder program.
A PLC starts the step ladder processing by a STL instruction,
and returns to the relay ladder processing from the step
ladder processing by a RET instruction.
However, when consecutively programming a step ladder in
a different flow (when there is no relay ladder before the step
ladder in the different flow), a RET instruction between flows
can be omitted, and a RET instruction can be programmed
only at the end of the last flow.
M8002
Initial pulse
SET
S0
SET
S1
STL
S0
Relay ladder
Y000
X000
SET
S20
STL
S20
Y001
X001
Step ladder is
finished by RET
instruction.
RET
S1
Y002
X002
Step ladder
It can be
omitted.
S0
STL
Step ladder is
started by STL
instruction.
SET
S30
STL
S30
Step ladder is
started by STL
instruction.
Step ladder
Y003
X003
790
S1
RET
Step ladder is
finished by RET
instruction.
END
Relay ladder
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
S20
32
X005
FNC280-FNC289
High-Speed
Processing 2
Y001
Y002
Y003
S20
STL
Y001
S20
Y001
or
X005
Y003
M8000
Y002
Y003
Insert "Always ON"
contact.
RUN
monitor
Move the
position.
34
Y002
FNC300-FNC305
FX3U-CF-ADP
X005
FNC290-FNC299
Extension File
Register Control
STL
33
Change
Change
STL
S41
35
SFCSTL
Programming
Each OUT and SET instruction in state relays automatically resets the transfer source, and has the self-holding
function.
OUT instructions can only be used for transfer to a separate state relay in an SFC program.
36
Interrupt
Function
Transfer
condition
SET
S42
S50
37
Replace the symbol used in SFC programs to express repeat, jump or transfer to a state relay in another separate
flow with the OUT instruction.
Replace the symbol V (used to express reset of a state relay) with the RST instruction.
<SFC program>
X001
Y001
STL
X001
X002
TRAN
X003
X003
41
41
X004
TRAN
52
X004
Y001
SET
S41
S52
STL
S41
RST
S41
Replacement of
in the part 52
Replacement of
in the part 41
A
Version Up
Information
TRAN
X002
38
S40
Error Code
40
<Step ladder>
Special Device
Replacing and V
B
Execution Times
791
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
35.2.6
<SFC program>
20
Y000
X000
TRAN
21
X001
2
31
<Step ladder>
STL
X001
X002
792
X002
3
41
<List program>
S20
Y000
X000
TRAN
SET
S21
SET
S31
SET
S41
Drive
processing
Transfer
processing
STL
OUT
LD
SET
LD
SET
LD
SET
S20
Y000
X000
S21
X001
S31
X002
S41
TRAN
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Do not use MPS, MRD, MPP, ANB and ORB instructions in a transfer processing program with branches and
recombination.
Even in a load driving circuit, MPS instructions cannot be used immediately after STL instructions.
Pay attention to the programming order so that a branch line does not cross a recombination line.
32
<SFC program>
X010
39
Y010
2
TRAN
49
Y011
X011
TRAN
FNC280-FNC289
High-Speed
Processing 2
29
Y012
X012
TRAN
33
<Step ladder>
<List program>
STL
STL
S39
Drive
processing
Y011
STL
S49
S29
SET
S50
STL
S39
SET
S50
STL
S49
SET
S50
35
36
Transfer
processing
Interrupt
Function
X012
STL
34
SFCSTL
Programming
Y012
S29
Y010
S39
Y011
S49
Y012
S29
X010
S50
S39
X011
S50
S49
X012
S50
FNC300-FNC305
FX3U-CF-ADP
STL
OUT
STL
OUT
STL
OUT
STL
LD
SET
STL
LD
SET
STL
LD
SET
S29
Y010
X011
FNC290-FNC299
Extension File
Register Control
50
X010
37
<SFC program>
<Step ladder>
20
Y000
X000
STL
TRAN
31
41
SET
S21
SET
S31
SET
S41
Drive
processing
Transfer
processing
A
Version Up
Information
Y001
X000
21
S20
<List program>
STL S20
OUT Y000
LD X000
SET S21
SET S31
SET S41
38
Error Code
Do not use MPS, MRD, MPP, ANB and ORB instructions in a program with branches and recombination.
Even in a load driving circuit, MPS instructions cannot be used immediately after STL instructions.
In the same way as programs for general state relays, program the drive processing first, and then program the
transfer processing.
Continuously program all transfer processing.
Special Device
FNC277-FNC279
Data
Transfer 3
B
Execution Times
793
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
<SFC program>
29
39
Y010
X010 X011 X012
Y011
49
Y012
TRAN
50
<Step ladder>
<List program>
STL
S29
Y010
STL
S39
Drive
processing
Y011
STL
S49
Y012
STL
S29
STL
S39
STL
S49
SET
S50
STL
OUT
STL
OUT
STL
OUT
STL
STL
STL
LD
AND
AND
SET
S29
Y010
S39
Y011
S49
Y012
S29
S39
S49
X010
X011
X012
S50
Transfer
processing
Before recombination, first program the drive processing of the state relays.
After that, program only the transfer processing to the recombination state relay.
<SFC program>
<Step ladder>
20
1
X000
30
TRAN
X001
X000
TRAN
X001
X003
50
794
TRAN
X004
60
TRAN
X003
X004
<List program>
STL
S20
SET
S100
STL
S30
SET
S100
STL
S100
SET
S50
SET
S60
STL
LD
SET
STL
LD
SET
STL
LD
SET
LD
SET
S20
X000
S100
S30
X001
S100
S100
X003
S50
X004
S60
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Parallel recombination and parallel branch
<SFC program>
<Step ladder>
20
X000
TRAN
S101
S101
TRAN
3)
STL
S30
SET
S101
STL
S101
SET
S50
SET
S60
STL
STL
LD
SET
STL
LD
SET
SET
S20
S30
X000
S101
S101
S101
S50
S60
32
33
60
<SFC program>
<Step ladder>
S102
30
TRAN
X001
X000
TRAN
X001
S102
40
50
STL
S20
SET
S102
STL
S30
SET
S102
STL
S102
SET
S40
SET
S50
STL
LD
SET
STL
LD
SET
STL
LD
SET
SET
S20
X000
S102
S30
X001
S102
S102
S102
S40
S50
35
36
<Step ladder>
20
X000
30
X000
X001
X002
TRAN
X002
S20
STL
S30
SET
S103
STL
S103
SET
S40
SET
S50
STL
STL
LD
SET
STL
LD
SET
LD
SET
S20
S30
X000
S103
S103
X001
S40
X002
S50
37
38
50
Error Code
40
TRAN
X001
STL
Special Device
TRAN
<List program>
Interrupt
Function
<SFC program>
34
SFCSTL
Programming
X102
<List program>
FNC300-FNC305
FX3U-CF-ADP
20
4)
S20
FNC290-FNC299
Extension File
Register Control
50
STL
FNC280-FNC289
High-Speed
Processing 2
X000
30
<List program>
FNC277-FNC279
Data
Transfer 3
2)
A
Version Up
Information
B
Execution Times
795
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
35.2.7
Program examples
<Step ladder>
Step
number
M8002
Initial pulse
Y000
<List program>
SET
S3
STL
S3
Y000
4
Y001
T0
1
1.5
second seconds
T0
11
SET
S20
STL
S20
T1
796
K10
Y001
12
16
Step
number
T1
S3
19
RET
20
END
K15
0
1
3
4
5
8
9
11
12
13
16
17
19
20
LD
SET
STL
OUT
OUT
LD
SET
STL
OUT
OUT
LD
OUT
RET
END
M8002
S3
S3
Y000
T0 K10
T0
S20
S20
Y001
T1 K15
T1
S3
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Cyclic operation (X001 = OFF, X002 = OFF)
When the start button X000 is pressed, the outputs turn ON in the order Y000 (wait indication) Y001 (center
lamp) Y002 (center fountain) Y003 (loop line lamp) Y007 (loop line fountain) Y000 (wait indication),
and then the outputs return to the wait status.
Each output is switched in turn every 2 seconds by a timer.
2)
3)
<Step ladder>
3
7
M8047
RUN monitor
X002 X000
M8040
Stepping Start
M8002
Initial pulse
10
SET
S3
STL
S3
X000
Start button
15
SET
S20
STL
S20
Center lamp
T1
20
K20
T1
23
SET
S21
STL
S21
Y002
24
T2
28
K20
T2
31
SET
S22
STL
S22
T3
36
K20
T3
S27
STL
S27
Loop line
fountain
Y007
40
T7
44
X001
T7
X001
35
36
37
38
K20
S20
Continuous
S3
Cyclic/stepping
52
RET
53
END
A
Version Up
Information
48
T7
34
Error Code
39
SET
33
M8000
M8047
X002
X000
M8040
M8002
S3
S3
Y000
X000
S20
S20
Y001
T1 K20
T1
S21
S21
Y002
T2 K20
T2
S22
S22
Y003
T3 K20
T3
S27
S27
Y007
T7 K20
T7
X001
S20
T7
X001
S3
Special Device
Loop line
lamp
Y003
32
LD
OUT
LD
ANI
OUT
LD
SET
STL
OUT
LD
SET
STL
OUT
OUT
LD
SET
STL
OUT
OUT
LD
SET
STL
OUT
OUT
LD
SET
STL
OUT
OUT
LD
AND
OUT
LD
ANI
OUT
RET
END
Interrupt
Function
Center
fountain
0
1
3
4
5
7
8
10
11
12
13
15
16
17
20
21
23
24
25
28
29
31
32
33
36
37
39
40
41
44
45
46
48
49
50
52
53
SFCSTL
Programming
Y001
16
<List program>
FNC300-FNC305
FX3U-CF-ADP
12
Wait
indication
Y000
11
Enable
STL
monitoring
STL
transfer
disable
Initial state
relay
FNC290-FNC299
Extension File
Register Control
M8000
32
FNC280-FNC289
High-Speed
Processing 2
1)
FNC277-FNC279
Data
Transfer 3
B
Execution Times
797
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
X001
LS1 Left limit
X005
LS5
X003
LS3 Upper
limit
Origin
indication
Y007
X004
LS4
Moving up:
Y002
Moving down:
Y000
CY1
Electromagnet
Y001
Proximity
switch
PS0
X000
798
Small
Large
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
<Step ladder>
M8002
SET
Y007
STL
S0
SET
S21
STL
S21
Origin
indication
Start Origin
12
Moving
down
T0
T0
17
K20
SET
X002
25
72
STL
S31
73
RST
Y001
SET
S25
STL
S22
Y001
SET
S32
80
STL
S32
Y002
X001 Y003
SET
S33
STL
S33
Y004
86
X001
SET
S23
92
RET
33
STL
S25
93
END
34
SET
Y001
38
S26
41
STL
S23
Y002
42
43
SET
S24
46
STL
S26
Y002
47
X003
48
S27
STL
S24
X004 Y004
Y003
52
STL
55
X005 Y004
X004
60
63
X005
STL
S24
SET
S30
STL
S27
SET
S30
Moving
rightward
34
35
38
39
41
42
43
44
46
47
48
49
51
52
53
54
55
56
57
58
59
60
61
63
64
SET
OUT
LD
SET
STL
OUT
LD
SET
STL
OUT
LD
SET
STL
LDI
ANI
OUT
STL
LDI
ANI
OUT
STL
LD
SET
STL
LD
Y001
T1 K10
T1
S26
S233
Y002
T3
S24
S26
Y002
X003
S27
S24
X004
Y004
Y003
S27
X005
Y004
Y003
S24
X004
S30
S27
X005
65
67
68
69
70
72
73
74
77
78
80
81
82
83
85
86
87
88
89
90
92
93
SET
STL
OUT
LD
SET
STL
RST
OUT
LD
SET
STL
OUT
LD
SET
STL
LDI
ANI
OUT
LD
OUT
RET
END
37
S30
S30
Y000
X002
S31
S31
Y001
T2 K10
T2
S32
S32
Y002
X003
S33
S33
X001
Y003
Y004
X001
S0
38
B
Execution Times
64
Moving
rightward
<List program>
0 LD M8002
1 SET S0
3 LD X001
4 AND X003
5 ANI Y001
6 OUT Y007
7 STL S0
8 LD X026
9 AND Y007
10 SET S21
12 STL S21
13 OUT Y000
14 OUT T0 K20
17 LD T0
18 AND X002
19 SET S22
21 LD T0
22 ANI X002
23 SET S25
25 STL S22
26 SET Y001
27 OUT T1 K10
30 LD T1
31 SET S23
33 STL S25
Version Up
Information
59
Moving
up
S27
Y003
56
Moving
up
36
Error Code
51
SET
Special Device
T3
35
Interrupt
Function
K10
SET
Moving
leftward
T1
T1
34
Moving
up
S0
89
Suction
33
K10
T2
77
85
K10
Release
T2
82
Suction
32
Moving
down
SFCSTL
Programming
T1
S31
X003
T1
30
SET
81
SET
26
X002
69
S22
T0
Y000
68
FNC300-FNC305
FX3U-CF-ADP
21
X002
S30
FNC290-FNC299
Extension File
Register Control
Y000
13
STL
67
FNC280-FNC289
High-Speed
Processing 2
S0
Initial pulse
FNC277-FNC279
Data
Transfer 3
The figure below shows a step ladder program for selecting the product size and judging products as either accepted
or rejected.
799
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
The SFC program for a pushbutton type crosswalk is as shown below. In this example, a partial flow (jump to a state
relay located in an upper position) is repeated for blinking the green lamp on the crosswalk.
When the PLC mode is changed from STOP to RUN, the initial state relay S0 turns ON. Normally, the green lamp is
ON for the road and the red lamp is ON for the sidewalk.
When the crossing button X000 or X001 is pressed, the state relay S21 specifies road: green and the state relay
S30 specifies sidewalk: red. The signal lamp status is not changed.
Thirty seconds later, the yellow lamp turns ON for the road. Ten seconds later after that, the red lamp turns ON for
the road.
When the timer T2 (5 seconds) reaches timeout after that, the green lamp turns ON for the sidewalk.
Fifteen seconds later, the green lamp starts to blink for the sidewalk. (S32 turns OFF the green lamp, and S33 turns
ON the green lamp.)
While the green lamp is blinking, S32 and S33 turn ON and OFF repeatedly. When the counter C0 (set value: 5)
turns ON, S34 turns ON. Five seconds after the red lamp turns ON for the sidewalk, the signal lamps return to the
initial state.
Even if the crossing button X000 or X001 is pressed in the middle of operation, the pressing is ignored.
800
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
<Step ladder>
0
M8002
Initial pulse
SET
STL
S0
S0
X000
X001
S21
SET
S30
30
T1
34
T3
41
42
S34
S0
STL
S30
82
END
34
Sidewalk:
Red
SET
S31
STL
S22
35
<List program>
0 LD M8002
1 SET S0
T1
3 STL S0
K100
4 OUT Y003
SET S23
5 OUT Y005
6 LD X000
STL
S31
7 OR X001
Sidewalk:
8 SET S21
Y006
Green
10 SET S30
T3
12 STL S21
K150
13 OUT Y003
14 OUT T0 K300
SET S32
17 LD T0
18 SET S22
STL
S23
20 STL S30
Road:
Y001
21 OUT Y005
Red
22 LD T2
T2
23 SET S31
K50
25 STL S22
Road:
Yellow
26
27
30
31
33
34
35
38
39
41
42
43
46
47
50
51
53
54
55
OUT
OUT
LD
SET
STL
OUT
OUT
LD
SET
STL
OUT
OUT
STL
OUT
LD
SET
STL
OUT
OUT
Y002
T1 K100
T1
S23
S31
Y006
T3 K150
T3
S32
S23
Y001
T2 K50
S32
T4 K5
T4
S33
S33
Y006
C0 K5
58
61
62
63
65
66
67
69
70
71
73
76
77
78
79
81
82
OUT
LD
AND
SET
LDI
AND
OUT
STL
OUT
RST
OUT
STL
STL
LD
OUT
RET
END
T5 K5
C0
T5
S34
C0
T5
S32
S34
Y005
C0
T6 K50
S23
S34
T6
S0
S32
K5
SET
S33
STL
S33
Y006
C0
K5
37
38
T4
T4
36
A
Version Up
Information
54
STL
Error Code
53
78
T6
S23
RET
47
50
77
STL
81
STL
46
33
Special Device
38
C0
Interrupt
Function
33
Sidewalk:
Red
Y005
70
S22
Y002
26
69
S34
SFCSTL
Programming
25
STL
SET
Y005
T2
32
S32
76
Road:
Green
K300
21
22
S34
FNC300-FNC305
FX3U-CF-ADP
20
SET
T6
T0
17
T5
RST
S21
Y003
13
T0
C0
K50
STL
12
T5
FNC290-FNC299
Extension File
Register Control
Crossing button
SET
C0
FNC280-FNC289
High-Speed
Processing 2
Y005
6
65
Road:
Green
Sidewalk:
Red
Y003
61
T5
K5
Execution Times
801
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
36.1 Outline
36.1
Outline
This section explains the function to immediately execute an interrupt program (interrupt routine) without affecting the
operation cycle of the sequence program (main) while using a interrupt function as a trigger. The delay by operation
cycle and machine operation affected by uneven time intervals in normal sequence program process can be improved.
802
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Common Items
36.2.1
FNC277-FNC279
Data
Transfer 3
36.2
32
1)
Programming method
Program the FNC 05 (DI) instruction to set the interrupt disabled zone.
Even if an interrupt is generated between the DI instruction and EI instruction (interrupt disabled zone), the
interrupt is executed after the EI instruction.
2)
Program example
FNC280-FNC289
High-Speed
Processing 2
33
FNC290-FNC299
Extension File
Register Control
FNC 04
EI
34
Interrupts are
enabled
FNC300-FNC305
FX3U-CF-ADP
FNC 05
DI
35
SFCSTL
Programming
Interrupts are
disabled
FNC 06
FEND
36
The input interrupts X000 to X005 correspond to M8050 to M8055*1 respectively. When a relay M8050 to
M8055 turns ON, a corresponding input interrupt is disabled.
Timer interrupt
High-speed counter
interrupt
When M8059*1 turns ON, all of the high-speed counter interrupts I010 to I060 are disabled.
A
Version Up
Information
Input interrupt
38
Error Code
*1.
Programming method
The special auxiliary relays M8050 to M8059 for disabling interrupt are provided.
While an interrupt disable flag (M8050 to M8059) is ON, a corresponding interrupt program is not executed even if
the interrupt disable flag is set to OFF after a corresponding interrupt is generated.
37
Special Device
Cautions
a) The interrupt inputs with special auxiliary relay for interrupt disable (M8050 to M8059) turned ON are
excluded.
b) When the disabled zone is long, interrupts are accepted, but the interrupt processing is started after
considerable time.
When the interrupt disabling setting is not required, program only EI instruction. It is not always necessary to
program DI instruction.
Interrupt
Function
3)
B
Execution Times
803
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
In the program example shown below, when M8053 is set to ON by M20, the interrupt input I301 triggered by
X003 is disabled.
FNC 04
EI
M20
M8053
Command to disable
an interrupt triggered
by X003
Interrupts are
enabled
FNC 06
FEND
Interrupt
pointer
I301
FNC 03
IRET
Interrupt
routine
END
36.2.2
Related items
36.2.3
1)
2)
While M8028 is ON
When an interrupt is generated while a FROM/TO instruction is being executed, execution of the FROM/TO
instruction is paused and the interrupt is immediately executed.
FROM/TO instructions cannot be used in an interrupt routine program when M8028 is ON.
2. When double interrupt (interrupt during another interrupt) is required [interrupt function]
Usually, interrupts are disabled in an interrupt routine (program).
When the EI (FNC 04) and DI (FNC 05) instructions are programmed in an interrupt routine in FX3U/FX3UC PLCs, up
to two interrupts can be accepted.
Double interrupts are not available in FX3S/FX3G/FX3GC PLCs.
804
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
4. Non-overlap of input [input interrupt (with/without delay function) and pulse catch function]
Program example
35
X001
C0
SFCSTL
Programming
FNC 04
EI
Step 0
K10
FNC 06
FEND
M8000
RST
36
Interrupt
Function
I001
34
FNC300-FNC305
FX3U-CF-ADP
Devices which were set to ON in an interrupt routine are held in the ON status even after the interrupt routine is
finished.
When the RST instruction for a timer or counter is executed, the reset status of the timer or counter is also held.
To turn OFF a device held in the ON status or for canceling such a timer or counter held in the reset status, reset such
a device or deactivate the RST instruction respectively inside or outside the routine.
33
FNC290-FNC299
Extension File
Register Control
When using SFC programs (STL instruction), do not drive state relays S using SET or OUT instructions in an interrupt
program.
32
FNC280-FNC289
High-Speed
Processing 2
The inputs X000 to X007 can be used for high-speed counters, input interrupts, pulse catch, SPD, ZRN, DSZR and
DVIT instructions and for general-purpose inputs.
Make sure inputs do not overlap with each other.
When using SFC program (STL instruction), do not drive state relays S in a SET or OUT instruction in an interrupt
program.
C0
Y007
37
2)
Special Device
FNC 05
IRET
Timing chart
Interrupt program
Execution of interrupt
program I001 triggered
by X000
38
Error Code
X001
Current
value of C0
Counter is
reset
RST
C0
C0 remains reset
Y007
A
Version Up
Information
B
Execution Times
805
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Program example
FNC 04
EI
Step 0
X001
C0
X002
K10
RST
Y007
FNC 06
FEND
I001
M8000
M8001
RST
C0
RST
C0
RUN monitor
(normally OFF)
B
Program to deactivate the preceding
C0 reset instruction inside the
subroutine.
Y007
FNC 05
IRET
2)
Timing chart
Interrupt program
Execution of interrupt
program I001 triggered
by X000
X001
Current
2
value of C0
1
Counter is reset
RST (part A in above
program).
C0
3
1
806
Y007
X002
Y007 is reset
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
36.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function]
31
36.3.1
FNC277-FNC279
Data
Transfer 3
36.3
32
FNC280-FNC289
High-Speed
Processing 2
1. Outline
An interrupt routine is executed by the input signal from an input X000 to X005.
2. Application
Because the external input signal can be processed without being affected by the operation cycle of the PLC, this
interrupt is suitable to high-speed control and receiving of short pulses.
FNC290-FNC299
Extension File
Register Control
FNC 04
EI
Main program
Interrupt inputs are accepted after EI instruction.
It is not necessary to program DI (disable
interrupt) instruction if there is no zone where
input interrupts should be disabled.
Interrupts are
enabled
34
FNC300-FNC305
FX3U-CF-ADP
Main
program
FNC 06
FEND
35
36
Interrupt return
Interrupt return
"END" indicates the end of program.
END
38
Error Code
37
Special Device
FNC 03
IRET
Interrupt
Function
FNC 03
IRET
Interrupt
pointer
I100
End of main
program
SFCSTL
Programming
Interrupt
pointer
I001
33
0
0: Interrupt at falling edge, 1: Interrupt at rising edge
0 to 5 according to the inputs X000 to X005
Input number
X000
I001
I000
M8050*1
X001
I101
I100
M8051*1
X002
I201
I200
M8052*1
X003
I301
I300
M8053*1
X004
I401
I400
M8054*1
X005
I501
I500
M8055*1
B
Execution Times
Version Up
Information
*1.
Pointer number
Interrupt at rising edge
807
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
36.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function]
6. Cautions
1)
2)
3)
*1.
4)
Input number
X000,X001
10 s
X002,X003,X004,X005
50 s
X000,X001,X003,X004
10 s
X002,X005
50 s
X000 to X005
5 s*1
When using the input filter at the filter value of 5 s or when receiving a pulse whose response frequency is
50 k to 100 kHz using a high-speed counter, perform the following:
- Make sure that the wiring length is 5 m or less.
- Connect a bleeder resistor of 1.5 k (1 W or more) to an input terminal, and make sure that the load
current of the open collector transistor output in the counterpart equipment is 20 mA or more including the
input current in the main unit.
Using a pointer number two or more times
It is not possible to program an interrupt at the rising edge and an interrupt at the falling edge for an input such as
I001 or I000.
7. Program examples
1)
When using both an external input interrupt at the rising edge and the output refresh (REF instruction)
In the program example shown below, the output Y000 immediately turns ON when the rising edge of the external
input X000 is detected.
Step
0
Interrupt
pointer
I001
RUN
monitor
*2.
808
FNC 50
REF
FNC 04
EI
FNC 06
FEND
SET
Y000
Y000
K8*2
FNC 03
IRET
END
Make sure to specify a multiple of "8" for the number of inputs/outputs to be refreshed by the REF (FNC 50)
instruction.
If any value other than a multiple of "8" is specified, an operation error occurs and the REF (FNC 50) instruction
is not executed.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
36.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function]
31
When using both an input interrupt and the input refresh (REF instruction)
In the program example shown below, an interrupt is processed using the latest input information.
Step
0
FNC 04
EI
FNC277-FNC279
Data
Transfer 3
2)
32
X010
X010
K8*1
SET
Y001
RST
Y001
34
FNC 03
IRET
When counting the number of times of input generation (in the same way as 1-phase high-speed counter)
In the program example shown below, external inputs are counted.
Step
0
FNC 06
FEND
When the rising edge of X002 is detected
M8000
D0
FNC 03
IRET
36
END
37
Special Device
RUN monitor
FNC 24
INC
Interrupt
Function
Interrupt
pointer
I201
FNC 04
EI
35
SFCSTL
Programming
3)
Make sure to specify a multiple of "8" as the number of inputs/outputs to be refreshed by REF (FNC 50)
instruction.
If any value other than a multiple of "8" is specified, an operation error occurs and REF (FNC 50) instruction is
not executed.
FNC300-FNC305
FX3U-CF-ADP
END
*1.
33
FNC290-FNC299
Extension File
Register Control
RUN monitor
X010
REF
FNC 06
FEND
FNC280-FNC289
High-Speed
Processing 2
Interrupt
pointer
I101
38
Error Code
A
Version Up
Information
B
Execution Times
809
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
36.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function]
ON
ON
T0
T0
Step
0
FNC 04
EI
M0
M0
T0
K10
M0
FNC 06
FEND
Interrupt
pointer
I301
810
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
1. Example of program to measure the short pulse width using a retentive type 1ms timer
32
FNC280-FNC289
High-Speed
Processing 2
X010:Preparation
for measurement
SW
SW(X000,X001)
24V
0V
S/S
X000 X001
M8000
X010
FNC 06
FEND
34
T246
RST
M0
RST
D0
35
36
Measurement data
T246
M0
D0
Measurement
is completed
K1 Timer is stopped
RST
T246
Timer is
reset
37
Special Device
M8000
T246
Interrupt
Function
FNC 12
M0V
SET
M0
FNC 03
IRET
When the falling edge of
X001 is detected
X010
The reset
status is
cleared
SFCSTL
Programming
RST
T246
Interrupt
pointer
I100
FNC 04
EI
FNC300-FNC305
FX3U-CF-ADP
Interrupt
pointer
I001
33
FNC290-FNC299
Extension File
Register Control
Step
0
FNC277-FNC279
Data
Transfer 3
36.3.2
36.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function]
38
Error Code
FNC 03
IRET
END
A
Version Up
Information
B
Execution Times
811
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
36.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function]
-Timing chart
X010: Preparation
for measurement
I001(Interrupt processing)
I100(Interrupt processing)
SW(X000,X001)
RST
T246
Part A in the previous page
Current
value of T246
M0
2. Example of program to measure the short pulse width using a high-speed ring counter (only in
FX3U/FX3UC PLCs)
Step
0
X010
Interrupt
pointer
I001
FNC 04
EI
FNC 06
FEND
When X000 turns ON: The ring counter is reset
to OFF, and
measurement is started.
D8099
M0
FNC 03
IRET
Interrupt
pointer
I100
Measurement data
D8099
M0
D0
Measurement
is completed
FNC 03
IRET
END
812
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
36.4
1. Outline
2. Programming procedure
33
FNC 12
MOV
K* D8393
FNC 03
IRET
34
FNC300-FNC305
FX3U-CF-ADP
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
An input interrupt has the function to delay execution of an interrupt routine in units of 1 ms.
The delay time can be specified using the pattern program shown below.
By using the delay function, the mounting position of a sensor used for input interrupts can be adjusted electrically
without changing the actual position.
35
SFCSTL
Programming
3. Timing chart
Because the previous interrupt processing
is not completed, the interrupt processing
is not executed here.
36
Interrupt
Function
Interrupt input
(X000 to X005)
Valid
Interrupt program is
executed
37
IRET
instruction
36.5.1
38
Error Code
36.5
Special Device
Delay time
(msec)
1. Outline
An interrupt routine is executed at every 10 to 99 ms without being affected by the operation cycle of a PLC.
This type of interrupt is suitable when a certain program should be executed at high-speed while the main program
operation time is long or when a program should be executed at a constant time interval in sequence operations.
Version Up
Information
2. Application
B
Execution Times
813
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC 04
EI
Interrupts are
enabled
Main
program
FNC 06
FEND
End of
main program
When interrupt is
given at every 20 ms
Interrupt
pointer
I620
Interrupt subroutine
Interrupt
routine
FNC 03
IRET
Interrupt return
END
I6
I7
I8
*1.
M8057*1
M8058*1
Caution
If the timer interrupt time is set to 9ms or less, the timer interrupt processing may not be executed in an accurate cycle
in the following cases. Therefore, using a time that is over 10 ms is recommended.
When the interrupt program processing time is long
When the main program contains an applied instruction which processing time is long
5. Cautions
Each pointer number (I6, I7 or I8) can only be used once.
When M8056 to M8058 is set to ON in a program, a corresponding timer interrupt is disabled.
814
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
For program examples in which RAMP (FNC 67) or HKY (FNC 71) instructions are combined,
refer to Subsection 36.5.2.
In the program example shown below, data is added and the addition result is compared with the set value every 10
ms.
1)
Program example
Interrupts are enabled by EI instruction.
The main program is described.
FNC 04
EI
X001
When interrupt is
given at every 10 ms
M3
FNC 24
INC
FNC224
LD=
K1000
M3
FNC 06
FEND
D0
D0
RST
M3
END
36
Interrupt
Function
RAMP (FNC 67), HKY (FNC 71), SEGL (FNC 74), ARWS (FNC 75) and PR (FNC 77) instructions execute a series of
operations in synchronization with the scan time.
Because the total time may be too long or time fluctuation may cause a problem in these instructions, it is
recommended to execute these instructions at a constant time interval using the timer interrupt function.
When not using the timer interrupt function, use the constant scan mode.
35
SFCSTL
Programming
34
FNC300-FNC305
FX3U-CF-ADP
FNC 03
IRET
36.5.2
33
FNC290-FNC299
Extension File
Register Control
Interrupt
pointer
I610
SET
32
FNC280-FNC289
High-Speed
Processing 2
Step
0
FNC277-FNC279
Data
Transfer 3
6. Program example
37
FNC 06
FEND
38
Special Device
FNC 04
EI
K8
M0
Version Up
Information
FNC 50
REF
Error Code
Interrupt
pointer
I620
FNC 03
IRET
END
Execution Times
815
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
(D 3)
(D 1) = 1
X000 = ON
M8029
2)
Execution is completed
Program
Step
0
X000
Start
M 0
FNC 04
EI
M8026
FNC 12
MOV
K 1
D 1
FNC 12 K255
MOV
D 2
PLS
M 0
SET
M 1
FNC 06
FEND
Interrupt
pointer
I610
FNC 67
RAMP
D 1
RST
FNC 03
IRET
816
D 3 K1000
M8029
END
D 2
M 1
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
1)
When the HKY (FNC 71), SEGL (FNC 74) or PR (FNC 77) instruction is used in an interrupt program, the
instruction turns ON M8029 in the interrupt program.
When M8029 is referred to in the main program as shown below, M8029 may be changed by an interrupt program
depending on the interrupt timing, even if M8029 is referred to immediately after an instruction. As a result,
whether the instruction is executed completely cannot be determined properly.
FNC 04
EI
M100
FNC270
IVCK
K6
H6F
D100
K1
RST
Interrupt
pointer
I620
FNC 50 X000
REF
FNC 50 Y000
REF
34
K8
D0
M0
K8
35
FNC 03
IRET
SFCSTL
Programming
END
2)
33
FNC300-FNC305
FX3U-CF-ADP
RUN
monitor
FNC 06
FEND
Interrupt at every 20 ms
M8000
M100
FNC290-FNC299
Extension File
Register Control
M8029
32
FNC280-FNC289
High-Speed
Processing 2
program example
FNC277-FNC279
Data
Transfer 3
3. Cautions
Countermeasures
Disable interrupts using the DI instruction in the section from the instruction which uses M8029 in the main
program to the point after M8029 is referred to.
36
Interrupt
Function
37
FNC 05
DI
FNC270
IVCK
K6
H6F
D100
K1
RST
M100
Special Device
M100
M8029
38
Interrupt
pointer
I620
FNC 06
FEND
Interrupt at every 20 ms
M8000
FNC 50 X000
REF
K8
A
D0
M0
Version Up
Information
RUN
monitor
Error Code
FNC 04
EI
K8
FNC 03
IRET
B
Execution Times
END
817
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
36.6
1. Outline
This type of interrupt utilizes the current value of a high-speed counter.
2. Application
This type of interrupt is used together with the comparison set instruction DHSCS (FNC 53). When the current value of
a high-speed counter reaches the specified value, an interrupt routine is executed.
Main program
Interrupts are enabled after EI (FNC 04)
instruction.
The main program is described.
FNC 04
EI
M8000
RUN
monitor
Interrupt
pointer
I010
C255
K2,147,483,647
FNC 53
DHSCS K1000 C255 I010
*1
Interrupt pointer
number is
FNC 06
FEND
specified
FNC 03
IRET
Interrupt return
END
*1.
When the comparison value specified by a data register, etc. is changed, the current value is actually changed
to the specified value when END instruction is executed.
0
Counter interrupt pointer (1 to 6)
Pointer No.
I010,I020,I030,I040,I050,I060
M8059*2
*2.
6. Cautions
818
1)
Pointer number
Pointer numbers cannot overlap with each other.
2)
Disabling interrupts
When the special auxiliary relay M8059 is set to ON in a program, all counter interrupts are disabled.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
X000
M8170*1
X001
M8171*1
X002
M8172*1
X003
M8173*1
X004
M8174*1
X005
M8175*1
X006
M8176*1*2
X007
M8177*1*2
33
34
*1.
*2.
FNC300-FNC305
FX3U-CF-ADP
FNC290-FNC299
Extension File
Register Control
2. Program example
35
FNC 04
EI
M8170
Y000
36
RST
M8170
Interrupt
Function
X002
Reset input
EI
PLC
M8170
FX3S
FX3G/FX3GC
X002(Reset)
FX3U/FX3UC
Input number
Input
pulse width
X000, X001
10 s or more
X002 to X005
50 s or more
X000, X001,
X003, X004
10 s or more
X002, X005
50 s or more
X000 to X005
5 s*3 or more
X006, X007
50 s or more
37
Special Device
X000(Input)
38
3. Cautions on use
1)
When receiving an input again, it is necessary to reset the device which was once set using a program.
Accordingly, until a device is reset, a new input cannot be received.
2)
When it is necessary to receive continuous short pulses (input signals), use the external input interrupt function or
high-speed counter function.
3)
4)
The pulse catch function is executed regardless of the operations of the special auxiliary relays M8050 to M8055
for disabling interrupts.
Execution Times
Version Up
Information
When using the pulse catch function at 5 s or when receiving a pulse whose response frequency is 50 k to
100 kHz using a high-speed counter, perform the following:
- Make sure that the wiring length is 5 m or less.
- Connect a bleeder resistor of 1.5 k (1 W or more) to the input terminal, and make sure that the load current
of the open collector transistor output in the counterpart equipment is 20 mA or more including the input
current in the main unit.
Error Code
*3.
SFCSTL
Programming
Step
0
32
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
36.7
819
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
36.8
36.8 Pulse width/Pulse period measurement function [M8075 to M8079, D8074 to D8097]
The pulse width/pulse period measurement function stores the values of 1/6 s ring counters at the input signal rising
edge and falling edge to special data registers. This function also divides by "60" the difference in the counter value
(pulse width) between the rising edge and the falling edge or the difference in the counter value (pulse period)
between the previous rising edge and the current rising edge, and stores the obtained pulse width or pulse period in
units of 10 s to special data registers.
The pulse width/pulse period measurement function becomes valid when a program is described using M8075 as a
contact. Specify the pulse width measurement flag in the subsequent OUT instruction, and set an input terminal to be
used.
When the pulse width/pulse period measurement function is valid, it always operates while the PLC mode is RUN.
Assignment of special auxiliary relays and special data registers
Pulse input
Pulse width/
Pulse period
measurement
flag
Pulse period
measurement
Pulse width
mode*1
/Pulse period*1*2
[Unit: 10 s]
D8079,D8078
X000
M8076
M8080
D8075,D8074
D8077,D8076
X001
M8077
M8081
D8081,D8080
D8083,D8082
D8085,D8084
X003
M8078
M8082
D8087,D8086
D8089,D8088
D8091,D8090
X004
M8079
M8083
D8093,D8092
D8095,D8094
D8097,D8096
*1.
*2.
1. Program example
1)
X000
OFF
This duration is measured.
Step
0
M8075
FNC 04
EI
M8076
User program
FNC 06
FEND
interrupt
pointer
I000
FNC 12 D8078
DMOV
D0
820
Interrupt return
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
36.8 Pulse width/Pulse period measurement function [M8075 to M8079, D8074 to D8097]
31
Pulse period measurement
The pulse period of the input signal from X000 is measured.
FNC277-FNC279
Data
Transfer 3
2)
ON
X000
OFF
32
FNC 04
EI
M8075
M8076
33
FNC290-FNC299
Extension File
Register Control
Pulse width
/Pulse period
measurement
setting flag
X002
FNC280-FNC289
High-Speed
Processing 2
Step
0
M8080
User program
34
interrupt
pointer
I001
M8000
RUN monitor
FNC 12 D8078
DMOV
D0
FNC300-FNC305
FX3U-CF-ADP
FNC 06
FEND
When the interrupt routine is executed at the
rising edge of the input signal from X000, the
pulse period of input signal from X000 stored in
D8078 and D8079 is transferred to D1 and D0.
35
SFCSTL
Programming
Interrupt return
36
END
M8080
ON
a
A
Version Up
Information
pulse period
38
Error Code
RUN
RUN/STOP
37
Special Device
Make the pulse width/pulse period measurement setting flag (M8080) remain OFF for 1 operation cycle or more
when discontinuing the pulse input.
If M8080 does not remain OFF for 1 operation cycle or more, the "a" period shown below is stored as the pulse
period.
Interrupt
Function
- Timing chart
The pulse period is not measured when the input signal rises for the first time after the PLC mode is changed
from STOP to RUN, or when the input signal rises for the first time after the pulse period measurement mode
(M8080) is set to from OFF to ON. (Accordingly, D8078 and D8079 are not updated.)
The pulse period is measured when the input signal rises at the next time. (As a result, D8078 and D8079 are
updated.)
X000
Execution Times
821
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
36.8 Pulse width/Pulse period measurement function [M8075 to M8079, D8074 to D8097]
Step
0
M8075
Pulse width
/Pulse period
measurement
setting flag
FNC 04
EI
M8076
M8077
User program
FNC 06
FEND
interrupt
pointer
I101
FNC 12 D8074
DMOV
D0
FNC 12 D8080
DMOV
D2
FNC230
LDD>=
D0
D2
K0
D0
D8
FNC234
ANDD<
D2
K0
FNC226
LDD<
D0
K0
FNC238
ANDD>=
D2
K0
M8000
FNC 23
DDIV
D8
K60
D10
FNC 21 H7FFFFFFF
DSUB
FNC 21
DSUB
D2
FNC 20
DADD
D4
FNC 24
DINC
D8
D2
FNC 24
DINC
D8
END
822
D6
D4
D4
D6
D8
D0
D4
D8
H80000000
FNC 21 HFFFFFFFF
DSUB
FNC 20
DADD
D0
Interrupt return
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
31
The ring counter offers 32-bit data including the most significant bit.
The DSUB (FNC21) instruction does not give a correct value because it handles the most significant bit as the
sign bit. To obtain a correct value, add the processing inside the dotted frame.
2. Cautions on use
The pulse width/pulse period measurement function and input interrupts can be used at the same time in the same
input terminal.
The input terminal used for the pulse width/pulse period measurement function cannot be used for the pulse catch
function.
Make sure that the total frequency of four input channels is 50 kHz or less when using the pulse width/pulse period
measurement function.
When the pulse width/pulse period measurement function and a high-speed counter are used together, the overall
frequency of the high-speed counter is affected.
For details on high-speed counters, refer to Subsection 4.7.7.
33
FNC290-FNC299
Extension File
Register Control
When the same input terminal is used by the pulse width/pulse period measurement function and a high-speed
counter, a grammatical error occurs.
32
FNC280-FNC289
High-Speed
Processing 2
When the same input terminal is used by the pulse width/pulse period measurement function and the SPD
(FNC56), DSZR (FNC150) or ZRN (FNC156) instruction, an operation error occurs when the instruction is
executed.
FNC277-FNC279
Data
Transfer 3
*1.
34
FNC300-FNC305
FX3U-CF-ADP
35
SFCSTL
Programming
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
823
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
37.1.1
Number and
name
FX3S
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
PLC Status
RUN
input
[M]8000
RUN monitor
NO contact
M8061
Error occurrence
[M]8001
RUN monitor
NC contact
M8000
M8001
[M]8002
Initial pulse
NO contact
M8002
M8003
[M]8003
Initial pulse
NC contact
1 scan time
Refer to Subsection 37.2.1.
FX3S/FX3G/FX3GC/FX3U/FX3UC
ON when either M8060, M8061, M8064,
M8065, M8066, or M8067 is ON.
[M]8004
FX1S/FX1N/FX1NC/FX2N/FX2NC
Error occurrence
ON when either M8060, M8061, M8063,
M8064, M8065, M8066, or M8067 is ON.
ON when battery voltage is below the value set
[M]8005
in D8006.
Battery voltage low
Refer to Subsection 37.2.3.
It is set when battery voltage low is detected.
[M]8006
Refer to Subsection 37.2.3.
Battery error latch
ON for 1 scan, when momentary power failure
is detected
[M]8007
Even if M8007 turns ON, PLC continues to
Momentary power
RUN as long as the duration of power loss is
failure
within the time period specified in D8008.
Refer to Subsection 37.2.4.
It is set when momentary power failure is
detected.
[M]8008
If power loss time is longer than the time period
Power failure
specified in D8008, M8008 is reset and PLC is
detected
switched to STOP mode. (M8000=OFF).
Refer to Subsection 37.2.4.
[M]8009
ON when 24 V DC power fails in an I/O
24V DC down
extension unit or special function block.
824
D8004
D8005
D8006
D8007
D8008
D8008
D8009
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Clock
[M]8010
32
33
*3
*3
*3
FNC290-FNC299
Extension File
Register Control
34
SFCSTL
Programming
*3
FNC300-FNC305
FX3U-CF-ADP
35
(Always ON)*3
36
Interrupt
Function
38
*2.
A
Version Up
Information
37
Error Code
Special Device
*1.
The FX2NC PLC requires the optional memory board (with the real time clock).
Execution Times
*3.
FNC280-FNC289
High-Speed
Processing 2
Not used
ON and OFF in 10 ms cycles
[M]8011
(ON: 5 ms, OFF: 5 ms)
10 ms clock pulse
Refer to Subsection 37.2.6.
ON and OFF in 100 ms cycles
[M]8012
(ON: 50 ms, OFF: 50 ms)
100 ms clock pulse
Refer to Subsection 37.2.6.
ON and OFF in 1 sec cycles
[M]8013
(ON: 500 ms, OFF: 500 ms)
1 sec clock pulse
Refer to Subsection 37.2.6.
ON and OFF in 1 min cycles
[M]8014
(ON: 30 sec, OFF: 30 sec)
1 min clock pulse
Refer to Subsection 37.2.6.
Clock stop and preset
M 8015
For real time clock
Refer to Subsection 37.2.7.
Time read display is stopped
M 8016
For real time clock
Refer to Subsection 37.2.7.
30 seconds correction
M 8017
For real time clock
Refer to Subsection 37.2.7.
Installation detection (Always ON)
[M]8018
For real time clock
Refer to Subsection 37.2.7.
Real time clock (RTC) error
M 8019
For real time clock
Refer to Subsection 37.2.7.
Flag
[M]8020
ON when the result of addition/subtraction is 0.
Zero
Refer to Subsection 6.5.2 for usage.
ON when the result of subtraction is less than
[M]8021
the min. negative number.
Borrow
Refer to Subsection 6.5.2 for usage.
ON when 'carry' occurs in result of addition or
M 8022
when an overflow occurs in result of shift
Carry
operation.
Refer to Subsection 6.5.2 for usage.
[M]8023
Not used
BMOV direction specification
M 8024*1
(FNC 15)
HSC mode
M 8025*2
(FNC 53 to 55)
RAMP mode
M 8026*2
(FNC 67)
PR mode
M 8027*2
(FNC 77)
100 ms/10 ms timer changeover
M 8028
Interrupt permission during FROM/TO (FNC 78
and 79) instruction execution
[M]8029
ON when operation such as DSW (FNC 72) is
Instruction
completed.
execution
Refer to Subsection 6.5.2 for usage.
complete
FX3S
FNC277-FNC279
Data
Transfer 3
Number and
name
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
825
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Number and
name
FX3S
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
PLC Mode
M 8030*1
Battery LED
OFF
*1.
826
D8176 to
D8180
D8039
*2.
*3.
*4.
*4
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
M 8043*1
Set this in the last state of zero return mode.
Zero return complete
M 8044*1
Set this when machine zero return is detected.
Zero point condition
M 8045
Disables the all output reset function when the
All output reset
operation mode is changed.
disable
ON when M8047 is ON and any state S0 to
[M]8046*2
M8047
[M]8048*2
Annunciator
operate
M 8049*1
D8049 is enabled when M8049 is ON.
Annunciator enable
D8049
M8048
*2.
*3.
I00 disable*4
M8051
(input interrupt)
I30 disable*4
M8054
(input interrupt)
disable*4
I6
disable*4
M8057
(Timer interrupt)
disable*4
I7
M8058
(Timer interrupt)
I8
disable*4
M8059
Counter interrupt
38
Version Up
Information
I50 disable*4
M8056
(Timer interrupt)
Error Code
I40
M8055
(input interrupt)
37
Special Device
I20 disable*4
M8053
(input interrupt)
36
Interrupt
Function
35
SFCSTL
Programming
*1.
I10 disable*4
M8052
(input interrupt)
34
D8040 to
D8047
FNC300-FNC305
FX3U-CF-ADP
M
STL monitoring
enable
FNC290-FNC299
Extension File
Register Control
8047*2
33
STL state ON
32
FNC280-FNC289
High-Speed
Processing 2
[M]8041*1
Transfer start
[M]8042
Start pulse
Execution Times
disable*4
*4.
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
CorrespondOperation and function
name
FX3S FX3G FX3GC FX3U FX3UC ing special FX1S
device
Step Ladder and Annunciator (Refer to ANS (FNC 46), ANR (FNC 47), IST (FNC 60), and Chapter 35 for details.)
M 8040
While M8040 is turned ON, transfer between
Transfer disable
states is disabled.
827
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Number and
name
FX3S
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
*1
[M]8062
[ch0]*2
D8060
D8061
*1
*1
D8063
[M]8064
Parameter error
[M]8065
Syntax error
[M]8066
Ladder error
[M]8067*5
Operation error
M 8068
D8064
D8065
D8069
D8314
D8315
D8066
D8069
D8314
D8315
D8067
D8069
D8314
D8315
D8068
D8312
D8313
M 8069*6
*1.
D8062
D8062
[M]8063*3*4
It truns on, only when a memory access error (6230) occurs in FX3S/FX3U/FX3UC PLCs.
*2.
*3.
*4.
*5.
*6.
When M8069 is ON, I/O bus check is executed. <Refer to Chapter 38 for details.>
Parallel Link
Parallel link Set M8070 when using master
station.
Parallel link
Set M8071 when using slave
station.
Parallel link ON when operating
Parallel link
ON when M8070 or M8071 setting is incorrect
M 8070*7
M 8071*7
[M]8072
[M]8073
*7.
828
D8075 to
D8098
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Operation and function
33
FNC290-FNC299
Extension File
Register Control
34
*1
*1
*1
*1
*1
*1
M 8081
*1
M 8082
*1
M 8083
*1
*1.
D8074 to
D8079
D8080 to
D8085
D8086 to
D8091
D8092 to
D8097
D8074 to
D8079
D8080 to
D8085
D8086 to
D8091
D8092 to
D8097
32
FNC300-FNC305
FX3U-CF-ADP
M 8080
FNC280-FNC289
High-Speed
Processing 2
FX3S
FNC277-FNC279
Data
Transfer 3
Number and
name
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
35
Flag
[M]8090
M 8091
*2
*2
D8099
36
37
*2.
*3.
For FX2N/FX2NC PLCs, 0.1ms high-speed ring counter D8099 will operate after END instruction is executed
with after M8099 is driven.
For FX3U/FX3UC PLCs, 0.1ms high-speed ring counter D8099 will operate after M8099 is driven.
Special Device
Interrupt
Function
[M]8092
[M]8093
[M]8094
Not used
[M]8095
[M]8096
[M]8097
[M]8098
High-Speed Ring Counter
High-speed ring counter operation (in units of
M 8099*3
0.1ms, 16 bits)
[M]8100
Not used
SFCSTL
Programming
38
Error Code
A
Version Up
Information
B
Execution Times
829
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Number and
name
Memory Information
[M]8101
[M]8102
Not used
[M]8103
ON when
[M]8104
installed.
function
extension
memory
FX3S
is
[M]8105
[M]8106
[M]8107
[M]8108
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
D8104
D8105
*2
*2
*2.
D8107
*1.
D8109
*3
*4
[M]8113
*3
*4
[M]8114
*3
*4
[M]8115
*3
*4
M 8116
*3
*4
*3
*4
D8112
D8113
D8114
[M]8112
M 8117
[M]8118
[M]8119
Not used
*3.
*4.
M 8112
FX1N-2AD-BD: ch1 input mode change
M 8115
FX1N-4EX-BD: BX3 input
M 8116
FX1N-2EYT-BD: BY0 output
M 8117
FX1N-2EYT-BD: BY1 output
[M]8118
Not used
[M]8119
RS (FNC 80) and Computer Link [ch1] (Refer to Data Communication Edition for details.)
[M]8120
Not used
[M]8121*5
M 8122*5
D8122
D8123
8123*5
M
[M]8124
[M]8125
[M]8126
[M]8127
M 8128
M 8129
*5.
830
D8127
D8128
D8129
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
*3
D8152
[M]8153*1
*3
D8153
*1
D8154
[M]8154
*2
*2
[M]8155
D8155
*2
*2
[M]8156
D8156
[M]8156
D8156
D8157
Communication error
instruction is latched.
[M]8158*1
[M]8159*1
in
EXTR
(FNC180)
*1.
*2.
*3.
*3
*3
*2
*2
*2
*2
D8157
D8158
D8159
38
Error Code
[M]8157*1
*3
37
Special Device
[M]8154
36
Interrupt
Function
35
SFCSTL
Programming
D8151
[M]8152*1
34
FNC300-FNC305
FX3U-CF-ADP
*3
33
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
[M]8151
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
CorrespondOperation and function
name
FX3S FX3G FX3GC FX3U FX3UC ing special FX1S FX1N FX1NC FX2N FX2NC
device
High-Speed Counter Comparison, High-Speed Table, and Positioning [Positioning is supported in FX3S/FX3G/FX3GC/FX1S/FX1N/FX1NC]
HSZ (FNC 55) instruction:
M 8130
Table comparison mode
D8130
HSZ (FNC 55) instruction:
[M]8131
[M]8135
Not used
[M]8136
[M]8137
D8138
D8139
M 8140
CLR signal output function enable
[M]8141
[M]8142
Not used
[M]8143
[M]8144
M 8145
[Y000] Pulse output stop command
M 8146
[Y001] Pulse output stop command
[M]8147
[Y000] Pulse output monitor (BUSY/READY)
[M]8148
[Y001] Pulse output monitor (BUSY/READY)
[M]8149
Not used
[M]8150
Not used
A
Version Up
Information
B
Execution Times
831
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Number and
name
FX3S
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
Advanced Function
M 8160*1
M 8161*1*2
M 8162
[M]8163
8164*1
M 8165*1
[M]8166
M
8167*1
M 8168*1
[M]8169
*4
*3
D8164
*1.
*2.
Applicable to ASC (FNC 76), RS (FNC 80), ASCI (FNC 82), HEX (FNC 83), CCD (FNC 84), and CRC
(FNC188) instructions*5.
*3.
*4.
*5.
*6
*6
M 8172
M 8173*6
M 8174*6
*6
*6
M 8176
M 8177*6
M 8171
M 8175
*6.
Communication Port Channel Setting (Refer to Data Communication Edition for details.)
M 8178
Parallel link channel switch (OFF: ch1/ON: ch2)
M 8179
*7.
832
The channel is specified by either setting or not setting M8179 in the setting program.
For setting program, Refer to Data Communication Edition
ch1: M8179 is not set in program
ch2: M8179 is set in program
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FX1N FX1NC FX2N FX2NC
(M504)
*2
[M]8184*1
(M505)
*2
*1
[M]8185
(M506)
*2
[M]8186*1
[M]8188*1
(M507)
D8201 to
(M508)
D8218
(M509)
*2
[M]8187*1
[M]8189*1
(M510)
*2
[M]8190*1
(M511)
*2
[M]8191*1
[M]8192
[M]8193
[M]8194
[M]8195
[M]8196
[M]8197
*2
*1.
*2.
FNC290-FNC299
Extension File
Register Control
Not used
33
*2
*2
(M503)
*4.
36
Interrupt
Function
*3.
SFCSTL
Programming
8199*3*4
34
35
High-Speed Counter Edge Count Specification (Refer to Subsection 4.8.8 for details.)
M 8198*3*4
32
FNC300-FNC305
FX3U-CF-ADP
[M]8183*1
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
CorrespondOperation and function
name
FX3S FX3G FX3GC FX3U FX3UC ing special FX1S
device
N:N Network (Refer to FX Series Users Manual - Data Communication Edition for details.)
[M]8180
[M]8181
Not used
[M]8182
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
833
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Applicable model
CorrespondOperation and function
FX3S FX3G FX3GC FX3U FX3UC ing special FX1S
device
Counter Up/down Counter Counting Direction (Refer to Section 4.6 for details.)
M 8200
C200
M 8201
C201
M 8202
C202
M 8203
C203
M 8204
C204
M 8205
C205
M 8206
C206
M 8207
C207
M 8208
C208
M 8209
C209
M 8210
C210
M 8211
C211
M 8212
C212
M 8213
C213
M 8214
C214
M 8215
C215 When
M8
is
ON,
the
M 8216
C216 corresponding C
is changed to
M 8217
C217 down mode.
M 8218
C218 ON: Down count operation
M 8219
C219 OFF: Up count operation
M 8220
C220
M 8221
C221
M 8222
C222
M 8223
C223
M 8224
C224
M 8225
C225
M 8226
C226
M 8227
C227
M 8228
C228
M 8229
C229
M 8230
C230
M 8231
C231
M 8232
C232
M 8233
C233
M 8234
C234
Number and
name
834
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
*2
*2
adapter*1
*2
adapter*1
*6
*6
Count the number of connected analog special adapter from the main unit.
*2.
*3.
Expansion board connected to the BD1 connector of a FX3G PLC (40-point and 60-point type) or the BD
connector of a FX3G PLC (14-point and 24-point type) and FX3S PLC.
*4.
Expansion board connected to the BD2 connector of a FX3G PLC (40-point and 60-point type).
*5.
*6.
37
Special Device
*1.
36
Interrupt
Function
*2
35
SFCSTL
Programming
34
FNC300-FNC305
FX3U-CF-ADP
33
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
CorrespondOperation and function
name
FX3S FX3G FX3GC FX3U FX3UC ing special FX1S FX1N FX1NC FX2N FX2NC
device
High-Speed Counter Up/down Counter Counting Direction (Refer to Section 4.7 or 4.8 for details.)
M 8235
C235
M 8236
C236
M 8237
C237
M 8238
C238 When
M8
is
ON,
the
M 8239
C239 corresponding C
is changed to
M 8240
C240 down mode.
M 8241
C241 ON: Down count operation
M 8242
C242 OFF: Up count operation
M 8243
C243
M 8244
C244
M 8245
C245
High-Speed Counter Up/down Counter Monitoring (Refer to Section 4.7 or 4.8 for details.)
[M]8246
C246
[M]8247
C247
[M]8248
C248
When C
of 1-phase 2-input or 2
[M]8249
C249 phase
[M]8250
C250 2-input counter is in down mode, the
turns ON.
[M]8251
C251 corresponding M8
[M]8252
C252 ON: Down count operation
[M]8254
C254
[M]8255
C255
[M]8256 to [M]8259 Not used
Analog Special Adapter [FX3U/FX3UC] (Refer to Subsection 37.2.19 for applicability of each analog special adapter.)
38
Error Code
A
Version Up
Information
B
Execution Times
835
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Number and
name
FX3S
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
Flags
[M]8300 to [M]8303 Not used
*1
*1
*1
*1
D8316
D8317
D8318
D8319
[M]8316*3
Not used
BFM initialization failure
ON when a FROM/TO error has occurred in a
special function unit/block as specified in the
BFM initialization function at changing PLC
[M]8318
from STOP to RUN.
When M8318 turns ON, the unit number in
which the error has occurred is stored in
D8318, and the BFM number is stored in
D8319.
[M]8319 to [M]8321 Not used
FX3UC-32MT-LT/FX3UC-32MT-LT-2 model
indicator
[M]8322
1:FX3UC-32MT-LT-2
0:FX3UC-32MT-LT
*5
[M]8323
*5
*5
[M]8317
[M]8324
*4
[M]8328
Instruction non-execution
[M]8329
836
*4
*1.
*2.
M8312 is EEPROM backed up against power failure, and is automatically cleared when it is cleared or when
the clock data is set again. For details on backup against power failure, refer to Section 2.6.
*3.
If the I/O device numbers are unavailable, M8316 turns ON when its directly designated to device numbers
including LD, AND, OR, and OUT instructions or indirectly designated by index.
*4.
*5.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
M 8345*2
*2
M 8347*2
[M]8348
M 8349*2
[M]8350
M 8351*2
*2
M 8355*2
M 8356*2
M 8357*2
[M]8358
M 8359*2
[M]8360
8361*2
M 8365*2
8366*2
M 8367*2
[M]8368
M 8369*2
*1.
38
A
Version Up
Information
M 8362*2
M 8363
M 8364
37
Error Code
Special Device
M 8352
M 8353
M 8354
36
Interrupt
Function
M 8346
35
SFCSTL
Programming
M
M 8343
M 8344
34
FNC300-FNC305
FX3U-CF-ADP
33
FNC290-FNC299
Extension File
Register Control
8342*2
32
FNC280-FNC289
High-Speed
Processing 2
M 8341*2
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
CorrespondOperation and function
name
FX3S FX3G FX3GC FX3U FX3UC ing special FX1S FX1N FX1NC FX2N FX2NC
device
Timing Clock (Refer to Section 24.3 for details.) and Positioning [FX3S/FX3G/FX3GC/FX3U/FX3UC] (Refer to Positioning Control Edition for
details.)
DUTY (FNC186) instruction: Timing clock
*1
[M]8330
D8330
output 1
DUTY (FNC186) instruction: Timing clock
*1
[M]8331
D8331
output 2
DUTY (FNC186) instruction: Timing clock
*1
[M]8332
D8332
output 3
DUTY (FNC186) instruction: Timing clock
*1
[M]8333
D8333
output 4
DUTY (FNC186) instruction: Timing clock
*1
[M]8334
D8334
output 5
[M]8335
Not used
DVIT
(FNC151)
instruction:
*3
D8336
M 8336*2
Interrupt input specification function enabled
[M]8337
Not used
PLSV
(FNC157)
instruction:
*1
M 8338*2
Acceleration/deceleration operation
[M]8339
Not used
[M]8340
READY)
*3.
B
Execution Times
*2.
837
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Number and
name
FX3S
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
[M]8370
(ON: BUSY/ OFF: READY)
*2
*2
M 8372*1
*2
M 8373
*2
8371*1
M 8374
*2
M 8375*1
*2
M 8376*1
*2
*2
*2
*2
8377*1
[M]8378
M 8379*1
RS2 (FNC 87) [ch0] [FX3G/FX3GC] (Refer to Data Communication Edition for details.)
[M]8370
Not used
[M]8371*1
M 8372*1
D8372
D8373
*1.
These devices are cleared when the PLC mode switches from RUN to STOP or when the RS2 instruction
[ch0] turns OFF.
*2.
Available only when two FX3U-2HSY-ADP units are connected to an FX3U PLC.
High-Speed Counter Function (Refer to Subsection 4.7.5 and 4.8.5 for details.)
Operation status of C235, C241, C244, C246,
[M]8380*3
C247, C249, C251, C252, and C254
[M]8381*3
[M]8382
[M]8383*3
[M]8384
[M]8385*3
[M]8386*3
[M]8387*3
[M]8388
M 8389
M 8390
M 8391
*3
*3
M 8392
*3.
838
Interrupt Program
[M]8393
Contact for delay time setting
HCMOV (FNC189): Drive contact for interrupt
[M]8394
program
[M]8395
Function changeover device for C254
[M]8396
Not used
[M]8397
Ring Counter
Ring counter operation
M 8398
(in units of 1ms, 32 bits)*4
[M]8399
Not used
*4.
D8393
D8398,
D8399
1ms ring counter (D8399, D8398) will operate after M8398 turns ON.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Operation and function
FX3S
RS2 (FNC 87) [ch1] (Refer to Data Communication Edition for details.)
[M]8400
Not used
[M]8401*1
32
D8403
[M]8405
M 8409
RS2 (FNC 87) [ch1] Time-out check flag
RS2 (FNC 87) [ch2] and Computer Link [ch2] (Refer to the Data Communication Edition for details.)
[M]8410 to [M]8420 Not used
33
[M]8421*2
8402*1
*3
D8422
M 8423*2
[M]8424
D8423
[M]8425
[M]8426
FNC300-FNC305
FX3U-CF-ADP
8422*2
*3
FNC290-FNC299
Extension File
Register Control
D8402
M 8403*1
[M]8404
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
Number and
name
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
35
[M]8427
M 8428
M 8429
*3
*3
D8427
D8428
D8429
*2.
These devices are cleared when the PLC mode switches from RUN to STOP or when the RS2 instruction
[ch2] turns OFF.
*3.
*4
*5
*5
*4
*5
*5
D8402
*5
*5
D8403
*5
*5
[M]8403
[M]8404
*4
Retry
*4
*5
*5
Timeout
*4
*5
*5
[M]8410
Not used
*4
*5
*5
*5
*5
D8422
*5
*5
D8423
*5
*5
[M]8423
*4
[M]8424
[M]8428
Retry
*4
*5
*5
[M]8429
Timeout
*4
*5
*5
[M]8430
Not used
MODBUS communication [ch1, ch2] (Refer to MODBUS Communication Edition for details.)
M 8411
*4.
*5.
*4
*5
*5
38
A
Version Up
Information
[M]8422
*4
Error Code
37
Special Device
36
Interrupt
Function
These devices are cleared when the PLC mode switches from RUN to STOP or when the RS2 instruction
[ch1] turns OFF.
SFCSTL
Programming
*1.
34
B
Execution Times
839
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Number and
name
FX3S
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
[M]8402
[M]8403
Not used
[M]8404
*1
*1
*1
*1
*1
*1
M 8410
[M]8422
[M]8423
Not used
[M]8424
*1
*1
*1
*1
[M]8405
M 8418
*1
*1
*1
*1
*1
*1
M 8430
[M]8425
M 8438
[M]8439
*1.
*2.
*1
*1
*1
*1
[M]8405
Not used
*4
*4
[M]8425
Not used
M 8431*3
[M]8432 to [M]8435 Not used
*4
*4
*4
*4
*4
*4
*4
*4
*5
*4
*5
[M]8424
*4
*5
*5
*5
*5
*5
*5
*5
*5
*5
*5
*6
*6
[M]8493
*6
*6
[M]8494
*6
*6
M 8495
*6
*6
[M]8496
*6
*6
[M]8497
*6
*6
[M]8498
*6
*6
M 8492
*3.
*4.
*5.
*6.
840
Used when the SNTP function setting is set to "Use" in the time setting parameters.
Available in Ver. 2.00 or later.
Available in Ver. 3.10 or later.
Available in Ver. 2.10 or later.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Operation and function
[M]8449
*1.
*2.
*2
D8449
D8336
D8336
D8336
34
D8464
D8465
D8466
D8467
[M]8489
D8487
D8489
*6
36
*6
*5
*5
37
Special Device
Interrupt
Function
Not used
35
SFCSTL
Programming
[M]8488
FNC300-FNC305
FX3U-CF-ADP
D8336
FNC290-FNC299
Extension File
Register Control
[M]8487
32
33
Error Detection
[M]8468 to [M]8488 Not used
*5.
*6.
D8438
M 8462
User interrupt input command
DVIT (FNC151) instruction [Y003]
*4
*3
M 8463
[Y002]
Clear signal device specification function enabled
DSZR (FNC150), ZRN (FNC156) instructions
*4
M 8467
[Y003]
*3.
*4.
FNC280-FNC289
High-Speed
Processing 2
[ch2]*1
FX3S
FNC277-FNC279
Data
Transfer 3
Number and
name
Applicable model
CorrespondFX3G FX3GC FX3U FX3UC ing special FX1S
device
38
Error Code
A
Version Up
Information
B
Execution Times
841
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
37.1.2
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
PLC Status
Default value is shown on the right
(in 1ms steps)
(Writes from system ROM at power ON)
200
Value overwritten by program is valid after
END or WDT instruction execution.
Refer to Subsection 37.2.2.
D 8000
Watchdog
timer
200
200
200
200
200
200
200
200
28
26
26
24
24
D8101*1
22
26
26
24
24
4*2
4
8
4
8
2 4 1 0 0
[D]8001
PLC type and
system version
[D]8002
Memory capacity
200
Version 1.00
Indicated on the right
2...2K steps
4...4K steps
8...8K steps
If 16K steps or more
"8" is written to D8002, and "16", "32" or
"64" is written to D8102.
D8102
[D]8003
Memory type
[D]8004
Error number M
Present
value
Type of memory
Protect
switch
00H
01H
EPROM
memory cassette
02H
EEPROM memory
cassette or flash
memory cassette
OFF
0AH
EEPROM memory
cassette or flash
memory cassette
ON
10H
8 0 6 0
M8004
Default:
FX2N/FX2NC PLCs:
[D]8006
3.0V (in 0.1-V units)
Low battery voltage
FX3G/FX3GC/FX3U/FX3UC PLCs:
detection level
2.7V (in 0.1-V units)
(Writes from system ROM at power ON)
842
M8005
M8006
*1.
The corresponding special data register D8101 is available only in FX3S/FX3G/FX3GC/FX3U/FX3UC PLCs.
No corresponding device is available in FX1S/FX1N/FX1NC/FX2N/FX2NC PLCs.
*2.
"4" is displayed even when the memory capacity is set to 16K steps in the parameter setting.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
Corresponding special
device
FX1S
PLC Status
Operation frequency of M8007 is stored.
Cleared at power-off.
M8007
D8008
Power failure
detection
Default:*1
FX3U/FX2N PLCs:
10 ms (AC power supply type)
FX3UC/FX2NC PLCs:
5 ms (DC power supply type)
M8008
M8009
*1.
33
35
Clock
Accumulated instruction-execution time from
step 0
(in 0.1-ms units)
Refer to Subsection 37.2.5.
*2
D8014
Minute data
0 to 59 minutes
(for real time clock)
Refer to Subsection 37.2.7.
*2
D8015
Hour data
0 to 23 hours
(for real time clock)
Refer to Subsection 37.2.7.
*2
D8016
Day data
1 to 31 days
(for real time clock)
Refer to Subsection 37.2.7.
*2
D8017
Month data
1 to 12 months
(for real time clock)
Refer to Subsection 37.2.7.
*2
D8018
Year data
*2
D8019
Day-of-the-week
data
0 (Sunday) to 6 (Saturday)
(for real time clock)
Refer to Subsection 37.2.7.
*2
A memory board having the real time clock function is required in FX2NC PLC.
37
38
A
Version Up
Information
Error Code
0 to 59 seconds
(for real time clock)
Refer to Subsection 37.2.7.
Special Device
D8013
Second data
*2.
36
Interrupt
Function
SFCSTL
Programming
[D]8010
Present scan time
34
FNC300-FNC305
FX3U-CF-ADP
FNC290-FNC299
Extension File
Register Control
[D]8009
24V
DC
device
32
FNC280-FNC289
High-Speed
Processing 2
[D]8007
Momentary power
failure count
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
B
Execution Times
843
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable model
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
Input Filter
Input filter value of X000 to X017 *1
(Default: 10 ms)
Refer to Subsection 37.2.9.
D 8020
Input filter
adjustment
[D]8021
[D]8022
[D]8023
[D]8025
[D]8026
[D]8027
[D]8024
Not used
[D]8029
register*2
Value of V0 (V)
*1.
*2.
*3
[D]8031
*3
Constant Scan
[D]8032
[D]8033
[D]8034
[D]8035
[D]8036
Not used
[D]8037
[D]8038
D 8039
Constant scan
duration
*3.
844
M8039
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
Corresponding special
device
FX1S
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
32
FNC280-FNC289
High-Speed
Processing 2
[D]8040*1
ON state number 1
[D]8041*1
ON state number 2
[D]8042*1
ON state number 3 The smallest number out of active state
ranging from S0 to S899 and S1000 to
[D]8043*1
*2
ON state number 4 S4095 is stored in D8040 and the secondsmallest state number is stored in D8041.
[D]8044*1
Active state numbers are then sequentially
ON state number 5 stored in registers up to D8047 (Max. 8
points).
[D]8045*1
33
ON state number 6
FNC290-FNC299
Extension File
Register Control
M8047
[D]8046*1
ON state number 7
34
[D]8048
*1
[D]8049
On state minimum
number
Not used
*1.
*2.
M8049
35
SFCSTL
Programming
FNC300-FNC305
FX3U-CF-ADP
[D]8047*1
ON state number 8
36
Example:
If X020
is unconnected.
ample:
If X020
is unconnected.
[D]8060
Interrupt
Function
M8060
BCD
converted
value
converted
value
1 01 20 02 0BCD
37
*3
Device number
number *3
Device
[D]8061
M8061
M8062
M8063
[D]8064
M8064
[D]8065
M8065
[D]8066
M8066
[D]8067*6
*3.
*4.
*5.
38
M8067
*7
*8
*7
M8068
*8
M8065 to
M8067
B
Execution Times
*6.
*7.
*8.
Version Up
Information
[D]8069*6
Error Code
[D]8063*5
D 8068
M8062
[D]8062
Special Device
1: Input
Input X
X 0:
0: Output
Output Y
Y
1:
845
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable model
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
[D]8074
[D]8075
[D]8076
[D]8077
[D]8078
[D]8079
[D]8080
[D]8081
[D]8082
[D]8083
[D]8084
[D]8085
[D]8088
[D]8089
[D]8090
[D]8091
[D]8092
[D]8093
[D]8094
[D]8095
[D]8096
[D]8097
[D]8098
[D]8071
[D]8072
Not used
[D]8073
Sampling
Trace*1
[D]8086
[D]8087
*1.
846
[FX3U/FX3UC/FX2N/FX2NC]
M8075 to
M8079
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
Corresponding special
device
FX1S
Pulse width/Pulse period measurement [FX3G/FX3GC] (Refer to Section 36.8 for details.)
*2
Lower [X000]
Pulse width/Pulse period
Upper (10 s unit)
*2
Lower [X001]
Ring counter value for rising edge
Upper (1/6 s unit)
*2
Lower [X001]
Ring counter value for falling edge
Upper (1/6 s unit)
*2
Lower [X001]
Pulse width/Pulse period
Upper (10 s unit)
*2
Lower [X003]
Ring counter value for rising edge
Upper (1/6 s unit)
*2
Lower [X003]
Ring counter value for falling edge
Upper (1/6 s unit)
*2
Lower [X003]
Pulse width/Pulse period
Upper (10 s unit)
*2
Lower [X004]
Ring counter value for rising edge
Upper (1/6 s unit)
*2
Lower [X004]
Ring counter value for falling edge
Upper (1/6 s unit)
*2
*2
D 8097*1
Lower [X004]
Pulse width/Pulse period
Upper (10 s unit)
[D]8098
Not used
D 8077*1
D 8078*1
D
8079*1
*1
D 8080
D
8081*1
8082*1
8083*1
8084*1
D 8085*1
D
8086*1
8087*1
8088*1
8089*1
D 8090*1
*1
D 8091
*1
D 8092
D
8093*1
8094*1
*1
D 8095
D 8096*1
*2.
M8099
M8076
M8080
M8077
M8081
M8078
M8082
M8079
M8083
D 8099
[D]8100
Not used
*3.
33
34
35
36
37
38
The 0.1ms high-speed ring counter D8099 will operate after END instruction is executed while M8099 is ON.
Error Code
32
Special Device
*1.
Interrupt
Function
D 8076*1
SFCSTL
Programming
Lower [X000]
Ring counter value for falling edge
Upper (1/6 s unit)
D 8075*1
FNC300-FNC305
FX3U-CF-ADP
*2
FNC290-FNC299
Extension File
Register Control
FNC280-FNC289
High-Speed
Processing 2
Lower [X000]
Ring counter value for rising edge
Upper (1/6 s unit)
D 8074*1
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
A
Version Up
Information
B
Execution Times
847
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable model
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
4
8
16
4
8
16
Memory Information
[D]8101
PLC type and
system version
1 6 1 0 0
Indicated Version 1.00
on the right
[D]8102
Memory
capacity
2 ...... 2K steps
4 ...... 4K steps
8 ...... 8K steps
16 .... 16K steps
32 .... 32K steps
64 .... 64K steps
[D]8103
Not used
28
26
26
16
16
4*1
32
32
16*2
64
16*2
64
[D]8104
[D]8105
[D]8106
Not used
[D]8107
[D]8108
Number of
connected
special
function
units/blocks
M8104
*3
*3
*3
*3
M8107
*1.
"4" is displayed even when the memory capacity is set to 16K steps in the parameter setting.
*2.
*3.
[D]8110
Not used
[D]8111
M8109
M8112
[D]8113
M8113
D 8114
M8114
RS (FNC 80) and Computer Link [ch1] (Refer to Data Communication Edition for details.)
D 8120*4
D 8121*4
[D]8122*5
M8122
[D]8123*5
M8123
D 8124
D 8125
[D]8126
Not used
D 8127
D 8128
D 8129*4
848
data
length
M8126 to
M8129
*4.
Latch (battery or EEPROM backed) device. For details on backup against power failure, refer to Section 2.6.
*5.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
Corresponding special
device
FX1S
High-Speed Counter Comparison, High-Speed Table, and Positioning [Positioning is supported in FX3S/FX3G/FX3GC/FX1S/FX1N/FX1NC]
HSZ (FNC 55) instruction:
High-speed comparison table counter
[D]8131
[D]8132
[D]8133
[D]8134
D 8136
M8130
M8132
M8132
M8132
57)
D 8137
32
33
FNC290-FNC299
Extension File
Register Control
[D]8135
FNC280-FNC289
High-Speed
Processing 2
[D]8130
M8138
[D]8139
M8139
D 8143
[D]8144
Not used
D 8145
D 8148
[D]8149
Not used
D 8141
D 8142
35
Lower
D 8147
*1.
*1
36
37
Special Device
Interrupt
Function
SFCSTL
Programming
D 8146
34
FNC300-FNC305
FX3U-CF-ADP
[D]8138
D 8140
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
38
Error Code
A
Version Up
Information
B
Execution Times
849
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable model
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
*4
[D]8151
*4
M8151
[D]8152*2
*4
M8152
[D]8153*2
*4
M8153
M8154
M8155
M8156
M8156
M8157
M8157
M8158
M8159
D 8155*1
[D]8155
[D]8157*2
[D]8157
[D]8158*2
[D]8159*2
[D]8154*2
[D]8156
*4
*4
*4
*4
*1.
*2.
*3.
*4.
*3
*3
*3
*3
*3
*3
*3
*3
D 8159
850
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
Corresponding special
device
FX1S
Advanced Function
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
FNC280-FNC289
High-Speed
Processing 2
32
[D]8160
[D]8161
33
Not used
[D]8162
[D]8163
M8164
[D]8165
Not used
[D]8166
[D]8167
Not used
[D]8168
*5
*5
*1
*2
2nd
keyword is
not set.
*3
H**10 Write
*2
protection
[D]8169
H**12
*2
All online
operation
protection
*3
*3
*4
35
SFCSTL
Programming
H**11 Read/write
*2
protection
*3
34
H**20 Keyword
*2
cancel
*2.
36
*3.
*4.
*5.
Interrupt
Function
*1.
37
[D]8170
Not used
[D]8172
*6
[D]8175
Refresh range
*6
D 8176
*6
D 8177
*6
D 8178
D 8179
*6
D 8180
*6
[D]8181
Not used
*6.
*6
M8038
38
Version Up
Information
Station number
[D]8174
Error Code
[D]8173
*6
Special Device
FNC300-FNC305
FX3U-CF-ADP
H**00
FNC290-FNC299
Extension File
Register Control
D 8164
B
Execution Times
851
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable model
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
Value of Z1 register
[D]8183
Value of V1 register
[D]8184
Value of Z2 register
[D]8185
Value of V2 register
[D]8186
Value of Z3 register
[D]8187
Value of V3 register
[D]8188
Value of Z4 register
[D]8189
Value of V4 register
[D]8190
Value of Z5 register
[D]8191
Value of V5 register
[D]8192
Value of Z6 register
[D]8193
Value of V6 register
[D]8194
Value of Z7 register
[D]8195
Value of V7 register
Not used
[D]8201*1
(D201)
*2
[D]8202*1
(D202)
*2
[D]8203*1
(D203)
*2
[D]8204*1
(D204)
*2
[D]8205*1
(D205)
*2
[D]8206*1
(D206)
*2
[D]8207*1
(D207)
*2
[D]8208*1
(D208)
*2
[D]8209*1
(D209)
*2
[D]8210*1
(D210)
*2
[D]8211*1
(D211)
*2
[D]8212*1
(D212)
*2
[D]8213*1
(D213)
*2
[D]8214*1
(D214)
*2
[D]8215*1
(D215)
*2
[D]8216*1
(D216)
*2
[D]8217*1
(D217)
*2
[D]8218*1
(D218)
*2
852
M8183 to
M8191
*1.
*2.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
Corresponding special
device
FX1S
Analog Special Adapter [FX3U/FX3UC] (Refer to Subsection 37.2.19 for applicability of each analog special adapter.)
D 8260 to D 8269
*2
*2
*2
*2
D 8270 to D 8279
2nd special
D 8280 to D 8289
D 8290 to D 8299
D 8270 to D 8279
D 8280 to D 8289
D 8290 to D 8299
1st special
*6
*6
adapter*1
2nd special
adapter*1*5
Built-in analog function [FX3S-30M /E -2AD] (Refer to FX3S Hardware Edition for details.)
Ch1 analog input data (0 to 1020)
*7
[D]8271
*7
[D]8272
Not used
[D]8273
D 8274
D 8275
*7
*7
Not used
[D]8277
*7
[D]8279
Model code: K5
*7
36
Interrupt
Function
[D]8278
Error status
b0: Ch1 upper over-scale detection
b1: Ch2 upper over-scale detection
b2: Not used
b3: Not used
b4: EEPROM error
b5: Averaging time setting error
(common ch1 and ch2)
b6 to b15: Not used
35
SFCSTL
Programming
[D]8276
34
FNC300-FNC305
FX3U-CF-ADP
[D]8270
33
FNC290-FNC299
Extension File
Register Control
D 8260 to D 8269
32
FNC280-FNC289
High-Speed
Processing 2
adapter*1
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
*1.
Count the number of connected analog special adapter from the main unit.
*2.
*3.
BD1 connector of a FX3G PLC (40-point and 60-point type) or the BD connector of a FX3G PLC (14-point and
24-point type) and FX3S PLC.
*4.
Expansion board connected to the BD2 connector of a FX3G PLC (40-point and 60-point type).
Available in Ver. 1.10 or later.
*7.
38
Error Code
*6.
Special Device
*5.
37
A
Version Up
Information
B
Execution Times
853
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable model
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
Display Module Function (FX3G-5DM, FX3U-7DM) (Refer to Hardware Edition Manual of PLC main unit used for details.)
D 8300
*1
D 8301
*1
D 8302*2
*1
D 8303
*1
[D]8304
[D]8305
[D]8306
[D]8308
[D]8309
Not used
[D]8307
*1.
*2.
Latch (battery or EEPROM backed) device. For details on backup against power failure, refer to Section 2.6.
RND (FNC184)
[D]8310
[D]8311
Syntax, Circuit, Operation, or Unconnected I/O Designation Error Step Number (Refer to Chapter 38 for details.)
D 8312
M8068
M8065 to
M8067
[D]8317
M8316
[D]8318
*4
M8318
*4
M8318
D 8313
[D]8314*3
[D]8315*3
[D]8316
[D]8319
854
*3.
*4.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
Corresponding special
device
FX1S
Timing Clock (Refer to Section 24.3 for details.) and Positioning [FX3S/FX3G/FX3GC/FX3U/FX3UC] (Refer to Positioning Control Edition for
details.)
[D]8330
[D]8331
[D]8332
[D]8333
[D]8334
D 8336
*1
*1
*1
33
*1
*1
*2
M8336
D 8342
D 8343
D 8344
D 8345
D 8346
D 8347
D 8348
D 8349
D 8350
D 8351
D 8352
D 8353
D 8354
D 8355
D 8356
D 8357
D 8358
D 8359
Default: 0
*1.
*2.
35
36
37
Special Device
Interrupt
Function
SFCSTL
Programming
D 8341
34
FNC300-FNC305
FX3U-CF-ADP
D 8340
32
FNC290-FNC299
Extension File
Register Control
Not used
FNC280-FNC289
High-Speed
Processing 2
[D]8329
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
38
Error Code
A
Version Up
Information
B
Execution Times
855
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable model
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
D 8361
D 8360
D 8362
D 8363
D 8364
D 8365
D 8366
D 8367
D 8368
D 8369
D 8370
D 8371
D 8372
D 8373
D 8374
D 8375
D 8376
D 8377
*2
*2
*2
*2
*2
D 8378
*2
D 8379
*2
RS2 (FNC 87) [ch0] [FX3G/FX3GC PLCs] (Refer to Data Communication Edition for details.)
D 8370
[D]8371
Not used
[D]8372*1
[D]8373*1
D 8379
D 8380
D 8381
D 8382
D 8383
[D]8384
[D]8385
[D]8386
[D]8389
856
*1.
*2.
Available only when two FX3U-2HSY-ADP adapters are connected to an FX3U PLC.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
FX1S
M8393
*2
*3
M8398
D 8393
[D]8394
Not used
Symbolic
information
storage
Protection of
execution
program
None
None
None
Provided
H**10*1
Provided
None
H**11*1
Provided
Provided
H**01
33
*2
34
[D]8397
Not used
Ring Counter
D 8398
35
*2.
*3.
*4.
1ms ring counter (D8399, D8398) will operate after M8398 turns ON.
SFCSTL
Programming
*1.
36
RS2 (FNC 87) [ch1] (Refer to Data Communication Edition for details.)
RS2 (FNC 87) [ch1]
setting
Communication format
[D]8401
Not used
[D]8402*5
[D]8403*5
[D]8404
Not used
[D]8405
M8402
M8403
Remaining points of
D 8410
D 8411
D 8412
D 8413
[D]8414
[D]8415
[D]8416
*5.
38
A
Version Up
Information
Error Code
D 8409
37
Special Device
[D]8419
Interrupt
Function
D 8400
FNC300-FNC305
FX3U-CF-ADP
[D]8396
D 8399
FNC290-FNC299
Extension File
Register Control
[D]8395
Symbolic
Information,
Block
password
status
32
FNC280-FNC289
High-Speed
Processing 2
Corresponding special
device
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
B
Execution Times
857
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable model
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
RS2 (FNC 87) [ch2] and Computer Link [ch2] (Refer to Data Communication Edition for details.)
D 8420
D 8421
[D]8422*1
M8422
[D]8423*1
M8423
[D]8424
Not used
[D]8425
[D]8426
Not used
D 8427
D 8428
D 8429
D 8430
D 8431
D 8432
D 8433
[D]8434
[D]8435
[D]8436
[D]8437
Not used
*1.
data
length
M8426 to
M8429
Communication format
*2
*3
*3
D 8401
Protocol
*2
*3
*3
*2
*3
*3
M8402
D 8403
Error details
*2
*3
*3
M8403
D 8404
*2
*3
*3
[D]8405
*2
*3
*3
*3
*3
D 8402
D 8406
[D]8407
*2
*3
*3
*2
*3
*3
D 8409
*2
*3
*3
D 8410
*2
*3
*3
D 8411
*2
*3
*3
D 8412
Number of retries
*2
*3
*3
D 8414
*2
*3
*3
D 8415
*3
*3
*3
*3
*3
*3
[D]8408
D 8416
[D]8419
Communication mode
*2.
*3.
858
*2
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
Corresponding special
device
FX1S
Communication format
*1
*2
*2
*2
*2
Protocol
D 8422
*1
*2
*2
M8422
D 8423
Error details
*1
*2
*2
M8423
*1
*2
*2
*1
*2
*2
*2
*2
D 8424
[D]8425
D 8426
[D]8427
*1
*2
*2
*2
*2
D 8429
*1
*2
*2
D 8430
*1
*2
*2
*2
*2
D 8431
*1
D 8432
Number of retries
*1
*2
*2
D 8434
*1
*2
*2
*2
*2
*2
[D]8439
Communication mode
*2
*2
*1.
*2.
*1
MODBUS communication [ch1, ch2] (Refer to MODBUS Communication Edition for details.)
D 8470
Lower
D 8471
Upper
D 8472
Lower
D 8473
Upper
D 8474
Lower
D 8475
Upper
D 8476
Lower
D 8477
Upper
D 8478
Lower
D 8479
Upper
D 8480
Lower
D 8481
Upper
D 8482
Lower
D 8483
Upper
D 8484
Lower
D 8485
Upper
*3.
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
*3
35
36
37
38
Error Code
Special Device
Interrupt
Function
D 8436
34
SFCSTL
Programming
D 8435
*2
33
FNC300-FNC305
FX3U-CF-ADP
[D]8428
*1
32
FNC290-FNC299
Extension File
Register Control
D 8421
*1
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
A
Version Up
Information
B
Execution Times
859
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable model
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
[D]8402
Step
number
instruction
[D]8403
of
executing
CF-ADP
*2
*1
*1
[D]8406
CF-ADP status
[D]8407
Not used
[D]8408
CF-ADP version
[D]8414
*1
*1
[D]8415
*1
*1
*1
*1
*1
*1
*1
*1
[D]8416
Not used
[D]8417
*1
*1
*1
*1
*1
*1
[D]8418
[D]8419
instructions*2*3
*1.
*2.
*3.
For details on the error code is stored in special data register, refer to the CF-ADP Manual.
[D]8422
Step
*4
*4
[D]8423
instruction*5
*4
*4
[D]8426
CF-ADP status
[D]8427
Not used
[D]8428
CF-ADP version
[D]8434
*4
*4
*4
*4
number
of
executing
CF-ADP
[D]8435
*4
*4
[D]8436
Not used
[D]8437
*4
[D]8438
*4
[D]8439
860
*4
*4
*4
*4
*4.
*5.
*6.
For details on the error code is stored in special data register, refer to the CF-ADP Manual.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
Corresponding special
device
FX1S
*2
*2
[D]8401
IP Address (High-order)
*1
*1
*2
*2
[D]8402
*1
*1
*2
*2
[D]8403
*1
*1
*2
*2
[D]8404
*1
*1
*2
*2
[D]8405
*1
*1
*2
*2
[D]8406
Status information
*1
*1
*2
*2
[D]8407
*1
*1
*2
*2
FX3U-ENET-ADP version
*1
*1
*2
*2
D 8409
*1
*1
*2
*2
D 8410
*1
*1
*2
*2
*1
*1
*2
*2
*1
*1
*2
*2
[D]8408
[D]8411
[D]8416
Model code
*1
*1
*2
[D]8417
*1
*1
*2
[D]8418
Not used
[D]8419
*1.
*2.
*1
*1
*2
*2
*2
*2
33
34
35
SFCSTL
Programming
[D]8415
32
FNC300-FNC305
FX3U-CF-ADP
*1
FNC290-FNC299
Extension File
Register Control
IP Address (Low-order)
FNC280-FNC289
High-Speed
Processing 2
[D]8400
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
861
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Applicable model
Number and
name
Content of register
FX3S
Corresponding special
device
FX1S
IP Address (Low-order)
[D]8421
IP Address (High-order)
*1
*1
*2
*2
*1
*1
*2
*2
*1
*2
*2
[D]8422
*1
[D]8423
*1
*1
*2
*2
*1
*1
*2
*2
*1
*2
*2
[D]8424
[D]8425
*1
[D]8426
Status information
*1
*1
*2
*2
*1
*1
*2
*2
*1
*2
*2
[D]8427
[D]8428
FX3U-ENET-ADP version
*1
D 8429
*1
*1
*2
*2
D 8430
*1
*1
*2
*2
*1
*2
*2
*1
*2
*2
*1
*1
[D]8435
Not used
[D]8436
Model code
*1
*1
*2
*2
*1
*1
*2
*2
[D]8431
[D]8437
[D]8438
Not used
[D]8439
*1
*1
*2
*2
*3
*3
D 8493
*3
*3
D 8494
*3
*3
*3
*3
D 8496
*3
*3
D 8497
*3
*3
[D]8498
*3
*3
*3
*3
M8438
D 8495
[D]8499
*1.
*2.
*3.
[D]8438*4
RS2 (FNC 87) [ch2] and Computer Link [ch2] (Refer to Data Communication Edition for details.)
[D]8439
862
*5
*4.
*5.
M8449
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Content of register
FX3S
Corresponding special
device
FX1S
M8464
D 8465
*1
M8465
D 8466
*1
M8466
D 8467
M8467
*2
*1.
*2.
Available only when two FX3U-2HSY-ADP adapters are connected to an FX3U PLC.
34
[D]8487
[D]8488
Not used
[D]8489
*3.
*4.
M8487
M8489
*4
*4
*3
*3
35
SFCSTL
Programming
FNC300-FNC305
FX3U-CF-ADP
Error Detection
[D]8468 to [D]8486 Not used
33
FNC290-FNC299
Extension File
Register Control
*1
32
FNC280-FNC289
High-Speed
Processing 2
D 8464
FNC277-FNC279
Data
Transfer 3
Applicable model
Number and
name
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
863
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
37.2
37.2.1
Example program
M8000
Y000
"Normal operation"
2)
RUN
M8000
RUN monitor (NO contact)
STOP
ON
ON
M8001
RUN monitor (NC contact)
M8002
Initial pulse (NO contact)
RUN
ON
ON
1 scan time
M8003
Initial pulse (NC contact)
ON
ON
ON
Example program
M8002
Initial pulse (NO contact)
FNC 40 D200
ZRST
D299
M8003 turns OFF momentarily (for only 1 scan time) when the PLC enters the RUN mode.
2)
RUN
M8000
RUN monitor (NO contact)
STOP
ON
ON
M8001
RUN monitor (NC contact)
M8002
Initial pulse (NO contact)
M8003
Initial pulse (NC contact)
864
RUN
ON
ON
1 scan time
ON
ON
ON
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
M8002
0
Initial pulse
FNC 12
MOV
K300
FNC 07
WDT
D8000
33
A watchdog timer error may occur in the following cases. Add the above program to somewhere near the first step or
adjust the number of execution FROM/TO instructions at the same scan.
2)
3)
M8005
Y001
0
Battery
voltage low
37
38
Error Code
This special device detects low voltage in the lithium battery for memory backup.
In FX3U/FX3UC PLCs, the BATT (BAT) LED turns ON when the PLC detects low battery voltage.
In FX3G/FX3GC PLCs, the ALM LED indicator turns ON when the PLC detects low battery voltage if the optional battery
is installed and the battery mode is selected by the parameter setting.
Use the following program to notify low battery voltage to the outside.
36
Special Device
35
Interrupt
Function
The watchdog timer can be reset in the middle of a sequence program using WDT (FNC 07) instruction.
It is recommended to reset the watchdog timer by WDT (FNC 07) instruction when the scan time of a particular
sequence program is extended or when many special function units/blocks are connected.
For WDT (FNC 07) instruction, refer to Section 8.8.
34
SFCSTL
Programming
FNC300-FNC305
FX3U-CF-ADP
1)
FNC290-FNC299
Extension File
Register Control
37.2.3
32
FNC280-FNC289
High-Speed
Processing 2
1. Example program
FNC277-FNC279
Data
Transfer 3
37.2.2
Version Up
Information
B
Execution Times
865
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
37.2.4
Supply voltage
100V AC system
10 ms
200V AC system
AC power supply
Approx. 5 ms
1 scan time
The allowable momentary power failure time in the FX3U/FX3UC PLCs (DC power supply type) is 5 ms. Do not
overwrite the power failure detection time in device D8008.
DC power supply
Approx. 2 ms
M8000:RUN monitor
M8007:Momentary
power failure
detection
1 scan time
M8008:Power failure
detected
D8008
5ms
37.2.5
37.2.6
866
100ms
100Hz
Caution:
Even while the PLC is in the STOP mode, these clocks are always
oscillating. Therefore, the rising edge of the RUN monitor (M8000)
does not synchronize with the clock start timing.
10Hz
1s
1Hz
1min
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
1. Assignment of special auxiliary relays (M8015 to M8019) and special data registers (D8013 to
D8019)
Number
Name
M8016
When M8016 turns ON, the time display is stopped (but RTC is continued).
M8017
30 seconds correction
At the edge from OFF to ON, the RTC is set to the nearest minute.
(When the second data is from 0 to 29, it is set to 0. When the second data is from 30 to 59,
it is set to 0 and the minute data is incriminated by "1".)
M8018
Installation detection
M8019
When the data stored in special data registers is outside the allowable time, setting range
this device turns ON.
Set value range
Second data
0 to 59
D8014
Minute data
0 to 59
D8015
Hour data
0 to 23
D8016
Day data
1 to 31
D8017
Month data
1 to 12
D8018
Year data
00 to 99
(last two digits of year)
Day-of-the-week data
0 to 6
(which corresponds to
Sunday to Saturday)
D8019
Use these devices for writing the initial value in time setting or
read the present time.
For the real time clock setting method, refer to Subsection 37.2.8.
1)
FNC 12
MOV
K2000
Interrupt
Function
Initial pulse
35
36
When changing the year data to the four-digit mode, add the following program.
D8018 is set to the four-digit year mode on the second ladder scan in RUN mode.
M8002
34
SFCSTL
Programming
Name
D8013
FNC300-FNC305
FX3U-CF-ADP
Number
33
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
M8015
FNC277-FNC279
Data
Transfer 3
37.2.7
D8018
3)
In the four-digit year mode, the values "80" to "99" correspond to "1980" to "1999" and "00" to "79" correspond to
"2000" to "2079".
Examples: 80 = 1980, 99 = 1999, 00 = 2000, 79 = 2079
4)
When connecting the data access unit FX-10DU-E/20DU-E/25DU-E, use the two-digit year mode.
If the four-digit year mode is selected, the year data will not be displayed correctly.
Note that the clock is changed to the 2-digit year mode when the clock is set from the FX-10DU-E/20DU-E/
25DU-E while the PLC is operating in the 4-digit year mode.
38
Error Code
Special Device
2)
37
A
Version Up
Information
B
Execution Times
867
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
37.2.8
2)
3)
Scroll to "ClockMenu" by pressing the [+] or [-] key on the MENU screen, and
press the [OK] key. The selection screen on the right is displayed.
Press the [ESC] key to cancel the operation and return to "TOP screen".
Cu r r e n t
Cu r r e n t
Press the [OK] key, and the "Clock setting" screen on the right is displayed.
Press the [ESC] key to cancel the operation and return to the "selection
screen".
Cl ock
Cl ock
Cl ock
t i me
se t t i ng
t i me
se t t i ng
se t t i ng
19 .
8 . 1993 *
7 : 11 : 19 [ Thu ]
4)
Change the flickering value by pressing the [+] or [-] key, and press the [OK]
key to set the value. The items are set in the order "year month day
hour minute second".
When the last "second" value is decided by pressing the [OK] key, the
message "Current time is set" appears, and setting of the present time is
completed.
Operation
key
Contents of operation
ESC
OK
5)
6)
Cl ock
se t t i ng
31 .
Cu r r e n t
Cl ock
868
1 . 2004 *
23 : 59 : 59 [ Sa t ]
t i me
se t t i ng
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
1)
2)
M0
M0
FNC 12
MOV
K30
D8013
Second data
FNC 12
MOV
K20
D8014
Minute data
FNC 12
MOV
K10
D8015
Hour data
FNC 12
MOV
K25
D8016
Day data
FNC 12
MOV
K4
D8017
Month data
FNC 12
MOV
K0
D8018
Year data
FNC 12
MOV
K2
D8019
Day-of-the-week data
M8017
33
34
FNC300-FNC305
FX3U-CF-ADP
PLF
FNC290-FNC299
Extension File
Register Control
X001
M8015
32
FNC280-FNC289
High-Speed
Processing 2
X000
FNC277-FNC279
Data
Transfer 3
2. Method by program
35
36
Interrupt
Function
a) While M8015 is OFF, the registers for date and time cannot be changed.
Make sure to set M8015 to ON, and then input date and time.
b) When inputting the time, set the time several minutes ahead of the current time.
When the actual time reaches the set time, set M8015 to OFF from ON to make the new time valid and to
begin the real time clock again.
c) If values indicating infeasible date, time and day of the week are input (Example: February 30, 2006), the time
cannot be set. Input the correct date, time and day of the week.
d) The day of the week (D8019) is automatically corrected in accordance with the date without regard to the
written numeric value.
SFCSTL
Programming
Point
37
2)
By using the data register value change function in the device monitor of the programming tool, input the date and
time (several minutes ahead) to each data register.
3)
Special Device
1)
38
Point
Error Code
A
Version Up
Information
a) While M8015 is OFF, the registers for date and time cannot be changed.
Make sure to set M8015 to ON, and then input date and time.
b) When inputting the time, set the time several minutes ahead of the current time.
When the actual time reaches the set time, set M8015 to OFF from ON to make the new time valid and to
begin the real time clock again.
c) If values indicating infeasible date and time are input (Example: February 30, 2006), the time cannot be set.
Input the correct date and time.
B
Execution Times
869
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
37.2.9
Filter
0ms
1ms
1
Determined by the contents of D8020 (initial value: 10)
10ms
10
Input refresh
60
Image
memory
X017*1
60ms
*1.
*2.
0 to 15 in FX3S/FX3G/FX3GC PLCs
1)
FNC 12
MOV
D8020
FX3S PLC
Input number
2)
K0
X000, X001
10s
X002 to X007
50s
X010 to X017
200s
FX3G/FX3GC PLCs
Input number
10
50s
3)
FX3U/FX3UC PLCs
Input number
X000 to X005
5s*3
X006, X007
50s
X010 to
X017*4
200s
*3.
When setting the input filter to "5 s" or when receiving pulses whose response frequency is 50 k to 100 kHz
using high-speed counters, perform the following actions:
- Input wiring length should be 5 m (16' 4") or less.
- Connect a bleeder resistor (1.5 k, 1/2 W) to the input terminal. The load current of the open collector
transistor output in the device on the other end should be 20 mA or more including the input current of the
PLC.
*4.
In the FX3U/FX3UC PLCs (16-point type), only X000 to X007 support the input filter adjustment function.
The input filter constant can be changed as many times as need in the user program.
This input filter adjustment described here is not required when using high-speed counter, input interrupt, or pulse
catch (M8170 to M8177) functions.
870
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
When M8030 is set to ON, the battery LED does not turn ON even if the voltage in the battery for memory backup
becomes low.
When the indication of "battery voltage low error" is not required or when the battery is removed, set M8030 to ON.
When batteryless operation is required in FX3U/FX3UC PLCs, do not use M8030 and refer to "1. Batteryless operation
by parameter setting in peripheral equipment" below.
Specify "batteryless operation" mode in the parameter settings.
1)
2)
2)
The latch (battery backed) devices such as auxiliary relays and data registers are not used for control.
3)
4)
The real time clock function is not used. (only in FX3U/FX3UC PLCs)
35
SFCSTL
Programming
Initial pulse
Auxiliary relay
FNC 40 S500*1
ZRST
S4095
State relay
FNC 40
ZRST
T255
Timer
T246
RUN monitor
M8002
Initial pulse
16 bit counter
32 bit counter
FNC 40 D200*1
ZRST
D7999
Data register
FNC 40
ZRST
R32767
36
37
38
The device number is the default number of the latch (battery backed) device range limits in the parameter
settings.
If the latch (battery backed) device numbers in the parameter settings are changed to other values, change
the device numbers here in accordance with the changed latch ranges.
871
B
Execution Times
Special data registers D8120 (communication format), D8121 (station number setting) and D8129 (timeout check
time) are backed up by the battery in FX3U/FX3UC PLCs.
When performing the batteryless operation in FX3U/FX3UC PLCs, reset these special data registers using the
procedure described above, and then transfer proper set values to them using a program.
The communication conditions can be set in the parameter settings.
When the communication conditions are set in the parameter settings, the PLC transfers the parameter values to the
above special data registers before operation. Thus it is recommended to set the communication conditions via the
parameter settings.
A
Version Up
Information
Error Code
R0
M8000
Special Device
*1.
or
Interrupt
Function
M8002
34
FNC300-FNC305
FX3U-CF-ADP
1)
33
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
37.2.10 Battery [BATT (BAT)] LED and [ALM] LED OFF command [M8030]
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
T10
D8030
FNC 22
MUL
RUN monitor
0 to 25.5 sec
D8031
K2
D0 (D1)
(0 to 51 sec)
X003
T10
D0
The set value range can be changed (up to 32,767)
by multiplying the data register value by "n".
Do not use D1 in other programs.
*1.
M8031*1
(non-latch memory
all clear)
Cleared devices
M8032
(latch memory all
clear)
*1.
Contact image of output relay (Y), general type auxiliary relay (M), and general type state relay (S)
Contact and coil of timer (T)
Contact, counting coil, and reset coil of general type counter (C)
Present value of general type data register (D)
(Except data registers used as file registers)
Present value register of timer (T)
Present value register of general type counter (C)
Extension register for general
Contact image of latch (battery backed) type auxiliary relay (M) and latch (battery backed) type state relay (S)
Contact and coil of retentive type timer (T)
Contact, counting coil, and reset coil of latch (battery backed) type counter and high-speed counter
Present value of latch (battery backed) type data register (D)
Present value of general type data register (D)
(Data registers used as file registers)
Present value register of retentive type timer (T) and 1-ms timer (T)
Present value register of latch (battery backed) type counter and high-speed counter
Latch (battery backed) type extension register (R)
When the optional battery is installed in FX3G/FX3GC PLCs, general type devices which were changed to the
latch (battery backed) type are handled as devices in latch areas.
1. Example program
Command
input
M8033
For example, when a heater is driven by the PLC, the PLC can be stopped while the heater and other equipment are
kept driven, and then the PLC can be started again after program changes.
872
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
When M8034 is turned ON, the output memory is cleared. As a result, all actual output relay contacts are turned OFF
and the PLC is operated in the image memory.
1. Program example
M8034
32
FNC280-FNC289
High-Speed
Processing 2
Command
input
1. Program example
RUN
0V
S/S
M8000
X000
STOP
X001
PLC
35
SFCSTL
Programming
X001
34
FNC300-FNC305
FX3U-CF-ADP
33
FNC290-FNC299
Extension File
Register Control
When using external push button switches to control the PLC's RUN/STOP mode, operate the switches using the
following procedure.
The PLC enters RUN mode by one-shot input of the RUN switch, while one-shot input of the STOP switch drives the
STOP mode.
24V
FNC277-FNC279
Data
Transfer 3
36
Interrupt
Function
2. Setting method
Set up the RUN input switch, (X) (X000 is specified in the circuit diagram example above.)
Make the external RUN/STOP input valid by specifying an input between X000 and X017*1 for the RUN input
signal.
a) Display the parameter setting in the programming tool
In GX Works2, double-click [Parameter] - [PLC parameter] in the project view to display the dialog box.
Go to the [PLC System(1)] tab, and set "RUN Terminal Input".
b) Specify the input (X) number to switch from STOP mode to RUN mode.
3)
4)
5)
For the parameter settings to become valid, the PLC power must be turned from OFF to ON.
37
38
Error Code
2)
Special Device
1)
3. Cautions
When both RUN and STOP switches are pressed at the same time, priority is given to the STOP switch.
2)
When the built-in RUN/STOP switch is turned to RUN, the PLC can be set to RUN mode.
However, when the STOP switch assigned to an arbitrary input is activated, the PLC will enter STOP mode. (Even
if the built-in switch is turned to RUN, priority is given to the STOP command.)
Version Up
Information
1)
B
Execution Times
873
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
2)
3)
Even when the built-in RUN/STOP switch is on the RUN side of the PLC.
The remote STOP command via the programming tool or M8037 (forced STOP signal) are valid.
1. Example program
M8000
M8039 Constant scan mode
RUN
monitor
FNC 12
MOVP
K20
D8039
2. Cautions
1)
2)
874
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
When the analog expansion board is connected, operations and functions are assigned to devices shown in the table
below in accordance with the connection position.
Operations and functions in the table below are shaded for write-prohibited devices.
For details, refer to the Analog Control Edition.
FX3S/FX3G PLCs
Operation and function
Number
Applicable
version
FX3G-2AD-BD
Ver. 1.10 or
later*1
FX3G-1DA-BD
33
Not used
M 8262
Not used
Not used
M 8263
Not used
Not used
M 8264
Not used
M 8265
Not used
Not used
M 8266
Not used
Not used
M 8267
Not used
Not used
M 8268
Not used
Not used
M 8269
Not used
34
Not used
FNC300-FNC305
FX3U-CF-ADP
M 8261
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
35
board*2
Output mode switching
M 8271
Not used
M 8272
Not used
Not used
M 8273
Not used
Not used
M 8274
Not used
M 8275
Not used
Not used
M 8276
Not used
Not used
M 8277
Not used
Not used
M 8278
Not used
Not used
M 8279
Not used
Not used
*1.
*2.
36
Interrupt
Function
SFCSTL
Programming
M 8270
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
875
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Number
Applicable
version
FX3G-2AD-BD
FX3G-1DA-BD
Output data
D 8261
Not used
D 8262
Not used
Not used
D 8263
Not used
Not used
D 8264
D 8265
D 8266
Not used
D 8267
Not used
Not used
D 8268
Error status
Error status
D 8269
Model code: K3
Model code: K4
Not used
876
D 8270
Output data
D 8271
Not used
D 8272
Not used
Not used
D 8273
Not used
Not used
D 8274
D 8275
D 8276
Not used
D 8277
Not used
Not used
D 8278
Error status
Error status
D 8279
Model code: K3
Model code: K4
Not used
*1.
*2.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
When analog special adapters are connected, operations and functions are assigned to the devices shown in the
tables below in accordance with the number of connected analog special adapters.
Devices which cannot be written to are shaded in the "Operation and function" column.
For details, refer to the Analog Control Edition.
FX3U/FX3UC PLC
Number
Applicable
version
later*1
FX3U-4DA-ADP
Ver. 1.20 or
FX3U-3A-ADP
later*1
32
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
33
M 8260
M 8261
M 8262
M 8263
Not used
M 8264
Not used
Not used
M 8265
Not used
Not used
M 8266
Not used
M 8267
Not used
M 8268
Not used
Not used
M 8269
Not used
Not used
FNC300-FNC305
FX3U-CF-ADP
FNC290-FNC299
Extension File
Register Control
35
34
M 8272
M 8273
Not used
M 8274
Not used
Not used
M 8275
Not used
Not used
M 8276
Not used
M 8277
Not used
M 8278
Not used
Not used
M 8279
Not used
Not used
36
Interrupt
Function
M 8271
SFCSTL
Programming
M 8270
M 8282
M 8283
Not used
M 8284
Not used
Not used
M 8285
Not used
Not used
M 8286
Not used
M 8287
Not used
M 8288
Not used
Not used
M 8289
Not used
Not used
37
38
Error Code
M 8281
Special Device
M 8280
M 8291
M 8292
M 8293
Not used
M 8294
Not used
Not used
M 8295
Not used
Not used
M 8296
Not used
M 8297
Not used
M 8298
Not used
Not used
M 8299
Not used
Not used
Execution Times
*1.
A
Version Up
Information
M 8290
877
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Number
Applicable
version
later*1
FX3U-4AD-TC-ADP
Ver. 1.30 or
later*1
FX3U-4AD-PNK-ADP
Ver. 1.30 or later*1
M 8261
Not used
Type-K/-J switching
M 8262
Not used
Not used
Not used
M 8263
Not used
Not used
Not used
M 8264
Not used
Not used
Not used
M 8265
Not used
Not used
Not used
M 8266
Not used
Not used
Not used
M 8267
Not used
Not used
Not used
M 8268
Not used
Not used
Not used
M 8269
Not used
Not used
Not used
M 8271
Not used
Type-K/-J switching
M 8272
Not used
Not used
Not used
M 8273
Not used
Not used
Not used
M 8274
Not used
Not used
Not used
M 8275
Not used
Not used
Not used
M 8276
Not used
Not used
Not used
M 8277
Not used
Not used
Not used
M 8278
Not used
Not used
Not used
M 8279
Not used
Not used
Not used
M 8281
Not used
Type-K/-J switching
M 8282
Not used
Not used
Not used
M 8283
Not used
Not used
Not used
M 8284
Not used
Not used
Not used
M 8285
Not used
Not used
Not used
M 8286
Not used
Not used
Not used
M 8287
Not used
Not used
Not used
M 8288
Not used
Not used
Not used
M 8289
Not used
Not used
Not used
M 8291
Not used
Type-K/-J switching
M 8292
Not used
Not used
Not used
M 8293
Not used
Not used
Not used
M 8294
Not used
Not used
Not used
M 8295
Not used
Not used
Not used
M 8296
Not used
Not used
Not used
M 8297
Not used
Not used
Not used
M 8298
Not used
Not used
Not used
M 8299
Not used
Not used
Not used
*1.
878
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
FX3S/FX3G/FX3GC PLCs
Operation and function
Number
Applicable
version
FX3U-4AD-ADP
FX3U-4DA-ADP
FX3U-3A-ADP
32
M 8281
M 8282
M 8283
Not used
M 8284
Not used
Not used
M 8285
Not used
Not used
M 8286
Not used
M 8287
Not used
M 8288
Not used
Not used
M 8289
Not used
Not used
adapter*2
Output mode switching Ch1
M 8292
M 8293
Not used
M 8294
Not used
Not used
M 8295
Not used
Not used
M 8296
Not used
M 8297
Not used
M 8298
Not used
Not used
M 8299
Not used
Not used
35
FX3U-4AD-TC-ADP
FX3U-4AD-PNK-ADP
36
Interrupt
Function
Applicable
version
34
SFCSTL
Programming
M 8291
FNC300-FNC305
FX3U-CF-ADP
M 8290
Number
33
FNC290-FNC299
Extension File
Register Control
FNC280-FNC289
High-Speed
Processing 2
M 8280
M 8281
Not used
Type-K/-J switching
M 8282
Not used
Not used
Not used
M 8283
Not used
Not used
Not used
M 8284
Not used
Not used
Not used
M 8285
Not used
Not used
Not used
M 8286
Not used
Not used
Not used
M 8287
Not used
Not used
Not used
M 8288
Not used
Not used
Not used
M 8289
Not used
Not used
Not used
38
adapter*2
M 8291
Not used
Type-K/-J switching
M 8292
Not used
Not used
Not used
M 8293
Not used
Not used
Not used
M 8294
Not used
Not used
Not used
M 8295
Not used
Not used
Not used
M 8296
Not used
Not used
Not used
M 8297
Not used
Not used
Not used
M 8298
Not used
Not used
Not used
M 8299
Not used
Not used
Not used
*2.
Can be connected only to FX3G PLC (40-point and 60-point type) and FX3GC PLC.
B
Execution Times
*1.
A
Version Up
Information
M 8290
Error Code
37
Special Device
M 8280
879
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FX3U-4AD-ADP
Applicable
Ver. 1.20 or later*1
version
1st analog special adapter
D 8260
Input data Ch1
D 8261
Input data Ch2
D 8262
Input data Ch3
D 8263
Input data Ch4
Number of averaging times
D 8264
for Ch1 (1 to 4095)
Number of averaging times
D 8265
for Ch2 (1 to 4095)
Number of averaging times
D 8266
for Ch3 (1 to 4095)
Number of averaging times
D 8267
for Ch4 (1 to 4095)
D 8268
Error status
D 8269
Model code: K1
2nd analog special adapter
D 8270
Input data Ch1
D 8271
Input data Ch2
D 8272
Input data Ch3
D 8273
Input data Ch4
Number of averaging times
D 8274
for Ch1 (1 to 4095)
Number of averaging times
D 8275
for Ch2 (1 to 4095)
Number of averaging times
D 8276
for Ch3 (1 to 4095)
Number of averaging times
D 8277
for Ch4 (1 to 4095)
D 8278
Error status
D 8279
Model code: K1
3rd analog special adapter
D 8280
Input data Ch1
D 8281
Input data Ch2
D 8282
Input data Ch3
D 8283
Input data Ch4
Number of averaging times
D 8284
for Ch1 (1 to 4095)
Number of averaging times
D 8285
for Ch2 (1 to 4095)
Number of averaging times
D 8286
for Ch3 (1 to 4095)
Number of averaging times
D 8287
for Ch4 (1 to 4095)
D 8288
Error status
D 8289
Model code: K1
4th analog special adapter
D 8290
Input data Ch1
D 8291
Input data Ch2
D 8292
Input data Ch3
D 8293
Input data Ch4
Number of averaging times
D 8294
for Ch1 (1 to 4095)
Number of averaging times
D 8295
for Ch2 (1 to 4095)
Number of averaging times
D 8296
for Ch3 (1 to 4095)
Number of averaging times
D 8297
for Ch4 (1 to 4095)
D 8298
Error status
Model code: K1
D 8299
*1.
880
FX3U-3A-ADP
Not used
Not used
Not used
Not used
Error status
Model code: K2
Error status
Model code: K50
Not used
Not used
Not used
Not used
Not used
Not used
Error status
Model code: K2
Error status
Model code: K50
Not used
Not used
Not used
Not used
Not used
Not used
Error status
Model code: K2
Error status
Model code: K50
Not used
Not used
Not used
Not used
Not used
Not used
Error status
Model code: K2
Error status
Model code: K50
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FX3U-4AD-PT(W)-ADP
*2.
The model code is "20" for the PT-ADP, and "21" for the PTW-ADP.
35
36
37
38
B
Execution Times
*1.
34
Version Up
Information
33
Error Code
32
Special Device
Interrupt
Function
D 8299
SFCSTL
Programming
D 8289
Model code: K20, K21*2
4th analog special adapter
D 8290
Measured temperature Ch1
D 8291
Measured temperature Ch2
D 8292
Measured temperature Ch3
D 8293
Measured temperature Ch4
Number of averaging times
D 8294
for Ch1 (1 to 4095)
Number of averaging times
D 8295
for Ch2 (1 to 4095)
Number of averaging times
D 8296
for Ch3 (1 to 4095)
Number of averaging times
D 8297
for Ch4 (1 to 4095)
D 8298
Error status
FNC300-FNC305
FX3U-CF-ADP
FX3U-4AD-PNK-ADP
FNC290-FNC299
Extension File
Register Control
Ver. 1.30 or
later*1
FNC280-FNC289
High-Speed
Processing 2
Applicable
Ver. 1.30 or later*1
version
1st analog special adapter
D 8260
Measured temperature Ch1
D 8261
Measured temperature Ch2
D 8262
Measured temperature Ch3
D 8263
Measured temperature Ch4
Number of averaging times
D 8264
for Ch1 (1 to 4095)
Number of averaging times
D 8265
for Ch2 (1 to 4095)
Number of averaging times
D 8266
for Ch3 (1 to 4095)
Number of averaging times
D 8267
for Ch4 (1 to 4095)
D 8268
Error status
FNC277-FNC279
Data
Transfer 3
Number
881
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FX3S/FX3G/FX3GC PLCs
Number
Applicable
version
FX3U-4DA-ADP
FX3U-3A-ADP
D 8281
D 8282
Output data
D 8283
Not used
D 8284
D 8285
D 8286
Not used
D 8287
Not used
D 8288
Error status
Error status
Error status
D 8289
Model code: K1
Model code: K2
882
D 8290
D 8291
D 8292
Output data
D 8293
Not used
D 8294
D 8295
D 8296
Not used
D 8297
Not used
D 8298
Error status
Error status
Error status
D 8299
Model code: K1
Model code: K2
*1.
*2.
Can be connected only to FX3G PLC (40-point and 60-point type) and FX3GC PLC.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
Number
FX3U-4AD-TC-ADP
FX3U-4AD-PNK-ADP
Applicable
version
D 8282
D 8283
D 8284
Number of averaging times Number of averaging times Number of averaging times for
for Ch1 (1 to 4095)
for Ch1 (1 to 4095)
Ch1 (1 to 4095)
D 8285
Number of averaging times Number of averaging times Number of averaging times for
for Ch2 (1 to 4095)
for Ch2 (1 to 4095)
Ch2 (1 to 4095)
33
D 8286
Number of averaging times Number of averaging times Number of averaging times for
for Ch3 (1 to 4095)
for Ch3 (1 to 4095)
Ch3 (1 to 4095)
D 8287
Number of averaging times Number of averaging times Number of averaging times for
for Ch4 (1 to 4095)
for Ch4 (1 to 4095)
Ch4 (1 to 4095)
D 8288
Error status
Error status
Error status
D 8289
34
adapter*1
Measured temperature Ch1
D 8292
D 8293
D 8294
Number of averaging times Number of averaging times Number of averaging times for
for Ch1 (1 to 4095)
for Ch1 (1 to 4095)
Ch1 (1 to 4095)
D 8295
Number of averaging times Number of averaging times Number of averaging times for
for Ch2 (1 to 4095)
for Ch2 (1 to 4095)
Ch2 (1 to 4095)
D 8296
Number of averaging times Number of averaging times Number of averaging times for
for Ch3 (1 to 4095)
for Ch3 (1 to 4095)
Ch3 (1 to 4095)
D 8297
Number of averaging times Number of averaging times Number of averaging times for
for Ch4 (1 to 4095)
for Ch4 (1 to 4095)
Ch4 (1 to 4095)
D 8298
Error status
Error status
Error status
D 8299
*1.
Can be connected only to FX3G PLC (40-point and 60-point type) and FX3GC PLC.
*2.
The model code is "20" for the PT-ADP, and "21" for the PTW-ADP.
35
36
Interrupt
Function
D 8291
SFCSTL
Programming
D 8290
FNC300-FNC305
FX3U-CF-ADP
FNC280-FNC289
High-Speed
Processing 2
D 8281
FNC290-FNC299
Extension File
Register Control
32
D 8280
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
883
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
38.1
FX3S PLC
FX3GC PLC
POWER
POWER
RUN
RUN
ERROR
ERROR
(Green)
(Green)
(Green)
(Green)
(Red)
(Red)
ALM
(Red)
FX3G PLC
POWER
(Green)
RUN
POWER
ERROR
RUN
ALM
BATT
(Green)
(Green)
(Green)
(Red)
(Red)
(Red)
ERROR
(Red)
FX3U PLC
FX3UC-32MT-LT(-2) PLC
POWER
POWER
(Green)
RUN
(Green)
BATT
(Red)
ERROR
(Red)
(Green)
RUN
(Green)
BATT
(Red)
ERROR
(Red)
L. RUN
(Green)
L. ERR
(Red)
884
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
LED status
Lit
Unlit
Action
The PLC operation status is indicated.
This LED is not lit depending on the ERROR (ERR) LED status.
(Refer to Subsection 38.1.4.)
Unlit
35
Action
Replace the battery as soon as possible.
(Refer to FX3U/FX3UC Hardware edition.)
36
Lit
Unlit
PLC status
The battery voltage is low.
Interrupt
Function
This LED is valid when the optional battery is installed and the battery mode is selected using a parameter.
LED status
34
SFCSTL
Programming
Lit
PLC status
33
FNC300-FNC305
FX3U-CF-ADP
Unlit
PLC status
Sequence program is executing.
32
FNC290-FNC299
Extension File
Register Control
Lit
38.1.4
Action
38.1.3
PLC status
The voltage is correctly supplied to the power
The power supply is normal.
terminal.
FNC280-FNC289
High-Speed
Processing 2
Flickering
38.1.2
31
FNC277-FNC279
Data
Transfer 3
38.1.1
Action
Replace the battery as soon as possible.
(Refer to FX3G/FX3GC Hardware edition.)
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
885
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
38.1.5
PLC status
Lit
Flickering
LED status
Lit
Unlit
Lit
Unlit
Lit
TEST
Unlit
*1.
886
Action
1) Change the PLC mode to STOP, and turn ON the PLC power
again.
When the ERROR (ERR) LED is off, a watchdog timer error
occurred. Take one of the following actions:
- Review the program, and make sure that the maximum
value (D8012) of the scan time is not larger than the set
value (D8000) of the watchdog timer.
- Make sure that an input used for input interrupt or pulse
catch does not abnormally turn ON and OFF several times
in one scan time.
- Make sure that the frequency of the pulse (duty: 50%) input
to a high-speed counter is within the specifications range.
- Adding a WDT instruction
Use two or more WDT instructions in a program so that the
watchdog timer is reset several times in one scan time.
- Change the set value of the watchdog timer
Change the set value (D8000) of the watchdog timer in a
program so that it is larger than the maximum value (D8012)
of the scan time.
2) Remove the PLC, and connect another power supply to the
PLC.
If the ERROR (ERR) LED is off, the cause of the error may be
noise. Examine the following action:
- Check the wiring for grounding, and then review the wiring
route and installation location.
- Add a noise filter in the power line.
3) If the ERROR (ERR) LED is not off even after the step 1) or 2),
consult a Mitsubishi Electric representative.
Unlit
38.1.6
PLC status
Action
FX3UC-32MT-LT only.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
LED status
PLC status
Lit
Action
Securely connect the built-in master to remote I/O units and
remote device stations on the network.
Make sure that the connected remote I/O units and remote device
stations are consistent with the detailed information on remote
stations.
ONLINE
Flickering
Lit
CONFIG*1
Unlit
Lit
Unlit
*1.
33
34
35
SFCSTL
Programming
TEST
FNC300-FNC305
FX3U-CF-ADP
Flickering
FNC290-FNC299
Extension File
Register Control
Unlit
32
FNC280-FNC289
High-Speed
Processing 2
Unit disconnected
Outside-control-range station
error
FNC277-FNC279
Data
Transfer 3
38.1.7
FX3UC-32MT-LT only.
For details, refer to the Hardware Edition of the PLC main unit.
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
887
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
38.2
38.2.1
The error code can be checked by programming tool and display module.
This subsection explains how to set the real time clock in the display module FX3U-7DM (built in the FX3UC-32MT-LT
(-2)).
Refer to the following manual for the display module FX3G-5DM.
FX3G Series Users Manual - Hardware Edition
Error code check method by display module
1)
Scroll to "ErrorCheck" by pressing [+] or [-] key on "MENU screen" (shown on the right figure).
For the menu system, refer to FX3U/FX3UC Hardware Edition.
On this menu screen, the operation keys are as shown below:
Monitor/Test
Operation
key
Contents of operation
ErrorCheck
LANGUAGE
Contrast
EntryCode
PLC status
ESC
OK
ClockMenu
ClearAllDev
ScanTime
Cassette
CC-Link/LT *1
*1. Displayed in the FX3UC-32MT-LT-2.
2)
3)
Pressing [OK] key executes the error check and displays the
result on "error display screen" (shown in the right figure).
Press [ESC] key to cancel the operation and return to "Top
screen".
If two or more errors occur, press [+] or [-] key to changeover the
page.
Operation
key
ESC
-
+
OK
Contents of operation
Is invalid.
ErrorCheck
error
Is invalid.
[1]
Ladder error
[3]
Error code
ErrorCheck
Displayed contents
888
[1]
1 / 2
Error flag
[2]
I/O error
[2]
Error name
[3]
Error code
[3]
Error code
[4]
ErrorCheck
[1]
[4]
M8 0 6 0
[1]
6612
Displayed contents
4)
M8 0 6 6
[2]
1020
+
2 / 2
M8 0 6 3
[2]
Link error1
[3]
Error code
6301
[4]
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
31
32
FNC280-FNC289
High-Speed
Processing 2
1
2
FNC277-FNC279
Data
Transfer 3
38.2.2
Click [Diagnostics][PLC Diagnostics] on the menu bar, and execute the PLC diagnostics.
33
FNC290-FNC299
Extension File
Register Control
34
FNC300-FNC305
FX3U-CF-ADP
35
SFCSTL
Programming
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
889
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
38.2.3
Error indication
The table below shows the error expression in this manual, GX Works2, GX Developer, and display modules (FX3U7DM).
GX Works2
This manual
SWDNC-GXW2-E
SWDNC-GXW2-J
Parameter Error
Syntax error
Syntax Error
Circuit error
Ladder Error
Operation error
Operation Error
This manual
SWD5C-GPPW-E
SWD5C-GPPW-J
Param error
Syntax error
Syntax error
Circuit error
Ladder error
Operation error
Operation err
SFB Error
This manual
Display in English
I/O error
Comms. error
Display in Japan
Parameter error
Syntax error
Grammer error
Circuit error
Ladder error
Operation error
Runtime error
890
SFB error
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
38.3.1
FNC277-FNC279
Data
Transfer 3
38.3
31
M8060,M8061,M8064 to M8067 are cleared when the PLC mode switches from STOP to RUN.
Note that M8068 and D8068 do not clear.
2)
When turning M8069 ON in advance, PLC will enter STOP mode (as M8061 PLC hardware error occurs) if a
failure occurs in an I/O extension unit, an extension power supply module, or an extension unit/block.
When turning M8069 ON, PLC executes I/O bus check. If an error is found, error code 6103 or 6104 is stored to
D8061, and M8061 turns ON.
When error code 6104 is stored, M8009 turns ON, and the PLC stores the I/O numbers following the extension
power supply module or the powered extension unit with DC 24V output failure to D8009.
3)
If the unit or block corresponding to a programmed I/O number is not actually loaded, M8060 is set to ON and the
first device number of the erroneous block is written to D8060.
34
FNC300-FNC305
FX3U-CF-ADP
1 0 2 0
Device number *1
1: Input (X), 0: Output (Y)
*1.
4)
33
FNC290-FNC299
Extension File
Register Control
1)
32
FNC280-FNC289
High-Speed
Processing 2
When the M8060, M8061, M8064 to M8067 turn ON, the smallest ON device number is stored in D8004, and M8004
turns ON.
35
SFCSTL
Programming
When a device number is specified directly or indirectly with an index by the LD, AND, OR or OUT instruction, and
if the device numbers specified in those instructions are not actually loaded, M8316 will turn ON and the error step
number in the instruction will be written to D8317 (high-order bits) and D8316 (low-order bits).
36
Interrupt
Function
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
891
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
38.3.2
M8069
I/O
bus check
D8009
D8060
D8061
D8062
D8063
D8438
D8064
D8065
D8066
D8067
D8004
Special M number
(smallest device
number) of error
occurrence
M8004
ON when an error
occurs
After clearing errors, forcibly clear M8068 using the device monitor function in a programming tool.
M8316
D8487
D8449
D8489
38.3.3
M8318
Unconnected I/O
designation error
BFM initialization failure
M8487
M8449
M8489
D8319
Other timing
Unlit
RUN/STOP is Continued
Check
Check
Lit
Forced STOP
Check
Always
Unlit
RUN/STOP is Continued
Unlit
RUN/STOP is Continued
Unlit
RUN/STOP is Continued
Flickering
STOP is Continued
Flickering
STOP is Continued
Flickering
STOP is Continued
Unlit
RUN is Continued
Unlit
RUN is Continued
Check
Check
RUN mode
Unlit
RUN/STOP is Continued
Always
Unlit
RUN is Continued
RUN mode
Unlit
RUN is Continued
Check
Unlit
RUN/STOP is Continued
Always
Unlit
RUN/STOP is Continued
Unlit
STOP is Continued
Check
Unlit
RUN/STOP is Continued
Always
892
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Contents of error
Action
Device number
Continues
operation
33
34
FNC300-FNC305
FX3U-CF-ADP
No error
Parity, overrun or framing error
3802
3803
3804
3805
Command error
3806
3807
3808
3809
3813
3814
3820
3821
3840
Stops
operation
6102
38
A
Version Up
Information
37
Error Code
6101
No error
36
Special Device
3830
35
Interrupt
Function
3812
SFCSTL
Programming
3801
FNC290-FNC299
Extension File
Register Control
Example:
1020
32
FNC280-FNC289
High-Speed
Processing 2
Error
code
FNC277-FNC279
Data
Transfer 3
38.4
B
Execution Times
893
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Error
code
PLC operation at
error occurrence
Contents of error
Action
6104
6105
6106
6112
6113
6114
CC-Link/LT settings cannot be written to the built-in CCLink/LT special function block.
6115
6107
Stops
operation
No error
6201
6202
6203
6204
6205
6230
894
Command error
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
PLC operation at
error occurrence
Contents of error
FNC277-FNC279
Data
Transfer 3
Error
code
Action
No error
Parity, overrun or framing error
6302
6303
6304
6306
6307
6308
6309
6312
6313
Continues
operation
6314
6320
6321
6340
6402
6403
6405
6406
6407
6409
6412
Stops
operation
6413
6420
37
38
Error Code
6421
36
Special Device
Interrupt
Function
6404
SFCSTL
Programming
6411
35
No error
6401
34
FNC300-FNC305
FX3U-CF-ADP
6330
33
FNC290-FNC299
Extension File
Register Control
6305
32
FNC280-FNC289
High-Speed
Processing 2
6301
A
Version Up
Information
B
Execution Times
895
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Error
code
PLC operation at
error occurrence
Contents of error
Action
No error
Incorrect combination of instruction, device symbol and
device number
6501
6502
6503
6504
Stops
operation
6505
6506
Invalid instruction
6507
6508
6509
Other error
6510
No error
6610
6611
6612
6613
6614
No MPS instruction
6615
No MPP instruction
6616
6617
6618
6619
6620
6621
Stops
operation
6622
No NEXT instruction
6623
No MC instruction
6624
No MCR instruction
6625
6626
6627
No STL instruction
6628
6629
No P or I (interrupt pointer)
6630
6631
6632
896
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
31
PLC operation at
error occurrence
Contents of error
FNC277-FNC279
Data
Transfer 3
Error
code
Action
No error
6701
6703
6704
6705
6706
6707
6730
6732
6733
Continues
operation
6735
6736
6740
6742
6743
6744
6745
37
6747
A
Version Up
Information
6746
38
Error Code
Special Device
6734
36
Interrupt
Function
6710
6709
35
SFCSTL
Programming
6708
34
FNC300-FNC305
FX3U-CF-ADP
33
FNC290-FNC299
Extension File
Register Control
6702
32
FNC280-FNC289
High-Speed
Processing 2
B
Execution Times
897
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
Error
code
PLC operation at
error occurrence
Contents of error
Action
6749
6752
6753
6750
6751
Continues
operation
6754
6755
6757
6758
6759
6760
6756
898
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
PLC operation at
error occurrence
Contents of error
Action
6762
2)
6770
6771
6772
6773
Continues
operation
8704
8705
Continues
operation
8730
Command error
020*1
021*1
022*1
025*1
026*1
FROM/TO error
090*1
B
Execution Times
*1.
A
Version Up
Information
080*1
Error Code
37
38
When the memory cassette is used, check whether it is
mounted correctly.
If the problem persists or if the memory cassette is not
used, something may be malfunctioning inside the PLC.
Consult your local Mitsubishi Electric representative.
030*1
36
Special Device
35
Interrupt
Function
8702
8703
34
SFCSTL
Programming
6765
FNC300-FNC305
FX3U-CF-ADP
6764
33
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
1)
6763
FNC277-FNC279
Data
Transfer 3
Error
code
899
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Error
code
PLC operation at
error occurrence
Contents of error
Action
Turn OFF the power, and check the power supply and
connection of special adapters/special blocks.
03*1
04*1
01*1
02*1
Continues
operation
*1.
"
" indicates the following values for each special adapter/special block where an error has occurred.
If an error has occurred in 2 or more special adapters/special blocks, "
" indicates the lowest unit number
among the special adapters/special blocks in which an error has occurred.
Value of
Error
bit
(decimal)
00
10
20
30
40
50
60
70
81
82
PLC operation at
error occurrence
Contents of error
Action
b1
b2
b3
b4
Continues
operation
b5
b6
b7
b8 to
b15
900
Not available
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
33
GX Works2
GX Works2 English version (SWDNC-GXW2-E) is applicable to FX3S/FX3G/FX3GC/FX3U/FX3UC PLCs from the
following versions.
Model name
FX3G PLC
FX3GC PLC
Ver. 2.00
Ver. 2.00
Ver. 3.10
Ver. 3.10
35
36
-
FX3S PLC
FX3G PLC
FX3U PLC
Ver. 1.00
Ver. 2.00
Ver. 2.00
Ver. 3.10
Ver. 3.10
37
38
A
Version Up
Information
FX3UC PLC
Remarks
Error Code
FX3GC PLC
Applicable GX Works2
version
PLC version
Special Device
Model name
34
Interrupt
Function
FX3UC PLC
Remarks
SFCSTL
Programming
FX3U PLC
Ver. 1.00
Applicable GX Works2
version
FNC300-FNC305
FX3U-CF-ADP
FX3S PLC
PLC version
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
FNC277-FNC279
Data
Transfer 3
B
Execution Times
901
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
GX Developer
GX Developer English version (SWD5C-GPPW-E) is applicable to FX3G/FX3U/FX3UC PLCs from the following
versions.
Model name
FX3G PLC
FX3U PLC
FX3UC PLC
PLC version
Applicable GX Developer
version
Ver. 1.10
Ver. 2.61
Ver. 2.61
Remarks
FX3U PLC
FX3UC PLC
3)
PLC version
Applicable GX Developer
version
Ver. 1.10
Ver. 2.61
Ver. 2.61
Remarks
FX-30P
FX-30P is applicable to FX3S/FX3G/FX3GC/FX3U/FX3UC PLCs starting with the following version:
Model name
FX3S PLC
PLC version
Ver. 1.00
Remarks
FX3G PLC
Ver. 1.00
FX3GC PLC
Ver. 1.40
Ver. 2.70
Ver. 2.70
FX3U PLC
FX3UC PLC
902
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Even using a programming tool not applicable to the FX3S/FX3G/FX3GC/FX3U/FX3UC PLCs, programming is enabled
when an alternative model is set.
Model to be set
FX3S
FX3G
FX1N*2
FX3G PLC
FX3G
FX1N*4
FX2N*2
FX2
FX3GC
FX3G
FX1N*2
FX2N*2
FX3U PLC
FX3U(C)*1
FX3UC
FX2N
FX2
FX3UC PLC
FX3U(C)*1
FX3UC
FX2N
FX2
FX3GC PLC
Contents of restrictions
Programming is enabled only in the function ranges such as instruction/device range and program size
available in both the PLC model to be programmed and the alternative PLC model.
Use a programming tool which can select FX3S, FX3G, FX3GC, FX3U or FX3UC when changing the
parameters such as memory capacity and file register capacity.
Use a programming tool which can select FX3G when executing communication using the standard (USB)
built-in port of the FX3S/FX3G/FX3GC PLCs.
In FX3S/FX3G/FX3GC PLCs
1)
2)
RS-422/RS-232C communication
The FX3S/FX3G/FX3GC PLCs can write and read programs and perform monitoring at 115.2 kbps through RS-422/
RS-232C communication.
36
37
Special Device
38
Error Code
*3.
35
Interrupt
Function
34
SFCSTL
Programming
33
FNC300-FNC305
FX3U-CF-ADP
In the FX3S PLC, memory capacity setting of the PLC parameter must be set to 4,000 steps or less.
32
FNC290-FNC299
Extension File
Register Control
*1.
*2.
FX2N*2
FNC280-FNC289
High-Speed
Processing 2
FX3S PLC
FNC277-FNC279
Data
Transfer 3
A
Version Up
Information
B
Execution Times
903
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
In FX3U/FX3UC PLCs
1)
RS-422/RS-232C/USB communication
The FX3U/FX3UC PLCs can write and read programs and perform monitoring at 115.2 kbps through RS-422/RS232C/USB communication.
a) 115.2 kbps supported programming tools
GX Works2 (Ver. 1.08J or later), GX Developer (Ver. 8.18U or later), FX-30P (Ver. 1.00 or later)
b) 115.2 kbps supported interfaces
- Standard built-in port or expansion board FX3U-422-BD for RS-422
When the RS-232C/RS-422 converter FX-232AWC-H or USB/RS-422 converter FX-USB-AW is
connected.
- Expansion board FX3U-232-BD for RS-232C
- Special adapter FX3U-232ADP(-MB) for RS-232C
- Expansion board FX3U-USB-BD for USB
c) In programming tools not supporting 115.2 kbps
Communication is executed at 9,600 or 19,200 bps.
Appendix A-1-2
"In the FX3S, FX3G, FX3GC, FX3U and FX3UC PLCs, writing is enabled during RUN (program changes during RUN
mode) using the following programming tools".
For the operating procedure of and cautions on writing during RUN,
refer to the respective programming tool manual.
PLC
FX3S
GX Works2*1
(SWDNC-GXW2-E)
Version
Remarks
Writing in the instruction and device ranges during RUN is supported in FX3S
PLC earlier than Ver. 1.00.
Writing in the instruction and device ranges during RUN is supported in FX3G
PLC earlier than Ver. 1.40.
Writing in the instruction and device ranges during RUN is supported in FX3G
and FX3GC PLCs earlier than Ver. 1.40.
Writing in the instruction and device ranges during RUN is supported in FX3U and
FX3UC PLCs earlier than Ver. 2.70.
Writing in the instruction and device ranges during RUN is supported in FX3U and
FX3UC PLCs Ver. 2.70.
Writing in the instruction and device ranges during RUN is supported in FX2N
PLC Ver. 1.00.
Writing in the instruction and device ranges during RUN is supported in FX1N
PLC Ver. 1.00.
Writing in the instruction and device ranges during RUN is supported in FX3G
PLC earlier than Ver. 1.10.
Writing in the instruction and device ranges during RUN is supported in FX3G
PLC Ver. 1.10.
Writing in the instruction and device ranges during RUN is supported in FX2N
PLC Ver. 3.00.
Writing in the instruction and device ranges during RUN is supported in FX3UC
PLC earlier than Ver. 2.20.
Writing in the instruction and device ranges during RUN is supported in FX3U and
FX3UC PLCs earlier than Ver. 2.30.
Writing in the instruction and device ranges during RUN is supported in FX3U and
FX3UC PLCs earlier than Ver. 2.61.
Writing in the instruction and device ranges during RUN is supported in FX3U and
FX3UC PLCs Ver. 2.61.
Writing in the instruction and device ranges during RUN is supported in FX1N
PLC Ver. 1.00.
Writing in the instruction and device ranges during RUN is supported in FX2N
PLC Ver. 1.00.
Writing in the instruction and device ranges during RUN is supported in FX2N
PLC Ver. 3.00.
FX3G/FX3GC
FX3U/FX3UC
FX3G
GX Developer*2
(SWD5C-GPPW-E)
FX3U/FX3UC
FX3G
FX-PCS/WIN-E*2
FX3U/FX3UC
904
*1.
*2.
Write during RUN is not possible with a list program or a SFC program.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
PLC
FX3S
Remarks
Writing in the instruction and device ranges during RUN is supported in FX3S
PLC earlier than Ver. 1.00.
Writing in the instruction and device ranges during RUN is supported in FX3G
PLC earlier than Ver. 1.40.
Writing in the instruction and device ranges during RUN is supported in FX3G
and FX3GC PLCs earlier than Ver. 1.40.
Writing in the instruction and device ranges during RUN is supported in FX3U and
FX3UC PLCs earlier than Ver. 2.70.
Writing in the instruction and device ranges during RUN is supported in FX3U and
FX3UC PLCs Ver. 2.70.
Writing in the instruction and device ranges during RUN is supported in FX2N
PLC Ver. 1.00.
33
Writing in the instruction and device ranges during RUN is supported in FX1N
PLC Ver. 1.00.
Writing in the instruction and device ranges during RUN is supported in FX3G
PLC earlier than Ver. 1.10.
Writing in the instruction and device ranges during RUN is supported in FX3G
PLC Ver. 1.10.
Writing in the instruction and device ranges during RUN is supported in FX2N
PLC Ver. 3.00.
Writing in the instruction and device ranges during RUN is supported in FX3UC
PLC earlier than Ver. 1.30.
Writing in the instruction and device ranges during RUN is supported in FX3UC
PLC earlier than Ver. 2.20.
Writing in the instruction and device ranges during RUN is supported in FX3U and
FX3UC PLCs earlier than Ver. 2.30.
Writing in the instruction and device ranges during RUN is supported in FX3U and
FX3UC PLCs earlier than Ver. 2.61.
Writing in the instruction and device ranges during RUN is supported in FX3U and
FX3UC PLCs Ver. 2.61.
Writing in the instruction and device ranges during RUN is supported in FX1N
PLC Ver. 1.00.
Writing in the instruction and device ranges during RUN is supported in FX2 PLC
Ver. 3.30.
Writing in the instruction and device ranges during RUN is supported in FX2N
PLC Ver. 1.00.
Writing in the instruction and device ranges during RUN is supported in FX2N
PLC Ver. 3.00.
FX3G/FX3GC
FX3U/FX3UC
FX3G
FX3U/FX3UC
FX3U/FX3UC
37
Special Device
*1.
*2.
36
Interrupt
Function
FX-PCS/WIN*2
35
SFCSTL
Programming
FX3G
34
FNC300-FNC305
FX3U-CF-ADP
GX Developer*2
(SWD5C-GPPW-J)
32
FNC280-FNC289
High-Speed
Processing 2
GX Works2*1
(SWDNC-GXW2-J)
Version
FNC290-FNC299
Extension File
Register Control
Programming tool
FNC277-FNC279
Data
Transfer 3
Japanese version
38
Error Code
A
Version Up
Information
B
Execution Times
905
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Caution
Number of
program steps
which can be
written for
circuit change
in RUN mode
GX Works2
Ver. 1.08J or later
GX Developer
Ver. 8.72A or later
GX Works2
Ver. 1.08J or later
GX Developer
Ver. 8.24A or later
GX Developer
Ver. 8.22Y and
earlier
FX-PCS/WIN(-E)
Built-in RAM and optional memory cassette (whose write protect switch is set to OFF)
127 steps or less after edit (addition/deletion) (including NOP immediately after circuit blocks except
final circuit)
Circuit blocks*1 in which labels P and I are added, deleted, or changed in edited circuits
*1.
Circuit blocks in which 1-ms timers (T246 to T249 and T256 to T511) are added in edited circuits
Circuit blocks in which the following instructions are included in edited circuits
Instruction to output high-speed counters C235 to C255 (OUT instruction)
SORT2 (FNC149), TBL (FNC152), RBFM (FNC278) and/or WBFM (FNC279) instructions
Circuit blocks cannot be edited to insert a label as shown below when written during RUN.
Step
0
FNC 04
EI
Added, deleted, or changed
Pointer for
interrupt
FNC 06
FEND
Label I is inserted by editing the circuit block
I001
906
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Caution
During RUN, avoid writing to a circuit block including the following instructions under execution. If writing is
executed during RUN to such a circuit block, the PLC decelerates and stops pulse output.
DSZR (FNC150), DVIT (FNC151), ZRN (FNC156), PLSV (FNC157) instructions [with acceleration/
deceleration operation], DRVI (FNC158) and/or DRVA (FNC159) instructions
During RUN, avoid writing to a circuit block including the following instruction under execution.
PLSY (FNC 50), PWM (FNC 58), PLSR (FNC 59) instructions
During RUN, avoid writing to a circuit block including the following instruction under execution.
If such writing is executed during RUN, instructions being executed are canceled.
FLCRT (FNC300), FLDEL (FNC301), FLWR (FNC302), FLRD (FNC303),
FLCMD (FNC304) and FLSTRD (FNC305) instructions
OFF
Not executed
Not executed
ON
Executed*1
Not executed
OFF
OFF (non-conductive)
OFF (non-conductive)
ON
ON (conductive)
OFF (non-conductive)
When GX Works2 Ver. 1.08J or later or GX Developer Ver. 8.72A or later is used in FX3S/FX3G/FX3GC
PLCs to write data during RUN, the following will occur.
If the number of program steps is reduced by deleting contact or coil application instructions, etc., the
program becomes shorter by the number of reduced steps.
When GX Works2 Ver. 1.08J or later or GX Developer Ver. 8.18U or later is used in FX3U/FX3UC PLCs to
write data during RUN, the following will occur.
If the number of program steps is reduced by deleting contact or coil application instructions, etc., the
program becomes shorter by the number of reduced steps.
FX3U/FX3UC PLCs Ver. 3.00 or later and GX Works2 Ver. 1.62Q or later.
Writing during RUN is enabled only when the protection status (valid or invalid) by the setting "Read-protect
the execution program" for the block password is same as the protection status of the PLC designated as
the target of writing during RUN.
Errors cannot be detected in write during RUN even in a circuit which causes errors.
Errors are detected after the PLC is stopped once, and then run again.
907
38
B
Execution Times
MEF instruction
Version Up
Information
Other
MEP instruction
Error Code
37
Special Device
When writing to a circuit block during RUN, which includes the following instructions, the following results.
Pulse instruction during rising edge of operation results (MEP instruction)
After writing to the circuit with MEP instructions during RUN, the MEP instruction result turns ON
(conductive) while the operation results leading up to the MEP instruction are ON.
Pulse instruction during falling edge of operation results (MEF instruction)
After writing to the circuit with MEF instructions during RUN, the MEF instruction result turns OFF (nonconductive), regardless of the operation results up to the MEF instruction.
The operation results of the MEF instruction turns ON (conductive) when the operation results leading up to
the MEF instruction are turned OFF.
36
Interrupt
Function
35
SFCSTL
Programming
*2.
34
FNC300-FNC305
FX3U-CF-ADP
When writing to a circuit block during RUN, which includes the following instructions, the following results.
instruction for falling edge pulse
When writing is completed during RUN for a circuit including an instruction for falling edge pulse (LDF,
ANDF, or ORF instruction), the instruction for falling edge pulse is not executed regardless of the ON/OFF
status of the target device of the instruction for falling edge pulse.
When writing is completed during RUN for a circuit including an instruction for falling edge pulse (PLF
instruction), the instruction for falling edge pulse is not executed regardless of the ON/OFF status of the
operation condition device.
It is necessary to set to ON the target device or operation condition device once and then set it to OFF to
execute the instruction for falling edge pulse.
Instruction for rising edge pulse
When writing is completed during RUN for a circuit including an instruction for rising edge pulse, the
instruction for rising edge pulse is executed if a target device of the instruction for rising edge pulse or the
operation condition device is ON.
Target instructions for rising edge pulse: LDP, ANDP, ORP, and pulse operation type applied instructions
(such as MOVP)
33
FNC290-FNC299
Extension File
Register Control
During RUN, avoid writing to a circuit block including the following instructions under execution of
communication. If writing is executed during RUN to such a circuit block, the PLC may stop communication
after that.
If the PLC stops communication, set the PLC to the STOP mode once, and then set it to the RUN mode again.
IVCK (FNC270), IVDR (FNC271), IVRD (FNC272), IVWR (FNC273), IVBWR (FNC274),
IVMC (FNC275) and ADPRW (FNC276) instructions
32
FNC280-FNC289
High-Speed
Processing 2
During RUN, avoid writing to a circuit block including the following instruction under execution. If writing is
executed during RUN to such a circuit block, the PLC immediately stops pulse output.
PLSV (FNC157) instruction [without acceleration/deceleration operation]
FNC277-FNC279
Data
Transfer 3
Item
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Appendix A-1-3
Make sure to set the contents described in this section when using the (built-in USB) programming port of the FX3G/
FX3GC PLC to execute ladder monitor, device monitor, program read/write, etc by GX Developer.
For GX Developer prior to Ver. 8.72A, communication using the (built-in USB) programming port is not available.
2. Setting in GX Developer
1)
2)
Double-click [Serial] in [PC side I/F] to open PC side I/F Serial setting dialog box.
3)
Double-click it.
4)
908
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Make sure to provide the following setting when executing ladder monitor, device monitor, and reading/writing
programs in an FX3G/FX3GC/FX3U/FX3UC PLC using GX Developer or later and the transparent function by way of the
USB in the GOT1000 Series.
If the following setting is not provided, a communication error occurs.
GX Developer Ver. 8.22Y or later
33
FNC290-FNC299
Extension File
Register Control
32
FNC280-FNC289
High-Speed
Processing 2
31
FNC277-FNC279
Data
Transfer 3
Appendix A-1-4
Setting in GX Developer
1. Select [Online] [Transfer setup...] to open Transfer setup dialog box.
34
2. Double-click [Serial] in [PC side I/F] to open PC side I/F Serial setting dialog box.
FNC300-FNC305
FX3U-CF-ADP
35
Double-click it.
SFCSTL
Programming
36
Interrupt
Function
37
Special Device
FX3U/FX3UC PLCs
Double-click it.
38
Error Code
A
Version Up
Information
B
Execution Times
909
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Appendix A-1-5
Make sure to provide the following setting when executing ladder monitor, device monitor, etc. in an FX3G/FX3GC/
FX3U/FX3UC PLC using GX Developer and the transparent (2-port) function of the GOT-F900 Series.
If the following setting is not provided, write to PLC, read from PLC, verify with PLC, etc. operate normally, but
monitoring (ladder monitor, entry data monitor, etc.) cannot be normally executed.
GX Developer
Ver. 8.12N or earlier
GX Developer
Ver. 8.18U or later
When directly
connecting GX
Set "COM port" and "Transmission speed" on "PC side I/F
Developer to PLC
Serial setting" dialog box.
(standard built-in RS-422
port)
Setting in GX Developer
1. Select [Online] [Transfer setup...] to open Transfer Setup dialog box.
2. Double-click [PLC module] in [PLC side I/F] to open PLC side I/F Detailed setting of PLC module
dialog box.
3. Put a check mark in the check box [via GOT-F900 transparent mode] as shown below.
Double-click it.
910
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Appendix A-2-1
FNC277-FNC279
Data
Transfer 3
32
FX3S PLC
Applicability
Remarks
Standard monitor OS, communication driver and option OS which support the FX3S PLC
are required.
For details, refer to the GOT manual.
Applicable
This series is subject to the following restrictions when connected using unsupported
standard monitor OS, communication driver or option OS.
33
Contents of restrictions
When connected using standard monitor OS, communication driver and option OS
which support the FX3G PLC
- Programming is enabled only in the function range such as instructions,
device ranges and program sizes available in both the FX3S PLC and the FX3G
PLC.
When connected using standard monitor OS, communication driver and option OS
which do not support the FX3G PLC
- Programming is enabled only in the function range such as instructions,
device ranges and program sizes available in both the FX3S PLC and the FX1N
PLC.
- The list editor function for MELSEC-FX is not available. When using the list editor
function for MELSEC-FX, upgrade the standard monitor OS, communication driver
and option OS to the version compatible with the FX3S PLC.
FNC290-FNC299
Extension File
Register Control
GOT1000 Series
Not applicable
Contents of restrictions
Programming is enabled only in the function range such as instructions,
device ranges and program sizes available in both the FX3S PLC and the FX1N PLC.
For applicable models, refer to the GOT manual.
The following restriction applies when connected.
FX-10DM(-SET0)
Not applicable
Contents of restrictions
Programming is enabled only in the function range such as instructions,
device ranges and program sizes available in both the FX3S PLC and the FX1N PLC.
For supported models and device ranges, refer to the FX-10DM USER MANUAL
(Manual No. JY992D86401).
36
Interrupt
Function
For connection using the 2-port interface function*1, refer to Appendix A-1-4.
35
SFCSTL
Programming
34
FNC300-FNC305
FX3U-CF-ADP
GOT-F900 Series
FNC280-FNC289
High-Speed
Processing 2
Product Name
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
911
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FX3G/FX3GC PLCs
Product Name
Applicability
Remarks
Standard monitor OS, communication driver and option OS which support the FX3G/FX3GC
PLCs are required.
For details, refer to the GOT manual.
This series is subject to the following restrictions when connected using unsupported
standard monitor OS, communication driver or option OS.
GOT1000 Series
Applicable
Contents of restrictions
Programming is enabled only in the function ranges such as instructions, device ranges
and program sizes available in the FX1N and FX1NC PLCs.
The list editor function for MELSEC-FX is not available. When using the list editor
function for MELSEC-FX, upgrade the standard monitor OS, communication driver and
option OS to the version compatible with the FX3G PLC.
Check the applicability of other items in the GOT manual.
F940WGOT
Not applicable
F940GOT,
F940 Handy GOT
Not applicable
F930GOT (-K)
Not applicable
F920GOT (-K)
Not applicable
Contents of restrictions
Programming is enabled only in the function ranges such as instructions, device ranges and
program sizes available in the FX1N and FX1NC PLCs.
For applicable models, refer to the GOT manual.
ET-940
Not applicable
For connection using the 2-port interface function*1, refer to Appendix A-1-4.
The following restriction applies when connected.
FX-10DM (-SET0)
Not applicable
Contents of restrictions
Programming is enabled only in the function ranges such as instructions, device
ranges and program sizes available in the FX1N and FX1NC PLCs.
For supported models and device ranges, refer to the FX-10DM USER MANUAL
(Manual No. JY992D86401).
The following restriction applies when connected.
FX-10DU
Not applicable
Contents of restrictions
It is limited to the device range and function range supported by the highest class model
(FX1N or FX1NC) applicable in the product version.
For supported models and device ranges, refer to the FX-10DU Operation Manual
(Manual No. JY992D34701).
FX3U/FX3UC PLC
Product Name
GOT1000 Series
Applicability
Applicable
(From first product)
Remarks
The GOT1000 Series is applicable to the device ranges in the FX3U/FX3UC PLCs.
Check the applicability of other items in the GOT manual.
F940WGOT
Not applicable
F940GOT,
F940 Handy GOT
Not applicable
F930GOT (-K)
Not applicable
F920GOT (-K)
Not applicable
Contents of restrictions
Programming is enabled only in the function ranges such as instructions, device ranges and
program sizes available in the FX2N and FX2NC PLCs.
For applicable models, refer to the GOT manual.
ET-940
Not applicable
For connection using the 2-port interface function*1, refer to Appendix A-1-4.
The following restriction applies when connected.
FX-10DM (-SET0)
Not applicable
Contents of restrictions
Programming is enabled only in the function ranges such as instructions, device ranges and
program sizes available in the FX2N and FX2NC PLCs.
For supported models and device ranges, refer to the FX-10DM USERS MANUAL
(Manual No. JY992D86401).
The following restriction applies when connected.
FX-10DU
*1.
912
Not applicable
Contents of restrictions
It is limited to the device range and function range supported by the highest class model
(FX2N or FX2) applicable in the product version.
For supported models and device ranges, refer to the FX-10DU Operation Manual
(Manual No. JY992D34701).
The F940GOT and ET-940 whose version is earlier than Ver. 1.10 do not support the transparent (2-port)
function of the GX Developer.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Appendix A-3-1
FNC277-FNC279
Data
Transfer 3
32
FNC280-FNC289
High-Speed
Processing 2
The year and month of production of the PLC main unit can be checked on the nameplate, and "LOT" indicated on the
front of the product.
33
FNC290-FNC299
Extension File
Register Control
Right side
34
FNC300-FNC305
FX3U-CF-ADP
35
Control number
SFCSTL
Programming
Control number
36
Main unit
Interrupt
Function
The year and month of production of the product can be checked from the manufacturer's serial number
"LOT" on the front (at the bottom) of the product.
The "LOT" indication is adopted in products manufactured at the following time.
"LOT" indication adoption time
March 2013 and later (From first product)
37
Special Device
38
Example: FX3U-48MR/ES
Error Code
913
B
Execution Times
Version Up
Information
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Appendix A-3-2
Version check
The PLC version can be verified by monitoring the special data register D8001 or D8101 and checking the last three
digits. Or for the FX3U and FX3UC PLCs, the PLC version can be verified in "PLC Status" within the display module.
For the operating procedure of the display module,
refer to the Hardware Edition Manual of the PLC to be checked.
D8001/D8101
0
Version information (Example: Ver. 1.00)
Appendix A-3-3
Version
Ver. 1.00
133****
(March, 2013)
Ver. 1.10
13X****
(October, 2013)
Appendix A-3-4
Version
Ver. 1.00
Ver. 1.10
8X****
(October, 2008)
Ver. 1.20
96****
(June, 2009)
Ver. 1.30
9Z****
(December, 2009)
Ver. 1.40
111****
(January, 2011)
Ver. 2.00
124****
(April, 2012)
Ver. 2.10
Ver. 2.20
134**** (April, 2013) Supports the IP address change function of Ethernet adapter.
13X****
(October, 2013)
For the manufacturer serial number check method, refer to Appendix A-3-1.
914
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Version
Ver. 1.40
Manufacturers
serial number
121****
(January, 2012)
124****
(April, 2012)
Ver. 2.10
32
FNC280-FNC289
High-Speed
Processing 2
Ver. 2.00
31
FNC277-FNC279
Data
Transfer 3
Appendix A-3-5
134**** (April, 2013) Supports the IP address change function of Ethernet adapter.
For the manufacturer serial number check method, refer to Appendix A-3-1.
Version
Ver. 2.20
FNC290-FNC299
Extension File
Register Control
Appendix A-3-6
34
5Y****
(November, 2005)
Ver. 2.40
74****
(April, 2007)
Ver. 2.41
7Y****
(November, 2007)
The baud rate "38400 bps" is supported in the RS and RS2 instructions, inverter
communication and computer link.
Ver. 2.61
97****
(July, 2009)
107****
(July, 2010)
Ver. 3.00
11Y****
(November, 2011)
37
Version
Ver. 1.20
44****
(April, 2004)
48****
(August, 2004)
B
Execution Times
Ver. 1.30
First product
Version Up
Information
Ver. 1.00
38
Error Code
For the manufacturer serial number check method, refer to Appendix A-3-1.
Appendix A-3-7
36
Special Device
Ver. 3.10
115****
(May, 2011)
Interrupt
Function
Ver. 2.70
35
SFCSTL
Programming
Ver. 2.30
FNC300-FNC305
FX3U-CF-ADP
33
915
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Manufacturers
serial number
Ver. 2.20
55****
(May, 2005)
Ver. 2.30
5Y****
(November, 2005)
Ver. 2.40
74****
(April, 2007)
Ver. 2.41
79*****1
(September, 2007)
Ver. 2.53
84****
(April, 2008)
Version
Ver. 2.61*2
97****
(July, 2009)
Ver. 2.70
Ver. 3.00
Ver. 3.10
107****
(July, 2010)
115****
(May, 2011)
*1.
- FX3U-8AV-BD*3
Supports the lower over-scale detection function of FX3U-4AD-ADP and FX3U-3A-ADP.
11Y****
(November, 2011)
916
The FX3UC-32MT-LT supports Ver. 2.41 from the manufacturer's serial number "7X****" (October 2007).
*2.
*3.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
32
FNC280-FNC289
High-Speed
Processing 2
Measurement condition
High-speed counters and interrupt instructions (I) are not used together.
In operands, data registers are used as target devices.
Indexing (V or Z) is not provided.
33
FNC290-FNC299
Extension File
Register Control
32-bit instruction
16-bit instruction
32-bit instruction
Remarks
34
LD
0.21
LDI
0.21
FNC300-FNC305
FX3U-CF-ADP
Contact instructions
35
LDP
2.32
LDF
2.59
2.28
2.32
0.2
ANI
0.2
ANP
2.36
2.32
ANF
2.4
2.36
OR
0.21
ORI
0.21
2.36
2.36
ORF
2.4
2.36
36
Interrupt
Function
ORP
SFCSTL
Programming
AND
Connection instructions
ANB
0.2
ORB
0.2
MPS
0.21
0.2
MPP
0.17
INV
0.17
MEP
1.52
MEF
1.6
37
Special Device
MRD
38
Error Code
A
Version Up
Information
B
Execution Times
917
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Instruction
32-bit instruction
16-bit instruction
32-bit instruction
Remarks
Output instructions
OUT Y,M
0.21
OUT S
1.25
1.25
OUT T K
2.41
2.16
OUT T D
2.77
2.54
OUT C K
1.9
2.25
1.57
1.72
C235 to C255
1.6 s in execution in ON status
1.06 s in execution in OFF status
OUT C D
2.26
1.49
1.93
2.35
C235 to C255
2.21 s in execution in ON status
1.06 s in execution in OFF status
SET Y,M
SET S
RST Y,M
n: Number of recombination
1.23 s when there is no recombination
0.59
0.23
RST S
1.17
RST T
RST C
0.23
0.59
1.68
1.77
RST D
1.21
1.82
1.18
1.08
1.19
0.54
PLS Y,M
1.52
PLF Y,M
1.52
1.63
1.76
MCR
1.3
Other instruction
NOP
0.21
End instruction
END
918
209
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Instruction
32-bit instruction
16-bit instruction
32-bit instruction
FNC277-FNC279
Data
Transfer 3
Contact instructions
0.21
LDI
0.21
32
LDP
2.32
2.28
LDF
2.36
2.32
AND
0.2
ANI
0.2
34
2.36
2.32
ANF
2.4
2.36
0.21
ORI
0.21
2.36
2.32
status*3
3-step instruction
ORF
2.4
2.36
36
Interrupt
Function
ORP
35
SFCSTL
Programming
OR
FNC300-FNC305
FX3U-CF-ADP
ANP
33
FNC290-FNC299
Extension File
Register Control
3-step instruction
FNC280-FNC289
High-Speed
Processing 2
LD
37
Connection instructions
ANB
0.2
0.2
MPS
0.21
0.2
MPP
0.17
INV
0.17
MEP
1.52
MEF
1.6
38
Error Code
MRD
Special Device
ORB
Output instructions
OUT Y,M
OUT S
1.25
2.41
T246 to T319
2.69 s in execution in ON status
2.04 s in execution in OFF status
A
Version Up
Information
OUT T K
0.21
B
Execution Times
919
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Instruction
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
Remarks
Output instructions
OUT T D
2.77
T246 to T319
3.06 s in execution in ON status
2.41 s in execution in OFF status
2.54
OUT C K
1.9
2.25
1.57
1.72
C235 to C255
1.6 s in execution in ON status
1.06 s in execution in OFF status
OUT C D
2.26
2.49
1.93
2.35
C235 to C255
2.21 s in execution in ON status
1.06 s in execution in OFF status
SET Y,M
0.23
SET S
RST Y,M
n: Number of recombination
1.23 s when there is no recombination
0.59
0.23
RST S
1.17
0.59
RST T
1.68
1.21
RST C
1.68
RST D
1.82
1.18
1.08
1.19
0.54
PLS Y,M
1.52
PLF Y,M
1.52
1.63
1.76
MCR
1.3
Other instruction
NOP
0.21
End instruction
END
920
*1.
*2.
*3.
M3584 to M7679
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Instruction
32-bit instruction
16-bit instruction
32-bit instruction
FNC277-FNC279
Data
Transfer 3
Contact instructions
0.42
LDI
0.42
32
LDP
2.72
2.68
LDF
2.76
2.72
AND
0.41
ANI
0.41
34
2.72
2.68
ANF
2.76
2.72
0.42
ORI
0.42
2.72
2.68
status*3
3-step instruction
ORF
2.76
2.72
36
Interrupt
Function
ORP
35
SFCSTL
Programming
OR
FNC300-FNC305
FX3U-CF-ADP
ANP
33
FNC290-FNC299
Extension File
Register Control
3-step instruction
FNC280-FNC289
High-Speed
Processing 2
LD
37
Connection instructions
0.41
ORB
0.41
MPS
0.42
0.41
MPP
0.38
INV
0.38
MEP
1.73
MEF
1.81
38
Error Code
MRD
Special Device
ANB
Output instructions
OUT Y,M
OUT S
1.65
3.19
T246 to T319
3.47 s in execution in ON status
2.82 s in execution in OFF status
A
Version Up
Information
OUT T K
0.42
B
Execution Times
921
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Instruction
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
Remarks
Output instructions
OUT T D
3.55
T246 to T319
3.83 s in execution in ON status
3.19 s in execution in OFF status
3.32
OUT C K
2.68
3.02
2.35
2.89
C235 to C255
2.66 s in execution in ON status
1.45 s in execution in OFF status
OUT C D
3.04
3.25
2.72
3.1
C235 to C255
3.00 s in execution in ON status
1.45 s in execution in OFF status
SET Y,M
0.44
SET S
RST Y,M
n: Number of recombination
n=1.62 when there is no recombination
0.78
0.44
RST S
1.55
RST T
2.08
RST C
2.08
RST D
2.31
1.19
1.66
1.58
0.74
PLS Y,M
1.88
PLF Y,M
1.88
2.01
2.13
MCR
1.51
Other instruction
NOP
0.42
End instruction
END
922
*1.
*2.
*3.
M3584 to M7679
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Instruction
32-bit instruction
16-bit instruction
32-bit instruction
FNC277-FNC279
Data
Transfer 3
FX3U/FX3UC PLCs
Remarks
Contact instructions
0.065
LDI
0.065
7.8
LDF
7.8
ANI
0.065
ANP
7.5
7.5
ORI
0.065
34
instruction*3
FNC300-FNC305
FX3U-CF-ADP
0.065
33
ANF
OR
FNC290-FNC299
Extension File
Register Control
0.065
LDP
AND
32
FNC280-FNC289
High-Speed
Processing 2
LD
ORP
7.4
ORF
7.4
35
Connection instructions
0.065
ORB
0.065
MPS
0.065
0.065
MPP
0.065
INV
0.065
MEP
3.4
MEF
3.4
36
Interrupt
Function
MRD
SFCSTL
Programming
ANB
Output instructions
OUT Y,M
0.065
37
4.8
4.8
OUT T K
0.71
0.71
OUT T D
0.71
0.71
0.71
6.1
0.71
6.1
OUT C D
0.71
6.1
0.71
6.1
C235 to C255
9.5 s in execution in ON status
9.0 s in execution in OFF status
SET Y,M
RST Y,M
0.065
n: Number of recombination
4.7 s when there is no recombination
0.129 s in 2-step instruction*2
0.193 s in 3-step instruction*3
A
Version Up
Information
SET S
0.065
38
Error Code
OUT C K
C235 to C255
9.5 s in execution in ON status
9.0 s in execution in OFF status
Special Device
OUT S
B
Execution Times
923
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Instruction
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
Remarks
Output instructions
RST S
4.6
0.13
RST T
0.45
0.45
RST C
0.45
5.8
0.45
4.8
RST D
5.4
0.195
PLS Y,M
0.257
PLF Y,M
0.257
4.3
4.7
MCR
3.9
Other instruction
NOP
0.065
End instruction
END
924
*1.
*2.
*3.
M3584 to M7679
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
32-bit instruction
16-bit instruction
Remarks
32-bit instruction
3.36 + 1.19n
RET
2.19
32
n: Number of recombination
n = 0: When there is no
recombination
FNC280-FNC289
High-Speed
Processing 2
STL
FX3G/FX3GC PLCs
Standard mode
Instruction
Execution time in ON
status (s)
33
Remarks
16-bit
32-bit
16-bit
32-bit
16-bit
32-bit
16-bit
32-bit
instruction instruction instruction instruction instruction instruction instruction instruction
3.36 + 1.19n
3.35 + 1.46n
RET
2.19
2.19
n: Number of recombination
n = 0: When there is no
recombination
FX3U/FX3UC PLCs
Instruction
32-bit instruction
16-bit instruction
Remarks
32-bit instruction
5.1 + 1.6n
RET
2.9
35
n: Number of recombination
n = 0: When there is no
recombination
SFCSTL
Programming
STL
36
Interrupt
Function
FX3S PLC
Instruction
32-bit instruction
16-bit instruction
P***
0.21
I***
0.21
Remarks
32-bit instruction
37
Special Device
FX3G/FX3GC PLCs
Standard mode
Instruction
Execution time in ON
status (s)
34
FNC300-FNC305
FX3U-CF-ADP
STL
FNC290-FNC299
Extension File
Register Control
Execution time in ON
status (s)
Extension mode
Extension mode
Execution time in ON
status (s)
Remarks
38
16-bit
32-bit
16-bit
32-bit
16-bit
32-bit
16-bit
32-bit
instruction instruction instruction instruction instruction instruction instruction instruction
0.21
0.42
I***
0.21
0.42
Error Code
P***
FX3U/FX3UC PLCs
Instruction
32-bit instruction
16-bit instruction
0.065
I***
0.065
Remarks
0.129 s in P256 to P4095
Version Up
Information
P***
32-bit instruction
B
Execution Times
925
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Instruction
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
2.59
0.61
6.44
(CALL+SRET)
0.61
Remarks
Program flow
00
CJ
01
CALL
02
SRET
03
IRET
6.34
04
EI
2.52
05
DI
1.94
06
FEND
07
WDT
1.94
0.61
08
FOR
09
NEXT
4.98
(FOR+NEXT)
209
CMP
11.18
11.54
0.61
0.61
11
ZCP
12.51
13.15
0.61
0.61
12
MOV
0.52
0.61
0.38
0.41
13
SMOV
16.19
0.61
14
CML
6.68
7.15
0.61
0.61
15
BMOV
15.95+3.96n
0.61
16
FMOV
10.20+0.77n
10.87+0.79n
0.61
0.61
18
BCD
2.93
4.6
0.41
0.43
19
BIN
2.93
4.61
0.41
0.43
ADD
1.79
2.13
0.41
0.45
21
SUB
1.79
2.13
0.41
0.45
22
MUL
1.29
3.21
0.41
0.45
23
DIV
1.93
3.7
0.41
0.45
24
INC
0.78
1.01
0.41
0.41
25
DEC
0.78
1.01
0.41
0.41
26
WAND
1.24
1.59
0.41
0.45
27
WOR
1.24
1.59
0.41
0.45
28
WXOR
1.24
1.59
0.41
0.45
ROR
7.37
8.94
0.61
0.61
31
ROL
7.37
8.94
0.61
0.61
34
SFTR
14.51+0.46n
0.61
35
SFTL
14.7+0.46n
0.61
36
WSFR
11.74+1.44n
0.61
37
WSFL
12.02+1.48n
0.61
38
SFWR
7.46
0.61
39
SFRD
9.27
0.61
ZRST(D)
7.96+0.22n
0.61
ZRST(T)
8.77+0.46n
0.61
ZRST(M)
14.76+0.37n
0.61
Data operation
40
41
DECO
8.5
0.61
42
ENCO
9.29
0.61
43
SUM
6.95
7.43
0.61
0.61
44
BON
10.4
10.77
0.61
0.61
45
MEAN
13.83+3.33n
14.69+3.5n
0.61
0.61
49
FLT
6.96
7.56
0.61
0.61
926
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Execution time in OFF status (s)
REF
X:8.75+0.45n
Y:8.85+0.90n
0.61
FNC277-FNC279
Data
Transfer 3
50
52
MTR
14.72
1.65
HSCS
10.8
32
53
0.61
0.61
FNC
No.
Instruction
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
Remarks
High-speed processing
10.79
HSZ
12.2
0.61
56
SPD
15.51
15.86
3.08
3.12
57
PLSY
38.21
38.61
6.23
6.23
58
PWM
21.79
8.11
59
PLSR
156.25
157.02
6.19
6.19
23.33
0.61
33
FNC290-FNC299
Extension File
Register Control
HSCR
FNC280-FNC289
High-Speed
Processing 2
54
55
Handy instructions
60
IST
SER
21.33+3.97n
22.14+4.29n
2.4
2.3
ABSD
14.72+2.25n
15.22+3.44n
0.61
0.61
63
INCD
23.69
3.04
66
ALT
5.82
0.61
67
RAMP
12.33
9.89
34
FNC300-FNC305
FX3U-CF-ADP
61
62
DSW
24.74
18
74
SEGL
17.76
6.27
17.21
2.52
35
External FX device
RS
PRUN
11.41+1.67n
11.65+1.63n
0.61
0.61
82
ASCI
12.34+1.52n
0.61
83
HEX
11.89+2.66n
0.61
84
CCD
11.98+1.16n
0.61
85
VRRD
102.46
0.61
86
VRSC
102.46
0.61
87
RS2
23.48
2.68
88
PID
29.1
15.41
36
Interrupt
Function
81
SFCSTL
Programming
80
Floating point
12.46
0.61
6.36
0.61
120 EADD
11.96
0.61
121 ESUB
12.06
0.61
122 EMUL
12.76
0.61
123 EDIV
20.86
0.61
127 ESQR
129 INT
10.66
0.61
12.06
12.06
0.61
0.61
166.48
6.19
16.68
3.68
6.17
37
Special Device
110 ECMP
112 EMOV
38
150 DSZR
155 ABS
151.38
151.63
6.17
157 PLSV
160.48
160.48
6.1
6.1
158 DRVI
275.38
275.94
6.04
6.04
159 DRVA
276.08
276.65
6.23
6.23
A
Version Up
Information
156 ZRN
Error Code
Positioning control
0.61
17.84
0.61
162 TADD
11.98
0.61
163 TSUB
11.98
0.61
166 TRD
6.76
0.61
167 TWR
337.1
0.61
169 HOUR
10.86
11.57
10.44
10.44
B
Execution Times
160 TCMP
161 TZCP
927
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC
No.
Instruction
32-bit instruction
32-bit instruction
Remarks
External device
170 GRY
11.46
11.81
0.61
0.61
171 GBIN
11.46
11.83
0.61
0.61
224 LD=
1.56
1.8
1.52
1.76
225 LD>
1.92
2.36
1.92
2.32
226 LD<
1.96
2.4
1.88
2.28
228 LD<>
1.52
1.76
1.56
1.8
229 LD<=
1.84
2.28
1.96
2.4
230 LD>=
1.84
2.28
1.92
2.36
232 AND=
1.52
1.76
1.46
1.7
233 AND>
1.88
2.24
1.84
2.28
234 AND<
1.92
2.36
1.84
2.18
236 AND<>
1.48
1.68
1.5
1.7
237 AND<=
1.8
2.2
1.88
2.26
238 AND>=
1.8
2.16
1.92
2.32
240 OR=
1.54
1.76
1.52
1.72
241 OR>
1.92
2.32
1.88
2.32
242 OR<
1.96
2.36
1.84
2.28
244 OR<>
1.52
1.72
1.56
1.76
245 OR<=
1.84
2.2
1.92
2.32
246 OR>=
1.84
2.2
1.96
2.36
Data comparison
32.6
4.46
271 IVDR
31.6
4.46
272 IVRD
35.3
4.46
273 IVWR
34.6
4.46
275 IVMC
44.2
4.46
276 ADPRW
67.19
9.83
928
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Standard mode
FNC
No.
Instruction
Extension mode
Execution time
in OFF status
(s)
16-bit 32-bit
instruc instruc
tion
tion
32-bit
instruction
Execution time
in OFF status
(s)
Remarks
32
16-bit 32-bit
instruc instruc
tion
tion
FNC280-FNC289
High-Speed
Processing 2
16-bit
instruction
FNC277-FNC279
Data
Transfer 3
FX3G/FX3GC PLCs
Program flow
0.61
0.61
SRET
6.44
(CALL+SRET)
03
IRET
6.34
04
EI
2.52
05
DI
1.94
CJ
CALL
02
2.93
0.8
0.8
7.38
(CALL+SRET)
6.9
2.71
2.12
0.61
2.16
4.98
(FOR+NEXT)
FEND
292+2.5X+3.75Y
07
WDT
1.94
08
FOR
09
NEXT
0.8
5.76
(FOR+NEXT)
292+2.5X+3.75Y
11.18
11.54
0.61
0.61
12.91
13.66
0.8
0.8
11
ZCP
12.51
13.15
0.61
0.61
14.62
16.02
0.8
0.8
12
MOV
0.52
0.61
0.38
0.41
1.29
1.56
0.61
0.65
13
SMOV
16.19
0.61
18.68
0.8
14
CML
6.68
7.15
0.61
0.61
8.03
8.5
0.8
0.8
15
BMOV
15.08+5.58n
0.61
17.54+5.58n
0.8
16
FMOV
10.20+0.77n
10.87+0.79n
0.61
0.61
11.90+0.77n
12.94+0.79n
0.8
0.8
BCD
2.93
4.6
0.41
0.43
3.9
5.8
0.61
0.65
19
BIN
2.93
4.61
0.41
0.43
4.01
5.82
0.61
0.65
36
Interrupt
Function
18
35
SFCSTL
Programming
10
1.79
2.13
0.41
0.45
3.14
3.87
0.61
0.65
21
SUB
1.79
2.13
0.41
0.45
3.14
3.87
0.61
0.65
22
MUL
1.29
3.21
0.41
0.45
2.78
4.88
0.61
0.65
23
DIV
1.93
3.7
0.41
0.45
3.48
5.3
0.61
0.65
24
INC
0.78
1.01
0.41
0.41
1.53
1.96
0.61
0.65
25
DEC
0.78
1.01
0.41
0.41
1.53
1.96
0.61
0.65
26
WAND
1.24
1.59
0.41
0.45
2.61
3.34
0.61
0.65
27
WOR
1.24
1.59
0.41
0.45
2.61
3.34
0.61
0.65
28
WXOR
1.24
1.59
0.41
0.45
2.61
3.34
0.61
0.65
7.37
8.94
0.61
0.61
8.21
10.21
0.8
0.8
0.8
37
Special Device
20
38
31
ROL
7.37
8.94
0.61
0.61
8.21
10.21
0.8
34
SFTR
14.51+0.46n
0.61
16.61+0.46n
0.8
35
SFTL
14.7+0.46n
0.61
16.82+0.46n
0.8
WSFR
11.74+1.44n
0.61
13.91+1.44n
0.8
WSFL
12.02+1.48n
0.61
14.11+1.48n
0.8
38
SFWR
7.46
0.61
9.19
0.8
39
SFRD
9.27
0.61
10.99
0.8
A
Version Up
Information
36
37
Error Code
30
34
FNC300-FNC305
FX3U-CF-ADP
06
33
FNC290-FNC299
Extension File
Register Control
2.59
00
01
B
Execution Times
929
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Standard mode
FNC
No.
Instruction
Extension mode
Execution time
in OFF status
(s)
16-bit 32-bit
instruc instruc
tion
tion
16-bit
instruction
32-bit
instruction
ZRST(D)
7.96+0.22n
0.61
ZRST(T)
8.77+0.46n
0.61
ZRST(M)
14.76+0.37n
8.5
Execution time
in OFF status
(s)
Remarks
16-bit 32-bit
instruc instruc
tion
tion
16-bit
instruction
32-bit
instruction
10.26+0.22n
0.8
10.68+0.46n
0.8
0.61
16.16+0.37n
0.8
0.61
10.31
0.8
Data operation
40
41
DECO
42
ENCO
9.29
0.61
11.02
0.8
43
SUM
6.95
7.43
0.61
0.61
8.3
8.76
0.8
0.8
44
BON
45
MEAN
10.4
10.77
0.61
0.61
12.13
12.83
0.8
0.8
13.83+3.33n
14.69+3.5n
0.61
0.61
16.28+3.32n
17.6+3.49n
0.8
0.8
46
ANS
9.55
9.09
11.27
10.81
47
ANR
11.08
0.61
11.12
0.8
49
FLT
6.96
7.56
0.61
0.61
8.28
8.88
0.8
0.8
High-speed processing
50
REF
9+1.43n
0.61
10.27+1.42n
0.8
52
MTR
14.72
1.65
16.11
1.85
53
HSCS
10.8
0.61
12.8
0.8
54
HSCR
10.79
0.61
12.71
0.8
55
HSZ
12.2
0.61
14.86
0.8
56
SPD
15.51
15.86
3.08
3.12
17.25
18.01
3.27
3.31
57
PLSY
38.21
38.61
4.63
4.78
40.1
41.33
5.5
5.36
58
PWM
21.79
8.11
22.46
8.5
59
PLSR
156.25
157.02
4.61
4.66
158.85
159.63
5.3
5.33
Handy instructions
60
IST
23.33
0.61
25.3
0.8
61
SER
21.33+3.97n
22.14+4.29n
2.4
2.3
23.99+3.96n
25.7+4.29n
2.6
2.5
62
ABSD
14.72+2.25n
15.22+3.44n
0.61
0.61
17.04+2.25n
17.96+3.44n
0.8
0.8
63
INCD
23.69
3.04
25.02
3.23
66
ALT
5.82
0.61
6.62
0.8
67
RAMP
12.33
9.89
15.21
12.37
DSW
24.74
18
27.08
20.3
74
SEGL
17.76
6.27
19.34
6.41
115.6+454.4n
FROM*1
78
79
119.14+904.86n
0.61
0.61
117.29+454.74n 121.98+905.03n
0.8
0.8
FROM
114.98+968.02n 119.62+1931.4n
0.61
0.61
117.81+968.19n 123.62+1931.4n
0.8
0.8
FROM*3
52.58+131.43n
11.67+242.33n
0.61
0.61
55.58+131.43n
14.67+242.34n
0.8
0.8
*1
TO
74.84+515.17n
78.31+1025.7n
0.61
0.61
76.67+515.34n
82.39+1025.7n
0.8
0.8
TO*2
77.62+1025.4n
78.93+2047.1n
0.61
0.61
81.62+1025.4n
82.93+2047.1n
0.8
0.8
129.9+134.1n
13.67+350.33n
0.61
0.61
132.91+134.1n
18.58+350.43n
0.8
0.8
*2
*3
TO
*1.
*2.
*3.
When the instruction is executed to BFM #0 to BFM #31 in a special function unit/block for the FX2N Series.
When the instruction is executed to BFM #32 or later in a special function unit/block for the FX2N Series.
When the instruction is executed to a BFM in a special function unit/block for the FX3U/FX3UC Series
External FX device
17.21
2.52
PRUN
11.41+1.67n
11.65+1.63n
0.61
ASCI
12.34+1.52n
0.61
HEX
11.89+2.66n
0.61
84
CCD
11.98+1.16n
85
VRRD
102.46
80
RS
81
82
83
19.99
2.91
0.61
12.92+1.6n
12.87+1.65n
0.8
0.8
14.07+1.52n
0.8
13.66+2.66n
0.8
0.61
13.7+1.16n
0.8
0.61
103.88
0.8
86
VRSC
102.46
0.61
103.88
0.8
87
RS2
23.48
2.68
26.52
2.92
88
PID
29.1
15.41
31.5
18.005
930
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC
No.
Instruction
32-bit
instruction
Extension mode
Execution time
in OFF status
(s)
16-bit 32-bit
instruc instruc
tion
tion
32-bit
instruction
Execution time
in OFF status
(s)
FNC277-FNC279
Data
Transfer 3
Standard mode
Remarks
16-bit 32-bit
instruc instruc
tion
tion
32
110 ECMP
12.46
0.61
14.68
112 EMOV
6.36
0.61
7.68
0.8
120 EADD
11.96
0.61
13.96
0.8
0.8
12.06
0.61
13.98
0.8
12.76
0.61
14.68
0.8
123 EDIV
20.86
0.61
22.68
0.8
127 ESQR
10.66
0.61
11.88
0.8
12.06
12.06
0.61
0.61
13.28
13.28
0.8
0.8
33
FNC290-FNC299
Extension File
Register Control
121 ESUB
122 EMUL
129 INT
FNC280-FNC289
High-Speed
Processing 2
Floating point
Positioning control
4.56
168.92
4.96
*1
0.61
*1
0.8
155 ABS
16.68
3.68
18.52
3.88
5.08
150 DSZR
156 ZRN
140.48
141.48
4.68
4.68
142.92
143.92
5.08
157 PLSV
160.48
160.48
4.64
4.64
161.92
162.92
5.04
158 DRVI
275.38
275.94
4.78
4.78
278.02
278.58
5.12
5.12
276.08
276.65
4.74
4.74
278.69
279.25
5.16
5.16
159 DRVA
*1.
34
FNC300-FNC305
FX3U-CF-ADP
166.48
152 TBL
35
The instruction execution time is as shown below depending on the executed positioning type (instruction)
Operation instruction
Extension mode
DPLSV instruction
160.48 s
162.92 s
DDRVI instruction
275.94 s
278.58 s
DDRVA instruction
276.65 s
279.25 s
SFCSTL
Programming
Positioning type
36
0.61
17.57
0.8
17.84
0.61
20.33
0.8
162 TADD
11.98
0.61
13.91
0.8
163 TSUB
11.98
0.61
13.91
0.8
6.76
0.61
7.52
0.8
337.1
0.61
339.6
0.8
169 HOUR
10.86
11.57
10.44
10.44
12.59
13.69
12.17
13.01
37
Special Device
166 TRD
167 TWR
Interrupt
Function
160 TCMP
161 TZCP
External device
11.46
11.81
0.61
0.61
12.62
13.35
0.8
0.8
171 GBIN
11.46
11.83
0.61
0.61
12.62
13.37
0.8
0.8
RD3A
(2AD)
1939
0.61
1941
0.8
FX2N-2AD
WR3A
177
(2DA)
3086
0.61
3089
0.8
FX2N-2DA
224 LD=
1.56
1.8
1.52
1.76
2.28
2.72
2.24
2.68
225 LD>
1.92
2.36
1.92
2.32
2.68
3.24
2.68
3.24
226 LD<
1.96
2.4
1.88
2.28
2.72
3.28
2.64
3.2
228 LD<>
1.52
1.76
1.56
1.8
2.24
2.68
2.28
2.72
229 LD<=
1.84
2.28
1.96
2.4
2.6
3.16
2.68
3.24
230 LD>=
1.84
2.28
1.92
2.36
2.6
3.16
2.72
3.28
232 AND=
1.52
1.76
1.46
1.7
2.28
2.96
2.24
2.64
176
38
Error Code
170 GRY
Data comparison
A
Version Up
Information
B
Execution Times
931
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Standard mode
FNC
No.
Instruction
Extension mode
Execution time
in OFF status
(s)
16-bit 32-bit
instruc instruc
tion
tion
16-bit
instruction
32-bit
instruction
233 AND>
1.88
2.24
1.84
234 AND<
1.92
2.36
236 AND<>
1.48
237 AND<=
Execution time
in OFF status
(s)
Remarks
16-bit 32-bit
instruc instruc
tion
tion
16-bit
instruction
32-bit
instruction
2.28
2.6
3.2
2.6
3.2
1.84
2.18
2.68
3.28
2.56
3.16
1.68
1.5
1.7
2.24
2.64
2.24
2.64
1.8
2.2
1.88
2.26
2.56
3.16
2.68
3.24
238 AND>=
1.8
2.16
1.92
2.32
2.52
3.12
2.64
3.24
240 OR=
1.54
1.76
1.52
1.72
2.28
2.68
2.24
2.64
241 OR>
1.92
2.32
1.88
2.32
2.64
3.24
2.64
3.24
242 OR<
1.96
2.36
1.84
2.28
2.68
3.28
2.6
3.2
244 OR<>
1.52
1.72
1.56
1.76
2.24
2.64
2.28
2.68
245 OR<=
1.84
2.2
1.92
2.32
2.56
3.16
2.64
3.24
246 OR>=
1.84
2.2
1.96
2.36
2.56
3.16
2.68
3.28
Data comparison
32.60
4.46
33.90
4.88
271 IVDR
31.60
4.46
32.40
4.88
272 IVRD
35.30
4.46
36.60
4.88
273 IVWR
34.60
4.46
35.40
4.88
275 IVMC
44.2
4.46
45.4
4.88
276 ADPRW
68.15
8.83
71.48
9.77
107.23+30.25n
0.61
108.59+30.33n
0.8
294 RWER
4692.4+128.57n
0.61
4700.4+128.57n
0.8
932
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC
No.
Instruction
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
8.0
0.195
0.195
FNC277-FNC279
Data
Transfer 3
FX3U/FX3UC PLCs
Remarks
Program flow
CJ
01
CALL
02
SRET
13.5
(CALL+SRET)
03
IRET
4.4
04
EI
3.8
05
DI
3.7
FEND
113.9 + 2.13X +
3.25Y
07
WDT
08
FOR
09
NEXT
5.4
0.065
11.6
(FOR + NEXT)
34
CMP
15.5
16.0
0.455
0.845
11
ZCP
18.9
19.7
0.585
1.105
12
MOV
0.64
1.48
0.32
1.48
SMOV
22.9
0.715
CML
10.6
10.2
0.325
0.585
15
BMOV
13.9 + 0.44n
0.455
16
FMOV
14.2 + 0.19n
14.0 + 0.38n
0.455
0.845
17
XCH
10.7
11.4
0.325
0.585
18
BCD
7.94
12.49
0.325
0.585
19
BIN
4.38
5.32
0.325
0.585
0.455
0.845
35
SFCSTL
Programming
13
14
FNC300-FNC305
FX3U-CF-ADP
36
4.77
5.72
21
SUB
4.82
5.78
0.455
0.845
22
MUL
4.6
5.7
0.455
0.845
23
DIV
6.3
7.67
0.455
0.845
24
INC
6.2
6.4
0.195
0.325
25
DEC
6.2
6.4
0.195
0.325
26
WAND
3.57
4.55
0.455
0.845
27
WOR
3.57
4.55
0.455
0.845
28
WXOR
3.57
4.55
0.455
0.845
29
NEG
7.6
8.0
0.195
0.325
37
Special Device
ADD
Interrupt
Function
38
10.5
11.5
0.325
0.585
31
ROL
10.5
11.5
0.325
0.585
32
RCR
10.9
11.8
0.325
0.585
33
RCL
10.9
11.8
0.325
0.585
34
SFTR
23.2 + 0.08n
0.585
35
SFTL
23.2 + 0.08n
0.585
WSFR
7.5 + 0.44n
0.585
WSFL
7.5 + 0.44n
0.585
38
SFWR
8.1
0.455
39
SFRD
7.7
0.455
A
Version Up
Information
36
37
Error Code
30
33
FNC290-FNC299
Extension File
Register Control
06
32
FNC280-FNC289
High-Speed
Processing 2
00
B
Execution Times
933
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC
No.
Instruction
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
Remarks
Data operation
ZRST(D)
11.1 + 0.19n
0.325
40
ZRST(T)
17.1 + 0.23n
0.325
ZRST(M)
20.7 + 0.02n
0.325
41
DECO
13.5
0.455
42
ENCO
18.0
0.455
43
SUM
12.7
16.9
0.325
0.585
44
BON
45
MEAN
46
47
14.4
15.1
0.455
0.845
11.8 + 0.41n
17.8 + 2.13n
0.455
0.845
ANS
20.4
19.7
ANR
7.0
0.065
48
SQR
9.7
12.1
0.325
0.585
49
FLT
9.8
9.5
0.325
0.585
High-speed processing
50
REF
4.5 + 1.39n
0.325
51
REFF
14.4 + 0.24n
0.195
52
MTR
5.9
5.5
53
HSCS
20.0
0.845
54
HSCR
20.0
0.845
55
HSZ
22.0
1.105
56
SPD
16.0
16.0
12.6
12.6
57
PLSY
20.0
13.6
6.9
6.9
58
PWM
10.6
6.2
59
PLSR
11.2
11.2
7.0
7.0
Handy instructions
60
IST
28.5
0.455
61
SER
16.4 + 1.4n
18.5 + 2.13n
0.585
1.105
62
ABSD
19 + 0.85n
20.0 + 1.23n
0.585
1.105
63
INCD
23.7
6.5
64
TTMR
10.4
9.2
65
STMR
19.0
21.0
66
ALT
11.6
0.2
67
RAMP
15.0
7.5
68
ROTC
25.8
24.8
69
SORT
18.4
6.6
TKY
21.5
21.8
5.2
5.2
71
HKY
32.0
32.3
5.7
5.7
72
DSW
26.8
22.1
73
SEGD
10.8
0.325
74
SEGL
22.3
7.5
75
ARWS
28.8
5.2
76
ASC
19.8
0.715
77
PR
24.0
13.6
934
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Execution time in ON status (s)
Instruction
Remarks
32-bit instruction
16-bit instruction
32-bit instruction
FROM*1
141 + 419n
119 + 841n
0.585
1.105
FROM*2
107 + 903n
119 + 1791n
0.585
1.105
FROM*3
27.9 + 108n
17.6 + 187.4n
0.585
1.105
TO*1
87 + 483n
73 + 967n
0.585
1.105
TO*2
73 + 967n
67 + 1923n
0.585
1.105
96.7 + 119.2n
17.3 + 297.7n
0.585
1.105
78
79
*3
TO
When the instruction is executed to BFM #0 to BFM #31 in a special function unit/block for the FX0N/FX2N/
FX2NC Series or in the CC-Link/LT built in the FX3UC-32MT-LT(-2)
*2.
When the instruction is executed to BFM #32 or later in a special function unit/block for the FX0N/FX2N/FX2NC
Series or in the CC-Link/LT built in the FX3UC-32MT-LT(-2)
*3.
When the instruction is executed to a BFM in a special function unit/block for the FX3U/FX3UC Series
External FX device
RS
15.6
5.7
PRUN
17.1 + 1.67n
18.2 + 2.9n
0.325
0.585
82
ASCI
13.5 + 1.45n
0.455
83
HEX
13.6 + 1.89n
0.455
84
CCD
13.6 + 1.63n
0.455
VRRD
129.50
0.325
VRSC
129.94
0.325
87
RS2
18.1
5.3
88
PID
20.0
8.9
89
35
SFCSTL
Programming
85
86
34
FNC300-FNC305
FX3U-CF-ADP
80
81
Data move 2
101
102 ZPUSH
16.0
0.195
103 ZPOP
0.195
105
106
107
108
109
37
Special Device
16.0
104
36
Interrupt
Function
100
Floating point
110 ECMP
18.2
0.845
111 EZCP
21.6
1.105
112 EMOV
10.0
0.585
114
115
116 ESTR
27 + 1.7n + 1.26m
0.845
26 + 3.8n
0.585
10.0
0.585
119 EBIN
11.9
0.585
120 EADD
14.2
0.845
121 ESUB
14.2
0.845
122 EMUL
14.1
0.845
123 EDIV
17.7
0.845
B
Execution Times
n: Number of character
digits
m: Number of digits in
decimal part
Version Up
Information
117 EVAL
118 EBCD
38
Error Code
113
33
FNC290-FNC299
Extension File
Register Control
*1.
32
FNC280-FNC289
High-Speed
Processing 2
16-bit instruction
FNC277-FNC279
Data
Transfer 3
FNC
No.
935
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC
No.
Instruction
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
Remarks
Floating point
124 EXP
11.9
0.585
125 LOGE
24.0
0.585
126 LOG10
24.3
0.585
127 ESQR
10.6
0.585
128 ENEG
8.9
0.325
129 INT
13.2
13.0
0.325
0.585
130 SIN
12.0
0.585
131 COS
23.2
0.585
132 TAN
12.0
0.585
133 ASIN
13.5
0.585
134 ACOS
13.5
0.585
135 ATAN
12.0
0.585
136 RAD
14.9
0.585
14.9
0.585
138
139
11.7 + 0.38n
14.1 + 1.94n
0.455
0.845
137 DEG
Data operation 2
140 WSUM
141 WTOB
12.6 + 1.43n
0.455
142 BTOW
12.6 + 0.92n
0.455
143 UNI
11.6 + 0.4n
0.455
10.6 + 0.2n
0.455
145
146
7.7
8.0
0.195
0.325
13.2
15.2
6.5
7.7
150 DSZR
170.0
7.0
151 DVIT
178.0
178.0
7.1
7.1
152 TBL
*1
7.1
144 DIS
147 SWAP
148
149 SORT2
Positioning control
153
154
25.4
22.2
155 ABS
156 ZRN
58.0
62.0
7.1
7.1
157 PLSV
144.0
144.0
7.1
7.1
158 DRVI
178.0
178.0
7.1
7.1
159 DRVA
178.0
178.0
7.1
7.1
*1.
The instruction execution time is as shown below depending on the executed positioning type (instruction)
Positioning type
936
Operation instruction
DDVIT instruction
178.0 s
DPLSV instruction
144.0 s
DDRVI instruction
178.0 s
DDRVA instruction
178.0 s
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Execution time in ON status (s)
Instruction
16-bit instruction
32-bit instruction
32-bit instruction
FNC277-FNC279
Data
Transfer 3
FNC
No.
Remarks
21.3
0.715
161 TZCP
22.6
0.585
162 TADD
13.4
0.455
0.455
10.8
11.0
0.325
0.585
165 STOH
11.4
11.6
0.325
0.585
166 TRD
10.0
0.195
167 TWR
344.4
0.195
15.5
16.1
15.2
15.9
170 GRY
10.2
10.7
0.325
0.585
171 GBIN
15.4
16.0
0.325
0.585
168
169 HOUR
33
FNC290-FNC299
Extension File
Register Control
13.4
FNC280-FNC289
High-Speed
Processing 2
163 TSUB
164 HTOS
32
External device
176
1404
0.455
FX0N-3A
1828
0.455
FX2N-2AD
WR3A(3A)
1466
0.455
FX0N-3A
WR3A(2DA)
2919
0.455
FX2N-2DA
33.7
0.325
8.5
0.195
34
FNC300-FNC305
FX3U-CF-ADP
177
RD3A(3A)
RD3A(2AD)
Extension function
180
35
Other instructions
182 COMRD
183
184 RND
185
186 DUTY
188 CRC
189 HCMOV
6.0
12.6 + 0.82n
0.455
14.8
0.845
36
Interrupt
Function
187
6.0
SFCSTL
Programming
181
191
192 BK+
13.1 + 0.66n
13.9 + 1.23n
0.585
1.105
193 BK-
13.1 + 0.66n
13.9 + 1.23n
0.585
1.105
194 BKCMP=
19.6 + 1.88n
20.3 + 2.26n
0.585
1.105
195 BKCMP>
19.6 + 1.88n
20.3 + 2.26n
0.585
1.105
196 BKCMP<
19.6 + 1.88n
20.3 + 2.26n
0.585
1.105
197 BKCMP<>
19.6 + 1.88n
20.3 + 2.26n
0.585
1.105
198 BKCMP<=
19.6 + 1.88n
20.3 + 2.26n
0.585
1.105
199 BKCMP>=
19.6 + 1.88n
20.3 + 2.26n
0.585
1.105
200 STR
34.6
47.0
0.455
0.845
201 VAL
20.7
29.2
0.455
0.845
202 $+
24.8 + 1.5m
0.455
m: Number of character
strings
203 LEN
12 + 0.44m
0.325
m: Number of character
strings
0.455
n: Number of character
strings
m: Number of character data
n: Number of character
strings
m: Number of character data
37
Special Device
38
Error Code
0.455
937
B
Execution Times
205 LEFT
Version Up
Information
204 RIGHT
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC
No.
Instruction
Remarks
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
206 MIDR
25 + 0.59n + 0.68m
0.455
n: Character position
m: Number of characters
207 MIDW
0.455
n: Character position
m: Number of stored
characters
208 INSTR
20.6 + 2.98m
0.585
16 + 1.52n
0.325
209 $MOV
*1.
m: Number of searched
characters*1
Number of characters from the head of the searched character string to detected character
Data operation 3
210 FDEL
43 + 0.95m
211 FINS
63 + 0.98m
212 POP
7.8
0.455
213 SFR
9.3
0.325
9.3
0.325
215
216
217
218
219
214 SFL
*2.
*3.
D
D
Data comparison
220
221
222
223
224 LD=
1.22
1.48
1.22
1.48
225 LD>
1.22
1.48
1.22
1.48
226 LD<
1.22
1.48
1.22
1.48
228 LD<>
1.22
1.48
1.22
1.48
229 LD<=
1.22
1.48
1.22
1.48
230 LD>=
1.22
1.48
1.22
1.48
232 AND=
1.22
1.48
1.22
1.48
233 AND>
1.22
1.48
1.22
1.48
234 AND<
1.22
1.48
1.22
1.48
1.22
1.48
1.22
1.48
227
231
235
236 AND<>
938
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Instruction
FNC277-FNC279
Data
Transfer 3
FNC
No.
Remarks
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
237 AND<=
1.22
1.48
1.22
1.48
238 AND>=
1.22
1.48
1.22
1.48
240 OR=
1.22
1.48
1.22
1.48
241 OR>
1.22
1.48
1.22
1.48
242 OR<
1.22
1.48
1.22
1.48
244 OR<>
1.22
1.48
1.22
1.48
245 OR<=
1.22
1.48
1.22
1.48
Data comparison
1.22
1.48
1.22
1.48
247
248
249
34
FNC300-FNC305
FX3U-CF-ADP
246 OR>=
33
FNC290-FNC299
Extension File
Register Control
243
FNC280-FNC289
High-Speed
Processing 2
239
32
35
251
252
253
254
255
8.1
8.6
0.585
1.105
256 LIMIT
257 BAND
8.1
8.6
0.585
1.105
258 ZONE
7.9
8.5
0.585
1.105
259 SCL
15.9
16.8
0.455
0.845
260 DABIN
13.7
19.5
0.325
0.585
261 BINDA
16.7
23.1
0.325
0.585
263
264
265
266
267
268
2.79 + 5.21n
29.06 + 7.94n
0.455
0.845
269 SCL2
37
38
Error Code
Special Device
262
36
Interrupt
Function
SFCSTL
Programming
250
n: Number of data
6.5
22.7
6.5
272 IVRD
26.8
6.5
273 IVWR
24.7
6.5
274 IVBWR
31.0
6.5
29.6
6.5
106.55
30.4
275 IVMC
276 ADPRW
A
Version Up
Information
270 IVCK
271 IVDR
B
Execution Times
939
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC
No.
Instruction
16-bit instruction
32-bit instruction
16-bit instruction
32-bit instruction
Remarks
Data move 3
RBFM*1
50+900n
0.715
RBFM*2
244 + 103n
0.715
WBFM*1
24 + 966n
0.715
WBFM*2
292 + 116n
0.715
277
278
279
*1.
When the instruction is executed to a BFM in a special function unit/block for the FX0N/FX2N/FX2NC Series or
in the CC-Link/LT built in the FX3UC-32MT-LT(-2)
*2.
When the instruction is executed to a BFM in a special function unit/block for the FX3U/FX3UC Series
High-speed processing 2
30.0
1.365
281
282
283
284
285
286
287
288
289
280 HSCT
13.2 + 0.44n
0.325
291 SAVER
166n
6.4
292 INITR
17600n
0.325
293 LOGR
244 + 17.9n
0.715
294 RWER
46700n
0.325
295 INITER
17300n
0.325
296
to
299
FX3U-CF-ADP
300 FLCRT
83.2
6.64
301 FLDEL
49.1
6.32
302 FLWR
77.9 + 2.9n
6.26
303 FLRD
59.2 + 4.25n
6.18
304 FLCMD
50.9
6.26
305 FLSTRD
50.9
6.24
*3.
940
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
FX3S PLC
Applied instruction
33
34
35
36
Interrupt
Function
SFCSTL
Programming
FNC300-FNC305
FX3U-CF-ADP
FNC290-FNC299
Extension File
Register Control
32
Remarks
FNC280-FNC289
High-Speed
Processing 2
Execution time
FNC277-FNC279
Data
Transfer 3
31
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
941
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
942
Execution time
Execution time at rising edge of input: Execution time in ON status = 4.98 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 7.81 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 7.77 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 6.37 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 6.47 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 7.07 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 7.03 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 3.48 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 3.48 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 6.42 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 6.42 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status = 6.42 s
Non-execution time: Execution time in OFF status = 1.44 s
Execution time at rising edge of input: Execution time in ON status + 0.68 s
Non-execution time: Execution time in OFF status + 0.6 s
Remarks
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Programming Manual - Basic & Applied Instruction Edition
31
Applied instruction
MOV instruction (FNC 12)
BCD instruction (FNC 18)
33
34
35
SFCSTL
Programming
32
FNC300-FNC305
FX3U-CF-ADP
FNC290-FNC299
Extension File
Register Control
Remarks
FNC280-FNC289
High-Speed
Processing 2
Execution time
FNC277-FNC279
Data
Transfer 3
36
FX3U/FX3UC PLCs
Execution time
Execution time at rising edge of input: Execution time in ON status
Interrupt
Function
Applied instruction
Remarks
1.22 s in MOVP instruction
37
Special Device
38
Error Code
A
Version Up
Information
B
Execution Times
943
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Appendix B-6-1
FX3U/FX3UC PLCs
Specified device type
Condition
Bit device
Word device
Without indexing
0.065
With indexing
11.9
Bit specification
8.8
FX3S/FX3G/FX3GC PLCs do not support indexing of bit devices and contact instructions with bit specification of word
devices in basic instructions.
Appendix B-6-2
ON
D (destination)
Without indexing (s)
S (source)
T,C,D
KnY,KnM,KnS
KnX,KnY,KnM,KnS*1
0.64
0.72
14.68
8.28
T,C,D
K,H
0.88
0.48
0.84
0.52
13.08
12.28
6.68
5.78
KnX,KnY,KnM,KnS*1
T,C,D
K,H
OFF
*1.
KnY,KnM,KnS*1
0.36
T,C,D
0.58
When K4 is specified, and the head bit device number is a multiple of 8 (K4M0, K4M8 ...)
*1
ON
KnX,KnY,KnM,KnS
T,C,D
K,H
OFF
KnX,KnY,KnM,KnS*1
T,C,D
K,H
*1.
944
D (destination)
Without indexing (s)
S (source)
KnY,KnM,KnS*1
T,C,D
KnY,KnM,KnS
0.68
0.88
19.48
8.68
1.24
0.56
1.04
0.56
18.18
17.18
7.28
6.28
0.4
T,C,D
0.58
When K8 is specified, and the head bit device number is a multiple of 8 (K8M0, K8M8 ...)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
Command
contact
S (source)
OFF
KnX,KnY,KnM,KnS*1
T,C,D,R
K,H
*1.
0.64
0.72
14.68
8.28
1.56
1.8
16.42
9.92
0.88
0.48
0.84
0.52
13.08
12.28
6.68
5.78
1.84
1.24
1.96
1.4
14.82
13.22
8.32
7.22
0.36
0.58
0.52
33
0.82
When K4 is specified, and the head bit device number is a multiple of 8 (K4M0, K4M8 ...)
S (source)
OFF
KnX,KnY,KnM,KnS*1
T,C,D,R
K,H
*1.
0.68
0.88
19.48
8.68
1.6
2.12
21.32
10.32
1.24
0.56
1.04
0.56
18.18
17.18
7.28
6.28
2.2
1.48
2.4
1.88
19.92
19.12
9.02
8.22
35
0.4
0.58
0.62
SFCSTL
Programming
ON
KnX,KnY,KnM,KnS*1
T,C,D,R
K,H
0.82
When K8 is specified, and the head bit device number is a multiple of 8 (K8M0, K8M8 ...)
36
D (destination)
Without indexing (s)
S (source)
T,C,D
KnX,KnY,KnM,KnS
15.5
12.1
13.8
T,C,D
12.1
209.7
16.6
14.5
14.8
212.8
13.8
0.64*1
10.4
10.4
12.1
211.3
16.9
14.8
15.1
213.1
131.8
128.5
130.2
377.9
133.1
129.9
131.5
379.4
12.5
0.64*1
10.8
210.1
15.4
13.3
13.6
211.6
U \G
*3
K,H
U \G
212.9
KnY,KnM,KnS
T,C,D
18.6
16.6
16.9
U \G *3
214.7
KnY,KnM,KnS
KnX,KnY,KnM,KnS
0.32*2
T,C,D
R
OFF
U \G
38
0.32*2
*1. *2.These combinations are handled as exceptions because high-speed processing is adopted in the technique.
*3.
When the instruction is executed for a BFM in a special function unit/block for FX3U/FX3UC Series.
Error Code
K,H
*3
0.325
(0.325 in combinations other than *2.)
37
Special Device
ON
Interrupt
Function
FX3U/FX3UC PLCs
- MOV instruction (16-bit operation)
Command
contact
34
FNC300-FNC305
FX3U-CF-ADP
Command
contact
D (destination)
Standard mode
Extension mode
Without indexing (s)
With indexing (s)
Without indexing (s)
With indexing (s)
KnY,
KnY,
KnY,
KnY,
KnM,
KnM,
KnM,
KnM,
T,C,D,R
T,C,D,R
T,C,D,R
T,C,D,R
KnS*1
KnS
KnS*1
KnS
FNC290-FNC299
Extension File
Register Control
KnX,KnY,KnM,KnS*1
T,C,D,R
K,H
32
FNC280-FNC289
High-Speed
Processing 2
ON
D (destination)
Standard mode
Extension mode
Without indexing (s)
With indexing (s)
Without indexing (s)
With indexing (s)
KnY,
KnY,
KnY,
KnY,
KnM,
KnM,
KnM,
KnM,
T,C,D,R
T,C,D,R
T,C,D,R
T,C,D,R
KnS*1
KnS
KnS*1
KnS
FNC277-FNC279
Data
Transfer 3
FX3G/FX3GC PLCs
- MOV instruction (16-bit operation)
A
Version Up
Information
B
Execution Times
945
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Command
contact
ON
S (source)
KnX,KnY,KnM,KnS
15.5
12.4
13.8
U \G *3
311.1
18.7
17.0
17.1
U \G *3
313.0
T,C,D
12.4
10.7
307.4
17.0
15.2
15.3
310.5
13.8
1.48*1
10.7
12.2
308.9
17.1
15.3
15.4
310.6
199.8
195.9
197.4
542.6
201.2
197.3
198.8
544.0
13.0
1.48*1
11.4
308.0
16.2
14.4
14.5
309.7
KnY,KnM,KnS
U \G
*3
K,H
T,C,D
KnY,KnM,KnS
T,C,D
KnX,KnY,KnM,KnS
1.48*2
T,C,D
0.585
(0.585 in combinations other than *2.)
OFF
U \G
*3
1.48*2
K,H
*1. *2.These combinations are handled as exceptions because high-speed processing is adopted in the technique.
*3.
When the instruction is executed for a BFM in a special function unit/block for FX3U/FX3UC Series.
S (source)
KnY,KnM,KnS*1
T,C,D
KnY,KnM,KnS
T,C,D
KnX,KnY,KnM,KnS*1
2.12
2.2
11.28
9.18
T,C,D
2.24
2.36
9.78
7.58
K,H
1.4
1.52
8.88
6.78
*1.
When K4 is specified, and the head bit device number is a multiple of 8 (K4M0, K4M8 ...)
S (source)
T,C,D
KnY,KnM,KnS
T,C,D
KnX,KnY,KnM,KnS*1
2.52
2.76
11.68
9.68
T,C,D
2.8
10.72
8.28
K,H
1.4
1.76
9.28
7.28
*1.
946
KnY,KnM,KnS*1
When K8 is specified, and the head bit device number is a multiple of 8 (K8M0, K8M8 ...)
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
31
FNC277-FNC279
Data
Transfer 3
FX3G/FX3GC PLCs
- Data comparison instruction (16-bit operation)
D (destination)
Standard mode
S (source)
KnY,
KnM,
KnS
T,C,D,R
KnS*1
KnY,
KnM,
KnS
T,C,D,R
KnY,
KnM,
KnS
T,C,D,R
10.7
KnX,KnY,KnM,KnS*1
2.12
2.2
11.28
9.18
3.12
13.12
T,C,D,R
2.24
2.36
9.78
7.58
3.16
3.24
11.52
9.32
K,H
1.4
1.52
8.88
6.78
2.12
2.24
10.32
8.12
*1.
33
When K4 is specified, and the head bit device number is a multiple of 8 (K4M0, K4M8 ...)
FNC290-FNC299
Extension File
Register Control
T,C,D,R
KnY,
KnM,
KnS
T,C,D,R
KnY,
KnM,
KnS
T,C,D,R
11.32
KnX,KnY,KnM,KnS*1
2.52
2.76
11.68
9.68
3.48
3.68
13.32
T,C,D,R
2.8
10.72
8.28
3.72
3.92
11.92
9.92
K,H
1.4
1.76
9.28
7.28
2.36
2.68
11.12
9.12
*1.
When K8 is specified, and the head bit device number is a multiple of 8 (K8M0, K8M8 ...)
35
SFCSTL
Programming
FX3U/FX3UC PLCs
- Data comparison instruction (16-bit operation)
D (destination)
S (source)
KnY,KnM,
KnS
T,C,D
KnX,KnY,KnM,KnS
16.2
13.0
14.7
T,C,D
13.0
1.22*1
11.3
129.9
17.4
15.4
15.7
132.8
14.7
11.3
12.9
131.4
17.6
15.7
16.0
133.1
133.0
129.3
131.4
298.2
134.3
131.0
138.9
299.4
13.4
1.22*1
11.7
130.2
16.3
14.2
14.5
131.6
*2
K,H
133.1
KnY,KnM,
KnS
T,C,D
19.4
17.4
17.6
U \G
*2
134.7
These combinations are handled as exceptions because high-speed processing is adopted in the technique.
*2.
When the instruction is executed for a BFM in a special extension unit/block for FX3U/FX3UC Series.
T,C,D
KnX,KnY,KnM,KnS
16.4
13.2
14.7
T,C,D
13.2
1.48*1
11.6
R
U \G
K,H
*2
T,C,D
201.1
19.6
17.9
18.0
202.7
197.1
17.9
16.1
16.2
200.3
U \G
*2
U \G
14.7
11.6
13.0
198.6
18.0
16.2
16.3
200.4
201.0
197.1
198.6
432.4
202.4
198.5
200.0
433.8
13.9
1.48*1
12.3
197.8
17.1
15.3
15.4
199.4
*2
These combinations are handled as exceptions because high-speed processing is adopted in the technique.
*2.
When the instruction is executed for a BFM in a special extension unit/block for FX3U/FX3UC Series.
A
Version Up
Information
*1.
38
Error Code
KnY,KnM,
KnS
37
Special Device
*1.
36
Interrupt
Function
U \G
U \G
*2
34
FNC300-FNC305
FX3U-CF-ADP
T,C,D,R
KnY,
KnM,
KnS
KnS*1
Extension mode
32
FNC280-FNC289
High-Speed
Processing 2
KnY,
KnM,
Extension mode
B
Execution Times
947
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
11
12
Comparison instructions
13
14
15
16
Rotation instructions
17
Extension register/extension
instructions
Shift instructions
18
FX3U-CF-ADP instructions
19
10
FNC No.
Function
FNC 12
Move
249
SMOV
FNC 13
Shift Move
252
CML
FNC 14
Complement
254
BMOV
FNC 15
Block Move
256
FMOV
FNC 16
Fill Move
260
PRUN
FNC 81
458
XCH
FNC 17
Exchange
262
SWAP
FNC147
Byte Swap
542
EMOV
FNC112
490
HCMOV
FNC189
596
Ref.
Page
Mnemonic
FNC No.
LD=
FNC224
LD>
FNC225
LD<
FNC226
LD<>
FNC228
LD<=
FNC229
LD>=
FNC230
AND=
FNC232
AND>
FNC233
AND<
FNC234
AND<>
FNC236
AND<=
FNC237
BCD
FNC 18
Conversion to
Binary Coded Decimal
BIN
FNC 19
Conversion to Binary
267
FNC170
Decimal to
Gray Code Conversion
581
FNC171
Gray Code to
Decimal Conversion
582
FLT
FNC 49
Conversion to
Floating Point
336
INT
FNC129
Floating Point to
Integer Conversion
517
EBCD
FNC118
502
AND>=
FNC238
EBIN
FNC119
Scientific Notation to
Floating Point Conversion
503
OR=
FNC240
RAD
FNC136
528
OR>
FNC241
FNC137
530
OR<
FNC242
GRY
GBIN
DEG
948
FNC No.
register
control
3. Comparison instructions
Ref.
Page
MOV
Mnemonic
file
264
Function
Load Compare
S1
S2
Load Compare
S1
>
S2
Load Compare
S1
<
S2
Load Compare
S1
S2
Load Compare
S1
S2
Load Compare
S1
S2
AND Compare
S1
S2
AND Compare
S1
>
S2
AND Compare
S1
<
S2
AND Compare
S1
S2
AND Compare
S1
S2
AND Compare
S1
S2
OR Compare
S1
S2
OR Compare
S1
>
S2
OR Compare
S1
<
S2
Ref.
Page
654
654
654
654
654
654
656
656
656
656
656
656
658
658
658
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
C
Mnemonic
FNC No.
OR<>
FNC244
FNC245
OR Compare
S1
S2
OR Compare
S1
S2
OR Compare
Ref.
Page
658
658
SQR
FNC 48
Square Root
335
ESQR
FNC127
515
EXP
FNC124
509
LOGE
FNC125
Floating Point
Natural Logarithm
511
LOG10
FNC126
Floating Point
Common Logarithm
513
519
OR>=
FNC246
CMP
FNC 10
Compare
245
ZCP
FNC 11
Zone Compare
247
SIN
FNC130
ECMP
FNC110
487
COS
FNC131
520
EZCP
FNC111
488
TAN
FNC132
521
ASIN
FNC133
522
HSCS
FNC 53
350
ACOS
FNC134
524
HSCR
FNC 54
356
ATAN
FNC135
526
HSZ
FNC 55
359
FNC184
Random Number
Generation
589
HSCT
FNC280
High-Speed Counter
Compare With Data Table
709
BKCMP=
FNC194
BKCMP>
FNC195
BKCMP<
FNC196
BKCMP<>
FNC197
BKCMP<=
FNC198
BKCMP>=
FNC199
S1
S2
S1
S2
S1
S2
>
S1
S2
<
S1
S2
S1
S2
S1
S2
658
Function
Ref.
Page
Mnemonic
FNC No.
Function
7. Rotation instructions
Mnemonic
FNC No.
ROR
FNC 30
Rotation Right
293
607
ROL
FNC 31
Rotation Left
295
RCR
FNC 32
297
RCL
FNC 33
299
607
607
Function
Ref.
Page
607
8. Shift instructions
Mnemonic
FNC No.
SFTR
FNC 34
Function
607
607
RND
Ref.
Page
ADD
FNC 20
Addition
271
SUB
FNC 21
Subtraction
273
MUL
FNC 22
Multiplication
275
Ref.
Page
301
SFTL
FNC 35
303
SFR
FNC213
648
SFL
FNC214
650
WSFR
FNC 36
306
WSFL
FNC 37
308
SFWR
FNC 38
Shift Write
[FIFO/FILO Control]
310
SFRD
FNC 39
313
FNC212
645
DIV
FNC 23
Division
278
EADD
FNC120
505
ESUB
FNC121
506
EMUL
FNC122
Floating Point
Multiplication
507
Mnemonic
EDIV
FNC123
508
ZRST
FNC 40
Zone Reset
316
FNC 41
Decode
320
POP
Function
Ref.
Page
BK+
FNC192
601
DECO
BK-
FNC193
604
ENCO
FNC 42
Encode
323
FNC 45
Mean
330
INC
FNC 24
Increment
281
MEAN
DEC
FNC 25
Decrement
283
WSUM
FNC140
532
SUM
FNC 43
325
Ref.
Page
BON
FNC 44
328
NEG
FNC 29
Negation
290
ENEG
FNC128
516
Mnemonic
FNC No.
WAND
FNC 26
284
WTOB
FNC141
WORD to BYTE
534
WOR
FNC 27
Logical Word OR
286
BTOW
FNC142
BYTE to WORD
536
WXOR
FNC 28
Logical Exclusive OR
288
UNI
FNC143
538
FNC144
4-bit Grouping of
Word Data
540
DIS
949
D
Discontinued
models
OR<=
Function
Applicable
Instruction List
3. Comparison instructions
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC No.
Function
FNC No.
Function
Ref.
Page
CCD
FNC 84
Check Code
466
DI
FNC 05
Disable Interrupt
236
CRC
FNC188
592
FEND
FNC 06
237
LIMIT
FNC256
Limit Control
661
FOR
FNC 08
241
BAND
FNC257
664
NEXT
FNC 09
242
ZONE
FNC258
Zone Control
667
SCL
FNC259
Scaling
(Coordinate by Point Data)
670
SCL2
FNC269
Scaling 2
(Coordinate by X/Y Data)
680
SORT
FNC 69
418
SORT2
FNC149
543
SER
FNC 61
399
FDEL
FNC210
641
FINS
FNC211
643
FNC No.
Function
Ref.
Page
ESTR
FNC116
491
EVAL
FNC117
Character String to
Floating Point Conversion
STR
FNC200
Ref.
Page
Mnemonic
FNC No.
REF
FNC 50
Refresh
339
REFF
FNC 51
343
Ref.
Page
Mnemonic
FNC No.
TCMP
FNC160
563
TZCP
FNC161
565
TADD
FNC162
567
TSUB
FNC163
569
TRD
FNC166
575
TWR
FNC167
576
497
HTOS
FNC164
Hour to Second
Conversion
571
612
STOH
FNC165
Second to Hour
Conversion
573
FNC201
617
DABIN
FNC260
Decimal ASCII to
BIN Conversion
674
BINDA
FNC261
677
ASCI
FNC 82
Hexadecimal to ASCII
Conversion
460
HEX
FNC 83
ASCII to Hexadecimal
Conversion
463
VAL
Ref.
Page
Mnemonic
FNC No.
ABS
FNC155
553
DSZR
FNC150
548
ZRN
FNC156
Zero Return
554
FNC152
552
$MOV
FNC209
638
$+
FNC202
622
LEN
FNC203
624
RIGHT
FNC204
626
FNC205
628
MIDR
FNC206
Random Selection of
Character Strings
630
MIDW
FNC207
Random Replacement of
Character Strings
633
INSTR
FNC208
636
Mnemonic
FNC No.
COMRD
FNC182
587
RS
FNC 80
Serial Communication
RS2
FNC 87
Serial Communication 2
473
IVCK
FNC270
685
LEFT
950
Mnemonic
FNC No.
Function
Ref.
Page
TBL
DVIT
FNC151
Interrupt Positioning
550
DRVI
FNC158
Drive to Increment
558
DRVA
FNC159
Drive to Absolute
560
PLSV
FNC157
556
PLSY
FNC 57
Pulse Y Output
375
FNC 59
Acceleration/Deceleration
Setup
383
PLSR
Ref.
Page
456
IVDR
FNC271
Inverter Drive
687
IVRD
FNC272
689
IVWR
FNC273
691
693
CJ
FNC 00
Conditional Jump
221
CALL
FNC 01
Call Subroutine
228
SRET
FNC 02
Subroutine Return
232
IVBWR
FNC274
Inverter Parameter
Block Write
IRET
FNC 03
Interrupt Return
233
IVMC
FNC275
695
EI
FNC 04
Enable Interrupt
235
ADPRW
FNC276
MODBUS Read/Write
697
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
C
Function
FNC No.
FROM
FNC 78
448
TO
FNC 79
Write To a Special
Function Block
453
RD3A
FNC176
583
WR3A
FNC177
Write to Dedicated
Analog Block
584
RBFM
FNC278
702
WBFM
FNC279
706
FNC No.
Function
Ref.
Page
WDT
FNC 07
ALT
FNC 66
Alternate State
411
ANS
FNC 46
332
ANR
FNC 47
Annunciator Reset
334
HOUR
FNC169
Hour Meter
578
RAMP
FNC 67
413
SPD
FNC 56
Speed Detection
371
PWM
FNC 58
380
DUTY
FNC186
590
PID
FNC 88
476
ZPUSH
FNC102
481
Ref.
Page
ZPOP
FNC103
484
407
Mnemonic
239
Mnemonic
FNC No.
LOADR
FNC290
Load From ER
715
TTMR
FNC 64
Teaching Timer
SAVER
FNC291
Save to ER
718
STMR
FNC 65
Special Timer
409
RWER
FNC294
Rewrite to ER
733
ABSD
FNC 62
402
INITR
FNC292
Initialize R and ER
726
INITER
FNC295
Initialize ER
738
INCD
FNC 63
Incremental Drum
Sequencer
405
LOGR
FNC293
Logging R and ER
729
ROTC
FNC 68
415
IST
FNC 60
Initial State
389
MTR
FNC 52
Input Matrix
346
TKY
FNC 70
422
HKY
FNC 71
Hexadecimal Input
425
DSW
FNC 72
Digital Switch
(Thumbwheel Input)
429
SEGD
FNC 73
432
SEGL
FNC 74
434
ARWS
FNC 75
Arrow Switch
439
ASC
FNC 76
443
PR
FNC 77
445
VRRD
FNC 85
Volume Read
469
VRSC
FNC 86
Volume Scale
471
18.FX3U-CF-ADP instructions
Mnemonic
FNC No.
FLCRT
FNC300
Function
File create / check
Ref.
Page
742
FLDEL
FNC301
744
FLWR
FNC302
Data write
746
FLRD
FNC303
Data read
749
FLCMD
FNC304
FX3U-CF-ADP command
751
FLSTRD
FNC305
753
951
D
Discontinued
models
Mnemonic
Applicable
Instruction List
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
FNC No.
Function
Ref.
Page
Symbol
FNC No.
Function
Ref.
Page
BMOV
FNC 15
Block Move
256
BON
FNC 44
328
BTOW
FNC142
BYTE to WORD
536
$+
FNC202
622
$MOV
FNC209
638
FNC 01
Call Subroutine
228
FNC155
CALL
ABS
553
CCD
FNC 84
Check Code
466
ABSD
FNC 62
402
CJ
FNC 00
Conditional Jump
221
FNC 14
Complement
254
FNC 10
Compare
245
FNC182
587
ACOS
FNC134
524
CML
ADD
FNC 20
Addition
271
CMP
ADPRW
FNC276
MODBUS Read/Write
697
ALT
FNC 66
Alternate State
411
AND<
FNC234
AND<>
FNC236
AND=
FNC232
AND>
FNC233
AND<=
FNC237
AND>=
ANR
FNC238
AND Compare
S1
<
S2
AND Compare
S1
S2
AND Compare
S1
S2
AND Compare
S1
>
S2
AND Compare
S1
S2
AND Compare
S1
S2
656
COMRD
COS
FNC131
520
CRC
FNC188
592
FNC260
674
D
656
656
656
DABIN
DEC
FNC 25
Decrement
283
DECO
FNC 41
Decode
320
DEG
FNC137
530
DI
FNC 05
Disable Interrupt
236
DIS
FNC144
4-bit Grouping of
Word Data
540
DIV
FNC 23
Division
278
DRVA
FNC159
Drive to Absolute
560
DRVI
FNC158
Drive to Increment
558
656
656
FNC 47
Annunciator Reset
334
ANS
FNC 46
332
ARWS
FNC 75
Arrow Switch
439
DSW
FNC 72
Digital Switch
(Thumbwheel Input)
429
ASC
FNC 76
443
DSZR
FNC150
548
FNC 82
Hexadecimal to ASCII
Conversion
460
DUTY
FNC186
590
DVIT
FNC151
Interrupt Positioning
550
EADD
FNC120
505
ASCI
ASIN
FNC133
522
ATAN
FNC135
526
BAND
FNC257
664
EBCD
FNC118
502
BCD
FNC 18
Conversion to Binary
Coded Decimal
264
EBIN
FNC119
Scientific Notation to
Floating Point Conversion
503
BIN
FNC 19
Conversion to Binary
267
ECMP
FNC110
487
BINDA
FNC261
677
EDIV
FNC123
508
BK-
FNC193
604
BK+
FNC192
601
BKCMP<
BKCMP<=
FNC196
FNC198
BKCMP<>
FNC197
BKCMP=
FNC194
BKCMP>
BKCMP>=
952
Mnemonic
FNC195
FNC199
S1
<
S2
S1
S2
S1
S2
S1
S2
S1
>
S2
S1
S2
EI
FNC 04
Enable Interrupt
235
EMOV
FNC112
490
EMUL
FNC122
Floating Point
Multiplication
507
ENCO
FNC 42
Encode
323
ENEG
FNC128
516
ESQR
FNC127
515
ESTR
FNC116
491
ESUB
FNC121
506
EVAL
FNC117
Character String to
Floating Point Conversion
497
EXP
FNC124
509
FNC111
488
607
607
607
607
607
EZCP
607
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
C
FNC No.
Function
Ref.
Page
F
FNC210
641
FEND
FNC 06
237
FNC211
643
FLCMD
FNC304
FX3U-CF-ADP command
751
FLCRT
FNC300
742
FLDEL
FNC301
744
FLRD
FNC303
Data read
749
FLSTRD
FNC305
753
FLT
FNC 49
Conversion to Floating
Point
336
FLWR
FNC302
Data write
746
FMOV
FNC 16
Fill Move
260
FOR
FNC 08
241
FROM
FNC 78
448
HEX
582
FNC170
581
FNC189
FNC 83
FNC171
LD<>
FNC228
LD=
FNC224
LD>
FNC225
LD<=
FNC229
LD>=
FNC230
LEFT
FNC205
628
LEN
FNC203
624
<
S2
Load Compare
S1
S2
Load Compare
S1
S2
Load Compare
S1
>
S2
Load Compare
S1
S2
Load Compare
S1
S2
654
654
654
654
654
654
FNC256
Limit Control
661
FNC290
Load From ER
715
LOG10
FNC126
513
596
LOGE
FNC125
511
ASCII to Hexadecimal
Conversion
463
LOGR
FNC293
Logging R and ER
729
FNC 45
Mean
330
MIDR
FNC206
Random Selection of
Character Strings
630
MIDW
FNC207
Random Replacement of
Character Strings
633
MOV
FNC 12
Move
249
MTR
FNC 52
Input Matrix
346
MUL
FNC 22
Multiplication
275
NEG
FNC 29
Negation
290
NEXT
FNC 09
242
FNC 71
Hexadecimal Input
425
FNC169
Hour Meter
578
HSCR
FNC 54
356
HSCS
FNC 53
350
HSCT
FNC280
High-Speed Counter
Compare With Data Table
709
HSZ
FNC 55
359
FNC164
Hour to Second
Conversion
571
FNC 24
Increment
281
INCD
FNC 63
Incremental Drum
Sequencer
405
INITER
FNC295
Initialize ER
738
INITR
FNC292
Initialize R and ER
726
INSTR
FNC208
636
INT
FNC129
517
IRET
FNC 03
Interrupt Return
233
IST
FNC 60
Initial State
389
FNC274
693
IVBWR
S1
LOADR
HOUR
INC
Load Compare
FNC226
LIMIT
HKY
HTOS
Ref.
Page
LD<
H
HCMOV
Function
IVCK
FNC270
685
IVDR
FNC271
Inverter Drive
687
IVMC
FNC275
695
IVRD
FNC272
689
IVWR
FNC273
691
M
MEAN
O
OR<
FNC242
OR<>
FNC244
OR=
FNC240
OR>
FNC241
OR<=
FNC245
OR>=
FNC246
OR Compare
S1
<
S2
OR Compare
S1
S2
OR Compare
S1
S2
OR Compare
S1
>
S2
OR Compare
S1
S2
OR Compare
S1
S2
658
658
658
658
658
658
953
D
Discontinued
models
FINS
GRY
FNC No.
FDEL
GBIN
Mnemonic
Applicable
Instruction List
Mnemonic
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Mnemonic
FNC No.
Function
Ref.
Page
FNC No.
STMR
FNC 65
Special Timer
409
STOH
FNC165
Second to Hour
Conversion
573
STR
FNC200
612
SUB
FNC 21
Subtraction
273
PID
FNC 88
476
PLSR
FNC 59
Acceleration/Deceleration
Setup
383
PLSV
FNC157
556
PLSY
FNC 57
Pulse Y Output
375
POP
FNC212
645
PR
FNC 77
445
TADD
FNC162
567
PRUN
FNC 81
458
TAN
FNC132
521
PWM
FNC 58
380
TBL
FNC152
552
RAD
FNC136
528
TCMP
FNC160
563
TKY
FNC 70
422
RAMP
FNC 67
413
RBFM
FNC278
702
TO
FNC 79
Write To a Special
Function Block
453
SUM
FNC 43
325
SWAP
FNC147
Byte Swap
542
RCL
FNC 33
299
TRD
FNC166
575
RCR
FNC 32
297
TSUB
FNC163
569
RD3A
FNC176
583
TTMR
FNC 64
Teaching Timer
407
TWR
FNC167
576
REF
FNC 50
Refresh
339
TZCP
FNC161
565
REFF
FNC 51
343
FNC204
626
UNI
FNC143
538
VAL
FNC201
617
VRRD
FNC 85
Volume Read
469
VRSC
FNC 86
Volume Scale
471
RIGHT
RND
FNC184
Random Number
Generation
589
ROL
FNC 31
Rotation Left
295
ROR
FNC 30
Rotation Right
293
ROTC
FNC 68
415
RS
FNC 80
Serial Communication
456
RS2
FNC 87
Serial Communication 2
473
RWER
FNC294
Rewrite to ER
733
954
Function
Ref.
Page
Mnemonic
W
WAND
FNC 26
284
WBFM
FNC279
706
WDT
FNC 07
239
WOR
FNC 27
Logical Word OR
286
WR3A
FNC177
584
308
SAVER
FNC291
Save to ER
718
SCL
FNC259
Scaling
(Coordinate by Point Data)
670
FNC 37
FNC269
Scaling 2
(Coordinate by X/Y Data)
WSFL
SCL2
680
WSFR
FNC 36
306
FNC140
532
SEGD
FNC 73
432
WSUM
SEGL
FNC 74
434
WTOB
FNC141
WORD to BYTE
534
FNC 28
Logical Exclusive OR
288
FNC 17
Exchange
262
SER
FNC 61
399
WXOR
SFL
FNC214
650
SFR
FNC213
648
XCH
SFRD
FNC 39
313
SFTL
FNC 35
303
ZCP
FNC 11
Zone Compare
247
SFTR
FNC 34
301
ZONE
FNC258
Zone Control
667
484
SFWR
FNC 38
Shift Write
[FIFO/FILO Control]
310
ZPOP
FNC103
SIN
FNC130
519
ZPUSH
FNC102
481
SMOV
FNC 13
Shift Move
252
SORT
FNC 69
418
ZRN
FNC156
Zero Return
554
SORT2
FNC149
543
ZRST
FNC 40
Zone Reset
316
371
SPD
FNC 56
Speed Detection
SQR
FNC 48
Square Root
335
SRET
FNC 02
Subroutine Return
232
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
D Discontinued models
C
Applicable
Instruction List
Discontinued model
FX3U-232ADP
FX3U-485ADP
FX-PCS/WIN(-E)
FX-20P(-E)
FX-10DU(-E)
FX2N
FX2NC
FX-10P(-E)
FX-20DU
FX-232AW
FX-232AWC
FX-25DU-E
955
D
Discontinued
models
The table below shows discontinued models of MELSEC-F Series PLCs and programming tools described in this
manual.
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
D Discontinued models
MEMO
956
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Warranty
Warranty
Please confirm the following product warranty details before using this product.
3. Overseas service
Overseas, repairs shall be accepted by Mitsubishi's local
overseas FA Center. Note that the repair conditions at
each FA Center may differ.
6. Product application
1) In using the Mitsubishi MELSEC programmable logic
controller, the usage conditions shall be that the
application will not lead to a major accident even if any
problem or fault should occur in the programmable
logic controller device, and that backup and fail-safe
functions are systematically provided outside of the
device for any problem or fault.
2) The Mitsubishi programmable logic controller has been
designed and manufactured for applications in general
industries, etc. Thus, applications in which the public
could be affected such as in nuclear power plants and
other power plants operated by respective power
companies, and applications in which a special quality
assurance system is required, such as for Railway
companies or Public service purposes shall be
excluded from the programmable logic controller
applications.
In addition, applications in which human life or property
that could be greatly affected, such as in aircraft,
medical applications, incineration and fuel devices,
manned transportation, equipment for recreation and
amusement, and safety devices, shall also be
excluded from the programmable logic controller range
of applications.
However, in certain cases, some applications may be
possible, providing the user consults their local
Mitsubishi representative outlining the special
requirements of the project, and providing that all
parties concerned agree to the special circumstances,
solely at the users discretion.
957
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Revised History
Revised History
Date Created
Revision
Description
7/2005
First Edition
2/2006
Revision B
7.11 MEP, MEF
7.13 NOP
7.14 END
7.14 NOP
7.15 END
958
The FX3U-4AD, FX3U-4DA and FX3U-20SSC-H are added in the related manual
introduction section.
Note on battery voltage drop is added [Subsection 2.6.2].
The expression of battery maintenance is modified [Subsection 2.6.3].
The contents of latched type device initialization methods are modified and added
[Subsection 2.6.5].
Caution on using header and terminator in RS2 instruction is added [Section 16.6].
Note on setting the clock data from the FX-10DU-E/20DU-E/25DU-E is added
[Section 21.8 and Subsection 36.2.7].
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Revised History
Date Created
Revision
Description
3/2007
11/2007
11/2008
6/2009
11/2009
The baud rate "38400 bps" is supported in the RS and RS2 instructions, inverter
communication and computer link.
Customer keyword / permanent PLC lock is supported.
Errors are corrected.
8/2010
959
FX3S/FX3G/FX3GC/FX3U/FX3UC Series
Revised History
960
Date Created
Revision
Description
7/2011
2/2012
5/2012
5/2013
9/2013
HEAD OFFICE: TOKYO BUILDING, 2-7-3 MARUNOUCHI, CHIYODA-KU, TOKYO 100-8310, JAPAN
HIMEJI WORKS: 840, CHIYODA CHO, HIMEJI, JAPAN
MODEL
FX-P3-E
MODEL CODE
09R517
JY997D16601N
(MEE)