Download Print this page

Mitsubishi Electric FX3G SERIES Programming Manual

Programmable controllers.
Hide thumbs
   
1
2
3
4
Table of Contents
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948

Advertisement

FX
/FX
/FX
SERIES PROGRAMMABLE CONTROLLERS
3G
3U
3UC
PROGRAMMING MANUAL
Basic & Applied Instructions Edition

Advertisement

   Also See for Mitsubishi Electric FX3G SERIES

   Summary of Contents for Mitsubishi Electric FX3G SERIES

  • Page 1

    SERIES PROGRAMMABLE CONTROLLERS PROGRAMMING MANUAL Basic & Applied Instructions Edition...

  • Page 3

    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.

  • Page 4

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

  • Page 5: Table Of Contents

    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 ..............21 1. Introduction 1.1 Programming Language in PLCs ......................23 1.1.1 Types of programming languages......................23 1.1.2 Applicability of programming languages in programming software............

  • Page 6: Table Of Contents

    Series Programmable Controllers Programming Manual - Basic & Applied Instructions Edition Table of Contents 4.4 State Relay [S] ............................91 4.4.1 Numbers of state relays .......................... 91 4.4.2 Functions and operation examples ......................92 4.5 Timer [T]..............................94 4.5.1 Numbers of timers........................... 94 4.5.2 Functions and operation examples ......................

  • Page 7: Table Of Contents

    Series Programmable Controllers Programming Manual - Basic & Applied Instructions Edition Table of Contents 5. How to Specify Devices and Constants to Instructions 5.1 Numeric Values Handled in PLCs (Octal, Decimal, Hexadecimal and Real Numbers) ....... 151 5.1.1 Types of numeric values ........................151 5.1.2 Conversion of numeric values.......................

  • Page 8: Table Of Contents

    Series Programmable Controllers Programming Manual - Basic & Applied Instructions Edition Table of Contents 8. Program Flow – FNC 00 to FNC 09 8.1 FNC 00 – CJ / Conditional Jump......................220 8.1.1 CJ instruction and operations of contact and coil.................. 224 8.1.2 Relationship between master control instruction and jump instruction ..........

  • Page 9: Table Of Contents

    Series Programmable Controllers Programming Manual - Basic & Applied Instructions Edition Table of Contents 12. Data Operation – FNC 40 to FNC 49 12.1 FNC 40 – ZRST / Zone Reset......................317 12.2 FNC 41 – DECO / Decode ......................... 320 12.3 FNC 42 –...

  • Page 10: Table Of Contents

    Series Programmable Controllers Programming Manual - Basic & Applied Instructions Edition Table of Contents 15.9 FNC 78 – FROM / Read From A Special Function Block ..............449 15.9.1 Common items between FROM instruction and TO instruction (details) ..........452 15.10 FNC 79 –...

  • Page 11: Table Of Contents

    Series Programmable Controllers Programming Manual - Basic & Applied Instructions Edition Table of Contents 20. Positioning Control – FNC150 to FNC159 20.1 FNC150 – DSZR / Dog Search Zero Return..................549 20.2 FNC151 – DVIT / Interrupt Positioning....................551 20.3 FNC152 – TBL / Batch Data Positioning Mode.................. 553 20.4 FNC155 –...

  • Page 12: Table Of Contents

    Series Programmable Controllers Programming Manual - Basic & Applied Instructions Edition Table of Contents 26.8 FNC207 – MIDW / Random Replacement of Character Strings ............635 26.9 FNC208 – INSTR / Character string search..................638 26.10 FNC209 – $MOV / Character String Transfer .................. 640 27.

  • Page 13: Table Of Contents

    Series Programmable Controllers Programming Manual - Basic & Applied Instructions Edition Table of Contents 34. FX -CF-ADP Applied Instructions – FNC300 to FNC305 34.1 FNC 300 – FLCRT / File create•check ....................741 34.1.1 Detailed explanation of setting data ....................742 34.2 FNC 301 –...

  • Page 14: Table Of Contents

    Series Programmable Controllers Programming Manual - Basic & Applied Instructions Edition Table of Contents 37.2 Supplement of Special Devices (M8000 - and D8000 -) ..............856 37.2.1 RUN monitor and initial pulse [M8000 to M8003]................856 37.2.2 Watchdog timer [D8000] ........................857 37.2.3 Battery voltage low detection [M8005 and M8006] ................

  • Page 15: Table Of Contents

    Series Programmable Controllers Programming Manual - Basic & Applied Instructions Edition Table of Contents Appendix B: Instruction Execution Time Appendix B-1 Basic Instruction Execution Time ..................908 Appendix B-2 Step Ladder Instruction Execution Time................914 Appendix B-3 Label (P/I) Execution Time ....................914 Appendix B-4 Applied Instruction Execution Time ..................

  • Page 16: Related Manuals

    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 FX PLCs, refer to this manual. For hardware information on the PLC main unit, special extension units, etc., refer to each associated manual.

  • Page 17

    Series Programmable Controllers Related manuals Programming Manual - Basic & Applied Instruction Edition Essential manual Manual required depending on application Manual with additional manual for detailed explanation Manual Model name Manual name Contents number code Manuals for communication control Common Details about simple N : N link, parallel link, Additional FX Series User’s Manual -...

  • Page 18

    Series Programmable Controllers Related manuals Programming Manual - Basic & Applied Instruction Edition Essential manual Manual required depending on application Manual with additional manual for detailed explanation Manual Model name Manual name Contents number code Handling procedures of the RS-485 communication special adapter.

  • Page 19

    Series Programmable Controllers Related manuals Programming Manual - Basic & Applied Instruction Edition Essential manual Manual required depending on application Manual with additional manual for detailed explanation Manual Model name Manual name Contents number code Handling procedures of the 4-channel analog input Supplied -4AD-ADP special adapter.

  • Page 20

    Series Programmable Controllers Related manuals Programming Manual - Basic & Applied Instruction Edition Essential manual Manual required depending on application Manual with additional manual for detailed explanation Manual Model name Manual name Contents number code 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.

  • Page 21

    Series Programmable Controllers Related manuals Programming Manual - Basic & Applied Instruction Edition Essential manual Manual required depending on application Manual with additional manual for detailed explanation Manual Model name Manual name Contents number code Manuals for FX -20SSC-H positioning Block Handling procedures of the 2-axis positioning Supplied -20SSC-H...

  • Page 22

    Series Programmable Controllers Related manuals Programming Manual - Basic & Applied Instruction Edition Essential manual Manual required depending on application Manual with additional manual for detailed explanation Manual Model name Manual name Contents number code Memory cassette Supplied Memory cassette Specifications and operating procedures of the −...

  • Page 23: Generic Names And Abbreviations Used In Manuals

    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 Series Generic name of FX Series PLCs PLC or main unit Generic name of FX Series PLC main units Series...

  • Page 24

    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 stations Generic name of CC-Link master station (having following model name): CC-Link master (station) -16CCL-M CC-Link remote station...

  • Page 25: Introduction

    Series Programmable Controllers 1 Introduction Programming Manual - Basic & Applied Instruction Edition 1.1 Programming Language in PLCs Introduction This chapter explains basic items related to programming in FX , FX and FX programmable controllers (PLCs). Programming Language in PLCs This section explains the features of programming in FX , FX and FX...

  • Page 26: Applicability Of Programming Languages In Programming Software

    Series Programmable Controllers 1 Introduction Programming Manual - Basic & Applied Instruction Edition 1.1 Programming Language in PLCs 4. ST (structured text) The ST language is a text language with a similar grammatical structure to the C language. Features The ST language can describe control achieved by syntax using selective branches with conditional statements and repetition by repetitive statements in the same way as high-level languages such as the C language.

  • Page 27: Overview (sequence Program)

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.1 Introduction of Convenient Functions Overview (Sequence Program) This chapter explains the basic functions of FX PLCs. This chapter includes not only the features of PLCs but also introduction of representative functions, parameters and memory to utilize the functions of PLCs.

  • Page 28: Convenient Functions For Output Processing

    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 36. Input interrupt Signals from specific input relays are monitored.

  • Page 29: Introduction Of Applied Instructions

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.2 Introduction of Applied Instructions 4. Registration of "entry code" for protecting programs The entry code can be registered to prevent erroneous read/incorrect write protection of created sequence programs. With regard to online operations from GX Developer (Ver.

  • Page 30

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.2 Introduction of Applied Instructions 3. Arithmetic and logical operations 7. Handy instructions and instructions for external devices • Addition (ADD/FNC 20) • Initial state (IST/FNC 60) •...

  • Page 31: Analog/positioning Special Control

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.3 Analog/Positioning Special Control Analog/Positioning Special Control For details, refer to the manual of each product. 1. Analog I/O control • Pulse output block (controlled by sequence program) •...

  • Page 32: Introduction Of Devices Constructing Plc

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.5 Introduction of Devices Constructing PLC Introduction of Devices Constructing PLC Many relays, timers, and counters are built into an FX PLC, with many NO (normally open) contacts and NC (normally closed) contacts.

  • Page 33: Device List

    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) 5. Counters (C) → Refer to Section 4.2. The following types of counters are provided, and can be used in accordance with the purpose or •...

  • Page 34

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.5 Introduction of Devices Constructing PLC 8. Index registers (V)(Z) → Refer to Section 4.11. Among registers, there are index type registers V and Z used for modification. A data register V or Z is added to another device as follows: [In the case of "V0, Z0 = 5"]...

  • Page 35: Program Memory And Devices

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices Program Memory and Devices 2.6.1 Memory structure 1. In FX PLCs PLCs are equipped with the RAM memory as standard. By mounting a memory cassette, the memory type can be changed.

  • Page 36

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices When using an attached memory cassette (does not use the built-in program memory) System ROM Built-in device memory (RAM) [Bit device memory] [Data memory] •...

  • Page 37

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices 2. In FX PLCs PLCs are equipped with the EEPROM memory as standard. When using the built-in memory (without attached memory cassette) System ROM Built-in device memory (RAM, EEPROM) [Bit device memory]...

  • Page 38: Memory Operations And Latched (battery Or Eeprom Backed) Devices Power On/off And Run/stop)

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices 2.6.2 Memory operations and latched (battery or EEPROM backed) devices (power ON/OFF and RUN/STOP) 1. Backup operation The operations of the data memory, bit device memory and program memory in FX PLCs are classified as shown below: Types of program memory...

  • Page 39

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices Caution Programs (when a memory cassette is not attached), latched (battery backed) type device values and clock data is not backed up correctly when the battery voltage becomes low due to expiration of the battery life or another reason.

  • Page 40

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices Types of bit device memory a) FX Power Item Power OFF STOP→RUN RUN→STOP OFF→ON Does not Cleared. change. Input relay (X) Cleared.

  • Page 41

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices b) FX PLCs Power Item Power OFF STOP→RUN RUN→STOP OFF→ON Does not Cleared. change. Input relay (X) Cleared. Does not change while M8033 is Does not Cleared.

  • Page 42: Types Of Backup Methods Against Power Failure

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices 2.6.3 Types of backup methods against power failure There are the following types of latch (battery backup) for the program memory and built-in PLC devices. 1.

  • Page 43: Change Between General Devices And Latched (battery Backed) Devices

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.6 Program Memory and Devices 2.6.4 Change between general devices and latched (battery backed) devices 1. When using latched (battery backed) type devices as non-latch type devices In FX PLCs, some latched (battery backed) type devices can be changed into non-latch type devices by the parameter settings.

  • Page 44: Types And Setting Of Parameters

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Types and Setting of Parameters Setting of parameters means setting the environment where the PLC operates. Almost all FX PLCs can be used with factory default values. However, when it is necessary to attach a memory cassette, set the comment capacity, set the communication condition for serial ports, etc., the parameter settings must be changed using a programming tool such as personal computer.

  • Page 45

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Classification Item Description This parameter corresponds to the following settings by specifying the contents of each on the PLC system Serial port PC screen: setting (2)

  • Page 46: Parameter Initial Values And Available Tools For Changing Parameter Values

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters 2.7.2 Parameter initial values and available tools for changing parameter values Programming tool Display unit FX-10P GOT-F900 GX Developer Setting Item FX-PCS/...

  • Page 47

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters PLCs Programming tool Display unit FX-10P GOT-F900 GX Developer Setting Item *1*2 FX-PCS/ (-E) Series Initial value range FX-30P FX-20P 1000 ET-940...

  • Page 48: Memory Capacity Setting Range

    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 Can be set by changing parameter. Memory capacity setting Special unit Positioning Built-in CC-Link/ Comment...

  • Page 49: Compatible Optional Memory Model

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters 2.7.4 Compatible optional memory model 1. FX PLCs Maximum number of Allowable number of Model name Memory type Remarks steps times of writing EEPROM...

  • Page 50: Keyword (entry Code)

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters 2.7.5 Keyword (entry code) By registering the entry code in a PLC, the functions of programming tools, display modules, and display units to change programs, monitor devices, and the current value changing function in the PLC can be restricted (access restriction).

  • Page 51

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters 3. Entry code setting and access restriction Setting status Peripheral equipment and access restriction The programming tool performs the following operations in accordance with the selected registration condition: Once the permanent PLC lock is set, it cannot be reset.

  • Page 52

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Registering and changing the entry codes This section explains the operating procedure of GX Developer (Ver.8.72A) → For the entry code registration/change procedure in FX-10P(-E), FX-20P(-E), FX-30P, and FX-PCS/WIN(-E), refer to the manual of each product.

  • Page 53

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters 4. Click [Execution] button to open "Keyword confirmation" dialog box. 5. Input the entry codes again. 6. Click [OK] to register the entry codes to the PLC. Reading/writing a program from/to a PLC with the entry codes registered This section explains the operating procedure of GX Developer (Ver.8.72A) →...

  • Page 54

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Canceling the entry codes This section explains the operating procedure of GX Developer (Ver.8.24A) → For the entry code canceling (deletion) procedure in FX-10P(-E), FX-20P(-E), FX-30P, and FX-PCS/WIN(-E), refer to the manual of each product.

  • Page 55: Special Unit Initial Value Setting [gx Developer Ver.8.24a Or Later]

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters 2.7.6 Special unit initial value setting [GX Developer Ver.8.24A or later] The initial values of the buffer memory (BFM) in special function blocks/units connected to an FX (Ver.2.20 or later) can be set as a parameter in GX Developer (Ver.8.24A or later).

  • Page 56

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Setting memory capacity This example shows a window in an PLC. Set item Contents of setting Setting range Memory capacity Set the program memory capacity.

  • Page 57

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Setting devices 1. Click "Device" tab, and set devices. The "Device" tab is available only in FX PLCs. This example shows a window in an PLC.

  • Page 58

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Assigning I/Os, setting the initial values for special units, and setting built-in CC-Link/LT 1. Click the "I/O assignment" tab, and then set the I/O assignment, special function block/unit names and built-in CC-Link/LT.

  • Page 59

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters 2. On "Special Function Block Settings" dialog box, set the initial values of special function blocks and units. The "Special Function Block Settings" tab is available only in FX PLCs.

  • Page 60

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters 3. Click [End] button to finish the setting and close "Special Function Block Settings" dialog box. 4. Set the built-in CC-Link/LT on the "Built-in CC-Link/LT Setup" dialog box. This item can be set only in the FX -32MT-LT-2.

  • Page 61

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Setting the PLC system (1) Click on the "PLC system (1)" tab to setup "Battery less mode", "MODEM initialized", and "RUN terminal input."...

  • Page 62

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters PLCs Set item Contents of setting Setting range Select this to operate the PLC without using the battery. When a check mark is put here, the battery error indicator lamp is automatically –...

  • Page 63

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters 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 next to "Operate communication setting."...

  • Page 64

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Setting positioning The positioning setting function is available in all FX PLCs and FX PLCs Ver. 2.20 or later. 1.

  • Page 65

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Set item Contents of setting Set range Set the bias speed for each set of output pulses. 1/10 or less of the Bias speed [Hz] Initial value: 0 maximum speed...

  • Page 66

    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. This example shows a window in an FX PLC.

  • Page 67

    Series Programmable Controllers 2 Overview (Sequence Program) Programming Manual - Basic & Applied Instruction Edition 2.7 Types and Setting of Parameters Set item Contents of setting Setting range A check mark here means not to transfer the positioning setting when PLC turns Positioning table settings will not be initialized when the PLC Check mark this box when changing the positioning setting from a display unit,...

  • Page 68: Instruction List

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.1 Basic Instructions Instruction List This chapter introduces a list of instructions available in programming. Basic Instructions The basic instructions are provided in the following series. The table below shows differences in applicable devices. Applicable PLC Basic instructions other than MEP and MEF instructions...

  • Page 69

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.1 Basic Instructions Mnemonic Name Symbol Function Applicable devices Reference Connection Instruction Serial connection of AND Block – Section 7.7 multiple parallel circuits Parallel connection of OR Block –...

  • Page 70: Step Ladder Instructions

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.2 Step Ladder Instructions Step Ladder Instructions Mnemonic Name Symbol Function Applicable devices Reference Step Ladder Starts step ladder Chapter 35 STL Applicable devices Return Completes step ladder –...

  • Page 71

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 72

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 73

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 74

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 75

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 76

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 77

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 78

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 79

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 80

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 81

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 82

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 83

    Series Programmable Controllers 3 Instruction List Programming Manual - Basic & Applied Instruction Edition 3.3 Applied Instructions ... in Ascending Order of FNC *1: The instruction is provided in the FX Series Ver. 3.00 or later. *6: The instruction is provided in the FX Series Ver.

  • Page 84: Devices In Detail

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.1 Device Number List 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.

  • Page 85

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.1 Device Number List Device name Description Reference High-speed counter 8 points maximum can be used among C235 to C255 [latched 1-phase 1-counting input (battery backed) type]. C235 to C245 Bi-directional (32 bits) The setting can be changed between the latched (battery...

  • Page 86

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.1 Device Number List PLCs Device name Description Reference I/O relay Input relay X000 to X177 128 points Device numbers are octal. Section 4.2 The total number of inputs and outputs is 128. Output relay Y000 to Y177 128 points...

  • Page 87

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.1 Device Number List Device name Description Reference High-speed counter 1-phase 1-counting input Bi- directional (32 bits) C235 to C245 (EEPROM keep) −2,147,483,648 to +2,147,483,647 counts 1-phase 2-counting input Bi- Software counter directional (32 bits)

  • Page 88: I/o Relays [x, Y]

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.2 I/O Relays [X, Y] I/O Relays [X, Y] Some input relays and output relays are secured in the main unit, and others are assigned to extension devices according to the connection order.

  • Page 89: Functions And Roles

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.2 I/O Relays [X, Y] 4.2.2 Functions and roles Examples of terminal names and wiring (sink input) are for the FX Series PLC. External power supply COM1 Program example...

  • Page 90: Operation Timing Of Input Relays

    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.

  • Page 91: Auxiliary Relay [m]

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.3 Auxiliary Relay [M] Auxiliary Relay [M] 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.

  • Page 92

    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.

  • Page 93: State Relay [s]

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.4 State Relay [S] State Relay [S] State relays (S) are important devices to program stepping type process control simply, and combined with the step ladder instruction STL.

  • Page 94: Functions And Operation Examples

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.4 State Relay [S] 4.4.2 Functions and operation examples 1. General type In the stepping type process control shown in the left Initial state figure, when the start signal X000 turns ON, the state relay Start S20 is set (turned ON) and the solenoid valve Y000 for X000...

  • Page 95

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.4 State Relay [S] 3. Annunciator type Annunciator type state relays can be used as outputs for external fault diagnosis. For example, when an external fault diagnosis circuit shown in the figure below is created and the contents of the special data register D8049 are monitored, the smallest number out of the active state relays S900 to S999 is stored in D8049.

  • Page 96: Timer [t]

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.5 Timer [T] Timer [T] Timers add and count clock pulses of 1 ms, 10 ms, 100 ms, etc. inside the PLC. When the counted value reaches a specified set value, the output contact of the timer turns on.

  • Page 97

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.5 Timer [T] 2. Retentive type When the drive input X001 of the timer coil T250 turns ON, the current Set value X001 value counter for T250 adds and counts clock pulses of 100 ms. T250 (constant) K345...

  • Page 98: Set Value Specification Method

    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) T10 is a 100 ms (0.1 sec) type timer. Constant When the constant "100" is specified, T10 works as a 10- X003 (decimal integer) second timer (0.1 sec ×...

  • Page 99: Program Examples [off-delay Timer And Flicker Timer]

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.5 Timer [T] 4.5.6 Program examples [off-delay timer and flicker timer] Off-delay timer X001 Y000 X001 Y000 X001 (20 sec) Y000 K200 Flicker timer (blink) X001 X001 Y000...

  • Page 100: Handling Timers As Numeric Devices

    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.

  • Page 101: Counter [c]

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.6 Counter [C] Counter [C] 4.6.1 Numbers of counters The table below shows counter (C) numbers. (Numbers are assigned in decimal.) → For high-speed counters, refer to Section 4.7. 1.

  • Page 102

    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.

  • Page 103

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.6 Counter [C] • 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".

  • Page 104: Handling Counters As Numeric Devices

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.6 Counter [C] 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.

  • Page 105: High-speed Counter [c] (fx 3u /fx 3uc Plc)

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) High-Speed Counter [C] (FX PLC) High-speed counter only available in DC input type main units. 4.7.1 Types and device numbers of high-speed counters 1.

  • Page 106

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) 5. High-speed counter device list External reset External start Classification Counter No. Edge count Data length input terminal input terminal C235 C236 C237...

  • Page 107: Input Assignment For High-speed Counters

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) 4.7.2 Input assignment for high-speed counters 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).

  • Page 108: Handling Of High-speed Counters

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) 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.

  • Page 109

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) • 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.

  • Page 110: Current Value Update Timing And Comparison Of Current Value

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) • 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.

  • Page 111: Related Devices

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) 4.7.5 Related devices 1. Devices used to switch the counting direction of 1-phase 1-count input counters Type Counter No. Specifying device Up-counting Down-counting...

  • Page 112: Changing The Logic Of External Reset Input Signal

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) 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 By using the program shown below, the logic can be inverted so that these counters are reset when the external reset input turns OFF.

  • Page 113: How To Use 2-phase 2-count Input Counters C251 To C255 With 4 Edge Counting

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) 4.7.8 How to use 2-phase 2-count input counters C251 to C255 with 4 edge counting 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.

  • Page 114: Conditions For Hardware Counters To Be Handled As Software Counters

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) 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.

  • Page 115: Response Frequency Of High-speed Counters

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) 4.7.10 Response frequency of high-speed counters 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 times subject to restrictions in total frequency.

  • Page 116

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) When special analog adapters and FX Series special function blocks/units are used Counter type Response frequency and total frequency according to instruction use condition When HSZ and HSCT Magnifica- When only HSCT...

  • Page 117: Cautions On Use

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) 4.7.11 Cautions on use • For a contact to drive the coil of a high-speed counter, use a contact which is normally ON during high-speed counting.

  • Page 118

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.7 High-Speed Counter [C] (FX3U/FX3UC PLC) • Write the following program to "reset only the current value of a high-speed counter (and does not turn OFF the contact)".

  • Page 119: High-speed Counter [c] (fx 3g Plcs)

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.8 High-Speed Counter [C] (FX3G PLCs) High-Speed Counter [C] (FX PLCs) 4.8.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).

  • Page 120

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.8 High-Speed Counter [C] (FX3G PLCs) 5. High-speed counter device list External reset External start Classification Counter No. Data length input terminal input terminal C235 C236 C237 Not provided...

  • Page 121

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.8 High-Speed Counter [C] (FX3G PLCs) 4.8.2 Input assignment for high-speed counters 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, X001, X003 and X004: 10 μs, X002, X005, X006 and X007: 50 μs).

  • Page 122

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.8 High-Speed Counter [C] (FX3G PLCs) 4.8.3 Handling of high-speed counters High-speed counters in FX PLCs operate in the same way as high-speed counters in FX PLCs.

  • Page 123: Assignment Of Counter Input Terminal And Switching Of Function

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.8 High-Speed Counter [C] (FX3G PLCs) 2. Devices used to check the counting direction of 1-phase 2-count input counters and 2-phase 2-count input counters Type Counter No.

  • Page 124

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.8 High-Speed Counter [C] (FX3G PLCs) 4.8.7 Response frequency of high-speed counters 1. Response frequency and overall frequency When any of the following functions/instructions is used, the overall frequency is restricted regardless of the operand of the instruction.

  • Page 125

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.8 High-Speed Counter [C] (FX3G PLCs) 4.8.8 Cautions on use • For a contact to drive the coil of a high-speed counter, use a contact which is normally ON during high-speed counting.

  • Page 126

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.8 High-Speed Counter [C] (FX3G PLCs) • Write the following program to "reset only the current value of a high-speed counter (and does not turn OFF the contact)".

  • Page 127: Data Register And File Register [d]

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.9 Data Register and File Register [D] Data Register and File Register [D] Data registers are devices for storing numeric data. File registers are handled as the initial values of data registers. Each data register or file register stores 16-bit data (whose most significant bit specifies the positive or negative sign).

  • Page 128: Structures Of Data Registers And File Registers

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.9 Data Register and File Register [D] 4.9.2 Structures of data registers and file registers 16-bit type One (16-bit) data register or file register can store a numeric value ranging from -32,768 to +32,767. D 0 (16 bits) High order...

  • Page 129: Functions And Operation Examples Of Data Registers

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.9 Data Register and File Register [D] 4.9.3 Functions and operation examples of data registers Data registers are devices for storing numeric data. Each data register stores 16-bit data (whose most significant bit specifies the positive or negative sign). Two data registers combined can store 32-bit numeric data (whose most significant bit specifies the positive or negative sign).

  • Page 130

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.9 Data Register and File Register [D] 3. Operation examples Data registers can be used in various control with numeric data. This section explains the operations of representative basic instructions and applied instructions among various applications.

  • Page 131: Functions And Operation Examples Of File Registers

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.9 Data Register and File Register [D] 4.9.4 Functions and operation examples of file registers A file register is a device for setting the initial value of a data register with the same number. Each file register stores 16-bit data (whose most significant bit specifies the positive or negative sign).

  • Page 132

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.9 Data Register and File Register [D] 2. File register ↔ Data register <updating the same number registers by BMOV (FNC 15) instruction> When the same file register is specified for both in BOMV (FNC 15) instruction, this instruction specifies the same-number register update mode and executes the following operation: Read...

  • Page 133

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.9 Data Register and File Register [D] 3. Data register → File register <writing by BMOV (FNC 15) instruction> When a file register (D1000 or later) is specified for the destination of BMOV (FNC 15) instruction, it is possible to directly write data to the file register area [A] inside the program memory.

  • Page 134: Cautions On Using File Registers

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.9 Data Register and File Register [D] When file registers of different device numbers are specified for the source and destination Write Inside built-in Inside system M8024 memory or memory cassette...

  • Page 135: Extension Register [r] And Extension File Register [er]

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] 4.10 Extension Register [R] and Extension File Register [ER] Extension registers (R) are the extended form of data registers (D). The contents of extension registers (R) can be stored in extension file registers (ER).

  • Page 136: Structures Of Extension Registers And Extension File Registers

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] 4.10.3 Structures of extension registers and extension file registers One extension register consists of 16 bits. Extension registers can be used in 16-bit and 32-bit applied instructions in the same way as data registers.

  • Page 137: Functions And Operation Examples Of Extension Registers

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] 4.10.5 Functions and operation examples of extension registers Extension registers can be used in various controls with numeric data the same as data registers. This subsection explains operations in representative basic instructions and applied instructions among various applications.

  • Page 138: Functions And Operation Examples Of Extension File Registers

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] 4.10.6 Functions and operation examples of extension file registers Extension file registers (ER) are usually used as log data storage destinations and set data storage destinations. Extension file registers can be handled only with dedicated instructions shown in the table below.

  • Page 139

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] 1. Relationship between extension file registers and extension registers Extension file registers and extension registers have the following positional relationship inside the PLC. a) FX PLCs Extension register (R)

  • Page 140

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] 2. Sectors of extension registers and extension file registers In FX PLCs, extension registers and extension file registers are divided into sectors in the data configuration. One sector consists of 2,048 devices.

  • Page 141: Cautions On Using Extension File Registers

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] 4.10.7 Cautions on using extension file registers 1. Cautions on writing data to extension file registers (FX PLC) Because extension file registers are stored in the flash memory inside a memory cassette, pay attention to the following points:...

  • Page 142: Registration Of Data In Extension Registers And Extension File Registers

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] 4.10.8 Registration of data in extension registers and extension file registers This subsection explains the operating procedures of GX Developer (Ver.8.72A or later). →...

  • Page 143

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] Setting the data 1. Right-click [Device memory] in the project data list to open the submenu. 2.

  • Page 144

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] 5. Input a device number to be set to "Device Label", and click the [Display] button. 6.

  • Page 145

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.10 Extension Register [R] and Extension File Register [ER] Writing (transferring) data to the PLC 1. Select [Online] → [Write to PLC...] to open the [Write to PLC] dialog box. FX3U(C)*1 For Ver.

  • Page 146: Index Register [v And Z]

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.11 Index Register [V and Z] 4.11 Index Register [V and Z] Index registers can be used in the same way as of data registers. But they are special registers since they can change the contents of device numbers and numeric values by program when combined with another device number or numeric value in operands of applied instructions.

  • Page 147: Indexing Of Devices

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.11 Index Register [V and Z] 4.11.3 Indexing of devices Available devices and the contents of indexing are as described below: → For indexing method and cautions, refer to Section 5.7. Decimal devices/numeric values: M, S, T, C, D, R, KnM, KnS, P and K For example, when "V0 = K5"...

  • Page 148: Pointer [p And I]

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.12 Pointer [P and I] 4.12 Pointer [P and I] 4.12.1 Numbers of pointers The table below shows numbers of pointers (P and I). (Numbers are assigned in decimal.) When using a pointer for input interrupt, an input number assigned to it cannot be used together with a "high-speed counter"...

  • Page 149: Functions And Operation Examples Of Pointers For Interrupt

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.12 Pointer [P and I] 4.12.3 Functions and operation examples of pointers for interrupt → For details on interrupt function, refer to Chapter 36. There are three types of pointers for interrupt. When in use, they are combined with IRET(FNC03), EI(FNC04) and DI(FNC05) for interrupt return, enabling interrupt and disabling interrupt.

  • Page 150

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.12 Pointer [P and I] Operations • Interrupt is usually disabled in the PLC. FNC 04 If interrupt is enabled by EI instruction, when X000 or X001 turns ON while a program is scanned, the PLC executes the interrupt Interrupt enabled routine [1] or [2], and then returns to the main...

  • Page 151

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.12 Pointer [P and I] Operations • Timer interrupt is enabled after EI instruction. Step FNC 04 Interrupt is It is not necessary to program DI (disable enabled interrupt) instruction when no zone to disable timer interrupt is needed.

  • Page 152

    Series Programmable Controllers 4 Devices in Detail Programming Manual - Basic & Applied Instruction Edition 4.12 Pointer [P and I] Operations Step • Enable interrupt after EI instruction, and FNC 04 describe the main program. M8000 • Drive the coil of a high-speed counter, and C255 K2,147,483,647 specify an interrupt pointer in DHSCS (FNC 53)

  • Page 153: How To Specify Devices And Constants To Instructions

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.1 Numeric Values Handled in PLCs (Octal, Decimal, Hexadecimal and Real Numbers) How to Specify Devices and Constants to Instructions This chapter explains how to specify sources and destinations in sequence instructions which are the basis for handling PLC instructions.

  • Page 154: Conversion Of Numeric Values

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.1 Numeric Values Handled in PLCs (Octal, Decimal, Hexadecimal and Real Numbers) 5.1.2 Conversion of numeric values Numeric values handled in FX PLCs can be converted as shown in the table below: Hexadecimal number Decimal number (DEC) Octal number (OCT)

  • Page 155: Handling Of Numeric Values In Floating Point Operations

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.1 Numeric Values Handled in PLCs (Octal, Decimal, Hexadecimal and Real Numbers) 5.1.3 Handling of numeric values in floating point operations Handling of numeric values in floating point operations Binary integers are handled inside PLCs.

  • Page 156

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.1 Numeric Values Handled in PLCs (Octal, Decimal, Hexadecimal and Real Numbers) Scientific notation (real number) Because binary floating point (real number) is difficult to understand for users, it can be converted into scientific notation (real number).

  • Page 157: Specification Of Constants K, H And E (decimal, Hexadecimal And Real Number)

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.2 Specification of Constants K, H and E (Decimal, Hexadecimal and Real Number) Specification of Constants K, H and E (Decimal, Hexadecimal and Real Number) When handling constants in a sequence program, use constant K (decimal), H (hexadecimal) or E (floating point).

  • Page 158: Character Strings

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.3 Character Strings Character Strings Character strings are classified into character string constants which directly specify character strings in operands in applied instructions and character string data.

  • Page 159: Specification Of Digits For Bit Devices (kn[ ]***)

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.4 Specification of Digits for Bit Devices (Kn[ ]***) Specification of Digits for Bit Devices (Kn[ ]***) Handling of bit devices Devices which handle only the ON/OFF information such as X, Y, M and S are called bit devices.

  • Page 160: Bit Specification Of A Word Device (d[ ].b)

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.5 Bit Specification of a Word Device (D[ ].b) Bit Specification of a Word Device (D[ ].b) By specifying a bit of a word device, the specified bit can be used as bit data. When specifying a bit of a word device, use a word device number and bit number (hexadecimal).

  • Page 161: Indexing

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.7 Indexing Indexing The functions and structures of index registers are explained in detail in "4.11 Index Register [V and Z]". Refer to Section 4.11 in advance.

  • Page 162: Indexing In Applied Instructions

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.7 Indexing 5.7.2 Indexing in applied instructions Expression of applied instructions allowing indexing In the explanation of applied instructions, " " is added to the source or destination symbol to indicate operands allowing indexing as shown in the figure below so that such operands can be discriminated from operands...

  • Page 163

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.7 Indexing Cautions When even if a numeric value written to index registers does not exceed the 16-bit numeric value range (0 to 32767), make sure to overwrite both V and Z using a 32-bit instruction.

  • Page 164: Indexing Example For Instruction With Limited Number Of Use

    Series Programmable Controllers 5 How to Specify Devices and Constants to Instructions Programming Manual - Basic & Applied Instruction Edition 5.7 Indexing 5.7.3 Indexing example for instruction with limited number of use. By modifying the target device numbers using index registers V and Z, the target device numbers can be changed using the program.

  • Page 165: What To Understand Before Programming

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.1 How to Read Explanation of Instructions What to Understand before Programming This chapter explains the I/O processing, relationship among instructions and programming method which should be understood before creating sequence programs.

  • Page 166

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.1 How to Read Explanation of Instructions Outline 1. Instruction format The applied instruction number (FNC No.) and instruction mnemonic are indicated. The table below shows the meaning of simplified expression.

  • Page 167

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.1 How to Read Explanation of Instructions Applicable devices Devices which can be specified in operands of instructions are shown. When a device supports an instruction, " " is added to the device. 1) Bit devices 2) Word devices •X : Input relay (X)

  • Page 168: Cautions On Creation Of Fundamental Programs

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.2 Cautions on Creation of Fundamental Programs Cautions on Creation of Fundamental Programs This section explains cautions on programming. 6.2.1 Programming procedure and execution order 1.

  • Page 169: Double Output (double Coil) Operation And Countermeasures

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.2 Cautions on Creation of Fundamental Programs 6.2.2 Double output (double coil) operation and countermeasures 1. Operation of double outputs When a coil gives double outputs (double coils) in a sequence program, the priority is given to the latter one. Suppose that the same coil Y003 is used in two positions as shown in the figure on the right.

  • Page 170: Circuits Which Cannot Be Programmed And Countermeasures

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.2 Cautions on Creation of Fundamental Programs 6.2.3 Circuits which cannot be programmed and countermeasures 1. Bridge circuit A circuit in which the current flows in both directions should be changed as shown in the figure on the right (so that a circuit without D and a circuit without B are connected in parallel).

  • Page 171: I/o Processing And Response Delay

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.3 I/O Processing and Response Delay I/O Processing and Response Delay 1. Operation timing of I/O relays and response delay FX PLCs execute the I/O processing by repeating the The ON/OFF status of input [Input process (1) to process (3).

  • Page 172: Mutual Relationship Among Program Flow Control Instructions

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.4 Mutual Relationship Among Program Flow Control Instructions Mutual Relationship Among Program Flow Control Instructions The table below shows the mutual relationship among various program flow control instructions. In the table below, "...

  • Page 173

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.4 Mutual Relationship Among Program Flow Control Instructions :This combination can be used without any problem. × :This combination is not allowed; Operation error will be occurs. :This combination is allowed, but is better not to be used because the operation will be complicated.

  • Page 174: General Rules For Applied Instructions

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.5 General Rules for Applied Instructions General Rules for Applied Instructions 6.5.1 Expression and operation type of applied instructions Instructions and operands - Both a function number FNC 00 to FNC and a symbol (mnemonic) indicating the contents are given to each applied instruction.

  • Page 175

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.5 General Rules for Applied Instructions Instruction form and operation type Applied instructions are classified into "16-bit type" or "32-bit type" by the size of handled numeric values. And by the operation type, applied instructions are classified into "continuous operation type"...

  • Page 176: Handling Of General Flags

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.5 General Rules for Applied Instructions 6.5.2 Handling of general flags In some types of applied instructions, the following flags operate: Examples: M8020: Zero flag M8021: Borrow flag M8022: Carry flag M8029: Instruction execution complete flag...

  • Page 177

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.5 General Rules for Applied Instructions 2. Introduction of method for using flags in any positions other than directly under applied instructions When two or more applied instructions are programmed, general flags turn ON or OFF when each applied instruction turns ON.

  • Page 178: Handling Of Operation Error Flag

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.5 General Rules for Applied Instructions 6.5.3 Handling of operation error flag When there is an error in the applied instruction configuration, target device or target device number range and an error occurs while operation is executed, the following flag turns ON and the error information is stored.

  • Page 179: Limitation In The Number Of Instructions And Limitation In Simultaneous Instruction Instances

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.5 General Rules for Applied Instructions 6.5.5 Limitation in the number of instructions and limitation in simultaneous instruction instances Limitation in the number of instructions Some applied instructions can only be used up to the specified number of times.

  • Page 180: Symbolic Information Storage And Block Password

    Series Programmable Controllers 6 What to Understand before Programming Programming Manual - Basic & Applied Instruction Edition 6.6 Symbolic information storage and block password Symbolic information storage and block password 6.6.1 Storage of symbolic information The FX PLC Ver. 3.00 or later can store symbolic information (data indicating the program configuration such as structure and labels).

  • Page 181: Basic Instruction

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition Basic Instruction This chapter explains types and functions of basic sequence instructions. For beginners to sequence control, we offer "Introduction Course" and "Relay Ladder Course" learning texts for reference.

  • Page 182

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition Mnemonic Name Symbol Function Applicable devices Reference Connection Instruction Serial connection of multiple − AND Block Section 7.7 parallel circuits Parallel connection of − OR Block Section 7.6 multiple contact circuits Memory Point...

  • Page 183

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.1 LD, LDI LD, LDI Outline LD and LDI instructions are contacts connected to bus lines. When combined with ANB instruction described later, LD and LDI instructions can be used for the start of branches. 1.

  • Page 184

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.1 LD, LDI 2. LDI instruction (initial logical operation, NC contact type) Circuit program List program LDIinstruction Connection to bus line X000 0000 X000 0001 Y000 Y000 Bus line Timing chart...

  • Page 185

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.2 OUT Outline OUT instruction drives coils of output relays (Y), auxiliary relays (M), state relays (S), timers (T) and counters (C). 1. Instruction format Mnemonic Operation Condition Basic Instruction Continuous...

  • Page 186

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.2 OUT Timing chart X000 OUT instruction Y000 X001 OUT instruction M100 OUT instruction M101 2. When a timer or counter is used The set value is required after OUT instruction for the counting coil of a timer or counter. The set value can be specified directly by a decimal number (K) or indirectly using a data register (D) or extension register (R).

  • Page 187

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.2 OUT 3. Indexing Devices used in OUT instruction can be indexed with index registers (V and Z). (State relays (S), special auxiliary relays (M), 32-bit counters (C), and "D .b" cannot be indexed.) The index registers V0 to V7 and Z0 to Z7 are Circuit program List program...

  • Page 188: And, Ani

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.3 AND, ANI AND, ANI Outline AND and ANI instructions connect one contact in series. The number of contacts connected in series is not limited, so AND and ANI instructions can be used consecutively as many times as necessary.

  • Page 189

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.3 AND, ANI 2. ANI instruction (serial connection of NC (normally closed) contacts) Circuit program List program ANI instruction 0000 X002 X002 X000 Contact connected 0001 X000 Y003 in series...

  • Page 190

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.3 AND, ANI Program examples Circuit program List program AND instruction 0000 X000 X001 X000 Contact connected 0001 X001 Y003 in series 0002 Y003 0003 X002 ANI instruction Contact connected 0004...

  • Page 191

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.4 OR, ORI OR, ORI Outline OR and ORI instructions are used to connect one contact in parallel. If two or more contacts are connected in series, use ORB instruction described later to connect such a serial circuit block to another circuit in parallel.

  • Page 192

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.4 OR, ORI 2. ORI instruction (parallel connection of NC (normally closed) contacts) Circuit program List program X000 0000 X000 0001 X002 Y001 0002 Y001 X002 Timing chart LD instruction X000...

  • Page 193

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.4 OR, ORI 5. Bit specification of data register (D) A bit in data register (D) can be specified as a device used in OR and ORI instructions. When specifying a bit in data register, input "."...

  • Page 194: Ldp, Ldf, Andp, Andf, Orp, Orf

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.5 LDP, LDF, ANDP, ANDF, ORP, ORF LDP, LDF, ANDP, ANDF, ORP, ORF Outline LDP, ANDP, and ORP instructions for contacts detect the rising edge, and become active during one operation cycle only at the rising edge of a specified bit device (that is, when the bit device turns from OFF to ON).

  • Page 195

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.5 LDP, LDF, ANDP, ANDF, ORP, ORF Explanation of function and operation 1. LDP, ANDP, and ORP instructions (initial logical operation of rising edge pulse, serial connection of rising edge pulse, and parallel connection of rising edge pulse) Circuit program List program...

  • Page 196

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.5 LDP, LDF, ANDP, ANDF, ORP, ORF 2. LDF, ANDF, and ORF instructions (initial logical operation of falling/trailing edge pulse, serial connection of falling/trailing edge pulse, and parallel connection of falling/trailing edge pulse) Circuit program List program LDF instruction...

  • Page 197

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.5 LDP, LDF, ANDP, ANDF, ORP, ORF 4. Output drive side The following two circuits offer the same operation: <OUT instruction> <Pulse instruction> X010 X010 X010 Operation Operation cycle...

  • Page 198

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.5 LDP, LDF, ANDP, ANDF, ORP, ORF 5. Differences in the operation caused by auxiliary relay (M) numbers When an auxiliary relay (M) is specified as a device in LDP, LDF, ANDP, ANDF, ORP and ORF instructions, the operation varies depending on the device number range as shown in the figure below.

  • Page 199

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.5 LDP, LDF, ANDP, ANDF, ORP, ORF Cautions 1. Cautions when the LDP, LDF, ANDP, ANDF, ORP, or ORF instruction programmed in the same step is executed two or more times within one operation cycle When LDP, LDF, ANDP, ANDF, ORP or ORF instruction programmed in the same step is executed two or more times within one operation cycle, the following operation results: Programs executed two or more times...

  • Page 200

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.6 ORB Outline A circuit in which two or more contacts are connected in series is called serial circuit block. 1. Instruction format Mnemonic Operation Condition Basic Instruction Continuous Operation...

  • Page 201

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.7 ANB Outline Use ANB instruction to connect a branch circuit (parallel circuit block) to the preceding circuit in series. Use LD or LDI instruction at the start of branch. After completing a parallel circuit block, connect the parallel circuit block to the preceding circuit in series by ANB instruction.

  • Page 202: Mps, Mrd, Mpp

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.8 MPS, MRD, MPP MPS, MRD, MPP Outline and FX PLCs have 11 memories called "Stack" which store the intermediate result (ON or OFF) of operations. 1.

  • Page 203

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.8 MPS, MRD, MPP Error MPS instruction can be used two or more times. However, the difference between number of MPS instructions and the number of MPP instructions should be 11 or less, and should be 0 at the end.

  • Page 204

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.8 MPS, MRD, MPP Program examples Program example 1: One stack Only one stack is used in this example. Circuit program List program X000 X001 X002 0000 LD X000 Y000...

  • Page 205

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.8 MPS, MRD, MPP Program example 3: Two stacks Circuit program List program X000 X001 X002 0000 LD X000 Y000 0001 0002 AND X001 X003 0003 Y001 0004 AND X002 0005 OUT Y000...

  • Page 206

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.9 MC, MCR MC, MCR Outline When MC instruction is executed, the bus line (LD or LDI point) is moved to a position after MC contact. The bus line can be returned to the original position by MCR instruction.

  • Page 207

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.9 MC, MCR Caution 1. A circuit error (Error code: 6611) occurs when an instruction connected the bus line (such as LD and LDI) is not present just after the MC instruction. 2.

  • Page 208

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.9 MC, MCR When the nesting structure is adopted When using MC instructions inside MC instruction, increase the nest level "N" in turn in the way "N0 → N1 → N2 →...

  • Page 209

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.10 INV 7.10 Outline 1. Instruction Format INV instruction inverts the operation result up to just before INV instruction, and does not require device number specification. Mnemonic Operation Condition Basic Instruction...

  • Page 210: Mep, Mef

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.11 MEP, MEF 7.11 MEP, MEF Outline MEP and MEF commands are instructions that change the operation results to pulses so that device numbers do not have to be specified.

  • Page 211

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.11 MEP, MEF Caution 1. MEP and MEF instructions may not operate normally if the indexed contact is modified and changed to pulses by sub-routine programs, the FOR and NEXT instructions, etc. 2.

  • Page 212: Pls, Plf

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.12 PLS, PLF 7.12 PLS, PLF Outline When PLS instruction is executed, an applicable device is activated during only one operation cycle after a drive input turns ON.

  • Page 213

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.12 PLS, PLF 3. Output drive side The following two circuits result the same operation. <OUT instruction> <PLS instruction> X000 X000 X000 X000 ON during one operation cycle In each case, M0 is ON during only one operation cycle when X000 changes from OFF to ON.

  • Page 214

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.12 PLS, PLF 3. Caution for simultaneous instances of the ZRST instruction and the PLS instruction The ZRST instruction resets the last stage for the PLS instruction and PLF instruction of the applicable device. In addition, the reset state of T and C is also reset.

  • Page 215: Set, Rst

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.13 SET, RST 7.13 SET, RST Outline Setting a bit device (SET instruction (set bit device latch ON)) When the command input turns ON, SET instruction sets to ON an output relay (Y), auxiliary relay (M), state relay (S) and bit specification (D .b) of word device.

  • Page 216

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.13 SET, RST Explanation of function and operation SET instruction drives the coil for an output relay (Y), auxiliary relay (M), state relay (S) and bit specification of data register (D).

  • Page 217

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.13 SET, RST Cautions on using RST instruction for a jumped program, subroutine program or interrupt program When RST instruction for a timer or counter is executed in a jumped program, subroutine program or interrupt program, the timer or counter may be kept in the reset status and the timer or counter may be disabled.

  • Page 218

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.14 NOP 7.14 Outline NOP instruction specifies no operation. When a program is erased completely, all steps are replaced with NOP instructions. When NOP instruction is located between general instructions, PLCs ignore NOP instruction. If NOP instructions are put in the middle of a program, fluctuation of step numbers is minimized when the program is changed or added.

  • Page 219

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.15 END 7.15 Outline END instruction specifies the end of a program. (Do not write the END instruction in the middle of a program.) 1. Instruction format Mnemonic Operation Condition Basic Instruction...

  • Page 220: Number Of Instruction Steps And Specified Devices

    Series Programmable Controllers 7 Basic Instruction Programming Manual - Basic & Applied Instruction Edition 7.16 Number of Instruction Steps and Specified Devices 7.16 Number of Instruction Steps and Specified Devices The table below shows the number of steps of basic instructions. Available devices and device ranges vary depending on the PLC.

  • Page 221: Program Flow – Fnc 00 To Fnc 09

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition Program Flow – FNC 00 to FNC 09 FNC 00 to FNC 09 provide instructions mainly related to control flow of sequence programs such as conditional program execution and priority processing.

  • Page 222: Fnc 00 – Cj / Conditional Jump

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.1 FNC 00 – CJ / Conditional Jump FNC 00 – CJ / Conditional Jump Outline CJ or CJP instruction jumps to a pointer (P); The sequence program steps between CJ or CJP instruction and the pointer are not executed.

  • Page 223

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.1 FNC 00 – CJ / Conditional Jump Cautions 1. Relationship between the label input position and the list program The figure below shows programming of a label.

  • Page 224

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.1 FNC 00 – CJ / Conditional Jump 5. Label unnecessary for the pointer P63 The pointer P63 specifies jump to END step. Do not program P63. If P63 is programmed, PLCs will display the error code 6507 (defective label definition) and stop.

  • Page 225

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.1 FNC 00 – CJ / Conditional Jump Program example 1. When a jump is necessary after OFF processing In one operation cycle after X023 changes from OFF to ON, the CJ P7 instruction becomes valid. By using this method, jump can be executed after all outputs between the CJ P7 instruction and the label P7 turn OFF.

  • Page 226: Cj Instruction And Operations Of Contact And Coil

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.1 FNC 00 – CJ / Conditional Jump 8.1.1 CJ instruction and operations of contact and coil In the program example shown below, when X000 turns ON, the program execution jumps from CJ instruction in the first circuit to the label P8.

  • Page 227

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.1 FNC 00 – CJ / Conditional Jump 2. Circuit example 2 for explaining operations (when only an RST instruction for a timer or counter is jumped) When X011 turns ON while the RST instruction for the X012...

  • Page 228: Relationship Between Master Control Instruction And Jump Instruction

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.1 FNC 00 – CJ / Conditional Jump 8.1.2 Relationship between master control instruction and jump instruction The figure below shows the contents of operation and the relationship between the master control instruction. Avoid using [2], [4] and [5] because the operation will be complicated.

  • Page 229: Fnc 01 – Call / Call Subroutine

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.2 FNC 01 – CALL / Call Subroutine FNC 01 – CALL / Call Subroutine Outline This instruction calls and executes a program which should be processed commonly in a sequence program. This instruction reduces the number of program steps, and achieves efficient program design.

  • Page 230

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.2 FNC 01 – CALL / Call Subroutine Caution 1. Using a label (P) number two or more times In CALL instructions, the same number can be used two or more times in operands (P). However, do not use a label (P) and number used in another instruction (CJ instruction).

  • Page 231: Cautions On Subroutines And Interrupt Routines

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.2 FNC 01 – CALL / Call Subroutine 8.2.1 Cautions on subroutines and interrupt routines This section explains cautions on creating programs in subroutines and interrupt routines. The explanation below is given for subroutines, but the situation also applies to interrupt routines.

  • Page 232

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.2 FNC 01 – CALL / Call Subroutine Example for resetting held outputs (countermeasures) Program example X000 FNC 01 CALLP X001 X002 Y007 is reset at an arbitrary timing.

  • Page 233: Fnc 02 – Sret / Subroutine Return

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.3 FNC 02 – SRET / Subroutine Return FNC 02 – SRET / Subroutine Return Outline This instruction returns the program execution from a subroutine to the main program. 1.

  • Page 234: Fnc 03 – Iret / Interrupt Return

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.4 FNC 03 – IRET / Interrupt Return FNC 03 – IRET / Interrupt Return Outline This instruction returns the program execution from an interrupt routine to the main program. 1.

  • Page 235

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.4 FNC 03 – IRET / Interrupt Return Program example Interrupts are usually disabled in PLCs. FNC 04 Use EI instruction to enable interrupts. When X000 turns ON while the main program is executed, M8000 instructions after the interrupt routine pointer I001 are...

  • Page 236: Fnc 04 – Ei / Enable Interrupt

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.5 FNC 04 – EI / Enable Interrupt FNC 04 – EI / Enable Interrupt Outline Interrupts are usually disabled in PLCs. This instruction enables interrupts in PLCs.

  • Page 237: Fnc 05 – Di / Disable Interrupt

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.6 FNC 05 – DI / Disable Interrupt FNC 05 – DI / Disable Interrupt Outline This instruction disables interrupts after interrupts were enabled by EI (FNC 04) instruction. 1.

  • Page 238: Fnc 06 – Main Routine Program End

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.7 FNC 06 – Main Routine Program End FNC 06 – Main Routine Program End Outline This instruction indicates the end of the main program. 1.

  • Page 239

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.7 FNC 06 – Main Routine Program End 2. In the case of CALL instruction Main routine program X011 FNC 01 P 21 CALL Main routine...

  • Page 240: Fnc 07 – Wdt / Watchdog Timer Refresh

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.8 FNC 07 – WDT / Watchdog Timer Refresh FNC 07 – WDT / Watchdog Timer Refresh Outline This instruction refreshes the watchdog timer in a sequence program. 1.

  • Page 241

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.8 FNC 07 – WDT / Watchdog Timer Refresh 2. The watchdog timer time can be changed. → For details on changing watchdog timer time, refer to Subsection 37.2.2. By overwriting the contents of D8000 (watchdog timer time), the watchdog timer detection time (initial value: 200 ms) can be changed.

  • Page 242: Fnc 08 – For / Start A For/next Loop

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.9 FNC 08 – FOR / Start a FOR/NEXT Loop FNC 08 – FOR / Start a FOR/NEXT Loop Outline FOR instruction specifies the number of repetition of the loop between FOR and NEXT (FNC 09) instructions.

  • Page 243: Fnc 09 – Next / End A For/next Loop

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.10 FNC 09 – NEXT / End a FOR/NEXT Loop 8.10 FNC 09 – NEXT / End a FOR/NEXT Loop Outline NEXT instruction specifies the end position of the loop.

  • Page 244

    Series Programmable Controllers 8 Program Flow – FNC 00 to FNC 09 Programming Manual - Basic & Applied Instruction Edition 8.10 FNC 09 – NEXT / End a FOR/NEXT Loop Errors 1. Watchdog timer error When FOR-NEXT loop is repeated many times, the operation cycle (D8010) is too long, and a watchdog timer error may occur.

  • Page 245: Move And Compare – Fnc 10 To Fnc 19

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition Move and Compare – FNC 10 to FNC 19 FNC 10 to FNC 19 provide fundamental data processing instructions such as data transfer and data comparison which are regarded as most important in applied instructions.

  • Page 246: Fnc 10 – Cmp / Compare

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.1 FNC 10 – CMP / Compare FNC 10 – CMP / Compare Outline This instruction compares two values, and outputs the result (smaller, equal or larger) to bit devices (3 points). →...

  • Page 247

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.1 FNC 10 – CMP / Compare 2. 32-bit operation (DCMP and DCMPP) The comparison value [ ] and the comparison source [ ] are compared with each other.

  • Page 248: Fnc 11 – Zcp / Zone Compare

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.2 FNC 11 – ZCP / Zone Compare FNC 11 – ZCP / Zone Compare Outline This instruction compares two values (zone) with the comparison source, and outputs the result (smaller, equal or larger) to bit devices (3 points).

  • Page 249

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.2 FNC 11 – ZCP / Zone Compare 2. 32-bit operation (DZCP and DZCPP) The lower comparison value [ ] and upper comparison value [ ] are compared with the comparison source [...

  • Page 250

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.3 FNC 12 – MOV / Move FNC 12 – MOV / Move Outline This instruction transfers (copies) the contents of a device to another device. 1.

  • Page 251

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.3 FNC 12 – MOV / Move When a word device is specified The word device transfers 1 point. Command input FNC 12...

  • Page 252

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.3 FNC 12 – MOV / Move Program examples 1. When reading the current value of a timer and counter X001 (Current value of T0) →...

  • Page 253: Fnc 13 – Smov / Shift Move

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.4 FNC 13 – SMOV / Shift Move FNC 13 – SMOV / Shift Move Outline This instruction distributes and composes data in units of digit (4 bits). 1.

  • Page 254

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.4 FNC 13 – SMOV / Shift Move Explanation of function and operation 1. 16-bit operation (SMOV and SMOVP) The contents of the transfer source and transfer destination are converted into 4-digit BCD (0000 to...

  • Page 255: Fnc 14 – Cml / Complement

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.5 FNC 14 – CML / Complement FNC 14 – CML / Complement Outline This instruction inverts data in units of bit, and then transfers (copies) the inverted data. 1.

  • Page 256

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.5 FNC 14 – CML / Complement 2. 32-bit operation (DCML and DCMLP) Each bit of devices specified as [ ] is inverted (from 0 to 1 or from 1 to 0), and then transferred to •...

  • Page 257: Fnc 15 – Bmov / Block Move

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.6 FNC 15 – BMOV / Block Move FNC 15 – BMOV / Block Move Outline This instruction transfers (copies) a specified number of data all at once. 1.

  • Page 258

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.6 FNC 15 – BMOV / Block Move Extension function (bi-directional transfer function) By controlling the direction inverse flag M8024 for BMOV (FNC 15) instruction, data can be transferred in two directions in one program.

  • Page 259: Function Of Transfer Between File Registers And Data Registers

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.6 FNC 15 – BMOV / Block Move 9.6.1 Function of transfer between file registers and data registers BMOV (FNC 15) instruction has a special function for file registers (D1000 and later). →...

  • Page 260

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.6 FNC 15 – BMOV / Block Move Handling of the memory cassette When changing the contents of file registers secured inside the memory cassette, confirm the following conditions: - Set the protect switch of the memory cassette to OFF.

  • Page 261: Fnc 16 – Fmov / Fill Move

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.7 FNC 16 – FMOV / Fill Move FNC 16 – FMOV / Fill Move Outline This instruction transfers same data to specified number of devices. 1.

  • Page 262

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.7 FNC 16 – FMOV / Fill Move 2. 32-bit operation (DFMOV and DFMOVP) The contents of [ ] are transferred to "n" 32-bit devices starting from [ •...

  • Page 263: Fnc 17 – Xch / Exchange

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.8 FNC 17 – XCH / Exchange FNC 17 – XCH / Exchange Outline This instruction exchanges data between two devices. 1.

  • Page 264

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.8 FNC 17 – XCH / Exchange Extension function (function compatible between the FX Series and the FX Series) When the instruction is executed while M8160 is ON, high-order 8 bits (byte) and low-order 8 bits (byte) of a word device are exchanged with each other.

  • Page 265: Fnc 18 – Bcd / Conversion To Binary Coded Decimal

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.9 FNC 18 – BCD / Conversion to Binary Coded Decimal FNC 18 – BCD / Conversion to Binary Coded Decimal Outline This instruction converts binary (BIN) data into binary-coded decimal (BCD) data.

  • Page 266

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.9 FNC 18 – BCD / Conversion to Binary Coded Decimal 2. 32-bit operation (DBCD and DBCDP) This instruction converts the binary (BIN) data of [ ] into binary-coded decimal (BCD) data, and transfers the converted BCD data to [ •...

  • Page 267

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.9 FNC 18 – BCD / Conversion to Binary Coded Decimal Program examples 1. When the seven-segment display unit has 1 digit X000 FNC 18 K1Y000...

  • Page 268: Fnc 19 – Bin / Conversion To Binary

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.10 FNC 19 – BIN / Conversion to Binary 9.10 FNC 19 – BIN / Conversion to Binary Outline This instruction converts binary-coded decimal (BCD) data into binary (BIN) data.

  • Page 269

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.10 FNC 19 – BIN / Conversion to Binary 2. 32-bit operation (DBIN and DBINP) This instruction converts the binary-coded decimal (BCD) data of [ ] into binary (BIN) data, and transfers the converted binary data to [ •...

  • Page 270

    Series Programmable Controllers 9 Move and Compare – FNC 10 to FNC 19 Programming Manual - Basic & Applied Instruction Edition 9.10 FNC 19 – BIN / Conversion to Binary Program examples 1. When the digital switch has 1 digit X000 FNC 19 K1X000...

  • Page 271: Arithmetic And Logical Operation (+, −, ×, ÷) – Fnc 20 To Fnc 29

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10. Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 FNC 20 to FNC 29 provide instructions for arithmetic operations and logical operations of numeric data.

  • Page 272: Fnc 20 – Add / Addition

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.1 FNC 20 – ADD / Addition 10.1 FNC 20 – ADD / Addition Outline This instruction executes addition by two values to obtain the result (A + B = C).

  • Page 273

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.1 FNC 20 – ADD / Addition Related devices 1. Relationship between the flag operation and the sign (positive or negative) of a numeric value →...

  • Page 274

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.1 FNC 20 – ADD / Addition Program example 1. Difference between ADD instruction and INC instruction caused by a program for adding "+1" When ADD[P] is executed, "1"...

  • Page 275: Fnc 21 – Sub / Subtraction

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.2 FNC 21 – SUB / Subtraction 10.2 FNC 21 – SUB / Subtraction Outline This instruction executes subtraction using two values to obtain the result (A −...

  • Page 276

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.2 FNC 21 – SUB / Subtraction Related devices 1. Relationship between the flag operation and the sign (positive or negative) of a numeric value →...

  • Page 277

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.2 FNC 21 – SUB / Subtraction Program example 1. Difference between the SUB instruction and the DEC instruction used by a program for subtracting "1"...

  • Page 278: Fnc 22 – Mul / Multiplication

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.3 FNC 22 – MUL / Multiplication 10.3 FNC 22 – MUL / Multiplication Outline This instruction executes multiplication by two values to obtain the result (A x B = C).

  • Page 279

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.3 FNC 22 – MUL / Multiplication • When a digit (K1 to K8) is specified for [ A digit can be specified ranging from K1 to K8.

  • Page 280

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.3 FNC 22 – MUL / Multiplication Cautions 1. Devices specified in • In a 32-bit operation (by DMUL or DMULP), Z cannot be specified in 2.

  • Page 281: Fnc 23 – Div / Division

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.4 FNC 23 – DIV / Division 10.4 FNC 23 – DIV / Division Outline This instruction executes division by two values to obtain the result (A ÷...

  • Page 282

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.4 FNC 23 – DIV / Division 2. 32-bit operation (DDIV and DDIVP) ] indicates the dividend, [ ] indicates the divisor, the quotient is transferred to ]), and the remainder is transferred to [ +2].

  • Page 283

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.4 FNC 23 – DIV / Division Program examples 1. 16-bit operation X000 Dividend Divisor Quotient Remainder...

  • Page 284: Fnc 24 – Inc / Increment

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.5 FNC 24 – INC / Increment 10.5 FNC 24 – INC / Increment Outline This instruction increments the data of a specified device by "1".

  • Page 285

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.5 FNC 24 – INC / Increment Program example X010 FNC 12 0 → (Z) Z is cleared by the reset input X010.

  • Page 286: Fnc 25 – Dec / Decrement

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.6 FNC 25 – DEC / Decrement 10.6 FNC 25 – DEC / Decrement Outline This instruction decrements the data of a specified device by "1".

  • Page 287: Fnc 26 – Wand / Logical Word And

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.7 FNC 26 – WAND / Logical Word AND 10.7 FNC 26 – WAND / Logical Word AND Outline This instruction executes the logical product (AND) operation of two numeric values.

  • Page 288

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.7 FNC 26 – WAND / Logical Word AND 2. 32-bit operation (DAND and DANDP) The logical product (AND) operation is executed to the contents of [ ] and [ ] in units of...

  • Page 289: Fnc 27 – Wor / Logical Word Or

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.8 FNC 27 – WOR / Logical Word OR 10.8 FNC 27 – WOR / Logical Word OR Outline This instruction executes the logical sum (OR) operation of two numeric values.

  • Page 290

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.8 FNC 27 – WOR / Logical Word OR 2. 32-bit operation (DOR and DORP) The logical sum (OR) operation is executed to the contents of [ ] and [ ] in units of bit,...

  • Page 291: Fnc 28 – Wxor / Logical Exclusive Or

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.9 FNC 28 – WXOR / Logical Exclusive OR 10.9 FNC 28 – WXOR / Logical Exclusive OR Outline This instruction executes the exclusive logical sum (XOR) operation of two numeric values.

  • Page 292

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.9 FNC 28 – WXOR / Logical Exclusive OR 2. 32-bit operation (DXOR and DXORP) The exclusive logical sum (XOR) operation is executed to the contents of [ ] and [ ] in...

  • Page 293: Fnc 29 – Neg / Negation

    10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Series Programmable Controllers Programming Manual - Basic & Applied Instruction Edition 10.10 FNC 29 – NEG / Negation 10.10 FNC 29 – NEG / Negation Outline This instruction obtains the complement of a numeric value (by inverting each bit and adding "1").

  • Page 294

    Series Programmable Controllers 10 Arithmetic and Logical Operation (+, −, ×, ÷) – FNC 20 to FNC 29 Programming Manual - Basic & Applied Instruction Edition 10.10 FNC 29 – NEG / Negation Program examples The program examples below are provided to obtain the absolute value of a negative binary value. 1.

  • Page 295: Rotation And Shift Operation – Fnc 30 To Fnc 39

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11. Rotation and Shift Operation – FNC 30 to FNC 39 FNC 30 to FNC 39 provide instructions for rotating and shifting bit data and word data in specified directions. FNC No.

  • Page 296: Fnc 30 – Ror / Rotation Right

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.1 FNC 30 – ROR / Rotation Right 11.1 FNC 30 – ROR / Rotation Right Outline This instruction shifts and rotates the bit information rightward by the specified number of bits without the carry flag. 1.

  • Page 297

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.1 FNC 30 – ROR / Rotation Right 2. 32-bit operation (DROR and DRORP) "n" bits out of 32 bits of [ ] are rotated rightward.

  • Page 298: Fnc 31 – Rol / Rotation Left

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.2 FNC 31 – ROL / Rotation Left 11.2 FNC 31 – ROL / Rotation Left Outline This instruction shifts and rotates the bit information leftward by the specified number of bits without the carry flag. 1.

  • Page 299

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.2 FNC 31 – ROL / Rotation Left 2. 32-bit operation (DROL and DROLP) "n" bits out of 32 bits of [ ] are rotated leftward.

  • Page 300: Fnc 32 – Rcr / Rotation Right With Carry

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.3 FNC 32 – RCR / Rotation Right with Carry 11.3 FNC 32 – RCR / Rotation Right with Carry Outline This instruction shifts and rotates the bit information rightward by the specified number of bits together with the carry flag.

  • Page 301

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.3 FNC 32 – RCR / Rotation Right with Carry 2. 32-bit operation (DRCR and DRCRP) "n" bits out of 32 bits of [ ] and 1 bit (carry flag M8022) are rotated rightward.

  • Page 302: Fnc 33 – Rcl / Rotation Left With Carry

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.4 FNC 33 – RCL / Rotation Left with Carry 11.4 FNC 33 – RCL / Rotation Left with Carry Outline This instruction shifts and rotates the bit information leftward by the specified number of bits together with the carry flag.

  • Page 303

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.4 FNC 33 – RCL / Rotation Left with Carry 2. 32-bit operation (DRCL and DRCLP) "n" bits out of 32 bits of [ ] and 1 bit (carry flag M8022) are rotated leftward.

  • Page 304: Fnc 34 – Sftr / Bit Shift Right

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.5 FNC 34 – SFTR / Bit Shift Right 11.5 FNC 34 – SFTR / Bit Shift Right Outline This instruction shifts bit devices of the specified bit length rightward by the specified number of bits.

  • Page 305

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.5 FNC 34 – SFTR / Bit Shift Right Explanation of function and operation 1. 16-bit operation (SFTR and SFTRP) For "n1"...

  • Page 306: Fnc 35 – Sftl / Bit Shift Left

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.6 FNC 35 – SFTL / Bit Shift Left 11.6 FNC 35 – SFTL / Bit Shift Left Outline This instruction shifts bit devices of the specified bit length leftward by the specified number of bits.

  • Page 307

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.6 FNC 35 – SFTL / Bit Shift Left Caution Note that "n2" bits are shifted every time the command input turns from OFF to ON in the SFTLP instruction, but that "n2"...

  • Page 308

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.6 FNC 35 – SFTL / Bit Shift Left 11.6.1 Replacement of SFT instruction in F and F Series SFT instruction in F PLCs corresponds to SFTL (FNC 35) instruction in FX...

  • Page 309: Fnc 36 – Wsfr / Word Shift Right

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.7 FNC 36 – WSFR / Word Shift Right 11.7 FNC 36 – WSFR / Word Shift Right Outline This instruction shifts word devices with "n1"...

  • Page 310

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.7 FNC 36 – WSFR / Word Shift Right Caution Note that "n2" words are shifted when the drive input turns ON in the WSFRP instruction, but that "n2" words are shifted in each operation cycle in the WSFR instruction.

  • Page 311: Fnc 37 – Wsfl / Word Shift Left

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.8 FNC 37 – WSFL / Word Shift Left 11.8 FNC 37 – WSFL / Word Shift Left Outline This instruction shifts the word data information leftward by the specified number of words.

  • Page 312

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.8 FNC 37 – WSFL / Word Shift Left n2 (in the case of "n2=3") Before execution n1 (in the case of "n1=9") "n2"...

  • Page 313: Fnc 38 – Sfwr / Shift Write [fifo/filo Control]

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.9 FNC 38 – SFWR / Shift Write [FIFO/FILO Control] 11.9 FNC 38 – SFWR / Shift Write [FIFO/FILO Control] Outline This instruction writes data for first-in first-out (FIFO) and last-in first-out (LIFO) control.

  • Page 314

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.9 FNC 38 – SFWR / Shift Write [FIFO/FILO Control] Explanation of function and operation 1. 16-bit operation (SFWR and SFWRP) The contents of are written to "n-1"...

  • Page 315

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.9 FNC 38 – SFWR / Shift Write [FIFO/FILO Control] Program example 1. Example of first-in first-out control →...

  • Page 316: Fnc 39 – Sfrd / Shift Read [fifo Control]

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.10 FNC 39 – SFRD / Shift Read [FIFO Control] 11.10 FNC 39 – SFRD / Shift Read [FIFO Control] Outline This instruction reads data for first-in first-out control.

  • Page 317

    Series Programmable Controllers 11 Rotation and Shift Operation – FNC 30 to FNC 39 Programming Manual - Basic & Applied Instruction Edition 11.10 FNC 39 – SFRD / Shift Read [FIFO Control] Before execution S+10 S+9 S+8 S+7 S+6 S+5 S+4 S+3 Pointer Executed at the 1st time −...

  • Page 318: Data Operation – Fnc 40 To Fnc 49

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12. Data Operation – FNC 40 to FNC 49 FNC 40 to FNC 49 provide instructions for executing complicated processing for fundamental applied instructions FNC 10 to FNC 39 and for executing special processing.

  • Page 319: Fnc 40 – Zrst / Zone Reset

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.1 FNC 40 – ZRST / Zone Reset 12.1 FNC 40 – ZRST / Zone Reset Outline This instruction resets devices located in a zone between two specified devices at one time. Use this instruction for restarting operation from the beginning after pause or after resetting control data.

  • Page 320

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.1 FNC 40 – ZRST / Zone Reset When are word devices "K0" is written to the entire range from at one time.

  • Page 321

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.1 FNC 40 – ZRST / Zone Reset 2. When specifying high-speed counters (C235 to C255) The ZRST instruction is handled as the 16-bit type, but 32-bit counters can be specified in However, it is not possible to specify a 16-bit counter in and specify a 32-bit counter in should be the same type.

  • Page 322: Fnc 41 – Deco / Decode

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.2 FNC 41 – DECO / Decode 12.2 FNC 41 – DECO / Decode Outline This instruction converts numeric data into ON bit. A bit number which is set to ON by this instruction indicates a numeric value.

  • Page 323

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.2 FNC 41 – DECO / Decode is a word device (1 ≤ n ≤ 4) When The numeric value (expressed in 2 on the low-order side) of is decoded to -When all bits of...

  • Page 324

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.2 FNC 41 – DECO / Decode Program example 1. When setting bit devices to ON according to the value of a data register The value of D0 (whose current value is "14"...

  • Page 325: Fnc 42 – Enco / Encode

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.3 FNC 42 – ENCO / Encode 12.3 FNC 42 – ENCO / Encode Outline This instruction obtains positions in which bits are ON in data. 1.

  • Page 326

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.3 FNC 42 – ENCO / Encode is a word device (1 ≤ n ≤ 4) When " bits (1 ≤ n ≤ 4) from a device specified in ON bit positions among "2 are encoded to -The encoding result of...

  • Page 327: Fnc 43 – Sum / Sum Of Active Bits

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.4 FNC 43 – SUM / Sum of Active Bits 12.4 FNC 43 – SUM / Sum of Active Bits Outline This instruction counts the number of "1"...

  • Page 328

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.4 FNC 43 – SUM / Sum of Active Bits 2. 32-bit operation (DSUM and DSUMP) The number of bits in the ON status in [ ] is counted, and stored to •...

  • Page 329

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.4 FNC 43 – SUM / Sum of Active Bits Caution While the command input is OFF, the instruction is not executed. The output of the number of bits in the ON status is latched in the previous status.

  • Page 330: Fnc 44 – Bon / Check Specified Bit Status

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.5 FNC 44 – BON / Check Specified Bit Status 12.5 FNC 44 – BON / Check Specified Bit Status Outline This instruction checks whether a specified bit position in a specified device is ON or OFF.

  • Page 331

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.5 FNC 44 – BON / Check Specified Bit Status 2. 32-bit operation (DBON and DBONP) The status (ON or OFF) of the bit "n" in [ ] is output to [When the bit "n"...

  • Page 332: Fnc 45 – Mean / Mean

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.6 FNC 45 – MEAN / Mean 12.6 FNC 45 – MEAN / Mean Outline This instruction obtains the mean value of data. 1.

  • Page 333

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.6 FNC 45 – MEAN / Mean Caution • When a device number is exceeded, "n" is handled as a smaller value in the possible range. •...

  • Page 334: Fnc 46 – Ans / Timed Annunciator Set

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.7 FNC 46 – ANS / Timed Annunciator Set 12.7 FNC 46 – ANS / Timed Annunciator Set Outline This instruction sets a state relay as an annunciator (S900 to S999). 1.

  • Page 335

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.7 FNC 46 – ANS / Timed Annunciator Set Program example 1. Displaying a fault number using an annunciator When the program for external fault diagnosis shown below is created and the content of D8049 (smallest state relay number in the ON status) is monitored, the smallest state relay number in the ON status from S900 to S999 is displayed.

  • Page 336: Fnc 47 – Anr / Annunciator Reset

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.8 FNC 47 – ANR / Annunciator Reset 12.8 FNC 47 – ANR / Annunciator Reset Outline This instruction resets an annuciator (S900 to S999) in the ON status with the smallest number. 1.

  • Page 337: Fnc 48 – Sqr / Square Root

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.9 FNC 48 – SQR / Square Root 12.9 FNC 48 – SQR / Square Root Outline This instruction obtains the square root. The ESQR (FNC127) instruction obtains the square root in floating point operation.

  • Page 338: Fnc 49 – Flt / Conversion To Floating Point

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.10 FNC 49 – FLT / Conversion to Floating Point 12.10 FNC 49 – FLT / Conversion to Floating Point Outline This instruction converts a binary integer into a binary floating point (real number).

  • Page 339

    Series Programmable Controllers 12 Data Operation – FNC 40 to FNC 49 Programming Manual - Basic & Applied Instruction Edition 12.10 FNC 49 – FLT / Conversion to Floating Point Program example 1. Arithmetic operations by binary floating point operations The sequence program shown below is constructed as follows: Calculation example ×...

  • Page 340: High-speed Processing – Fnc 50 To Fnc 59

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13. High-Speed Processing – FNC 50 to FNC 59 FNC 50 to FNC 59 provide interrupt processing type high-speed instructions that execute sequence control using the latest I/O information and utilize the high-speed processing performance of the PLC.

  • Page 341: Fnc 50 – Ref / Refresh

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.1 FNC 50 – REF / Refresh 13.1 FNC 50 – REF / Refresh Outline This instruction immediately outputs the latest input (X) information or the current output (Y) operation result in the middle of a sequence program.

  • Page 342

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.1 FNC 50 – REF / Refresh Explanation of function and operation 1. 16-bit operation (REF and REFP) When refreshing outputs (Y) "n"...

  • Page 343

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.1 FNC 50 – REF / Refresh Does not turn ON. Input terminal 20ms Input signal (X) 10ms 10ms 10ms Filter time REF instruction (executed) END instruction (input) processing...

  • Page 344: What Should Be Understood Before Using The Ref Instruction

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.1 FNC 50 – REF / Refresh 13.1.1 What should be understood before using the REF instruction 1. Changing the input filter The input filter value is determined by the contents of D8020 (initial value: 10 ms).

  • Page 345: Fnc 51 – Reff / Refresh And Filter Adjust

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.2 FNC 51 – REFF / Refresh and Filter Adjust 13.2 FNC 51 – REFF / Refresh and Filter Adjust Outline The digital input filter time of the inputs X000 to X017 can be changed using this instruction or D8020.

  • Page 346

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.2 FNC 51 – REFF / Refresh and Filter Adjust Cautions 1. Setting the filter time "n" Set "n" within the range from K0 (H0) to K60 (H3C) [0 to 60 ms]. 2.

  • Page 347: What Should Be Understood Before Using Reff Instruction

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.2 FNC 51 – REFF / Refresh and Filter Adjust 13.2.1 What should be understood before using REFF instruction Generally, a C-R filter of approximately 10 ms is provided for inputs in PLCs as countermeasures against chattering and noise at the input contacts.

  • Page 348: Fnc 52 – Mtr / Input Matrix

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.3 FNC 52 – MTR / Input Matrix 13.3 FNC 52 – MTR / Input Matrix Outline This instruction reads matrix input as 8-point input × "n"-point output (transistor) in the time division method. 1.

  • Page 349

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.3 FNC 52 – MTR / Input Matrix The figure below shows an example of the FX series main unit (sink input/sink output). For writing details, refer to the following manuals of the PLC used.

  • Page 350

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.3 FNC 52 – MTR / Input Matrix Program example n=Three outputs (Y020, Y021 and Y022) are set to ON in turn repeatedly. Every time an output is set to ON, eight inputs in the 1st, 2nd and 3rd columns are received in turn repeatedly, and stored to M30 to M37, M40 to M47 and M50 to M57 respectively.

  • Page 351: Operation And Cautions For The Mtr Instruction

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.3 FNC 52 – MTR / Input Matrix 13.3.1 Operation and cautions for the MTR instruction 1. Command input Setting the command input to normally Open For the MTR instruction, set the command input to normally Open.

  • Page 352: Fnc 53 – Hscs / High-speed Counter Set

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.4 FNC 53 – HSCS / High-Speed Counter Set 13.4 FNC 53 – HSCS / High-Speed Counter Set Outline This instruction compares a value counted by a high-speed counter with a specified value, and immediately sets an external output (Y) if the two values are equivalent each other.

  • Page 353

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.4 FNC 53 – HSCS / High-Speed Counter Set Operation When the current value of the high-speed counter C255 changes from "99" to "100" or from "101" to "100", Y010 is set to ON (output refresh).

  • Page 354

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.4 FNC 53 – HSCS / High-Speed Counter Set PLCs When the HSCS instruction is used in FX PLCs, the total frequency of each counter is affected. Refer to the counting operation described below, and select according to the contents of control whether to use the HSCS instruction or a general-purpose comparison instruction.

  • Page 355: Common Cautions On Using Instructions For High-speed Counter

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.4 FNC 53 – HSCS / High-Speed Counter Set 13.4.1 Common cautions on using instructions for high-speed counter DHSCS (FNC 53), DHSCR (FNC 54), DHSZ (FNC 55) and DHSCT (FNC280) instructions are provided for high- speed counters.

  • Page 356

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.4 FNC 53 – HSCS / High-Speed Counter Set 4. Caution on the counting operation when the current value is changed An instruction for the high-speed counter gives the comparison result when a pulse is input to the input (X) of the high- speed counter.

  • Page 357

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.4 FNC 53 – HSCS / High-Speed Counter Set 6. Priority order in operations among HSCS (FNC 53), HSCR (FNC 54), and HSZ (FNC 55) instructions for the same high-speed counter When the same comparison value is used for the same high-speed counter in the HSCS, HSCR and HSZ instructions, reset (self-reset) of the comparison target high-speed counter for the HSCR instruction is executed...

  • Page 358: Fnc 54 – Hscr / High-speed Counter Reset

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.5 FNC 54 – HSCR / High-Speed Counter Reset 13.5 FNC 54 – HSCR / High-Speed Counter Reset Outline This instruction compares the value counted by a high-speed counter with a specified value at each count, and immediately resets an external output (Y) when both values become equivalent to each other.

  • Page 359

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.5 FNC 54 – HSCR / High-Speed Counter Reset Related instructions The following instructions can be combined with high-speed counters: Instruction FNC No.

  • Page 360

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.5 FNC 54 – HSCR / High-Speed Counter Reset 2. Only 32-bit operation instructions are available. Because instructions for high-speed counters are dedicated to 32 bits, make sure to input "DHSCR (FNC 54)". 3.

  • Page 361: Fnc 55 – Hsz / High-speed Counter Zone Compare

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare Outline This instruction compares the current value of a high-speed counter with two values (one zone), and outputs the comparison result to three bit devices (refresh).

  • Page 362

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare Comparison points Make sure that the comparison value 1 and the comparison value 2 have the following relationship: ] ≤...

  • Page 363

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare Cautions 1. Selection of the count comparison method When the HSZ instruction is used in FX PLCs, hardware counters (C235, C236, C237, C238, C239, C240, C244 (OP), C245 (OP), C246, C248 (OP), C251 and C253) are automatically switched to software counters, and the maximum frequency and total frequency of each counter are affected.

  • Page 364

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare 2. Device specification range Only high-speed counters (C235 to C255) can be specified as 3.

  • Page 365: Program In Which Comparison Result Is Set To On When Power Is Turned On Zcp (fnc 11) Instruction]

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare 13.6.1 Program in which comparison result is set to ON when power is turned ON [ZCP (FNC 11) instruction] DHSZ instruction outputs the comparison result only when a counting pulse is input.

  • Page 366

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare X000 (input pulse for C235) X010 (Start) Y010 (smaller than zone) Y011 (inside zone)

  • Page 367: Table High-speed Comparison Mode (m8130)

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare 13.6.2 Table high-speed comparison mode (M8130) This section explains the table high-speed comparison mode (high-speed pattern output) of the DHSZ instruction. When two or more outputs should be activated at one time, use the HSCT instruction which can change up to 16 outputs.

  • Page 368

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare 2. Operation M8002 FNC 12 K123 D200 Comparison data DMOV FNC 12 D202 Output (Y) number...

  • Page 369

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare Comparison table Present value Comparison Output (Y) of C251 SET/RST Table counter data number...

  • Page 370: Frequency Control Mode (hsz And Plsy Instructions) (m8132)

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare 13.6.3 Frequency control mode (HSZ and PLSY instructions) (M8132) When the special auxiliary relay M8132 for declaring the frequency control mode is specified as in the DHSZ instruction, the special function shown below is provided if DPLSY instruction is combined.

  • Page 371

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare Command input FNC 12 Comparison data D300 DMOVP FNC 12 Frequency K300 D302...

  • Page 372

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.6 FNC 55 – HSZ / High-Speed Counter Zone Compare Output pulse characteristics Output pulse frequency (Hz) → Current value of C251 Write prescribed data in advance to data registers constructing the table as shown in this program example.

  • Page 373: Fnc 56 – Spd / Speed Detection

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.7 FNC 56 – SPD / Speed Detection 13.7 FNC 56 – SPD / Speed Detection Outline This instruction counts the input pulse for a specified period of time as interrupt input. The function of this instruction varies depending on the version.

  • Page 374

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.7 FNC 56 – SPD / Speed Detection Explanation of function and operation 1. 16-bit operation (SPD) × 1 ms. The measured value is stored in The input pulse is counted only for , the present value is...

  • Page 375

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.7 FNC 56 – SPD / Speed Detection 2. 32-bit operation (DSPD) The input pulse is counted only for [ ] x 1 ms.

  • Page 376

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.7 FNC 56 – SPD / Speed Detection Cautions 1. Input specifications of the input • An input device X000 to X007 specified as cannot overlap the following functions or instructions: - High-speed counter - Input interrupt...

  • Page 377: Fnc 57 – Plsy / Pulse Y Output

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.8 FNC 57 – PLSY / Pulse Y Output 13.8 FNC 57 – PLSY / Pulse Y Output Outline This instruction generates a pulse signal. →...

  • Page 378

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.8 FNC 57 – PLSY / Pulse Y Output 2. 32-bit operation (DPLSY) A pulse train at the frequency [ ] is output by the quantity [ ] from the output (Y) Command...

  • Page 379

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.8 FNC 57 – PLSY / Pulse Y Output 2. Monitoring the current number of generated pulses The number of pulses output from Y000 or Y001 is stored in the following special data registers: Device Description Contents of data...

  • Page 380

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.8 FNC 57 – PLSY / Pulse Y Output 4. Handling of pulse output terminals in FX , FX and FX series main units The outputs Y000 and Y001 are the high-speed response type.

  • Page 381

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.8 FNC 57 – PLSY / Pulse Y Output 6. Others Types of pulse output, positioning and other relevant instructions and their target output numbers Classification Instruction Instruction name...

  • Page 382: Fnc 58 – Pwm / Pulse Width Modulation

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.9 FNC 58 – PWM / Pulse Width Modulation 13.9 FNC 58 – PWM / Pulse Width Modulation Outline This instruction outputs pulses with a specified period and ON duration. 1.

  • Page 383

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.9 FNC 58 – PWM / Pulse Width Modulation Cautions 1. Setting the pulse width and period ≤ Make sure that the pulse width and period satisfy the relationship "...

  • Page 384

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.9 FNC 58 – PWM / Pulse Width Modulation When special high-speed output adapters are connected, the same output numbers in the main unit are assigned as shown in the table below.

  • Page 385: Fnc 59 – Plsr / Acceleration/deceleration Setup

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.10 FNC 59 – PLSR / Acceleration/Deceleration Setup 13.10 FNC 59 – PLSR / Acceleration/Deceleration Setup Outline This pulse output instruction has the acceleration/deceleration function. 1.

  • Page 386

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.10 FNC 59 – PLSR / Acceleration/Deceleration Setup 2. 32-bit operation (DPLSR) Pulses are output from the output (Y) by the specified number [ ] with acceleration/deceleration to the maximum frequency [ ] for the time [...

  • Page 387

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.10 FNC 59 – PLSR / Acceleration/Deceleration Setup Related devices 1. Instruction execution complete flag → For the instruction execution complete flag use method, refer to Subsection 6.5.2.

  • Page 388

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.10 FNC 59 – PLSR / Acceleration/Deceleration Setup 3. Handling of pulse output terminals in FX , FX and FX series main units The outputs Y000 and Y001 are the high-speed response type.

  • Page 389

    Series Programmable Controllers 13 High-Speed Processing – FNC 50 to FNC 59 Programming Manual - Basic & Applied Instruction Edition 13.10 FNC 59 – PLSR / Acceleration/Deceleration Setup 5. Others Types of pulse output, positioning and other relevant instructions and their target output numbers Classification Instruction Instruction name...

  • Page 390: Handy Instruction – Fnc 60 To Fnc 69

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14. Handy Instruction – FNC 60 to FNC 69 FNC 60 to FNC 69 provide handy instructions which achieve complicated control in a minimum sequence program. FNC No.

  • Page 391: Fnc 60 – Ist / Initial State

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.1 FNC 60 – IST / Initial State 14.1 FNC 60 – IST / Initial State Outline This instruction automatically controls the initial state and special auxiliary relays in a step ladder program. →...

  • Page 392

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.1 FNC 60 – IST / Initial State 1. Control of devices by switch operations (occupied devices) While the command input is ON, the following devices are automatically switched and controlled. While the command input is OFF, the devices are not switched.

  • Page 393: Ist Instruction Equivalent Circuit

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.1 FNC 60 – IST / Initial State 14.1.1 IST instruction equivalent circuit The details on special auxiliary relays (M) and initial state relays (S0 to S9) which are automatically controlled by the IST instruction are as shown in the equivalent circuit below.

  • Page 394: Example Of Ist Instruction Introduction (example Of Workpiece Transfer Mechanism)

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.1 FNC 60 – IST / Initial State 14.1.2 Example of IST instruction introduction (example of workpiece transfer mechanism) 1. Operation mode Mechanism for transferring a workpiece from the Stepping point A to the point B using the robot hand...

  • Page 395

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.1 FNC 60 – IST / Initial State 3. Assignment of mode selection inputs For using IST instruction, it is necessary to assign inputs having consecutive device numbers as shown below for mode inputs.

  • Page 396

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.1 FNC 60 – IST / Initial State 4. Special auxiliary relay (M) for the IST instruction Auxiliary relays (M) used in the IST instruction are classified into two types. Some auxiliary relays are automatically controlled by the IST instruction itself according to the situation.

  • Page 397

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.1 FNC 60 – IST / Initial State 5. Program example Circuit diagram In the sequence circuit shown below, all areas except shaded areas are standard. Program the shaded areas according to the contents of control.

  • Page 398

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.1 FNC 60 – IST / Initial State c) Zero return operation mode Programming is not required when the zero return operation mode is not provided. It is necessary to set M8043 (zero return complete) to ON before starting the automatic mode.

  • Page 399

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.1 FNC 60 – IST / Initial State d) Automatic mode (stepping operation mode, cycle operation mode or continuous operation mode) SFC block State number Initial state for...

  • Page 400

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.1 FNC 60 – IST / Initial State 6. List program The list program for the circuit diagram shown on the previous page is as shown below: 0 LD X 004 32 STL S...

  • Page 401: Fnc 61 – Ser / Search A Data Stack

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.2 FNC 61 – SER / Search a Data Stack 14.2 FNC 61 – SER / Search a Data Stack Outline This instruction searches for the same data, maximum value and minimum value in a data table.

  • Page 402

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.2 FNC 61 – SER / Search a Data Stack Operation example a) Example of search result table configuration and data Search result Searched data Comparison data...

  • Page 403

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.2 FNC 61 – SER / Search a Data Stack Operation example a) Example of search result table configuration and data Search result Searched data Comparison...

  • Page 404: Fnc 62 – Absd / Absolute Drum Sequencer

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.3 FNC 62 – ABSD / Absolute Drum Sequencer 14.3 FNC 62 – ABSD / Absolute Drum Sequencer Outline This instruction creates many output patterns corresponding to the current value of a counter. 1.

  • Page 405

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.3 FNC 62 – ABSD / Absolute Drum Sequencer Write the following data to +2n-1 in advance by a transfer instruction: Rising point Falling point Target output...

  • Page 406

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.3 FNC 62 – ABSD / Absolute Drum Sequencer Write the following data to [ +1] to [ +4n-2, +4n-1] in advance using a transfer instruction: Rising point Falling point Target output...

  • Page 407: Fnc 63 – Incd / Incremental Drum Sequencer

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.4 FNC 63 – INCD / Incremental Drum Sequencer 14.4 FNC 63 – INCD / Incremental Drum Sequencer Outline This instruction creates many output patterns using a pair of counters. 1.

  • Page 408

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.4 FNC 63 – INCD / Incremental Drum Sequencer Operation X000 FNC 63 D300 INCD M8013 K9999 1 sec clock Timing chart Suppose that the following data is written in advance by a transfer instruction: Device storing data...

  • Page 409: Fnc 64 – Ttmr / Teaching Timer

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.5 FNC 64 – TTMR / Teaching Timer 14.5 FNC 64 – TTMR / Teaching Timer Outline This instruction measures the period of time in which TTMR instruction is ON. Use this instruction to adjust the set value of a timer by a pushbutton switch.

  • Page 410

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.5 FNC 64 – TTMR / Teaching Timer Cautions 1. When the command contact turns OFF The current value [ +1] of the pressing and holding time is reset, and the teaching time will not change any more.

  • Page 411: Fnc 65 – Stmr / Special Timer

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.6 FNC 65 – STMR / Special Timer 14.6 FNC 65 – STMR / Special Timer Outline This instruction can easily make off-delay timers, one-shot timers and flicker timers. 1.

  • Page 412

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.6 FNC 65 – STMR / Special Timer Command input Flicker In the program shown below which turns OFF STMR instruction at the NC contact of +3, flicker is output to +1 and +3 are occupied.

  • Page 413: Fnc 66 – Alt / Alternate State

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.7 FNC 66 – ALT / Alternate State 14.7 FNC 66 – ALT / Alternate State Outline This instruction alternates a bit device (from ON to OFF or from OFF to ON) when the input turns ON. 1.

  • Page 414

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.7 FNC 66 – ALT / Alternate State Caution 1. When using (continuous operation type) ALT instruction • When ALT instruction is used, a specified bit device is alternated in every operation cycle. To alternate a specified device by turning the command ON or OFF, use the (pulse operation type) ALTP instruction, or use a pulse operation type command contact such as LDP.

  • Page 415: Fnc 67 – Ramp / Ramp Variable Value

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.8 FNC 67 – RAMP / Ramp Variable Value 14.8 FNC 67 – RAMP / Ramp Variable Value Outline This instruction obtains the data which changes between the start value (initial value) and the end value (target value) over the specified "n"...

  • Page 416

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.8 FNC 67 – RAMP / Ramp Variable Value • After transfer is completed, the instruction execution complete flag M8029 turns ON, and the value is returned to the value.

  • Page 417: Fnc 68 – Rotc / Rotary Table Control

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.9 FNC 68 – ROTC / Rotary Table Control 14.9 FNC 68 – ROTC / Rotary Table Control Outline This instruction is suitable for efficient control of the rotary table for putting/taking a product into/out of the rotary table. 1.

  • Page 418

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.9 FNC 68 – ROTC / Rotary Table Control Explanation of function and operation 1. 16-bit operation (ROTC) The table rotation is controlled by "m2", so that a product can be efficiently put into or taken out of the rotary table divided into "m1"...

  • Page 419

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.9 FNC 68 – ROTC / Rotary Table Control Operation conditions The conditions required to use this instruction are as shown in the example below. Rotation detection signal: X →...

  • Page 420: Fnc 69 – Sort / Sort Tabulated Data

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.10 FNC 69 – SORT / SORT Tabulated Data 14.10 FNC 69 – SORT / SORT Tabulated Data Outline This instruction sorts a data table consisting of data (lines) and group data (columns) based on a specified group data (column) sorted by line in ascending order.

  • Page 421

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.10 FNC 69 – SORT / SORT Tabulated Data • The data table configuration is explained in an example in which the sorting source data table has 3 lines and 4 columns (m1 = K3, m2 = K4).

  • Page 422

    Series Programmable Controllers 14 Handy Instruction – FNC 60 to FNC 69 Programming Manual - Basic & Applied Instruction Edition 14.10 FNC 69 – SORT / SORT Tabulated Data Sorting result when the instruction is executed with "n = K3 (column No. 3)" Column No.

  • Page 423: External Fx I/o Device – Fnc 70 To Fnc 79

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15. External FX I/O Device – FNC 70 to FNC 79 FNC 70 to FNC 79 provide instructions to receive data from and send data to external devices mainly using inputs and outputs in PLCs.

  • Page 424: Fnc 70 – Tky / Ten Key Input

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.1 FNC 70 – TKY / Ten Key Input 15.1 FNC 70 – TKY / Ten Key Input Outline This instruction sets data for timers and counters through ten key inputs ranging from "0"...

  • Page 425

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.1 FNC 70 – TKY / Ten Key Input Key pressing information [ +10] - For the key pressing information, +9 turn ON or OFF according to the pressed keys.

  • Page 426

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.1 FNC 70 – TKY / Ten Key Input 3. Number of occupied device Ten bit devices are occupied from for connecting the ten keys.

  • Page 427

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.1 FNC 70 – TKY / Ten Key Input 3. Timing chart X000 When the ten keys are pressed in the order "[1] → [2] → [3] →...

  • Page 428: Fnc 71 – Hky / Hexadecimal Input

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.2 FNC 71 – HKY / Hexadecimal Input 15.2 FNC 71 – HKY / Hexadecimal Input Outline This instruction multiplexes four X-devices and four Y-devices to allow for 16 key (0 to F) 4-digit (byte) input. Keys 0 to 9 stores numerical values, and keys A to F represent function keys.

  • Page 429

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.2 FNC 71 – HKY / Hexadecimal Input Input of a numeric value through keys 0 to 9: - When an input value is larger than "9999", it overflows from the most significant digit.

  • Page 430

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.2 FNC 71 – HKY / Hexadecimal Input 2. 32-bit operation (DHKY) Hexadecimal numerical value data input using keys 0 to F is shifted into [ ] from the least significant byte.

  • Page 431

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.2 FNC 71 – HKY / Hexadecimal Input Program example X004 FNC 71 X000 Y000 The figure below shows an example of the FX series main unit (sink input/sink output).

  • Page 432: Fnc 72 – Dsw / Digital Switch (thumbwheel Input)

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.3 FNC 72 – DSW / Digital Switch (Thumbwheel Input) 15.3 FNC 72 – DSW / Digital Switch (Thumbwheel Input) Outline This instruction reads the set value of digital switches.

  • Page 433

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.3 FNC 72 – DSW / Digital Switch (Thumbwheel Input) Specification of the number of sets ("n") - When using one set of 4 digits [n = k1] A 4-digit BCD digital switch connected to +3 is read in turn by the strobe signal +3, and stored in binary format to...

  • Page 434

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.3 FNC 72 – DSW / Digital Switch (Thumbwheel Input) 2. Connection diagram The figure below shows an example of the FX series main unit (sink input/sink output).

  • Page 435: Fnc 73 – Segd / Seven Segment Decoder

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.4 FNC 73 – SEGD / Seven Segment Decoder 15.4 FNC 73 – SEGD / Seven Segment Decoder Outline This instruction decodes data, and turns the seven-segment display unit (1 digit) ON.

  • Page 436

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.4 FNC 73 – SEGD / Seven Segment Decoder 2. Seven-segment decoding table Seven-segment Display Hexadeci- configuration data mal num- −...

  • Page 437: Fnc 74 – Segl / Seven Segment With Latch

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.5 FNC 74 – SEGL / Seven Segment With Latch 15.5 FNC 74 – SEGL / Seven Segment With Latch Outline This instruction controls one or two sets of 4-digit seven-segment display units having the latch function.

  • Page 438

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.5 FNC 74 – SEGL / Seven Segment With Latch Example of connecting one seven-segment display unit The figure below shows an example of the FX series main unit (sink output).

  • Page 439

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.5 FNC 74 – SEGL / Seven Segment With Latch Related devices → For the instruction execution complete flag use method, refer to Subsection 6.5.2. Device Name Description...

  • Page 440: How To Select A Seven-segment Display Unit

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.5 FNC 74 – SEGL / Seven Segment With Latch 15.5.1 How to select a seven-segment display unit When selecting a seven-segment display unit based on its electrical characteristics, refer to the manual below: →...

  • Page 441

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.5 FNC 74 – SEGL / Seven Segment With Latch 3. Confirming the logic of the seven-segment display unit Data input Logic Negative logic...

  • Page 442: Fnc 75 – Arws / Arrow Switch

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.6 FNC 75 – ARWS / Arrow Switch 15.6 FNC 75 – ARWS / Arrow Switch Outline This instruction inputs data through arrow switches used for shifting the digit and incrementing/decrementing the numeric value in each digit.

  • Page 443

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.6 FNC 75 – ARWS / Arrow Switch Contents of the display and operation part Display/operation panel To outputs in ←...

  • Page 444

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.6 FNC 75 – ARWS / Arrow Switch Cautions 1. Setting of the parameter "n" Refer to the explanation of parameter setting in the SEGL (FNC 74) instruction. The setting range is from 0 to 3 for the ARWS instruction.

  • Page 445

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.6 FNC 75 – ARWS / Arrow Switch Program D300 D301 Practical timer circuit D399 X000 Decrement X001 Increment X002 Higher digit...

  • Page 446: Fnc 76 – Asc / Ascii Code Data Input

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.7 FNC 76 – ASC / ASCII Code Data Input 15.7 FNC 76 – ASC / ASCII Code Data Input Outline This instruction converts a half-width alphanumeric character string into ASCII codes.

  • Page 447

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.7 FNC 76 – ASC / ASCII Code Data Input Extension function When M8161 is set to ON for making the extension function valid, a half-width alphanumeric character string specified is converted into ASCII codes, and transferred in turn only to low-order 8 bits (1 byte) of Command input...

  • Page 448: Fnc 77 – Pr / Print (ascii Code)

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.8 FNC 77 – PR / Print (ASCII Code) 15.8 FNC 77 – PR / Print (ASCII Code) Outline This instruction outputs ASCII code data to outputs (Y) in parallel.

  • Page 449

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.8 FNC 77 – PR / Print (ASCII Code) Extension function 1. 16-byte serial output The number of output characters varies depending on the ON/OFF status of the special auxiliary relay M8027. While M8027 is OFF, 8-byte serial output (fixed to 8 characters) is executed.

  • Page 450

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.8 FNC 77 – PR / Print (ASCII Code) Cautions 1. Command input and instruction operation While the command input is ON: Even if the command input is continuously ON, execution is completed after a series of outputs.

  • Page 451: Fnc 78 – From / Read From A Special Function Block

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.9 FNC 78 – FROM / Read From A Special Function Block 15.9 FNC 78 – FROM / Read From A Special Function Block Outline This instruction reads the contents of buffer memories (BMF) in a special extension unit/block attached to a PLC.

  • Page 452

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.9 FNC 78 – FROM / Read From A Special Function Block 2. 32-bit operation (DFROM and DFROMP) Special extension unit/block (BFM) →...

  • Page 453

    Series Programmable Controllers 15 External FX I/O Device – FNC 70 to FNC 79 Programming Manual - Basic & Applied Instruction Edition 15.9 FNC 78 – FROM / Read From A Special Function Block Program examples In programs, the contents of buffer memories (BFMs) in special extension units/blocks are read (transferred) to data registers (D), extension registers (R) and auxiliary relays (M) with digit specification using the FROM instruction and direct specification of buffer memories This function is supported only in FX...