Fx-3u Programming Manual
Fx-3u Programming Manual
Foreword
This manual contains text, diagrams and explanations which will guide the reader through the safe and
correct installation, use, and operation of the 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.
1
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition
Outline Precautions
• This manual provides information for the use of the FX3U 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;
a) 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.
b) 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.
c) 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 distributor.
• 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
distributor.
Registration
• Microsoft® and Windows® are either registered trademarks or trademarks of Microsoft Corporation in the
United States and/or other countries.
• The company name and the product name to be described in this manual are the registered trademarks or
trademarks of each company.
2
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
Table of Contents
Related manuals...................................................................................................................... 14
Generic Names and Abbreviations Used in Manuals .......................................................... 19
1. Introduction 21
3. Instruction List 54
4. Devices in Detail 70
3
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
4
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
5.1 Numeric Values Handled in PLCs (Octal, Decimal, Hexadecimal and Real Numbers) .............. 126
5.1.1 Types of numeric values.............................................................................................................. 126
5.1.2 Conversion of numeric values ..................................................................................................... 127
5.1.3 Handling of numeric values in floating point operations .............................................................. 127
5.2 Specification of Constants K, H and E (Decimal, Hexadecimal and Real Number).................... 129
5.2.1 Constant K (decimal number)...................................................................................................... 129
5.2.2 Constant H (hexadecimal number).............................................................................................. 129
5.2.3 Constant E (real number) ............................................................................................................ 129
5.3 Character Strings ........................................................................................................................ 130
5.3.1 Character string constant ("ABC") ............................................................................................... 130
5.3.2 Character string data ................................................................................................................... 130
5.4 Specification of Digits for Bit Devices (Kn[ ]***)........................................................................... 131
5.5 Bit Specification of a Word Device (D[ ].b) .................................................................................. 132
5.6 Direct Specification of Buffer Memory (U[ ]\G[ ]) ......................................................................... 132
5.7 Indexing....................................................................................................................................... 133
5.7.1 Indexing in basic instructions....................................................................................................... 133
5.7.2 Indexing in applied instructions ................................................................................................... 134
5.7.3 Indexing example for instruction with limited number of use. ...................................................... 136
5
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
6
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
7
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
8
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
9
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
28.1 FNC224~230 – LD =, >, <, <>, <=, >= / Data Comparison ....................................................... 649
28.2 FNC232~238 – AND=, >, <, < >, <=, >= / Data Comparison .................................................... 652
28.3 FNC240~246 – OR=, >, <, < >, <=, >= / Data Comparison ...................................................... 655
10
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
32.1 FNC280 – HSCT / High Speed Counter Compare With Data Table......................................... 707
11
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
12
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents
Appendix C: Applied Instruction List [by Instruction Type/in Alphabetic Order] 886
Warranty................................................................................................................................. 895
13
FX3U/FX3UC Series Programmable Controllers Related manuals
Programming Manual - Basic & Applied Instruction Edition
Related manuals
For detailed explanation of programming (basic instructions, applied instructions and step ladder instructions)
in 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 distributor you have purchased the product from.
~Essential manual
{Manual required depending on application
UManual with additional manual for detailed explanation
Manual Model
Manual name Contents
number name code
Manuals for PLC main unit
FX3U PLC main unit
I/O specifications, wiring and installation of the
Supplied PLC main unit FX3U extracted from the FX3U
FX3U Series
U with JY997D18801 Series User’s Manual - Hardware Edition. For −
Hardware Manual
product detailed explanation, refer to the FX3U Series
User’s Manual - Hardware Edition.
Details about the hardware including I/O
Additional FX3U Series User’s Manual
~ JY997D16501 specifications, wiring, installation and 09R516
Manual - Hardware Edition
maintenance of the FX3U PLC main unit.
Programming
FX3U/FX3UC Series Items related to programming in PLCs
Additional Programming Manual - including explanation of basic instructions,
~ JY997D16601 09R517
Manual Basic & Applied Instruction applied instructions and various devices in
Edition (this manual) FX3U/FX3UC PLCs.
Terminal block
Supplied
FX INPUT AND OUTPUT
{ with JY992D50401 Terminal block handling procedures. −
TERMINAL BLOCKS
product
Manuals for communication control
Common
FX Series User’s Manual - Details about simple N : N link, parallel link,
Additional
{ Data Communication JY997D16901 computer link and no-protocol communication 09R715
Manual
Edition (RS instruction and FX2N-232IF).
Communication via RS-232C/RS-422/RS-485/USB
When using each product, refer also to the User’s Manual - Hardware Edition of the PLC main unit to which each
product is connected.
Items about the system configuration of USB
Supplied communication expansion board and the
FX3U-USB-BD
U with JY997D13501 driver installation method. −
User’s Manual
product For use, refer also to the FX Series User’s
Manual - Data Communication Edition.
Handling procedures of the RS-232C
Supplied
FX3U-232-BD communication expansion board.
U with JY997D12901 −
Installation Manual For use, refer also to the FX Series User’s
product
Manual - Data Communication Edition.
Handling procedures of the RS-232C
Supplied
FX3U-232ADP communication special adapter.
U with JY997D13701 −
Installation Manual For use, refer also to the FX Series User’s
product
Manual - Data Communication Edition.
Handling procedures of the RS-232C
Supplied
FX2N-232IF communication special function block.
U with JY992D73501 −
Hardware Manual For use, refer also to the FX Series User’s
product
Manual - Data Communication Edition.
14
FX3U/FX3UC Series Programmable Controllers Related manuals
Programming Manual - Basic & Applied Instruction Edition
~Essential manual
{Manual required depending on application
UManual with additional manual for detailed explanation
Manual Model
Manual name Contents
number name code
Communication via RS-232C/RS-422/RS-485/USB
When using each product, refer also to the User’s Manual - Hardware Edition of the PLC main unit to which each
product is connected.
Handling procedures of the RS-422
Supplied
FX3U-422-BD communication expansion board.
U with JY997D13101 −
Installation Manual For use, refer also to the FX Series User’s
product
Manual - Data Communication Edition.
Handling procedures of the RS-485
Supplied
FX3U-485-BD communication expansion board.
U with JY997D13001 −
Installation Manual For use, refer also to the FX Series User’s
product
Manual - Data Communication Edition.
Handling procedures of the RS-485
Supplied
FX3U-485ADP communication special adapter.
U with JY997D13801 −
Installation Manual For use, refer also to the FX Series User’s
product
Manual - Data Communication Edition.
Handling procedures of the RS-232C/RS-485
Supplied
FX-485PC-IF conversion interface.
{ with JY992D81801 −
Hardware Manual For use, refer also to the FX Series User’s
product
Manual - Data Communication Edition.
CC-Link, MELSEC I/O LINK and AS-i system
When using each product, refer also to the User’s Manual - Hardware Edition of the PLC main unit to which each
product is connected.
Handling procedures of the CC-Link master
Supplied
FX2N-16CCL-M special function block.
U with JY992D93201 −
Hardware Manual For use, refer to the FX2N-16CCL-M User’s
product
Manual.
Additional FX2N-16CCL-M Details about the CC-Link master special
{ JY992D93101 09R710
Manual User’s Manual function block.
Supplied
FX2N-32CCL Handling procedures of the CC-Link remote
{ with JY992D71801 09R711
User’s Manual device station special function block.
product
Supplied Remote I/O Stations and
For remote I/O stations and remote device stations for
{ with remote device stations for
CC-Link, refer to each manual and the related data.
product CC-Link
Handling procedures of the CC-Link/LT master
Supplied FX2N-64CL-M
special function block.
U with User’s Manual JY997D05401 −
For use, refer also to the FX2N-64CL-M User’s
product [Hardware Volume]
Manual [Detailed Volume].
FX2N-64CL-M
Additional Details about the CC-Link/LT master special
{ User’s Manual JY997D08501 −
Manual function block.
[Detailed Volume]
Supplied For remote I/O stations, power adapter and dedicated power
{ with Remote I/O Power Adapter supply for CC-Link/LT, refer to each manual and the related
product data.
Supplied
FX2N-16LNK-M Handling procedure of the master special
{ with JY992D72101 09R703
User's Manual function block for the MELSEC I/O LINK
product
Supplied
FX2N-32ASI-M Handling procedure of the master special
{ with JY992D76901 −
User’s Manual function block for the AS-i system.
product
15
FX3U/FX3UC Series Programmable Controllers Related manuals
Programming Manual - Basic & Applied Instruction Edition
~Essential manual
{Manual required depending on application
UManual with additional manual for detailed explanation
Manual Model
Manual name Contents
number name code
Manuals for analog control
Common
FX3U/FX3UC Detaileds about the analog special function
Additional
{ User’s Manual JY997D16701 block (FX3UC-4AD) and analog special 09R619
Manual
- Analog Control Edition adapter (FX3U-∗∗∗∗-ADP).
Analog input, temperature input and temperature control
When using each product, refer also to the User’s Manual - Hardware Edition of the PLC main unit to which each
product is connected.
Supplied
FX2N-2AD Handling procedures of the 2-channel analog
{ with JY992D74701 −
User’s Guide input special function block.
product
Handling procedures of the 4-channel analog
Supplied
FX3U-4AD-ADP input special adapter.
{ with JY997D13901 −
User’s Manual For use, refer also to the FX3U/FX3UC Series
product
User’s Manual - Analog Control Edition.
Supplied
FX2N-4AD Handling procedures of the 4-channel analog
{ with JY992D65201 −
User’s Guide input special function block.
product
Supplied
FX2NC-4AD Handling procedures of the 4-channel analog
{ with JY997D07801 −
User’s Manual input special function block.
product
Supplied Handling procedures of the 8-channel analog
FX2N-8AD
{ with JY992D86001 input (and thermocouple input) special function 09R608
User’s Manual
product block.
Handling procedures of the 4-channel PT-100
Supplied
FX3U-4AD-PT-ADP temperature sensor input special adapter.
{ with JY997D14701 −
User’s Manual For use, refer also to the FX3U/FX3UC Series
product
User’s Manual - Analog Control Edition.
Supplied
FX2N-4AD-PT Handling procedures of the 4-channel PT-100
{ with JY992D65601 −
User’s Guide temperature sensor input special function block.
product
Handling procedures of the 4-channel
Supplied
FX3U-4AD-TC-ADP thermocouple input special adapter.
{ with JY997D14801 −
User’s Manual For use, refer also to the FX3U/FX3UC Series
product
User’s Manual - Analog Control Edition.
Supplied
FX2N-4AD-TC Handling procedures of the 4-channel
{ with JY992D65501 −
User’s Guide thermocouple input special function block.
product
Supplied Handling procedures of the 2-channel
FX2N-2LC
U with JY992D85601 temperature control special function block. −
User’s Guide
product For use, refer to the FX2N-2LC User’s Manual
Additional FX2N-2LC Details about the 2-channel temperature
{ JY992D85801 09R608
Manual User’s Manual control special function block.
16
FX3U/FX3UC Series Programmable Controllers Related manuals
Programming Manual - Basic & Applied Instruction Edition
~Essential manual
{Manual required depending on application
UManual with additional manual for detailed explanation
Manual Model
Manual name Contents
number name code
Manuals for analog control
Analog output
When using each product, refer also to the User’s Manual - Hardware Edition of the PLC main unit to which each
product is connected.
Supplied
FX2N-2DA Handling procedures of the 2-channel analog
{ with JY992D74901 −
User’s Guide output special function block.
product
Handling procedures of the 4-channel analog
Supplied
FX3U-4DA-ADP output special adapter.
{ with JY997D14001 −
User’s Manual For use, refer also to the FX3U/FX3UC Series
product
User’s Manual - Analog Control Edition.
Supplied
FX2N-4DA Handling procedures of the 4-channel analog
{ with JY992D65901 −
User’s Guide output special function block.
product
Supplied
FX2NC-4DA Handling procedures of the 4-channel analog
{ with JY997D07601 −
User’s Manual output special function block.
product
Analog I/O (mixed)
When using each product, refer also to the User’s Manual - Hardware Edition of the PLC main unit to which each
product is connected.
Supplied Handling procedures of the 2-channel analog
FX0N-3A
{ with JY992D49001 input/1-channel analog output special function −
User’s Guide
product block.
Supplied Handling procedures of the 4-channel analog
FX2N-5A
{ with JY997D11401 input/1-channel analog output special function 09R616
Users Manual
product block.
Manuals for positioning control
High speed counter
When using each product, refer also to the User’s Manual - Hardware Edition of the PLC main unit to which each
product is connected.
Supplied
FX3U-4HSX-ADP Handling procedure of the special high speed
U with JY997D16301 −
Installation Manual input adapter.
product
Supplied
FX2N-1HC Handling procedures of the 1-channel high
{ with JY992D64501 −
User’s Guide speed counter special function block.
product
Manuals for positioning control
Common
FX3U/FX3UC Series
Additional Details about the positioning function built in
{ User’s Manual - JY997D16801 09R620
Manual the FX3U/FX3UC Series.
Positioning Edition
Pulse output and positioning
When using each product, refer also to the User’s Manual - Hardware Edition of the PLC main unit to which each
product is connected.
Handling procedure of the special high speed
Supplied
FX3U-2HSY-ADP output adapter.
U with JY997D16401 −
Installation Manual For use, refer also to the FX3U/FX3UC Series
product
User’s Manual - Positioning Edition.
Supplied
FX2N/FX-1PG-E Handling procedures of the 1-axis pulse output
{ with JY992D65301 09R610
User’s Manual special function block.
product
Supplied Handling procedures of the 1-axis pulse output
FX2N-10PG
U with JY992D91901 special function block. −
Installation Manual
product For use, refer to the FX2N-10PG User’s Manual.
Additional FX2N-10PG Details about the 1-axis pulse output special
{ JY992D93401 09R611
Manual User’s Manual function block.
17
FX3U/FX3UC Series Programmable Controllers Related manuals
Programming Manual - Basic & Applied Instruction Edition
~Essential manual
{Manual required depending on application
UManual with additional manual for detailed explanation
Manual Model
Manual name Contents
number name code
Handling procedures of the 1-axis
Supplied
FX2N-10GM positioning special extension unit.
U with JY992D77701 −
User’s Guide For use, refer to the FX2N-10GM/FX2N-20GM
product
Hardware/Programming Manaul
Handling procedures of the 2-axis
Supplied
FX2N-20GM positioning special extension unit.
U with JY992D77601 −
User’s Guide For use, refer to the FX2N-10GM/FX2N-20GM
product
Hardware/Programming Manual
FX2N-10GM, FX2N-20GM
Additional Details on the 1-axis/2-axis positioning special
{ Hardware/Programming JY992D77801 09R612
Manual extension unit.
Manual
Programmable cam switch
When using each product, refer also to the User’s Manual - Hardware Edition of the PLC main unit to which each
product is connected.
Supplied
FX2N-1RM-E-SET Handling procedures of the programmable
{ with JY992D71101 09R614
User’s Manual cam switch special extension unit.
product
Other manuals
When using each product, refer also to the User’s Manual - Hardware Edition of the PLC main unit to which each
product is connected.
Supplied Handling procedures of the connector
FX3U-CNV-BD
U with JY997D13601 conversion expansion board for special −
Installation Manual
product adapter connection.
18
FX3U/FX3UC Series Programmable Controllers Generic Names and Abbreviations Used in Manuals
Programming Manual - Basic & Applied Instruction Edition
19
FX3U/FX3UC Series Programmable Controllers Generic Names and Abbreviations Used in Manuals
Programming Manual - Basic & Applied Instruction Edition
20
FX3U/FX3UC Series Programmable Controllers 1 Introduction
Programming Manual - Basic & Applied Instruction Edition 1.1 Programming Language in PLCs
Introduction
1. Introduction
This chapter explains basic items related to programming in FX3U and FX3UC programmable controllers 2
(PLCs).
Overview
1.1 Programming Language in PLCs
This section explains the features of programming in FX3U and FX3UC PLCs.
3
List
Instruction
1.1.1 Types of programming languages
FX3U and FX3UC PLCs support the following three types of programming languages:
1. List programming
4
This method is the basis of programs.
in Detail
Devices
1) 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 5
Constant
Device &
Specified the
Step Instruction Device number
0000 LD X000
0001 OR Y005
0002 ANI X002
0003 OUT Y005 6
Programming
Before
…
2. Circuit programming
In this method, ladder formats are drawn on the graphic screen.
1) Features 7
In a circuit program, a sequence circuit is drawn on the graphic screen by sequence formats and device
Instruction
Basic
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) Example of circuit display
X000 X002 8
Y005
Program Flow
FNC00-FNC09
Y005
This input method allows sequence design in accordance with the flow of machine operations.
1) Features
In an SFC (sequential function chart) program, sequences can be designed in accordance with the flow of
machine operations. 10
Operation
Arith. & Logic
FNC20-FNC29
21
FX3U/FX3UC Series Programmable Controllers 1 Introduction
Programming Manual - Basic & Applied Instruction Edition 1.1 Programming Language in PLCs
List
Circuit SFC
22
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.1 Introduction of Convenient Functions
Introduction
2. Overview (Sequence Program)
This chapter explains the basic functions of FX3U/FX3UC PLCs. 2
This chapter includes not only the features of PLCs but also introduction of representative functions,
Overview
parameters and memory to utilize the functions of PLCs. Read this chapter before designing sequences.
List
Instruction
2.1.1 Convenient functions for input processing
1. "High speed counter" function of one phase or two phases for counting high speed inputs
One-phase high speed counters can execute counting at up to 100 kHz (or 200 kHz when a special high 4
speed input adapter is used) regardless of the operation time because they process high speed pulses from
in Detail
Devices
specific input relays as interrupts. (Two-phase counters can execute counting at up to 50 kHz (or 100 kHz
when a special high speed input adapter is used).)
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.
→ Related instructions: High speed counter compare;
5
Constant
Device &
Specified the
HSCS (FNC 53), HSCR (FNC 54) and HSZ (FNC 55)
If the number of high speed counters is insufficient, special extension equipment (high speed counter
blocks) can be connected.
By extending hardware counters in the high speed counter block, high speed pulses at up to 50 kHz can be
received (except 1 and 4 edge count). 6
→ FX2N-1HC high speed counter block
Programming
Before
2. "I/O refresh" function for receiving the latest input information
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. 7
→ Related instruction: Refresh REF (FNC 50)
Instruction
Basic
3. "Input filter adjustment" function for changing the time constant of input relays
Input relays in the PLC 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*1,
however, the filter value can be changed in sequence programs. 8
→ Related instruction: Refresh and filter adjust instruction REFF (FNC 51)
Program Flow
FNC00-FNC09
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.
→ Refer to Section 35.7.
10
Operation
Arith. & Logic
FNC20-FNC29
23
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.1 Introduction of Convenient Functions
5. Three types of "interrupt" functions for receiving short-period pulses and priority
processing
→ Refer to Chapter 35.
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) Counter interrupt
Depending on the present value of a high speed counter, a specified interrupt routine is executed with
highest priority.
1. "Constant scan" mode for making the operation cycle of the PLC constant
The operation cycle in the PLC adopting the cyclic operation method varies depending on the contents of the
program execution.
In the constant scan mode (M8039 and D8039), the operation cycle can be made constant. As a result,
instructions executed in synchronization with the operation can be processed in a constant cycle.
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 is stopped while the output status during the RUN
mode is held.
24
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.2 Introduction of Applied Instructions
1
4. Registration of "entry code" for protecting programs
Introduction
The entry code can be registered to prevent erroneous wiring to and plagiarism of created sequence
programs.
With regard to online operations from GX Developer (Ver.8.23Z 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.
2
Overview
→ Refer to the manual of the used programming tool.
List
Instruction
6. Writing programs in the RUN mode
Programs can be changed while the PLC is operating (RUN mode).
By this function, programs can be adjusted and changed efficiently without stopping the machine.
→ Refer to the manual of the used programming tool.
4
2.2 Introduction of Applied Instructions
in Detail
Devices
1. Excellent fundamental performance
FX3U/FX3UC PLCs are equipped with not only fundamental applied instructions for data transfer, data
comparison, arithmetic operations, logical operations, data rotation and data shift but also with high speed
processing instructions for I/O refresh, interrupt, comparison dedicated to high speed counters and high
5
Constant
Device &
Specified the
speed pulse output as well as initial state instructions by which standard operations for machine control are
made into packages in the SFC control. FX PLCs have the specifications offering fundamental functions, high
speed processing and good operability.
Programming
Before
FX PLCs also offer floating point arithmetic operations and PID operations to cope with more advanced
control.
Instruction
Basic
PLCs.
25
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.2 Introduction of Applied Instructions
26
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.3 Analog/Positioning Special Control
1
2.3 Analog/Positioning Special Control
Introduction
For the details, refer to the manual of each product.
Overview
• Analog output
→ Refer to the manual of each product.
• Pt100 temperature sensor input
• Thermocouple temperature sensor input
• Block dedicated to temperature control
→ Refer to the manual of each product. 3
List
Instruction
2. Positioning control
• Pulse output block (controlled by sequence
program)
• Positioning unit (controlled by instructions
dedicated to positioning) 4
in Detail
Devices
• Cam switch (resolver detection)
→ Refer to the manual of each product.
Constant
Device &
Specified the
FX3U/FX3UC PLCs support the following communication functions:
Programming
Before
stations (remote device stations). them.
The CC-Link is an open network allowing → Refer to the Data Communication Edition.
connection of not only FX PLCs but also
inverters, AC servo systems, and sensors.
6. Parallel link
→ Refer to each manual packed together. Two PLCs are connected, and data are
automatically transferred between them. 7
2. CC-Link/LT → Refer to the Data Communication Edition.
Instruction
Basic
The CC-Link/LT system can be constructed with
7. Computer link
an FX3U/FX3UC PLC working as the master
station. A computer such as personal computer works as
General X (input) and Y (output) devices are the master station, up to sixteen FX and A PLCs
are connected to the master station, the master
assigned to remote I/O units, and operated by
station directly specifies devices in the PLCs,
8
programs for general-purpose I/O.
Program Flow
FNC00-FNC09
→ Refer to the FX3UC Hardware Edition for the and then data are transferred.
built-in type CC-Link/LT master. Protocols in the computer link support the
→ Refer to the product manual for the FX2N- formats 1 and 4.
64CL-M. By using MX Component and MX Sheet,
monitoring and logging for the PLC system can
3. MELSEC I/O LINK be easily set by Microsoft Excel. 9
The MELSEC I/O LINK is a remote I/O system → Refer to the Data Communication Edition.
Move & Compare
FNC10-FNC19
whose master station is an FX3U/FX3UC PLC. → For MX Component and MX Sheet, refer to
Units for MELSEC I/O LINK remote I/O system the manual of each product.
(A PLCs) can be used as remote units.
→ Refer to each manual packed together.
4. AS-i system
10
Operation
Arith. & Logic
FNC20-FNC29
27
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.4 Link and Communication
8. No-protocol communication
No-protocol serial communication is available
between an FX PLC 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.
9. Inverter communication
An FX PLC can control up to eight inverters via
communication in accordance with RS-485.
→ Related instructions: IVCK (FNC270)
IVDR (FNC271)
IVRD (FNC272)
IVWR (FNC273)
IVBWR (FNC274)
→ Refer to the Data Communication Edition.
28
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.5 Introduction of Devices Constructing PLC
1
2.5 Introduction of Devices Constructing PLC
Introduction
Many relays, timers, and counters are built into an FX3U/FX3UC PLC, with many NO (normally open) contacts
and NC (normally closed) contacts.
These contacts and coils are connected to make a sequence circuit.
A PLC is also equipped with data registers (D) and extension data registers (R) functioning as memory 2
devices to store numeric data values.
Overview
2.5.1 Relationship among devices
Arrows show transfer of signals.
3
List
Instruction
Input terminal or
input connector
Input relay: X
Input relays function as receiving ports when the PLC receives signals from external
input switches. 4
The assigned device mnemonic is "X".
in Detail
Devices
The PLC has built-in input relays in accordance with its scale.
Constant
Device &
Specified the
1234
6
Programming
Before
Counter: C
Auxiliary relay: M Output relay: Y
There are many
There are many counters inside the Output relays
auxiliary relays PLC. function as ports
inside the PLC. when the PLC
The assigned drives external
The assigned
device mnemonic
device mnemonic
is "C".
loads. 7
is "M". Timer: T There are many
Instruction
Basic
There are many output relays inside
timers inside the the PLC.
State relay: S The assigned
PLC.
There are many device mnemonic
state relays inside The assigned
device mnemonic is "Y".
the PLC.
is "T".
The assigned
device mnemonic
8
is "S".
Program Flow
FNC00-FNC09
9
Move & Compare
FNC10-FNC19
29
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.5 Introduction of Devices Constructing PLC
30
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.5 Introduction of Devices Constructing PLC
1
6. Data registers (D)
Introduction
→ Refer to Section 4.8.
Data registers store numeric data values.
All data registers in FX PLCs are 16-bit type
(whose most significant bit is positive or
negative). When two registers are combined,
they can handle 32-bit numeric value (whose
2
Overview
most significant bit is positive or negative).
(For the numeric value range, refer to "Counter"
on the previous page.)
In the same way as other devices, data registers
are classified into general type and latched type
(battery backed). 3
List
Instruction
7. Extension resistors (R) and extension file
registers (ER)
→ Refer to Section 4.9.
Extension registers (R) are the extended form of
data registers (D). They are protected by the
battery against power failure.
4
in Detail
Devices
While a memory cassette is mounted, the
contents of extension resisters (R) can be stored
in extension file registers (ER). Extension file
registers (ER) can be used only while a memory
cassette is mounted.
5
8. Index registers (V)(Z)
Constant
Device &
Specified the
→ Refer to Section 4.10.
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"]
6
Programming
Before
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.
7
9. Pointers (P)(I)
Instruction
Basic
→ Refer to Section 4.11.
Pointers are classified into branch pointers and
interrupt pointers.
• A branch pointer (P) specifies the jump
destination of the conditional jump CJ (FNC 8
00) or the call subroutine CALL (FNC 01)
Program Flow
FNC00-FNC09
instruction.
• An interrupt pointer (I) specifies the interrupt
routine of an input interrupt, timer interrupt or
counter interrupt.
10.Constants (K)(H)(E)
9
Move & Compare
FNC10-FNC19
→ Refer to Chapter 5.
Among various numeric values used in the PLC,
"K" indicates a decimal integer, value "H"
indicates a hexadecimal numeric value, and "E"
indicates a real number (floating point data).
They are used as the set value or present value 10
of timers and counters, or operands of applied
Operation
Arith. & Logic
FNC20-FNC29
instructions.
31
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices (Battery Backed)
Optional memory
Built-in program memory
(flash memory)
(RAM)
Parameter
Sequence program
Not attached
Comment
File register (D)
2. When using an attached optional memory (without using the built-in memory)
Parameter
Sequence program
Not used
Comment
Attachment of an optional memory is automatically
File register (D)
recognized (when the power is ON), and the built-in
program memory is disconnected.
(The priority is given to the optional memory.) Extension file register (ER)
32
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices (Battery Backed)
1
2.6.2 Memory operations and latched (battery backed)
Introduction
(power ON/OFF and RUN/STOP)
1. Backup operation
The operations of the data memory, bit device memory and program memory in FX3U/FX3UC PLCs are
classified as shown below:
2
Overview
1) Types of program memory
Power
Item Power OFF STOP→RUN RUN→STOP
OFF→ON
Parameter Does not change.
Sequence program Does not change. 3
List
Instruction
Comment Can be secured by Does not change.
File register parameter setting. Does not change.
in Detail
Devices
Does not
Cleared.
change.
General type Cleared.
Does not change while M8033 is
ON.
Data register (D) latched (battery
backed) type
Does not change.
5
File type Does not change.
Constant
Device &
Specified the
Set to initial
Special type Cleared. Does not change.*1
values.*1
latched (battery
Extension register (R) Does not change.
backed) type
Extension file register
6
File type Does not change.
Programming
Before
(ER)*2
Index register (V, Z) V, Z Cleared. Does not change.
Does not
Cleared.
change.
For 100 ms Cleared.
Does not change while M8033 is
ON.
7
Instruction
Basic
Timer present value Does not
Cleared.
register (T) change.
For 10 ms Cleared.
Does not change while M8033 is
ON.
Retentive type for 100 ms
Retentive type for 1 ms
Does not change.
Does not change.
8
Program Flow
FNC00-FNC09
Does not
Cleared.
change.
General type Cleared.
Does not change while M8033 is
Counter present value ON.
register (C)
latched (battery
backed) type
Does not change. 9
Move & Compare
FNC10-FNC19
*1. Some devices are cleared when the PLC status switches from STOP to RUN.
→ For special data registers, refer to Chapter 36.
*2. An optional memory cassette is required.
10
Operation
Arith. & Logic
FNC20-FNC29
33
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices (Battery Backed)
Power
Item Power OFF STOP→RUN RUN→STOP
OFF→ON
Does not
Cleared.
change.
Input relay (X) Cleared.
Does not change while M8033
is ON.
Does not
Cleared.
change.
Output relay (Y) Cleared.
Does not change while M8033
is ON.
Does not
Cleared.
Contact image General type auxiliary relay change.
memory Cleared.
(M) Does not change while M8033
(X, Y, M, S) is ON.
latched (battery backed) type
Does not change.
auxiliary relay (M)
Special type auxiliary Set to initial
Cleared. Does not change.*1
relay (M) values.*1
General type state relay (S) Does not change.
latched (battery backed) type
Does not change.
state relay (S)
Annunciator (S) Does not change.
Does not
Cleared.
change.
For 100 ms Cleared.
Does not change while M8033
is ON.
Timer contact Does not
Cleared.
Time counting coil change.
For 10 ms Cleared.
(T) Does not change while M8033
is ON.
Retentive type for
Does not change.
100 ms
Retentive type for 1 ms Does not change.
Does not
Cleared.
change.
General type Cleared.
Does not change while M8033
is ON.
Does not
Counter contact Cleared.
change.
Counting coil latched (battery backed) type Cleared.
Reset coil (C) Does not change while M8033
is ON.
Does not
Cleared.
change.
High speed type Cleared.
Does not change while M8033
is ON.
*1. Some devices are cleared when the PLC status switches from STOP to RUN.
→ For special auxiliary relays, refer to Chapter 36.
34
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices (Battery Backed)
1
2.6.3 Types of backup methods against power failure
Introduction
There are following types of latch (battery backup) for the program memory and built-in devices in the PLC.
Item Description 2
Overview
Latched (battery
A lithium battery backs up the RAM memory, devices (battery backed) and clock data built in the PLC.
backed) contents
Maintenance Periodic replacement of the battery once in four or five years.
1) When the battery life is expired, sequence programs and other latched (battery backed) contents
are lost.
Cautions
2) When an optional memory cassette (flash memory) is mounted, it is not necessary to back up 3
sequence programs by the battery.
List
Instruction
2. Flash memory backup method
Item Description
Latched (battery 1) The flash memory built into the memory cassette backs up sequence programs.
backed) contents 2) A battery is required to back up latched (battery backed) devices and clock data from failure.
4
in Detail
Devices
Maintenance Maintenance is not necessary.
The upper limit is set to the number of times for overwriting.
Cautions
(Refer to the Hardware Edition of the main unit.)
2.6.4 Change between general devices and latched (battery backed) devices 5
Constant
Device &
Specified the
1. When using latched (battery backed) type devices as non-latch type devices
In FX3U/FX3UC PLCs, some latched (battery backed) type devices can be changed into non-latch type
devices by the parameter settings described later.
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 6
Programming
Before
devices by the initial pulse (M8002) in a program.
2. When using non-latch type devices as latched (battery backed) type devices
In FX3U/FX3UC PLCs, non-latch type devices can be changed into latched (battery backed) type devices by
the parameter settings described later.
7
2.6.5 How to initialize devices (battery backed)
Instruction
Basic
1. ZRST (FNC 40) instruction (zone reset)
By ZRST (FNC 40) instruction, devices in a specified range can be cleared at one time.
Command
input FNC 40
8
D1 D2 Devices D1 through D2 are reset at one time.
Program Flow
FNC00-FNC09
ZRST
When M8032 is turned ON, all latched (battery backed) type devices are cleared.
→ For details, refer to Subsection 36.2.11.
10
Operation
Arith. & Logic
FNC20-FNC29
35
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
36
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
Introduction
Classification Item Description
This parameter sets interrupt inputs for the maximum speed, bias speed, creep speed,
Constant
zero return speed, acceleration time, deceleration time, and DVIT instruction.
Positioning setting
It is necessary to set the memory capacity.
setting
Detailed This parameter sets the operation table.
setting It is necessary to set the memory capacity. 2
This parameter sets protection to prevent erroneous writing and plagiarism of a
Overview
sequence program. The entry code can be specified in 8 hexadecimal characters
Entry code among A to F and 0 to 9.
Others In FX3U and FX3UC PLCs Ver.2.20 or later, the second entry code (in 8 characters) can
be added to allow specification of the entry code in 16 characters.
Program title This parameter enables to set a character string to be used as the program title.
3
List
Instruction
2.7.2 Parameter initial values and available tools for changing parameter values
in Detail
Devices
Initial value FX-10P(-E)*1 FX-PCS/ Series*2
*1 *1 ET-940
FX-20P(-E) WIN(-E)
Series*3
Program capacity 16000*4 2000 8000 8000
Katakana character
0 0 0 –
5
comment capacity
Constant
Device &
Specified the
Refer to
Memory File register capacity 0 0 0 0
Subsection
capacity (steps)
Special unit initial 2.7.3.
Not used – – –
value setting*5
Programming
Before
State relay [S] 500 to 999 0 to 999 500 to 999
Latch range
Counter [C] (16 bits) 100 to 199 0 to 199 100 to 199
(battery backed)
Counter [C] (32 bits) 220 to 255 200 to 255 220 to 255
Data register [D] 200 to 511 0 to 511 200 to 511
Program title Not registered – Not registered –
7
Instruction
Basic
Entry code Not registered Not registered Not registered –
Batteryless mode OFF Refer to – OFF –
Subsection
Modem initialization specification Not set 2.7.1. – Not set –
RUN terminal input OFF Not used Not used (X0) –
Serial port operation setting Not set – Not set – 8
Program Flow
FNC00-FNC09
*1. These programming tools are not applicable to FX3U/FX3UC PLCs. The initial values in FX2N PLCs
are shown above.
*2. Parameter values can be changed only by the F940WGOT, F94
GOT and F94
handy GOT.
*3. Only manuals in Japanese are available for the ET-940 Series.
*4. The initial value is 8000 steps in GX Developer Ver.8.13P to Ver.8.22Y. 9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
37
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
1) With regard to the comment capacity, up to 50 device comments can be set in one block.
2) With regard to the file register capacity, up to 500 (16-bit) file registers can be set in one block.
3) In the special unit initial value setting*1, 8 blocks (4000 steps) are used.
4) In the positioning setting*1, 18 blocks (9000 steps) are used.
*1. GX Developer Ver.8.23Z or later is applicable.
Caution
After changing the memory capacity setting, 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.
38
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
1
2.7.5 Entry code
Introduction
By registering the entry code in a PLC, the functions of programming tools, display modules, and display units
to change programs, monitor devices, and current value changing function in the PLC can be restricted
(access restriction).
→ For the operations and restricted functions of display modules, 2
refer to the Hardware Edition of the PLC main unit.
Overview
→ For the operations and restricted functions of display units,
refer to the manual of each display unit.
List
Instruction
characters Developer FX-10P(-E) GOT-F900 Series
characters versions FX-PCS/WIN(-E)
FX-20P(-E) ET-940 Series*2
0 to 9 and Ver.1.00 or Ver.2.00A Only reset of entry
Entry code 8 Applicable Applicable
A to F later or later*1 code is allowed
8 (16 characters
Second 0 to 9 and
which combined
Ver.2.20 or Ver.8.23Z Not Not Not
4
keyword <entry
in Detail
Devices
entry code A to F later or later applicable applicable applicable
code> and 2nd
keyword)
*1. Ver.2.00A or later support FX series PLC, however, Ver.8.13P or later is required for FX3UC series
PLCs and Ver.8.23Z or later is required for FX3U PLCs.
*2. Only manuals in Japanese are available for the ET-940 Series. 5
The security by keyword (entry code) and 2nd keyword has its limits and is not always perfect.
Constant
Device &
Specified the
6
Programming
Before
7
Instruction
Basic
8
Program Flow
FNC00-FNC09
9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
39
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
2) When a programming tool does not support the second entry code
All online operations are disabled. The entry code cannot be changed or reset, and the
PLC memory cannot be cleared.
1) In the case of handy programming panel FX-10P(-E)/FX-20P(-E)
The programming tool performs the following operations in accordance with the head
character of the entry code (in 8 characters):
Head Program
Present value
character of Monitoring
Read Write change
entry code
When only entry code is set All operations
A,D to F,0 to 9 – – – –
prohibited
Anti-plagiarism B – – 3 3
Erroneous
C 3 – 3 3
write prohibited
2) In the case of any programming tool other than FX-10P(-E)/FX-20P(-E)
Anti-plagiarism is set for all entry codes.
When both entry code and
All operations are enabled.
second entry code are not set
• 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 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.
40
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
1
Registering and changing the entry codes
Introduction
This section explains the operating procedure of GX Developer (Ver.8.23Z)
→ For the entry code registration/change procedure in FX-10P(-E), FX-20P(-E), and FX-PCS/WIN(-E),
refer to the manual of each product.
Overview
2. Set the entry code, second entry code*1, and registration condition*1.
List
Instruction
4
in Detail
Devices
Set item Contents of setting Remarks
Input 8 characters. Available
Keyword
characters are A to F and 0 to 9. 5
Constant
Device &
Specified the
Input 8 characters. Available
2nd Keyword*1 characters are A to F and 0 to 9.
Before setting the second entry code, set the entry code first.
Programming
Before
later.
Caution on registering the entry code
• 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
7
Instruction
Basic
disabled depending on the programming tool type and the contents of the registered entry code.
9
5. Click [OK] to register the entry codes to the PLC.
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
41
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
1. Select [Online]-[Read from PLC...]/[Write to PLC...] to open "Input current keyword." dialog
box.
2. Input the entry code and second entry code*1 currently registered in the PLC.
*1. The second entry code can be set in FX3U and FX3UC PLCs Ver.2.20 or later.
3. 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 "Read from PC" or "Write to PC".
• When the entry code inputs are not verified, the PLC does not execute "Read from PC" or "Write to PC".
2. Input the entry code and second entry code currently registered in the PLC.
3. 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".
42
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
1
Resetting the entry codes, and validating the reset entry codes (Keyword Protect)
Introduction
This section explains the operating procedure of GX Developer (Ver.8.23Z)
→ For the entry code reset procedure in FX-10P(-E), FX-20P(-E), and FX-PCS/WIN(-E),
refer to the manual of each product.
Overview
2. Input the entry code and second entry code.
List
Instruction
4
in Detail
Devices
Set item Contents of setting
Keyword Input 8 characters. Available characters are A to F and 0 to 9.
Keyword Disable
2nd Keyword*1 Input 8 characters. Available characters are A to F and 0 to 9.
5
Keyword Protect*1 Reset entry codes are made valid again.
Constant
Device &
Specified the
*1. The second entry code and entry code protect function can be set in FX3U/FX3UC PLCs Ver.2.20 or
later.
3. Click [Execution] button to reset the entry codes or validate the reset entry codes again.
6
2.7.6 Special unit initial value setting [GX Developer Ver.8.23Z or later]
Programming
Before
The initial values of the buffer memory (BFM) in special function blocks/units connected to an FX3U/FX3UC
PLC (Ver.2.20 or later) can be set as a parameter in GX Developer (Ver.8.23Z or later).
7
Instruction
Basic
When this parameter is used, it is not necessary to execute initial setting in a user program for special
function blocks/units 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.8.
2.7.7 Positioning setting [for TBL (FNC152) instruction] [GX Developer Ver.8.23Z or later] 8
Program Flow
FNC00-FNC09
In the positioning setting in an FX3U/FX3UC PLC (Ver.2.20 or later), table and constants for added TBL
(FNC152) instruction can be set. Make sure to set this parameter when using TBL (FNC152) instruction. 9
The positioning setting for TBL (FNC152) instruction uses 9000 steps (18 blocks) in the memory capacity.
Move & Compare
FNC10-FNC19
→ 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.8.
10
Operation
Arith. & Logic
FNC20-FNC29
43
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
44
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
1
3
Introduction
Setting devices
1. Click "Device" tab, and set devices.
Overview
3
List
Instruction
4
in Detail
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 5
Constant
Device &
Specified the
State Set the latched (battery backed) state relay range. Initial value: 500 to 999 0 to 999
Timer The setting displayed here cannot be changed. –
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 220 to 255
Data register Set the data register range (battery backed). Initial value: 200 to 511 0 to 511
All extension registers are latched (battery backed).
6
Extended register –
Programming
Before
This setting is fixed, and cannot be changed.
Instruction
Basic
8
Program Flow
FNC00-FNC09
9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
45
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
5 Assigning I/Os and setting the initial values for special unit
1. Click "I/O assignment" tab, and then set the I/O assignment and special function blocks/
units.
When inputting "Special Unit" field, it is necessary to put a check mark to "Special Function
Block Settings" on "Memory capacity" tab.
46
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
1
2. On "Special Function Block Settings" dialog box, set the initial values of special function
Introduction
blocks and units.
Overview
3
List
Instruction
4
in Detail
Devices
Set item Contents of setting Setting range
"Unit No." tab Select the unit number of a special function block/unit to be set. –
Set the name of a special function block/unit whose initial values are to
32 half-width 5
characters
Constant
Device &
Specified the
Unit Name be set.
(or 16 full-width
(The contents set on "I/O assignment" tab are displayed.)
characters)
This column indicates the order of initial value setting in the selected unit
No. number. –
Numbers 1 to 98 can be set.
Set the buffer memory address (BFM number) in a decimal value whose
6
Address *1
Programming
Before
initial value is to be set.
This column is displayed when device comments are registered.
Comment On the above screen, "Input mode of CH1 to CH4" is registered as the –
device comment for "U0\G0" (unit No. 0, BFM #0).
Set a value to be set as the initial value of the buffer memory address
Value (BFM number). *2 7
Set the data length and type of the set value in "Size/Type" column.
Instruction
Basic
Select the size and type of a value set to the buffer memory among the
following:
16bit/DEC
Size/Type –
32bit/DEC
16bit/HEX
32bit/HEX 8
Insert This button inserts a line in the currently selected position. –
Program Flow
FNC00-FNC09
Identification code Set the model code of the special function block/unit. *3
*1. Input buffer memory addresses (BFM numbers) that in the connected special function block/unit hold.
*2. To each buffer memory address (BFM number), set a value within the allowed range in the connected
special function block/unit.
*3. Refer to the manual of the connected special function block/unit. 10
Operation
Arith. & Logic
FNC20-FNC29
3. Click [End] button to finish the setting and close "Special Function Block Settings" dialog
box.
47
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
48
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
1
7
Introduction
Setting the PLC system (2)
1. Click "PLC system (2)" tab.
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 to "Operate communication setting." 2
Overview
When not performing the communication setting for a serial port, do not put a check mark
to "Operate communication setting."
Channel selection 3
List
Instruction
4
in Detail
Devices
5
Constant
Device &
Specified the
Set item Contents of setting Setting range
Channel selection Select a channel in which a serial port is set. CH1,CH2
Put a check mark when using the selected serial port in "computer link",
Operate communication
"no-protocol communication" or "inverter communication". 6
Do not put a check mark when transferring and monitoring sequence –
Programming
Before
setting
programs in GX Developer or when using the selected serial port in
simple N : N link or parallel link.
Protocol
Data length
Parity
7
Stop bit
Instruction
Basic
Transmission speed
Header
Terminator
Set each item in accordance with application.
Control line → For details on each item, refer to the communication control manual.
H/W type 8
Program Flow
FNC00-FNC09
Control mode
Sum check
Transmission control
procedure
Station number setting
Time out judge time
9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
49
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
8 Setting positioning
The positioning setting function is available in FX3U/FX3UC PLCs Ver.2.20 or later.
50
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
Introduction
Set item Contents of setting Set range
Set the bias speed for each output number of pulse. 1/10 or less of the
Bias speed [Hz]
Initial value: 0 maximum speed
Set the maximum speed for each output number of pulse.
Max. speed [Hz] *1
Initial value: 100,000
Set the creep speed in DSZR (FNC150) instruction for each output
2
*2
Overview
Creep speed [Hz] number of pulse. 10 to 32767
Initial value: 1000
Set the zero point return speed in DSZR (FNC150) instruction for each
Zero return speed [Hz] output number of pulse. *1
Initial value: 50000
List
Instruction
Set the deceleration time for each output number of pulse.
Deceleration time [ms] 50 to 5000
Initial value: 100
Set the interrupt input*3 for DVIT (FNC151) instruction for each output
number of pulse. Specify a user interrupt command device (M) for a
pulse output destination device not used in DVIT instruction.
Interruption input of DVIT Initial setting: Setting range: As shown on the 4
in Detail
Devices
instruction Pulse output destination Y000: X000 X000 to X007, M8460 left
Pulse output destination Y001: X001 X000 to X007, M8461
Pulse output destination Y002: X002 X000 to X007, M8462
Pulse output destination Y003*4: X003 X000 to X007, M8463
Y0 They are set items for the pulse output destination Y000. –
Y1 They are set items for the pulse output destination Y001. – 5
Y2 They are set items for the pulse output destination Y002. –
Constant
Device &
Specified the
Y3*4 They are set items for the pulse output destination Y003. –
This button displays "Positioning instruction settings" dialog box for
Individual setting setting the table used in TBL (FNC152) instruction. –
→For the setting procedure, refer to the next step.
*1. The setting range is from 10 to 100,000 Hz in FX3UC PLCs. 6
Programming
Before
The setting range is from 10 to 200,000 Hz in FX3U PLCs when the pulse output destination is the
FX3U-2HSY-ADP.
*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.
7
*4. Y003 cannot be set in FX3U PLCs except when two FX3U-2HSY-ADP units are connected.
Instruction
Basic
8
Program Flow
FNC00-FNC09
9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
51
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
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.
52
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters
Introduction
Set item Contents of setting Setting range
A check mark here means not to transfer the positioning setting when
PLC turns ON.
Positioning table settings will
Put a check mark when changing the positioning setting from a display
not be initialized when the –
unit, etc., and then using the changed contents even after restoring the
PLC is powered on
power. At this time, set a latched (battery backed) type device to "Head
Address". 2
Overview
This button writes from "Head Address" up to 1600 devices, the contents
Write –
of the positioning table created here
This button reads the existing positioning table contents starting from
Read "Head Address" up to 1600 devices but does not read the device –
numbers without "positioning instruction" set.
*1. Y003 cannot be set in FX3UC PLCs except when two FX3U-2HSY-ADP units are connected to FX3U 3
PLCs.
List
Instruction
9 Transferring parameters (and sequence program) to the PLC
1. Select [Online]-[Write to PLC...] from the tool menu to display "Write to PLC" dialog box.
4
in Detail
Devices
FX3U(C)*1
Constant
Device &
Specified the
6
Programming
Before
*1. For Ver. 8.13P to 8.24A of GX Developer, the PLC type is FX3UC.
Instruction
Basic
The selected contents are transferred to the PLC.
The transferred parameters become valid when the PLC switches from RUN to STOP.
When the communication setting is changed in step 7 "PLC system (2)", restore the PLC power.
Caution
8
After changing the memory capacity setting, make sure to write both the programs and parameters to the
Program Flow
FNC00-FNC09
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
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
53
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.1 Basic Instructions
3. Instruction List
This chapter introduces a list of instructions available in programming.
Instructions added in FX3U and FX3UC PLCs are shaded in the list.
Contact Instruction
Initial logical operation
Applicable devices
LD Load contact type NO X,Y,M,S,D
.b,T,C Section 7.1
(normally open)
Initial logical operation
LDI Load Inverse Applicable devices contact type NC X,Y,M,S,D
.b,T,C Section 7.1
(normally closed)
Parallel connection of NO
OR OR X,Y,M,S,D
.b,T,C Section 7.4
Applicable devices (normally open) contacts
Parallel connection of NC
ORI OR Inverse X,Y,M,S,D
.b,T,C Section 7.4
Applicable devices (normally closed) contacts
Parallel connection of
ORP OR Pulse X,Y,M,S,D
.b,T,C Section 7.5
Applicable devices Rising edge pulse
Parallel connection of
ORF OR Falling Pulse X,Y,M,S,D
.b,T,C Section 7.5
Applicable devices Falling/trailing edge pulse
54
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.1 Basic Instructions
Introduction
Mnemonic Name Symbol Function Applicable devices Reference
Connection Instruction
Serial connection of
ANB AND Block – Section 7.7
multiple parallel circuits
2
Overview
Parallel connection of
ORB OR Block – Section 7.6
multiple contact circuits
List
Instruction
MRD Memory Read MRD the internal PLC – Section 7.8
operations
Pops (recalls and
MPP Memory POP MPP removes) the currently Section 7.8
stored result
in Detail
Devices
operations
Conversion of
MEP MEP operation result – Section 7.11
to leading edge pulse
Conversion of operation
5
MEF MEF – Section 7.11
Constant
Device &
Specified the
result to trailing edge pulse
Out Instruction
Programming
Before
SET SET SET Applicable devices SET Bit device latch ON Y,M,S,D
.b Section 7.13
Y,M,S,D
.b,T,C,
RST Reset RST Applicable devices RESET Bit device OFF Section 7.13
D,R,V,Z
PLS Pulse PLS Applicable devices Rising edge pulse Y,M Section 7.12 7
Instruction
Basic
PLF Pulse Falling PLF Applicable devices Falling/trailing edge pulse Y,M Section 7.12
End Instruction
9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
55
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.2 Step Ladder Instructions
STL Step Ladder STL Applicable devices Starts step ladder S Chapter 34
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
Program Flow
Section
00 CJ CJ Pn Conditional Jump 3 3 3 3 3 3 3
8.1
Section
01 CALL CALL Pn Call Subroutine 3 3 3 3 3 3 3
8.2
Section
02 SRET SRET Subroutine Return 3 3 3 3 3 3 3
8.3
Section
03 IRET IRET Interrupt Return 3 3 3 3 3 3 3
8.4
Section
04 EI EI Enable Interrupt 3 3 3 3 3 3 3
8.5
Section
05 DI DI Disable Interrupt 3 3 3 3 3 3 3
8.6
Section
06 FEND FEND Main Routine Program End 3 3 3 3 3 3 3
8.7
Section
07 WDT WDT Watchdog Timer Refresh 3 3 3 3 3 3 3
8.8
Section
08 FOR FOR S Start a FOR/NEXT Loop 3 3 3 3 3 3 3
8.9
Section
09 NEXT NEXT End a FOR/NEXT Loop 3 3 3 3 3 3 3
8.10
Section
10 CMP CMP S1 S2 D Compare 3 3 3 3 3 3 3
9.1
56
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
1
*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.
Introduction
*2: The function is changed in the FX3UC Series Ver.1.30 or later. *4: The function is changed in the FX3UC Series Ver.2.20 or later.
*3: The instruction is provided in the FX3UC Series Ver.1.30 or later. *5: The instruction is provided in the FX3UC Series Ver.2.20 or later.
Applicable PLC
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
2
Overview
Section
11 ZCP ZCP S1 S2 S D Zone Compare 3 3 3 3 3 3 3
9.2
Section
12 MOV MOV S D Move 3 3 3 3 3 3 3
9.3
Section
3
13 SMOV Shift Move 3 3 – – 3 – 3
List
Instruction
SMOV S m1 m2 D n 9.4
Section
14 CML CML S D Complement 3 3 – – 3 – 3
9.5
Section
15 BMOV BMOV S D n Block Move 3 3 3 3 3 3 3
9.6 4
in Detail
Devices
5
Constant
Device &
Specified the
6
Programming
Before
7
Instruction
Basic
8
Program Flow
FNC00-FNC09
9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
57
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
Move and Compare
Section
16 FMOV FMOV S D n Fill Move 3 3 – – 3 – 3
9.7
Section
17 XCH XCH D1 D2 Exchange 3 3 – – 3 – 3
9.8
Section
19 BIN BIN S D Conversion to Binary 3 3 3 3 3 3 3
9.10
Section
20 ADD ADD S1 S2 D Addition 3 3 3 3 3 3 3
10.1
Section
21 SUB SUB S1 S2 D Subtraction 3 3 3 3 3 3 3
10.2
Section
22 MUL MUL S1 S2 D Multiplication 3 3 3 3 3 3 3
10.3
Section
23 DIV DIV S1 S2 D Division 3 3 3 3 3 3 3
10.4
Section
24 INC INC D Increment 3 3 3 3 3 3 3
10.5
Section
25 DEC DEC D Decrement 3 3 3 3 3 3 3
10.6
Section
26 WAND WAND S1 S2 D Logical Word AND 3 3 3 3 3 3 3
10.7
Section
27 WOR WOR S1 S2 D Logical Word OR 3 3 3 3 3 3 3
10.8
Section
28 WXOR WXOR S1 S2 D Logical Exclusive OR 3 3 3 3 3 3 3
10.9
Section
29 NEG NEG D Negation 3 3 – – 3 – 3
10.10
Section
30 ROR ROR D n Rotation Right 3 3 – – 3 – 3
11.1
Section
31 ROL ROL D n Rotation Left 3 3 – – 3 – 3
11.2
Section
32 RCR RCR D n Rotation Right with Carry 3 3 – – 3 – 3
11.3
Section
33 RCL RCL D n Rotation Left with Carry 3 3 – – 3 – 3
11.4
Section
34 SFTR SFTR S D n1 n2 Bit Shift Right 3 3 3 3 3 3 3
11.5
58
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
1
*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.
Introduction
*2: The function is changed in the FX3UC Series Ver.1.30 or later. *4: The function is changed in the FX3UC Series Ver.2.20 or later.
*3: The instruction is provided in the FX3UC Series Ver.1.30 or later. *5: The instruction is provided in the FX3UC Series Ver.2.20 or later.
Applicable PLC
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
2
Overview
Rotation and Shift Operation
Section
35 SFTL SFTL S D n1 n2 Bit Shift Left 3 3 3 3 3 3 3
11.6
Section
36 WSFR WSFR S D n1 n2 Word Shift Right 3 3 – – 3 – 3
11.7 3
List
Instruction
Section
37 WSFL WSFL S D n1 n2 Word Shift Left 3 3 – – 3 – 3
11.8
Section
38 SFWR SFWR S D n Shift write [FIFO/FILO control] 3 3 3 3 3 3 3
11.9
Section
4
39 SFRD Shift Read [FIFO Control] 3 3 3 3 3 3 3
in Detail
Devices
SFRD S D n 11.10
Data Operation
Section
40 ZRST ZRST D1 D2 Zone Reset 3 3 3 3 3 3 3
12.1
Section
5
41 DECO Decode 3 3 3 3 3 3 3
Constant
Device &
Specified the
DECO S D n 12.2
Section
42 ENCO ENCO S D n Encode 3 3 3 3 3 3 3
12.3
Section
43 SUM SUM S D Sum of Active Bits 3 3 – – 3 – 3
12.4 6
Programming
Before
Section
44 BON BON S D n Check Specified Bit Status 3 3 – – 3 – 3
12.5
Section
45 MEAN MEAN S D n Mean 3 3 – – 3 – 3
12.6
7
Section
Instruction
Basic
46 ANS ANS S m D Timed Annunciator Set 3 3 – – 3 – 3
12.7
Section
47 ANR ANR Annunciator Reset 3 3 – – 3 – 3
12.8
Section
49 FLT FLT S D Conversion to Floating Point 3 3 – – 3 – 3
12.10
Section
51 REFF REFF n Refresh and Filter Adjust 3 3 – – 3 – 3
13.2
Section
52 MTR MTR S D1 D2 n Input Matrix 3 3 3 3 3 3 3
13.3
10
Operation
Arith. & Logic
FNC20-FNC29
Section
53 HSCS HSCS S1 S2 D High Speed Counter Set 3 3 3 3 3 3 3
13.4
59
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
High Speed Processing
Section
54 HSCR HSCR S1 S2 D High Speed Counter Reset 3 3 3 3 3 3 3
13.5
Section
56 SPD SPD S1 S2 D Speed Detection 3 3 3 3 3 3 3
13.7
Section
57 PLSY PLSY S1 S2 D Pulse Y Output 3 3 3 3 3 3 3
13.8
Section
58 PWM PWM S1 S2 D Pulse Width Modulation 3 3 3 3 3 3 3
13.9
Acceleration/Deceleration Section
59 PLSR PLSR S1 S2 S3 D 3 3 3 3 3 3 3
Setup 13.10
Handy Instruction
Section
60 IST IST S D1 D2 Initial State 3 3 3 3 3 3 3
14.1
Section
61 SER SER S1 S2 D n Search a Data Stack 3 3 – – 3 – 3
14.2
Section
62 ABSD ABSD S1 S2 D n Absolute Drum Sequencer 3 3 3 3 3 3 3
14.3
Section
63 INCD INCD S1 S2 D n Incremental Drum Sequencer 3 3 3 3 3 3 3
14.4
Section
64 TTMR TTMR D n Teaching Timer 3 3 – – 3 – 3
14.5
Section
65 STMR STMR S m D Special Timer 3 3 – – 3 – 3
14.6
Section
66 ALT ALT D Alternate State 3 3 3 3 3 3 3
14.7
Section
67 RAMP RAMP S1 S2 D n Ramp Variable Value 3 3 3 3 3 3 3
14.8
Section
68 ROTC ROTC S m1 m2 D Rotary Table Control 3 3 – – 3 – 3
14.9
Section
69 SORT SORT S m1 m2 D n SORT Tabulated Data 3 3 – – 3 – 3
14.10
Section
70 TKY TKY S D1 D2 Ten Key Input 3 3 – – 3 – 3
15.1
Section
71 HKY HKY S D1 D2 D3 Hexadecimal Input 3 3 – – 3 – 3
15.2
60
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
1
*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.
Introduction
*2: The function is changed in the FX3UC Series Ver.1.30 or later. *4: The function is changed in the FX3UC Series Ver.2.20 or later.
*3: The instruction is provided in the FX3UC Series Ver.1.30 or later. *5: The instruction is provided in the FX3UC Series Ver.2.20 or later.
Applicable PLC
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
2
Overview
External FX I/O Device
Section
73 SEGD SEGD S D Seven Segment Decoder 3 3 – – 3 – 3
15.4
Section
74 SEGL SEGL S D n Seven Segment With Latch 3 3 3 3 3 3 3
15.5 3
List
Instruction
Section
75 ARWS ARWS S D1 D2 n Arrow Switch 3 3 – – 3 – 3
15.6
Section
76 ASC ASC S D ASCII Code Data Input 3 3 – – 3 – 3
15.7
Section
4
77 PR Print (ASCII Code) 3 3 – – 3 – 3
in Detail
Devices
PR S D 15.8
Constant
Device &
Specified the
External FX Device
Section
80 RS RS S m D n Serial Communication 3 3 3 3 3 3 3
16.1
Section
81 PRUN PRUN S D Parallel Run (Octal Mode) 3 3 3 3 3 3 3
16.2 6
Programming
Before
Hexadecimal to ASCII Section
82 ASCI ASCI S D n 3 3 3 3 3 3 3
Conversion 16.3
Instruction
Basic
84 CCD CCD S D n Check Code 3 3 3 3 3 3 3
16.5
Section
87 RS2 RS2 S m D n n1 Serial Communication 2 3 3 – – – – –
16.6
Section
88 PID PID S1 S2 S3 D PID Control Loop 3 3 3 3 3 3 3
16.7
9
Move & Compare
FNC10-FNC19
89 to 99 – –
Data Transfer 2
100,
– –
101
10
Operation
Arith. & Logic
FNC20-FNC29
Section
102 ZPUSH ZPUSH D Batch Store of Index Register 3 *5 – – – – –
17.1
61
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
Data Transfer 2
Section
103 ZPOP ZPOP D Batch POP of Index Register 3 *5 – – – – –
17.2
104 to
– –
109
Floating Point
Section
110 ECMP ECMP S1 S2 D Floating Point Compare 3 3 – – 3 – 3
18.1
Section
111 EZCP EZCP S1 S2 S D Floating Point Zone Compare 3 3 – – 3 – 3
18.2
Section
112 EMOV EMOV S D Floating Point Move 3 3 – – – – –
18.3
113 to
– –
115
Section
120 EADD EADD S1 S2 D Floating Point Addition 3 3 – – 3 – 3
18.8
Section
121 ESUB ESUB S1 S2 D Floating Point Subtraction 3 3 – – 3 – 3
18.9
Section
122 EMUL EMUL S1 S2 D Floating Point Multiplication 3 3 – – 3 – 3
18.10
Section
123 EDIV EDIV S1 S2 D Floating Point Division 3 3 – – 3 – 3
18.11
Section
124 EXP EXP S D Floating Point Exponent 3 3 – – – – –
18.12
Section
127 ESQR ESQR S D Floating Point Square Root 3 3 – – 3 – 3
18.15
Section
128 ENEG ENEG D Floating Point Negation 3 3 – – – – –
18.16
62
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
1
*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.
Introduction
*2: The function is changed in the FX3UC Series Ver.1.30 or later. *4: The function is changed in the FX3UC Series Ver.2.20 or later.
*3: The instruction is provided in the FX3UC Series Ver.1.30 or later. *5: The instruction is provided in the FX3UC Series Ver.2.20 or later.
Applicable PLC
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
2
Overview
Floating Point
Section
130 SIN SIN S D Floating Point Sine 3 3 – – 3 – 3
18.18
Section
131 COS COS S D Floating Point Cosine 3 3 – – 3 – 3
18.19 3
List
Instruction
Section
132 TAN TAN S D Floating Point Tangent 3 3 – – 3 – 3
18.20
Section
133 ASIN ASIN S D Floating Point Arc Sine 3 3 – – – – –
18.21
Section
4
134 ACOS Floating Point Arc Cosine 3 3 – – – – –
in Detail
Devices
ACOS S D 18.22
Section
135 ATAN ATAN S D Floating Point Arc Tangent 3 3 – – – – –
18.23
Constant
Device &
Specified the
Floating Point Radians to Section
137 DEG DEG S D 3 3 – – – – –
Degrees Conversion 18.25
138,
– –
139
Data Operation 2
6
Programming
Before
Section
140 WSUM WSUM S D n Sum of Word Data 3 *5 – – – – –
19.1
Section
141 WTOB WTOB S D n WORD to BYTE 3 *5 – – – – –
19.2
7
Section
Instruction
Basic
142 BTOW BTOW S D n BYTE to WORD 3 *5 – – – – –
19.3
Section
143 UNI UNI S D n 4-bit Linking of Word Data 3 *5 – – – – –
19.4
145,
– –
146
Section
147 SWAP SWAP S Byte Swap 3 3 – – 3 – 3
19.6
9
Move & Compare
FNC10-FNC19
148 – –
Section
149 SORT2 SORT2 S m1 m2 D n Sort Tabulated Data 2 3 *5 – – – – –
19.7
10
Operation
Arith. & Logic
FNC20-FNC29
63
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
Positioning Control
Section
150 DSZR DSZR S1 S2 D1 D2 DOG Search Zero Return 3 *4 – – – – –
20.1
*2, Section
151 DVIT DVIT S1 S2 D1 D2 Interrupt Positioning 3 – – – – –
4 20.2
Section
152 TBL TBL D n Batch Data Positioning Mode 3 *5 – – – – –
20.3
153,
– –
154
Section
155 ABS ABS S D1 D2 Absolute Current Value Read 3 3 3 3 *1 3 *1
20.4
Section
156 ZRN ZRN S1 S2 S3 D Zero Return 3 *4 3 3 – 3 –
20.5
Section
157 PLSV PLSV S D1 D2 Variable Speed Pulse Output 3 3 3 3 – 3 –
20.6
Section
158 DRVI DRVI S1 S2 D1 D2 Drive to Increment 3 3 3 3 – 3 –
20.7
Section
159 DRVA DRVA S1 S2 D1 D2 Drive to Absolute 3 3 3 3 – 3 –
20.8
Section
160 TCMP TCMP S1 S2 S3 S D RTC Data Compare 3 3 3 3 3 3 3
21.1
Section
161 TZCP TZCP S1 S2 S D RTC Data Zone Compare 3 3 3 3 3 3 3
21.2
Section
162 TADD TADD S1 S2 D RTC Data Addition 3 3 3 3 3 3 3
21.3
Section
163 TSUB TSUB S1 S2 D RTC Data Subtraction 3 3 3 3 3 3 3
21.4
Section
164 HTOS HTOS S D Hour to Second Conversion 3 3 – – – – –
21.5
Section
165 STOH STOH S D Second to Hour Conversion 3 3 – – – – –
21.6
Section
166 TRD TRD D Read RTC data 3 3 3 3 3 3 3
21.7
Section
167 TWR TWR S Set RTC data 3 3 3 3 3 3 3
21.8
168 – –
Section
169 HOUR HOUR S D1 D2 Hour Meter 3 3 3 3 *1 3 *1
21.9
64
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
1
*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.
Introduction
*2: The function is changed in the FX3UC Series Ver.1.30 or later. *4: The function is changed in the FX3UC Series Ver.2.20 or later.
*3: The instruction is provided in the FX3UC Series Ver.1.30 or later. *5: The instruction is provided in the FX3UC Series Ver.2.20 or later.
Applicable PLC
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
2
Overview
External Device
List
Instruction
172 to
– –
175
in Detail
Devices
Block 22.4
178,
– –
179
Extension Function
Constant
Device &
Specified the
(FX2N/FX2NC)
Others
181 – –
Section
6
182 COMRD Read Device Comment Data 3 *5 – – – – –
Programming
Before
COMRD S D 24.1
183 – –
Section
184 RND RND D Random Number Generation 3 3 – – – – –
24.2 7
Instruction
Basic
185 – –
Section
186 DUTY DUTY n1 n2 D Timing Pulse Generation 3 *5 – – – – –
24.3
8
Program Flow
FNC00-FNC09
187 – –
Section
188 CRC CRC S D n Cyclic Redundancy Check 3 3 – – – – –
24.4
190,
– –
191
Section
193 BK- BK- S1 S2 D n Block Data Subtraction 3 *5 – – – – –
25.2
65
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
Block Data Subtraction
Block Data Compare Section
194 BKCMP= BKCMP= S1 S2 D n 3 *5 – – – – –
S1 = S2 25.3
Section
202 $+ $+ S1 S2 D Link Character Strings 3 3 – – – – –
26.3
Section
208 INSTR INSTR S1 S2 D n Character string search 3 *5 – – – – –
26.9
Section
209 $MOV $MOV S D Character String Transfer 3 3 – – – – –
26.10
Data Operation 3
Section
210 FDEL FDEL S D n Deleting Data from Tables 3 *5 – – – – –
27.1
Section
211 FINS FINS S D n Inserting Data to Tables 3 *5 – – – – –
27.2
66
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
1
*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.
Introduction
*2: The function is changed in the FX3UC Series Ver.1.30 or later. *4: The function is changed in the FX3UC Series Ver.2.20 or later.
*3: The instruction is provided in the FX3UC Series Ver.1.30 or later. *5: The instruction is provided in the FX3UC Series Ver.2.20 or later.
Applicable PLC
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
2
Overview
Data Operation 3
Section
213 SFR SFR D n Bit Shift Right with Carry 3 3 – – – – –
27.4
Section
3 3
214 SFL SFL D n Bit Shift Left with Carry – – – – –
27.5 3
List
Instruction
215 to
– –
219
Data Comparison
220 to
223
– –
4
in Detail
Devices
Section
224 LD= LD= S1 S2 Load Compare S1 = S2 3 3 3 3 3 3 3
28.1
Section
225 LD> LD> S1 S2 Load Compare S1 > S2 3 3 3 3 3 3 3
28.1
Section
5
226 LD< LD< S1 S2 Load Compare S1 < S2 3 3 3 3 3 3 3
Constant
Device &
Specified the
28.1
227 – –
Section
228 LD<> LD<> S1 S2 Load Compare S1 ≠ S2 3 3 3 3 3 3 3
28.1 6
Programming
Before
Section
229 LD<= LD<= S1 S2 Load Compare S1 ≤ S2 3 3 3 3 3 3 3
28.1
Section
230 LD>= LD>= S1 S2 Load Compare S1 ≥ S2 3 3 3 3 3 3 3
28.1
7
Instruction
Basic
231 – –
Section
232 AND= AND= S1 S2 AND Compare S1 = S2 3 3 3 3 3 3 3
28.2
Section
234 AND< AND< S1 S2 AND Compare S1 < S2 3 3 3 3 3 3 3
28.2
235 – –
9
Section
Move & Compare
FNC10-FNC19
Section
237 AND<= AND<= S1 S2 AND Compare S1 ≤ S2 3 3 3 3 3 3 3
28.2
239 – –
67
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
Data Comparison
Section
240 OR= OR Compare S1 = S2 3 3 3 3 3 3 3
OR= S1 S2 28.3
Section
241 OR> OR Compare S1 > S2 3 3 3 3 3 3 3
OR> S1 S2 28.3
Section
242 OR< OR Compare S1 < S2 3 3 3 3 3 3 3
OR< S1 S2 28.3
243 – –
Section
244 OR<> OR Compare S1 ≠ S2 3 3 3 3 3 3 3
OR<> S1 S2 28.3
Section
245 OR<= OR Compare S1 ≤ S2 3 3 3 3 3 3 3
OR<= S1 S2 28.3
Section
246 OR>= OR Compare S1 ≥ S2 3 3 3 3 3 3 3
OR>= S1 S2 28.3
247 to
– –
249
250 to
– –
255
Section
256 LIMIT LIMIT S1 S2 S3 D Limit Control 3 3 – – – – –
29.1
Section
257 BAND BAND S1 S2 S3 D Dead Band Control 3 3 – – – – –
29.2
Section
258 ZONE ZONE S1 S2 S3 D Zone Control 3 3 – – – – –
29.3
Scaling Section
259 SCL SCL S1 S2 D 3 3 – – – – –
(Coordinate by Point Data) 29.4
262 to
– –
268
Scaling 2 Section
269 SCL2 SCL2 S1 S2 D 3 *3 – – – – –
(Coordinate by X/Y Data) 29.7
68
FX3U/FX3UC Series Programmable Controllers 3 Instruction List
Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC Number
1
*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.
Introduction
*2: The function is changed in the FX3UC Series Ver.1.30 or later. *4: The function is changed in the FX3UC Series Ver.2.20 or later.
*3: The instruction is provided in the FX3UC Series Ver.1.30 or later. *5: The instruction is provided in the FX3UC Series Ver.2.20 or later.
Applicable PLC
FX3UC
FX3U
FX1NC
FX2NC
FNC No. Mnemonic Symbol Function Reference
FX1N
FX2N
FX1S
2
Overview
External Device Communication (Inverter Communication)
Section
270 IVCK IVCK S1 S2 D n Inverter Status Check 3 3 – – – – –
30.1
Section
271 IVDR IVDR S1 S2 S3 n Inverter Drive 3 3 – – – – –
30.2 3
List
Instruction
Section
272 IVRD IVRD S1 S2 D n Inverter Parameter Read 3 3 – – – – –
30.3
Section
273 IVWR IVWR S1 S2 S3 n Inverter Parameter Write 3 3 – – – – –
30.4
Section
4
274 IVBWR Inverter Parameter Block Write 3 3 – – – – –
in Detail
Devices
IVBWR S1 S2 S3 n 30.5
275 to
– –
277
Data Transfer 3
Section
5
278 RBFM Divided BFM Read 3 *5 – – – – –
Constant
Device &
Specified the
RBFM m1 m2 D n1 n2 31.1
Section
279 WBFM WBFM m1 m2 S n1 n2 Divided BFM Write 3 *5 – – – – –
31.2
Programming
Before
HSCT S1 m S2 D n With Data Table 32.1
281 to
– –
289
Instruction
Basic
290 LOADR LOADR S n Load From ER – – – – –
33.1
Section
291 SAVER SAVER S m D Save to ER 3 3 – – – – –
33.2
Section
293 LOGR LOGR S m D1 n D2 Logging R and ER 3 3 – – – – –
33.4
Section
294 RWER RWER S n Rewrite to ER 3 *3 – – – – –
33.5
9
Section
Move & Compare
FNC10-FNC19
296 to
– –
299
10
Operation
Arith. & Logic
FNC20-FNC29
69
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.1 Device Number List
4. Devices in Detail
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.
70
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.1 Device Number List
Introduction
Device name Description Reference
Counter
General type up counter
C0 to C99 100 points Counts 0 to 32,767
(16 bits) [variable]
The setting can be changed between the
Latched (battery backed)
type up counter C100 to C199 100 points
latched (battery backed) type and the non-
latched type using parameters.
2
(16 bits) [variable]
Overview
General type Section 4.6
bi-directional counter C200 to C219 20 points −2,147,483,648 to
(32 bits) [variable] +2,147,483,647 counts
Latched (battery backed) The setting can be changed between the
latched (battery backed) type and the non-
type
bi-directional counter
C220 to C234 15 points latched type using parameters. 3
List
Instruction
(32 bits) [variable]
*1. Available device numbers vary depending on the PLC. For details, refer to Section 4.2.
*2. For supported functions, refer to Chapter 36.
For handling the battery latched (battery backed) area, refer to Section 2.6.
High speed counter 4
in Detail
Devices
8 points maximum can be used among C235 to C255
1-phase 1-counting input
C235 to C245 [latched (battery backed) type].
Bi-directional (32 bits)
The setting can be changed between the latched (battery
backed) type and the non-latch type using parameters.
1-phase 2-counting input −2,147,483,648 to 2,147,483,647 counts
C246 to C250
Bi-directional (32 bits)
Hardware counter*1
1 phase: 100 kHz × 6 points, 10 kHz × 2 points Section 4.7 5
Constant
Device &
Specified the
2 phases: 50 kHz (1 edge count),
50 kHz (4 edge count)
2-phase 2-counting input Software counter
C251 to C255
Bi-directional (32 bits) 1 phase: 40 kHz
2 phases: 40 kHz (1 edge count),
10 kHz (4 edge count)
Data register (32 bits when used in pair form)
6
Programming
Before
General type (16 bits)
D0 to D199 200 points
[variable] The setting can be changed between the
latched (battery backed) latched (battery backed) type and the non-
type (16 bits) D200 to D511 312 points latched type using parameters.
[variable] Section 4.8
Instruction
Basic
type (16 bits) <D1000 to <7000
can be set as file registers in units of 500
[fixed] <file register> D7999> points>
points.
Special type (16 bits)*2 D8000 to D8511 512 points Chapter 36
Index type (16 bits) V0 to V7, Z0 to Z7 16 points Section 4.10
Extension register/Extension file register 8
Program Flow
FNC00-FNC09
Input interrupt
I0
to I5
6 points
Input delay interrupt Section 4.11
Timer interrupt I6
to I8
3 points
Counter interrupt I010 to I060 6 points For HSCS instruction
Nesting
For master control N0 to N7 8 points For MC instruction
10
Operation
Arith. & Logic
FNC20-FNC29
71
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.1 Device Number List
*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. For supported functions, refer to Chapter 36.
For handling of the latched (battery backed) area, refer to Section 2.6.
72
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.2 I/O Relays [X, Y]
1
4.2 I/O Relays [X, Y]
Introduction
Some numbers of input relays and output relays are specific ones secured in the main unit, and other
numbers are assigned to extension devices in the connection order. Because these numbers are octal,
numeric values such as "8" and "9" do not exist.
2
4.2.1 Numbers of I/O relays
Overview
The table below shows input relay (X) numbers and output relays (Y) numbers (Numbers are assigned in
octagon.)
Model
name
FX3UC-32MT-LT
When
extended
3
List
Instruction
256
FX3UC X000 to X017 X000 to X357
Input points
PLC 16 points 240 points
in total
Y000 to Y017 Y000 to Y357
Output
16 points 240 points
Model
FX3U-16M FX3U-32M FX3U-48M FX3U-64M FX3U-80M FX3U-128M
4
name
in Detail
Devices
FX3U X000 to X007 X000 to X017 X000 to X027 X000 to X037 X000 to X047 X000 to X077
Input
PLC 8 points 16 points 24 points 32 points 40 points 64 points
Y000 to Y007 Y000 to Y017 Y000 to Y027 Y000 to Y037 Y000 to Y047 Y000 to Y077
Output
8 points 16 points 24 points 32 points 40 points 64 points
5
Model When
Constant
Device &
Specified the
name extended
256
FX3U X000 to X367
Input points
PLC 248 points
in total
Y000 to Y367
Output
248 points
6
Programming
Before
4.2.2 Functions and roles
Examples of terminal names and wiring (sink input) are for the FX3U Series PLC.
0V
External power 7
supply
Instruction
Basic
24V COM1
Program example
S/S
Input X000 X001
signal Y000 Y000
X000 X000
Load
X000
Y000
Y000
8
Program Flow
FNC00-FNC09
Input NO contact
terminal X000 Y000 Output terminal
PLC NC contact
9
The PLC receives signals from external switches The PLC outputs signals to external loads through
Move & Compare
FNC10-FNC19
73
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.2 I/O Relays [X, Y]
Memory
The above method is called the batch I/O method (or refresh method).
74
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.3 Auxiliary Relay [M]
1
4.3 Auxiliary Relay [M]
Introduction
There are many auxiliary relays inside the PLC. Coils of auxiliary relays are driven by contacts of various
devices inside the PLC in the same way as output relays.
Auxiliary relays have many electronically NO contacts and NC contacts which can be used arbitrarily inside
the PLC. However, external loads cannot be driven directly by these contacts. External loads should be 2
driven by output relays.
Overview
4.3.1 Numbers of auxiliary relays
The table below shows auxiliary relay (M) numbers. (Numbers are assigned in decimal.)
List
Instruction
backed) type backed) type
M0 to M499 M500 to M1023 M1024 to M7679 M8000 to M8511
FX3U/FX3UC PLC
500 points*1 524 points*2 6656 points*3 512 points
*1. This area is not latched (battery backed). It can be changed to a latched (battery backed) area by
setting the parameters. 4
*2. This area is latched (battery backed). It can be changed to a non-latched (non-battery-backed) area
in Detail
Devices
by setting the parameters.
*3. The characteristics of latch (battery backup) cannot be changed in the parameters.
When simple N : N link or parallel link is used, some auxiliary relays are occupied for the link.
→ Refer to the Communication Control Manual. 5
Constant
Device &
Specified the
4.3.2 Functions and operation examples
1. General type
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
6
M100
Programming
Before
required in control, use latched (battery backed) type auxiliary relays.
M100
NO contact
M100 7
Instruction
Basic
NC contact
8
Program Flow
FNC00-FNC09
9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
75
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.3 Auxiliary Relay [M]
PLC
Backup against power failure
(set/reset circuit)
X000 X001 X000 = ON (at the left limit) → M600 = ON→ The table
M600 Rightward is driven rightward. → The power is turned OFF. → The
drive table is stopped in an intermediate position. → The table
M600 command is restarted (M600 = ON). → X001 = ON (at the right
limit) → M600 = OFF, M601 = ON → The table is driven
X001 X000 leftward.
M601 Leftward drive
command
M601
2) 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.
M8002
FNC 040 M1024 M1999
ZRST
Initial pulse
M1024 to M1999 are initialized.
76
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.4 State Relay [S]
1
4.4 State Relay [S]
Introduction
State relays (S) are important devices to program stepping type process control simply, and combined with
the step ladder instruction STL.
State relays can be used in the SFC (sequential function chart) programming method.
→ For programming by the step ladder instruction and SFC method, refer to Chapter 34. 2
Overview
4.4.1 Numbers of state relays
The table below shows state relay (S) numbers. (Numbers are assigned in decimal.)
General type
Latched (battery
backed) type
Fixed latched (battery
backed) type
Annunciator type 3
List
Instruction
S0 to S499
500 points S500 to S899 S1000 to S4095 S900 to S999
FX3U/FX3UC PLC (S0 to S9 are provided 400 points*2 3096 points*3 100 points*2
*1
initially.)
*1. This area is not latched (battery backed). It can be changed to a latched (battery backed) area by
setting the parameters.
4
in Detail
Devices
*2. This area is latched (battery backed). It can be changed to a non-latched (non-battery-backed) area
by setting the parameters.
*3. The characteristics of latch (battery backup) cannot be changed in the parameters.
Constant
Device &
Specified the
1. General type
Initial state In the stepping type process control shown in the left
S 2 figure, when the start signal X000 turns ON, the state
Start relay S20 is set (turned ON) and the solenoid valve
X000
TRAN Y000 for moving down turns on. 6
Start
Programming
Before
When the lower limit switch X001 turns ON the state
Moving down relay S21 is set (turned ON) and the solenoid valve
S 20 Y000 Y001 for clamping turns on.
Lower limit When the clamp confirmation limit switch X002 turns
X001 ON, the state relay S22 is set (turned ON).
Lower
limit
TRAN When the operation proceeds to the next step, the 7
Clamping state relay in the preceding step is automatically reset
Instruction
Basic
S 21 Y001
(turned OFF).
Clamping When the PLC turns OFF, all of general type state
X002
Clamping TRAN relays are turned OFF.
When the ON/OFF status just before power failure is
Moving up required, use latched (battery backed) type state 8
S 22 Y002
Program Flow
FNC00-FNC09
relays.
Upper limit
Upper X003
limit TRAN
9
State relays have many NO contacts and NC contacts in the same way as X001
Move & Compare
FNC10-FNC19
auxiliary relays, and such contacts can be used arbitrarily in sequence S10
programs.
When state relays (S) are not used for step ladder instructions, they can S10
be used in general sequences in the same way as auxiliary relays (M) (as M30
shown in the figure on the right).
Y005 10
Operation
Arith. & Logic
FNC20-FNC29
77
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.4 State Relay [S]
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
• When the special auxiliary relay M8049 is driven,
M8049 monitoring becomes valid.
RUN monitor
Y000 X000
FNC 46 • If the forward end detection input X000 is not
T 0 K 10 S900 activated within 1 second after the forward output
ANS
Y000 is driven, S900 is activated.
X001 X002
FNC 46 • If both the upper limit detection input X001 and the
T 1 K 20 S901 lower limit detection input X002 are deactivated at the
ANS
same time for 2 seconds or more, S901 is activated.
M8048
• When any annunciator among S900 to S999 turns
Y010 ON, the special auxiliary relay M8048 is activated and
the fault display output Y010 is activated.
78
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.5 Timer [T]
1
4.5 Timer [T]
Introduction
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). 2
Overview
4.5.1 Numbers of timers
The table below shows timer (T) numbers. (The numbers are assigned in decimal.)
Retentive type for 1 Retentive type for
For 100 ms pulses
0.1 to 3276.7 sec
For 10 ms pulses
0.01 to 327.67 sec ms pulses*1 100 ms pulses*1
For 1 ms pulses
0.001 to 32.767 sec
3
0.001 to 32.767 sec 0.1 to 3276.7 sec
List
Instruction
T 0 to T199 T246 to T249
200 points T250 to T255
FX3U/ 4 points for
------------- T200 to T245 6 points T256 to T511
FX3UC Interrupt execution
Routine program 46 points Latched (battery 256 points
PLC Latched (battery
type backed) type*1
T192 to T199 backed) type*1 4
in Detail
Devices
Timer numbers not used for timers can be used as data registers for storing numeric values.
*1. Retentive timers are backed up by battery.
Constant
Device &
Specified the
General type
X000
When the drive input X000 of the timer coil T200 turns ON, the
T200 K123 current value counter for T200 adds and counts clock pulses of
T200 Set value 10 ms. When the counted value becomes equivalent to the set
Y000 (constant) value K123, the output contact of the timer turns on.
A data register
can be
In other words, the output contact turns on 1.23 seconds after the 6
coil is driven.
Programming
Before
specified also.
1.23 sec When the drive input X000 turns OFF or when the power is
X000 turned off the timer is reset and the output contact returns.
Current Set value
value
Y000 7
Instruction
Basic
Retentive type
X001 Set value When the drive input X001 of the timer coil T250 turns ON, the
T250 K345 (constant) current value counter for T250 adds and counts clock pulses of
T250 A data register 100 ms. When the counted value becomes equivalent to the set
Y001 can be
X002
specified also. value K345, the output contact of the timer turns on. 8
Even if the drive input X001 turns OFF or the power is turned off
Program Flow
FNC00-FNC09
RST T250
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
Retentive time
t1 t2
t1 + t2 = 34.5 sec output contact is returned.
X001
Current Set value 9
Move & Compare
FNC10-FNC19
value
Y001
X002
10
Operation
Arith. & Logic
FNC20-FNC29
79
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.5 Timer [T]
1) 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 of 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.
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 α : 0.001 sec (timer for 1 ms), 0.01 sec (timer for 10 ms) or 0.1 sec (timer for 100 ms)
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.
80
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.5 Timer [T]
1
4.5.6 Program examples [off-delay timer and flicker timer]
Introduction
Off-delay timer
X001 T5
Y000 X001 2
Overview
Y000 X001
T 5 K200 Y000 T5 (20 sec)
List
Instruction
X001
X001 T2 2 1 2
T 1 K20 sec sec sec
T1 T2 T1
T 1
T 2 K10 Y000
T 2 One
4
in Detail
Devices
Y000 ( ) operation
cycle
In addition, the flicker operation can be performed by the ALT (FNC 66) instruction.
Constant
Device &
Specified the
→ For details, refer to Section 14.6.
Programming
Before
example.
X000
10 10 • M0 is an off-delay timer.
M0
sec sec
7
10 10 • M1 is a one-shot timer after "ON → OFF"
Instruction
Basic
M1
sec sec operation.
Flicker timer
M 2
81
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.5 Timer [T]
2) 32-bit
High 32 bits Low
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
524,288
262,144
131,072
65536
32768
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
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
Sign
0: Positive
number
1: Negative
number
82
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.6 Counter [C]
1
4.6 Counter [C]
Introduction
4.6.1 Numbers of counters
The table below shows counter (C) numbers. (Numbers are assigned in decimal.) 2
→ For high speed counters, refer to Section 4.7.
Overview
16-bit up counter 32-bit bi-directional counter
Counting range: 0 to 32767 Counting range: −2,147,483,648 to +2,147,483,647
Latched (battery backed) Latched (battery backed)
General type type (protected by battery General type type (protected by battery
against power failure) against power failure) 3
FX3U/
List
Instruction
C 0 to C 99 C100 to C199 C200 to C219 C220 to C234
FX3UC
100 points*1 100 points*2 20 points*1 15 points*2
PLC
*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 4
by setting the parameters.
in Detail
Devices
Counter numbers not used as counters can be converted as data registers for storing numeric values.
Constant
Device &
Specified the
with the operating condition such as the counting direction switching and counting range, etc.
Item 16-bit counter 32-bit counter
Up-counting and down-counting can be switched
Counting direction Up-counting
(as shown in Subsection 4.6.3)
Set value 1 to 32767 −2,147,483,648 to +2,147,483,647 6
Programming
Before
Set value specification Constant (K) or data register Constant (K) or a pair of data registers
Current value change Does not change after counting up Changes even after counting up (ring counter)
Latches (in up-counting), or reset (in down-
Output contact Latches after counting up
counting)
When RST instruction is executed, current value of counter is reset to "0" and output contact
Reset operation
returns 7
Instruction
Basic
Current value register 16 bits 32 bits
83
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.6 Counter [C]
Y000
• 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".
• 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.
• In a latch type counter, the current value, output contact operation and reset status of the counter are
latched (battery backed) by the battery built in the PLC.
→ For details on backup methods against power failure, refer to Section 2.6.
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.
84
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.6 Counter [C]
1
• When the coil C200 is driven by the counting input X014, a counter starts up-counting or down-counting.
Introduction
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.
X013
X013
2
X014
Overview
RST C200
45 4
Current 3 3
X014 value 2 2
1 1
C200 K-5 0 0 0
−1
C200 −2
−3−4 −4−3
Y001 Set value (constant) When output has
been already −5 −5
3
It can be specified −6 −6
−7 −7
List
Instruction
indirectly also. activated. −8
Y001
• 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.)
4
in Detail
Devices
• 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.
• In a latch type counter, the current value, output contact operation and reset status of the counter are
latched (battery backed) by the battery built in the PLC.
→ For details on backup methods against power failure, refer to Section 2.6. 5
• A 32-bit counter can be used as a 32-bit data register. 32-bit counters cannot be handled as target devices
Constant
Device &
Specified the
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.
Programming
Before
1. 16-bit counter
1) Specification by constant (K)
Constant (decimal constant): 1 to 32767
X003
C0 K100
100 counts 7
Instruction
Basic
2) Indirect specification (D)
low.
X003
C0 D5
D5 = 100
100 counts
9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
85
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.6 Counter [C]
2. 32-bit counter
1) Specification by constant (K)
Constant (decimal constant):
X003 −2,147,483,648 to +2,147,483,647
C200 K43,210 43210 counts
*1 +2,147,483,647
Sign
0: Positive
number
1: Negative
number
*1. The sign is valid only when a counter is handled as a substitute for data register.
2) 32-bit
Sign
0: Positive
number
1: Negative
number
86
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.6 Counter [C]
1
2. Examples in applied instructions
Introduction
For the full use of counters as numeric devices, refer to the explanation of applied instructions later.
Overview
CMP (current value), and the result is output to M0 to M2.
FNC 22 C 5 K 2 D4(D5)
C5 (current value) is multiplied by 2, and transferred 3
MUL to (D5, D4).
List
Instruction
FNC 12 C200 D0(D1) C 200 (current value) is transferred to (D1, D0).
DMOV
*1
C200 (current value) is compared with a decimal
FNC 11
DZCP K100 K20000 C200 M10 integer zone 100 to 20000, and the result is output to 4
M10 and M11.
in Detail
Devices
*1. Make sure to use 32-bit operation instructions for 32-bit counters.
Constant
Device &
Specified the
6
Programming
Before
7
Instruction
Basic
8
Program Flow
FNC00-FNC09
9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
87
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
A phase A phase
1 edge +1 +1 −1 −1
A counter automatically executes
count B phase B phase up-count or down-count according to
Up-counting Down-counting changes in the input status of the A/
2-phase
B phase as shown on the left.
2-count +1 +1 +1 +1 +1 −1 −1 −1 −1 −1
The counting direction can be
input A phase A phase checked with M8251 to M8255.
4 edge
ON: Down-counting
count B phase B phase OFF: Up-counting
+1 +1 +1 +1 −1 −1 −1 −1
Up-counting Down-counting
*1. 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.
88
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
1
5. High speed counter device list
Introduction
External reset External start
Classification Counter No. Edge count Data length
input terminal input terminal
C235*2
C236*2
C237*2
−
2
Hardware C238*2
Overview
Not provided Not provided
counter*1 C239*2
1-phase C240*2 32-bit
1-count bi-directional
C244(OP)*3
input − counter
C245(OP)*3
C241 3
C242 − Provided*5 Not provided
List
Instruction
Software counter C243
C244*3
− Provided*5 Provided
C245*3
Hardware C246*2
− Not provided Not provided
counter*1 C248(OP)*2*3
1-phase
C247
32-bit 4
2-count − bi-directional Provided*5 Not provided
in Detail
Devices
*3
input Software counter C248 counter
C249
− Provided*5 Provided
C250
1*4
C251*2 Not provided
Hardware 4*4
Not provided
counter*1
C253*2
1*4
Provided*5
5
4*4
Constant
Device &
Specified the
2-phase 32-bit
1*4
2-count C252 *4
bi-directional Provided*5
input 4 counter Not provided
1*4
Software counter C253(OP)*6 Not provided
4*4
C254 1*4
Provided*5 Provided
6
C255 4*4
Programming
Before
*1. 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.7.9. 7
→ For the total frequency, refer to Subsection 4.7.10.
Instruction
Basic
*2. Cautions on wiring should be considered for these high speed counters.
→ For the wiring, refer to the Hardware Edition of the main unit.
*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). 8
→ For the method to switch the counter function, refer to Subsection 4.7.7.
Program Flow
FNC00-FNC09
*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.7.8.
*5. The external reset input is usually reset by turning ON, but can be changed to be reset by turning OFF
9
Move & Compare
FNC10-FNC19
89
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
90
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
1
4.7.2 Input assignment for high speed counters
Introduction
Inputs X000 to X007 are assigned as shown in the table below according to each high speed counter number.
When a high speed counter is used, the filter constant of a corresponding input number in the main unit
automatically changes (X000 to X005: 5 µs, X006 and X007: 50 µs). Input terminals not used for high speed
counters, however, can be used as general inputs.
When FX3U-4HSX-ADP unit is connected to an FX3U PLC, input terminals inside bold-line frames in the table
2
Overview
below are assigned to the first FX3U-4HSX-ADP unit, and other input terminals are assigned to the second
FX3U-4HSX-ADP unit.
→ For the input specifications of the FX3U-4HSX-ADP, refer to the FX3U Hardware Edition.
→ For the input specifications of the main unit, refer to the Hardware Edition of the main unit.
Input terminal assignment
Counter No.
Classifica-
tion X000 X001 X002 X003 X004 X005 X006 X007
3
List
Instruction
C235*1 H/W*2 U/D
*1 *2 U/D
C236 H/W
*1 *2 U/D
C237 H/W
*1 *2 U/D
C238 H/W
C239 *1
H/W *2 U/D 4
in Detail
Devices
1-phase C240*1 H/W*2 U/D
1-count
C241 S/W U/D R
input
C242 S/W U/D R
C243 S/W U/D R
C244
*3
S/W
*2
U/D R S
U/D
5
C244(OP) H/W
Constant
Device &
Specified the
C245 S/W U/D R S
C245(OP)*3 H/W*2 U/D
C246*1 H/W*2 U D
C247 S/W U D R
1-phase
2-count
C248 S/W U D R 6
Programming
Before
input C248(OP)*1*3 H/W*2 U D
C249 S/W U D R S
C250 S/W U D R S
*1 *2 A B
C251 H/W
2-phase
C252 S/W A B R
7
C253*1 H/W*2 A B R
2-count
Instruction
Basic
input*4 C253(OP)*3 S/W A B
C254 S/W A B R S
C255 S/W A B R S
H/W: Hardware counter S/W: Software counter U: Up-counting input D: Down-counting input
A: A phase input B: B phase input R: External reset input S: External start input 8
Program Flow
FNC00-FNC09
*1. Cautions on wiring should be considered for these high speed counters.
→ For the wiring, refer to the Hardware Edition of the main unit.
*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.
9
Move & Compare
FNC10-FNC19
→ For the condition under which it is handled as a software counter, refer to Subsection 4.7.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.7.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.
10
Operation
Arith. & Logic
FNC20-FNC29
→ For the method on how to use a 2-phase 2-count input counter with on edge count of 4,
refer to Subsection 4.7.8.
91
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
• 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.
For example, when C251 is used, X000 and X001 are occupied. As a result, "C235, C236, C241, C244,
C246, C247, C249, C252 and C254", "input interrupt pointers I000 and I101", "pulse catch contacts M8170
and M8171" and "SPD, ZRN, DSZR and DVIT instructions using X000 and/or X001" cannot be used.
• 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.
Operation example
The counter C235 shown above operates as follows:
X010 Up counting Down counting Up counting
X000
Counting
input 5
4 4
C235 3 3
2 2
Current 1 1
value 0 0 0
−1
−2
When output has −3 −3
already been activated −4 −4
−5 −5
−6 −6
−7 −7
−8
C235 output contact
When counting with input X000, C235 executes up-count or down-count as an interrupt.
• 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.
92
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
1
• The current value increases or decreases without regard to the operation of the output contact. When a
Introduction
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
2
Overview
counter are latched (battery backed) by the backup battery built in the PLC.
List
Instruction
RST C246
the input X001 turns from OFF to ON.
X012
C246 D2(D3) • The up/down-count operation of C246 to C250 can be checked
with M8246 to M8250.
ON status: Down-counting
Set value is (D3,D2)
OFF status: Up-counting 4
in Detail
Devices
• While X012 is ON, C249 immediately starts counting when the
X011
RST C249 input X006 turns ON.
The up-count input is X000, and the down-count input is X001.
X012
• A high speed counter can be reset by X011 in a sequence as
C249 K1234
shown in the figure, but C249 is immediately reset without any
program when X002 is closed. So a program with X011 is not 5
necessary.
Constant
Device &
Specified the
• The up/down-count operation of C246 to C250 can be checked
with M8246 to M8250.
ON status: Down-counting
OFF status: Up-counting
6
3. 2-phase 2-count input
Programming
Before
These counters are 32-bit binary bi-directional counters, and the operation of the output contact for the
current value is equivalent to that in 1-phase high speed counters described above.
X011 • While X012 is ON, C251 counts the operation of the inputs
RST C251 X000 (A phase) and X001 (B phase) as interrupt.
X012
When X011 turns ON a RST instruction is executed and C251
is reset.
7
Instruction
Basic
C251 K1234
• When the current value becomes equivalent to or larger than
C251 the set value, Y002 turns ON. When the current value becomes
Y002 equivalent to or smaller than the set value, Y002 turns OFF.
M8251 • Y003 turns ON (for down-count) or OFF (for up-count)
Y003 according to the counting direction. 8
Program Flow
FNC00-FNC09
93
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
• 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
A phase A phase
+1 +1 −1 −1
B phase B phase
Up-counting Down-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 −1 −1 −1 −1
Up-counting Down-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
*1. 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.7.10.
94
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
1
4.7.5 Related devices
Introduction
1. Devices used to switch the counting direction of 1-phase 1-count input counters
Type Counter No. Specifying device Up-counting Down-counting
C235
C236
M8235
M8236
2
Overview
C237 M8237
C238 M8238
C239 M8239
1-phase
C240 M8240 OFF ON
1-counting input
C241
C242
M8241
M8242
3
List
Instruction
C243 M8243
C244 M8244
C245 M8245
2. Devices used to check the counting direction of 1-phase 2-count input counters and
2-phase 2-count input counters 4
in Detail
Devices
Type Counter No. Monitoring device OFF ON
C246 M8246
C247 M8247
1-phase
C248 M8248
2-counting input
C249 M8249
C250 M8250
5
Up-counting Down-counting
Constant
Device &
Specified the
C251 M8251
C252 M8252
2-phase
C253 M8253
2-counting input
C254 M8254
C255 M8255
6
Programming
Before
3. Devices used to switch the high speed counter function
Device No. Name Description
Contact for changing function
M8388 Changes the function of high speed counter.
of high speed counter
Switches the logic of the external reset input.
M8389
(For details, refer to Subsection 4.7.6.) 7
M8390 Switches the function of C244. (For details, refer to Subsection 4.7.7.)
Instruction
Basic
M8391 Switches the function of C245. (For details, refer to Subsection 4.7.7.)
Function switching Switches the function of C248 and C253.
M8392 device (For details, refer to Subsection 4.7.7.)
Switches the edge count (between 1 and 4) of C251, C252 and C254.
M8198
(For details, refer to Subsection 4.7.8.) 8
Switches the edge count (between 1 and 4) of C253, C255 and C253 (OP).
Program Flow
FNC00-FNC09
M8199
(For details, refer to Subsection 4.7.8.)
*1. Cleared when the PLC mode switches from STOP to RUN.
95
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
Caution
The counter C253 is switched to a software counter when the logic of the external reset input signal is
inverted.
M8388
M8392
• Reset input is not provided.
C248(OP)
• It operates as a hardware counter.
C248
K{{{
M8388
M8392
• Reset input is not provided.
C253(OP)
• It operates as a software counter.
C253
K{{{
96
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
1
4.7.8 How to use 2-phase 2-count input counter C251 to C255 at
Introduction
4 edge count.
For the 2-phase 2-count input counters C251 to C255, the edge count is usually set to 1. By using the
programs shown in the table below, the edge count may be set to 4.
Counter No.
When using 2-phase 2-counting input counter at edge
Description
2
count of 4
Overview
M8000
M8198
C251
C251
K{{{
3
1 edge count (before change)
List
Instruction
M8000 A phase
M8198 +1 +1
C252 B phase
C252 Up-counting
K{{{ 4
in Detail
Devices
M8000 A phase
M8199 −1 −1
C253 B phase
C253 Down-counting
K{{{
↓ 5
4 edge count (after change)
Constant
Device &
Specified the
M8000
M8199 +1 +1 +1 +1 +1
M8388 A phase
C253(OP) M8392
B phase
C253 +1 +1 +1 +1
Up-counting
6
K{{{
Programming
Before
−1 −1 −1 −1 −1
M8000
M8198 A phase
C254
B phase
−1 −1 −1 −1
C254
K{{{ Down-counting
7
Instruction
Basic
M8000
M8199
C255
C255
K{{{ 8
Program Flow
FNC00-FNC09
9
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
97
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
C235
C235 K{{{
C236
DHSCS K100 C235 Y000
C237
C238
In this case, C235 is handled as a software counter.
C239
C240
• When an index register is used for a counter number specified in DHSCS (FNC 53), DHSCR
C244(OP)
(FNC 54), DHSZ (FNC 55) or DHSCT (FNC280) instruction, all hardware counters are handled as
C245(OP)
software counters.
C246
Example: C235Z0
C248(OP)
C251
DHSCS K100 C235Z0 Y000
C253
• 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.7.6.
M8388
M8389
C253
K{{{
98
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
1
4.7.10 Response frequency of high speed counters
Introduction
1. Response frequency of hardware counters
The table below shows the maximum response frequency of hardware counters.
When hardware counters are handled as software counters in some operating conditions, their maximum
response frequency becomes equivalent to that of software counters, and thus hardware counters are some 2
Overview
times subject to restrictions in total frequency.
→ For the conditions in which hardware counters are handled as software counters,
refer to the previous page.
Maximum response frequency
Counter type Counter No.
Main unit FX3U-4HSX-ADP
C235, C236, C237, C238, C239, C240 100 kHz 3
1-phase 1-counting input
List
Instruction
C244(OP), C245(OP) 10 kHz 200 kHz
1-phase 2-counting input C246, C248(OP) 100 kHz
2-phase 2-count- 1 edge count 50 kHz 100 kHz
C251, C253
ing input 4 edge count 50 kHz 100 kHz
in Detail
Devices
The table below shows the maximum response frequency and total frequency of software counters.
When using the HSZ or HSCT instruction in a program, both the maximum response frequency and the total
frequency are limited for all software counters without regarding the operands of the instruction. When
examining a system or creating a program, consider the limitations, and use software counters within the
allowable range of maximum response frequency and total frequency.
→ For the conditions handled as software counters, refer to the previous page. 5
Constant
Device &
Specified the
1) When special analog adapters and FX3U/FX3UC Series special function blocks/units are not used
Response frequency and total frequency according to instructions used
When HSZ and HSCT
Following Magnifica- When only HSCT When only HSZ When both HSZ and HSCT
instructions are not
software tion for instruction is used instruction is used instructions are used
used
Software counter with calculating
Counter type total Maximum Maximum Maximum Maximum
counter HSCS, HSCR,
HSZ or HSCT
instruction*1
frequency response
frequency
Total
frequency
response
frequency
Total
frequency
response
frequency
Total
frequency
response
frequency
Total
frequency 6
(kHz) (kHz) (kHz) (kHz)
Programming
Before
(kHz) (kHz) (kHz) (kHz)
C241,
C242, C235, C236,
C243, C237, C238, ×1 40 30
1-phase C244, C239, C240
1-counting input
C245
C244(OP), 40 - (Num-
30-(Number
7
− ×1 10 10 ber of
Instruction
Basic
C245(OP) 80− of instruc- 60−
instruc-
1.5×(Num tion)*2 1.5×(Num
C247, tion)*2
80 60 ber of ber of
1-phase C248, C246, instruc- instruc-
2-counting input C249,
×1 40 30
C248(OP) tion) tion)
C250
2- 1 edge
phase count C252,
×1 40 30 8
Program Flow
FNC00-FNC09
2- C253(OP), (40-Num-
count- 4 edge C254,
C251, C253 (30-Number
ber of
ing count C255
×4 10 7.5 instruc-
of instruction)
input ÷4
tion) ÷ 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.
9
*2. The high speed counters C244 (OP) and C245 (OP) can count up to 10 kHz.
Move & Compare
FNC10-FNC19
10
Operation
Arith. & Logic
FNC20-FNC29
99
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
2) When special analog adapters and FX3U/FX3UC Series special function blocks/units are used
Counter type Response frequency and total frequency according to instruction use condition
When HSZ and HSCT
Following Magnifica- When only HSCT When only HSZ When both HSZ and HSCT
instructions are not
software tion for instruction is used instruction is used instructions are used
used
Software counter with calculating
counter HSCS, HSCR, total Maximum Maximum Maximum Maximum
Total Total Total Total
HSZ or HSCT frequency response response response response
frequency frequency frequency frequency
instruction*1 frequency frequency frequency frequency
(kHz) (kHz) (kHz) (kHz)
(kHz) (kHz) (kHz) (kHz)
C241,
C242, C235, C236,
C243, C237, C238, ×1 30 25
1-phase C244, C239, C240
1-counting input
C245
C244(OP), 30 - (Num-
25-(Number
− ×1 10 10 ber of
of instruc-
C245(OP) instruc- 50− 50−
1.5×(Num tion)*2 1.5×(Num
C247, tion)*2
60 50 ber of ber of
1-phase C248, C246, instruc- instruc-
2-counting input C249,
×1 30 25
C248(OP) tion) tion)
C250
1 edge
2- ×1 30 25
phase count C252,
2- C253(OP), (30-Num-
count- 4 edge C254,
C251, C253 (25-Number
ber of
ing count C255
×4 7.5 6.2 instruc-
of instruction)
input ÷4
tion) ÷ 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.
4. Calculation example
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 blocks/units.
Magnification
Input Maximum response frequency Used
Used high speed counter No. for calculating
frequency calculation instruction
total frequency
Operates as
C237 30 kHz 40 − 6 (times) = 34 kHz ×1
software counter HSZ
C241 20 kHz 40 − 6(times) = 34 kHz ×1 instruction × 6
C253(OP) Software counter times
4 kHz {40 − 6(times)} ÷ 4 = 8.5 kHz ×4
[4 edge count]
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 culculated of follows:
"30 kHz × 1[C237]" + "20 kHz × 1[C241]" + "4 × 4[C253(OP)]" = 66 kHz ≤ 71 kHz
100
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]
1
4.7.11 Cautions on use
Introduction
• For a contact to drive the coil of a high speed counter, use a contact which is normally ON during high
speed counting.
Overview
C235 C235
Program a contact which is If a number of input relay for counting is specified, high
normally ON during counting. speed counter cannot execute accurate counting.
• If the operation of a high speed counter is triggered by a device such as a switch, the counter may 3
malfunction due to extra noise from switch chattering or contact bounce.
List
Instruction
• 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 REFF instruction or special data register D8020 (input filter
adjustment).
The input filter for input relays not being used for high speed counters remains 10 ms (initial value). 4
• The inputs X000 to X007 are used for high speed counters, input interrupt, pulse catch, SPD/DSZR/DVIT/
in Detail
Devices
ZRN instructions and general-purpose inputs. There should be no overlap between each input number.
For example, when C251 is used, X000 and X001 are occupied. As a result, "C235, C236, C241, C244,
C246, C247, C249, C252 and C254", "input interrupt pointers I00* and I10*", "pulse catch contacts M8170
and M8171" and "SPD instruction using X000 and/or X001" cannot be used.
• When a counting pulse is not provided, none of the high speed counter output contacts will turn ON, even 5
if the PLC executes an instruction where "present value = set value."
Constant
Device &
Specified the
• Counting may be started or stopped for a high speed counter when the output coil (OUT C***) is set to ON
or OFF. Program