0% found this document useful (0 votes)
913 views900 pages

Fx-3u Programming Manual

Uploaded by

Ameer Faisal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
913 views900 pages

Fx-3u Programming Manual

Uploaded by

Ameer Faisal
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

PROGRAMMING MANUAL - Basic & Applied Instructions Edition

FX3U / FX3UC SERIES PROGRAMMABLE CONTROLLERS


FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instruction Edition

FX3U/FX3UC Series Programmable Controllers


Programming Manual - Basic & Applied Instruction
Edition

Manual No. JY997D16601


Revision B
Date 2006 / 2

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.

© 2005 MITSUBISHI ELECTRIC CORPORATION

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

1.1 Programming Language in PLCs .................................................................................................. 21


1.1.1 Types of programming languages ................................................................................................. 21
1.1.2 Compatibility among programs...................................................................................................... 22

2. Overview (Sequence Program) 23

2.1 Introduction of Convenient Functions............................................................................................ 23


2.1.1 Convenient functions for input processing..................................................................................... 23
2.1.2 Convenient functions for output processing .................................................................................. 24
2.1.3 Functions for supporting sequence control.................................................................................... 24
2.2 Introduction of Applied Instructions ............................................................................................... 25
2.2.1 Major applied instructions.............................................................................................................. 25
2.3 Analog/Positioning Special Control ............................................................................................... 27
2.4 Link and Communication............................................................................................................... 27
2.5 Introduction of Devices Constructing PLC .................................................................................... 29
2.5.1 Relationship among devices.......................................................................................................... 29
2.5.2 Device list ...................................................................................................................................... 30
2.6 Program Memory and Devices (Battery Backed).......................................................................... 32
2.6.1 Memory structure........................................................................................................................... 32
2.6.2 Memory operations and latched (battery backed) (power ON/OFF and RUN/STOP)................... 33
2.6.3 Types of backup methods against power failure ........................................................................... 35
2.6.4 Change between general devices and latched (battery backed) devices ..................................... 35
2.6.5 How to initialize devices (battery backed) ..................................................................................... 35
2.7 Types and Setting of Parameters.................................................................................................. 36
2.7.1 Parameter list ................................................................................................................................ 36
2.7.2 Parameter initial values and available tools for changing parameter values................................. 37
2.7.3 Memory capacity setting range...................................................................................................... 38
2.7.4 Compatible optional memory model .............................................................................................. 38
2.7.5 Entry code ..................................................................................................................................... 39
2.7.6 Special unit initial value setting [GX Developer Ver.8.23Z or later] ............................................... 43
2.7.7 Positioning setting [for TBL (FNC152) instruction] [GX Developer Ver.8.23Z or later].................. 43
2.7.8 Parameter settings by GX Developer ............................................................................................ 44

3. Instruction List 54

3.1 Basic Instructions .......................................................................................................................... 54


3.2 Step Ladder Instructions ............................................................................................................... 56
3.3 Applied Instructions ... in Ascending Order of FNC Number......................................................... 56

4. Devices in Detail 70

4.1 Device Number List....................................................................................................................... 70


4.2 I/O Relays [X, Y]............................................................................................................................ 73
4.2.1 Numbers of I/O relays.................................................................................................................... 73
4.2.2 Functions and roles ....................................................................................................................... 73
4.2.3 Operation timing of input relays..................................................................................................... 74
4.3 Auxiliary Relay [M] ........................................................................................................................ 75
4.3.1 Numbers of auxiliary relays ........................................................................................................... 75
4.3.2 Functions and operation examples................................................................................................ 75

3
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents

4.4 State Relay [S] .............................................................................................................................. 77


4.4.1 Numbers of state relays................................................................................................................. 77
4.4.2 Functions and operation examples................................................................................................ 77
4.5 Timer [T]........................................................................................................................................ 79
4.5.1 Numbers of timers ......................................................................................................................... 79
4.5.2 Functions and operation examples................................................................................................ 79
4.5.3 Set value specification method...................................................................................................... 80
4.5.4 Cautions on routines...................................................................................................................... 80
4.5.5 Details of timer operation and timer accuracy ............................................................................... 80
4.5.6 Program examples [off-delay timer and flicker timer] .................................................................... 81
4.5.7 Handling timers as numeric devices.............................................................................................. 82
4.6 Counter [C].................................................................................................................................... 83
4.6.1 Numbers of counters ..................................................................................................................... 83
4.6.2 Features of counters...................................................................................................................... 83
4.6.3 Related devices (to specify counting direction) [32-bit counter] .................................................... 83
4.6.4 Functions and operation examples................................................................................................ 84
4.6.5 Set value specification method...................................................................................................... 85
4.6.6 Response speed of counters......................................................................................................... 86
4.6.7 Handling counters as numeric devices.......................................................................................... 86
4.7 High Speed Counter [C] ................................................................................................................ 88
4.7.1 Types and device numbers of high speed counters ...................................................................... 88
4.7.2 Input assignment for high speed counters..................................................................................... 91
4.7.3 Handling of high speed counters ................................................................................................... 92
4.7.4 Current value update timing and comparison of current value ...................................................... 94
4.7.5 Related devices ............................................................................................................................. 95
4.7.6 Changing the logic of external reset input signal........................................................................... 96
4.7.7 Assignment of counter input terminal and switching of function.................................................... 96
4.7.8 How to use 2-phase 2-count input counter C251 to C255 at 4 edge count................................... 97
4.7.9 Conditions for hardware counters to be handled as software counters......................................... 98
4.7.10 Response frequency of high speed counters .............................................................................. 99
4.7.11 Cautions on use......................................................................................................................... 101
4.8 Data Register and File Register [D] ............................................................................................ 102
4.8.1 Numbers of data registers and file registers................................................................................ 102
4.8.2 Structures of data registers and file registers .............................................................................. 103
4.8.3 Functions and operation examples of data registers................................................................... 104
4.8.4 Functions and operation examples of file registers ..................................................................... 106
4.8.5 Cautions on using file registers ................................................................................................... 109
4.9 Extension Register [R] and Extension File Register [ER] ........................................................... 110
4.9.1 Numbers of extension registers and extension file registers ....................................................... 110
4.9.2 Data storage destination and access method ............................................................................. 110
4.9.3 Structures of extension registers and extension file registers ..................................................... 111
4.9.4 Initialization of extension registers and extension file registers................................................... 111
4.9.5 Functions and operation examples of extension registers .......................................................... 112
4.9.6 Functions and operation examples of extension file registers..................................................... 113
4.9.7 Cautions on using extension file registers ................................................................................... 114
4.9.8 Registration of data in extension registers and extension file registers....................................... 115
4.10 Index Register [V and Z] ........................................................................................................... 119
4.10.1 Numbers of index registers........................................................................................................ 119
4.10.2 Functions and structures ........................................................................................................... 119
4.10.3 Indexing of devices.................................................................................................................... 120
4.11 Pointer [P and I] ........................................................................................................................ 121
4.11.1 Numbers of pointers .................................................................................................................. 121
4.11.2 Functions and operation examples of pointers for branch......................................................... 121
4.11.3 Functions and operation examples of pointers for interrupt ...................................................... 122

4
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents

5. How to Specify Devices and Constants to Instructions 126

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

6. What to Understand before Programming 137

6.1 How to Read Explanation of Instructions .................................................................................... 137


6.2 Cautions on Creation of Fundamental Programs........................................................................ 140
6.2.1 Programming procedure and execution order ............................................................................. 140
6.2.2 Double output (double coil) operation and countermeasures...................................................... 141
6.2.3 Circuits which cannot be programmed and countermeasures .................................................... 142
6.3 I/O Processing and Response Delay .......................................................................................... 143
6.4 Mutual Relationship Among Program Flow Control Instructions................................................. 144
6.5 General Rules for Applied Instructions........................................................................................ 146
6.5.1 Expression and operation type of applied instructions ................................................................ 146
6.5.2 Handling of general flags............................................................................................................. 148
6.5.3 Handling of operation error flag ................................................................................................... 151
6.5.4 Handling functions of extension flag............................................................................................ 152
6.5.5 Limitation in number of instructions ............................................................................................. 152

7. Basic Instruction 154

7.1 LD, LDI ........................................................................................................................................ 156


7.2 OUT............................................................................................................................................. 158
7.3 AND, ANI..................................................................................................................................... 161
7.4 OR, ORI ...................................................................................................................................... 164
7.5 LDP, LDF, ANDP, ANDF, ORP, ORF ......................................................................................... 167
7.6 ORB ............................................................................................................................................ 173
7.7 ANB............................................................................................................................................. 174
7.8 MPS, MRD, MPP ........................................................................................................................ 175
7.9 MC, MCR .................................................................................................................................... 180
7.10 INV ............................................................................................................................................ 183
7.11 MEP, MEF................................................................................................................................. 184
7.12 PLS, PLF................................................................................................................................... 186
7.13 SET, RST .................................................................................................................................. 188
7.14 NOP .......................................................................................................................................... 191
7.15 END........................................................................................................................................... 192
7.16 Number of Instruction Steps and Specified Devices ................................................................. 193

5
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents

8. Program Flow – FNC 00 to FNC 09 194

8.1 FNC 00 – CJ / Conditional Jump................................................................................................. 195


8.1.1 CJ instruction and operations of contact and coil ........................................................................ 199
8.1.2 Relationship between master control instruction and jump instruction........................................ 201
8.2 FNC 01 – CALL / Call Subroutine ............................................................................................... 202
8.2.1 Cautions on subroutines and interrupt routines........................................................................... 204
8.3 FNC 02 – SRET / Subroutine Return .......................................................................................... 206
8.4 FNC 03 – IRET / Interrupt Return ............................................................................................... 207
8.5 FNC 04 – EI / Enable Interrupt.................................................................................................... 209
8.6 FNC 05 – DI / Disable Interrupt................................................................................................... 210
8.7 FNC 06 – Main Routine Program End ........................................................................................ 211
8.8 FNC 07 – WDT / Watchdog Timer Refresh................................................................................. 213
8.9 FNC 08 – FOR / Start a FOR/NEXT Loop .................................................................................. 216
8.10 FNC 09 – NEXT / End a FOR/NEXT Loop................................................................................ 217

9. Move and Compare – FNC 10 to FNC 19 220

9.1 FNC 10 – CMP / Compare .......................................................................................................... 221


9.2 FNC 11 – ZCP / Zone Compare.................................................................................................. 223
9.3 FNC 12 – MOV / Move................................................................................................................ 226
9.4 FNC 13 – SMOV / Shift Move ..................................................................................................... 229
9.5 FNC 14 – CML / Complement..................................................................................................... 231
9.6 FNC 15 – BMOV / Block Move.................................................................................................... 233
9.6.1 Function of transfer between file registers and data registers..................................................... 235
9.7 FNC 16 – FMOV / Fill Move ........................................................................................................ 237
9.8 FNC 17 – XCH / Exchange ......................................................................................................... 240
9.9 FNC 18 – BCD / Conversion to Binary Coded Decimal .............................................................. 242
9.10 FNC 19 – BIN Conversion to Binary ......................................................................................... 245

10. Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 248

10.1 FNC 20 – ADD / Addition .......................................................................................................... 249


10.2 FNC 21 – SUB / Subtraction ..................................................................................................... 252
10.3 FNC 22 – MUL / Multiplication .................................................................................................. 255
10.4 FNC 23 – DIV / Division ............................................................................................................ 258
10.5 FNC 24 – INC / Increment......................................................................................................... 261
10.6 FNC 25 – DEC / Decrement...................................................................................................... 263
10.7 FNC 26 – WAND / Logical Word AND ...................................................................................... 264
10.8 FNC 27 – WOR / Logical Word OR........................................................................................... 266
10.9 FNC 28 – WXOR / Logical Exclusive OR.................................................................................. 268
10.10 FNC 29 – NEG / Negation....................................................................................................... 270

11. Rotation and Shift Operation – FNC 30 to FNC 39 272

11.1 FNC 30 – ROR / Rotation Right ................................................................................................ 273


11.2 FNC 31 – ROL / Rotation Left ................................................................................................... 275
11.3 FNC 32 – RCR / Rotation Right with Carry ............................................................................... 277
11.4 FNC 33 – RCL / Rotation Left with Carry .................................................................................. 279
11.5 FNC 34 – SFTR / Bit Shift Right................................................................................................ 281
11.6 FNC 35 – SFTL / Bit Shift Left................................................................................................... 283
11.6.1 Replacement of SFT instruction in F1 and F2 Series ................................................................ 286
11.7 FNC 36 – WSFR / Word Shift Right .......................................................................................... 287
11.8 FNC 37 – WSFL / Word Shift Left ............................................................................................. 289
11.9 FNC 38 – SFWR / Shift Write [FIFO/FILO Control]................................................................... 291
11.10 FNC 39 – SFRD / Shift Read [FIFO Control] .......................................................................... 294

6
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents

12. Data Operation – FNC 40 to FNC 49 296

12.1 FNC 40 – ZRST / Zone Reset................................................................................................... 297


12.2 FNC 41 – DECO / Decode ........................................................................................................ 300
12.3 FNC 42 – ENCO / Encode ........................................................................................................ 303
12.4 FNC 43 – SUM / Sum of Active Bits.......................................................................................... 305
12.5 FNC 44 – BON / Check Specified Bit Status............................................................................. 308
12.6 FNC 45 – MEAN / Mean ........................................................................................................... 310
12.7 FNC 46 – ANS / Timed Annunciator Set................................................................................... 312
12.8 FNC 47 – ANR / Annunciator Reset.......................................................................................... 314
12.9 FNC 48 – SQR / Square Root................................................................................................... 315
12.10 FNC 49 – FLT / Conversion to Floating Point ......................................................................... 317

13. High Speed Processing – FNC 50 to FNC 59 319

13.1 FNC 50 – REF / Refresh ........................................................................................................... 320


13.1.1 What should be understood before using REF instruction ........................................................ 323
13.2 FNC 51 – REFF / Refresh and Filter Adjust.............................................................................. 324
13.2.1 What should be understood before using REFF instruction ...................................................... 326
13.3 FNC 52 – MTR / Input Matrix .................................................................................................... 327
13.3.1 The method and cautions for MTR instruction........................................................................... 330
13.4 FNC 53 – HSCS / High Speed Counter Set.............................................................................. 331
13.4.1 Common cautions on using instructions for high speed counter ............................................... 333
13.5 FNC 54 – HSCR / High Speed Counter Reset.......................................................................... 336
13.6 FNC 55 – HSZ / High Speed Counter Zone Compare .............................................................. 339
13.6.1 Program in which comparison result is set to ON when power is turned ON
[ZCP (FNC 11) instruction] ..................................................................................................... 342
13.6.2 Table high speed comparison mode (M8130) ........................................................................... 344
13.6.3 Frequency control mode (HSZ and PLSY instructions) (M8132) .............................................. 347
13.7 FNC 56 – SPD / Speed Detection............................................................................................. 350
13.8 FNC 57 – PLSY / Pulse Y Output ............................................................................................. 354
13.9 FNC 58 – PWM / Pulse Width Modulation ................................................................................ 359
13.10 FNC 59 – PLSR / Acceleration/Deceleration Setup ................................................................ 362

14. Handy Instruction – FNC 60 to FNC 69 367

14.1 FNC 60 – IST / Initial State ....................................................................................................... 368


14.1.1 IST instruction equivalent circuit................................................................................................ 370
14.1.2 Example of IST instruction introduction (example of workpiece transfer mechanism) .............. 371
14.2 FNC 61 – SER / Search a Data Stack ...................................................................................... 379
14.3 FNC 62 – ABSD / Absolute Drum Sequencer........................................................................... 382
14.4 FNC 63 – INCD / Incremental Drum Sequencer ....................................................................... 385
14.5 FNC 64 – TTMR / Teaching Timer............................................................................................ 387
14.6 FNC 65 – STMR / Special Timer............................................................................................... 389
14.7 FNC 66 – ALT / Alternate State ................................................................................................ 391
14.8 FNC 67 – RAMP / Ramp Variable Value .................................................................................. 393
14.9 FNC 68 – ROTC / Rotary Table Control ................................................................................... 395
14.10 FNC 69 – SORT / SORT Tabulated Data ............................................................................... 398

7
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents

15. External FX I/O Device – FNC 70 to FNC 79 401

15.1 FNC 70 – TKY / Ten Key Input ................................................................................................. 402


15.2 FNC 71 – HKY / Hexadecimal Input.......................................................................................... 406
15.3 FNC 72 – DSW / Digital Switch (Thumbwheel Input)................................................................ 410
15.4 FNC 73 – SEGD / Seven Segment Decoder ............................................................................ 413
15.5 FNC 74 – SEGL / Seven Segment With Latch.......................................................................... 415
15.5.1 How to select a seven-segment display unit ............................................................................. 418
15.5.2 How to select parameter "n" based on seven-segment display specifications.......................... 418
15.6 FNC 75 – ARWS / Arrow Switch ............................................................................................... 420
15.7 FNC 76 – ASC / ASCII Code Data Input................................................................................... 425
15.8 FNC 77 – PR / Print (ASCII Code) ............................................................................................ 427
15.9 FNC 78 – FROM / Read From A Special Function Block ......................................................... 430
15.9.1 Common items between FROM instruction and TO instruction (details)................................... 433
15.10 FNC 79 – TO / Write To A Special Function Block ................................................................. 435

16. External FX Device – FNC 80 to FNC 89 437

16.1 FNC 80 – RS / Serial Communication....................................................................................... 438


16.2 FNC 81 – PRUN / Parallel Run (Octal Mode) ........................................................................... 440
16.3 FNC 82 – ASCI / Hexadecimal to ASCII Conversion ................................................................ 442
16.4 FNC 83 – HEX / ASCII to Hexadecimal Conversion ................................................................. 445
16.5 FNC 84 – CCD / Check Code ................................................................................................... 448
16.6 FNC 87 – RS2 / Serial Communication 2.................................................................................. 451
16.7 FNC 88 – PID / PID Control Loop ............................................................................................. 453

17. Data Transfer 2 – FNC100 to FNC109 457

17.1 FNC102 – ZPUSH/Batch Store of Index Register..................................................................... 458


17.2 FNC103 – ZPOP/Batch POP of Index Register ........................................................................ 461

18. Floating Point – FNC110 to FNC139 462

18.1 FNC110 – ECMP / Floating Point Compare.............................................................................. 464


18.2 FNC111 – EZCP / Floating Point Zone Compare ..................................................................... 466
18.3 FNC112 – EMOV / Floating Point Move ................................................................................... 468
18.4 FNC116 – ESTR / Floating Point to Character String Conversion............................................ 469
18.5 FNC117 – EVAL / Character String to Floating Point Conversion ............................................ 475
18.6 FNC118 – EBCD / Floating Point to Scientific Notation Conversion......................................... 480
18.7 FNC119 – EBIN / Scientific Notation to Floating Point Conversion .......................................... 482
18.8 FNC120 – EADD / Floating Point Addition................................................................................ 484
18.9 FNC121 – ESUB / Floating Point Subtraction........................................................................... 485
18.10 FNC122 – EMUL / Floating Point Multiplication ...................................................................... 486
18.11 FNC123 – EDIV / Floating Point Division................................................................................ 487
18.12 FNC124 – EXP / Floating Point Exponent .............................................................................. 488
18.13 FNC125 – LOGE / Floating Point Natural Logarithm .............................................................. 490
18.14 FNC126 – LOG10 / Floating Point Common Logarithm.......................................................... 492
18.15 FNC127 – ESQR / Floating Point Square Root ...................................................................... 494
18.16 FNC128 – ENEG / Floating Point Negation ............................................................................ 495
18.17 FNC129 – INT / Floating Point to Integer Conversion............................................................. 496
18.18 FNC130 – SIN / Floating Point Sine........................................................................................ 498
18.19 FNC131 – COS / Floating Point Cosine.................................................................................. 500
18.20 FNC132 – TAN / Floating Point Tangent ................................................................................ 501
18.21 FNC133 – ASIN / Floating Point Arc Sine............................................................................... 502

8
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents

18.22 FNC134 – ACOS / Floating Point Arc Cosine ......................................................................... 504


18.23 FNC135 – ATAN / Floating Point Arc Tangent........................................................................ 506
18.24 FNC136 – RAD / Floating Point Degrees to Radians Conversion .......................................... 508
18.25 FNC137 – DEG / Floating Point Radians to Degrees Conversion .......................................... 510

19. Data Operation 2 – FNC140 to FNC149 512

19.1 FNC140 – WSUM / Sum of Word Data..................................................................................... 513


19.2 FNC141 – WTOB / WORD to BYTE ......................................................................................... 515
19.3 FNC142 – BTOW / BYTE to WORD ......................................................................................... 517
19.4 FNC143 – UNI / 4-bit Linking of Word Data .............................................................................. 520
19.5 FNC144 – DIS / 4-bit Grouping of Word Data........................................................................... 522
19.6 FNC147 – SWAP / Byte Swap .................................................................................................. 524
19.7 FNC149 – SORT2 / Sort Tabulated Data 2............................................................................... 525

20. Positioning Control – FNC150 to FNC159 529

20.1 FNC150 – DSZR / Dog Search Zero Return............................................................................. 530


20.2 FNC151 – DVIT / Interrupt Positioning...................................................................................... 532
20.3 FNC152 – TBL / Batch Data Positioning Mode......................................................................... 534
20.4 FNC155 – ABS / Absolute Current Value Read........................................................................ 535
20.5 FNC156 – ZRN / Zero Return ................................................................................................... 536
20.6 FNC157 – PLSV / Variable Speed Pulse Output ...................................................................... 538
20.7 FNC158 – DRVI / Drive to Increment........................................................................................ 540
20.8 FNC159 – DRVA / Drive to Absolute ........................................................................................ 542

21. Real Time Clock Control – FNC160 to FNC169 544

21.1 FNC160 – TCMP / RTC Data Compare.................................................................................... 545


21.2 FNC161 – TZCP / RTC Data Zone Compare ........................................................................... 547
21.3 FNC162 – TADD / RTC Data Addition ...................................................................................... 550
21.4 FNC163 – TSUB / RTC Data Subtraction ................................................................................. 552
21.5 FNC164 – HTOS / Hour to Second Conversion........................................................................ 554
21.6 FNC165 – STOH / Second to Hour Conversion........................................................................ 556
21.7 FNC166 – TRD / Read RTC data ............................................................................................. 558
21.8 FNC167 – TWR / Set RTC data................................................................................................ 559
21.9 FNC169 – HOUR / Hour Meter ................................................................................................. 562

22. External Device – FNC170 to FNC179 564

22.1 FNC170 – GRY / Decimal to Gray Code Conversion ............................................................... 565


22.2 FNC171 – GBIN / Gray Code to Decimal Conversion .............................................................. 566
22.3 FNC176 – RD3A / Read form Dedicated Analog Block ............................................................ 567
22.4 FNC177 – WR3A / Write to Dedicated Analog Block................................................................ 568

23. Introduction of Alternate Instructions – FNC180 569

23.1 Instruction correspondence table .............................................................................................. 569

9
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents

24. Others – FNC181 to FNC189 571

24.1 FNC182 – COMRD / Read Device Comment Data .................................................................. 572


24.2 FNC184 – RND / Random Number Generation........................................................................ 575
24.3 FNC186 – DUTY / Timing Pulse Generation ............................................................................ 577
24.4 FNC188 – CRC / Cyclic Redundancy Check ............................................................................ 580
24.5 FNC189 – HCMOV / High Speed Counter Move ...................................................................... 584

25. Block Data Operation – FNC190 to FNC199 589

25.1 FNC192 – BK+ / Block Data Addition ....................................................................................... 590


25.2 NFC193 – BK– / Block Data Subtraction ................................................................................. 593
25.3 FNC194~199 – BKCMP=, >, <, < >, <=, >= / Block Data Compare......................................... 596

26. Character String Control – FNC200 to FNC209 601

26.1 FNC200 – STR / BIN to Character String Conversion .............................................................. 602


26.2 FNC201 – VAL / Character String to BIN Conversion............................................................... 607
26.3 FNC202 – $+ / Link Character Strings ...................................................................................... 612
26.4 FNC203 – LEN / Character String Length Detection ................................................................ 615
26.5 FNC204 – RIGHT / Extracting Character String Data from the Right ....................................... 617
26.6 FNC205 – LEFT / Extracting Character String Data from the Left ............................................ 620
26.7 FNC206 – MIDR / Random Selection of Character Strings ...................................................... 623
26.8 FNC207 – MIDW / Random Replacement of Character Strings ............................................... 626
26.9 FNC208 – INSTR / Character string search.............................................................................. 630
26.10 FNC209 – $MOV / Character String Transfer ......................................................................... 632

27. Data Operation 3 – FNC210 to FNC219 635

27.1 FNC210 – FDEL / Deleting Data from Tables........................................................................... 636


27.2 FNC211 – FINS / Inserting Data to Tables ............................................................................... 638
27.3 FNC212 – POP / Shift Last Data Read [FILO Control] ............................................................. 640
27.4 FNC213 – SFR / Bit Shift Right with Carry................................................................................ 643
27.5 FNC214 – SFL / Bit Shift Left with Carry................................................................................... 645

28. Data Comparison – FNC220 to FNC249 647

28.1 FNC224~230 – LD =, >, <, <>, <=, >= / Data Comparison ....................................................... 649
28.2 FNC232~238 – AND=, >, <, < >, <=, >= / Data Comparison .................................................... 652
28.3 FNC240~246 – OR=, >, <, < >, <=, >= / Data Comparison ...................................................... 655

29. Data Table Operation – FNC250 to FNC269 658

29.1 FNC256 – LIMIT / Limit Control ................................................................................................ 659


29.2 FNC257 – BAND / Dead Band Control ..................................................................................... 663
29.3 FNC258 – ZONE / Zone Control ............................................................................................... 666
29.4 FNC259 – SCL / Scaling (Coordinate by Point Data) ............................................................... 669
29.5 FNC260 – DABIN / Decimal ASCII to BIN Conversion ............................................................. 674
29.6 FNC261 – BINDA / BIN to Decimal ASCII Conversion ............................................................. 677
29.7 FNC269 – SCL2 / Scaling 2 (Coordinate by X/Y Data)............................................................. 681

10
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents

30. External Device Communication


(Inverter Communication) – FNC270 to FNC274 686

30.1 FNC270 – IVCK / Inverter Status Check................................................................................... 687


30.2 FNC271 – IVDR / Inverter Drive................................................................................................ 689
30.3 FNC272 – IVRD / Inverter Parameter Read.............................................................................. 691
30.4 FNC273 – IVWR / Inverter Parameter Write ............................................................................. 693
30.5 FNC274 – IVBWR / Inverter Parameter Block Write................................................................. 695

31. Data Transfer 3 – FNC275 to FNC279 698

31.1 FNC278 – RBFM / Divided BFM Read ..................................................................................... 699


31.1.1 Common items between RBFM (FNC278) instruction and WBFM (FNC279) instruction ......... 701
31.2 FNC279 – WBFM / Divided BFM Write..................................................................................... 704

32. High Speed Processing 2 – FNC280 to FNC289 706

32.1 FNC280 – HSCT / High Speed Counter Compare With Data Table......................................... 707

33. Extension File Register Control – FNC290 to FNC299 712

33.1 FNC290 – LOADR / Load From ER .......................................................................................... 713


33.2 FNC291 – SAVER / Save to ER ............................................................................................... 715
33.3 FNC292 – INITR / Initialize R and ER....................................................................................... 723
33.4 FNC293 – LOGR / Logging R and ER ...................................................................................... 727
33.5 FNC294 – RWER / Rewrite to ER............................................................................................. 732
33.6 FNC295 – INITER / Initialize ER ............................................................................................... 736

34. SFC Program and Step Ladder 739

34.1 SFC Program ............................................................................................................................ 739


34.1.1 Outline ....................................................................................................................................... 739
34.1.2 Explanation of function and operation ....................................................................................... 739
34.1.3 SFC program creating procedure .............................................................................................. 740
34.1.4 Handling and role of initial state relay........................................................................................ 744
34.1.5 Latched (battery backed) type state relays................................................................................ 745
34.1.6 Role of RET instruction.............................................................................................................. 745
34.1.7 Preliminary knowledge for creating SFC program..................................................................... 745
34.1.8 SFC flow formats ....................................................................................................................... 753
34.1.9 Program of branch/recombination state relays.......................................................................... 756
34.1.10 Rule for creating branch circuit................................................................................................ 757
34.1.11 Program examples .................................................................................................................. 762
34.2 Step Ladder............................................................................................................................... 771
34.2.1 Outline ....................................................................................................................................... 771
34.2.2 Explanation of function and operation ....................................................................................... 771
34.2.3 Expression of step ladder .......................................................................................................... 772
34.2.4 Creation of step ladder program (SFC program → STL program) ............................................ 773
34.2.5 Preliminary knowledge for creating step ladder programs ........................................................ 774
34.2.6 Program with state relays in branches and recombination........................................................ 777
34.2.7 Program examples .................................................................................................................... 781

11
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents

35. Interrupt Function and Pulse Catch Function 787

35.1 Outline....................................................................................................................................... 787


35.2 Common Items.......................................................................................................................... 788
35.2.1 How to disable interrupt function and pulse catch function ....................................................... 788
35.2.2 Related items............................................................................................................................. 789
35.2.3 Cautions on use (common) ....................................................................................................... 790
35.3 Input Interrupt (Interrupt Triggered by External Signal) [Without Delay Function] .................... 792
35.3.1 Input interrupt (interrupt triggered by external signal) [without delay function] .......................... 792
35.3.2 Examples of practical programs (programs to measure short pulse width)............................... 796
35.4 Input interrupt (Interrupt by External Signal) [With Delay Function] .......................................... 798
35.5 Timer Interrupt (Interrupt in Constant Cycle)............................................................................. 799
35.5.1 Timer interrupt (interrupt in constant cycle) ............................................................................... 799
35.5.2 Examples of practical program (timer interrupt programs using applied instruction)................. 800
35.6 Counter Interrupt - Interrupt Triggered by Counting Up of High Speed Counter....................... 803
35.7 Pulse Catch Function [M8170 to M8177] .................................................................................. 804

36. Operation of Special Devices (M8000 -, D8000 -) 806

36.1 Special Device List (M8000 -, D8000 -) .................................................................................... 806


36.1.1 Special Auxiliary Relay (M8000 to M8511)................................................................................ 806
36.1.2 Special Data Register (D8000 to D8511) .................................................................................. 821
36.2 Supplement of Special Devices (M8000 - and D8000 -) ........................................................... 836
36.2.1 RUN monitor and initial pulse [M8000 to M8003] ...................................................................... 836
36.2.2 Watchdog timer [D8000]............................................................................................................ 837
36.2.3 Battery voltage low detection [M8005 and M8006].................................................................... 838
36.2.4 Power failure detection time [D8008, M8008 and M8007]......................................................... 838
36.2.5 Scan time (monitor) [D8010 to D8012] ...................................................................................... 838
36.2.6 Internal clock [M8011 to M8014] ............................................................................................... 839
36.2.7 Real time clock [M8015 to M8019 and D8013 to D8019] .......................................................... 839
36.2.8 How to set real time clock.......................................................................................................... 841
36.2.9 Input filter adjustment [D8020]................................................................................................... 843
36.2.10 Battery [BATT (BAT)] LED OFF command [M8030]................................................................ 844
36.2.11 Clear command [M8031 and M8032] ...................................................................................... 845
36.2.12 Memory hold stop [M8033] (output hold in STOP mode) ........................................................ 845
36.2.13 All outputs disable [M8034] ..................................................................................................... 845
36.2.14 Individual operation for RUN/STOP input [M8035 to M8037].................................................. 846
36.2.15 Constant scan mode [M8039 and D8039] ............................................................................... 847
36.2.16 State control in program with STL instruction/SFC chart [M8040]........................................... 847
36.2.17 Analog special adapters [M8260 to M8299 and D8260 to D8299] .......................................... 848

37. Error Check Method and Error Code List 850

37.1 States and Colors of LEDs PLC Operation Status.................................................................... 850


37.1.1 POWER LED [lit, flickering or unlit] [FX3U/FX3UC].................................................................... 850
37.1.2 RUN LED [lit or unlit] [FX3U/FX3UC].......................................................................................... 850
37.1.3 BATT LED [lit or unlit] [FX3U/FX3UC] ........................................................................................ 851
37.1.4 ERROR LED [lit, flickering or unlit] [FX3U/FX3UC] .................................................................... 851
37.1.5 L RUN LED [FX3UC].................................................................................................................. 852
37.1.6 L ERR LED [FX3UC] .................................................................................................................. 852
37.2 Error Code Check Method and Indication ................................................................................. 853
37.2.1 Error code check method by display module (FX3U-7DM) ........................................................ 853
37.2.2 Error code check method by GX Developer .............................................................................. 854
37.2.3 Error indication .......................................................................................................................... 855
37.3 Supplementary Explanation of Devices for Error Detection ...................................................... 855
37.3.1 Error detection (M8060 to/D8060 to) ......................................................................................... 855
37.3.2 Operations of special devices for error detection ...................................................................... 856
37.3.3 Error detection timing ................................................................................................................ 856
37.4 Error Code List and Action ........................................................................................................ 857

12
FX3U/FX3UC Series Programmable Controllers
Programming Manual - Basic & Applied Instructions Edition Table of Contents

Appendix A: Programming Tool Applicability and Version Upgrade History 864

Appendix A-1 Programming Tool Applicability.......................................................................... 864


Appendix A-1-1 Programming tool applicability.................................................................................... 864
Appendix A-1-2 Cautions on writing during RUN ................................................................................. 865
Appendix A-1-3 Cautions on using transparent function by way of USB in GOT1000 Series.............. 868
Appendix A-1-4 Cautions on using transparent (2-port) function of GOT-F900 Series ........................ 869
Appendix A-2 Peripheral product applicability (except programming tools).............................. 870
Appendix A-2-1 Applicable products and versions ............................................................................... 870
Appendix A-2-2 Incompatible peripheral products................................................................................ 870
Appendix A-3 Version Upgrade History .................................................................................... 871
Appendix A-3-1 Version check ............................................................................................................. 871
Appendix A-3-2 How to look at manufacturer’s serial number ............................................................. 871
Appendix A-3-3 Version upgrade history [FX3U] .................................................................................. 871
Appendix A-3-4 Version upgrade history [FX3UC]................................................................................ 872

Appendix B: Instruction Execution Time 873

Appendix B-1 Basic Instruction Execution Time ....................................................................... 873


Appendix B-2 Step Ladder Instruction Execution Time ............................................................ 874
Appendix B-3 Label (P/I) Execution Time ................................................................................. 875
Appendix B-4 Applied Instruction Execution Time .................................................................... 875
Appendix B-5 Execution Time of Pulse Generation Instruction P in Each Applied Instruction . 883
Appendix B-6 Execution Time on Combination of Applicable Devices and Indexing ............... 884
Appendix B-6-1 Basic instruction (LD/LDI/AND/ANI/OR/ORI) execution time ..................................... 884
Appendix B-6-2 Applied instruction execution time .............................................................................. 884

Appendix C: Applied Instruction List [by Instruction Type/in Alphabetic Order] 886

Appendix C-1 Applied instructions [by instruction type] ............................................................ 886


Appendix C-2 Applied instructions [in alphabetical order] ........................................................ 890

Warranty................................................................................................................................. 895

Revised History ..................................................................................................................... 896

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

Generic Names and Abbreviations Used in Manuals

Abbreviation/generic name Name


Programmable controllers
FX3U Series Generic name of FX3U Series PLCs
FX3U PLC or main unit Generic name of FX3U Series PLC main units
FX3UC Series Generic name of FX3UC Series PLCs
Generic name of FX3UC Series PLC main units
FX3UC PLC or main unit
Only manuals in Japanese are available for these products.
FX2N Series Generic name of FX2N Series PLCs
FX2NC Series Generic name of FX2NC Series PLCs
FX1N Series Generic name of FX1N Series PLCs
Generic name of FX1NC Series PLC main units
FX1NC Series
Only manuals in Japanese are available for these products.
FX1S Series Generic name of FX1S Series PLCs
Expansion boards
Generic name of expansion boards (The models shown below):
Expansion board
FX3U-232-BD, FX3U-422-BD, FX3U-485-BD, FX3U-USB-BD, and FX3U-CNV-BD
Special adapters
Generic name of special high speed I/O adapters, special communication adapters, and
special analog adapters
Special adapter
Connectable equipment may vary depending on the main unit. For connectable
equipment, refer to the User’s Manual - Hardware Edition of the main unit.
Generic name of special high speed I/O adapters (The models shown below):
Special high speed I/O adapter
FX3U-2HSY-ADP and FX3U-4HSX-ADP
Special communication Generic name of special communication adapters (The models shown below):
adapter FX3U-232ADP and FX3U-485ADP
Generic name of special analog adapters (The models shown below):
Special analog adapter
FX3U-4AD-ADP, FX3U-4DA-ADP, FX3U-4AD-PT-ADP, and FX3U-4AD-TC-ADP
Extension equipment
Generic name of I/O extension equipment and special extension equipment
Extension equipment Connectable equipment may vary depending on the main unit. For connectable
equipment, refer to the User’s Manual - Hardware Edition of the main unit.
Generic name of FX2N Series I/O extension units, FX2N Series I/O extension blocks,
FX2NC Series I/O extension blocks, and FX0N Series I/O extension blocks
I/O extension equipment
Connectable equipment may vary depending on the main unit. For connectable
equipment, refer to the User’s Manual - Hardware Edition of the main unit.
Generic name of special extension units and special function blocks
Special function block/unit or
Connectable equipment may vary depending on the main unit. For connectable
special extension equipment
equipment, refer to the User’s Manual - Hardware Edition of the main unit.
Special extension unit Generic name of special extension units
Generic name of special function blocks
Special function block Connectable equipment may vary depending on the main unit. For connectable
equipment, refer to the User’s Manual - Hardware Edition of the main unit.
FX3UC Series special FX3UC-4AD
function block Only manuals in Japanese are packed together with this product.

19
FX3U/FX3UC Series Programmable Controllers Generic Names and Abbreviations Used in Manuals
Programming Manual - Basic & Applied Instruction Edition

Abbreviation/generic name Name


Open field networks CC-Link and CC-Link/LT
CC-Link equipment Generic name of CC-Link master station and CC-Link remote device stations
Generic name of CC-Link master station (having following model name):
CC-Link master (station)
FX2N-16CCL-M
CC-Link remote station Generic name of remote I/O stations and remote device stations
Generic name of CC-Link/LT master station, CC-Link/LT remote I/O stations, power supply
CC-Link/LT equipment
adapters, and dedicated power supplies
CC-Link/LT master Generic name of built-in type CC-Link/LT master and (additional) CC-Link/LT master
Built-in type CC-Link/LT
Generic name of built-in type CC-Link/LT master built in FX3UC-32MT-LT
master
(Additional) CC-Link/LT Generic name of CC-Link/LT master station (having following model name):
master FX2N-64CL-M
Power supply adapter Generic name of units connected to supply the power to the CC-Link/LT system
Dedicated power supply Generic name of power supplies connected to supply the power to the CC-Link/LT system
AS-i system
Generic name of AS-i system master station (having following model name):
AS-i master
FX2N-32ASI-M
MELSEC I/O LINK
Generic name of MELSEC I/O LINK master station (having following model name):
MELSEC I/O LINK master
FX2N-16LNK-M
Options
Extension power supply unit FX3UC-1PS-5V
Memory cassette FX3U-FLROM-16, FX3U-FLROM-64, and FX3U-FLROM-64L
Battery FX3U-32BL
Peripheral equipment
Peripheral equipment Generic name of programming software, handy programming panels, and display units
Programming tools
Programming tool Generic name of programming software and handy programming panels
Programming software Generic name of programming software
Generic name of programming software packages SW…-D5C-GPPW-J and SW…-D5C-
GX Developer
GPPW-E
FX-PCS/WIN(-E) Generic name of programming software packages FX-PCS/WIN and FX-PCS/WIN-E
Handy programming panel
Generic name of programming panels FX-20P(-E) and FX-10P(-E)
(HPP)
RS-232C/RS-422 converter FX-232AW, FX-232AWC, and FX-232AWC-H
RS-232C/RS-485 converter FX-485PC-IF-SET and FX-485PC-IF
Display units
GOT1000 Series Generic name of GT15 and GT11
GOT-900 Series Generic name of GOT-A900 and GOT-F900 Series
GOT-A900 Series Generic name of GOT-A900 Series
GOT-F900 Series Generic name of GOT-F900 Series
Generic name of ET-940 Series
ET-940 Series
Only manuals in Japanese are available for these products.
Manuals
FX3U Hardware Edition FX3U Series User’s Manual - Hardware Edition
FX3UC Hardware Edition FX3UC Series User’s Manual - Hardware Edition (Japanese only)
Programming Manual FX3U/FX3UC Series Programming Manual - Basic & Applied Instruction Edition
Communication Control Edition FX Series User’s Manual - Data Communication Edition
Analog Control Edition FX3U/FX3UC Series User’s Manual - Analog Control Edition
Positioning Control Edition FX3U/FX3UC Series User’s Manual - Positioning 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

The above list program is expressed in


the circuit diagram.
9
Move & Compare
FNC10-FNC19

3. SFC (STL <step ladder>) programming

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

2) Compatibility between SFC programs and other programs


SFC programs can be converted into another program format. And when list programs and circuit
programs are created according to certain rules, they can be converted inversely into SFC programs.

21
FX3U/FX3UC Series Programmable Controllers 1 Introduction
Programming Manual - Basic & Applied Instruction Edition 1.1 Programming Language in PLCs

1.1.2 Compatibility among programs


All sequence programs created by the aforementioned three types are stored in the form of instruction words
(contents as at the time of list program) in the program memory inside the PLC.
• Programs created by these three types of input methods can be converted mutually, and then displayed
and edited as shown in the figure below.

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.

2.1 Introduction of Convenient Functions


FX3U/FX3UC PLCs have the following instruction functions.
3

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

*1. X000 to X007 in the FX3U-16M…

4. "Pulse catch" function


The pulse catch function is provided as a method to receive short-time pulse signals.
The pulse catch function monitors signals from specific input relays, and sets special auxiliary relays in the
interrupt processing as soon as signals are input.
9
Move & Compare
FNC10-FNC19

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.

2.1.2 Convenient functions for output processing

1. "I/O refresh" function for outputting the latest input information


The input terminal information of the PLC in the batch refresh method is input at one time by the input image
memory before operation in the step 0. The output information is output at one time when END instruction is
executed.
I/O refresh instruction can get the latest input information and immediately output the operation result during
sequence operation.
→ Related instruction: Refresh REF (FNC 50)

2. "Pulse output" function for pulse train output control


→ Related instructions: Pulse Y Output PLSY (FNC 57) and
Acceleration/Deceleration Setup PLSR (FNC 59)

3. "Positioning" function for positioning control


→ Related instructions: DOG Search Zero Return DSZR (FNC150),
Interrupt Positioning DVIT (FNC151), Zero Return (FNC156),
Variable Speed Pulse Output PLSV (FNC157),
Drive to Increment DRVI (FNC158) and
Drive to Absolute DRVA (FNC159)

2.1.3 Functions for supporting sequence control

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.

5. Addition of "comments" for a sequence program


By setting parameters, the device comment area (where Katakana, Kanji and alphanumeric characters are
available) can be secured in the program memory.
→ Refer to the manual of the used programming tool. 3

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.

2. Advanced control available easily


In addition, FX PLCs offer many handy instructions by which complicated sequence control is made into 6
packages to mitigate the load for creating sequence programs and save the number of I/O points.

Programming
Before
FX PLCs also offer floating point arithmetic operations and PID operations to cope with more advanced
control.

2.2.1 Major applied instructions


This subsection introduces representative ones among many applied instructions provided in FX3U/FX3UC
7

Instruction
Basic
PLCs.

1. Program flow • High speed counter compare with data table


(HSCT/FNC280)
• Conditional jump (CJ/FNC 00)
• Move (MOV/FNC 12)
• Call subroutine (CALL/FNC 01)
• Floating point move (EMOV/FNC112)
8
• Enable interrupt (EI/FNC 04)
Program Flow
FNC00-FNC09

• High speed counter move (HCMOV/FNC189)


• Disable interrupt (DI/FNC 05)
• Conversion to binary-coded decimal
• Start a FOR/NEXT loop (FOR/FNC 08)
(BCD/FNC 18)
→ Refer to Chapter 8.
• Conversion to binary (BIN/FNC 19)
2. Move and compare • Decimal to gray code conversion (FNC170)
9
Move & Compare
FNC10-FNC19

• Compare (CMP/FNC 10) and gray code to decimal conversion


• Data comparison (FNC224 to FNC246) (FNC171)
→ Refer to Chapter 9, Chapter 13, Chapter 18,
• Floating point compare Chapter 22, Chapter 24, Chapter 28 and
(ECMP/FNC110 and EZCP/FNC111) Chapter 32.
• Zone compare (ZCP/FNC 11) 10
3. Arithmetic and logical operations
Operation
Arith. & Logic
FNC20-FNC29

• High speed counter compare


(FNC 53 to FNC 55) • Addition (ADD/FNC 20)
• Subtraction (SUB/FNC 21)

25
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.2 Introduction of Applied Instructions

• Multiplication (MUL/FNC 22) 7. Handy instructions and instructions for


• Division (DIV/FNC 23) external devices
• Increment (INC/FNC 24) • Initial state (IST/FNC 60)
• Square root (SQR/FNC 48) • Teaching timer (TTMR/FNC 64)
• Trigonometry (FNC130 to FNC135) • Alternate state (ALT/FNC 66)
• Conversion from/to floating point • Ramp variable value (RAMP/FNC 67)
(FNC 49, FNC118, FNC119 and FNC129) • Rotary table control (ROTC/FNC 68)
• Floating point arithmetic operations • Ten-key input (TKY/FNC 70)
(FNC120 to FNC123)
• Digital switch (thumbwheel input)
• Floating point square root (ESQR/FNC127) (DSW/FNC 72)
→ Refer to Chapter 10, Chapter 12 and
• Seven-segment decoder (SEGD/FNC 73)
Chapter 18.
• Seven-segment with latch (SEGL/FNC 74)
4. Rotation and shift operation • ASCII code data input (ASC/FNC 76)
• Rotation right (ROR/FNC 30) • BFM Read, BFM Write(FNC 78, FNC 79,
• Rotation left (ROL/FNC 31) FNC278, and FNC279)
• Rotation right with carry (RCR/FNC 32) • Serial communication (FNC 80 and FNC 87)
• Rotation left with carry (RCL/FNC 33) • Inverter communication (FNC270 to FNC274)
• Bit shift right (SFTR/FNC 34) • Hexadecimal to ASCII conversion
• Bit shift left (SFTL/FNC 35) (ASCI/FNC 82)

• Word shift right (WSFR/FNC 36) • ASCII to hexadecimal conversion


(HEX/FNC 83)
• Word shift left (WSFL/FNC 37)
→ Refer to Chapter 11. • Cyclic redundancy check (CRC/FNC188)
• Random number generation (RND/FNC184)
5. Data operation
• Real time clock control (FNC160 to FNC167)
• Zone reset (ZRST/FNC 40)
• Hour meter (HOUR/FNC 169)
• Decode (DECO/FNC 41)
• Timing pulse generation (DUTY/FNC186)
• Encode (ENCO/FNC 42)
• Logging R and ER (LOGR/FNC293)
• Sum of active bits (SUM/FNC 43) → Refer to Chapter 14, Chapter 15,
• Mean (MEAN/FNC 45) Chapter 16, Chapter 21, Chapter 24, Chapter
30, Chapter 31 and Chapter 33.
• Word to byte (WTOB/FNC141) and byte to
word (BTOW/FNC142) 8. Complicated control
• 4-bit linking/grouping of word data • Search a data stack (SER/FNC 61)
(FNC143 and FNC144)
• Sort tabulated data (FNC 69 and FNC149)
• Limit control (LIMIT/FNC256)
• PID control loop (PID/FNC 88)
• Dead band control (BAND/FNC257) → Refer to Chapter 14, Chapter 16 and
• Zone control (ZONE/FNC258) Chapter 19.
• Block data operation (FNC192 to FNC199)
9. Positioning control
• Character string control (FNC200 to FNC209)
• Dog search zero return (DSZR/FNC150)
→ Refer to Chapter 12, Chapter 19,
Chapter 25, Chapter 26 and Chapter 29. • Interrupt positioning (DVIT/FNC151)
• Batch data positioning mode (TBL/FNC152)
6. High speed processing
• Absolute present value read (ABS/FNC155)
• Refresh (REF/FNC 50)
• Zero return (ZRN/FNC156)
• Refresh and filter adjust (REFF/FNC 51)
• Variable speed pulse output (PLSV/FNC157)
• Speed detection (SPD/FNC 56)
• Drive to increment (DRVI/FNC158)
• Pulse Y output (PLSY/FNC 57)
• Drive to absolute (DRVA/FNC159)
• Pulse ramp (PLSR/FNC 59) → Refer to Chapter 20.
→ Refer to Chapter 13. → Refer to the Positioning Control Manual.

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.

1. Analog I/O control 3. High speed counter


• Analog input • High speed counter (hardware counter 2
equipped with multiplication function)

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.

2.4 Link and Communication


5

Constant
Device &
Specified the
FX3U/FX3UC PLCs support the following communication functions:

1. CC-Link → Refer to each manual packed together.


The CC-Link system can be constructed with an
FX3U /FX3UC PLC working as the master station. 5. Simple N : N link
Or an A or QnA PLC can work as the master Up to eight FX3U/FX3UC PLCs are connected,
and data are automatically transferred among
6
station, and FX PLCs can be connected as slave

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

A network system at the actuator or sensor level


can be constructed with an FX3U/FX3UC PLC
working as the master station in the AS-i system.

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

Contact for external output from output relay


(one NO contact)
Output terminal
or output The PLC has built-in output contacts in accordance with its
scale.
10
connector
Operation
Arith. & Logic
FNC20-FNC29

29
FX3U/FX3UC Series Programmable Controllers 2 Overview (Sequence Program)
Programming Manual - Basic & Applied Instruction Edition 2.5 Introduction of Devices Constructing PLC

2.5.2 Device list

1. Input relays (X) and output relays (Y) 4. Timers (T)


→ Refer to Section 4.2. → Refer to Section 4.5.
• Input relay numbers and output relay numbers • A timer adds and counts clock pulses of 1, 10
in octal are assigned to each main unit in the or 100 ms, and its output contact turns ON or
way "X000 to X007, X010 to X017 …, Y000 to OFF when the counted result reaches a
Y007, Y010 to Y017 …" specified set value.
The input relay (X) numbers and output relay A timer can count from 0.001 to 3276.7
(Y) numbers in extension units and extension seconds depending on the clock pulse.
blocks are also serial numbers in octal • The timers T192 to T199 are dedicated to
respectively in the order of connection to the subroutines and interrupt routines.
main unit. The timers T250 to T255 are retentive type
• A digital filter is applied to the input filter of base clock timers for 100 ms pulses. It means
specific input relays, and the filter value can that the present value is retained even after
be changed by a program. Accordingly, for a the timer coil drive input turns OFF. And when
purpose requiring high speed receiving, the drive input turns ON again, a retentive type
assign such input relay numbers. timer will continue its counting from where it
(Refer to explanation of filter adjustment, input left off.
interrupt, high speed counter, various applied
instructions, etc.) 5. Counters (C)
The following types of counters are provided, and
2. Auxiliary relays (M) can be used in accordance with the purpose or
→ Refer to Section 4.3. application.
• Relays built into the PLC are auxiliary relays, 1) For latched (battery backed up) counters
and are used for programs. Different from I/O → Refer to Section 4.6.
relays, auxiliary relays cannot receive external Counters are provided for internal signals of
inputs or directly drive external loads. the PLC, and their response speed is usually
• There are latched (battery backed) type relays tens of Hz or less.
whose ON/OFF status is stored even if the - 16-bit counter: Provided for up-counting,
PLC turns OFF. counting range: 1 to 32767
- 32-bit counter: Provided for up-counting
3. State relays (S) and down-counting, counting range:
→ Refer to Section 4.4. −2,147,483,648 to +2,147,483,647
• State relays are used in the step ladder or as 2) For latched (battery backed up) high speed
process numbers in the SFC expression. counters
• When a state relay is not used as a process → Refer to Section 4.7.
number, it can be programmed as a general High speed counters can execute counting at
contact/coil in the same way as an auxiliary several kHz without regard to operations in
relay. the PLC.
- 32-bit counter: Provided for up-counting
• State relays can be used as annunciators for
and down-counting, counting range:
external fault diagnosis.
−2,147,483,648 to +2,147,483,647 (1-
phase 1-counting, 1-phase 2-counting and
2-phase 2-counting), assigned to specific
input relays

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)

2.6 Program Memory and Devices (Battery Backed)

2.6.1 Memory structure


FX3U/FX3UC PLCs are supplied with RAM memory.
By mounting an optional memory device, the memory type can be changed.

1. When using the built-in memory (without attached optional memory)

CPU System ROM

Built-in device memory (RAM)


[Bit device memory] [Data memory]
Contact image memory • Data register (D)
• Input relay (X) • Output relay (Y) • Timer present value register (T)
• Auxiliary relay (M) • State relay (S) • Counter present value register (C)
Timer contact and time counting coil • Index register (V, Z)
Counter contact, counting coil, and reset coil
• Extension register (R)

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)

CPU System ROM

Built-in device memory (RAM)


[Bit device memory] [Data memory]
Contact image memory • Data register (D)
• Input relay (X) • Output relay (Y) • Timer present value register (T)
• Auxiliary relay (M) • State relay (S) • Counter present value register (C)
Timer contact and time counting coil • Index register (V, Z)
Counter contact, counting coil, and reset coil • Extension register (R)
Transfer and initialization by

Built-in program memory Optional memory


(RAM) (flash memory)
instructions

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.

2) Types of word device memory


Power
Item Power OFF
OFF→ON
STOP→RUN RUN→STOP
4

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

High speed type Does not change.


Clock data Present value Does not change.

*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)

3) Types of bit device memory

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.

1. Battery backup method

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

→ For details on ZRST (FNC 40) instruction, refer to Section 12.1.


→ In addition to ZRST instruction, FMOV (FNC 16) instruction is available also.
For details on FMOV (FNC 16) instruction, refer to Section 9.7.

2. M8032 (latch memory all clear)


9
Move & Compare
FNC10-FNC19

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

2.7 Types and Setting of Parameters


Setting of parameters means setting the environment where the PLC operates.
Almost all FX3U/FX3UC PLCs can be used with factory default values. When it is necessary to add optional
memory, set the comment capacity, set the communication condition for serial ports, etc., change the
parameter settings by a programming tool such as personal computer.

2.7.1 Parameter list


The following items may be set in the parameter settings.

Classification Item Description


This parameter specifies the maximum value for the number of steps to which a
sequence program can be input.
Memory 1) The upper limit is determined by the capacity of the built-in memory or optional
capacity memory.
2) The program memory, file register, comment area, and other special setting
capacities are contained in this memory capacity.
This parameter incorporates comments into the program memory.
1) Because comments remain in the PLC, the contents can be easily understood at the
Comment time of maintenance.
area 2) Up to 50 comments can be input when one block is specified, but the program
memory capacity is reduced because the comment area requires 500 steps in the
memory capacity.
Memory This parameter incorporates data registers into the program memory.
capacity 1) A sequence program and control data such as machining set values can be handled
together, which is convenient.
File register
2) Up to 500 file registers can be created when one block is specified, but the program
memory capacity is reduced because file registers require 500 steps in the memory
capacity.
1) This parameter sets whether or not the special block/unit initial value setting
function is used.
When this function is used, the program memory capacity is reduced because this
Other special
function requires 4000 steps (8 blocks) in the memory capacity.
setting
2) This parameter sets whether or not the positioning setting (constants and setting
capacity
table) in TBL (FNC152) instruction is used. When this setting is used, the program
memory capacity is reduced because this setting requires 9000 steps (18 blocks) in
the memory capacity.
Latch range This parameter enables to change the latched (battery backed) device range and the
Device setting
setting non-latch device range inside the PLC.
I/O This setting is not written to the PLC.
assignment When the I/O range is set according to the system configuration, however, inputs and
I/O assignment setting outputs are checked by the program check in GX Developer.
setting This parameter sets the initial values of the buffer memory (BFM) for each special block/
Special unit
unit number.
setting
It is necessary to set the memory capacity.
This parameter sets the PLC operation mode without a battery.
Batteryless When the baterryless mode is set, detection of battery voltage low level error is stopped
mode automatically, and consequently, contents of latched (battery backed) devices becomes
inconsistent and are initialized automatically.
PLC system Modem This parameter automatically sends a specified AT command as an initialization
setting (1) initialization command to a modem connected to the serial port.
[PLC mode]
RUN terminal
This parameter sets whether one input terminal in the PLC is used for RUN input.
input setting
RUN terminal This parameter specifies the input number of the RUN input described above within the
input number range from X000 to X017.
This parameter corresponds to the following settings by specifying each contents on the
PLC system
Serial port PC screen:
setting (2)
operation Setting of communication format (D8120, D8400 and D8420)
[Serial
setting Setting of station number (D8121 and D8421)
communication]
Setting of timeout check (D8129, D8409 and D8429)

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

Initial value of non-


applicable programming Display unit
GX
tool 4
Item Developer Setting range GOT-F900

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

Positioning setting*5 Not used – – –


6
Auxiliary relay [M] 500 to 1023 0 to 1023 500 to 1023

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

*5. GX Developer Ver.8.23Z or later is applicable.

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

2.7.3 Memory capacity setting range


~ Built-in memory capacity 3 Can be set by changing parameter.
Comment capacity File register capacity Special unit initial
Memory capacity Positioning setting*1
setting
setting setting value setting*1
Unit: Block Unit: Block Unit: Block
Unit: Block
2000 steps 3 0 to 3 0 to 3 – –
4000 steps 3 0 to 7 0 to 7 – –
8000 steps 3 0 to 15 0 to 14 8 –
16000 steps 3 0 to 31 0 to 14 8 18
32000 steps 3 0 to 63 0 to 14 8 18
64000 steps ~ 0 to 127 0 to 14 8 18

Cautions on setting the memory capacity


When one block is set in each capacity setting, the memory capacity is reduced by 500 steps.
Each setting should satisfy the following expression:

Memory capacity Comment File register Special unit initial Positioning


≥ + + +
setting range capacity setting capacity setting value setting*1 setting*1

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.

2.7.4 Compatible optional memory model

Maximum number Allowable number of


Model name Memory type Remarks
of steps times of writing
FX3U-FLROM-64 64000 Flash memory 10000 times Write-protect switch is provided.
FX3U-FLROM-16 16000 Flash memory 10000 times Write-protect switch is provided.
Write-protect switch and loader
FX3U-FLROM-64L 64000 Flash memory 10000 times
function are provided.

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.

1. Correspondence between PLC and programming tool


Applicability of programming tools and display
Available
Number of Applicable
GX units to FX3U/FX3UC 3
registered PLC

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. Entry code setting and access restriction


Setting status Programming tool and access restriction
1) When a programming tool supports the second entry code
The programming tool performs the following operations in accordance with the
selected registration condition:
Program Present value
Registration condition Monitoring
Read Write change
When both entry code and Write prohibited 3 – 3 3
second entry code are set
Read and write prohibited – – 3 3
All online operations prohibited – – – –

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

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 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.

1. Select [Online]-[Keyword setup]-[Register...] to open "New keyword register" dialog box. 2

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.

Select either of the following:


• Read/Write protection
Protection level*1 • Write protection
Before setting the registration condition, set the 2ed entry code first.
• All online operation protection
6
*1. The second entry code and registration condition can be set in FX3U and FX3UC PLCs Ver.2.20 or

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.

3. Click [Execution] button to open "Keyword confirmation" dialog box.

4. Input the entry codes again.


8
Program Flow
FNC00-FNC09

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

Reading/writing a program from/to a PLC with the entry codes registered


This section explains the operating procedure of GX Developer (Ver.8.23Z)
→ For the program reading/writing procedure in FX-10P(-E), FX-20P(-E), and FX-PCS/WIN(-E),
refer to the manual of each product.

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.

Set item Contents of setting Remarks


Keyword Input 8 characters. Available characters are A to F and 0 to 9.
2nd Keyword*1 Input 8 characters. Available characters are A to F and 0 to 9.

*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".

Canceling the entry codes


This section explains the operating procedure of GX Developer (Ver.8.23Z)
→ For the entry code canceling (deletion) procedure in FX-10P(-E), FX-20P(-E), and FX-PCS/WIN(-E),
refer to the manual of each product.

1. Select [Online]-[Keyword setup]-[Delete...] to open "Keyword cancel" dialog box.

2. Input the entry code and second entry code currently registered in the PLC.

Set item Contents of setting Remarks


Keyword Input 8 characters. Available characters are A to F and 0 to 9.
2nd Keyword Input 8 characters. Available characters are A to F and 0 to 9.

3. Click [Execution] button to 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.

1. Select [Online]-[Keyword setup]-[Disable...] to open "Keyword Disable" dialog box. 2

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

2.7.8 Parameter settings by GX Developer


This subsection explains the parameter setting procedures by GX Developer (Ver.8.23Z).

1 Opening the parameter setting screen


In the project tree area provided on the left end of the screen, double-click [Parameter] →
[PLC parameter].
If the project tree is not displayed, select [View] → [Project data list] from the menu bar.

2 Setting memory capacity

Set item Contents of setting Setting range


Memory capacity *1
Set the program memory capacity. Initial value: 16000
Set the capacity of comments to be stored in the PLC. Initial value: 0
Comments capacity Refer to
50 device comments/block (500 steps)
Subsection
Set the file register capacity. Initial value: 0 2.7.3.
File register capacity
500 file registers/block (500 steps)
Program capacity The number of steps available for sequence program is displayed here.
Special Function Set whether the special unit initial value setting and positioning setting are valid or

Memory capacity invalid.
Special Function Put a check mark to the initial value setting function for special function block/unit.
Block Settings (When this function is valid, the special unit setting is displayed on "I/O assignment" –
(8 Blocks) tab.)
Positioning
Put a check mark to make valid TBL (FNC152) instruction setting function.
Instruction Settings –
(When this function is valid, "Positioning" tab is displayed.)
(18 Blocks)
*1. The initial value is 8000 steps in GX Developer Ver.8.22Y and earlier.

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.

4 Setting the PC name


1. Click "PLC name" tab, and input the program title.
7

Instruction
Basic

8
Program Flow
FNC00-FNC09

9
Move & Compare
FNC10-FNC19

10
Operation
Arith. & Logic
FNC20-FNC29

Set item Contents of setting Setting range


Input the program title in up to 32 half-width characters 32 half-width characters
Title
(or 16 full-width characters). (or 16 full-width characters)

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.

Set item Contents of setting Setting range


Input relay When the I/O range is set here according to the system configuration, 0 to 377
I/O
Output relay those inputs and outputs are checked in programming by GX Developer. 0 to 377
Unit No. This is the unit number of each special function block/unit. –
32 half-width
Set the name of each special function block/unit whose initial values are characters
Unit Name
to be set. (or 16 full-width
Special Unit characters)
(It is Up This button moves the cursor to the upper line (transposes the upper line). –
necessary Down This button moves the cursor to the lower line (transposes the lower line). –
to set the
memory This button displays "Special Function Block Settings" dialog box of the
capacity.) Set... selected unit number. –
→Refer to the next page.
Delete This button deletes the setting of the selected unit number. –
Delete All This button deletes all existing setting in "Special Unit" field. –
Read PLC data This button reads "Special Unit" field from the connected PLC. –

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

Delete This button deletes the currently selected line. –


Up This button moves the cursor to the upper line (transposes the upper line). –
Down This button moves the cursor to the lower line (transposes the lower line). –
Check the identification code Put a check mark to check the model code of the special function block/
before initializing unit before initialization.
– 9
Move & Compare
FNC10-FNC19

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

6 Setting the PLC system (1)


Click "PLC system (1)" tab, and then set "Battery less mode", "MODEM initialized", and "RUN ter-
minal input."

Set item Contents of setting Setting range


Put a check mark to operate the PLC without using the battery.
When a check mark is put here, the battery error indicator lamp is
Battery less mode –
automatically turned off, and devices in the latch (battery backed) area
are automatically cleared.
Set this item for automatically initializing a connected modem when the
MODEM initialized –
power of the PLC is turned ON.
None
RUN terminal input Set this item to use one input terminal (X) for RUN input.
X000 to X017*1
*1. X000 to X007 in the FX3U-16M…

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.

1. Click "Positioning" tab.


"Positioning" tab is displayed when a check mark is put to "Positioning" on "Memory
capacity" tab.

2. Set the positioning constants in TBL (FNC152) instruction.


→ For TBL (FNC152) instruction, refer to the Positioning Control Manual.

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

Acceleration time [ms]


Set the acceleration time for each output number of pulse.
Initial value: 100
50 to 5000 3

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.

Set item Contents of setting Setting range


Y0 Set the positioning table for the pulse output destination Y000. –
Y1 Set the positioning table for the pulse output destination Y001. –
Y2 Set the positioning table for the pulse output destination Y002. –
*1 Set the positioning table for the pulse output destination Y003. –
Y3
Set the relay number of the rotation direction output signal.
Initial setting: Pulse output destination Y000: Y010
Pulse output destination Y001: Y011 Y000 to Y357
Rotation direction signal Pulse output destination Y002: Y012 M0 to M7679
S0 to S4095
Pulse output destination Y003*1: Y013
→Refer to the Positioning Control Manual.
Set the head number of devices storing the set data (pulse number and
frequency).
1600 devices are occupied starting from the head device number set D0 to D6400
Head Address
here without regard to the number of used axes. R0 to R31168
Initial setting: R0
→Refer to the Positioning Control Manual.
This column shows the table number.
No. –
Numbers 1 to 100 can be set.
Select the positioning type among the following:
DDVIT (Interrupt positioning instruction)
DPLSV (Variable speed output pulse instruction)
Positioning Instruction –
DDRVI (Relative positioning instruction)
DDRVA (Absolute positioning instruction)
→Refer to the Positioning Control Manual.
Set the pulse number output by the operation (instruction) set in Refer to the
Pulse "Positioning Instruction" column. Positioning Control
→Refer to the Positioning Control Manual. Manual.
Set the speed (pulse frequency) output by the operation (instruction) set Refer to the
Frequency [Hz] in "Positioning Instruction" column. Positioning Control
→Refer to the Positioning Control Manual. Manual.
Up This button transposes the selected line to the upper line. –
Down This button transposes the selected line to the lower line. –
Insert This button inserts a line in the currently selected position. –
Delete This button deletes the currently selected line. –
This button deletes the entire setting of the positioning table for the
Delete all lines –
selected 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.

2. Put a check mark to "Parameter", and click [Execute] button. 7

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.

3.1 Basic Instructions


The basic instructions are provided in the following series. The table below shows differences in applicable
devices.

Applicable PLC FX3U FX3UC FX1S FX1N FX2N FX1NC FX2NC


All basic instructions 3 3 3 3 3 3 3
Absence/presence of applicable devices
3 3 – – – – –
(D…. b, R)

Mnemonic Name Symbol Function Applicable devices Reference

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)

Applicable devices Initial logical operation of


LDP Load Pulse X,Y,M,S,D….b,T,C Section 7.5
Rising edge pulse

Applicable devices Initial logical operation of


LDF Load Falling Pulse X,Y,M,S,D….b,T,C Section 7.5
Falling/trailing edge pulse

Applicable devices Serial connection of NO


AND AND X,Y,M,S,D….b,T,C Section 7.3
(normally open) contacts

Applicable devices Serial connection of NC


ANI AND Inverse X,Y,M,S,D….b,T,C Section 7.3
(normally closed) contacts

Applicable devices Serial connection of Rising


ANDP AND Pulse X,Y,M,S,D….b,T,C Section 7.5
edge pulse

Applicable devices Serial connection of


ANDF AND Falling Pulse X,Y,M,S,D….b,T,C Section 7.5
Falling/trailing edge pulse

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

Stores the current result of


Memory Point
MPS the internal PLC Section 7.8
Store
operations
MPS
Reads the current result of
3

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

INV Invert the current result of 4


INV Inverse the internal PLC – Section 7.10

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

Applicable devices Final logical operation type


OUT OUT Y,M,S,D….b,T,C Section 7.2
coil drive
6

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

Master Control Instruction


Denotes the start of a
MC Master Control Y,M Section 7.9
MC N Applicable devices
master control block 8
Program Flow
FNC00-FNC09

Master Control Denotes the end of a


MCR MCR N – Section 7.9
Reset master control block
Other Instruction

NOP No Operation No operation or null step – Section 7.14

End Instruction
9
Move & Compare
FNC10-FNC19

Program END, I/O refresh


END END END – Section 7.15
and Return to Step 0

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

3.2 Step Ladder Instructions

Mnemonic Name Symbol Function Applicable devices Reference

STL Step Ladder STL Applicable devices Starts step ladder S Chapter 34

RET Return RET Completes step ladder – Chapter 34

3.3 Applied Instructions ... in Ascending Order of FNC Number


Applied instructions such as Arithmetic operation, Rotation and Shift, Handy instructions etc. are used
especially when numeric data is handled.
Instructions added in FX3U and FX3UC PLCs are shaded in the list.

*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.


*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
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

Move and Compare

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

*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.


*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
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

Conversion to Binary Coded Section


18 BCD BCD S D 3 3 3 3 3 3 3
Decimal 9.9

Section
19 BIN BIN S D Conversion to Binary 3 3 3 3 3 3 3
9.10

Arithmetic and Logical Operation (+, –, ×, ÷)

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

Rotation and Shift Operation

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

48 SQR SQR S D Square Root 3 3 – – 3 – 3


Section
12.9
8
Program Flow
FNC00-FNC09

Section
49 FLT FLT S D Conversion to Floating Point 3 3 – – 3 – 3
12.10

High Speed Processing

50 REF REF D n Refresh 3 3 3 3 3 3 3


Section
13.1
9
Move & Compare
FNC10-FNC19

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

*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.


*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
High Speed Processing

Section
54 HSCR HSCR S1 S2 D High Speed Counter Reset 3 3 3 3 3 3 3
13.5

High Speed Counter Zone Section


55 HSZ HSZ S1 S2 S D 3 3 – – 3 – 3
Compare 13.6

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

External FX I/O Device

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

Digital Switch Section


72 DSW DSW S D1 D2 n 3 3 3 3 3 3 3
(Thumbwheel Input) 15.3

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

Read From A Special Function Section


78 FROM FROM m1 m2 D n 3 3 – 3 3 3 3
Block 15.9

Write To A Special Function Section


79 TO TO m1 m2 S n Block
3 3 – 3 3 3 3
15.10 5

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

ASCII to Hexadecimal Section


83 HEX HEX S D n 3 3 3 3 3 3 3
Conversion 16.4
7
Section

Instruction
Basic
84 CCD CCD S D n Check Code 3 3 3 3 3 3 3
16.5

85 VRRD VRRD S D Volume Read – – 3 3 3 3 3 –

86 VRSC VRSC S D Volume Scale – – 3 3 3 3 3 – 8


Program Flow
FNC00-FNC09

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

*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.


*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
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

Floating Point to Character Section


116 ESTR ESTR S1 S2 D 3 3 – – – – –
String Conversion 18.4

Character String to Floating Section


117 EVAL EVAL S D 3 3 – – – – –
Point Conversion 18.5

Floating Point to Scientific Section


118 EBCD EBCD S D 3 3 – – 3 – 3
Notation Conversion 18.6

Scientific Notation to Floating Section


119 EBIN EBIN S D 3 3 – – 3 – 3
Point Conversion 18.7

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

Floating Point Natural Section


125 LOGE LOGE S D 3 3 – – – – –
Logarithm 18.13

Floating Point Common Section


126 LOG10 LOG10 S D 3 3 – – – – –
Logarithm 18.14

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

Floating Point to Integer Section


129 INT INT S D 3 3 – – 3 – 3
Conversion 18.17

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

Floating Point Degrees to Section


136 RAD RAD S D Radians Conversion
3 3 – – – – –
18.24 5

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

144 DIS DIS S D n 4-bit Grouping of Word Data 3 *5 – – – – –


Section
19.5
8
Program Flow
FNC00-FNC09

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

*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.


*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
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

Real Time Clock Control

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

Decimal to Gray Code Section


170 GRY GRY S D 3 3 – – 3 – 3
Conversion 22.1

Gray Code to Decimal Section


3 3 3 3
171 GBIN GBIN S D Conversion
– – –
22.2 3

List
Instruction
172 to
– –
175

Read form Dedicated Analog Section


176 RD3A RD3A m1 m2 D 3 3 – 3 *1 3 *1
Block 22.3

Write to Dedicated Analog Section


4
177 WR3A WR3A m1 m2 S 3 3 – 3 *1 3 *1

in Detail
Devices
Block 22.4

178,
– –
179

Extension Function

External ROM Function


5
180 EXTR EXTR S SD1 SD2 SD3 – – – – *1 – *1 –

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

189 HCMOV HCMOV S D n High Speed Counter Move 3 *4 – – – – –


Section
24.5
9
Move & Compare
FNC10-FNC19

Block Data Operation

190,
– –
191

192 BK+ BK+ S1 S2 D n Block Data Addition 3 *5 – – – – –


Section
25.1
10
Operation
Arith. & Logic
FNC20-FNC29

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

*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.


*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
Block Data Subtraction
Block Data Compare Section
194 BKCMP= BKCMP= S1 S2 D n 3 *5 – – – – –
S1 = S2 25.3

Block Data Compare Section


195 BKCMP> BKCMP> S1 S2 D n 3 *5 – – – – –
S1 > S2 25.3

Block Data Compare Section


196 BKCMP< BKCMP< S1 S2 D n 3 *5 – – – – –
S1 < S2 25.3

Block Data Compare Section


197 BKCMP<> BKCMP<> S1 S2 D n 3 *5 – – – – –
S1 ≠ S2 25.3

Block Data Compare Section


198 BKCMP<= BKCMP<= S1 S2 D n 3 *5 – – – – –
S1 ≤ S2 25.3

Block Data Compare Section


199 BKCMP>= BKCMP>= S1 S2 D n 3 *5 – – – – –
S1 ≥ S2 25.3

Character String Control

BIN to Character String Section


200 STR STR S1 S2 D 3 *5 – – – – –
Conversion 26.1

Character String to BIN Section


201 VAL VAL S D1 D2 3 *5 – – – – –
Conversion 26.2

Section
202 $+ $+ S1 S2 D Link Character Strings 3 3 – – – – –
26.3

Character String Length Section


203 LEN LEN S D 3 3 – – – – –
Detection 26.4

Extracting Character String Section


204 RIGHT RIGHT S D n 3 3 – – – – –
Data from the Right 26.5

Extracting Character String Section


205 LEFT LEFT S D n 3 3 – – – – –
Data from the Left 26.6

Random Selection of Character Section


206 MIDR MIDR S1 D S2 3 3 – – – – –
Strings 26.7

Random Replacement of Section


207 MIDW MIDW S1 D S2 3 3 – – – – –
Character Strings 26.8

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

Shift Last Data Read Section


212 POP POP S D n 3 3 – – – – –
[FILO Control] 27.3

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

233 AND> AND> S1 S2 AND Compare S1 > S2 3 3 3 3 3 3 3


Section
28.2
8
Program Flow
FNC00-FNC09

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

236 AND<> AND<> S1 S2 AND Compare S1 ≠ S2 3 3 3 3 3 3 3


28.2

Section
237 AND<= AND<= S1 S2 AND Compare S1 ≤ S2 3 3 3 3 3 3 3
28.2

238 AND>= AND>= S1 S2 AND Compare S1 ≥ S2 3 3 3 3 3 3 3


Section
28.2
10
Operation
Arith. & Logic
FNC20-FNC29

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

*1: The instruction is provided in the FX2N/FX2NC Series Ver.3.00 or later.


*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
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

Data Table Operation

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

Decimal ASCII to BIN Section


260 DABIN DABIN S D 3 *5 – – – – –
Conversion 29.5

BIN to Decimal ASCII Section


261 BINDA BINDA S D 3 *5 – – – – –
Conversion 29.6

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

High Speed Processing 2

High Speed Counter Compare Section


6
280 HSCT 3 3 – – – – –

Programming
Before
HSCT S1 m S2 D n With Data Table 32.1

281 to
– –
289

Extension File Register Control


7
Section
3 3

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

292 INITR INITR S n Initialize R and ER 3 3 – – – – –


Section
33.3
8
Program Flow
FNC00-FNC09

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

295 INITER INITER S n Initialize ER 3 *3 – – – – –


33.6

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.

4.1 Device Number List


Device numbers are assigned as shown below.
For input relay numbers and output relay numbers when I/O extension equipment and special extension
equipment are connected to the PLC main unit, refer to the FX3U Hardware Edition.

Device name Description Reference


I/O relay
Input relay X000 to X367*1 248 points Device numbers are octal.
The total number of inputs and outputs is Section 4.2
Output relay Y000 to Y367*1 248 points 256.
Auxiliary relay
General type [variable] M0 to M499 500 points The setting can be changed between the
Latched (battery backed) latched (battery backed) type and the non-
M500 to M1023 524 points latched type using parameters.
type [variable] Section 4.3
Latched (battery backed)
M1024 to M7679 6656 points
type [fixed]
Special type*2 M8000 to M8511 512 points Chapter 36
State relay
Initial state (general type
S0 to S9 10 points
[variable])
General type [variable] S10 to S499 490 points
The setting can be changed between the
Latched (battery backed) latched (battery backed) type and the non-
S500 to S899 400 points
type [variable] latched type using parameters. Section 4.4
Annunciator
(latched (battery backed) S900 to S999 100 points
type [variable])
Latched (battery backed)
S1000 to S4095 3096 points
type [fixed]
Timer (on-delay timer)
100 ms T0 to T191 192 points 0.1 to 3,276.7 sec
100 ms [for subroutine or
T192 to T199 8 points 0.1 to 3,276.7 sec
interrupt routine]
10 ms T200 to T245 46 points 0.01 to 327.67 sec Section 4.5
Retentive type for 1 ms T246 to T249 4 points 0.001 to 32.767 sec
Retentive type for 100 ms T250 to T255 6 points 0.1 to 3,276.7 sec
1 ms T256 to T511 256 points 0.001 to 32.767 sec

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

latched (battery backed) D512 to D7999 7488 points


Among the 7488 fixed latched (battery 7
backed) type data registers, D1000 and later

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

Extension register 32768


R0 to R32767 latched (battery backed)
(16 bits) points
Section 4.9
Extension file register 32768 Available only while a memory cassette is
ER0 to ER32767
(16 bits) points mounted
Pointer
For jump and branch call P0 to P4095 4096 points For CJ and CALL instructions 9
Move & Compare
FNC10-FNC19

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

Device name Description Reference


Constant
16 bits −32768 to +32767
Decimal (K)
32 bits −2,147,483,648 to +2,147,483,647
16 bits 0 to FFFF
Hexadecimal (H)
32 bits 0 to FFFFFFFF
−1.0 × 2128 to −1.0 × 2−126, 0, 1.0 × 2−126 to −1.0 × 2128 Chapter 5
Real number (E) 32 bits Both the decimal point expression and the exponent
expression are available.
Specify characters by quotation marks.
Character string (" ") Character string In a constant of an instruction, up to 32 half-width
characters are available.

*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

through input terminals. output terminals. Contacts for external output


An input relay (X) connected to an input terminal (output devices such as relay contacts, TRIACs and
inside the PLC is an electronic relay isolated transistors) of output relays are connected to output
optically, and has many NO contacts and NC terminals inside the PLC. An output relay has many
contacts. These contacts can be arbitrarily used electronic NO contacts and NC contacts. These
inside the PLC. contacts can be arbitrarily used inside the PLC.
These input relays cannot be driven by a program. Differences in operations between external output
contacts (output devices) and internal contacts are 10
explained on the next page.
Operation
Arith. & Logic
FNC20-FNC29

73
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.2 I/O Relays [X, Y]

4.2.3 Operation timing of input relays


The PLC executes sequence control by repeatedly executing the following processing procedure. In this
batch I/O method, not only are there driving times of input filters and output devices but also response delays
caused by operation cycles. (Refer to Section 6.3.)

1) 2) 3) .... 6) indicate the processing order.


Input processing
1) Read-in Input processing
Before executing a program, the PLC reads the ON/
X000 OFF status of all input terminals inside the PLC into
X001 the input image memory.
Even if inputs change while the program is
Input terminal

X002 Input executed, the contents of the input image memory


remain unchanged, but the changes in inputs are
Image read during the input processing in the next cycle.
Even if an input contact changes from ON to OFF or
Memory from OFF to ON, its ON/OFF status is judged after
the response delay (approximately 10 ms) caused
by the input filter.
(When the input filter is a digital type input terminal ,
its value can be overwritten by a sequence
program.)

2) Read-out Program processing Program processing


The PLC reads the ON/OFF status of each device
X000 from the input image memory and other device
Y000 image memories according to the contents of
3) Write
instructions in the program memory, executes
4) Read- Device operations in sequence from step 0, and then writes
out the operation result to the image memory.
M0 Image Accordingly, the contents of the image memory for
Y000 5) Write each device change as the program is executed.
Memory The operation of a contact inside an output relay is
Auxiliary determined by the contents of the output image
relay memory.
(scan time).]
operation is called operation cycle
[The time required for a cyclic
Repeated operation

Output processing Output processing


6) Output
When execution of all instructions is finished, the
ON/OFF status of the image memory of outputs (Y)
Y000 is transferred to the output latch memory. This is
Y001 the actual output of the PLC.
Output terminal

External output contacts inside the PLC operate


Output Y002 after the response delay time of the output devices.
Latch

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.)

latched (battery Fixed latched (battery


3
General type Special type

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

Auxiliary relay circuit

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]

2. Latched (battery backed) type


When the power is turned OFF while the PLC is operating, all of the output relays and general type auxiliary
relays turn OFF.
When restoring the power again, all of the output relays and general type auxiliary relays remain OFF except
those whose input condition is ON. In some output relays and auxiliary relays, however, the ON/OFF status
just before power failure should be stored and then replicated when restoring the power, depending on control
targets. In such a case, use latched (battery backed) type auxiliary relays.
Latch type devices are backed up by the battery built in to the PLC.
→ For details on backup method against power failure,
refer to Section 2.6.
X000 X001
The figure on the left shows an operation example of
M600 M600 (latched [battery backed] type device) in a self-
holding circuit.
M600 When X000 turns ON and M600 turns ON in this circuit,
M600 holds its operation by itself even if X000 is
PLC
Backup against power failure opened.
(self-holding circuit) Because M600 is a latched (battery backed) type
device, it remains activated when the operation is
restarted even after X000 has turned OFF due to power
failure. If an NC contact of X001 is opened when the
operation is restarted, however, M600 is deactivated.
X000
SET M600 The figure on the left shows a circuit using the SET and
RST instructions.
X001
RST M600

PLC
Backup against power failure
(set/reset circuit)

1) Application example of latched (battery backed) type auxiliary relays


In some cases, the table should be restarted in the
Limit switch Limit switch
Left limit Right limit same direction as the direction selected just before
LS1 (X000) LS2 (X001)
power failure.

Table in reciprocating motion


Motor with brake

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.

4.4.2 Functions and operation examples 5

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]

2. Latched (battery backed) type


• Latched (battery backed) type state relays store their ON/OFF status even if the power is shut down while
the PLC is operating, so the operation can be restarted from the last point in the process.
Latched (battery backed) type state relays are backed up by the battery built into the PLC.
→ For details on each backup method, refer to Section 2.6.
• When using latched (battery backed) type state relays as M8002
general type state relays, provide a reset circuit shown in the 0 FNC 040 S1000 S1200
right figure around the head step in the program. ZRST
Initial pulse
S1000 to S1200 are initialized.

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.

X003 X004 • In a machine whose tact time is less than 10 seconds,


FNC 46 T 2 K100 S902 if the switch X004 which is designed to be activated
ANS during one-cycle operation of the machine is not
activated while the continuous operation mode input
X003 is ON, S902 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.

X005 • The state relays activated by the external fault


FNC 47 diagnosis program can be turned OFF by the reset
ANRP button X005.
Every time X005 is set to ON, the active annunciator
with the smallest number is reset in turn.
While the special auxiliary relay M8049 is not driven, annunciator type state relays can be used as latched
(battery backed) type state relays in sequence programs in the same way as general type state relays.
In the SFC programming mode in the FX-PCS/WIN(-E), however, S900 to S999 cannot be programmed as a
processes flow in SFC diagrams.

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.

4.5.2 Functions and operation examples


5

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]

4.5.3 Set value specification method

1. Specifying a constant (K)


Constant T10 is a 100 ms (0.1 sec) type timer.
X003 (decimal integer) When the constant "100" is specified, T10 works as a
T10 K100 10-second timer 10-second timer (0.1 sec × 100 = 10 sec).

2. Indirectly specifying a data register


Turns on when T10 reaches the indirectly specified
X001 value of the defined data register, previously set by a
FNC 12 K100 D 5
MOV digital switch.
Note that the set value of a latched (battery backed)
D5 = K100
X003 type register can change randomly indefinite when the
10-second
T10 D5 timer battery voltage is low.

4.5.4 Cautions on routines

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.

4.5.5 Details of timer operation and timer accuracy


A timer (except interrupt execution type) starts counting when a coil is driven, and its output contact turns on
when the first coil instruction is executed after the timer has reached timeout.
Counting operation (If the operation cycle is long,
it automatically counts two or more clocks.)
Contact is not
Input processing X010 = OFF→ON activated at this point
X010 Timer starts counting
T 0
T 0 Contact is
K12 1.2 sec activated
time-
out
T 0 Y010
Y010 ON
1st cycle 2nd cycle "n"th cycle "n+1"th cycle

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)

T −α T : Timer set value (sec)


T0: Operation cycle (sec)

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)

Flicker timer (blink) 3

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.

Multi-timer by the applied instruction STMR (FNC 65)


By this instruction, off-delay timers, one-shot timers and flicker timers can be easily created.
5

Constant
Device &
Specified the
→ For details, refer to Section 14.6.

Off-delay timer and one-shot timer


S‚ m D‚
X000
• A value specified by "m" becomes the set value
FNC 65
STMR
T 10 K100 M0
of the timer specified by S ‚ . 10-second in this
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.

M2 10 • M2 and M3 are provided for a flicker timer, and


sec connected as shown in the program example for
flicker timer (below).
M3
8
Program Flow
FNC00-FNC09

Flicker timer

X000 M 3 • When M3 is connected as shown in the left


FNC 65 T 10 K100 M0
STMR figure, M2 and M1 become flicker outputs.

X000 • When X000 is set to OFF, M0, M1 and M3 are


9
Move & Compare
FNC10-FNC19

turned OFF and T10 is reset after the set time.

M 2

M 1 • Do not use the timers here in other general


circuits again.
10
In addition, the timer time can be set according to the switch input time by the teaching timer instruction
Operation
Arith. & Logic
FNC20-FNC29

TTMR (FNC 64).

81
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.5 Timer [T]

4.5.7 Handling timers as numeric devices


In timers, the output contact operating in accordance with the set value is used in some cases, and the
present value is used as numeric data for control in other cases.
The figures below show the structure of the timer present value registers. When a timer number is specified
in an operand of an applied instruction, the timer is handled as a device storing 16-bit or 32-bit data in the
same way as data registers.

1. Structure of timer present value register


1) 16-bit
High 16 bits Low Available numeric value range
order order 16-bit : 0 to 32,767
b15 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 b0 32-bit : -2,147,483,648 to +2,147,483,647
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1
*1
Sign
0: Positive
number
1: Negative
number
*1 The sign is valid only when a timer is handled as a substitute for data register.

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

2. Use examples in applied instructions


For the full use of timers as numeric devices, refer to the explanation of applied instructions later.

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.

4.6.2 Features of counters


5
The table below shows the features of 16-bit counters and 32-bit counters. They can be used in accordance

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

4.6.3 Related devices (to specify counting direction) [32-bit counter]


When an auxiliary relay for switching the counting direction is set to ON, the counter executes down-counting,
and when set to OFF, the counter executes up-counting. 8
Program Flow
FNC00-FNC09

Counting Counting Counting Counting


direction direction direction direction
Counter No. Counter No. Counter No. Counter No.
switching switching switching switching
relay relay relay relay
C200 M8200 C210 M8210 C220 M8220 C230 M8230
C201 M8201 C211 M8211 C221 M8221 C231 M8231 9
Move & Compare
FNC10-FNC19

C202 M8202 C212 M8212 C222 M8222 C232 M8232


C203 M8203 C213 M8213 C223 M8223 C233 M8233
C204 M8204 C214 M8214 C224 M8224 C234 M8234
C205 M8205 C215 M8215 C225 M8225
C206 M8206 C216 M8216 C226 M8226
C207 M8207 C217 M8217 C227 M8227
10
Operation
Arith. & Logic
FNC20-FNC29

C208 M8208 C218 M8218 C228 M8228


C209 M8209 C219 M8219 C229 M8229

83
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.6 Counter [C]

4.6.4 Functions and operation examples

1. General type and latched (battery backed) type 16-bit up counters


• The valid set range of 16-bit binary up counter is from K1 to K32767 (decimal constant).
K0 provides the same operation as K1, and the output contact turns on at the first counting.
• In general type counters, the counter value is cleared when the PLC turns off. In latch type counters,
however, the counter value just before power failure is stored (backed up by the battery); The counter
value in the subsequent operations can be added to the last counter value.
• Every time the coil C0 is driven by the counting input X011, the current value of the counter increases.
When a coil instruction is executed 10 times, the output contact turns on.
After that, the current value of the counter does not change even if the counting input X011 turns on after
that.
When the RST input X010 turns ON and then RST instruction is executed, the current value of the counter
is reset to "0" and the output contact returns.
X010 X010
RST C 0
X011 X011
C 0 K10 10
9
C 0 Set value (constant) 8
Y000 7
It can be specified Current 6
indirectly also. value 5
4
3
2
1
0

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.

X012 X012 Up counting Down counting Up counting


M8200

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.

4.6.5 Set value specification method 6

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)

Counts to the indirectly specified value of the defined data


X001 register, previously set by a digital switch.
FNC 12
MOV
K100 D 5 Note that the set value of a latched (battery backed) type
register can change randomly when the battery voltage is
8
Program Flow
FNC00-FNC09

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

2) Indirect specification (D)

X001 Pairs of data registers are used for indirect specification.


FNC 12 K43210 D5(D6) Use a 32-bit instruction for writing the set value, and make
DMOV sure that the latter of paired registers (D6 in this example)
does not overlap with other programs because it is not
X003 shown in ladder format.
C200 D5(D6)

4.6.6 Response speed of counters


Counters execute counting by cyclic operating for contact operations of internal signals X, Y, M, S, C, etc.
inside the PLC.
For example, when X011 is specified as counting input, its ON duration and OFF duration should be longer
than the cycle time of the PLC (which is tens of Hz or less usually).
On the other hand, high speed counters described later execute counting as an interrupt processing for
specific input, and can execute counting at 5 k to 6 kHz regardless of the cycle time.
→ For high speed counters, refer to Section 4.7.

4.6.7 Handling counters as numeric devices


Counters use output contacts operating in accordance with the set value or use the counter value (current
value) as numeric data for control.
The figure below shows the structure of the current value register of a counter. When a counter number is
specified in an operand of an applied instruction in execution, the counter is handled as a device storing 16-bit
or 32-bit data in the same way as data register.
A 32-bit counter is handled as 32-bit data.

1. Structure of register storing current value of counter


1) 16-bit

High 16 bits Low Available numeric value range


order order 16-bit counter: 0 to 32767
b15 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 b0 32-bit counter: −2,147,483,648 to
16384
8192
4096
2048
1024
512
256
128
64
32
16
8
4
2
1

*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

High 32 bits Low


order 1 1 1 1 0 0 0 0 1 1 1 1 0 0 0 0 order
b31 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 b0
64
32
16
8
4
2
1
65536
32768
16384
8192
4096
2048
1024
512
256
128
1,073,741,824
536,870,912
268,435,456
134,217,728
67,108,864
33,554,432
16,777,216
8,388,608
4,194,304
2,097,152
1,048,576
524,288
262,144
131,072

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.

FNC 12 C 20 D 10 C20 (current value) is transferred to D10.


MOV

A decimal integer "100" is compared with C30


2
FNC 10
K100 C 30 M 0

Overview
CMP (current value), and the result is output to M0 to M2.

The contents of C10 (current value) are converted


FNC 18 into BCD, and output to Y000 to Y007.
BCD C 10 K2Y000
(Seven-segment display unit is controlled.)

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]

4.7 High Speed Counter [C]

4.7.1 Types and device numbers of high speed counters

1. Types of high speed counters


The main unit has built-in 32-bit high speed bi-directional counters (1-phase 1-count, 1-phase 2-count and 2-
phase 2-count). These high speed counters are classified into hardware type or software type according to
the counting method. Some high speed counters are capable of using an external reset input terminal and an
external start input terminal (for counting start).

2. Classification of high speed counters according to counting method


• Hardware counters: These types of counters execute counting by hardware, but may be switched to
software counters depending on the operating condition.
→ For the condition handled as software counters,
refer to Subsection 4.7.9.
• Software counters: These types of counters execute counting as CPU interrupt processing.
It is necessary to use each software counter within both limitations of maximum
response frequency and total frequency.
→ For the limitation of response frequency depending on the total frequency,
refer to Subsection 4.7.10.

3. Types of high speed counters and input signal forms


The table below shows the types (1-phase 1-count, 1-phase 2-count and 2-phase 2-count) and input signals
(waveforms) of high speed counters.
Input signal form Counting direction
Down-count or up-count is specified
by turning on or off M8235 to
1-phase
UP/DOWN M8245.
1-count input
ON: Down-counting
OFF: Up-counting
A counter executes up-count or
+1 +1 +1 down-count as shown on the left.
1-phase UP The counting direction can be
2-count input −1 −1 −1 checked with M8246 to M8250.
DOWN ON: Down-counting
OFF: Up-counting

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

4. Cautions on counterpart equipment connected to high speed counter inputs


General-purpose inputs X000 to X007 are used for high speed counter inputs. An encoder*1 adopting the
output method shown in the table below can be connected depending on the connected terminal.
Encoders adopting the voltage output method and absolute encoders cannot be connected to high speed
counter inputs.
→ For the wiring, refer to the Hardware Edition of the main unit.
Output method of encoder which can be directly connected Open collector transistor output method compatible with 24V
to input terminal in main unit DC
Output method of encoder which can be directly connected Differential line driver output method
to input terminal in FX3U-4HSX-ADP (output voltage: 5V DC or less)

*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

by combining special auxiliary relays (M8388 and M8389).


→ For the method to change the logic of the external reset input, refer to Subsection 4.7.6.
*6. The counter C253 is usually used as a hardware counter, but can be used as the counter C253 (OP)
not equipped with reset input by combining special auxiliary relays (M8388 and M8392).
In this case, C253 (OP) is handled as a software counter.
10
Operation
Arith. & Logic
FNC20-FNC29

89
FX3U/FX3UC Series Programmable Controllers 4 Devices in Detail
Programming Manual - Basic & Applied Instruction Edition 4.7 High Speed Counter [C]

Notation of high speed counter devices


For some high speed counters in FX3U and FX3UC PLCs, the assignment of input terminals will switch when
special auxiliary relays are used.
Such high speed counter devices are classified below. Note that description as (OP) is not available in
programming.
Standard Device Standard Device
Switched Device Numbers Switched Device Numbers
Numbers Numbers
C244 C244(OP) C248 C248(OP)
C245 C245(OP) C253 C253(OP)

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]

Restriction to overlap input numbers

• 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.

4.7.3 Handling of high speed counters

1. 1-phase 1-count input


X010 • C235 counts "OFF→ ON" of the input X000 while X012
M8235 Down/up count is ON.
X011 • When X011 turns ON and then RST instruction is
RST C235 Reset executed, C235 is reset.
• The counting direction of the counters C235 to C245 is
X012 switched to down-count or up-count when M8235 to
C235 K-5 M8245 turns ON or OFF.

• C244 immediately starts counting when the input X006


X010
M8244 Down/up count turns ON while X012 is ON. The counting input is X000.
In this example, the set value is indirectly specified by
X011 the contents of data registers (D1 and D0).
RST C244 Reset • A high speed counter can be reset using X011 in a
X012
sequence as shown in the figure, but C244 immediately
C244 D0(D1) reset without any program when X001 is closed. So a
program with X011 is not necessary.
• The counting direction of the counters C235 to C245 is
Set value is (D1, D0)
switched to down-count or up-count when M8235 to
M8245 turns ON or OFF.

Operation example
The counter C235 shown above operates as follows:
X010 Up counting Down counting Up counting

X011 Reset input

X012 Start input

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.

2. 1-phase 2-count input


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 1-count input type high speed counters described above.
X011 • While X012 is ON, C246 executes up-count when the input 3
X000 turns from OFF to ON, and executes down-count when

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

X011 • When X006 turns ON while X012 is ON, C254 immediately


RST C254 starts counting. Its counting inputs are X000 (A phase) and
X001 (B phase).
X012
C254 D0(D1) • In addition to reset by X011 in a sequence, C254 is reset
immediately when X002 turns ON. 9
C254
Move & Compare
FNC10-FNC19

Y004 • When the current value becomes equivalent to or larger than


the set value (D1, D0), Y004 turns ON. When the current value
M8254 becomes equivalent to or smaller than the set value, Y004 turns
Y005 OFF.
• Y005 turns ON (for down-count) or OFF (for up-count)
according to the counting direction. 10
Operation
Arith. & Logic
FNC20-FNC29

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

4.7.4 Current value update timing and comparison of current value

1. Current value update timing


A high speed counter executes up-count or down-count when a pulse is input to its input terminal, but the
current value is updated at the timing shown in the table below. When using the current value of a hardware
counter in a MOV, CMP or applied instruction such as the comparison instruction, special care must be taken
since the current value update timing is affected by the ladder scans as shown in the table.
Current value update timing
Hardware counter When OUT or HCMOV instruction is executed for the counter
Software counter Every time a pulse is input

2. Comparison of the Current value


The following two methods are available to compare and output the current value of a high speed counter.
1) Using the comparison instruction (CMP), zone comparison instruction (ZCP) or comparison contact
instruction
When the comparison result is necessary during counting operation*1, comparison may be executed in
the main program if the HCMOV instruction is used just before the comparison instruction (CMP or ZCP)
or comparison contact instruction.
*1. If it is necessary to execute comparison to update an output contact with the high-speed counter's
changing value, use comparison instructions for high speed counters (HSCS, HSCR, HSZ or
HSCT).
2) Using comparison instructions for high speed counters (HSCS, HSCR, HSZ or HSCT)
The comparison instructions for high speed counters (HSCS, HSCR, HSZ and HSCT) execute a
comparison and output the comparison result during high speed counting. The number of times these
instructions can be used is limited as shown in the table below.
When an output relay is specified for the comparison result, the comparison result is directly updated at
the ON/OFF status of the output regardless of the output refresh by END instruction.
Mechanical operation delay (about 10 ms) cannot be avoided in a relay output type PLC. Use a transistor
output type PLC.
Instruction Limitation in number of instruction
HSCS
HSCR Can be used up to 32 times including HSCT instruction.
*1
HSZ
HSCT*1 Can be used only once.

*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.)

4. Operation status of hardware counters and software counters


Device No. Name Description ON OFF
M8380*1 Operation status of C235, C241, C244, C246, C247, C249, C251, C252 or C254
9
M8381*1 Operation status of C236
Move & Compare
FNC10-FNC19

M8382*1 Operation status of C237, C242 or C245


M8383*1 Operation Operation status of C238, C248, C248(OP), C250, C253 or C255
Software
status Hardware
M8384*1 Operation status of C239 or C243 counter
flag
M8385*1 Operation status of C240
M8386*1 Operation status of C244(OP)
10
Operation
Arith. & Logic
FNC20-FNC29

M8387*1 Operation status of C245(OP)

*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]

4.7.6 Changing the logic of external reset input signal


The counters C241 to C245, C247 to C250 and C252 to C255 are usually reset when the external reset input
turns ON.
By using the program shown below, the logic can be inverted so that these counters are reset when the
external reset input turns OFF.
Counter No. When inverting logic of external reset input signal Description

M8388 The logic of the external reset input is


C241 to C245 M8389 inverted so that the counters are reset
C247 to C250 when the input turns OFF.
C252 to C255 (The logic is inverted for all target
C2……
counters.)
K{{{

Caution
The counter C253 is switched to a software counter when the logic of the external reset input signal is
inverted.

4.7.7 Assignment of counter input terminal and switching of function


The assignment of the input terminal and the function of the software counters C244, C245, C248 and C253
are changed as shown below when combined with the following special auxiliary relays.
In a program, put a special auxiliary relay just before a target counter.
Counter No. When using software counter as hardware counter Description

M8388 • The counting input is changed from


M8390 X000 to X006.
C244(OP) • Reset input is not provided.
• Start input is not provided.
C244 • It operates as a hardware counter.
K{{{

M8388 • The counting input is changed from


M8391 X002 to X007.
C245(OP) • Reset input is not provided.
• Start input is not provided.
C245
• It operates as a hardware counter.
K{{{

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]

4.7.9 Conditions for hardware counters to be handled as software counters


High speed counters are classified into hardware counters and software counters. In some conditions,
however, hardware counters are handled as software counters.
In this case, use hardware counters within the range of maximum response frequency and total frequency as
determined for software counters.

Conditions under which counters are handled as software counters


Hardware
Condition in which hardware counters are handled as software counters
counter No.
Because hardware counters execute counting at the hardware level of the FX3U/FX3UC, they can
execute counting regardless of the total frequency.
However, when hardware counters are handled as software counters with the following conditions, their
maximum response frequency and total frequency are limited in the same way as the software counters.
Use M8380 to M8387 to check whether high speed counters are handled as hardware counters or
software counters.
• When DHSCS (FNC 53), DHSCR (FNC 54), DHSZ (FNC 55) or DHSCT (FNC280) instruction is used
for a hardware counter number, the hardware counter is handled as a software counter.
Example: C235

C235
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

2. Response frequency and total frequency of software counters 4

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.

3. Calculation of the total frequency


Total frequency ≥ Sum of "Response frequency of high speed counter ×
Magnification for calculating total frequency"
→ For a calculation example, see below.

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.

Example: M8000 (RUN monitor NO contact)


X000
Input number corresponding to
C235 2

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