background image

402

FX

3U

/FX

3UC

 Series Programmable Controllers

Programming Manual - Basic & Applied Instruction Edition

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

15.2 FNC 71 – HKY / Hexadecimal Input

15.2

FNC 71 – HKY / Hexadecimal Input

Outline

This instruction sets input data such as numeric value (0 to 9) and operation condition (function keys A to F)
using 16 keys from 0 to F.
When the extension function is set to ON, keys can be input in hexadecimal using the keys 0 to F.

1. Instruction format

2. Set data

3. Applicable devices

S

: "D

…

.b" cannot be indexed with index registers (V and Z).

Explanation of function and operation

1. 16-bit operation (HKY)

Signals of inputs [

 to 

+4] connected to sixteen keys (0 to F) and column outputs [

 to

+4] are scanned, a numeric value input by the keys 0 to 9 is stored to 

, and the key sensing output

is output to 

+7.

When a key A to F is pressed, the key pressing information [

 to 

+5] corresponding to the pressed

key turns ON, and key sensing is output to 

+6.

Operand Type

Description

Data Type

Head device (X) number inputting 16 keys (Four devices are occupied.)

Bit

Head device (Y) number to be output (Four devices are occupied.)

Bit

Device number storing a numeric value input through 16 keys

16- or 32-bit binary

Head bit device number which sets the key pressing information to ON 
(Eight devices are occupied.)

Bit

Oper-

and 

Type

Bit Devices

Word Devices

Others

System User

Digit Specification

System User

Special 

Unit

Index

Con-
stant

Real 

Number

Charac-

ter String

Pointer

X Y M T C S D

…

.b KnX KnY KnM KnS

T

C

D

R U

…

\G

…

V

Z Modify K

H

E

"

…

"

P

3

3

3

3

3 3 3 3

3

3 3

3

3 3

3

S

3

HKY

16-bit Instruction

9 steps

Mnemonic

Operation Condition

Continuous
Operation

DHKY

32-bit Instruction

17 steps

Mnemonic

Operation Condition

Continuous
Operation

FNC 71

HKY

D

  S

  

D

1

  

D

2

  

D

3

  S

  

D

1

  

D

2

  

D

3

   

S

   

S

  

D

1

  

D

1

  

D

2

  

D

3

  

D

3

  

D

3

  

D

3

Command

input

FNC 71

HKY

D

1

 

‚

‚

D

2

 

‚

D

3

 

‚

Summary of Contents for FX3U Series

Page 1: ...PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS ...

Page 2: ......

Page 3: ...ould be read and understood before attempting to install or use the unit And store this manual in a safe place so that you can take it out and read it whenever necessary Always forward it to the end user 2005 MITSUBISHI ELECTRIC CORPORATION Manual No JY997D16601 Revision A Date 2005 7 This manual confers no industrial property rights or any rights of any other kind nor does it confer any patent li...

Page 4: ... to be incorporated in a device or system used in purposes related to human life Before using the product for special purposes such as nuclear power electric power aerospace medicine or passenger movement vehicles consult with Mitsubishi Electric This product has been manufactured under strict quality control However when installing the product where major accidents or losses could occur if the pr...

Page 5: ...acked 33 2 6 1 Memory structure 33 2 6 2 Memory operations and latched battery backed power ON OFF and RUN STOP 34 2 6 3 Types of backup methods against power failure 36 2 6 4 Change between general devices and latched battery backed devices 36 2 6 5 How to initialize devices battery backed 36 2 7 Types and Setting of Parameters 37 2 7 1 Parameter list 37 2 7 2 Parameter initial values and availab...

Page 6: ... terminal and switching of function 96 4 7 8 How to use 2 phase 2 counting input counter C251 to C255 at 4 edge count 97 4 7 9 Condition handled as software counters 98 4 7 10 Response frequency of high speed counters 99 4 7 11 Cautions on use 101 4 8 Data Register and File Register D 102 4 8 1 Numbers of data registers and file registers 102 4 8 2 Structures of data registers and file registers 1...

Page 7: ...uctions 133 5 7 2 Indexing in applied instructions 134 6 What to Understand before Programming 137 6 1 How to Read Explanation of Instructions 137 6 2 Cautions on Creation of Fundamental Programs 140 6 2 1 Programming procedure and execution order 140 6 2 2 Double output double coil operation and countermeasures 141 6 2 3 Circuits which cannot be programmed and countermeasures 142 6 3 I O Processi...

Page 8: ...EXT Loop 213 8 10 FNC 09 NEXT End a FOR NEXT Loop 214 9 Move and Compare FNC 10 to FNC 19 217 9 1 FNC 10 CMP Compare 218 9 2 FNC 11 ZCP Zone Compare 220 9 3 FNC 12 MOV Move 223 9 4 FNC 13 SMOV Shift Move 226 9 5 FNC 14 CML Complement 228 9 6 FNC 15 BMOV Block Move 230 9 6 1 Function of transfer between file registers and data registers 232 9 7 FNC 16 FMOV Fill Move 234 9 8 FNC 17 XCH Exchange 237 ...

Page 9: ... Timed Annunciator Set 308 12 8 FNC 47 ANR Annunciator Reset 310 12 9 FNC 48 SQR Square Root 311 12 10 FNC 49 FLT Conversion to Floating Point 313 13 High Speed Processing FNC 50 to FNC 59 315 13 1 FNC 50 REF Refresh 316 13 1 1 What should be understood before using REF instruction 319 13 2 FNC 51 REFF Refresh and Filter Adjust 320 13 2 1 What should be understood before using REFF instruction 322...

Page 10: ...l Switch Thumbwheel Input 406 15 4 FNC 73 SEGD Seven Segment Decoder 409 15 5 FNC 74 SEGL Seven Segment With Latch 411 15 5 1 How to select a seven segment display unit 414 15 5 2 How to select parameter n based on seven segment display specifications 414 15 6 FNC 75 ARWS Arrow Switch 416 15 7 FNC 76 ASC ASCII Code Data Input 421 15 8 FNC 77 PR Print ASCII Code 423 15 9 FNC 78 FROM Read From A Spe...

Page 11: ...ing Point Negation 491 18 17 FNC129 INT Floating Point to Integer Conversion 492 18 18 FNC130 SIN Floating Point Sine 494 18 19 FNC131 COS Floating Point Cosine 496 18 20 FNC132 TAN Floating Point Tangent 497 18 21 FNC133 ASIN Floating Point Arc Sine 498 18 22 FNC134 ACOS Floating Point Arc Cosine 500 18 23 FNC135 ATAN Floating Point Arc Tangent 502 18 24 FNC136 RAD Floating Point Degree to Radian...

Page 12: ...pondence table 565 24 Others FNC181 to FNC189 567 24 1 FNC182 COMRD Read Device Comment Data 568 24 2 FNC184 RND Random Number Generation 571 24 3 FNC186 DUTY Timing Pulse Generation 573 24 4 FNC188 CRC Cyclic Redundancy Check 576 24 5 FNC189 HCMOV High Speed Counter Move 580 25 Block Data Operation FNC190 to FNC199 585 25 1 FNC192 BK Block Data Addition 586 25 2 NFC193 BK Block Data Subtraction 5...

Page 13: ...version 670 29 6 FNC261 BINDA BIN to Decimal ASCII Conversion 673 29 7 FNC269 SCL2 Scaling 2 Coordinate by X Y Data 676 30 External Device Communication Inverter Communication FNC270 to FNC274 681 30 1 FNC270 IVCK Inverter Status Check 682 30 2 FNC271 IVDR Inverter Drive 684 30 3 FNC272 IVRD Inverter Parameter Read 686 30 4 FNC273 IVWR Inverter Parameter Write 688 30 5 FNC274 IVBWR Inverter Parame...

Page 14: ...2 5 Preliminary knowledge for creating step ladder programs 768 34 2 6 Program with state relays in branches and recombination 771 34 2 7 Program examples 775 35 Interrupt Function and Pulse Catch Function 781 35 1 Outline 781 35 2 Common Items 782 35 2 1 How to disable interrupt function and pulse catch function 782 35 2 2 Related items 783 35 2 3 Cautions on use common 784 35 3 Input Interrupt I...

Page 15: ... to D8299 841 37 Error Check Method and Error Code List 843 37 1 States and Colors of LEDs PLC Operation Status 843 37 1 1 POWER LED lit flickering or unlit FX3U FX3UC 843 37 1 2 RUN LED lit or unlit FX3U FX3UC 843 37 1 3 BATT LED lit or unlit FX3U FX3UC 844 37 1 4 ERROR LED lit flickering or unlit FX3U FX3UC 844 37 1 5 L RUN LED FX3UC 845 37 1 6 L ERR LED FX3UC 845 37 2 Error Code Check Method an...

Page 16: ...tion Time 865 Appendix B 5 Execution Time of Pulse Generation Instruction P in Each Applied Instruction 873 Appendix B 6 Execution Time on Combination of Applicable Devices and Indexing 874 Appendix B 6 1 Basic instruction LD LDI AND ANI OR ORI execution time 874 Appendix B 6 2 Applied instruction execution time 874 Appendix C Applied Instruction List by Instruction Type in Alphabetic Order 876 Ap...

Page 17: ...ing explanation of basic instructions applied instructions and various devices in FX3U FX3UC PLCs 09R517 Terminal block Supplied with product FX INPUT AND OUTPUT TERMINAL BLOCKS JY992D50401 Terminal block handling procedures Manuals for communication control Common Additional Manual FX Series User s Manual Data Communication Edition JY997D16901 Details about simple N N link parallel link computer ...

Page 18: ... JY992D93201 Handling procedures of the CC Link master special function block For use refer to the FX2N 16CCL M Usere s Manual Additional Manual FX2N 16CCL M User s Manual JY992D93101 Details about the CC Link master special function block 09R710 Supplied with product FX2N 32CCL User s Manual JY992D71801 Handling procedures of the CC Link remote device station special function block 09R711 Supplie...

Page 19: ...l JY992D86001 Handling procedures of the 8 channel analog input and thermocouple input special function blockspecial function block 09R608 Supplied with product FX3U 4AD PT ADP User s Manual JY997D14701 Handling procedures of the 4 channel PT 100 temperature sensor input special adapter For use refer also to the FX3U FX3UC Series User s Manual Analog Control Edition Supplied with product FX2N 4AD ...

Page 20: ... speed counter When using each product refer also to the User s Manual Hardware Edition of the PLC main unit to which each product is connected U Supplied with product FX3U 4HSX ADP Installation Manual JY997D16301 Handling procedure of the special high speed input adapter Supplied with product FX2N 1HC User s Guide JY992D64501 Handling procedures of the 1 channel high speed counter special functio...

Page 21: ...xis positioning special extension unit 09R612 Programmable cam switch When using each product refer also to the User s Manual Hardware Edition of the PLC main unit to which each product is connected Supplied with product FX2N 1RM E SET User s Manual JY992D71101 Handling procedures of the programmable cam switch special extension unit 09R614 Other manuals When using each product refer also to the U...

Page 22: ...dels shown below FX3U 2HSY ADP and FX3U 4HSX ADP Special communication adapter Generic name of special communication adapters The models shown below FX3U 232ADP and FX3U 485ADP Special analog adapter Generic name of special analog adapters The models shown below FX3U 4AD ADP FX3U 4DA ADP FX3U 4AD PT ADP and FX3U 4AD TC ADP Extension equipment Extension equipment Generic name of I O extension equip...

Page 23: ...on power supply unit FX3UC 1PS 5V Memory cassette FX3U FLROM 16 FX3U FLROM 64 and FX3U FLROM 64L Battery FX3U 32BL Peripheral equipment Peripheral equipment Generic name of programming software handy programming panels and display units Programming tools Programming tool Generic name of programming software and handy programming panels Programming software Generic name of programming software GX D...

Page 24: ...creen 1 Features In a circuit program a sequence circuit is drawn on the graphic screen by sequence formats and device numbers Because a sequence circuit is expressed with contact symbols and coil symbols the contents of a program can be understood easily In the circuit display status the PLC operations can be monitored 2 Example of circuit display 3 SFC STL step ladder programming This input meth...

Page 25: ...c Instruction 8 FNC00 FNC09 Program Flow 9 FNC10 FNC19 Move Compare 10 FNC20 FNC29 Arith Logic Operation 1 1 2 Compatibility among programs All sequence programs created by the above three types are stored in the form of instruction words contents as at the time of list program in the program memory inside the PLC Programs created by these three types of input methods can be converted mutually and...

Page 26: ... connected By extending hardware counters in the high speed counter block high speed pulses at up to 50 kHz can be received except 1 and 4 edge count FX2N 1HC high speed counter block 2 I O refresh function for receiving the latest input information The input terminal information of the PLC in the batch refresh method is input at one time by the input image memory before operation in the step 0 Th...

Page 27: ...ut the operation result during sequence operation Related instruction Refresh REF FNC 50 2 Pulse output function for pulse train output control Related instructions Pulse Y Output PLSY FNC 57 and Acceleration Deceleration Setup PLSR FNC 59 3 Positioning function for positioning control Related instructions DOG Search Zero Return DSZR FNC150 Interrupt Positioning DVIT FNC151 Zero Return FNC156 Vari...

Page 28: ...sing instructions for I O refresh interrupt comparison dedicated to high speed counters and high speed pulse output as well as initial state instructions by which standard operations for machine control are made into packages in the SFC control FX PLCs have the specifications offering fundamental functions high speed processing and good operability 2 Advanced control available easily In addition F...

Page 29: ... 19 Chapter 25 Chapter 26 and Chapter 29 6 High speed processing Refresh REF FNC 50 Refresh and filter adjust REFF FNC 51 Speed detection SPD FNC 56 Pulse Y output PLSY FNC 57 Pulse ramp PLSR FNC 59 Refer to Chapter 13 7 Handy instructions and instructions for external devices Initial state IST FNC 60 Teaching timer TTMR FNC 64 Alternate state ALT FNC 66 Ramp variable value RAMP FNC 67 Rotary tabl...

Page 30: ...ucted with an FX3U FX3UC PLC working as the master station General X input and Y output devices are assigned to remote I O units and operated by programs for general purpose I O Refer to the FX3UC Hardware Manual for the built in type CC Link LT master Refer to the product manual for the FX2N 64CL M 3 MELSEC I O LINK The MELSEC I O LINK is a remote I O system whose master station is an FX3U FX3UC ...

Page 31: ...mpare 10 FNC20 FNC29 Arith Logic Operation 8 No protocol communication No protocol serial communication is available between an FX PLC and interface equipment in accordance with RS 232C RS 485 such as bar code reader printer personal computer and measuring instrument Refer to the Data Communication Edition 9 Inverter communication An FX PLC can control up to eight inverters via communication in ac...

Page 32: ... Input relays function as receiving ports when the PLC receives signals from external input switches The assigned device mnemonic is X The PLC has built in input relays in accordance with its scale Auxiliary relay M There are many auxiliary relays inside the PLC The assigned device mnemonic is M State relay S There are many state relays inside the PLC The assigned device mnemonic is S Timer T Ther...

Page 33: ...in the step ladder or as process numbers in the SFC expression When a state relay is not used as a process number it can be programmed as a general contact coil in the same way as an auxiliary relay State relays can be used as annunciators for external fault diagnosis 4 Timers T Refer to Section 4 5 A timer adds and counts clock pulses of 1 10 or 100 ms and its output contact turns ON or OFF when ...

Page 34: ... registers ER Extension file registers ER can be used only while a memory cassette is mounted 8 Index registers V Z Refer to Section 4 10 Among registers there are index type registers V and Z used for modification A data register V or Z is added to another device as follows In the case of V0 Z0 5 D100V0 D105 C20Z0 C25 Device number V or Z value Data registers and index registers are used for indi...

Page 35: ...d Built in device memory RAM Bit device memory Data register D Timer present value register T Counter present value register C Index register V Z Contact image memory Input relay X Output relay Y Auxiliary relay M State relay S Timer contact and time counting coil Counter contact counting coil and reset coil Extension register R Data memory CPU System ROM Built in program memory RAM Not used Optio...

Page 36: ...nge File register Does not change Item Power OFF Power OFF ON STOP RUN RUN STOP Data register D General type Cleared Does not change Cleared Does not change while M8033 is ON latched battery backed type Does not change File type Does not change Special type Cleared Set to initial values 1 Does not change 1 Extension register R latched battery backed type Does not change Extension file register ER ...

Page 37: ... change while M8033 is ON General type auxiliary relay M Cleared Does not change Cleared Does not change while M8033 is ON latched battery backed type auxiliary relay M Does not change Special type auxiliary relay M Cleared Set to initial values 1 Does not change 1 General type state relay S Does not change latched battery backed type state relay S Does not change Annunciator S Does not change Tim...

Page 38: ...acked 1 ZRST FNC 40 instruction zone reset By ZRST FNC 40 instruction devices in a specified range can be cleared at one time For the details of ZRST FNC 40 instruction refer to Section 12 1 In addition to ZRST instruction FMOV FNC 16 instruction is available also For the details of FMOV FNC 16 instruction refer to Section 9 7 2 M8032 latch memory all clear When M8032 is turned ON all latched batt...

Page 39: ... in the memory capacity Other special setting capacity 1 This parameter sets whether or not the special block unit initial value setting function is used When this function is used the program memory capacity is reduced because this function requires 4000 steps 8 blocks in the memory capacity 2 This parameter sets whether or not the positioning setting constants and setting table in TBL FNC152 ins...

Page 40: ...n 8 alphanumeric characters among A to F and 0 to 9 In FX3U and FX3UC PLCs Ver 2 00 or later the second entry code in 8 characters can be added to allow specification of the entry code in 16 characters Program title This parameter enables to set a character string to be used as the program title Item GX Developer Initial value Setting range Initial value of non applicable programming tool Display ...

Page 41: ...X Developer Ver 8 23Z or later is applicable Caution After changing the memory capacity setting make sure to write both the programs and parameters to the PLC If only the parameters are written to the PLC program errors such as parameter error circuit error and grammar error may occur in the PLC 2 7 4 Compatible optional memory model Memory capacity setting Comment capacity setting Unit Block File...

Page 42: ...programming tool 1 Ver 2 00A or later support FX series PLC however Ver 8 13P or later is required for FX3UC series PLCs and Ver 8 23Z or later is required for FX3U PLCs 2 Only manuals in Japanese are available for the ET 940 Series The security by keyword entry code and 2nd keyword has its limits and is not always perfect Available characters Number of registered characters Applicable PLC version...

Page 43: ...code are set 1 When a programming tool supports the second entry code The programming tool performs the following operations in accordance with the selected registration condition 2 When a programming tool does not support the second entry code All online operations are disabled The entry code cannot be changed or reset and the PLC memory cannot be cleared When only entry code is set 1 In the case...

Page 44: ...odes are provided to restrict access from peripheral equipment to programs created by the users Keep the entry codes carefully If a registered entry codes is forgotten the online operations from a programming tool to the PLC are disabled depending on the programming tool type and the contents of the registered entry code 3 Click Execution button to open Keyword confirmation dialog box 4 Input the ...

Page 45: ... in the PLC When the entry code inputs are verified the PLC executes Read from PC or Write to PC When the entry code inputs are not verified the PLC does not execute Read from PC or Write to PC Canceling the entry codes This paragraph explains the operating procedure of GX Developer Ver 8 23Z For the entry code canceling deletion procedure in FX 10P E FX 20P E and FX PCS WIN E refer to the manual ...

Page 46: ... set as a parameter in GX Developer Ver 8 23Z or later When this parameter is used it is not necessary to execute initial setting in a user program for special function blocks units requiring initial setting The special unit initial value setting uses 4000 steps 8 blocks in the memory capacity For the setting procedure refer to Subsection 2 7 8 2 7 7 Positioning setting for TBL FNC152 instruction ...

Page 47: ...n GX Developer Ver 8 22Y and earlier Set item Contents of setting Setting range Memory capacity Set the program memory capacity Initial value 16000 1 Refer to Subsection 2 7 3 Comments capacity Set the capacity of comments to be stored in the PLC Initial value 0 50 device comments block 500 steps File register capacity Set the file register capacity Initial value 0 500 file registers block 500 ste...

Page 48: ...y range Initial value 500 to 999 0 to 999 Timer The setting displayed here cannot be changed Counter 16bit Set the latched battery backed 16 bit counter range Initial value 100 to 199 0 to 199 Counter 32bit Set the latched battery backed 32 bit counter range Initial value 220 to 255 220 to 255 Data register Set the data register range battery backed Initial value 200 to 511 0 to 511 Extended regis...

Page 49: ...relay When the I O range is set here according to the system configuration those inputs and outputs are checked in programming by GX Developer 0 to 377 Output relay 0 to 377 Special Unit It is necessary to set the memory capacity Unit No This is the unit number of each special function block unit Unit Name Set the name of each special function block unit whose initial values are to be set 32 half ...

Page 50: ...his column indicates the order of initial value setting in the selected unit number Numbers 1 to 98 can be set Address Set the buffer memory address BFM number in a decimal value whose initial value is to be set 1 Comment This column is displayed when device comments are registered On the above screen Input mode of CH1 to CH4 is registered as the device comment for U0 G0 unit No 0 BFM 0 Value Set ...

Page 51: ...ck PLC system 1 tab and then set Battery less mode MODEM initialized and RUN ter minal input 1 X000 to X007 in the FX3U 16M Set item Contents of setting Setting range Battery less mode Put a check mark to operate the PLC without using the battery When a check mark is put here the battery error indicator lamp is automatically turned off and devices in the latch battery backed area are automatically...

Page 52: ...ng Setting range Channel selection Select a channel in which a serial port is set CH1 CH2 Operate communication setting Put a check mark when using the selected serial port in computer link no protocol communication or inverter communication Do not put a check mark when transferring and monitoring sequence programs in GX Developer or when using the selected serial port in simple N N link or parall...

Page 53: ... Programming 7 Basic Instruction 8 FNC00 FNC09 Program Flow 9 FNC10 FNC19 Move Compare 10 FNC20 FNC29 Arith Logic Operation 8 Setting positioning The positioning setting function is available in FX3U FX3UC PLCs Ver 2 00 or later 1 Click Positioning tab Positioning tab is displayed when a check mark is put to Positioning on Memory capacity tab 2 Set the positioning constants in TBL FNC152 instructi...

Page 54: ...eturn speed Hz Set the zero point return speed in DSZR FNC150 instruction for each output number of pulse Initial value 50000 1 Acceleration time ms Set the acceleration time for each output number of pulse Initial value 100 50 to 5000 Deceleration time ms Set the deceleration time for each output number of pulse Initial value 100 50 to 5000 Interruption input of DVIT instruction Set the interrupt...

Page 55: ...o S4095 Head Address Set the head number of devices storing the set data pulse number and frequency 1600 devices are occupied starting from the head device number set here without regard to the number of used axes Initial setting R0 Refer to the Positioning Control Manual D0 to D6400 R0 to R31168 No This column shows the table number Numbers 1 to 100 can be set Positioning Instruction Select the p...

Page 56: ...hanging the memory capacity setting make sure to write both the programs and parameters to the PLC If only the parameters are written to the PLC program errors such as parameter error circuit error and grammar error may occur in the PLC Positioning table settings will not be initialized when the PLC is powered on A check mark here means not to transfer the positioning setting when PLC turns ON Put...

Page 57: ...peration contact type NC normally closed X Y M S D b T C Section 7 1 LDP Load Pulse Initial logical operation of Rising edge pulse X Y M S D b T C Section 7 5 LDF Load Falling Pulse Initial logical operation of Falling trailing edge pulse X Y M S D b T C Section 7 5 AND AND Serial connection of NO normally open contacts X Y M S D b T C Section 7 3 ANI AND Inverse Serial connection of NC normally c...

Page 58: ... 7 2 SET SET SET Bit device latch ON Y M S D b Section 7 12 RST Reset RESET Bit device OFF Y M S D b T C D R V Z Section 7 12 PLS Pulse Rising edge pulse Y M Section 7 11 PLF Pulse Falling Falling trailing edge pulse Y M Section 7 11 Master Control Instruction MC Master Control Denotes the start of a master control block Y M Section 7 9 MCR Master Control Reset Denotes the end of a master control ...

Page 59: ...eries Ver 1 30 or later 5 The instruction is provided in the FX3UC Series Ver 2 00 or later FNC No Mnemonic Symbol Function FX 3U FX 3UC Applicable PLC Reference FX 1S FX 1N FX 2N FX 1NC FX 2NC Program Flow 00 CJ Conditional Jump 3 3 3 3 3 3 3 Section 8 1 01 CALL Call Subroutine 3 3 3 3 3 3 3 Section 8 2 02 SRET Subroutine Return 3 3 3 3 3 3 3 Section 8 3 03 IRET Interrupt Return 3 3 3 3 3 3 3 Sec...

Page 60: ...8 28 WXOR Logical Exclusive OR 3 3 3 3 3 3 3 Section 10 9 29 NEG Negation 3 3 3 3 Section 10 10 Rotation and Shift Operation 30 ROR Rotation Right 3 3 3 3 Section 11 1 31 ROL Rotation Left 3 3 3 3 Section 11 2 32 RCR Rotation Right with Carry 3 3 3 3 Section 11 3 33 RCL Rotation Left with Carry 3 3 3 3 Section 11 4 34 SFTR Bit Shift Right 3 3 3 3 3 3 3 Section 11 5 1 The instruction is provided in...

Page 61: ... Status 3 3 3 3 Section 12 5 45 MEAN Mean 3 3 3 3 Section 12 6 46 ANS Timed Annunciator Set 3 3 3 3 Section 12 7 47 ANR Annunciator Reset 3 3 3 3 Section 12 8 48 SQR Square Root 3 3 3 3 Section 12 9 49 FLT Conversion to Floating Point 3 3 3 3 Section 12 10 High Speed Processing 50 REF Refresh 3 3 3 3 3 3 3 Section 13 1 51 REFF Refresh and Filter Adjust 3 3 3 3 Section 13 2 52 MTR Input Matrix 3 3 ...

Page 62: ... ALT Alternate State 3 3 3 3 3 3 3 Section 14 7 67 RAMP Ramp Variable Value 3 3 3 3 3 3 3 Section 14 8 68 ROTC Rotary Table Control 3 3 3 3 Section 14 9 69 SORT SORT Tabulated Data 3 3 3 3 Section 14 10 External FX I O Device 70 TKY Ten Key Input 3 3 3 3 Section 15 1 71 HKY Hexadecimal Input 3 3 3 3 Section 15 2 72 DSW Digital Switch Thumbwheel Input 3 3 3 3 3 3 3 Section 15 3 1 The instruction is...

Page 63: ...lel Run Octal Mode 3 3 3 3 3 3 3 Section 16 2 82 ASCI Hexadecimal to ASCII Conversion 3 3 3 3 3 3 3 Section 16 3 83 HEX ASCII to Hexadecimal Conversion 3 3 3 3 3 3 3 Section 16 4 84 CCD Check Code 3 3 3 3 3 3 3 Section 16 5 85 VRRD Volume Read 3 3 3 3 3 86 VRSC Volume Scale 3 3 3 3 3 87 RS2 Serial Communication 2 3 3 Section 16 6 88 PID PID Control Loop 3 3 3 3 3 3 3 Section 16 7 89 to 99 Data Tra...

Page 64: ...g Point Multiplication 3 3 3 3 Section 18 10 123 EDIV Floating Point Division 3 3 3 3 Section 18 11 124 EXP Floating Point Exponent 3 3 Section 18 12 125 LOGE Floating Point Natural Logarithm 3 3 Section 18 13 126 LOG10 Floating Point Common Logarithm 3 3 Section 18 14 127 ESQR Floating Point Square Root 3 3 3 3 Section 18 15 128 ENEG Floating Point Negation 3 3 Section 18 16 129 INT Floating Poin...

Page 65: ...137 DEG Floating Point Radian to Degree Conversion 3 3 Section 18 25 138 139 Data Operation 2 140 WSUM Sum of Word Data 3 5 Section 19 1 141 WTOB WORD to BYTE 3 5 Section 19 2 142 BTOW BYTE to WORD 3 5 Section 19 3 143 UNI 4 bit Linking of Word Data 3 5 Section 19 4 144 DIS 4 bit Grouping of Word Data 3 5 Section 19 5 145 146 147 SWAP Byte Swap 3 3 3 3 Section 19 6 148 149 SORT2 Sort Tabulated Dat...

Page 66: ... 3 3 3 3 3 Section 21 3 163 TSUB RTC Data Subtraction 3 3 3 3 3 3 3 Section 21 4 164 HTOS Hour to Second Conversion 3 3 Section 21 5 165 STOH Second to Hour Conversion 3 3 Section 21 6 166 TRD Read RTC data 3 3 3 3 3 3 3 Section 21 7 167 TWR Set RTC data 3 3 3 3 3 3 3 Section 21 8 168 169 HOUR Hour Meter 3 3 3 3 1 3 1 Section 21 9 1 The instruction is provided in the FX2N FX2NC Series Ver 3 00 or ...

Page 67: ...s 181 182 COMRD Read Device Comment Data 3 5 Section 24 1 183 184 RND Random Number Generation 3 3 Section 24 2 185 186 DUTY Timing Pulse Generation 3 5 Section 24 3 187 188 CRC Cyclic Redundancy Check 3 3 Section 24 4 189 HCMOV High Speed Counter Move 3 4 Section 24 5 Block Data Operation 190 191 192 BK Block Data Addition 3 5 Section 25 1 193 BK Block Data Subtraction 3 5 Section 25 2 1 The inst...

Page 68: ...f Character Strings 3 3 Section 26 7 207 MIDW Random Replacement of Character Strings 3 3 Section 26 8 208 INSTR Character string search 3 5 Section 26 9 209 MOV Character String Transfer 3 3 Section 26 10 Data Operation 3 210 FDEL Deleting Data from Tables 3 5 Section 27 1 211 FINS Inserting Data to Tables 3 5 Section 27 2 212 POP Shift Last Data Read LIFO Control 3 3 Section 27 3 1 The instructi...

Page 69: ...ction 28 1 230 LD Load Compare 3 3 3 3 3 3 3 Section 28 1 231 232 AND AND Compare 3 3 3 3 3 3 3 Section 28 2 233 AND AND Compare 3 3 3 3 3 3 3 Section 28 2 234 AND AND Compare 3 3 3 3 3 3 3 Section 28 2 235 236 AND AND Compare 3 3 3 3 3 3 3 Section 28 2 237 AND AND Compare 3 3 3 3 3 3 3 Section 28 2 238 AND AND Compare 3 3 3 3 3 3 3 Section 28 2 239 1 The instruction is provided in the FX2N FX2NC ...

Page 70: ...oordinate by Point Data 3 3 Section 29 4 260 DABIN Decimal ASCII to BIN Conversion 3 5 Section 29 5 261 BINDA BIN to Decimal ASCII Conversion 3 5 Section 29 6 262 to 268 269 SCL2 Scaling 2 Coordinate by X Y Data 3 3 Section 29 7 1 The instruction is provided in the FX2N FX2NC Series Ver 3 00 or later 2 The function is changed in the FX3UC Series Ver 1 30 or later 4 The function is changed in the F...

Page 71: ...ed Processing 2 280 HSCT High Speed Counter Compare With Data Table 3 3 Section 32 1 281 to 289 Extension File Register Control 290 LOADR Load From ER 3 3 Section 33 1 291 SAVER Save to ER 3 3 Section 33 2 292 INITR Initialize R and ER 3 3 Section 33 3 293 LOGR Logging R and ER 3 3 Section 33 4 294 RWER Rewrite to ER 3 3 Section 33 5 295 INITER Initialize ER 3 3 Section 33 6 296 to 299 1 The instr...

Page 72: ...The setting can be changed between the latched battery backed type and the non latched type using parameters Section 4 3 Latched battery backed type variable M500 to M1023 524 points Latched battery backed type fixed M1024 to M7679 6656 points Special type 2 M8000 to M8511 512 points Chapter 36 State relay Initial state general type variable S0 to S9 10 points The setting can be changed between th...

Page 73: ...tery backed type and the non latched type using parameters Section 4 6 Latched battery backed type up counter 16 bits variable C100 to C199 100 points General type bi directional counter 32 bits variable C200 to C219 20 points 2 147 483 648 to 2 147 483 647 counts The setting can be changed between the latched battery backed type and the non latched type using parameters Latched battery backed typ...

Page 74: ...e registers in units of 500 points Special type 16 bits 2 D8000 to D8511 512 points Chapter 36 Index type 16 bits V0 to V7 Z0 to Z7 16 points Section 4 10 Extension register Extension file register Extension register 16 bits R0 to R32767 32768 points latched battery backed Section 4 9 Extension file register 16 bits ER0 to ER32767 32768 points Available only while a memory cassette is mounted Poin...

Page 75: ...80M When extended 256 points in total Input X000 to X007 8 points X000 to X017 16 points X000 to X027 24 points X000 to X037 32 points X000 to X047 40 points X000 to X367 248 points Output Y000 to Y007 8 points Y000 to Y017 16 points Y000 to Y027 24 points Y000 to Y037 32 points Y000 to Y047 40 points Y000 to Y367 248 points The PLC outputs signals to external loads through output terminals Contac...

Page 76: ...nputs are read during the input processing in the next cycle Even if an input contact changes from ON to OFF or from OFF to ON its ON OFF status is judged after the response delay approximately 10 ms caused by the input filter When the input filter of an input terminal is the digital type its value can be overwritten by a sequence program Program processing The PLC reads the ON OFF status of each ...

Page 77: ...ows auxiliary relay M numbers Numbers are assigned in decimal 1 This area is not latched battery backed It can be changed to latched battery backed area by setting parameters 2 This area is latched battery backed It can be changed to non latched non battery backed area by setting parameters 3 The characteristics of latch battery backup cannot be changed by parameters When simple N N link or parall...

Page 78: ...ed even after X000 has turned OFF by power failure If an NC contact of X001 is opened when the operation is restarted however M600 is deactivated The figure on the left shows a circuit by SET and RST instructions 1 Application example of latched battery backed type auxiliary relay In some cases the table should be restarted in the same direction as the direction selected just before power failure ...

Page 79: ...he start signal X000 turns ON the state relay S20 is set turned ON and the solenoid valve Y000 for moving down turns on When the lower limit switch X001 turns ON the state relay S21 is set turned ON and the solenoid valve Y001 for clamping turns on When the clamp confirmation limit switch X002 turns ON the state relay S22 is set turned ON When the operation proceeds to the next step the state rela...

Page 80: ...iven annunciator type state relays can be used as latched battery backed type state relays in sequence programs in the same way as general type state relays In the SFC programming mode in the FX PCS WIN E however S900 to S999 cannot be programmed as a processes flow in SFC diagrams M8002 Initial pulse FNC 040 ZRST S1000 S1200 0 S1000 to S1200 are initialized M8000 RUN monitor M8049 Y000 X000 FNC 4...

Page 81: ...s on 1 23 seconds after the coil is driven When the drive input X000 turns OFF or when the power is turned off the timer is reset and the output contact returns Retentive type When the drive input X001 of the timer coil T250 turns ON the current value counter for T250 adds and counts clock pulses of 100 ms When the counted value becomes equivalent to the set value K345 the output contact of the ti...

Page 82: ... in a subroutine or interrupt routine note that its output contact turns on when the first coil instruction is executed after the retentive timer has reached the set value 4 5 5 Details of timer operation and timer accuracy A timer except interrupt execution type starts counting when a coil is driven and its output contact turns on when the first coil instruction is executed after the timer has re...

Page 83: ...r Flicker timer In addition the timer time can be set according to the switch input time by the teaching timer instruction TTMR FNC 64 X001 T 5 Y000 T 5 K200 T5 20 sec X001 Y000 Y000 X001 X001 T 2 T 1 T 2 K10 K20 T 1 Y000 Y000 T 2 One operation cycle X001 T1 T2 T1 2 sec 1 sec 2 sec X000 FNC 65 STMR T 10 K100 M 0 S m D X000 M 0 M 1 M 3 10 sec 10 sec 10 sec 10 sec 10 sec M 2 A value specified by m b...

Page 84: ...t 2 Use examples in applied instructions For the full use of timers as numeric devices refer to the explanation of applied instructions later 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 2 4 8 16 32 64 128 256 512 1024 2048 4096 8192 16384 b15 Sign 0 Positive number 1 Negative number 1 b0 High order Low order 16 bits Available numeric value range 16 bit timer 0 to 32 767 32 bit timer 2 147 483 648 to 2 147 4...

Page 85: ...32 bit bi directional counter Counting range 2 147 483 648 to 2 147 483 647 General type Latched battery backed type protected by battery against power failure General type Latched battery backed type protected by battery against power failure FX3U FX3UC PLC C 0 to C 99 100 points 1 C100 to C199 100 points 2 C200 to C219 20 points 1 C220 to C234 15 points 2 Item 16 bit counter 32 bit counter Count...

Page 86: ...ed by a data register number For example when D10 is specified and the contents of D10 are 123 it is equivalent to K123 If data beyond the set value is written to the current value register by MOV instruction etc the OUT coil turns ON and the current value register becomes the set value when the next counting input is received In a latch type counter the current value output contact operation and ...

Page 87: ...n a latch type counter the current value output contact operation and reset status of the counter are latched battery backed by the battery built in the PLC For the details of backup method against power failure refer to Section 2 6 A 32 bit counter can be used as a 32 bit data register 32 bit counters cannot be handled as target devices in 16 bit applied instructions If data beyond the set value ...

Page 88: ...n the counter is handled as a device storing 16 bit or 32 bit data in the same way as data register A 32 bit counter is handled as 32 bit data 1 Structure of register storing current value of counter 1 16 bit 2 32 bit X003 C200 K43 210 Constant decimal constant 2 147 483 648 to 2 147 483 647 43210 counts X001 FNC 12 DMOV K43210 D5 D6 X003 C200 D5 D6 Pairs of data registers are used for indirect sp...

Page 89: ...er FNC 12 MOV C 20 D 10 FNC 10 CMP K100 C 30 M 0 FNC 18 BCD C 10 K2Y000 FNC 22 MUL C 5 K 2 D4 D5 FNC 12 DMOV C200 D0 D1 FNC 11 DZCP K100 K20000 C200 M10 1 C20 current value is transferred to D10 1 Make sure to use 32 bit operation instructions for 32 bit counters A decimal integer 100 is compared with C30 current value and the result is output to M0 to M2 The contents of C10 current value are conv...

Page 90: ... to X007 are used for high speed counter inputs An encoder 1 adopting the output method shown in the table below can be connected depending on the connected terminal Encoders adopting the voltage output method and absolute encoders cannot be connected to high speed counter inputs For the wiring refer to the Hardware Manual of the main unit 1 A rotary encoder adopting the output method shown above ...

Page 91: ...bining a special auxiliary relay M8388 M8198 or M8199 For the method to use a 2 phase 2 input 4 edge count counter refer to Subsection 4 7 8 5 The external reset input is usually reset by turning ON but can be changed to be reset by turning OFF by combining special auxiliary relays M8388 and M8389 For the method to change the logic of the external reset input refer to Subsection 4 7 6 6 The counte...

Page 92: ...counters in FX3U and FX3UC PLCs assignment of input terminals switches when special auxiliary relays are used together In this section such high speed counter devices are classified as shown below Note that description as OP is not available in programming Normal device number Changed over device number Normal device number Changed over device number C244 C244 OP C248 C248 OP C245 C245 OP C253 C25...

Page 93: ...start input 1 Cautions on wiring should be considered for these high speed counters For the wiring refer to the Hardware Manual of the main unit 2 Hardware counters are switched to software counters when a comparison set reset instruction for high speed counter DHSCS DHSCR DHSZ or DHSCT is combined The counter C253 is switched to a software counter when the logic of the external reset input signal...

Page 94: ... is executed C235 is reset The counting direction of the counters C235 to C245 is switched to down counting or up counting when M8235 to M8245 turns ON or OFF C244 immediately starts counting when the input X006 turns ON while X012 is ON The counting input is X000 In this example the set value is indirectly specified by the contents of data registers D1 and D0 A high speed counter can be reset usi...

Page 95: ... ON C249 immediately starts counting when the input X006 turns ON The up counting input is X000 and the down counting input is X001 A high speed counter can be reset by X011 in a sequence as shown in the figure but it is immediately reset without any program when X002 is closed So a program with X011 is not necessary The down up counting operation of C246 to C250 can be monitored by checking the O...

Page 96: ...y 1 in the main program if HCMOV instruction is used just before comparison instruction CMP or ZCP or comparison contact instruction 1 When it is necessary to execute comparison at a timing that the current value of a high speed counter changes and to change an output contact Y use comparison instruction for high speed counter HSCS HSCR HSZ or HSCT 2 Using comparison instruction for high speed cou...

Page 97: ... C246 M8246 OFF ON C247 M8247 C248 M8248 C249 M8249 C250 M8250 2 phase 2 counting input C251 M8251 C252 M8252 C253 M8253 C254 M8254 C255 M8255 Device No Name Description M8388 Contact for changing function of high speed counter Changes the function of high speed counter M8389 Function switching device Switches the logic of the external reset input For details refer to Subsection 4 7 6 M8390 Switch...

Page 98: ...d with the following special auxiliary relays In a program put a special auxiliary relay just before a target counter Counter No When inverting logic of external reset input signal Description C241 to C245 C247 to C250 C252 to C255 The logic of the external reset input is inverted so that the counters are reset when the input turns OFF The logic is inverted for all target counters Counter No When ...

Page 99: ... the 2 phase 2 counting input counters C251 to C255 the edge count is usually set to 1 By the programs shown in the table below the edge count is set to 4 Counter No When using 2 phase 2 counting input counter at edge count of 4 Description C251 1 edge count before change 4 edge count after change C252 C253 C253 OP C254 C255 M8000 M8198 C251 K A phase B phase 1 1 During forward rotation A phase B ...

Page 100: ...unters when used in the following condition In this case their maximum response frequency and total frequency are limited in the same way as other software counters Use M8380 to M8387 to check whether high speed counters are handled as hardware counters or software counters When DHSCS FNC 53 DHSCR FNC 54 DSHZ FNC 55 or DHSZ FNC280 instruction is used for a hardware counter number the hardware coun...

Page 101: ...o the previous page 1 When special analog adapters and FX3U FX3UC Series special function blocks units are not used 1 When an index register is added to a counter number specified in HSCS HSCR HSZ or HSCT instruction all hardware counters are switched to software counters 2 The high speed counters C244 OP and C245 OP can count up to 10 kHz Counter No Maximum response frequency Main unit FX3U 4HSX ...

Page 102: ... or HSCT instruction 1 When HSZ and HSCT instructions are not used When only HSCT instruction is used When only HSZ instruction is used When both HSZ and HSCT instructions are used Maximum response frequency kHz Total frequency kHz Maximum response frequency kHz Total frequency kHz Maximum response frequency kHz Total frequency kHz Maximum response frequency kHz Total frequency kHz 1 phase 1 count...

Page 103: ...struction using X000 and or X001 cannot be used As long as a counting pulse is not given the output contacts don t turn ON at all high speed counters even if the PLC executes an instruction in condition of present value set value By setting to ON or OFF an output coil OUT C in a high speed counter counting can be started or stopped Program this output coil in the main routine If this output coil i...

Page 104: ...re assigned in decimal 1 This area is not latched battery backed It can be changed to the latched battery backed area by setting parameters 2 This area is latched battery backed It can be changed to the non latched non battery backed area by setting parameters 3 The characteristics about latch battery backup cannot be changed using parameters 4 Data registers D1000 and later can be used as file re...

Page 105: ...er bits In the index type V handles high order bits and Z handles low order bits Two data registers or file registers can store a numeric value within the range from 2 147 483 648 to 2 147 483 647 In the case of 32 bit type when a data register or file register on the low order side example D0 is specified the subsequent number on the high order side example D1 is automatically occupied Either an ...

Page 106: ... data registers are backed up by the battery built in the PLC For the details of each backup method refer to Section 2 6 When using fixed latched battery backed type data registers as general type data registers provide the following reset circuit by RST or ZRST instruction at the head step in a program For file registers refer to Subsection 4 8 4 2 Special type data registers Data registers that ...

Page 107: ...ration examples in FNC 12 MOV instruction Timers and counters not in a program can be used as devices for storing 16 bit or 32 bit numeric values data registers As in the case of data registers when 16 bit timers or counters are used as 32 bit devices two timers or two counters example C1 and C0 store 32 bit numeric data One 32 bit counter example C200 can store 32 bit numeric data T 2 D 0 C 10 D ...

Page 108: ...lc turns off and ON or when the PLC mode switches from STOP to RUN When it is necessary to save data changed in the data memory using a sequence program update the file register area A to the changed values by the same number register update mode in BMOV FNC 15 instruction described later Difference between BMOV FNC 15 instruction and other instructions The table below shows difference regarding t...

Page 109: ...inside the data memory as shown in the figure on the left Write When X003 is set to ON while BMOV instruction direction reverse flag M8024 is ON the contents of a data register inside the data memory are written to the file register area inside the program memory as shown in the figure on the left When updating the contents of a file register in the same number update mode make sure that the file ...

Page 110: ...ntents of the file register area A inside the program memory are not read when the same number file register is not specified for the destination except the same number register update mode 1 When a file register is specified for the source and a data register is specified for the destination Batch transfer of data registers When X000 is set to ON the data register area B is read as shown in the f...

Page 111: ...e flash memory in every operation cycle of the PLC For preventing this make sure to use a pulse operation type instruction BMOVP It takes 66 to 132 ms to write data to one serial block 500 points in the flash memory Execution of the program is paused during this period Because the watchdog timer is not refreshed at this time it is necessary to take proper countermeasures such as insertion of WDT i...

Page 112: ...nted because they are stored in the flash memory inside a memory cassette 4 9 2 Data storage destination and access method Because the memory for storing data is different between extension registers and extension file registers the access method is different as shown in the table below Data storage destination Difference in the access method Extension register R latched battery backed type Extens...

Page 113: ...ended to specify an even device number for the low order side under consideration of the monitoring function of display units display modules and programming tools 4 9 4 Initialization of extension registers and extension file registers The contents of extension registers are backed up by the built in battery even when the power is turned OFF or when the PLC mode switches from STOP to RUN When ini...

Page 114: ... the set value 2 Extension registers in applied instruction Operation examples in FNC 12 MOV instruction Changing the current value of a counter The current value of the counter C2 is changed to the content of R5 Reading the current value of a timer or counter to an extension register The current value of the counter C10 is transferred to R4 Storing a numeric value to extension registers 200 decim...

Page 115: ... created data of one sector 2048 points to extension file registers ER 1 INITR FNC292 This instruction initializes extension registers R and extension file registers ER 1 in units of 2048 points 1 sector Use this instruction to initialize extension registers R and extension file registers ER 1 before starting to log data by LOGR instruction LOGR FNC293 This instruction logs specified data and writ...

Page 116: ... stored in the flash memory inside a memory cassette execute the data clear operation by a sequence program or GX Developer to initialize them 1 When initializing extension file registers by a program a Initializing only extension file registers in units of a sector Ver 1 30 or later Example When initializing ER0 to ER4095 initializing two sectors starting from ER0 b Initializing extension registe...

Page 117: ...peration 4 9 8 Registration of data of extension registers and extension file registers This subsection explains the operating procedure of GX Developer Ver 8 23Z or later For the details of operating procedures of GX Developer refer to the manual of GX Developer 1 Starting up GX Developer GPPW Click Start All Programs MELSOFT Application GX Developer in the Windows 2 Setting the PLC model Set the...

Page 118: ... R and Extension File Register ER 3 Setting the data 1 Right click Device memory in the project data list to open the submenu 2 Click New on the submenu to display New dialog box 3 Click the OK button to display the dialog box for confirmation 4 Click the Yes button 1 In some versions of GX Developer FX3UC is offered as the PLC type FX3U C 1 ...

Page 119: ...etail 5 Specified the Device Constant 6 Before Programming 7 Basic Instruction 8 FNC00 FNC09 Program Flow 9 FNC10 FNC19 Move Compare 10 FNC20 FNC29 Arith Logic Operation 5 Input a device number to be set to Device Label and click the Display button 6 Select the data type to be set in two selection boxes on the right side of the Display button 7 Input data to each device or character string accordi...

Page 120: ...repared device memory name under Device memory 3 Click Device data tab and add Ext file register to target devices In the default setting Ext file register is not included in targets of reading writing For adding it click the blank space on the left side of Ext file register to change it into In GX Developer Ver 8 18U or later the range of extension file registers to be written can be specified 1 ...

Page 121: ... or handling a numeric value outside the 16 bit range Index type FX3U FX3UC PLC V0 V to V7 Z0 Z to Z7 16 points 1 V 16 bits Z 16 bits V0 to V7 8 points Z0 to Z7 8 points V0 high order side Z0 low order side V1 high order side Z1 low order side V2 high order side Z2 low order side V3 high order side Z3 low order side V4 high order side Z4 low order side V5 high order side Z5 low order side V6 high ...

Page 122: ... K30V0 is specified an instruction is executed for a decimal value K35 30 5 Octal devices X Y KnX and KnY For example when Z1 K8 is specified and X0Z1 is executed an instruction is executed for the device number X10 X0 8 addition of octal value In the indexing for a device whose device number is handled in octal a numeric value converted into octal is added for the contents of V and Z also Accordi...

Page 123: ... refer to Chapter 32 1 Applied instructions using pointers for branch P CJ FNC 00 conditional jump CALL FNC 01 call subroutine Role of pointer P63 for jump to the END step P63 is a special pointer for jumping to the END step when the CJ FNC 00 instruction is executed Note that a program error will accur when P63 is programmed as a label Refer to 5 Label unnecessary for the pointer P63 in Section 8...

Page 124: ...en assigning functions there should be no overlap between those input terminals For example when the input interrupt pointer I001 is used X000 is occupied As a result C235 C241 C244 C246 C247 C249 C251 C252 and C254 input interrupt pointer I000 pulse catch contact M8170 and SPD instruction using X000 cannot be used Delay function of input interrupt This input interrupt has a function to delay the ...

Page 125: ...e timer interrupt time is set to 9 ms or less the timer interrupt processing may not be executed at an accurate cycle in the following cases When the processing time of the interrupt program is long When an instruction requiring long processing time is used in the main program Input No Interrupt cycle ms Interrupt disabling flag I6 An integer in the range from 1 to 99 is put in portion of the poin...

Page 126: ...rs 1 Cleared when the PLC mode switches from RUN to STOP Pointer No Interrupt disabling flag Pointer No Interrupt disabling flag I010 M8059 1 I040 M8059 1 I020 I050 I030 I060 Step 0 I620 Pointer for interrupt Interrupt routine Interrupt is enabled Main program is finished Main program Interrupt at every 20 ms Interrupt return FNC 04 EI FNC 06 FEND FNC 03 IRET END FEND indicates the end of the main...

Page 127: ... FNC 04 EI FNC 53 DHSCS K1000 C255 FNC 03 IRET END Step 0 C255 I010 Interrupt pointer number is specified FNC 06 FEND Interrupt routine interrupt program I010 Pointer for interrupt Counter interrupt is specified Interrupt return K2 147 483 647 Enable interrupt after EI instruction and describe the main program Drive the coil of a high speed counter and specify an interrupt pointer in DHSCS FNC 53 ...

Page 128: ...rands and instruction operations in applied instructions constant H 3 Binary numbers BIN For a timer counter or data register a numeric value is specified in decimal or hexadecimal as described above But all of these numeric values are handled in the binary format inside PLCs When these devices are monitored in peripheral equipment they are automatically converted into the decimal format as shown ...

Page 129: ... in floating point operations Binary integers are handled inside PLCs In division of integers an answer 40 3 13 1 is obtained for example In square root extraction operations decimal points are rounded off In FX3U and FX3UC PLCs floating point operations are available to achieve higher accuracy in such operations Decimal number DEC Octal number OCT Hexadecimal number HEX Binary number BIN BCD 0 0 ...

Page 130: ...of floating point can monitor binary floating point real number when it is converted into scientific notation real number 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 But internal operations are executed using binary floating point real number Scientific notation real number i...

Page 131: ... the set value of timers and counters and numeric values in operands in applied instructions Example K1234 The decimal constant specification range is as follows When word data 16 bits is used K 32768 to K32767 When two word data 32 bits is used K 2 147 483 648 to K2 147 483 647 5 2 2 Constant H hexadecimal number H indicates a hexadecimal number and is mainly used to specify numeric values in ope...

Page 132: ...haracter string data stored in word devices Example of data which can be Example of data which cannot be recognized as character string data recognized as character string data 2 Character string data stored in bit devices with digit specification Example of data which can be Example of data which cannot be recognized as character string data recognized as character string data 2nd character 4th c...

Page 133: ...gits specified for bit devices is K1 to K3 or K1 to K7 in a 16 bit or 32 bit operation the insufficient high order bits are always regarded as 0 It means that such data is always positive Two digit BCD data expressed by X004 to X013 is converted into binary data and then transferred to D0 A bit device number can be specified arbitrarily but it is recommended to set the least significant digit to 0...

Page 134: ...f Buffer Memory U G A buffer memory BFM of a special function block or special extension unit can be specified directly BFM is 16 bit or 32 bit word data and is mainly used for operands in applied instructions For specifying a BFM specify the unit number U of a special function block or special extension unit and the BFM number G consecutively Example U0 G0 Indicates the BFM 0 in the special funct...

Page 135: ...indexed Cautions 1 32 bit counters and special auxiliary relays cannot be indexed with index registers 2 It is not permitted to use 16 bit counters as 32 bit counters by executing indexing 3 When an octal device number of X or Y is indexed with an index register the contents of the index register are converted into octal and then added to the device number For example when the value of an index re...

Page 136: ...ht Transfer K0 or K10 to the index register V3 in advance When X001 is set to ON D 0 0 D0 is realized if V3 is 0 and K500 is transferred to D0 When X001 is set to ON D 0 10 D10 is realized if V3 is 0 and K500 is transferred to D10 2 indexing operands in 32 bit instructions In a 32 bit instruction it is necessary to specify also a 32 bit index register in the instruction When an index register Z Z0...

Page 137: ...r U0 G0Z0 is valid but U0Z0 G0 is invalid 5 Indexing in bit digit specification It is not permitted to index n in Kn used for digit specification K4M0Z0 is valid but K0Z0M0 is invalid 6 Indexing of I O relays octal device numbers When octal device numbers of X Y KnX and KnY are indexed with index register the contents of an index register are converted into octal and then added to the device numbe...

Page 138: ...nsfer destination in MOV instruction is indexed with the index register V6 as shown in the figure on the right Transfer K0 or K20 to the index register V6 in advance When X005 is set to ON K 6 0 K6 is realized if V6 is 0 and K6 is transferred to D10 When X005 is set to ON K 6 20 K26 is realized if V6 is 20 and K26 is transferred to D10 X004 K0 V6 K0 V6 X004 K20 V6 K20 V6 X005 K6V6 D10 V6 0 K6 K6 0...

Page 139: ...ation 6 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 6 1 How to Read Explanation of Instructions In this manual applied instructions are explained in the following form For the expression methods and basic rules for applied instructions read in advan...

Page 140: ...dicate an independent instruction not associated with the 16 bit or 32 bit type WDT FNC 07 Continuous lines on the upper left side indicates that 16 bit type is available D on the lower left side indicates that the 32 bit type is available MOV FNC 12 Dotted lines on the lower left side indicate that the 32 bit type does not exist Continuous lines on the upper left side indicate that only the 16 bi...

Page 141: ...ation of function and operation The function of each instruction is explained Cautions Cautions on using each instruction are described Errors Major errors that are possible to occur in each instruction are described For the details of errors refer to Chapter 37 Errors and Error Code List Program examples Concrete program examples using each instruction are described 1 Bit devices X Input relay X ...

Page 142: ...simplified and the number of steps can be saved depending on the contact configuration method 1 It is recommended to write a circuit with many serial contacts in an upper position 2 It is recommended to write a circuit with many parallel contacts in a left position 2 Program execution and programming order A sequence program is executed from top to bottom and from left to right Code the sequence i...

Page 143: ...st coil Y003 the image memory turns ON and the output Y004 turns ON also because the input X001 is ON In the second coil Y003 however the image memory is set to OFF because the input X002 is OFF Accordingly the actual output to the outside is Y003 OFF Y004 ON 2 Countermeasures against double outputs Double outputs double coils do not cause illegal input program error but the operation is complicat...

Page 144: ...circuit in which the current flows in the 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 2 Coil connection position Do not write a contact on the right side of a coil It is recommended to program a coil between contacts first The number of steps can be saved when a coil E between the contacts A and...

Page 145: ...r time than PLC cycle time Input filter response delay When the response delay of the input filter 10 ms is considered and the cycle time is supposed as 10 ms the ON duration and OFF duration should be at least 20 ms respectively Accordingly PLCs cannot handle input pulses at 25 Hz 1000 20 20 25 or more However the situation can be improved by special functions and applied instructions of PLCs Con...

Page 146: ...tructions In the table below indicates containment relationship and indicates that zones are partially overlapped Top line Left line MC MCR MC MCR octet Example 1 Example 2 CJ P EI DI FOR NEXT STL RET P SRET I IRET FEND END O FEND O END no FEND CJ P EI DI FOR NEXT STL RET quintet 2 inside one STL 1 1 Example 1 MC CJ P MCR Instruction in left line Instruction in top line Example 2 MC CJ MCR P Instr...

Page 147: ...ated by continuous lines is realized 3 Instructions having containment relationship can be combined except some combinations as follows 1 MC MCR cannot be used in FOR NEXT STL RET P SRET and I RET 2 STL RET cannot be used in FOR NEXT P SRET and I IRET 3 MC MCR FOR NEXT P SRET and I IRET cannot be interrupted by I IRET SRET FEND END etc The first FEND or END is valid and an intended program cannot ...

Page 148: ...hey are expressed as etc in the same way as source m n Operands not falling under source or destination are expressed as m and n When indexing is allowed and there are two or more such operands they are expressed as m1 m2 n1 n2 etc in the same way as source and destination In applied instructions the program step of the instruction part always occupies 1 step but each operand occupies 2 or 4 steps...

Page 149: ...and D For avoiding confusion it is recommended to specify an even device number which will be the low order side for an operand in a 32 bit instruction 32 bit counter C200 to C255 is regarded as 32 bits and cannot be used as an operand in a 16 bit instruction 2 Pulse operation type and continuous operation type Pulse operation type In the example shown in the figure on the right when X000 turns ON...

Page 150: ... are programmed together for applied instructions it is difficult to judge by the contents of which instruction executes which flag and it is disabled to normally activate each flag corresponding to each instruction For using flags in any positions other than just under applied instructions refer to the next page M8000 FNC 72 DSW X10 Y10 D0 K1 FNC 22 MUL D0 K10 D20 M8029 Execution is completed M0 ...

Page 151: ...ions When two or more applied instructions are programmed general flags turn ON or OFF when each applied instruction turns ON Accordingly when using a flag in any position other than just under an applied instruction set to ON or OFF another device just under the applied instruction and then use the contact of the device as the command contact M8000 FNC 72 DSW X10 Y10 D0 K1 FNC 22 MUL D0 K10 D20 M...

Page 152: ...p the stored data is updated in turn to the error code and step number of the new error These devices are set to OFF when errors are cleared When the PLC mode switches from STOP to RUN these devices are cleared instantaneously and then set to ON again if errors have not been cleared 2 Operation error latch 1 Compatible with the FX0 FX0S FX0N FX1 FX2 FX2C FX1S FX1N FX2N FX1NC and FX2NC Series When ...

Page 153: ...re driving the function extension flag and program EI instruction for enabling interrupt after turning OFF the function extension flag 6 5 5 Limitation in number of instructions Limitation in the number of instructions and limitation in simultaneous driving Some applied instructions can be used only up to the specified number of times When using above instructions beyond the allowable number of ti...

Page 154: ... FNC 59 PLSR FNC150 DSZR FNC151 DVIT FNC156 ZRN FNC157 PLSV FNC158 DRVI and FNC159 DRVA instructions at the same time for the same output number 2 High speed processing instructions In FNC 53 HSCS FNC 54 HSCR and FNC 55 HSZ instructions including FNC280 HSCT instruction make sure that up to 32 instructions are driven at the same time FNC280 HSCT instruction can be used only once Note that each of ...

Page 155: ...al logical operation of rising edge pulse X Y M S D b T C Section 7 5 LDF Load Falling Pulse Initial logical operation of falling trailing edge pulse X Y M S D b T C Section 7 5 AND AND Serial connection of NO normally open contacts X Y M S D b T C Section 7 3 ANI AND Inverse Serial connection of NC normally closed contacts X Y M S D b T C Section 7 3 ANDP AND Pulse Serial connection of rising edg...

Page 156: ...Final logical operation type coil drive Y M S D b T C Section 7 2 SET SET Set bit device latch ON Y M S D b Section 7 12 RST Reset Reset bit device OFF Y M S D b T C D R V Z Section 7 12 PLS Pulse Rising edge pulse Y M Section 7 11 PLF Pulse Falling Falling trailing edge pulse Y M Section 7 11 Master Control Instruction MC Master Control Denotes the start of a master control block Y M Section 7 9 ...

Page 157: ...ays M and 32 bit counters C cannot be indexed with index registers V and Z S2 State relays S and D b cannot be indexed with index registers V and Z Explanation of function and operation 1 LD instruction initial logical operation NO contact type Instruc tion Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer...

Page 158: ... LDI instructions When specifying a bit in data register input after a data register D number and then input a bit number 0 to F consecutively Only 16 bit data registers are available Specify a bit number as 0 1 2 9 A B F from the least significant bit Example In the example shown on the left LD contact is set to ON becomes conductive or OFF becomes non conductive by the bit 3 of D0 Errors When an...

Page 159: ...vice is used A device described in OUT instruction turns ON or OFF according to the driven contact status Parallel OUT instructions can be used consecutively as many times as necessary In the program example shown below OUT M100 and OUT M101 are parallel If two or more OUT instructions are executed for a same device number however the double output double coil operation is resulted Instruc tion Bi...

Page 160: ...d for the set value by MOV instruction DSW instruction or display unit before driving the timer or counter 3 Setting range of timers and counters The table below shows the set value range of timers and counters the actual timer constants and the number of program steps including the set value for OUT instruction Timer counter Setting range Value of K or current value of D or R Actual set value Num...

Page 161: ...ata register D A bit in data register D can be specified as a device used in OUT instruction When specifying a bit in data register input after a data register D number and then input a bit number 0 to F consecutively Only 16 bit data registers are available Specify a bit number as 0 1 2 9 A B F from the least significant bit Example In the example shown on the left the bit 3 of D0 turns ON or OFF...

Page 162: ...xed with index registers V and Z S2 State relays S and D b cannot be indexed with index registers V and Z Explanation of function and operation 1 AND instruction serial connection of NO normally open contacts Instruc tion Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C...

Page 163: ...r D A bit in data register D can be specified as a device used in AND and ANI instructions When specifying a bit in data register input after a data register D number and then input a bit number 0 to F consecutively Only 16 bit data registers are available Specify a bit number as 0 1 2 9 A B F from the least significant bit Example In the example shown on the left AND contact turns ON becomes cond...

Page 164: ...st program K30 X000 Y003 AND instruction LD AND OUT LD ANI OUT AND OUT SP LD ANI OUT 0000 0001 0002 0003 0004 0005 0006 0007 0010 0011 0012 X000 X001 Y003 X002 X003 Y004 X004 T0 K30 X005 T0 Y005 Contact connected in series X001 X002 Y004 ANI instruction X003 Contact connected in series ANI instruction T0 X004 AND instruction Contact connected in series Contact connected in series ...

Page 165: ...ormat For the number of instruction steps refer to Section 7 15 2 Applicable devices S1 Special auxiliary relays M and 32 bit counters C cannot be indexed with index registers V and Z S2 State relays S and D b cannot be indexed with index registers V and Z Explanation of function and operation 1 OR instruction parallel connection of NO normally open contacts Instruc tion Bit Devices Word Devices O...

Page 166: ... with index registers V and Z State relays S special auxiliary relays M 32 bit counters and D b cannot be indexed The index registers V0 to V7 and Z0 to Z7 are available for indexing When a used device is an input X or output Y the value of an index register V or Z is converted into an octal number and then added Example When the value of V0 is 10 OR contact is set to ON becomes conductive or OFF ...

Page 167: ...ister input after a data register D number and then input a bit number 0 to F consecutively Only 16 bit data registers are available Specify a bit number as 0 1 2 9 A B F from the least significant bit Example In the example shown on the left OR contact is set to ON becomes conductive or OFF becomes non conductive by the bit 3 of D0 Errors When an I O number used in OR or ORI instruction does not ...

Page 168: ...r Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P LDP 3 3 3 3 3 3 3 LDF 3 3 3 3 3 3 3 ANDP 3 3 3 3 3 3 3 ANDF 3 3 3 3 3 3 3 ORP 3 3 3 3 3 3 3 ORF 3 3 3 3 3 3 3 LDP Load Pulse Basic Instruction LDP Continuous Operation Pulse Single Operation Mnemonic Operation Condition LDF Load Falling...

Page 169: ...nd ORP instructions initial logical operation of rising edge pulse serial connection of rising edge pulse and parallel connection of rising edge pulse In the example shown above M0 or M1 is ON during only one operation cycle when X000 to X002 turn ON from OFF ON ON ON ON X000 X001 M0 0000 LDP X000 0002 ORP X001 0004 OUT M0 0005 LD M8000 0006 ANDP X002 0008 OUT M1 M8000 X002 M1 RUN monitor Timing c...

Page 170: ...ying a bit in data register input after a data register D number and then input a bit number 0 to F consecutively Only 16 bit data registers are available Specify a bit number as 0 1 2 9 A B F from the least significant bit Example In the example shown on the left LDP contact turns ON becomes conductive or OFF becomes non conductive when the bit 3 of D0 turns ON or OFF X000 X001 M0 M8000 X002 M1 R...

Page 171: ...m Flow 9 FNC10 FNC19 Move Compare 10 FNC20 FNC29 Arith Logic Operation 4 Output drive side The following two circuits offer a same operation In each circuit M6 is ON during only one operation cycle when X010 turns ON from OFF In each circuit MOV instruction is executed only once when X020 turns ON from OFF X010 M6 X010 PLS M6 Operation cycle X010 M 6 OUT instruction Pulse instruction Operation cyc...

Page 172: ...3 detect the rising edge of M0 Because of LD instruction the contact 4 is conductive while M0 is ON M2800 to M3071 From M2800 driven by X000 the program is divided into the upper block block A and the lower block block B In each of the blocks A and B only the first contact which detects the rising or falling edge is activated Because of LD instruction the contact in the block C is conductive while...

Page 173: ...atus is same as the time when the instruction was executed last the instruction turns OFF 2 Cautions on write during RUN 1 Instructions for falling edge pulse When write during RUN is completed for a circuit including an instruction for falling edge pulse LDF ANDF or ORF instruction the instruction for falling edge pulse is not executed without regard to the ON OFF status of the target device of t...

Page 174: ...circuits which can be connected by ORB instructions in the case of appropriate program shown above Though ORB instructions can be used at one time note that the repeated use of LD or LDI instruction is limited to 8 or less in the case of inappropriate program shown above Instruc tion Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Numbe...

Page 175: ...tion serial connection of multiple parallel circuits Caution There is no limitation in the number of ANB instruction Though ANB instructions can be used at one time note that the repeated use of LD or LDI instruction is limited to 8 or less in the same way as ORB instruction Instruc tion Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real N...

Page 176: ...r Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P MPS There are no applicable devices MRD There are no applicable devices MPP There are no applicable devices Memory Point Store MPS Basic Instruction 1 step MPS Continuous Operation Pulse Single Operation Mnemonic Operation Condition MRD Memory Read Basic Instruction 1...

Page 177: ...ves the currently stored result Use MPS instruction to store the intermediate result of operation and then drive the output Y002 Use MRD instruction to read the stored data and then drive the output Y003 MRD instruction can be programmed as many times as necessary In the final output circuit use MPP instruction instead of MRD instruction MPP instruction reads the stored data described above and th...

Page 178: ...4 Y002 Y003 X005 MPS MPP MPP X006 X007 Y004 Y005 X010 MPS MRD Y006 X011 MRD Y007 X012 MPP 0000 LD X000 0001 AND X001 0002 0003 AND X002 0004 OUT Y000 0005 0006 OUT Y001 0007 LD X003 0008 0009 AND X004 0010 OUT Y002 0011 0012 AND X005 0013 OUT Y003 0014 LD X006 0015 0016 AND X007 0017 OUT Y004 0018 0019 AND X010 0020 OUT Y005 0021 0022 AND X011 0023 OUT Y006 0024 0025 AND X012 0026 OUT Y007 MPS MPP...

Page 179: ...Y000 X002 MPS X003 Y001 X004 X005 X006 X007 Y002 Y003 X010 X011 MRD MPP 0000 LD X000 0001 0002 LD X001 0003 OR X002 0004 ANB 0005 OUT Y000 0006 0007 LD X003 0008 AND X004 0009 LD X005 0010 AND X006 0011 ORB 0012 ANB 0013 OUT Y001 0014 0015 AND X007 0016 OUT Y002 0017 LD X010 0018 OR X011 0019 ANB 0020 OUT Y003 MPS MRD MPP Circuit program List program X000 X001 X002 Y000 Y001 MPP X003 X004 X005 Y00...

Page 180: ...n be programmed easily without MPS instruction X000 X001 X002 X003 X004 Y000 Y001 Y002 Y003 Y004 MPS MPS MPS MPS MPP MPP MPP MPP 0000 LD X000 0001 0002 AND X001 0003 0004 AND X002 0005 0006 AND X003 0007 0008 AND X004 MPS MPS MPS MPS 0009 OUT Y000 0010 0011 OUT Y001 0012 0013 OUT Y002 0014 0015 OUT Y003 0016 0017 OUT Y004 MPP MPP MPP MPP X004 X000 X001 X002 X003 0000 LD X000 0001 OUT Y004 0002 AND...

Page 181: ... instruction is executed the bus line is moved to a position after MC contact Drive instructions connected to the bus line after MC contact execute each operation only when MC instruction is executed and do not execute the operation when MC instruction is not executed In the program example below the instructions from MC to MCR are executed as they are while the input X000 is ON However while the ...

Page 182: ...n Three step instruction Write MCR N0 instruction Circuit program List program X000 MC N 0 M100 N 0 M100 X001 Y000 X002 Y001 MCR N 0 X003 MC N 0 M150 N 0 M150 X004 Y002 X005 Y003 MCR N 0 0000 LD X000 0001 MC N000 SP M100 0004 LD X001 0005 OUT Y000 0006 LD X002 0007 OUT Y001 0008 MCR N000 Two step instruction Three step instruction When not adopting the nesting structure use N0 again There is no li...

Page 183: ...rogramming MCR N6 and MCR N7 the nest level is returned to 5 at one time Available nest levels are from N0 to N7 eight layers B A C B While X000 is OFF A N 1 N 2 X000 MC N 0 M100 N 0 M100 X001 Y000 X002 MC N 1 M101 N 1 M101 X003 Y001 X004 MC N 2 M102 N 2 M102 X005 Y002 MCR N 2 X006 Y003 MCR N 1 X007 Y004 MCR N 0 X010 Y005 N 0 N 1 N 2 N 0 D C While X002 is OFF While X004 is OFF Circuit program Leve...

Page 184: ...uction is used in a complicated circuit containing ORB and ANB instructions the operation range of INV instruction is as shown in the figure below INV instruction inverts the operation result after LD LDI LDP or LDF instruction located before INV instruction Accordingly if INV instructions are used inside ORB and ANB instructions blocks after LD LDI LDP or LDF instruction seen from each INV instru...

Page 185: ...the number of instruction steps refer to Section 7 15 2 Applicable devices S Except special auxiliary relays M Explanation of function and operation 1 PLS instruction rising edge pulse In the figure above M0 is ON during only one operation cycle when X000 changes from OFF to ON 2 PLF instruction falling trailing edge pulse In the figure above M1 is ON during only one operation cycle when X000 chan...

Page 186: ... is not executed without regard to the ON OFF status of the operation condition device It is necessary to set to ON the target device or operation condition device once and then set it to OFF for executing the instruction for falling edge pulse 2 Instructions for rising edge pulse When write during RUN is completed for a circuit including an instruction for rising edge pulse the instruction for ri...

Page 187: ...n clears the current value of a timer T counter C data register D extension register R or index register V Z RST instruction can be used to clear to 0 the contents of a data register D or index register V Z The same result can be obtained by MOV instruction which transfers the constant K0 RST instruction can be used also to reset the current value and return the contact of retentive type timers T2...

Page 188: ... phase 1 input counters C235 to C245 use special auxiliary relays M8235 to M8245 for specifying the counting direction X010 in ON status Specifies down counting X010 in OFF status Specifies up counting When X011 turns ON the output contact of the counter CUUU is returned and the current value of the counter CUUU is reset to 0 In counters with reset input C241 C242 the same situation is achieved by...

Page 189: ...the value of an index register V or Z is converted into octal and then added Example When Z0 is 20 Y024 turns ON or OFF 4 Bit specification of a data register D A bit in data register D can be specified as a device used in SET or RST instruction When specifying a bit in data register input after a data register D number and then input a bit number 0 to F consecutively Only 16 bit data registers ar...

Page 190: ...ns 1 Instruction format 2 Applicable devices Explanation of function and operation 1 NOP instruction no operation or null step NOP instruction specifies no operation If NOP operation is written in the middle of a program PLCs ignore it in executing the program When an existing program is replaced with NOP instructions it means that former instructions are deleted Instruc tion Bit Devices Word Devi...

Page 191: ...ps after END instruction If END instruction is not written at the end of a program PLCs execute the program until the final step and then execute the output processing At the first execution after the PLC mode was changed from STOP to RUN PLCs start from END instruction When END instruction is executed the watchdog timer which checks the operation cycle is refreshed Caution Do not write END instru...

Page 192: ... 2 2 2 2 3 M3584 to M7679 3 3 3 3 3 3 4 S0 to S1023 1 2 2 2 2 S1024 to S4095 2 2 2 2 2 T0 to T191 T200 to T245 1 3 2 2 T192 to T199 T246 to T511 1 3 2 2 C0 to C199 1 3 2 2 C200 to C255 1 5 2 2 Special auxiliary relays M8000 to M8255 1 2 2 2 2 Special auxiliary relays M8256 to M8511 2 2 2 2 2 Bit devices with index X000 to X357 3 Y000 to Y357 3 3 3 3 3 M0 to M7679 3 3 3 3 3 T0 to T511 3 4 S0 to S40...

Page 193: ...provide instructions mainly related to control flow of sequence programs such as conditional program execution and priority processing FNC No Mnemonic Symbol Function Reference 00 CJ Conditional Jump Section 8 1 01 CALL Call Subroutine Section 8 2 02 SRET Subroutine Return Section 8 3 03 IRET Interrupt Return Section 8 4 04 EI Enable Interrupt Section 8 5 05 DI Disable Interrupt Section 8 6 06 FEN...

Page 194: ...ting the label number for the jump destination n 1 to 4095 P63 jumps to END instruction Pointer number Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 P FNC 00 CJ 16 bit Instruction 3 steps CJ CJP Continuous Operation Pulse ...

Page 195: ...er number step than CJ instruction However note that a watchdog timer error occurs when the scan time exceeds 200 ms default setting 3 Jumping to one label from two or more CJ instructions When the pointer number in operands is same and there is one label the following operation is caused When X020 turns ON the program execution jumps from CJ instruction corresponding to X020 to the label P9 When ...

Page 196: ...t be shared by CALL instruction and CJ instruction 7 Unconditional jump if the command contact is normally ON Because M8000 is normally ON while a PLC is operating unconditional jump is specified when M8000 is used in the following example Label P 63 FNC 00 CJ P 63 END Do not program P63 X000 M8000 K10 FNC 01 CALLP C0 X001 P15 FNC 06 FEND RUN monitor normally ON FNC 02 SRET P15 Label User program ...

Page 197: ...stant 6 Before Programming 7 Basic Instruction 8 FNC00 FNC09 Program Flow 9 FNC10 FNC19 Move Compare 10 FNC20 FNC29 Arith Logic Operation Program example 1 When jump is necessary after the OFF processing In one operation cycle after X023 changed ON from OFF CJ P7 instruction becomes valid By using this method jump can be executed after all outputs between CJ P7 instruction and the label P7 turn OF...

Page 198: ...alue is valid Operation of the routine timers T192 to T199 A routine timer continues its operation even if it is jumped after the coil is driven and the output contact is activated Operation of the high speed counters C235 to C255 A high speed counter continues its operation even if it is jumped after the coil is driven and the output contact is activated When each input changes during jump in the...

Page 199: ...counter C0 remains reset Accordingly the current value of C0 remains 0 even if X012 turns ON For clearing this reset status it is necessary to turn OFF RST instruction for the counter C0 Refer to the program shown below Timing chart Program example for activating a timer and counter even during jump Timing chart X010 K10 C0 RST C0 X012 P0 FNC 00 CJ Label P0 X011 Jump operation by CJ instruction dr...

Page 200: ... 3 1 Jump from outside MC to outside MC Jump is available arbitrarily 2 Jump from outside MC to inside MC Jump is executed without regard to the MC operation Even if M0 is OFF M0 is regarded as ON after P1 3 Jump from inside MC to inside MC Jump is disabled while M0 is OFF 4 Jump from inside MC to outside MC Jump is disabled while M0 is OFF Jump is executed while M0 is ON but MCR is invalid CJ P 4...

Page 201: ... 16 bit operation While the command input is ON CALL instruction is executed and the program execution jumps to a step with a label Then a subroutine program with the label is executed When SRET FNC 02 instruction is executed the program execution returns to the step after CALL instruction At the end of the main program put FEND instruction Put a label P for CALL instruction after FEND instruction...

Page 202: ...l P 10 FNC 01 CALL P 10 FNC 06 FEND FNC 02 SRET END X000 Main program While X000 is ON the program execution jumps to a step with the label P10 Subroutine program When SRET instruction is executed after the subroutine program has executed the program execution returns to the original step 1 Label P 11 Label P 12 FNC 01 CALLP P 11 FNC 06 FEND FNC 01 CALL P 12 FNC 02 SRET FNC 02 SRET END Main progra...

Page 203: ...in a subroutine note that the output contact is activated when the first coil instruction or subroutine is executed after the timer reaches its set value 3 Countermeasures against latches of devices used in subroutines or interrupt routines Devices which were set to ON in a subroutine are latched in the ON status even after the subroutine is finished Refer to the program example shown below When R...

Page 204: ...NC 01 CALLP RST C0 X002 P0 FNC 06 FEND RST C0 FNC 02 SRET P0 RST Y007 Y007 is reset at an arbitrary timing The preceding RST C0 instruction is deactivated in the subroutine B M8001 RUN monitor normally OFF A Y007 X001 C0 K10 Execution of P0 is triggered by X000 X001 Current value of C0 1 2 3 Y007 is reset RST C0 Y007 Subroutine is executed 1 2 3 4 X002 Counter reset instruction is deactivated part...

Page 205: ...format 2 Set data 3 Applicable devices Explanation of function and operation When CALL instruction in the main program is executed the program execution jumps to a subroutine SRET instruction returns the program execution to the main routine Refer to Section 8 2 Operand type Description Data type There is no set data Oper and Type Bit Devices Word Devices Others System User Digit Specification Sys...

Page 206: ...unction refer to Chapter 35 Operand type Description Data type There is no set data Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P There are no applicable devices Function Interrupt No Description Reference Input interrupt I00 ...

Page 207: ... main program by IRET instruction The timer interrupt of the pointer I620 is executed at every timer time of 20 ms and the program execution is returned to the original main program by IRET instruction at every time The high speed counter interrupt of the pointer I010 is executed when the current value of a high speed counter becomes equivalent to a value specified by DHSCS FNC 53 instruction The ...

Page 208: ... Explanation of function and operation EI instruction is the independent type and does not require command drive contact For the interrupt function refer to Chapter 35 Operand type Description Data type There is no set data Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX...

Page 209: ...cable devices Explanation of function and operation DI instruction is the independent type and does not require command drive contact For the interrupt function refer to Chapter 35 Cautions Interrupts requests generated after DI instruction are processed after EI FNC 04 instruction is executed Operand type Description Data type There is no set data Oper and Type Bit Devices Word Devices Others Sys...

Page 210: ...ns to the step 0 FEND instruction is required in creating subroutine programs and interrupt programs 1 In the case of CJ instruction Operand type Description Data type There is no set data Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify...

Page 211: ...tion 2 When CALL or CALLP instruction is used Put a label after FEND instruction And the SRET instruction is required in every case 3 When CALL or CALLP instruction is used If FEND instruction is executed after CALL or CALLP instruction was executed and before SRET instruction is executed an error is caused 4 When FOR instruction is used If FEND instruction is executed after FOR instruction was ex...

Page 212: ...n the operation cycle is long insert WDT instruction in the middle of the program to avoid the watchdog timer error Related device Operand type Description Data type There is no set data Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K...

Page 213: ...he operation time may become longer and a watchdog timer error may occur 2 The watchdog timer time can be changed For the details of changing watchdog timer time refer to Subsection 36 2 2 By overwriting the contents of D8000 watchdog timer time the watchdog timer detection time initial value 200 ms can be changed By inputting the program shown below the sequence program after this insertion is mo...

Page 214: ...nual Basic Applied Instruction Edition 8 Program Flow FNC 00 to FNC 09 8 8 FNC 07 WDT Watchdog Timer Refresh 3 When FOR NEXT instruction is repeated many times Put WDT instruction between FOR and NEXT instructions FNC 08 FOR Program FNC 07 WDT K30000 FNC 09 NEXT ...

Page 215: ...t data 3 Applicable devices Explanation of function and operation For the details refer to NEXT FNC 09 instruction Related instruction FOR instruction and NEXT FNC 09 instruction are set as a pair in programming Operand type Description Data type Number of repetition of the loop between FOR and NEXT instructions K1 to K32767 A value from 32768 to 0 is handled as 1 16 bit binary Oper and Type Bit D...

Page 216: ... by the specified number of times steps after NEXT instruction are executed Related instruction NEXT instruction and FOR FNC 08 instruction are set as a pair in programming Operand type Description Data type There is no set data Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D ...

Page 217: ... is too long and a watchdog timer error may occur In such a case change the watchdog timer time or reset the watchdog timer For the details of changing the watchdog timer time refer to Subsection 36 2 2 For resetting the watchdog timer refer to WDT FNC 07 instruction 2 Examples of wrong programs The following programs are regarded as errors FOR 1st level FOR FOR NEXT NEXT NEXT 2nd level 3rd level ...

Page 218: ...e of D0Z D4 when Z is 4 is 6 the loop 2 is repeated 6 times When X010 is OFF When K1X000 is 7 the loop 1 is repeated 7 times When X010 is ON The program execution jumps to the pointer P22 and the loop 1 is skipped Number of times of repeating the loops 1 2 and 3 X010 ON X010 OFF 7 6 4 168 times 6 4 24 times 4 times 1 2 3 0 time 24 times 4 times X010 P 22 1 2 3 FNC 09 NEXT FNC 08 FOR K 4 FNC 08 FOR...

Page 219: ...ide fundamental data processing instructions such as data transfer and data comparison which are regarded as most important in applied instructions FNC No Mnemonic Symbol Function Reference 10 CMP Compare Section 9 1 11 ZCP Zone Compare Section 9 2 12 MOV Move Section 9 3 13 SMOV Shift Move Section 9 4 14 CML Complement Section 9 5 15 BMOV Block Move Section 9 6 16 FMOV Fill Move Section 9 7 17 XC...

Page 220: ...mber handled as comparison value 16 or 32 bit binary Date or device number handled as comparison source 16 or 32 bit binary Head bit device number to which comparison result is output Bit Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify ...

Page 221: ...ontrol Program examples 1 When comparing the current value of a counter If it is necessary to clear the comparison result when the instruction is not executed add the following contents under the above program 1 RST instruction 2 ZRST instruction S1 S1 S2 S2 D D D S1 S1 S2 S2 FNC 10 DCMP Even if the command input turns OFF and DCMP instruction is not executed 1 and 2 latch the status just before t...

Page 222: ...s lower comparison value 16 or 32 bit binary Data or device number handled as upper comparison value 16 or 32 bit binary Data or device number handled as comparison source 16 or 32 bit binary Head bit device number to which comparison result is output Bit Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter St...

Page 223: ...tion DZCP and DZCPP The lower comparison value 1 and upper comparison value 1 are compared with the comparison source 1 According to the result smaller within zone or larger either one among 1 and 2 turns ON Comparison is executed algebraically Example 125400 22466 1015444 S1 S2 S D D D FNC 11 ZCP Even if the command input turns OFF and ZCP instruction is not executed 1 and 2 latch the status just...

Page 224: ... the lower comparison value is smaller than the upper comparison value 2 When the lower comparison value is larger than the upper comparison value D S1 S2 S1 S2 M 3 M 4 M 5 X000 ZCP K100 K120 C30 M3 C30 M3 M4 M5 S1 S2 S D 99 100 119 120 121 X000 Turns ON in the case of K100 C30 Current value Turns ON in the case of K100 C30 Current value K120 Turns ON in the case of K120 C30 Current value S1 S2 X0...

Page 225: ...ry When specifying digits of a bit device K1X000 K1Y000 Operand Type Description Data Type Transfer source data or device number storing data 16 or 32 bit binary Transfer destination device number 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY Kn...

Page 226: ...s of a bit device K8X000 K8Y000 When a word device is specified 50 50 0 ON Command contact S D Before execution After execution K50 K0 D10 D50 K50 K50 FNC 12 MOV D10 D50 Transfer S D Command input S S D D D S S FNC 12 DMOV S D Command input 1 S S 1 D D ON ON X000 OFF X001 OFF ON X037 ON Y000 OFF ON Y001 OFF ON Y037 ON OFF Command contact S D Before execution After execution K8Y000 K8X000 Y37 to Y1...

Page 227: ...a bit device The program written by basic instructions shown on the right can be expressed using MOV instruction as shown below 4 When transferring 32 bit data Make sure to use DMOV instruction for transferring the operation result of an applied instruction such as MUL whose operation result is output in 32 bits and for transferring a 32 bit numeric value or transferring the current value of a hig...

Page 228: ...moved 16 bit binary m2 Number of digits to be moved 16 bit binary Word device number storing data whose digits are moved 16 bit binary n Head digit position of movement destination 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z ...

Page 229: ...e digits of 103 and 100 of are not affected even if data is transferred from 3 The composed data BCD is converted into binary and stored to 2 Extension function When M8168 is set to ON first and then SMOV instruction is executed conversion from binary to BCD is not executed Data is moved in units of 4 bits Program example The data on three digit digital switches are composed and stored as binary d...

Page 230: ...a Type Data to be inverted or word device number storing data 16 or 32 bit binary Word device number storing inverted data 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

Page 231: ...from a PLC Program examples 1 When receiving an inverted input The sequence program shown below can be written by CML instruction 2 When four bits are specified for a device with digit specification S S D D S S FNC 14 DCML 1 1 0 1 0 1 1 1 0 0 1 0 1 0 1 0 1 0 1 0 1 0 1 0 1 1 0 0 0 1 0 1 b31 b30 b29 b28 b27 b26 b25 to b7 b6 n5 b4 b3 b2 b1 b0 Sign bit 0 Positive 1 Negative Inverted data is transferre...

Page 232: ...to the number overlap status Operand Type Description Data Type Transfer source data or device number storing data 16 bit binary Transfer destination device number 16 bit binary n Number of transferred points including file registers n 512 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter Stri...

Page 233: ...ag M8024 1 for BMOV FNC 15 instruction data can be transferred in two directions in one program 1 M8024 is cleared when the PLC mode is changed from RUN to STOP Caution When specifying digits of bit devices specify a same number of digits for and BMOV direction inverse flag Transfer direction M8024 1 OFF D5 D10 D6 D11 D7 D12 M8024 1 ON D5 D10 D6 D11 D7 D12 X000 FNC 15 BMOVP D5 D10 K3 X001 M8024 BM...

Page 234: ...regard to file registers D1000 and later When restoring the power data registers set as file registers are automatically copied from the file register area A to the data register area B Instruction Contents of transfer Remarks BMOV instruction Can read from and write to the file register area A inside the program memory Other applied instructions Can read from and write to the data register area B...

Page 235: ...the PLC For preventing this make sure to use a pulse operation type instruction BMOVP so that the number of times of writing is reduced It takes 66 to 132 ms to write data of one serial block 500 points to the flash memory Execution of the program is paused during this period Because the watchdog timer is not refreshed at this time it is necessary to take proper countermeasures such as insertion o...

Page 236: ...e command input is ON the data of the transfer source does not change Operand Type Description Data Type Transfer source data or device number storing data 16 or 32 bit binary Head word device number of transfer destination Same data is transferred from the transfer source at one time 16 or 32 bit binary n Number of transfer points K1 n K512 H1 n H1FF 16 bit binary Oper and Type Bit Devices Word D...

Page 237: ...ary 2 32 bit operation DFMOV and DFMOVP The contents of 1 are transferred to n 32 bit devices starting from 1 The contents will be the same among all of n 32 bit devices If the number of points specified by n exceeds the device number range data is transferred within the possible range While the command input is OFF the transfer destination 1 does not change While the command input is ON the data ...

Page 238: ...re FNC 10 to FNC 19 9 7 FNC 16 FMOV Fill Move Program example 1 When writing specified data to two or more devices X000 FNC 16 FMOV K 0 D 0 K 5 n S D K 0 K 0 D 0 K 0 D 1 K 0 D 2 K 0 D 3 K 0 D 4 Before execution After execution K 3 K 0 K 5 K 0 K 65 K 0 K 7 K 0 K100 K 0 Values before execution are shown as examples S D ...

Page 239: ...a Type Device number storing data to be exchanged 16 or 32 bit binary Device number storing data to be exchanged 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 DXC...

Page 240: ...ach other Because this instruction works in the same way as SWAP FNC147 instruction use SWAP instruction when programming new exchange In a 32 bit operation high order 8 bits byte and low order 8 bits byte of each word device are exchanged for each other Error An operation error occurs in the following case The error flag M8067 turns ON and the error code is stored in D8067 When M8160 is ON and th...

Page 241: ...ransfers the converted BCD data to The data of can be converted if it is within the range from K0 to K9999 BCD The table below shows digit specification for and Operand Type Description Data Type Word device number storing the conversion source binary data 16 or 32 bit binary Word device number of the conversion destination binary coded decimal data 16 or 32 bit binary Oper and Type Bit Devices Wo...

Page 242: ...instructions When receiving the digital switch information in the binary coded decimal BCD format into a PLC use BIN FNC 19 instruction for converting BCD data into binary data When outputting data to the seven segment display unit handling binary coded decimal BCD data use BCD FNC 18 instruction for converting binary data into BCD data Errors In BCD or BCDP 16 bit type instructions an operation e...

Page 243: ...e 10 FNC20 FNC29 Arith Logic Operation Program examples 1 When the seven segment display unit has 1 digit 2 When the seven segment display unit has 2 to 4 digits 3 When the seven segment display unit has 5 to 8 digits FNC 18 BCD D0 K1Y000 X000 PLC FNC 18 BCD D0 K2Y000 X000 PLC Output destination In the case of 2 digits K2 In the case of 3 digits K3 In the case of 4 digits K4 K4 K3 K2 K1 FNC 18 DBC...

Page 244: ...K0 to K9999 BCD The table below shows digit specification for and Operand Type Description Data Type Word device number storing the conversion source binary coded decimal data 16 or 32 bit binary Word device number of the conversion destination binary 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Numb...

Page 245: ...tion is not required 2 Handling of BCD inputs and outputs Binary data is used in all operations in PLCs including arithmetic operations and increment and decrement instructions When receiving the digital switch information in the binary coded decimal BCD format into a PLC use BIN FNC 19 instruction for converting BCD data into binary data When outputting data to the seven segment display unit hand...

Page 246: ... 5 to 8 digits FNC 19 BIN K1X000 D0 X000 MOV instruction can be used instead PLC FNC 12 MOV K1X000 D0 X000 6 In the case of 2 digits K2 In the case of 3 digits K3 In the case of 4 digits K4 FNC 19 BIN K2X000 D0 PLC K4 K3 K2 K1 9 7 8 6 Digital switch input Output destination X000 PLC 9 7 8 6 5 3 4 2 K4 K3 K2 K1 K8 K7 K6 K5 FNC 19 DBIN K5X000 D0 X000 Digital switch input Output destination In the ca...

Page 247: ...ic operation instructions in the floating point format For the details refer to the explanation of each instruction For the floating point operation refer to Chapter 18 FNC No Mnemonic Symbol Function Reference 20 ADD Addition Section 10 1 21 SUB Subtraction Section 10 2 22 MUL Multiplication Section 10 3 23 DIV Division Section 10 4 24 INC Increment Section 10 5 25 DEC Decrement Section 10 6 26 W...

Page 248: ...t bit of each data indicates the sign positive 0 or negative 1 and data are added algebraically 5500 8540 3040 When a constant K is specified in 1 or 1 it is automatically converted into the binary format Operand type Description Data type Data for addition or word device number storing data 16 or 32 bit binary Data for addition or word device number storing data 16 or 32 bit binary Word device nu...

Page 249: ... a same device as the source and destination A same device number can be specified for both the source and the destination In this case note that the addition result changes in every operation cycle if a continuous operation type instruction ADD or DADD is used Device Name Description M8020 Zero ON When the operation result is 0 OFF When the operation result is other than 0 M8021 Borrow ON When th...

Page 250: ...0 every time X001 turns ON from OFF ADD P instruction is similar to INCP instruction described later except the contents shown in the table below ADD ADDP DADD or DADDP instruction INC INCP DINC DINCP instruction Flag zero borrow or carry Operates Does not operate Operation result 16 bit operation 1 32767 0 1 2 32767 32768 32767 1 2 1 0 32768 32 bit operation 1 2 147 483 647 0 1 2 2 147 483 647 2 ...

Page 251: ... The contents of 1 are subtracted from 1 in the binary format and the subtraction result is transferred to 1 The most significant bit of each data indicates the sign positive 0 or negative 1 and data are subtracted algebraically 5500 8540 14040 When a constant K is specified in 1 or 1 it is automatically converted into the binary format Operand type Description Data type Data for subtraction or wo...

Page 252: ...destination In this case note that the addition result changes in every operation cycle if a continuous operation type instruction SUB or DSUB is used Device Name Description M8020 Zero ON When the operation result is 0 OFF When the operation result is other than 0 M8021 Borrow ON When the operation result is less than 32768 in 16 bit operation or 2 147 483 648 in 32 bit operation OFF When the ope...

Page 253: ...rence between SUB instruction and DEC instruction caused by a program for subtracting 1 1 is subtracted from the contents of D0 every time X001 turns ON from OFF SUB P instruction is similar to DECP instruction described later except the contents shown in the table below D SUB instruction D DEC instruction Flag zero borrow or carry Operates Does not operate Operation result 16 bit operation 1 2 1 ...

Page 254: ...cally 5 8 40 When a constant K is specified in or it is automatically converted into the binary format Operand type Description Data type Data for multiplication or word device number storing data 16 or 32 bit binary Data for multiplication or word device number storing data 16 or 32 bit binary Head word device number storing the multiplication result 32 or 64 bit binary Oper and Type Bit Devices ...

Page 255: ...fied for 3 2 1 The result is obtained only for low order 32 bits and is not obtained for high order 32 bits Transfer the data to word devices once then execute the operation Cautions 1 Devices specified in In a 32 bit operation by DMUL or DMULP Z cannot be specified in 2 When monitoring the operation result in a programming tool Even if word devices are used the operation result 64 bits cannot be ...

Page 256: ... Edition 10 Arithmetic and Logical Operation FNC 20 to FNC 29 10 3 FNC 22 MUL Multiplication Program examples 1 16 bit operation 2 32 bit operation X000 D FNC 22 MUL D 0 D 2 D 4 S1 S2 D 0 D 2 D 5 D 4 8 9 72 X001 FNC 22 DMUL D 0 D 2 D 4 S1 S2 D D 1 D 0 D 3 D 2 D 7 D 6 D 5 D 4 1756 327 574 212 ...

Page 257: ...inder Two devices in total starting from are occupied to store the operation result quotient and remainder Make sure that these two devices are not used for another control When a constant K is specified as or it is automatically converted into the binary format Operand type Description Data type Data for division or word device number storing data dividend 16 or 32 bit binary Data for division or...

Page 258: ...sult The most significant bit of the quotient and remainder indicates the sign positive 0 negative 1 respectively The quotient is negative when either the dividend or divisor is negative The remainder is negative when the dividend is negative 2 Device specified as The remainder is not obtained when a bit device is specified with digit specification In a 32 bit operation by DSUB or DSUBP Z cannot b...

Page 259: ...is incremented in every operation cycle in a continuous operation type instruction 2 Flag operations 1 16 bit operation When 32767 is incremented by 1 the result is 32768 Flags zero carry and borrow are not activated at this time 2 32 bit operation When 2 147 483 647 is incremented by 1 the result is 2 147 483 648 Flags zero carry and borrow are not activated at this time Operand type Description ...

Page 260: ... Program example X010 M 1 X011 FNC 12 MOVP K 0 Z FNC 18 BCDP C 0Z K4Y000 FNC 24 INCP Z FNC 10 CMPP K 10 Z M 0 0 Z C 0Z K4Y000 BIN BCD Z 1 Z When Z is 10 M1 turns ON The current values of the counters C0 to C9 are converted into the BCD format and output to K4Y000 Z is cleared by the reset input X010 Every time X011 is set to ON the current values of C0 C1 C9 are output in turn ...

Page 261: ...esult is transferred to 1 Cautions 1 Flag operations 1 16 bit operation When 32768 is decremented by 1 the result is 32767 Flags zero carry and borrow are not activated at this time 2 32 bit operation When 2 147 483 648 is decremented by 1 the result is 2 147 483 647 Flags zero carry and borrow are not activated at this time Operand type Description Data type Word device number storing data to be ...

Page 262: ...xecuted in units of bit as shown in the table below 1 1 1 0 1 0 1 0 0 0 0 0 1 ON 0 OFF Operand type Description Data type Data used for logical product or word device number storing data 16 or 32 bit binary Data used for logical product or word device number storing data 16 or 32 bit binary Word device number storing the logical product result 16 or 32 bit binary Oper and Type Bit Devices Word Dev...

Page 263: ... is executed to the contents of 1 and 1 in units of bit and the result is transferred to 1 While the command input is OFF the data of the transfer destination 1 does not change While the command input is ON the data of the transfer source 1 1 do not change When a constant K is specified in the transfer source 1 1 it is automatically converted into the binary format The logical product operation is...

Page 264: ...xecuted in units of bit as shown in the table below 1 1 1 0 1 1 0 0 0 1 0 1 1 ON 0 OFF Operand type Description Data type Data used for logical sum or word device number storing data 16 or 32 bit binary Data used for logical sum or word device number storing data 16 or 32 bit binary Word device number storing the logical sum result 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others ...

Page 265: ...s executed to the contents of 1 and 1 in units of bit and the result is transferred to 1 While the command input is OFF the data of the transfer destination 1 does not change While the command input is ON the data of the transfer source 1 1 do not change When a constant K is specified in the transfer source 1 1 it is automatically converted into the binary format The logical sum operation is execu...

Page 266: ...is executed in units of bit as shown in the table below 1 1 0 0 0 0 1 0 1 0 1 1 1 ON 0 OFF Operand type Description Data type Data used for exclusive logical sum or word device number storing data 16 or 32 bit binary Data used for exclusive logical sum or word device number storing data 16 or 32 bit binary Word device number storing the exclusive logical sum result 16 or 32 bit binary Oper and Typ...

Page 267: ...o 1 While the command input is OFF the data of the transfer destination 1 does not change While the command input is ON the data of the transfer source 1 1 do not change When a constant K is specified in the transfer source 1 1 it is automatically converted into the binary format The exclusive logical sum operation is executed in units of bit as shown in the table below 1 1 0 0 0 0 1 0 1 0 1 1 1 O...

Page 268: ...then the result is stored in the original device Caution Note that the complement is obtained in every operation cycle in a continuous operation type instruction Operand type Description Data type Word device number which stores data for obtaining complement and will store the operation result The operation result will be stored in the same word device number 16 or 32 bit binary Oper and Type Bit ...

Page 269: ... When the most significant bit is 1 it is a negative value and its absolute value can be obtained by NEG instruction M 0 FNC 29 NEGP D 10 M8000 FNC 44 BON D 10 M 0 K 15 RUN monitor In BON ON bit check instruction M0 turns ON when the bit 15 b15 among b0 to b15 of D10 is 1 NEGP instruction is executed for D10 only when M0 turns ON D10 D10 X000 M 10 M 11 M 12 FNC 21 SUB D 10 D 20 D 30 FNC 21 SUB D 2...

Page 270: ...nction Reference 30 ROR Rotation Right Section 11 1 31 ROL Rotation Left Section 11 2 32 RCR Rotation Right with Carry Section 11 3 33 RCL Rotation Left with Carry Section 11 4 34 SFTR Bit Shift Right Section 11 5 35 SFTL Bit Shift Left Section 11 6 36 WSFR Word Shift Right Section 11 7 37 WSFL Word Shift Left Section 11 8 38 SFWR Shift write FIFO LIFO control Section 11 9 39 SFRD Shift read FIFO ...

Page 271: ...tion is valid Operand Type Description Data Type Word device number storing data to be rotated rightward 16 or 32 bit binary n Number of bits to be rotated n 16 16 bit instruction n 32 32 bit instruction 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX...

Page 272: ...or K8 32 bit instruction is valid examples K4Y010 or K8M0 Device Name Description M8022 Carry Turns ON when the bit shifted last from the lowest position is 1 D D Command input FNC 30 DRORP n D 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 Carry flag M8022 Low order Carry flag b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 Before shift b3 to b0 After the instruction is executed once High order 0 0 0 0 1 1 1...

Page 273: ...tion is valid Operand Type Description Data Type Word device number storing data to be rotated leftward 16 or 32 bit binary n Number of bits to be rotated n 16 16 bit instruction n 32 32 bit instruction 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX ...

Page 274: ...truction or K8 32 bit instruction is valid examples K4Y010 or K8M0 Device Name Description M8022 Carry Turns ON when the bit shifted last from the highest position is 1 D D Command input FNC 31 DROLP n D High order 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 Low order High order Low order Leftward rotation b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 Before shift b31 to b28...

Page 275: ...on Operand Type Description Data Type Word device number storing data to be rotated rightward 16 or 32 bit binary n Number of bits to be rotated n 16 16 bit instruction n 32 32 bit instruction 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM Kn...

Page 276: ...ription M8022 Carry Turns ON when the bit shifted last from the lowest position is 1 D D Before shift b3 Carry flag M8022 When M8022 is OFF 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 1 Carry flag M8022 Low order b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 After the instruction is executed once High order 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 Before shift b31 to...

Page 277: ...n Operand Type Description Data Type Word device number storing data to be rotated leftward 16 or 32 bit binary n Number of bits to be rotated n 16 16 bit instruction n 32 32 bit instruction 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS ...

Page 278: ...2 Carry Turns ON when the bit shifted last from the highest position is 1 D D Command input FNC 33 DRCLP n D Carry flag When M8022 is ON 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 0 Low order b15b14b13b12b11b10 b9 b8 b7 b6 b5 b4 b3 b2 b1 b0 After the instruction is executed once High order 1 1 1 1 0 0 0 0 0 0 0 0 1 1 1 1 b31b30b29b28b27b26b25b24b23b22b21b20b19b18b17b16 Before shift b27 to b0 High order 1 1 1...

Page 279: ...ice is transferred by n2 bits from the most significant bit 1 Instruction format 2 Set data 3 Applicable devices S D b cannot be indexed with index registers V and Z Operand Type Description Data Type Head bit device number to be stored to the shift data after rightward shift Bit Head bit device number to be shifted rightward Bit n1 Bit length of the shift data n2 n1 1024 16 bit binary n2 Number o...

Page 280: ...Caution Note that n2 bits are shifted every time the command input turns ON from OFF in SFTRP instruction but that n2 bits are shifted in each scan time operation cycle in SFTR instruction Error If the transfer source is equivalent to the shifted device an operation error occurs error code K6710 D S D Command input FNC 34 SFTRP n1 n2 D S 2 8 Before execution After execution 2 n2 in the case of n2 ...

Page 281: ...ice is transferred by n2 bits from the most significant bit 1 Instruction format 2 Set data 3 Applicable devices S D b cannot be indexed with index registers V and Z Operand Type Description Data Type Head bit device number to be stored to the shift data after leftward shift Bit Head bit device number to be shifted leftward Bit n1 Bit length of the shift data n2 n1 1024 16 bit binary n2 Number of ...

Page 282: ...w Caution Note that n2 bits are shifted every time the command input turns ON from OFF in SFTLP instruction but that n2 bits are shifted in each operation cycle in SFTL instruction Error If the transfer source is equivalent to the shifted device an operation error occurs error code K6710 D S D 8 2 n2 in the case of n2 3 n1 in the case of n1 9 1 Overflow data to be deleted 1 D 7 6 5 D 4 3 8 D 7 6 5...

Page 283: ...0 FNC150 FNC159 Positioning Control Program example conditional stepping of 1 bit data By setting X000 to X007 to ON in turn Y000 to Y007 are activated in turn If the order is wrong activation is disabled X000 S 0 M8046 S 1 S 7 M8000 X000 M8046 X001 X002 X000 FNC 35 SFTL M 0 S 0 K 8 K 1 M 0 Head data Data input FNC 12 MOV K2S 0 K2Y000 END S 7 to S 0 Y007 to Y000 Bit 1 of M0 is regarded as the head...

Page 284: ...s M100 Input data M101 to M117 octal number 15 step shift register 2 FX3U and FX3UC PLCs X000 X001 X002 OUT SFT RST M100 M117 data input shift input reset input LD OUT LD SFT LD RST Circuit program List program 0000 0001 0002 0003 0004 0005 X000 M100 X001 M100 X002 M100 X000 FNC 35 SFTLP M100 M101 K 15 K 1 X001 X002 FNC 40 ZRST M101 M115 M100 data input shift input reset input M101 to M115 decimal...

Page 285: ...n1 n2 3 shown below Operand Type Description Data Type Head device number to be stored to the shift data after rightward shift 16 bit binary Head word device number storing data to be shifted rightward 16 bit binary n1 Word data length of the shift data n2 n1 512 16 bit binary n2 Number of words to be shifted rightward n2 n1 512 16 bit binary Oper and Type Bit Devices Word Devices Others System Us...

Page 286: ... shifted in each operation cycle in WSFR instruction Error If the transfer source is equivalent to the shifted device an operation error occurs error code K6710 Program example 1 Shifting devices with digit specification S D 3 2 1 X 7 X 6 X 5 X 4 X 3 X 2 X 1 X 0 Y 17 Y 16 Y 15 Y 14 Y 13 Y 12 Y 11 Y 10 Y 7 Y 6 Y 5 Y 4 Y 3 Y 2 Y 1 Y 0 Make sure that the number of digits is equivalent Kn X000 FNC 36 ...

Page 287: ...rting from 3 shown below Operand Type Description Data Type Head device number to be stored to the shift data after leftward shift 16 bit binary Head word device number storing data to be shifted leftward 16 bit binary n1 Word data length of the shift data n2 n1 512 16 bit binary n2 Number of words to be shifted leftward n2 n1 512 16 bit binary Oper and Type Bit Devices Word Devices Others System ...

Page 288: ... 30 to FNC 39 11 8 FNC 37 WSFL Word Shift Left Caution Note that n2 words are shifted every time the drive input turns ON from OFF in WSFLP instruction but that n2 words are shifted in each operation cycle in WSFL instruction Error If the transfer source is equivalent to the shifted device an operation error occurs error code K6710 S D ...

Page 289: ...rst in first out FIFO and last in first out LIFO control 1 Instruction format 2 Set data 3 Applicable devices Operand Type Description Data Type Word device number storing data to be put in first 16 bit binary Head word device number in which data will be stored and shifted 2 n 512 16 bit binary n Number of data to be stored value for pointer added by 1 2 n 512 16 bit binary Oper and Type Bit Devi...

Page 290: ...ation type SFWRP instruction in programming 3 Data are stored from the right end in the same way and the number of stored data is specified by the contents of the pointer Related device For the carry flag use method refer to Subsection 6 5 2 Related instructions Caution 1 In the case of continuous operation type SFWR instruction Note that data are stored overwritten in each scan time operation cyc...

Page 291: ...t number is hexadecimal and up to 4 digits Up to 99 products can be stored in the warehouse 2 Program X020 FNC 12 MOVP K4X000 D256 FNC 38 SFWRP D256 D257 K100 X021 FNC 39 SFRDP D257 D357 K100 FNC 12 MOV D357 K4Y000 M8000 RUN monitor Button for request to take a product out of warehouse Button for request to put a product into warehouse The product number is input from X000 to X017 and transferred ...

Page 292: ...number of data stored in Operand Type Description Data Type Head word device number storing data The first word device works as the pointer and data is stored in 1 and later 16 bit binary Word device number storing data taken out first 2 n 512 16 bit binary n Number of stored data plus 1 1 2 n 512 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System Us...

Page 293: ...ce For the zero flag use method refer to Subsection 6 5 2 Related instructions Caution 1 Data after reading was executed The contents of n do not change by reading 2 In the case of continuous operation type SFRD instruction Data is read in turn in each scan time operation cycle but the contents of n do not change Program example Refer to the program example provided for SFWR FNC 38 instruction For...

Page 294: ...g special processing FNC No Mnemonic Symbol Function Reference 40 ZRST Zone Reset Section 12 1 41 DECO Decode Section 12 2 42 ENCO Encode Section 12 3 43 SUM Sum of Active Bits Section 12 4 44 BON Check Specified Bit Status Section 12 5 45 MEAN Mean Section 12 6 46 ANS Timed Annunciator Set Section 12 7 47 ANR Annunciator Reset Section 12 8 48 SQR Square Root Section 12 9 49 FLT Conversion to Floa...

Page 295: ...and ZRSTP Same type of devices from to are reset at one time When and are bit devices 1 OFF reset is written to the entire range from to at one time Operand type Description Data type Head bit or word device number to be reset at one time Specify same type of devices 16 bit binary Last bit or word device number to be reset at one time 16 bit binary Oper and Type Bit Devices Word Devices Others Sys...

Page 296: ...n 0 can be written to word devices KnY KnM KnS T C and D at one time Cautions 1 Caution on specifying devices Specify same type of devices in and The device number of should be smaller than or equal to the device number of If the device number of is larger than the device number of only one device specified in is reset D1 D1 D1 D2 D1 D1 D1 D2 FNC 40 ZRST Devices through are reset at one time D2 D1...

Page 297: ... can be specified in and However it is not possible to specify a 16 bit counter in and specify a 32 bit counter in and should be a same type Example Program example 1 When using devices in the latch area as non latch type devices In the program shown below when the power of the PLC is turned ON or when the PLC mode is changed to RUN the specified ranges of bit devices and word devices are reset at...

Page 298: ...n Number of bits of device storing the decoding result n 1 to 8 No processing is executed in the case of n 0 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 n 3 3 P FNC...

Page 299: ...ssed in 2n on the low order side of is decoded to When all bits of are 0 b0 of the word device turns ON In the case of n 3 all of high order bits of become 0 turn OFF Caution While the command input is OFF the instruction is not executed The activated decode output is held in the previous ON OFF status When n is 0 the instruction executes no processing D1 D D1 S D1 D D1 S D1 D D1 D Turns ON when a...

Page 300: ...rd devices according to the contents of bit devices The value expressed by X000 to X002 is decoded to D0 X000 and X001 are ON and X002 is OFF in this example When the values expressed by X000 to X002 are 3 1 2 0 b3 which is the 4th from b0 becomes 1 turns ON When all of X000 to X002 are 0 OFF b0 becomes 1 turns ON M8000 FNC 41 DECO D 0 M 0 K 4 S D n Turns ON when D0 is K0 D0 b4 to b15 0 0 0 0 1 1 ...

Page 301: ...rom are encoded to When n is 8 28 256 bits which is the maximum value are occupied The encoding result of is 0 OFF from the most significant bit to the low order bit n Operand type Description Data type Data to be encoded or word device number storing data 16 bit binary Word device number storing the encoding result 16 bit binary n Number of bits of device storing the encoding result n 1 to 8 When...

Page 302: ...ow order bit n Cautions 1 When two or more bits are ON in the data The low order side is ignored and only the ON position on the high order side is encoded 2 While the command input is OFF The instruction is not executed Activated encode outputs are latched in the previous ON OFF status D1 S D1 S D1 D D1 D Command input FNC 42 ENCO n S D When it is T C D R U G V or Z 1 n 4 0 0 0 1 0 0 0 0 1 0 1 0 ...

Page 303: ...a type Word device number storing the source data 16 or 32 bit binary Word device number storing the result data 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3...

Page 304: ...0 6 0006 2 OFF 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 7 0007 3 OFF 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 8 0008 1 OFF 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 1 9 0009 2 OFF 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 10 000A 2 OFF 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 1 11 000B 3 OFF OFF 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 1 5 FFFB 15 OFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 4 FFFC 14 OFF 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 1 3 FFFD 15 OFF 1 1 1 1 1 1 1 1 ...

Page 305: ...39 Floating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control Caution While the command input is OFF the instruction is not executed The output of the number of bits in the ON status is latched in the previous status Program example When X000 is ON the number of bits in the ON status in D0 is counted and stored to D2 X000 S D The number of 1 in D0 is stored to D2 FNC 43 ...

Page 306: ...g the source data 16 or 32 bit binary Bit device number to be driven 16 or 32 bit binary n Bit position to be checked n 0 to 15 16 bit instruction 0 to 31 32 bit instruction 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z M...

Page 307: ...r OFF of the bit n in 1 is output to When the bit n is ON is set to ON When the bit n is OFF is set to OFF When a constant K is specified as the transfer source 1 it is automatically converted into the binary format Program example When the bit 9 n 9 in D10 is 1 ON M0 is set to 1 ON D1 S D1 S D1 D D1 D D1 D D1 S D1 S 1 Command input FNC 44 DBON S D n n K0 to K31 n D 0 1 bit device S 1 S b0 b1 b2 b...

Page 308: ...ata type Head word device number storing data to be averaged 16 or 32 bit binary Word device number storing the mean value acquired by averaging 16 or 32 bit binary n Number of data to be averaged 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY Kn...

Page 309: ...l FX I O Device 16 FNC80 FNC89 External FX Device 17 FNC100 FNC109 Data Transfer 2 18 FNC110 FNC139 Floating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control Caution When a device number is exceeded n is handled as a smaller value in the possible range Error When n is any value outside the range from 1 to 64 an operation error M8067 is caused Program example The data of...

Page 310: ...r evaluation time 16 bit binary m Evaluation time data m 1 to 32767 unit 100 ms 16 bit binary Annunciator device to be set 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P S1 3 m 3 3 3 3 S2 3 Device Name Description...

Page 311: ...or Y005 Forward movement X000 FNC 46 ANS Forward end X001 Upper limit X002 Lower limit FNC 46 ANS X003 Continuous X004 Cycle FNC 46 ANS M8049 Y005 X005 Forward movement M8048 Annunciator ON Y006 Fault display X007 Reset FNC 47 ANRP END T 0 K 10 S900 T 1 K 20 S901 T 2 K100 S902 0 3 3 12 21 30 32 34 36 When M8049 turns ON monitoring becomes valid If the forward end detection input X000 does not turn...

Page 312: ...ators in the ON status are reset in turn in each operation cycle When ANRP instruction is used an annunciator in the ON status is reset only in one operation cycle only once Program example Refer to ANS FNC 46 instruction For a program example refer to Section 12 7 Operand type Description Data type There is no set data Oper and Type Bit Devices Word Devices Others System User Digit Specification ...

Page 313: ...is calculated and stored to 2 32 bit operation DSQR and DSQRP The square root of the data stored in 1 is calculated and stored to 1 Caution 1 Operation result 1 The obtained square root is an integer because the decimal point is rounded down When the calculated value is rounded down M8021 borrow flag turns ON 2 When the calculated value is true 0 M8020 zero flag turns ON Operand type Description D...

Page 314: ...rs Programming Manual Basic Applied Instruction Edition 12 Data Operation FNC 40 to FNC 49 12 9 FNC 48 SQR Square Root Program example X000 S D D 10 D 12 FNC 48 SQR D 10 D 12 100 10 The square root of D10 is stored to D12 The value of D10 is 100 ...

Page 315: ...value The value of a K or H specified in each instruction for binary floating point real number operation is automatically converted into binary floating point real number It is not necessary to convert such a constant using by FLT instruction K and H cannot be specified in RAD DEG EXP and LOGE instructions Operand type Description Data type Data register number storing binary integer 16 or 32 bit...

Page 316: ...IN D 25 D 24 Binary floating point operation 3 D 29 D 28 Binary floating point operation 5 D 27 D 26 Binary floating point operation 4 6 D 13 D 12 Scientific notation operation for monitoring D 15 D 14 32 bit binary integer 7 8 M8000 FNC 49 FLT D 0 D 20 FNC 19 BIN K2X010 D 22 FNC 49 FLT D 22 D 24 FNC 123 DEDIV D 20 D 24 D 28 FNC 122 DEMUL D 28 D 26 D 10 FNC 118 DEBCD D 10 D 12 FNC 129 DINT D 10 D ...

Page 317: ...upt processing type high speed processing instructions which execute sequence control using the latest I O information and utilize the high speed processing performance of PLCs FNC No Mnemonic Symbol Function Reference 50 REF Refresh Section 13 1 51 REFF Refresh and filter adjust Section 13 2 52 MTR Input Matrix Section 13 3 53 HSCS High speed counter set Section 13 4 54 HSCR High speed counter re...

Page 318: ... to the final output number whose least significant digit number is 0 S3 K8 H8 or K16 H10 Up to K256 H100 which is a multiple of 8 Operand Type Description Data Type Bit device X or Y number to be refreshed Bit n Number of bit devices to be refreshed multiple of 8 in the range from 8 to 256 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Spec...

Page 319: ...nput device n is a multiple of 8 If the input information is turned ON approximately 10 ms response delay time of the input filter before the instruction is executed the input image memory turns ON when the instruction is executed In X000 to X017 the response delay time of the input filter can be changed X000 to X007 in the FX3U 16M For the details refer to 13 1 1 What should be understood before ...

Page 320: ...t significant digit number is 0 such as X000 X010 X020 and Y000 Y010 Y020 Program examples 1 When refreshing inputs Only X010 to X017 8 points in total are refreshed 2 When refreshing outputs Y000 to Y007 Y010 to Y017 and Y020 to Y027 24 points in total are refreshed ON ON 20ms 5ms 10ms 10ms Does not turn ON ON 10ms Response relay improved time Input signal X Filter time Input refresh REF instruct...

Page 321: ...in the FX3U 16M 2 Output response time After REF instruction is executed the output Y sets the output signal to ON after the response time shown below For the details refer to the Hardware Manual of the main unit Target range Y000 to final connected output number 1 In the case of relay output type The output contact is activated after the response time of the output relay Y000 and later Approximat...

Page 322: ... ms before the instruction is executed the image memory is set to ON When the input turns OFF n 1 ms before the instruction is executed the image memory is set to OFF When the command input is ON REFF instruction is executed in each operation cycle When the command input is OFF REFF instruction is not executed and the input filter of X000 to X017 1 is set to the set value of D8020 which is the val...

Page 323: ...X007 in the FX3U 16M 2 When setting the input filter time to 5 µs perform the following Make sure that the wiring length is 5 m or less Connect a bleeder resistor of 1 5 kΩ 1 W or more to the input terminal and make sure that the load current in the open collector transistor output in the counterpart equipment is 20 mA or more including the input current in the main unit 3 The filter time is fixed...

Page 324: ... during execution of END instruction can be changed 2 X000 to X007 in the FX3U 16M 2 Instruction in which the digital filter is automatically changed Without regard to the change of the filter time executed by the REFF instruction when the following functions and instruction are executed the input filter value is automatically changed to 5 µs in X000 to X005 and 50 µs in X006 and X007 However if t...

Page 325: ...y 20 ms under consideration of the input filter response delay of 10 ms Operand Type Description Data Type Input device X number of matrix signal input X000 X010 X020 final input device number Only 0 is allowed in the least significant digit of device numbers Bit Head device Y number of matrix signal output Y000 Y010 Y020 final output device number Only 0 is allowed in the least significant digit ...

Page 326: ... When specifying the output in make sure that n output numbers specified in does not overlap the output specified in 2 Wiring One diode of 0 1 A 50 V is required for each switch 3 Output format Use the transistor output format Device Name Description M8029 Instruction execution complete Turns ON after the first cycle operation Command contact M8029 execution complete 1 4 1st column input is receiv...

Page 327: ...urn repeatedly and stored to M30 to M37 M40 to M47 and M50 to M57 respectively In this program example the FX2N 16EX sink input and FX2N 16EYT sink output are used with the FX3UC 32MT LT For the wiring refer to the following manual of the used PLC FX3U Hardware Manual X021 M 51 X022 M 52 X023 M 53 X024 M 54 X025 M 55 X026 M 56 X027 M 57 M 50 M 40 COM1Y020Y021Y022Y023Y024Y025Y026Y027 COMX020X021X02...

Page 328: ...sistor outputs used in MTR instruction For pull up resistors use the power supply shown in the table below The figure below shows an example of the FX3UC 32MT LT sink input sink output 3 ON OFF duration of input signals Because input of 64 points 8 rows 8 columns is received in a cycle of 80 or 160 ms the ON OFF duration of each input signal should be equivalent to or more than the value shown bel...

Page 329: ...of function and operation 1 32 bit operation DHSCS When the current value of a high speed counter C235 to C255 specified in becomes the comparison value 1 for example when the current value changes from 199 to 200 or from 201 to 200 if the comparison value is K200 the bit device is set to ON without regard to the operation cycle This instruction is executed after the counting processing in the hig...

Page 330: ...comparison instruction When the required frequency is beyond the counting performance of the software counters When counting is regarded as important but the effect of the scan time can be ignored in operations according to the counting result When the number of an instruction is more than 32 2 Device specification range Only high speed counters C235 to C255 can be specified as 3 Only 32 bit opera...

Page 331: ... This paragraph explains common cautions for these instructions 1 Limitation in the number of an instruction in a program DHSCS DHSCR and DHSZ instructions can be used as many of times as necessary in the same way as general instructions However the number of simultaneously driven instructions is limited The DHSCT instruction can be used only once in any program 1 When DHSZ or DHSCT instruction is...

Page 332: ...igh speed counter is changed in the following method 1 Change method examples a Overwriting the contents of a word device used as the comparison value using DMOV instruction etc b Resetting the current value of a high speed counter in a program 2 Operation Even if the condition for setting the output to ON or OFF is given as the comparison result the comparison result does not change when an instr...

Page 333: ...N FX1NC FX1S PLC reference 1 Because of response delay at the output the output may not operate within the period of time in which the present value is changed from 0 to 1 Program sequence Processing sequence FX3U FX3UC FX2N FX2NC FX1N FX1S FX1NC DHSCS 1 DHSCR 6 self reset DHSCS 1 DHSCS 1 DHSCS 2 DHSZ 4 DHSCS 2 DHSCS 2 DHSCR 3 DHSCS 1 DHSCR 3 DHSCR 3 DHSZ 4 DHSCS 2 DHSZ 4 DHSZ 4 DHSCR 5 DHSCR 3 DH...

Page 334: ...n value is K200 the bit device is reset set to OFF without regard to the operation cycle In this instruction the comparison processing is executed after the counting processing in the high speed counter Operand Type Description Data Type Data to be compared with the current value of a high speed counter or word device number storing the data to be compared 32 bit binary Device number of a high spe...

Page 335: ... counting result becomes equivalent to the comparison value without regard to the scan time of the PLC 2 Cases to select a general purpose comparison instruction When the required frequency is beyond the counting performance of software counters When counting is regarded important but the effect of the scan time can be ignored in operations according to the counting result When the number of an in...

Page 336: ...ion For the details refer Subsection 13 4 1 Program example 1 Example of self reset circuit When the current value of C255 becomes 400 C255 is immediately reset Its current value becomes 0 and the output contact is set to OFF C255 K300 FNC 54 DHSCR K400 C255 C255 Reset value of DHSCR 400 Count up value 300 Current value of C255 Output contact of C255 Comparison value Comparison source Output desti...

Page 337: ...ller than the lower comparison value inside the comparison zone or larger than the upper comparison value one among 1 and 2 is set to ON without regard to the operation cycle In this instruction the comparison processing is executed after the counting processing in the high speed counter Operand Type Description Data Type Data to be compared with the current value of a high speed counter or word d...

Page 338: ...to use DHSZ instruction or general purpose comparison instruction 1 Case to select DHSZ instruction When the output should be given when the counting result becomes equivalent to the comparison value without regard to the scan time of the PLC Comparison point Contents 32 bits Comparison value 1 1 Comparison value 2 1 Comparison pattern Current value of C251 Change of output contact Y Y000 Y001 Y00...

Page 339: ...an an error is caused 5 Relationship between the comparison timing and the result output 1 DHSZ instruction executes comparison and outputs the result only when a counting pulse is input to a high speed counter When is 1000 and is 1999 the output is set to ON as soon as the current value of C235 changes from 999 to 1000 or from 1999 to 2000 2 Because the comparison result cannot be obtained when r...

Page 340: ... if the current value of a high speed counter C235 in the example below is 0 when restoring the power 1 For initializing Y010 the current value of C235 is compared with K1000 and K1200 and Y010 is driven using DZCPP instruction for general zone comparison as pulse operation only at the time of startup 2 The comparison result in Y010 is latched until an input pulse is input and the comparison outpu...

Page 341: ...9 Data Operation 13 FNC50 FNC59 High Speed Processing 14 FMC60 FNC69 Handy Instruction 15 FNC70 FNC79 External FX I O Device 16 FNC80 FNC89 External FX Device 17 FNC100 FNC109 Data Transfer 2 18 FNC110 FNC139 Floating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control input pulse for C235 X000 smaller than zone X010 inside zone Y010 larger than zone Y011 present value of ...

Page 342: ...cause one line in the comparison table uses four devices 4 devices are occupied from 2 Specify the number of lines in the comparison table as A created table starts from the head register specified as and has the number of lines specified as 3 Comparison data Make sure that the comparison data is 32 bits Operand Type Description Data Type Head word device number storing the table data only data re...

Page 343: ...nterrupt 2 Operation Contents of setting Set ON K1 H1 Reset OFF K0 H0 FNC 12 DMOV K123 D200 FNC 12 MOV H10 D202 M8002 FNC 12 MOV K1 D203 FNC 12 DMOV K234 D204 FNC 12 MOV H10 D206 FNC 12 MOV K0 D207 FNC 12 DMOV K345 D208 FNC 12 MOV H11 D210 FNC 12 MOV K1 D211 FNC 12 DMOV K456 D212 FNC 12 MOV H11 D214 FNC 12 MOV K0 D215 FNC 12 DMOV K567 D216 FNC 12 MOV H11 D218 FNC 12 MOV K1 D219 C251 K2 147 483 647...

Page 344: ... in the number of DHSZ instruction This instruction can be programmed only once in a program With regard to DHSCS DHSCR DHSZ and DHSCT instructions used for other purposes up to 32 instructions including the DHSZ instruction can be driven at one time 2 When the command input is set to OFF in the middle of execution Execution of the instruction is aborted and the table counter D8130 is reset to K0 ...

Page 345: ...y control mode is specified as in the DHSZ instruction the special function shown below is provided if DPLSY instruction is combined At this time only a data register D can be specified as and a constant K or H can be specified as The available range is limited to 1 K H 128 A high speed counter C235 to C255 can be specified as This function is different from the zone comparison described above PLS...

Page 346: ...pecifies continuous output Pulse output M10 FNC 12 DMOVP K20 D300 FNC 12 DMOVP K300 D302 FNC 12 DMOVP K600 D304 FNC 12 DMOVP K500 D306 FNC 12 DMOVP K700 D308 FNC 12 DMOVP K200 D310 FNC 12 DMOVP K800 D312 FNC 12 DMOVP K100 D314 FNC 12 DMOVP K0 D316 FNC 12 DMOVP K0 D318 Comparison data Frequency Comparison data Frequency Comparison data Frequency Comparison data Frequency Comparison data Frequency H...

Page 347: ...the pulse output turns OFF and the table counter D8131 is reset 7 After DHSZ instruction is first executed creation of the table is completed in END instruction DHSZ instruction becomes valid after that 8 Accordingly the contact of PLS M10 is used so that PLSY instruction is executed from the second scan after the command input has been set to ON Data can be written to the table in a program as sh...

Page 348: ...Type Description Data Type Device number of pulse input X Bit Time data unit ms or word device number storing data 16 or 32 bit binary Head word device number storing pulse density data 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Constant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D ...

Page 349: ...d in the present value is stored in 1 and the remaining time is stored in 2 ms By repetition of this operation the measured value will store the pulse density which is in proportion to the rotation speed 1 Timing chart 2 The measured value is in proportion to the number of rotations as shown below S1 S2 D D D D FNC 56 SPD S1 D S2 Command input Measured value The command contact is set to ON Comman...

Page 350: ...Timing chart 2 The measured value 1 is in proportion to the number of rotations as shown below S1 S2 S2 D D D D D D D D FNC 56 DSPD S1 D S2 Command input Command input Measured value ms S1 Current value ms Remaining time ms The command contact is set to ON 3 2 counts OFF ON operation of 1 ms later the counting result is stored to 1 Accompanied by this operation 3 2 is reset and then counting of OF...

Page 351: ...nputs X000 to X007 is as shown below 1 When receiving pulses corresponding to the response frequency of 50 k to 100 kHz perform the following Make sure that the wiring length is 5 m or less Connect a bleeder resistor of 1 5 kΩ 1 W or more to the input terminal and make sure that the load current in the open collector transistor output in the counterpart equipment is 20 mA or more 2 Occupied device...

Page 352: ...ecify the generated pulse quantity in Allowable setting range 1 to 32767 PLS Specify the output Y number from which pulses are output in Allowable setting range Y000 Y001 Operand Type Description Data Type Frequency Hz data or word device number storing data 16 or 32 bit binary Pulse quantity data or word device number storing data 16 or 32 bit binary Bit device Y number outputting pulses Bit Oper...

Page 353: ...ion refer to the program example later Related devices 1 Instruction execution complete flag The instruction execution complete flag M8029 used for PLSY instruction can be used also for other instructions When using other instructions setting the M8029 flag to ON or OFF or using two or more PLSY instructions make sure to use each M8029 flag just after an instruction to be monitored For the instruc...

Page 354: ... outputs in the main unit set the output frequency to 100 000 Hz or less If the load is operated using pulses at a frequency more than 100 000 Hz PLC may be damaged 3 Pulse output Only a transistor output in the main unit or Y000 or Y001 in a special high speed output adapter 1 can be specified in When using PLSY FNC 57 instruction in a relay output type FX3U PLC a special high speed output adapte...

Page 355: ...ipulate the pulse output form setting switch while pulses are being output 4 When special high speed output adapters are connected the same output numbers in the main unit are assigned as shown in the table below Use only an output terminal Do not perform wiring to the unused output terminals Outputs in special high speed output adapters and the main unit operate as shown below Assignment of outpu...

Page 356: ...eriod passes after that and then execute such an instruction again 3 frequency control mode in which DHSZ FNC 55 and PLSY FNC 57 instructions are combined can be used only once in a program Program example when outputting pulses without any limitation When is set to K0 pulses are output without any limitation Classification Instruction Instruction name Target output numbers Pulse output PLSY FNC 5...

Page 357: ...3UC 32MT LT Explanation of function and operation 1 16 bit operation PWM Pulses whose ON pulse width is ms are output in the cycle of ms Specify the pulse width t in Allowable setting range 0 to 32767 ms Specify the cycle T0 in Allowable setting range 1 to 32767 ms Specify the output Y number from which pulses are output in Allowable setting range Y000 Y001 Y002 Y003 Operand Type Description Data ...

Page 358: ...put monitor flag turns OFF and one operation cycle or longer period passes after that and then execute such an instruction again 3 Cautions on using special high speed output adapters 1 Outputs of special high speed output adapters work as differential line drivers 2 Set the pulse output type setting switch in a special high speed output adapter to pulse chain direction PLSxDIR side If the switch ...

Page 359: ...2MT LT sink input sink output is used For the wiring refer to the following manual of the used PLC FX3U Hardware Manual Example of smoothing circuit Setting status of output form setting switch Signal name Setting name in each positioning instruction Output number 1st unit 2nd unit 1st axis 2nd axis 3rd axis 4th axis Set to FPxRP side Forward rotation pulse chain FP Pulse output destination Y000 Y...

Page 360: ...ing range Y000 Y001 Operand Type Description Data Type Maximum frequency Hz data or word device number storing data 16 or 32 bit binary Data of total number of output pulses PLS or word device number storing data 16 or 32 bit binary Acceleration deceleration time ms data or word device number storing data 16 bit binary Device number from which pulses are output Bit Oper and Type Bit Devices Word D...

Page 361: ...s Allowable setting range 50 to 5000 ms Pulse output number Allowable setting range Y000 Y001 3 Pulse output specifications Simple positioning with the acceleration deceleration function The operation pattern is as shown below Output processing The pulse output is controlled by the dedicated hardware not affected by the operation cycle Data change while the instruction is executed Even if operands...

Page 362: ... the main unit or Y000 or Y001 in a special high speed output adapter 1 can be specified in 1 Special high speed output adapters cannot be connected to the FX3UC 32MT LT When using PLSR FNC 59 instruction in a relay output type FX3U PLC a special high speed output adapter is required The duty of the ON OFF duration of pulses is 50 ON 50 OFF 50 The pulse output is controlled by the dedicated hardwa...

Page 363: ...in the table below 3 Set the pulse output type setting switch while the PLC is stopped or while the power is OFF Do not manipulate the pulse output type setting switch while pulses are being output 4 When special high speed output adapters are connected the same output numbers in the main unit are assigned as shown in the table below Use only an output terminal Do not perform wiring to the unused ...

Page 364: ...e pulse output monitor flag turns OFF and one operation cycle or longer period passes after that and then execute such an instruction again Output operation Relay output type main unit Corresponding output remains ON and the LED remains ON also while the instruction is executed Special high speed output adapter Outputs turn ON and OFF normally Classification Instruction Instruction name Target out...

Page 365: ...ion FNC 60 to FNC 69 FNC 60 to FNC 69 provide handy instructions which achieve complicated control in a minimum sequence program FNC No Mnemonic Symbol Function Reference 60 IST Initial State Section 14 1 61 SER Search a Data Stack Section 14 2 62 ABSD Absolute drum sequencer Section 14 3 63 INCD Incremental drum sequencer Section 14 4 64 TTMR Teaching Timer Section 14 5 65 STMR Special Timer Sect...

Page 366: ... because they are occupied by IST instruction Specify the smallest device number of practical state relays in for the automatic mode Specify the largest device number of practical state relays in for the automatic mode Operand type Description Data type Head bit device number of the selector switch in the operation mode Bit Smallest state relay number of practical state relays in the automatic mod...

Page 367: ... refer to 14 1 2 Example of IST instruction introduction example of workpiece transfer mechanism Cautions 1 Device specified as and switches to be used It is not necessary to use all switches for mode selection When some switches are not used leave the corresponding numbers in the unused status Such numbers cannot be used for any other purpose 2 Programming order of IST instruction and STL instruc...

Page 368: ...M8042 X020 M8040 Individual operation STL transfer disable X021 Zero return X027 M8042 Start pulse Stop X022Stepping operation X023Cycle operation X027Stop M8002 Initial pulse M8040 Self holding M8000 M8047 RUN monitor Enable STL monitoring X020 Individual operation S 0 M8044 Zero point condition M8043 Zero return complete X021 Zero return S 1 X025 Zero return start Zero return complete signal is ...

Page 369: ...ycle of automatic operation and stops at the zero point If the stop button is pressed in the middle of one cycle the machine stops immediately When the start button is pressed after that the machine performs the continuous operation from the last position and automatically stops at the zero point Continuous operation mode When the start button is pressed while the machine is located at the zero po...

Page 370: ...d type solenoid valves with two inputs for driving and non driving are adopted for moving down moving up leftward travel and rightward travel Single type solenoid valves which operate only while the power is ON are adopted for clamping Zero point Left limit X004 Start X026 Upper limit X002 Clamping Lower limit X001 1 Moving down Y000 3 Moving up Y002 2 Clamping Y001 ON Upper limit X002 Unclamping ...

Page 371: ...specification X030 M 0 Individual operation mode X035 M 1 Zero return operation mode X033 M 2 Stepping operation mode X040 M 3 Cycle operation mode X032 M 4 Continuous operation X034 M 5 Zero return start X026 M 6 Automatic mode start X041 M 7 Stop M 0 Does not operate X030 M 1 Zero return operation mode M 2 Does not operate M 3 X031 M 4 Continuous operation X032 M 5 Zero return start M 6 Automati...

Page 372: ...peration mode and zero return operation mode M8041 is not effective Stepping operation mode and cycle operation mode M8041 is effective only while the start button is pressed and held Continuous operation mode The operation is latched when the start button is pressed and cleared when the stop button is pressed c M8042 Start pulse M8042 is activated instantaneously only when the start button is pre...

Page 373: ... automatic mode When the operation mode is switched among the individual operation mode zero return operation mode and automatic mode while the machine is operating all outputs are reset once to assure safety And then the mode after switching becomes valid While M8045 All output reset disable is ON outputs are not reset at all b Individual operation mode Programming is not required when the indivi...

Page 374: ...43 zero return complete to ON before starting the automatic mode Unclamping RST Y000 RST Y001 Zero return complete Y002 Moving down reset Leftward travel Rightward travel reset Moving up Zero return start RST Y003 Y004 SET M8043 S 12 Reset Make sure to use the state relays S10 to S19 for the zero return operation In the final state drive M8043 and then reset the final state Initial state for zero ...

Page 375: ...ating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control d Automatic mode stepping operation mode cycle operation mode or continuous operation mode Y000 Moving down K 10 Clamping Moving up SET Y001 T 0 RET S 2 Initial state for automatic mode Y002 Y003 Rightward travel Moving down Y000 K 10 Moving up RST Y001 T 1 Y002 Y004 Leftward travel END Unclamping SFC block 20 21 22...

Page 376: ... S 1 33 LD X 025 34 SET S 10 36 STL S 10 37 RST Y 001 38 RST Y 000 39 OUT Y 002 40 LD X 002 41 SET S 11 43 STL S 11 44 RST Y 003 45 OUT Y 004 46 LD X 004 47 SET S 12 49 STL S 12 50 SET M8043 52 LD M8043 53 RST S 12 RET 55 STL S 2 56 LD M8041 57 AND M8044 58 SET S 20 60 STL S 20 61 OUT Y 000 62 LD X001 63 SET S 21 6S TL S 21 66 SET Y 001 67 OUT T 0 SP K 10 70 LD T 0 71 SET S 22 73 STL S 22 74 OUT Y...

Page 377: ...m store the number of same data first position last position maximum value position and minimum value position In this case however 0 is stored in three devices starting from which store the number of same data first position and last position Operand type Description Data type Head device number in which same data maximum value and minimum value are searched 16 or 32 bit binary Data to be searche...

Page 378: ... store the number of same data first position last position maximum value position and minimum value position In this case however 0 is stored in three devices starting from 1 which store the number of same data first position and last position Searched device Searched data value example Comparison data value example Data position Search result Maximum value 4 Same Minimum value 3 K100 K100 0 3 fi...

Page 379: ... Number of occupied devices When this instruction is driven the following number of devices are occupied for storing the search result Make sure that such devices are not used in other controls for the machine 1 In the case of 16 bit operation Five devices 1 2 3 and 4 are occupied 2 In the case of 32 bit operation Ten devices 1 3 2 5 4 7 6 and 9 8 are occupied Searched device 1 Searched data value...

Page 380: ...from are controlled to ON or OFF during one rotation Operand type Description Data type Head device number storing the table data rising point and falling point 16 or 32 bit binary Counter number for monitoring the current value compared with the table data 16 or 32 bit binary Head bit device number to be output Bit n Number of lines in the table and the number of output bit devices 1 n 64 16 bit ...

Page 381: ...put pattern When the command input is set to ON n points starting from change as shown below Each rising point falling point can be changed respectively by overwriting the data in to n 2 2 32 bit operation DABSD In this example outputs are controlled to ON or OFF by one rotation 0 to 365 of the table using the rotation angle signal of 1 pulse The present value of the counter is compared with the t...

Page 382: ... response delay caused by the scan cycle with regard to the current value of a counter When high responsibility is required use the table high speed comparison function offered by HSZ instruction or use HSCT instruction 2 When specifying digits of a bit device as 1 Device number Specify a multiple of 16 0 16 32 64 2 Number of digits In ABSD instruction 16 bit operation Only K4 is available In DABS...

Page 383: ... a counter is compared with the table data having n lines starting from which occupies n lines x 1 device When is equivalent to the table data the current output is reset and the next output is set to ON In this way the ON OFF status of specified outputs is controlled in turn Operand type Description Data type Head word device number storing the set value 16 bit binary Head number of counters whos...

Page 384: ...and the current value of the counter C0 is reset 6 The current value is compared for up to n K4 outputs in the same way 1 n 64 7 When the final process specified by n is finished the execution complete flag M8029 turns ON and remains ON for one operation cycle M8029 is used for many instructions as the instruction execution complete flag Use M8029 as a contact just after a corresponding instructio...

Page 385: ...the magnification 10n and then transferred to The table below shows the actual value indicated by depending on the magnification n and the pressing and holding time t0 unit 1 sec Related instruction There is a handy instruction as follows Operand type Description Data type Device number storing the teaching data 16 bit binary n Magnification by which the teaching data is multiplied K0 to K2 H0 to ...

Page 386: ...f data registers Suppose that the set value is written in advance to D400 to D409 D1 D D1 D D1 D D1 D D1 D M8000 RUN monitor T 0 D 400 T 1 D 401 T 9 D 409 X010 Teaching button M 0 X010 FNC 19 BIN K1X000 Z FNC 64 TTMR D300 K 0 PLF M 0 FNC 12 MOV D300 D400Z 10 timers to be set Because the timers T0 to T9 are the 100 ms type the actual operating time sec is 1 10 of the teaching data Selecting a timer...

Page 387: ...rding to the purpose while referring to the example shown below Off delay timer and one shot timer When T10 is set to and M0 is set to M0 Off delay timer which turns OFF with delay of the timer set value after the command contact turned OFF M1 1 One shot timer which turns ON after the command contact turned OFF from ON and turns OFF after the timer set value M2 2 Occupied and can be used for flick...

Page 388: ...in this instruction cannot be used in other general circuits such as OUT instruction If the timer number is used in other general circuits the timer malfunctions 2 Number of occupied devices Four devices are occupied from a device specified in Make sure that these devices are not used in other controls for the machine 3 When the command contact is set to OFF 1 and 3 will turn OFF after the set tim...

Page 389: ...6 bit operation ALT and ALTP Alternating output 1 step Every time the command input turns ON from OFF a bit device specified in is alternated from ON to OFF or from OFF to ON Dividing output by 2 step alternating output Multi step dividing outputs are achieved by combination of two or more ALTP instructions Operand type Description Data type Bit device number whose output is alternated Bit Oper an...

Page 390: ...in the stop output Y000 is set to ON 2 Flicker operation 1 When the input X006 is set to ON the contact of the timer T2 turns ON instantaneously every 5 seconds 2 Every time the contact of T2 turns ON the output Y007 is set to ON or OFF alternately 3 Alternating output operation using auxiliary relays M operation equivalent to ALT instruction The circuit below is provided as an example of alternat...

Page 391: ...e divided equally by n times to in every operation cycle is stored to By combining this instruction and an analog output the cushion start stop command can be output The number of scans 0 to n is stored in 1 The time from start to the end value is the operation cycle multiplied by n times Operand type Description Data type Device number storing the initial value of ramp 16 bit binary Device number...

Page 392: ...mode in the PLC For example when 20 ms is written to D8039 and n is set to 100 the value will change from to in 20 seconds 2 Operation of the mode flag M8026 Depending on the ON OFF status of the mode flag M8026 the contents of 1 are changed as follows 1 When M8026 is OFF 2 When M8026 is ON Related devices For the instruction execution complete flag use method refer to Subsection 6 5 2 1 Cleared w...

Page 393: ...nt control of the rotary table for putting taking a product into out of the rotary table 1 Instruction format 2 Set data 3 Applicable devices S D b cannot be indexed with index registers V and Z Operand type Description Data type Data register for counting 16 bit binary m1 Number of divisions 16 bit binary m2 Number of low speed sections 16 bit binary Head bit device number to be driven 16 bit bin...

Page 394: ...unting Set them in advance using a transfer instruction 1 Sets the port No to be called 2 Sets the product No to be called A phase signal Construct in advance an internal contact circuit which is driven by the input signal X 1 B phase signal 2 Zero point detection signal 3 Forward rotation at high speed 4 Forward rotation at low speed 5 Stop 6 Backward rotation at low speed 7 Backward rotation at ...

Page 395: ...divisions m1 of the table and number of low speed sections m2 When the above conditions are specified forward backward rotation and high speed low speed stop are output to 3 to 7 specified by the head device Cautions 1 Operations caused by the command input ON OFF status When the command input is set to ON and this instruction is executed the result will be automatically output to 3 to 7 When the ...

Page 396: ...ing order based on the group data in the column No n and the result is stored in the data table sorting result having m1 m2 points from For operation examples refer to the next page Operand type Description Data type Head device number storing the data table which occupies m1 m2 points 16 bit binary m1 Number of data lines 1 to 32 m2 Number of group data columns 1 to 6 Head device number storing t...

Page 397: ...instruction is executed with n K2 column No 2 and n K3 column No 3 for the following sorting source data the operations shown below are acquired The operation examples below indicate 16 bit operations In the case of 32 bit operation construct the data table with 32 bit binary data It is recommended to put a serial number such as a control number in the first column so that the original line number...

Page 398: ...he instruction again set the command input to OFF Limitation in the number of instructions Only one instruction can be used in a program When the same device is specified in and The source data is overwritten by the data acquired by sorting Take special care so that the contents of are not changed until execution is completed Column No 1 2 3 4 Line No Control number Height Weight Age 1 5 10 15 4 1...

Page 399: ...trols with a minimum required sequence program and external wiring they are similar to handy instructions described in the preceding chapter FROM and TO instructions essential for controlling special units and special blocks are included in this group In FX3U and FX3UC PLCs transfer can be executed also by MOV instruction FNC No Mnemonic Symbol Function Reference 70 TKY Ten Key Input Section 15 1 ...

Page 400: ...digit An input numeric value is stored in the binary format When the ten keys are pressed in the order 1 2 3 4 in the figure shown on the next page 2130 is stored in Operand Type Description Data Type Head bit device number from which one of the ten keys is input 10 devices are occupied Bit Word device number storing the data 16 or 32 bit binary Head bit device number storing the key pressing info...

Page 401: ...keys Output informations for key pressing and key sensing are output to to 10 1 Input numeric value When an input value is larger than 99 999 999 it overflows from the most significant digit An input numeric value is stored in the binary format 2 Key pressing information to 10 For the key pressing information to 9 turn ON or OFF according to the pressed keys For the key sensing output 10 turns ON ...

Page 402: ...ccording to input of the ten keys 0 to 9 10 Is ON while either one among 0 to 9 keys is pressed key sensing output 4 Limitation in the number the instruction TKY or DTKY instruction can be used only once in a program When TKY and or DTKY instruction should be used twice or more use the indexing V Z function Program example In the program example shown below the input X000 is set as the head bit de...

Page 403: ...peration 2 20 FNC150 FNC159 Positioning Control 3 Timing chart 1 When the ten keys are pressed in the order 1 2 3 4 shown in the figure 2130 is stored in D0 When an input value is larger than 9999 it overflows from the most significant digit An input numeric value is actually stored in the binary format in D0 2 When X002 is pressed M12 turns ON and remains ON until another key is pressed Other key...

Page 404: ...o 7 When a key A to F is pressed the key pressing information to 5 corresponding to the pressed key turns ON and key sensing is output to 6 Operand Type Description Data Type Head device X number inputting 16 keys Four devices are occupied Bit Head device Y number to be output Four devices are occupied Bit Device number storing a numeric value input through 16 keys 16 or 32 bit binary Head bit dev...

Page 405: ...d key turns ON and key sensing is output to 6 1 Input of a numeric value through keys 0 to 9 1 and 7 When an input value is larger than 99 999 999 it overflows from the most significant digit An input numeric value is stored to 1 in the binary format The key sensing output 7 turns ON when either key among 0 to 9 is pressed 2 Key pressing information for the keys A to F to 6 For the key pressing in...

Page 406: ...ut X device for connecting 16 keys 2 Four devices are occupied from the head output Y device for connecting 16 keys 3 Eight devices are occupied from the head device for outputting the key pressing information Make sure that these devices are not used in other controls for the machine to 5 Key pressing information for the keys A to F 6 Key sensing output for the keys A to F 7 Key sensing output fo...

Page 407: ...FX I O Device 16 FNC80 FNC89 External FX Device 17 FNC100 FNC109 Data Transfer 2 18 FNC110 FNC139 Floating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control Program example The connection diagram below shows an example of the FX3UC 32MT LT sink input sink output For the wiring refer to the following manual of the used PLC FX3U Hardware Edition X004 FNC 71 HKY X000 Y000 D...

Page 408: ...read A numeric value is stored in the binary format The first set is stored to and the second set is stored to 1 Operand Type Description Data Type Head device X number connected to a digital switch Four devices are occupied Bit Head device Y number to which the strobe signal is output Four devices are occupied Bit Device number storing the numeric value of a digital switch n devices are occupied ...

Page 409: ...he contents of do not change all of to 3 turn OFF 2 Number of occupied devices 1 When two sets of 4 digits n K2 are used two devices are occupied starting from 2 When one set of 4 digits is used four devices are occupied starting from When two sets of 4 digits is used eight devices are occupied starting from 3 When connecting a digital switch of up to 3 digits It is not necessary to wire the strob...

Page 410: ...DSW FNC 72 instruction executes a series of operation only when the pushbutton switch X000 is pressed Accordingly with regard to this instruction it is not necessary to consider the product life even if Y010 to Y013 are relay outputs 1 While M0 digital switch read input is ON DSW FNC 72 is driven 2 DSW FNC 72 completes one cycle of operation and remains driven until the execution complete flag M80...

Page 411: ...ble devices Explanation of function and operation 1 16 bit operation SEGD and SEGDP 0 to F hexadecimal numbers in low order 4 bits 1 digit of are decoded to data for the seven segment display unit and stored the low order 8 bits of Operand Type Description Data Type Head word device to be decoded 16 bit binary Word device number storing the data to be displayed in the seven segment display unit 16...

Page 412: ...adeci mal num ber b3 b2 b1 b0 B15 B8 B7 B6 B5 B4 B3 B2 B1 B0 0 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 1 0 0 0 0 0 1 1 0 2 0 0 1 0 0 1 0 1 1 0 1 1 3 0 0 1 1 0 1 0 0 1 1 1 1 4 0 1 0 0 0 1 1 0 0 1 1 0 5 0 1 0 1 0 1 1 0 1 1 0 1 6 0 1 1 0 0 1 1 1 1 1 0 1 7 0 1 1 1 0 0 1 0 0 1 1 1 8 1 0 0 0 0 1 1 1 1 1 1 1 9 1 0 0 1 0 1 1 0 1 1 1 1 A 1 0 1 0 0 1 1 1 0 1 1 1 B 1 0 1 1 0 1 1 1 1 1 0 0 C 1 1 0 0 0 0 1 1 1 0 0 1 D...

Page 413: ... BCD decoder in the time division method When using one set of 4 digits n K0 to K3 For selection of n refer to Subsection 15 5 2 1 Data and strobe signal A 4 digit numeric value stored in is converted from binary into BCD and its each digit is output in turn from to 3 in the time division method The strobe signal is output in turn from 4 to 7 in the time division method also to latch one set of 4 ...

Page 414: ...isplay unit b 2nd set of 4 digits A 4 digit numeric value stored in 1 is converted from binary into BCD and its each digit is output in turn from 10 to 13 in the time division method The strobe signal is output in turn from 4 to 7 in the time division method also to latch the second set of 4 digit seven segment display unit The strobe signal outputs 4 to 7 are shared by the 1st and 2nd sets 2 For ...

Page 415: ...es of operation the operation is paused When the command contact is set to ON again the operation is started from the beginning 3 Number of occupied devices When one set of 4 digits is used 1 device is occupied from the head device specified in 8 devices are occupied from the head device specified in Even if the number of digits is smaller than 4 unused devices cannot be used for any other purpose...

Page 416: ...w The check column is provided at the bottom of the table Check a corresponding type of logic positive or negative and utilize it for parameter setting 1 Role of the parameter n The parameter n should be determined according to the data input logic positive or negative of the seven segment display unit the logic positive or negative of the strobe signal and the number of sets of 4 digits to be con...

Page 417: ...t Negative logic Source output Positive logic 2 Seven segment display unit Data input Negative logic Strobe signal Positive logic Logic Negative logic Positive logic Timing chart Description BCD data at low level BCD data at high level Check Logic Negative logic Positive logic Timing chart Description Data latched at low level is held Data latched at high level is held Check PLC output logic Data ...

Page 418: ...vice number to be input 16 or 32 bit binary Word device number storing data converted into BCD 16 or 32 bit binary Head bit device Y number connected to seven segment display unit 16 or 32 bit binary n Number of digits of seven segment display unit setting range K0 to K3 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index...

Page 419: ... Specifying the number of digits of the seven segment display unit having the BCD decoder n In the explanation below n is set to 4 up to the 103 digit 2 Operation of the digit selection switches 2 and 3 Operation when the lower digit input 2 turns ON Every time the lower digit switch is pressed the digit specification changes in the way 103 102 101 100 103 Operation when the higher digit input 3 t...

Page 420: ... seven segment display unit Cautions 1 Setting of the parameter n Refer to the explanation of parameter setting in SEGL FNC 74 instruction The setting range is from 0 to 3 for ARWS instruction For the parameter setting refer to Subsection 15 5 2 2 Output type of the PLC Use a transistor output type PLC 3 Scan time operation cycle and the display timing ARWS instruction is executed in synchronizati...

Page 421: ... Program example 1 When changing the timer number and displaying the current value 1 Specifying the timer number using a 3 digit digital switch 2 Setting the constant of the timer using the arrow switches Explanation of operation Every time the read write key is pressed the read write LED lights alternately In reading Set the timer number using the digital switch and then press the set switch X003...

Page 422: ... M2 Higher digit RUN monitor M3 Lower digit X004 FNC 66 ALTP M100 Read write M100 Y014 Read indication M100 Y015 Write indication Y014 X003 FNC 72 DSW X010 Y010 Z K1 Read Set Digital switch Z 4 digits 1 set Y014 FNC 74 SEGL T0Z Y000 K 1 Read T0Z Seven segment display unit 4 digits 1 set Negative logic Y015 FNC 12 MOVP D300Z D511 Write FNC 75 ARWS M0 D511 Y000 K1 M 0 to M 3 D511 Y000 to Y007 Seven ...

Page 423: ...s specified in are converted into ASCII codes and each ASCII code is transferred in turn to can handle half width characters A to Z 0 to 9 and symbols but cannot handle regular width characters A character string is entered when a program is created with a programming tool stores converted ASCII codes in the order of low order 8 bits and high order 8 bits by 2 characters byte at one time Operand T...

Page 424: ...in the character string 2 When using RS FNC 80 ASCI FNC 82 HEX FNC 83 and or CCD FNC 84 instructions The extension function flag M8161 is also used for other instructions When using an instruction described above and the ASC instruction in the same program make sure to set M8161 to ON or OFF just before the ASC instruction so that M8161 does not apply to another instruction High order 8 bits Low o...

Page 425: ...des stored in low order 8 bits 1 byte of to 7 are output to to 7 in turn by one character at a time in the time division method The timing chart below shows a case in which the following ASCII codes are stored in to 7 Eight bytes are sent from A at first to 7 H at the end Operand Type Description Data Type Head device number storing ASCII code data Character string only ASCII codes Head output Y n...

Page 426: ...byte serial output 1 to 16 characters is executed In the example shown below up to 16 characters 1 character byte are output to the display unit external display unit A6FD for example It is supposed that data to be displayed is stored in hexadecimal codes in D300 to D307 1 Connection example of the external display unit A6FD 1 The PLC shown in the example below is the FX2N 16EYT sink input sink ou...

Page 427: ...029 turns ON only while M8027 is ON While the command input is OFF All outputs are OFF 2 Relationship with the scan time operation cycle This instruction is executed in synchronization with the scan time If the scan time is short the constant scan mode can be used If the scan mode is too long the timer interrupt function can be used 3 Output type of the PLC Use a transistor output type PLC 4 When ...

Page 428: ...from the buffer memory BFM m2 inside a special extension unit block No m1 are transferred read to n point 16 bit data starting from inside a PLC Operand Type Description Data Type m1 Unit number of a special extension unit block K0 to K7 from the right side of the main unit 16 or 32 bit binary m2 Transfer source buffer memory BFM number 16 or 32 bit binary Transfer destination device number 16 or ...

Page 429: ...32 bit data starting from the buffer memory BFM m2 1 m2 inside a special extension unit block No m1 are transferred read to n devices starting from 1 inside a PLC Related devices Cautions 1 Digit specification in bit device For the 16 bit operation instruction specify K1 to K4 For the 32 bit operation instruction specify K1 to K8 Device Name Description M8028 Enable interrupt flag Disables or enab...

Page 430: ...C Link LT master unit whose unit number is fixed to 0 built in the FX3UC 32MT LT is read to D0 In case of FROM instruction In case of MOVE instruction Example When the BFMs 0 to 3 remote station connection information in the CC Link LT master unit whose unit number is fixed to 0 built in the FX3UC 32MT LT are read to D10 to D13 In case of FROM instruction In case of BMOV instruction M8000 Unit No ...

Page 431: ...m the equipment nearest to the main unit 2 Buffer memory BFM number m2 Up to 32767 16 bit RAM memories are built into a special extension unit block and they are called buffer memories Buffer memory numbers range from 0 to 32766 and their contents vary depending on the function of the extension equipment Setting range K0 to K32766 When BFMs are handled in a 32 bit instruction a specified BFM store...

Page 432: ...emories when the PLC mode is set to RUN the operation time may be long and a watchdog timer error may occur 2 When many FROM TO instructions are driven at the same time When many FROM TO instructions are driven at the same time or when many buffer memories are transferred the operation time may be long and a watchdog timer error may occur 2 Countermeasures 1 Using RBFM FNC278 or WBFM FNC279 instru...

Page 433: ...ms between FROM instruction and TO instruction refer to Subsection 15 9 1 PLC word device Special extension unit block BFM n point 16 bit data starting from inside a PLC are transferred written to n point buffer memories starting from the buffer memory BFM m2 inside a special extension unit block No m1 Operand Type Description Data Type m1 Unit number of a special extension unit block K0 to K7 fro...

Page 434: ...nts K H are written transferred to buffer memories in a special extension unit block using an applied instruction such as TO MOV and BMOV Example When writing H0 to the BFM 27 command in the CC Link LT master unit whose unit number is fixed to 0 built in the FX3UC 32MT LT In case of TO instruction In case of MOV instruction Device Name Description M8028 Enable interrupt flag Disables or enables in...

Page 435: ... FNC159 Positioning Control 16 External FX Device FNC 80 to FNC 89 FNC 80 to FNC 89 provide control instructions for special adapters mainly connected to serial ports PID control loop instruction is included in this group FNC No Mnemonic Format Function Reference 80 RS Serial Communication Section 16 1 81 PRUN Parallel Run Octal Mode Section 16 2 82 ASCI Hexadecimal to ASCII Conversion Section 16 ...

Page 436: ...For detailed explanation refer to the Communication Control Manual Operand type Description Data type Head device of data registers storing data to be sent 16 bit binary or character string m Number of bytes of data to be sent setting range 0 to 4096 1 16 bit binary Head device of data registers storing received data when receiving is completed 16 bit binary or character string n Number of bytes t...

Page 437: ...o or more RS FNC 80 and or RS2 FNC 87 instructions for a same port at the same time It is not permitted to use RS FNC 80 RS2 FNC 87 instruction and IVCK FNC270 IVDR FNC271 IVRD FNC272 IVWR FNC273 IVBWR FNC274 instruction for the same port Device Name Device Name M8063 Serial communication error 1 D8120 2 Communication format setting M8121 1 Sending wait flag D8122 3 Remaining number of data to be ...

Page 438: ...pecification 1 16 or 32 bit binary Device number of transfer destination 1 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 S D DPRUN DPRUNP Mnemonic Operation Condition P FNC 81 PRUN D 16 bit Inst...

Page 439: ...evice Decimal bit device Decimal bit device Octal bit device Command input FNC 81 PRUN K4M0 K4Y000 S D Octal bit device Y Y17 Y16 Y15 Y14 Y13 Y12 Y11 Y10 Y7 Y6 Y5 Y4 Y3 Y2 Y1 Y0 M15 M14 M13 M12 M11 M9 M8 M7 M6 M5 M4 M3 M2 M1 M0 M17 M16 M10 Decimal bit device M Not transferred M0 to M7 M10 to M17 Y0 to Y17 Command input FNC 81 DPRUN K6X000 K6M0 S D X000 to X027 M0 to M7 M10 to M17 M20 to M27 Octal ...

Page 440: ...SCII codes and then stored to the devices and later The 16 bit mode and 8 bit mode options are available for this instruction For operation in each mode refer to the following pages Operand type Description Data type Head device number storing hexadecimal codes to be converted 16 bit binary Head device number storing converted ASCII codes Character string only ASCII code n Number of characters dig...

Page 441: ...tructions When using the 16 bit mode set M8161 to normally OFF M8161 is cleared when the PLC mode is changed from RUN to STOP Operation In the following program conversion is executed as follows Devices after D100 0ABCH D101 1234H D102 5678H Number of specified digits characters and conversion result Bit configuration in the case of n K4 When outputting data in the BCD format for a printer for exa...

Page 442: ...ws Devices after D100 0ABCH D101 1234H D102 5678H Number of specified digits characters and conversion result Bit configuration in the case of n K2 When outputting data in the BCD format for a printer for example it is necessary to convert binary data into BCD data before executing this instruction n K1 K2 K3 K4 K5 K6 K7 K8 K9 D 200 C B A 0 4 3 2 1 8 D 201 C B A 0 4 3 2 1 D 202 C B A 0 4 3 2 D 203...

Page 443: ...nly ASCII codes 0 to 9 and A to F 3 Applicable devices Explanation of function and operation 1 16 bit operation HEX and HEXP Among the ASCII codes stored in and later n characters are converted into hexadecimal codes and then stored to the devices and later The 16 bit mode and 8 bit mode are available for this instruction For operation in each mode refer to the next page and later Operand type Des...

Page 444: ...n the input data has the BCD format it is necessary to convert BCD data into binary data after executing this instruction If ASCII code is not stored in in HEX instruction an operation error occurs and conversion into hexadecimal code is disabled Especially note that ASCII code should be stored in high order 8 bits of also when M8161 is OFF ASCII code Hexadecimal code Low order 8 bits of D200 30H ...

Page 445: ...converted is specified by n M8161 is also used for the RS ASCI CCD and CRC instructions When using the 8 bit mode set M8161 to normally ON M8161 is cleared when the PLC mode is changed from RUN to STOP Operation In the following program conversion is executed as follows Conversion source data Number of specified characters and conversion result indicates 0 When the input data has the BCD format it...

Page 446: ...ted The addition data is stored to and the horizontal parity value is stored to 1 The 16 bit mode and 8 bit mode are available in this instruction For the operation in each mode refer to the following pages Operand type Description Data type Head device number of applicable device 16 bit binary or character string Head device number storing the calculated data 16 bit binary or character string n N...

Page 447: ... CRC instructions When using the 16 bit mode set M8161 to normally OFF M8161 is cleared when the PLC mode is changed from RUN to STOP Example of 16 bit conversion In the following program conversion is executed as follows Example of data contents Low order 8 bits of D100 K100 01100100 High order 8 bits of D100 K111 0110111 1 Low order 8 bits of D101 K100 01100100 High order 8 bits of D101 K 98 011...

Page 448: ... is changed from RUN to STOP Example of 8 bit conversion In the following program conversion is executed as follows Example of data contents D 100 K100 01100100 D 101 K111 0110111 1 D 102 K100 01100100 D 103 K 98 01100010 D 104 K123 0111101 1 D 105 K 66 01000010 D 106 K100 01100100 D 107 K 95 0101111 1 D 108 K210 11010010 D 109 K 88 01011000 Total K1091 Horizontal parity 1000010 1 When the number ...

Page 449: ... protocol communication by way of serial ports in accordance with RS 232C or RS 485 provided in the main unit For detailed explanation refer to the Data Communication Edition Operand type Description Data type Head device of data registers storing data to be sent 16 bit binary or character string m Number of bytes of data to be sent setting range 0 to 4 096 16 bit binary Head device of data regist...

Page 450: ...M8403 M8423 Receiving complete flag 1 D8402 D8422 Remaining number of data to be sent 1 M8404 M8424 Carrier detection flag D8403 D8423 Monitor for number of received data 1 D8405 D8425 Communication parameter display M8409 M8429 Timeout evaluation flag D8409 D8429 Timeout time setting D8410 D8430 Header 1 2 D8411 D8431 Header 3 4 D8412 D8432 Terminator 1 2 D8413 D8433 Terminator 3 4 D8414 D8434 Re...

Page 451: ...it operation PID When the target value measured value and parameters to 6 are set and then a program is executed the operation result MV is stored to the output value at every sampling time Operand type Description Data type Data register number storing the target value SV 16 bit binary Data register number storing the measured value PV 16 bit binary Data register number storing a parameter 16 bit...

Page 452: ...g In the case of limit cycle method During auto tuning the ULV or LLV value is output automatically When auto tuning is finished the specified MV value is set 3 Auto tuning In the case of step response method Before driving PID instruction the user should set the initial output value During auto tuning PID instruction does not change the MV output 1 1 When auto tuning is not used the number of poi...

Page 453: ...0 and bit 5 is set to 1 in 1 for the operation setting ACT 23 1 Output variation decremental alarm set value 0 to 32767 It is valid when bit 2 is set to 1 and bit 5 is set to 0 in 1 for the operation setting ACT Output lower limit set value 32768 to 32767 It is valid when bit 2 is set to 0 and bit 5 is set to 1 in 1 for the operation setting ACT 24 1 Alarm output bit0 0 Input variation incremental...

Page 454: ...bits 1 2 and 5 are any value other than 0 Twenty five devices are occupied from the head device specified in Operation setting ACT When all of bits 1 2 and 5 are 0 Twenty devices are occupied from the head device specified in 3 When specifying a device in the latch area backed up by the battery For the output value MV in PID instruction specify a data register D in the non latch area When specifyi...

Page 455: ...rnal FX Device 17 FNC100 FNC109 Data Transfer 2 18 FNC110 FNC139 Floating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control 17 Data Transfer 2 FNC100 to FNC109 FNC100 to FNC109 provide an instruction for executing complicated processing for fundamental applied instructions and for executing special processing FNC No Mnemonic Symbol Function Reference 100 101 102 ZPUSH Ba...

Page 456: ...a use ZPOP FNC103 instruction Use ZPUSH FNC102 and ZPOP FNC103 instruction as a pair 3 By specifying a same device to ZPUSH FNC102 and ZPOP FNC103 instructions can be used in the nest structure In this case the occupied points are added by 16 after every time ZPUSH FNC102 instruction is executed Secure in advance sufficient area for the number of the next structure Operand Type Description Data Ty...

Page 457: ...oints used after in ZPUSH FNC102 instruction exceeds the corresponding device range error code K6706 When the number of times of batch storage stores a negative value while ZPUSH FNC102 instruction is executed error code K6707 Instruction Description ZPOP FNC103 Restores the index registers V0 to V7 and Z0 to Z7 which were batch stored temporarily by ZPUSH FNC102 instruction D When the nest struct...

Page 458: ...example In the program shown below the contents of the index registers Z0 to Z7 and V0 to V7 before execution of subroutine program are batch stored in D0 and later when index registers are used in the subroutine after the pointer P0 X000 M8002 Label P 0 M8000 RUN monitor M8000 FNC 01 CALL P 0 D 0 RST FNC 06 FEND FNC102 ZPUSH D 0 END FNC103 ZPOP D 0 FNC 02 SRET Program using index registers ...

Page 459: ...stored the number of times of batch storage is decremented by 1 2 For temporarily batch storing the data use ZPUSH FNC102 instruction Use ZPUSH FNC102 and ZPOP FNC103 instruction as a pair Related instruction Errors An operation error is caused in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When the number of times of batch storage D stores 0 or a negati...

Page 460: ...EVAL Character String to Floating Point Conversion Section 18 5 118 EBCD Floating Point to Scientific Notation Conversion Section 18 6 119 EBIN Scientific Notation to Floating Point Conversion Section 18 7 120 EADD Floating Point Addition Section 18 8 121 ESUB Floating Point Subtraction Section 18 9 122 EMUL Floating Point Multiplication Section 18 10 123 EDIV Floating Point Division Section 18 11...

Page 461: ...tion 2 20 FNC150 FNC159 Positioning Control 129 INT Floating Point to Integer Conversion Section 18 17 130 SIN Floating Point Sine Section 18 18 131 COS Floating Point Cosine Section 18 19 132 TAN Floating Point Tangent Section 18 20 133 ASIN Floating Point Arc Sine Section 18 21 134 ACOS Floating Point Arc Cosine Section 18 22 135 ATAN Floating Point Arc Tangent Section 18 23 136 RAD Floating Poi...

Page 462: ... and DECMPP The comparison value 1 is compared with the comparison source 1 as floating point data and either bit among 1 and 2 turns ON according to the result smaller same or larger Operand Type Description Data Type Device number storing binary floating point data to be compared Real number binary 1 Device number storing binary floating point data to be compared Head bit device number to which ...

Page 463: ...2 20 FNC150 FNC159 Positioning Control When a constant K or H is specified as 1 or 1 it is automatically converted from binary into binary floating point real number when the instruction is executed Caution 1 Number of occupied devices Three devices are occupied from 1 and 2 Make sure that these devices are not used for any other purpose S1 S1 S2 S2 Command input FNC110 DECMP Even if the command i...

Page 464: ...ith index registers V and Z Operand Type Description Data Type Data register number storing binary floating point data to be compared Real number binary 1 Data register number storing binary floating point data to be compared Data register number storing binary floating point data to be compared Head bit device number to which the comparison result is output Three devices are occupied Bit Oper and...

Page 465: ...nd 2 turns ON according to the result smaller same or larger When a constant K or H is specified as 1 1 or 1 it is automatically converted into binary floating point when the instruction is executed Cautions 1 Number of occupied devices Three devices are occupied from 1 and 2 Make sure that these devices are not used for any other purpose 2 Comparison values 1 and 1 Make sure that two comparison v...

Page 466: ...ogram shown below a real number 1 23 is transferred to D11 and D10 when X007 turns ON Operand Type Description Data Type Binary floating point data transfer source or device number storing data Real number binary Device number receiving floating point data Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter S...

Page 467: ... contents binary floating point data of 1 are converted into a character string according to the contents specified by 1 and 2 and then stored to devices and later A real number can be directly specified as The data after conversion varies depending on the display specification stored in Operand Type Description Data Type Binary floating point data to be converted or device storing data Real numbe...

Page 468: ... the binary floating point data cannot be accommodated in the number of digits of the decimal part low order digits of the decimal part are rounded Decimal point format Total number of digits Number of digits of decimal part Sign 1 2 ASCII code in specified total number of digits 1 th digit ASCII code in specified total number of digits 3 th digit ASCII code in specified total number of digits 5 t...

Page 469: ...the decimal part is 0 Total number of digits 6 When the number of digits of the decimal part is any value other than 0 Total number of digits Number of digits of decimal part 7 1 2 3 Low order digits of decimal part 0 Decimal point format 8 Total number of digits 2 Number of digits of decimal part 1 2 Total number of digits Automatically added 1 1 23456 S1 S1 S2 S2 S2 1 2 3 Low order digits of dec...

Page 470: ...mal part low order digits of the decimal part are rounded When the number of digits of the decimal part is set to any value other than 0 2EH is automatically stored in specified number of digits of decimal part 1 th digit When the number of digits of the decimal part is 0 2EH is not stored As the sign of the exponent part 2BH is stored when the exponent is positive and 2DH is stored when the expon...

Page 471: ...In the case of decimal point format When the number of digits of the decimal part is 0 Total number of digits 2 When the number of digits of the decimal part is any value other than 0 Total number of digits Number of digits of decimal part 3 In the case of exponent format When the number of digits of the decimal part is 0 Total number of digits 6 When the number of digits of the decimal part is an...

Page 472: ... later when X000 turns ON X000 FNC116 DESTRP R0 R10 END D0 Total number of digits 0 3 3 0 Space Number of digits of decimal part 0 7 3 R11 R1 R10 R12 Conversion format Total number of digits Number of digits of decimal part R0 0 0327457 20H space 2EH b15 b8 b7 b0 00H is automatically stored at the end of a character string 33H 3 00H 20H space 30H 0 30H 0 33H 3 D1 D0 D2 D3 X000 FNC116 DESTRP R0 R10...

Page 473: ...string stored in and later is converted into binary floating point and stored to 1 A specified character string may be in the decimal point format or exponent format A character string in either format can be converted into binary floating point data Operand Type Description Data Type Head device number storing character string data to be converted into binary floating point data Character string ...

Page 474: ... result may contain rounding error a In the case of decimal point format 31H 1 00H b15 b8 b7 b0 1 2 3 4 30H 0 38H 8 32H 2 2DH 2EH 37H 7 31H 1 7 8 1 0 1 2 1 Binary floating point real number 1 07812 D S S S S S D b15 b8 b7 b0 1 2 3 4 20H space 2EH 00H 32H 2 31H 1 2DH 31H 1 33H 3 30H 0 2BH 30H 0 31H 1 45H E 5 6 3 2 0 1 1 1 0 E 1 Binary floating point real number 1 3201E 10 D S D S S S S S S S b15 b8...

Page 475: ...e or 30H 0 exists between numbers except the first 0 in a character string specified by 20H or 30H is ignored during conversion When 30H 0 exists between a number and E in a character string in the exponent format 30H is ignored during conversion A character string can consist of up to 24 characters b15 b8 b7 b0 1 2 3 4 5 6 Rounded 1 Binary floating point real number 1 35034E 2 20H space 2EH 00H 3...

Page 476: ...K6706 Program examples 1 In the program example shown below a character string stored in R0 and later is converted into binary floating point and stored to D0 and D1 when X000 turns ON Device Name Description Condition Operation M8020 Zero flag The conversion result is true 0 The mantissa part is 0 The zero flag M8020 turns ON M8021 Borrow flag The absolute value of the conversion result is less t...

Page 477: ...D10 and later is converted into binary floating point and stored to D100 and D101 when X000 turns ON Operations at overflow underflow and zero Condition Operation The absolute value of the conversion result is less than 2 126 The value of is rounded to the minimum value 2 126 of 32 bit real numbers and the borrow flag M8021 turns ON The absolute value of the conversion result is not less than 2128...

Page 478: ...ific notation Real number decimal Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 P FNC 118 EBCD D Mnemonic Operation Condition 16 bit Instruction DEBCD DEBCDP Mnemonic Operation Condition 32 bit Instruction 9 st...

Page 479: ...6 FNC80 FNC89 External FX Device 17 FNC100 FNC109 Data Transfer 2 18 FNC110 FNC139 Floating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control Caution 1 Handling of floating point In floating point operations all data is handled in binary floating point Because binary floating point is difficult to understand requiring a dedicated monitoring method it is converted into sc...

Page 480: ...rted binary floating point Real number binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 P FNC 119 EBIN D Mnemonic Operation Condition 16 bit Instruction DEBIN DEBINP Mnemonic Operation Condition 32 bit Inst...

Page 481: ...External FX Device 17 FNC100 FNC109 Data Transfer 2 18 FNC110 FNC139 Floating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control Program example By DEBIN instruction a numeric value containing the decimal point can be directly converted into binary floating point Example Converting 3 14 into binary floating point 3 14 314 10 2 scientific notation For program examples of f...

Page 482: ...evice is specified A same device number can be specified in 1 1 and 1 In this case note that the addition result changes in every operation cycle when the continuous operation type instruction DEADD is used Operand Type Description Data Type Word device number storing binary floating point data used in addition Real number 1 Word device number storing binary floating point data used in addition Da...

Page 483: ...ry floating point format is transferred to 1 When a constant K or H is specified as 1 or 1 it is automatically converted into binary floating point Caution 1 When a same device is specified A same device number can be specified in 1 1 and 1 In this case note that the subtraction result changes in every operation cycle when the continuous operation type instruction DESUB is used Operand Type Descri...

Page 484: ... is specified as 1 or 1 it is automatically converted into binary floating point Operand Type Description Data Type Word device number storing binary floating point data used in multiplication Real number binary 1 Word device number storing binary floating point data used in multiplication Data register number storing the multiplication result Oper and Type Bit Devices Word Devices Others System U...

Page 485: ...y floating point data 1 is divided by binary floating point data 1 and the division result in the binary floating point format is transferred to 1 When a constant K or H is specified as 1 or 1 it is automatically converted into binary floating point Operand Type Description Data Type Word device number storing binary floating point data used in division Real number binary 1 Word device number stor...

Page 486: ...case The error flag M8067 turns ON and the error code is stored in D8067 When the operation result is outside the following range error code K6706 2 126 Operation result 2128 Operand Type Description Data Type Head device number storing binary floating point data used in exponential operation Real number binary Head device number storing the operation result Oper and Type Bit Devices Word Devices ...

Page 487: ...value set in X020 to X027 is 88 or less because of loge2128 88 7 If a value 89 or more is set an operation error occurs To prevent this operation error when a value more than 89 is set M0 is set to ON so that the exponential operation is not executed 2 Conversion from natural logarithm into common logarithm In the CPU operations are executed in natural logarithm For obtaining a value in common log...

Page 488: ...peration error is caused in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When a negative value is specified in error code K6706 When 0 is specified in error code K6706 Operand Type Description Data Type Head device number storing binary floating point data used in the natural logarithm operation Real number binary Head device number storing the operation ...

Page 489: ...149 Data Operation 2 20 FNC150 FNC159 Positioning Control Program example In the program example shown below natural logarithm of 10 set in D50 is calculated and stored to D30 and D31 when X000 turns ON X000 FNC 49 FLT D50 Data used in the natural logarithm operation is set 1 The data to be used is converted into binary floating point real number 2 The natural logarithm operation is executed 3 D40...

Page 490: ...ion error occurs in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When a negative value is specified in error code K6706 When 0 is specified in error code K6706 Operand Type Description Data Type Head device number storing binary floating point data used in the common logarithm operation Real number binary Head device number storing the operation result Op...

Page 491: ...49 Data Operation 2 20 FNC150 FNC159 Positioning Control Program example In the program example shown below common logarithm of 15 set in D50 is calculated and stored to D30 and D31 when X000 turns ON X000 FNC 49 FLT D50 Data used in the natural logarithm operation is set 1 The data to be used is converted into binary floating point real number 2 The natural logarithm operation is executed 3 D40 F...

Page 492: ...rror The contents of 1 are valid only when a positive value is set When a negative value is set the operation error flag M8067 turns ON and the instruction is not executed Operand Type Description Data Type Word device number storing binary floating point data whose square root is calculated Real number binary 1 Data register number storing the square root of binary floating point data Oper and Ty...

Page 493: ...on and operation 1 32 bit operation DENEG and DENEGP The sign of binary floating point stored in 1 is inverted and the negation result is stored to 1 Program example In the program example shown below the sign of floating point data stored in D100 and D101 is inverted and the negation result is stored to D100 and D101 when X000 turns ON Operand Type Description Data Type Head device number storing...

Page 494: ... stored in 1 is converted into a binary integer and transferred to 1 Instruction for inverse conversion The inverse conversion is executed by DFLT FNC 49 instruction For FLT FNC 49 instruction refer to Section 12 10 Operand Type Description Data Type Data register number storing binary floating point data to be converted into a binary integer Real number binary Data register number storing a conve...

Page 495: ...9 Floating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control Related devices For the methods of zero borrow and carry flags refer to Subsection 6 5 2 Caution 1 Caution in the operation Values after the decimal point are rounded Device Name Description M8020 Zero flag Turns ON when the operation result is 0 M8021 Borrow flag Turns ON when the conversion result is cut in t...

Page 496: ...ion Data Type Device number storing an angle in radian in binary floating point Real number binary Device number storing the sine value in binary floating point Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 3 M...

Page 497: ... 17 FNC100 FNC109 Data Transfer 2 18 FNC110 FNC139 Floating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control Program example X001 FNC 12 MOVP K 45 D 0 K45 D 0 X002 FNC 12 MOVP K 90 D 0 K90 D 0 M8000 FNC 49 FLTP D 0 D 4 D 0 D5 D4 Binary floating point value RUN monitor FNC123 DEDIV K31415926 K1800000000 D 20 π 180 D21 D20 Binary floating point FNC122 DEMUL D 4 D 20 D 30 ...

Page 498: ...ption Data Type Device number storing an angle in radian in binary floating point Real number binary Device number storing the cosine value in binary floating point Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3...

Page 499: ...eration 1 32 bit operation DTAN and DTANP A value of angle binary floating point specified in 1 is converted into the tangent value and transferred to 1 Operand Type Description Data Type Device number storing an angle in radian in binary floating point Real number binary Device number storing the tangent value in binary floating point Oper and Type Bit Devices Word Devices Others System User Digi...

Page 500: ...6 instruction refer to Section 18 24 For DEG FNC137 instruction refer to Section 18 25 Error An operation error is caused in the following case The error flag M8067 turns ON and the error code is stored in D8067 When a value specified in is outside the range from 1 0 to 1 0 error code K6706 Operand Type Description Data Type Head device number storing a sine value used in the SIN 1 arc sine operat...

Page 501: ...1 is calculated and the angle is output in 4 digit BCD to Y040 to Y057 when X000 turns ON Operation when 0 5 is stored in D0 and D1 The angle in radian is calculated by the SIN 1 operation 1 The value in radian is converted into the value in degree 2 The angle expressed in binary floating point real number is converted into an integer binary 3 X000 FNC137 DDEG D10 D20 FNC133 DASIN D0 D10 FNC129 IN...

Page 502: ...36 instruction refer to Section 18 24 For DEG FNC137 instruction refer to Section 18 25 Error An operation error is caused in the following case The error flag M8067 turns ON and the error code is stored in D8067 When a value specified in is outside the range from 1 0 to 1 0 error code K6706 Operand Type Description Data Type Head device number storing a cosine value used in the COS 1 arc cosine o...

Page 503: ...1 is calculated and the angle is output in 4 digit BCD to Y040 to Y057 when X000 turns ON Operation when 0 5 is stored in D0 and D1 The angle expressed in the binary floating point real number is converted into an integer binary 3 X000 FNC137 DDEG D10 The angle in radian is calculated by the COS 1 operation 1 The value in radian is converted into the value in degree 2 D20 FNC134 DACOS D0 D10 FNC12...

Page 504: ... and degree refer to RAD FNC136 and DEG FNC137 instructions For RAD FNC136 instruction refer to Section 18 24 For DEG FNC137 instruction refer to Section 18 25 Operand Type Description Data Type Head device number storing a tangent value used in the TAN 1 arc tangent operation Real number binary Head device number storing the operation result Oper and Type Bit Devices Word Devices Others System Us...

Page 505: ...nd D1 is calculated and the angle is output in 4 digit BCD to Y040 to Y057 when X000 turns ON Operation when 1 is stored in D0 and D1 The angle expressed in binary floating point real number is converted into an integer binary 3 X000 FNC137 DDEG D10 The angle in radian is calculated by the TAN 1 operation 1 The value in radian is converted into the value in degree 2 D20 FNC135 DATAN D0 D10 FNC129 ...

Page 506: ...fied as The conversion from degree into radian is executed as follows Operand Type Description Data Type Head device number storing a value in degree to be converted into a value in radian Real number binary Head device number storing a value in radian acquired by conversion Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real ...

Page 507: ...0 FNC159 Positioning Control Program example In the program example shown below a 4 digit BCD value set in degree in X020 to X037 is converted into a binary floating point value in radian and stored to D20 and D21 when X000 turns ON Operation when 120 is specified in X020 to X037 X000 FNC 49 FLT D0 Angle to be converted into radian is input 1 The input angle is converted into binary floating point...

Page 508: ...on from radian into degree is executed as follows Operand Type Description Data Type Head device number storing a value in radian to be converted into a value in degree Real number binary Head device number storing a value in degree acquired by conversion Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter St...

Page 509: ...ple In the program example shown below a binary floating point value set in radian in D20 and D21 is converted into a BCD value in degree and stored to Y040 and Y057 when X000 turns ON Operation when 1 435792 is specified in D20 and D21 X000 FNC129 INT D10 A value in radian is converted into a value in degree 1 The angle in binary floating point real number is converted into an integer 2 The conve...

Page 510: ...plied instructions and for executing special processing FNC No Mnemonic Symbol Function Reference 140 WSUM Sum of Word Data Section 19 1 141 WTOB WORD to BYTE Section 19 2 142 BTOW BYTE to WORD Section 19 3 143 UNI 4 bit Linking of Word Data Section 19 4 144 DIS 4 bit Grouping of Word Data Section 19 5 145 146 147 SWAP Byte Swap Section 19 6 148 149 SORT2 Sort Tabulated Data 2 Section 19 7 WSUM n ...

Page 511: ...data 3 Applicable devices Explanation of function and operation 1 16 bit operation WSUM and WSUMP The sum of n 16 bit data starting from is stored as 32 bit data in 1 Operand type Description Data type Head device number storing data whose sum is calculated 16 or 32 bit binary Head device number storing sum 32 or 64 bit binary n Number of data 0 n 16 or 32 bit binary Oper and Type Bit Devices Word...

Page 512: ...32 bits Errors An operation error is caused in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When n points starting from are outside the specified device range error code K6706 When n is smaller than or equivalent to 0 error code K6706 Program example In the program shown below the sum of 16 bit data stored in D10 to D14 is stored in D101 D106 Instruction ...

Page 513: ...f each device and later storing the separated byte data Operand type Description Data type Head device number storing data to be separated in unit of byte 16 bit binary Head device number storing result of separation in unit of byte n Number of byte data to be separated 0 n Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real N...

Page 514: ... an odd number the number of a rounded up value decides the number of devices error code K6706 When the separated data destination devices to n 1 are outside the specified device range error code K6706 Program example In the program shown below the data stored in D10 to D12 is separated in units of byte and stored in D20 to D25 Instruction Description BTOW FNC142 Combines the low order 8 bits low ...

Page 515: ...s starting from as shown below 2 The high order byte 8 bits of each combination source 16 bit data and later is ignored Operand type Description Data type Head device number storing data to be combined in unit of byte 16 bit binary Head device number storing data acquired by combination in unit of byte n Number of byte data to be combined 0 n Oper and Type Bit Devices Word Devices Others System Us...

Page 516: ...on error is caused in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When the combination source devices to n 1 are outside the specified device range error code K6706 When the combined data destination devices to n 2 are outside the specified device range error code K6706 When n is an odd number the number of a rounded up value decides the numer of devices...

Page 517: ...al FX I O Device 16 FNC80 FNC89 External FX Device 17 FNC100 FNC109 Data Transfer 2 18 FNC110 FNC139 Floating Point 19 FNC140 FNC149 Data Operation 2 20 FNC150 FNC159 Positioning Control Program example In the program shown below the low order byte 8 bits data stored in D20 to D25 is combined and stored in D10 to D12 31H D20 D21 The high order byte is ignored D22 6 bytes D10 D11 D12 12H 55H 78H 49...

Page 518: ...scription Data type Head device number storing data to be combined 16 bit binary Head device number storing combined data n Number of data to be combined 0 to 4 When n is 0 UNI instruction is not executed Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D ...

Page 519: ...er 4 bits of are set to 0 Related instruction Errors An operation error occurs in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When to n are outside the specified device range error code K6706 When n is outside the range from 0 to 4 error code K6706 Program example In the program below the low order 4 bits of D0 to D2 are combined and stored in D10 when X...

Page 520: ...type Device number storing data to be separated 16 bit binary Head device number storing separated data n Number of data to be separated 0 to 4 When n is 0 DIS instruction is not executed Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify ...

Page 521: ...NC150 FNC159 Positioning Control Errors An operation error occurs in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When to n are outside the specified device range error code K6706 When n is outside the range from 0 to 4 error code K6706 Program example In the program below D0 is separated in units of 4 bits and stored in D10 to D13 when X000 turns ON D D ...

Page 522: ...ycle This instruction works in the same way as the extension function of XCH FNC 17 instruction Operand type Description Data type Word device whose high order 8 bits and low order 8 bits are swapped each other 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S ...

Page 523: ... Explanation of function and operation 1 16 bit operation SORT2 In the data table sorting source having m1 x m2 points from data lines are sorted in the ascending or descending order based on the group data in the column No n and the result is stored in the data table sorting result having m1 x m2 points from For operation examples refer to Page 523 Operand type Description Data type Head device n...

Page 524: ...the sorting source data table has 3 lines and 4 columns m1 K3 m2 K4 For the sorting result data table understand as Set the sorting order by setting M8165 to ON or OFF When a data register D or extension register R is used for m1 the data length is 32 bits For example when m1 is specified in D0 m1 is 32 bit data stored in D1 D0 When the command input turns ON data sorting is started Data sorting i...

Page 525: ...a serial number such as a control number in the first column so that the original line number can be estimated based on the contents Sorting source data 1 Sorting result when the instruction is executed with n K2 column No 2 in the case of ascending order 2 Sorting result when the instruction is executed with n K3 column No 3 in the case of descending order Number of groups m2 K4 Column No 1 2 3 4...

Page 526: ...ed for a circuit block including SORT2 instruction When a same device is specified in and The source data is overwritten with the data acquired by sorting Pay rigid attention not to change the contents of until execution of SORT2 instruction is completed Device Name Description M8029 Instruction execution complete Turns ON when data sorting is completed M8165 Descending order Sorts data in the des...

Page 527: ...arget instruction below while pulses are output the PLC executes the operation shown below 1 Supported in Ver 2 00 or later FNC No Mnemonic Symbol Function Reference 150 DSZR DOG Search Zero Return Section 20 1 151 DVIT Interrupt Positioning Section 20 2 152 TBL Batch Data Positioning Mode Section 20 3 153 154 155 ABS Absolute Current Value Read Section 20 4 156 ZRN Zero Return Section 20 5 157 PL...

Page 528: ...Specify a transistor output Y000 Y001 or Y002 in the main unit or Y000 Y001 Y002 2 or Y003 2 in a special high speed output adapter 1 1 Special high speed output adapters cannot be connected to the FX3UC 32MT LT 2 For specifying Y002 or Y003 in a special high speed output adapter the second special high speed output adapter is required Points When using a relay output type FX3U PLC a special high ...

Page 529: ... RUN while the DSZR FNC150 instruction is executed that is while a pulse is output Note that the PLC decelerates and stops pulse output if write during RUN is executed to a circuit block including the FNC150 instruction while pulses are output Function change depending on the version The function of FNC150 instruction is changed depending on the version as shown in the table below For explanation ...

Page 530: ...ing Y002 or Y003 in a special high speed output adapter the second special high speed output adapter is required Points When using a relay output type FX3U PLC a special high speed output adapter is required Outputs of special high speed output adapters work as differential line drivers Operand type Description Data type Output pulse number incremental address after interrupt 1 16 or 32 bit binary...

Page 531: ...ion change depending on the version The functions of FNC151 instruction are changed depending on the version as shown in the table below For explanation of the instruction and the contents of function change refer to the Positioning Control Edition Special high speed output adapter No Pulse output Rotation direction output No 1 1st unit For Y000 Y004 For Y001 Y005 No 2 2nd unit For Y002 Y006 For Y...

Page 532: ...r the second special high speed output adapter is required Points When using a relay output type FX3U PLC a special high speed output adapter is required Outputs of special high speed output adapters work as differential line drivers Explanation of function and operation Caution on write during RUN Write during RUN is disabled to a circuit block including TBL FNC152 instruction Instruction Descrip...

Page 533: ...instruction refer to the Positioning Control Edition 1 Instruction format 2 Set data 3 Applicable devices S1 Specify a transistor output S2 D b cannot be indexed with index registers V and Z Explanation of function and operation Operand type Description Data type Head device number inputting absolute ABS data output signal sent from servo amplifier Three points are occupied from Bit Head device nu...

Page 534: ...d to the FX3UC 32MT LT 2 For specifying Y002 or Y003 in a special high speed output adapter the second special high speed output adapter is required Points When using a relay output type FX3U PLC a special high speed output adapter is required Outputs of special high speed output adapters work as differential line drivers Operand type Description Data type Speed when zero return is started 1 16 or...

Page 535: ...tion is executed that is while pulses are output Note that the PLC decelerates and stops pulse output if write during RUN is executed to a circuit block including the FNC156 instruction while pulses are output Function change depending on the version The function of FNC156 instruction is changed depending on the version as shown in the table below For explanation of the instruction and the content...

Page 536: ...ut adapters work as differential line drivers S2 When not using a special high speed output adapter in an FX3U PLC or when using an FX3UC PLC specify a transistor output number When using a special high speed output adapter in an FX3U PLC specify the following output numbers S3 D b cannot be indexed with index registers V and Z Operand type Description Data type Device number specifying output pul...

Page 537: ...write during RUN is executed to a circuit block including FNC157 instruction while pulses are output 1 Supported in Ver 2 00 or later Function change depending on the version The function of the FNC157 instruction is changed depending on the version as shown in the table below For explanation of the instruction and the contents of function change refer to the Positioning Control Edition PLC operat...

Page 538: ...nnot be connected to the FX3UC 32MT LT 2 For specifying Y002 or Y003 in a special high speed output adapter the second special high speed output adapter is required Points When using a relay output type FX3U PLC a special high speed output adapter is required Outputs of special high speed output adapters work as differential line drivers Operand type Description Data type Output pulse number relat...

Page 539: ...dapter in an FX3U PLC or when using an FX3UC PLC specify a transistor output number When using a special high speed output adapter in an FX3U PLC specify the following output numbers S3 D b cannot be indexed with index registers V and Z Explanation of function and operation Caution on write during RUN Avoid write during RUN while DRVI FNC158 instruction is executed that is while pulses are output ...

Page 540: ...e FX3UC 32MT LT 2 For specifying Y002 or Y003 in a special high speed output adapter the second special high speed output adapter is required Points When using a relay output type FX3U PLC a special high speed output adapter is required Outputs of special high speed output adapters work as differential line drivers Operand type Description Data type Output pulse number relative address 1 16 or 32 ...

Page 541: ...dapter in an FX3U PLC or when using an FX3UC PLC specify a transistor output number When using a special high speed output adapter in an FX3U PLC specify the following output numbers S3 D b cannot be indexed with index registers V and Z Explanation of function and operation Caution on write during RUN Avoid write during RUN while DRVA FNC159 instruction is executed that is while pulses are output ...

Page 542: ...converts the format of the time data FNC No Mnemonic Symbol Function Reference 160 TCMP RTC data compare Section 21 1 161 TZCP RTC data zone compare Section 21 2 162 TADD RTC data addition Section 21 3 163 TSUB RTC data subtraction Section 21 4 164 HTOS Hour to second conversion Section 21 5 165 STOH Second to hour conversion Section 21 6 166 TRD Read RTC data Section 21 7 167 TWR Set RTC data Sec...

Page 543: ... registers V and Z Operand type Description Data type Specifies hour of the comparison time setting range 0 to 23 16 bit binary Specifies minute of the comparison time setting range 0 to 59 16 bit binary Specifies second of the comparison time setting range 0 to 59 16 bit binary Specifies hour of the time data hour minute and second Three devices are occupied 16 bit binary Turns ON or OFF accordin...

Page 544: ...in the case of Turns ON in the case of Command input FNC160 TCMP S1 S2 S3 S D Even if the command contact turns OFF from ON and TCMP instruction is not executed 1 and 2 hold the status before the command contact turned OFF D 1 D 2 D minute hour second S1 S2 S3 minute hour second S1 S2 S3 minute hour second S1 S2 S3 S 1 minute hour 2 second S S S 1 minute hour 2 second S S S 1 minute hour 2 second ...

Page 545: ...3 Applicable devices S D b cannot be indexed with index registers V and Z Operand type Description Data type Specifies hour of the lower limit comparison time hour minute and second Three devices are occupied 16 bit binary Specifies hour of the upper limit comparison time hour minute and second Three devices are occupied 16 bit binary Specifies hour of the time data hour minute and second Three de...

Page 546: ...ols for the machine 2 When utilizing the time hour minute and second of the real time clock built in a PLC Read the values of special data registers by TRD FNC166 instruction and then specify those word devices as the operands S S S D Turns ON in the case of Turns ON in the case of Turns ON in the case of Command input FNC161 TZCP S1 S2 S D This instruction compares the comparison time zone specif...

Page 547: ...of The setting range of hour is from 0 to 23 The setting range of minute is from 0 to 59 The setting range of second is from 0 to 59 S1 Specify the lower limit of the comparison time zone in hour minute and second S1 1 and 2 S1 S2 S2 1 and S2 2 Specify the upper limit of the comparison time zone in hour minute and second S S 1 and 2 S Specify the time data in hour minute and second 1 and 2 D D D T...

Page 548: ...ies hour of the time data hour minute and second used in addition Three devices are occupied 16 bit binary Specifies hour of the time data hour minute and second used in addition Three devices are occupied 16 bit binary Stores the addition result hour minute and second of two time data Three devices are occupied 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specific...

Page 549: ...ed devices Three devices are occupied by and respectively Make sure that these devices are not used in other controls for the machine 2 When utilizing the time hour minute and second of the real time clock built in a PLC Read the values of special data registers using the TRD FNC166 instruction and then specify those word devices as the operands Program example When the operation result exceeds 24...

Page 550: ...pe Specifies hour of the time data hour minute and second used in subtraction Three devices are occupied 16 bit binary Specifies hour of the time data hour minute and second used in subtraction Three devices are occupied 16 bit binary Stores the subtraction result hour minute and second of two time data Three devices are occupied 16 bit binary Oper and Type Bit Devices Word Devices Others System U...

Page 551: ... devices Three devices are occupied by and respectively Make sure that these devices are not used in other controls for the machine 2 When utilizing the time hour minute and second of the real time clock built in a PLC Read the values of special data registers using TRD FNC166 instruction and then specify those word devices as the operands Program example When the operation result is smaller than ...

Page 552: ...follows Operand type Description Data type Head device number storing the time data hour minute and second before conversion 16 bit binary Device number storing the time data second after conversion 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY ...

Page 553: ...8 seconds is specified the operation is as follows Error An operation error is caused in the following case The error flag M8067 turns ON and the error code is stored in D8067 When the data of 1 or 2 is outside the allowable range error code K6706 Program example In the program shown below the time data read from the real time clock built in a PLC is converted into data in units of second and stor...

Page 554: ...s as follows Operand type Description Data type Device number storing the time data second before conversion 16 or 32 bit binary Head device number storing the time data hour minute and second after conversion 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX...

Page 555: ...ed to three devices 1 and 2 hour minute and second For example when 45 325 seconds is specified the operation is as follows Error An operation error is caused in the following case The error flag M8067 turns ON and the error code is store in D8067 When the data of is outside the allowable range error code K6706 Program example In the program shown below the time data in units of second stored in D...

Page 556: ...re not used in other controls for the machine Operand type Description Data type Specifies the head device number storing the clock data Seven devices are occupied 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 ...

Page 557: ...e real time clock built in a PLC 1 Instruction format 2 Set data 3 Applicable devices Explanation of function and operation The clock data stored in to 6 is written to D8013 to D8019 for the real time clock built in a PLC Operand type Description Data type Specifies the head device number to which the clock data is written Seven devices are occupied 16 bit binary Oper and Type Bit Devices Word Dev...

Page 558: ...data time using this instruction it is not necessary to control the special auxiliary relay M8015 time stop and time setting If a numeric value indicating impossible date time is set the clock data is not changed Set the correct clock data and then write it Caution 1 Number of occupied devices Seven devices are occupied by Make sure that these devices are not used in other controls for the machine...

Page 559: ...program D8018 will specify the 4 digit year mode in the second scan and later after the PLC mode is changed to RUN A PLC is normally operating in the 2 digit year mode When the above instruction is executed and K2000 fixed value is transferred to D8018 year in only one operation cycle after the PLC mode was changed to RUN the year mode is switched to the 4 digit mode Execute this program every tim...

Page 560: ...ata register is used the current value data is cleared when the power of the PLC is turned OFF or when the PLC mode switches from STOP to RUN Even after the alarm output turns ON the measurement is continued When the current value reaches the maximum value of 16 bit data the measurement is stopped For continuing the measurement clear the current value stored in and 1 Operand type Description Data ...

Page 561: ...the PLC turns OFF If a general data type register is used the current value data is cleared when the power of the PLC is turned OFF or when the PLC mode switches from STOP to RUN Even after the alarm output turns ON the measurement is continued When the current value 1 reaches the maximum value of 32 bit data the measurement is stopped For continuing the measurement clear the current value stored ...

Page 562: ... for gray codes used in absolute type rotary encoders and instructions dedicated to analog blocks FNC No Mnemonic Symbol Function Reference 170 GRY Decimal to Gray Code Conversion Section 22 1 171 GBIN Gray Code to Decimal Conversion Section 22 2 172 173 174 175 176 RD3A Read form Dedicated Analog Block Section 22 3 177 WR3A Write to Dedicated Analog Block Section 22 4 178 179 D S GRY D S GBIN D R...

Page 563: ...a gray code of up to 32 bits can store a value from 0 to 2 147 483 647 Caution The data conversion speed depends on the scan time of the PLC Operand Type Description Data Type Conversion source data or word device storing conversion source data 16 or 32 bit binary Word device storing data after conversion 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specifica...

Page 564: ...17 using REFF FNC 51 instruction or D8020 filter adjustment so that the filter constant delay is eliminated Operand Type Description Data Type Conversion source data or word device storing conversion source data 16 or 32 bit binary Word device storing data after conversion 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Ind...

Page 565: ...ial block number FX3U PLC K0 to K7 FX3UC PLC K1 to K7 K0 indicates the built in CC Link LT master m2 Analog input channel number FX0N 3A K1 ch 1 or K2 ch 2 FX2N 2AD K21 ch 1 or K22 ch 2 Read data A value read from the analog block is stored FX0N 3A 0 to 255 8 bits FX2N 2AD 0 to 4095 12 bits Operand Type Description Data Type m1 Special block number FX3U PLC K0 to K7 FX3UC PLC K1 to K7 16 bit binar...

Page 566: ... a value output to the analog block FX0N 3A 0 to 255 8 bits FX2N 2DA 0 to 4095 12 bits Operand Type Description Data Type m1 Special block number FX3U PLC K0 to K7 FX3UC PLC K1 to K7 16 or 32 bit binary m2 Analog output channel number 16 or 32 bit binary Data to be written or word device storing data to be written 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit ...

Page 567: ...peration 30 FNC270 FNC274 Ex Device Inverter Comms 23 Introduction of Alternate Instructions FNC180 23 1 Instruction correspondence table Outline EXTR instruction is provided for FX2N and FX2NC PLCs For FX3U and FX3UC PLCs with a built in inverter communication function dedicated instructions shown below are provided EXTR instruction is not provided Instruction correspondence table For the details...

Page 568: ...566 FX3U FX3UC Series Programmable Controllers Programming Manual Basic Applied Instruction Edition 23 Introduction of Alternate Instructions FNC180 23 1 Instruction correspondence table MEMO ...

Page 569: ... 29 FNC250 FNC269 Data Table Operation 30 FNC270 FNC274 Ex Device Inverter Comms 24 Others FNC181 to FNC189 FNC181 to FNC189 provide instructions for generating random numbers executing CRC data operations and processing data in high speed counter operations FNC No Mnemonic Symbol Function Reference 181 182 COMRD Read device comment data Section 24 1 183 184 RND Random Number Generation Section 24...

Page 570: ...tant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 3 3 3 3 3 3 P FNC 182 COMRD Mnemonic Operation Condition 16 bit Instruction 5 steps COMRD COMRDP Mnemonic Operation Condition Continuous Operation Pulse Single Operation 32 bit Instruction S D S D S D Command input FNC182 COMRDP S D S D 0 1 2 When the number of characters in th...

Page 571: ... in D8067 When any comment is not registered written in the device error code K6706 When the range of points used after for comment exceeds the corresponding device range error code K6706 ON OFF status Contents of processing M8091 OFF When the number of characters in the comment is odd 00H is stored in the high order byte 8 bits of the device storing the final character When the number of characte...

Page 572: ...t Data Program example In the program shown below the comment Target Line A set in D100 is stored in ASCII codes in D0 and later when M8091 is OFF when X010 is set to ON X010 FNC182 COMRDP D100 D0 RST M8091 END D0 D1 D2 b15 b8 b7 b0 D3 Comment of D100 Target Line A D4 D5 D6 74H f 61H a 67H g 54H T 72H r 65H e 4CH L 20H spase 00H 6EH n 20H spase 69H i 65H e 41H A ...

Page 573: ...umber to In the pseudo random number sequence the source value of a random number is calculated at every time and this instruction calculates a pseudo random number using the source value Pseudo random number calculation equation D8311 D8310 D8311 D8310 1 1103515245 12345 1 D8311 D8310 16 logical product 00007FFFh 1 To D8311 D8310 write a non negative value 0 to 2 147 483 647 only once when the PL...

Page 574: ... time X010 turns ON When the PLC mode switches from STOP to RUN the time data converted into seconds and added by the value Year Month Day is written to D8311 and D8310 Data in hour minute and second Data in second X010 FNC184 RNDP D100 END M8002 FNC166 TRD D0 FNC164 DHTOS D14 D3 FNC 20 ADD D10 D1 D0 FNC 20 DADD D8310 D12 D14 The clock data is read The data in second is added by the value Year Mon...

Page 575: ... function and operation 1 16 bit operation DUTY 1 The timing clock output destination is set to ON and OFF with the ON duration for n1 scans and OFF duration for n2 scans 2 Specify either one among M8330 to M8334 as the timing clock output destination device Operand Type Description Data Type n1 Number of scans operation cycles to remain ON n1 0 16 bit binary n2 Number of scans operation cycles to...

Page 576: ... caused in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When n1 and or n2 is less than 0 error code K6706 When any device other than M8330 to M834 is set to error code K6705 Timing clock output destination device Scan counting device M8330 D8330 M8331 D8331 M8332 D8332 M8333 D8333 M8334 D8334 n1 n2 status ON OFF status n1 0 n2 0 Fixed to OFF n1 0 n2 0 Fix...

Page 577: ...24 FNC181 FNC189 Others 25 FNC190 FNC199 Block Data Operation 26 FNC200 FNC209 Character String Control 27 FNC210 FNC219 Data Operation 3 28 FNC220 FNC249 Data Comparison 29 FNC250 FNC269 Data Table Operation 30 FNC270 FNC274 Ex Device Inverter Comms Program example In the program shown below when X000 is set to ON M8330 is set to ON for 1 scan and OFF for 3 scans X000 FNC186 DUTY K3 M8330 END K1 ...

Page 578: ...ata unit byte starting from a device specified in and stored to The 8 bit conversion mode and 16 bit conversion mode are available in this instruction and the mode can be switched by turning ON or OFF M8161 For the operation in each mode refer to the following pages X16 X15 X2 1 is used as a polynomial for generating the CRC value CRC 16 Operand Type Description Data Type Head device number storin...

Page 579: ...d for high order 8 bits 1 byte and low order 8 bits 1 byte of a device specified in The operation result is stored to one 16 bit device specified in Example D100 D0 n 6 Device Contents of target data 8 bits 16 bits Device storing data for which the CRC value is generated Low order byte Low order bits of D100 01H 0301H High order byte High order bits of D100 03H 1 Low order byte Low order bits of D...

Page 580: ...f an adopted polynomial is different Reference Major polynomials for generating the CRC value Example D100 D0 n 6 Device Contents of target data Device storing data for which the CRC value is generated Low order byte Low order bits of D100 01H 1 Low order byte Low order bits of D101 03H 2 Low order byte Low order bits of D102 03H 3 Low order byte Low order bits of D103 02H 4 Low order byte Low ord...

Page 581: ...side the allowable range error code K6706 Program example In the program example shown below the CRC value of the ASCII code 0123456 stored in D100 to D106 is generated and stored to D0 when M0 turns ON 1 In the case of 16 bit mode 2 In the case of 8 bit mode Contents of data Target data Device storing data for which CRC value is generated D100 3130H Low order byte 30H High order byte 31H D101 333...

Page 582: ...mer than Ver 2 00 Operand Type Description Data Type Device number of high speed counter or ring counter 1 handled as transfer source 32 bit binary Device number handled as transfer destination n Specification to clear the current value of high speed counter or ring counter 1 transfer source after transfer clear K1 no processing K0 16 bit binary Oper and Type Bit Devices Word Devices Others System...

Page 583: ...ction the current value of a high speed counter can be received at the rising edge or falling edge of an external input at reception of input interrupt Refer to the Program example 2 When DHCMOV instruction is used just before a comparison instruction CMP ZCP or comparison contact instruction the latest value of a high speed counter is used in comparison DHCMOV instruction has the following effect...

Page 584: ...re used in one input interrupt program only the instruction just after the interrupt pointer is executed when an interrupt event is generated and then the interrupt program is executed after that DHCMOV the second and later instructions are executed when such instructions are executed in the same way as the normal interrupt processing Do not use M8934 as the command contact for DHCMOV instructions...

Page 585: ...pending on the version The function of FNC189 instruction is changed depending on the version as shown in the table below Error An operation error occurs in the following case The error flag M8067 turns ON and the error code is stored in D8067 When a device specified in or 1 is outside the allowable range error code K6705 Program examples 1 Program example 1 In the program example below the curren...

Page 586: ... current value of C235 is cleared when X001 turns ON from OFF 1 K0 The current value of the high speed counter is not cleared when DHCMOV instruction is executed K1 The current value of the high speed counter is cleared when DHCMOV instruction is executed M8394 D200 K1 1 FNC189 DHCMOV C235 IRET 0 I101 EI FEND When X000 turns ON from OFF the interrupt program from I101 to IRET is executed The curre...

Page 587: ...25 Block Data Operation FNC190 to FNC199 FNC190 to FNC199 provide instructions for rotating and shifting bit data and word data in specified directions FNC No Mnemonic Symbol Function Reference 190 191 192 BK Block Data Addition Section 25 1 193 BK Block Data Subtraction Section 25 2 194 BKCMP Block Data Compare Section 25 3 195 BKCMP Block Data Compare Section 25 3 196 BKCMP Block Data Compare Se...

Page 588: ...ta Head device number storing operation result n Number of data Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 n 3 3 3 3 DBK DBK P Mnemonic Operation Condition 16 bit Instruction 9 steps BK BK ...

Page 589: ...w or overflow occurs in the operation result the following processing is executed At this time the carry flag does not turn ON In the case of 16 bit operation In the case of 32 bit operation Instruction Description BK FNC193 Subtracts binary block data K32767 H7FFF K2 H0002 K 32767 H8001 K 32767 H8000 K 2 HFFFE K32766 H7FFE K2 147 483 647 H7FFFFFFF K2 H00000002 K 2 147 483 647 H80000001 K 2 147 48...

Page 590: ... starting from overlap n 2n in 32 bit operation devices starting from error code K6706 When n 2n in 32 bit operation devices starting from overlap n 2n in 32 bit operation devices starting from error code K6706 Program example In the program shown below the specified number of data stored in D150 to D0 are added to the specified number of data stored in D100 to D0 when X020 is set to ON and the op...

Page 591: ...7 can be directly specified in Operand Type Description Data Type Head device number storing subtraction data 16 or 32 bit binary Subtracted constant or head device number storing subtraction data Head device number storing operation result n Number of data Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter ...

Page 592: ...he case of 32 bit operation Instruction Description BK FNC192 Adds binary block data K 32767 H8000 K2 H0002 K32766 H7FFE K32767 H7FFF K 2 HFFFE K 32766 H8001 K 2 147 483 648 H80000000 K2 H00000002 K2 147 483 646 H7FFFFFFE K2 147 483 647 H7FFFFFFF K 2 HFFFFFFFE K 2 147 483 647 H80000001 Command input FNC193 DBK P S1 S2 n D S2 S2 S1 S1 D D 1 b31 b0 n points K8765 K8888 K50000 K9325 K4352 3 2 5 4 2n ...

Page 593: ...wing cases The error flag M8067 turns ON and the error code is stored in D8067 When n 2n in 32 bit operation devices starting from and or exceed the corresponding device range error code K6706 When n 2n in 32 bit operation devices starting from overlap n 2n in 32 bit operation devices starting from error code K6706 When n 2n in 32 bit operation devices starting from overlap n 2n in 32 bit operatio...

Page 594: ...Operation 32 bit Instruction 17 steps Continuous Operation Pulse Single Operation P FNC 194 BKCMP D DBKCMP DBKCMP P Mnemonic Operation Condition 16 bit Instruction 9 steps BKCMP BKCMP P Mnemonic Operation Condition Continuous Operation Pulse Single Operation 32 bit Instruction 17 steps Continuous Operation Pulse Single Operation P FNC 195 BKCMP D DBKCMP DBKCMP P Mnemonic Operation Condition 16 bit...

Page 595: ...3 The table below shows the comparison result in each instruction 4 When the comparison result is ON 1 in all of n points starting from M8090 block comparison signal turns ON Instruction Comparison result ON 1 condition Comparison result OFF 0 condition BKCMP FNC194 BKCMP FNC195 BKCMP FNC196 BKCMP FNC197 BKCMP FNC198 BKCMP FNC199 S1 S2 D FNCOOO 1 BKCMP 2 Command input S1 S2 n D 1 The number out of...

Page 596: ... Name Description M8090 Block comparison signal Turns ON when all comparison results are ON 1 in a block data instruction DBKCMP FNC194 DBKCMP FNC195 DBKCMP FNC196 DBKCMP FNC197 DBKCMP FNC198 and DBKCMP FNC199 S1 S1 S2 S2 D D Command input FNCOOO 1 DBKCMP 2 S1 S2 n D 5 The number out of 194 to 199 is put in OOO 6 The symbol out of or corresponding to the FNC No is put in 1 n points K1234 K5678 K40...

Page 597: ...r 16 bit operation BKCMP BKCMP BKCMP BKCMP BKCMP or BKCMP is used an operation error is caused error code K6705 Errors An operation error is caused in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When the range of n 2n in 32 bit operation points starting from and or exceeds the corresponding device range error code K6706 When the range of n points startin...

Page 598: ...e four points starting from M10 Y000 is set to ON 2 In the program shown below the constant K1000 is compared with four data starting from D10 when X010 is set to ON and the comparison result is stored in b4 to b7 of D0 D100 Comparison result K1000 K2000 K4000 K3000 D101 D102 D103 OFF Y000 D200 K1000 K2000 K4000 K5000 D201 D202 D203 M10 ON ON ON OFF M11 M12 M13 X020 FNC194 BKCMP D100 D200 M10 END ...

Page 599: ...ch as linking character string data replacing some characters and extracting character string data FNC No Mnemonic Symbol Function Reference 200 STR BIN to Character String Conversion Section 26 1 201 VAL Character String to BIN Conversion Section 26 2 202 Link Character Strings Section 26 3 203 LEN Character String Length Detection Section 26 4 204 RIGHT Extracting Character String Data from the ...

Page 600: ...e Description Data Type Head device number storing the number of digits of a numeric value to be converted 16 bit binary Device number storing binary data to be converted 16 or 32 bit binary Head device number storing converted character string Character string Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ...

Page 601: ...set to any value other than 0 the decimal point 2EH is automatically added in number of digits of decimal part 1 th digit When the number of digits of the decimal part 1 is set to 0 the decimal point is not added When the number of digits of the decimal part 1 is larger than the number of digits of 16 bit binary data stored in 0 30H is automatically added and the data is shifted to the right end d...

Page 602: ...atisfy Number of digits of decimal part Number of all digits 3 4 32 bit binary data to be converted stored in 1 should be within the range from 2 147 483 648 to 2 147 483 647 1 2 3 20H space is stored in each digit 8 1 123 Number of all digits Number of digits of decimal part 16 bit binary data S1 S2 S1 S2 S1 S2 S2 S1 D Command input FNC200 DSTR S2 S1 D 8 3 4 3 2 1 S1 0 1 b15 0 2 b8 b7 b0 D 1 36H ...

Page 603: ... sign and decimal point is smaller than the number of digits of 32 bit binary data stored in 1 an error is caused 6 00H indicating the end of a character string is automatically stored at the end of a converted character string When the number of all digits is even 00H is stored in the next device of the device storing the final character When the number of all digits is odd 00H is stored in the h...

Page 604: ... the binary data stored in 1 error code K6706 When the devices and later storing a character string exceeds the corresponding device range error code K6706 Program example In the program below the 16 bit binary data stored in D10 is converted into a character string in accordance with the digit specification by D0 and D1 when X000 is set to ON and then stored in D20 to D23 S1 S1 S1 S2 S2 D X000 Da...

Page 605: ...ter string into binary data the data from to a device number storing 00H is handled as a character string in units of byte Operand Type Description Data Type Head device number storing a character string to be converted into binary data Character string Head device number storing the number of all digits of the binary data acquired by conversion 16 bit binary Head device number storing the binary ...

Page 606: ...fter the decimal point 2EH 5 stores 16 bit binary data converted from a character string with the decimal point ignored In the character string located after space 20H or 0 30H put between the sign and the first number except 0 is ignored in conversion into 16 bit binary data Description Number of all characters digits 2 to 8 Number of characters digits of decimal part 0 to 5 and smaller than numb...

Page 607: ...ed 3 stores the number of all digits The number of all digits indicates the number of all characters including the number sign and decimal point 4 1 stores the number of digits of the decimal part The number of digits of the decimal part indicates the number of all characters after the decimal point 2EH Description Number of all characters digits 2 to 13 Number of characters digits of decimal part...

Page 608: ...racters 3 Number of characters of decimal part When the sign is set to any ASCII code other than space 20H and 2DH error code K6706 When a digit of a number is set to any ASCII code other than 0 30H to 9 39H and decimal point 2EH error code K6706 When the decimal point 2EH is set twice or more in a character string to be converted and later error code K6706 When the binary data acquired by convers...

Page 609: ... the program below the character string data stored in D20 to D22 is regarded as an integer value converted into a binary value and stored in D0 when X000 is set to ON 2 In the program below the character string data stored in D20 to D24 is regarded as an integer value converted into a binary value and stored in D0 when X000 is set to ON X000 FNC201 VALP D10 D0 END D20 1654 6 2 b15 b8 b7 b0 D20 D2...

Page 610: ...haracter string or directly specified character string Character string Head device number storing the link data character string or directly specified character string Head device number storing the linked data character string Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D ...

Page 611: ...he high order byte of a device storing the last character When the number of characters after linking is even 0000H is stored in next device of a device storing the last character Cautions When directly specifying a character string up to 32 characters can be specified input However this limitation in the number of characters is not applied when a word device is specified in or When the values in ...

Page 612: ...n the program example shown below a character string stored in D10 to D12 abcde is linked to the character string ABCD and the result is stored to D100 and later when X000 turns ON X000 ABCD D100 FNC202 END D10 b15 b8 D11 D12 62H b 61H a 64H d 63H c 00H b15 b8 D101 D102 41H A 43H C 42H B 00H 44H D D103 D104 D10 65H e ABCD 62H b 61H a 64H d 63H c 65H e D100 00H is automatically stored b7 b0 b7 b0 ...

Page 613: ...ntil the first device storing 00H is handled as a character string in units of byte For example when ABCDEFGHI is stored in and later as shown below K9 is stored to Operand Type Description Data Type Head device number storing a character string whose length is to be detected Character string Device number storing the detected character string length number of bytes 16 bit binary Oper and Type Bit...

Page 614: ... error flag M8067 turns ON and the error code is stored in D8067 When 00H is not set within the corresponding device range after a device specified by error code K6706 When the detected number of characters is 32768 or more error code K6706 Program example In the program example shown below the length of a character string stored in D0 and later is output in 4 digit BCD to Y040 to Y057 when X000 t...

Page 615: ...xtracts a specified number of characters from the right end of a specified character string For handling of character strings refer to Section 5 3 1 Instruction format 2 Set data 3 Applicable devices Operand Type Description Data Type Head device number storing a character string Character string Head device number storing extracted character string n Number of characters to be extracted 16 bit bi...

Page 616: ...codes the length of 1 character is detected as 2 When extracting characters from a character string including character codes in which 2 bytes express 1 character such as shift JIS codes consider the number of characters to be extracted in units of character codes for 1 character Note that the expected character code is not given if only 1 byte is executed out of a 2 byte character code S D D FNC2...

Page 617: ...When 00H is not set within the corresponding device range after a device specified by error code K6706 When n exceeds the number of characters specified by error code K6706 When the number of devices after a device number specified by is smaller than the number of devices required to store extracted n characters that is when 00H cannot be stored after all character strings and the last character e...

Page 618: ...a 3 Applicable devices Operand Type Description Data Type Head device number storing a character string Character string Head device number storing extracted character string n Number of characters to be extracted 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b...

Page 619: ...device until 00H is detected at first in units of byte Cautions When handling character codes other than ASCII codes note the following contents The number of characters is handled in units of byte 8 bits Accordingly in the case of character codes in which 2 bytes express 1 character such as shift JIS codes the length of 1 character is detected as 2 When extracting characters from a character stri...

Page 620: ...fied by is smaller than the number of devices required to store extracted n characters that is when 00H cannot be stored after all character strings and the last character error code K6706 When n is a negative value error code K6706 Program example In the program example shown below the number of characters which is equivalent to the number stored in D0 are extracted from the left end of the chara...

Page 621: ...ecified character string For handling of character strings refer to Section 5 3 1 Instruction format 2 Set data 3 Applicable devices Operand Type Description Data Type Head device number storing a character string Character string Head device number storing extracted character string Head device number specifying the head position and number of characters to be extracted Head character position 1 ...

Page 622: ...er string stored in and later indicates data stored in devices from the specified device until 00H is first detected in units of byte When the number of characters to be extracted specified by 1 is 0 the extraction processing is not executed When the number of characters to be extracted specified by 1 is 1 the entire character string stored in and later is stored to and later S2 S2 S1 D S2 S2 46H ...

Page 623: ...error is caused in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When 00H is not set within the corresponding device range after a device specified by error code K6706 When the value specified by 1 exceeds the number of characters specified by error code K6706 When the number of characters specified by 1 from the position specified by exceeds the device ra...

Page 624: ...a character string used in overwriting Character string Head device number storing overwritten character string Head device number specifying the head position and number of characters to be overwritten Head character position to be overwritten 1 Number of characters to be overwritten 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Un...

Page 625: ... in and later data is stored up to the last character S2 S1 S2 D 48H H 47H G 35H 5 34H 4 31H 1 30H 0 32H 2 31H 1 30H 0 33H 3 32H 2 35H 5 34H 4 FNC207 MIDW S1 D S2 1 2 4 3 b15 b8b7 b0 012345678 D D 1 2 b15 b8b7 b0 D S1 S1 S1 S1 S1 37H 7 36H 6 00H 38H 8 42H B 41H A 44H D 43H C 46H F 45H E ABCDEFGHI 1 S2 S2 6 3 Position from the left end in the character string stored in and later Number of character...

Page 626: ... is caused in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When 00H is not set within the corresponding device range after a device specified by or error code K6706 When the value specified by exceeds the number of characters of the character string stored in and later error code K6706 When the number of characters specified by 1 exceeds the number of cha...

Page 627: ...vice Inverter Comms Program example In the program example shown below 4 characters are extracted from the character string data stored in D0 and later and stored to the 3rd character from the left end and later for the character string data stored in D100 and later when X010 turns ON 59H Y 43H C 31H 1 5AH Z 31H 1 32H 2 45H E 46H F 31H 1 32H 2 45H E 46H F X010 D100 FNC207 MIDWP D0 END R0 D1 D2 D3 ...

Page 628: ...vice number storing a character string Character string Head device number storing a character string to be searched Character string Head device number storing search result 16 bit binary n Search start position 16 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b ...

Page 629: ...ng from error code K6706 When 00H NULL is not located within the corresponding device range starting from error code K6706 Program example 1 In the program example below the character string C123 D0 and later is searched from the 5th character from the left end head character of the character string C123121CM R0 and later when X000 is set to ON The search result is stored in D100 S1 42H B 41H A 0 ...

Page 630: ...specified character string up to 32 characters or head device number storing character string which is handled as the transfer source Character string Head device number storing transferred character string Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C ...

Page 631: ... transfer is executed as shown below Caution When 00H is stored in the low order byte of n 00H is stored to both the high order byte and low order byte of n Errors An operation error is caused in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When 00H does not exist within the range from the device specified by to the last device error code K6706 When the s...

Page 632: ...ntrol FNC200 to FNC209 26 10 FNC209 MOV Character String Transfer Program example In the program example shown below character string data stored in D10 to D12 is transferred to D20 through D22 X000 FNC209 MOV D10 D20 END b15 b8 b7 b0 D10 4DH M D11 D12 45H E 00H 2AH b15 b8 b7 b0 D20 D21 D22 45H E 4DH M 45H E 00H 2AH 45H E ...

Page 633: ...0 FNC269 Data Table Operation 30 FNC270 FNC274 Ex Device Inverter Comms 27 Data Operation 3 FNC210 to FNC219 FNC210 to FNC219 provide instructions for reading last in data and controlling leftward rightward shift instructions with carry FNC No Mnemonic Symbol Function Reference 210 FDEL Deleting Data from Tables Section 27 1 211 FINS Inserting Data to Tables Section 27 2 212 POP Shift Last Data Re...

Page 634: ...icating the number of stored data Refer to the program example Operand Type Description Data Type Device number storing deleted data 16 bit binary Head device number in data table n Position of deleted data in table Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM...

Page 635: ... the data table error code K6706 When FNC210 instruction is executed in the condition n 0 error code K6706 When the number of stored data specified in is 0 error code K6706 When the data table range exceeds the corresponding device range error code K6706 Program example In the program shown below the 2nd data is deleted from the data table stored in D100 to D105 and the deleted data is stored in D...

Page 636: ...from the next device 1 after indicating the number of stored data Refer to the program example Operand Type Description Data Type Device number storing inserted data 16 bit binary Head device number in data table n Data insertion position in table Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Poi...

Page 637: ...1 error code K6706 When the value n exceeds the device range of the data table error code K6706 When FNC211 instruction is executed in the condition n 0 error code K6706 When the data table range exceeds the corresponding device range error code K6706 Program example In the program shown below data stored in D100 is inserted into the 3rd position in the data table stored in D0 to D4 When the numbe...

Page 638: ...trol is read to Specify n in the range from 2 to 512 Operand Type Description Data Type Head device number storing first in data including pointer data Head word device number storing data 16 bit binary Device number storing last out data n Number of stored data Add 1 because pointer data is also included 2 n 512 Oper and Type Bit Devices Word Devices Others System User Digit Specification System ...

Page 639: ... achieved Usually program this instruction in the pulse operation type or let this instruction be executed by a pulsed command contact When the current value of the pointer is 0 the zero flag M8020 turns ON and the instruction is not executed Check in advance using a comparison instruction whether the current value of satisfies 1 n 1 and then execute this instruction When the current value of the ...

Page 640: ...d data pointer D100 every time X000 turns ON When the first in data are as shown in the table below Pointer D100 K3 Data D101 H1234 D102 H5678 D103 HABCD D104 H0000 D105 H0000 D106 H0000 FNC 38 SFWR D20 K7 END D100 FNC212 POP D100 K7 D10 X000 First in command Last in read command D20 D106 D105 D104 D103 D102 D101 D100 H0000 H0000 H0000 HABCD H5678 H1234 K3 First in command D100 K2 K3 D100 K1 K2 D1...

Page 641: ...ied as n 16 bits are shifted rightward by the remainder of n 16 For example when n is set to 18 16 bits are shifted rightward by 2 bits 18 16 1 2 2 The ON 1 OFF 0 status of the n th bit bit n 1 in the word device is transferred to the carry flag M8022 3 0 is set to n bits from the most significant bit Operand Type Description Data Type Device number storing data to be shifted 16 bit binary n Numbe...

Page 642: ...067 turns ON and the error code is stored in D8067 When a negative value is set to n error code K6706 Program example In the program example shown below the contents of Y010 to Y023 are shifted rightward by the number of bits specified by D0 when X020 turns ON Device Name Description M8022 Carry flag Shifts the ON OFF status of bit n 1 FNC213 SFRP K3M0 K4 Command input 1 M11 0 1 0 M8 1 0 1 0 1 0 1...

Page 643: ...d as n 16 bits are shifted leftward by the remainder of n 16 For example when n is set to 18 16 bits are shifted leftward by 2 bits 18 16 1 2 2 The ON 1 OFF 0 status of the n 1 th bit bit n in the word device is transferred to the carry flag M8022 3 0 is set to n bits from the least significant bit Operand Type Description Data Type Device number storing data to be shifted 16 bit binary n Number o...

Page 644: ...g cases The error flag M8067 turns ON and the error code is stored in D8067 When a negative value is set to n error code K6706 Program example In the program example shown below the contents of Y010 to Y017 are shifted leftward by the number of bits specified by D0 when X020 turns ON Device Name Description M8022 Carry flag Shifts the ON OFF status of bit n FNC214 SFL K3M10 K3 Command input 0 0 1 ...

Page 645: ...a comparison instructions which can be handled as contact symbols in programming such as LD AND and OR FNC No Mnemonic Symbol Function Reference 220 221 222 223 224 LD Load Compare Section 28 1 225 LD Load Compare Section 28 1 226 LD Load Compare Section 28 1 227 228 LD Load Compare Section 28 1 229 LD Load Compare Section 28 1 230 LD Load Compare Section 28 1 231 232 AND AND Compare Section 28 2 ...

Page 646: ...239 240 OR OR Compare Section 28 3 241 OR OR Compare Section 28 3 242 OR OR Compare Section 28 3 243 244 OR OR Compare Section 28 3 245 OR OR Compare Section 28 3 246 OR OR Compare Section 28 3 247 248 249 FNC No Mnemonic Symbol Function Reference S2 S1 OR S1 S2 S2 S1 OR S1 S2 S2 S1 OR S1 S2 S2 S1 OR S1 S2 S2 S1 OR S1 S2 S2 S1 OR S1 S2 ...

Page 647: ...r Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 FNC 224 LD D Mnemonic Operation Condition 16 bit Instruction 5 steps LD Mnemonic Operation Condition Continuous Operation 32 bit Instruction 9 steps LDD Continuous Operation FNC 225 LD D Mnemonic Operation Condit...

Page 648: ...on such as LD LD and LD a program error or operation error is caused 3 Programming of data comparison instructions In programming in GX Developer symbols and cannot be input Separate into and and separate into and in input When inputting a data comparison instruction in a circuit diagram use the symbol The input procedure is described below Operating procedure a Display the circuit program edit wi...

Page 649: ...ation 26 FNC200 FNC209 Character String Control 27 FNC210 FNC219 Data Operation 3 28 FNC220 FNC249 Data Comparison 29 FNC250 FNC269 Data Table Operation 30 FNC270 FNC274 Ex Device Inverter Comms Program example C10 FNC224 LD K200 S1 S2 Y10 K 30 FNC225 LD D200 X001 SET Y11 C200 FNC225 LDD K678493 M50 M3 When the current value of the counter C10 is 200 Y010 is driven When the contents of D200 are 29...

Page 650: ...D Mnemonic Operation Condition 16 bit Instruction 5 steps AND Mnemonic Operation Condition Continuous Operation 32 bit Instruction 9 steps ANDD Continuous Operation FNC 233 AND D Mnemonic Operation Condition 16 bit Instruction 5 steps AND Mnemonic Operation Condition Continuous Operation 32 bit Instruction 9 steps ANDD Continuous Operation FNC 234 AND D Mnemonic Operation Condition 16 bit Instruct...

Page 651: ...to execute the 32 bit operation such as ANDD ANDD and ANDD when comparing 32 bit high speed counters D200 and later If a 32 bit high speed counter is specified in the 16 bit operation such as AND AND and AND a program error or operation error is caused 3 Programming of data comparison instructions In programming in GX Developer symbols and cannot be input Separate into and and separate into and in...

Page 652: ... C10 FNC232 AND K200 Y10 D0 FNC236 AND K 10 X000 SET Y11 D10 FNC233 ANDD K678493 M50 M3 X001 X002 S1 S2 When X000 is ON and the current value of the counter C10 is 200 Y010 is driven When X001 is OFF and the contents of the data register D0 are not 10 Y011 is set When X002 is ON when the contents of the data registers D11 and D10 are less than K678 493 or when M3 turns ON M50 is driven ...

Page 653: ...ndex Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 FNC 240 OR D Mnemonic Operation Condition 16 bit Instruction 5 steps OR Mnemonic Operation Condition Continuous Operation 32 bit Instruction 9 steps ORD Continuous Operation FNC 241 OR D Mnemonic Operation Condition 16 bit Instr...

Page 654: ...it operation such as ORD OR and OR a program error or operation error is caused 3 Programming of data comparison instructions In programming in GX Developer symbols and cannot be input Separate into and and separate into and in input When inputting a data comparison instruction in a circuit diagram use the symbol The input procedure is described below Operating procedure a Display the circuit prog...

Page 655: ...NC199 Block Data Operation 26 FNC200 FNC209 Character String Control 27 FNC210 FNC219 Data Operation 3 28 FNC220 FNC249 Data Comparison 29 FNC250 FNC269 Data Table Operation 30 FNC270 FNC274 Ex Device Inverter Comms Program example Y000 X001 K100000 FNC246 ORD D100 M60 M30 X002 C10 FNC240 OR K200 S1 S2 When X001 turns ON or when the current value of the counter C10 is 200 Y000 is driven When X002 ...

Page 656: ...56 LIMIT Limit Control Section 29 1 257 BAND Dead Band Control Section 29 2 258 ZONE Zone Control Section 29 3 259 SCL Scaling Coordinate by Point Data Section 29 4 260 DABIN Decimal ASCII to BIN Conversion Section 29 5 261 BINDA BIN to Decimal ASCII Conversion Section 29 6 262 263 264 265 266 267 268 269 SCL2 Scaling 2 Coordinate by X Y Data Section 29 7 D LIMIT S3 S2 S1 D BAND S3 S2 S1 D ZONE S3...

Page 657: ...ues 1 Instruction format 2 Set data 3 Applicable devices Operand Type Description Data Type Lower limit value minimum output value 16 or 32 bit binary Upper limit value maximum output value Input value controlled by the upper and lower limit values Head device number storing the output value controlled by the upper and lower limit values Oper and Type Bit Devices Word Devices Others System User Di...

Page 658: ...trolling the output value using only the upper limit value set 32768 to the lower limit value specified in When controlling the output value using only the lower limit value set 32767 to the upper limit value specified in S3 S1 S2 D FNC256 LIMIT S1 S2 D S3 Input value Output value Input value Output value Command input In the case of Lower limit value Input value Lower limit value Output value In ...

Page 659: ...per limit value set 2 147 483 648 to the lower limit value specified in 1 When controlling the output value using only the lower limit value set 2 147 483 647 to the upper limit value specified in 1 Error An operation error is caused when the instruction is executed in the setting status shown below The error flag M8067 turns ON and the error code K6706 is stored in D8067 Relationship 16 bit opera...

Page 660: ...t to D1 In the case of D0 5000 5000 is output to D1 2 Program example 2 In the program example shown below the BCD data set in X020 to X057 is controlled by the limit values 10000 and 1 000 000 and the controlled value is output to D11 and D10 when X000 turns ON Operation In the case of D1 D0 10000 10000 is output to D11 D10 In the case of 10000 D1 D0 1 000 000 the value of D1 D0 is output to D11 ...

Page 661: ...e dead band no output band 16 or 32 bit binary Upper limit value of the dead band no output band Input value controlled by the dead band Device number storing the output value controlled by the dead band Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R...

Page 662: ...or is caused when the instruction is executed in the setting status shown below The error flag M8067 turns ON and the error code K6706 is stored in D8067 Relationship 16 bit operation 32 bit operation 1 1 S3 S3 S1 S1 S2 S2 D D FNC257 DBAND 1 1 1 1 1 1 1 1 1 1 1 1 1 1 S1 S2 S3 D Command input In the case of Lower limit value Input value Input value Lower limit value Output value In the case of Uppe...

Page 663: ...lled by the dead band from 1000 to 1000 and a controlled value is output to D1 when X000 turns ON Operation In the case of D0 1000 D0 1000 is output to D1 In the case of 1000 D0 1000 0 is output to D1 In the case of D0 1000 D0 1000 is output to D1 2 Program example 2 In the program example shown below the BCD data set in X020 to X057 is controlled by the dead band from 10000 to 10000 and a control...

Page 664: ...ad device number storing the output value controlled by the zone Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V Z Modify K H E P 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 P FNC 258 ZONE D Mnemonic Ope...

Page 665: ...ion result is a 16 bit binary value with sign Accordingly if the output value is outside the range from 32768 to 32767 it is handled as follows In the 32 bit operation The output value is a 32 bit binary value with sign Accordingly if the operation result is outside the range from 2 147 483 648 to 2 147 483 647 it is handled as follows S1 S1 S2 S2 S3 S3 D D In the case of Input value 0 Input value...

Page 666: ... of D 0 0 is output to D1 In the case of D0 0 D0 1000 is output to D1 2 Program example 2 In the program example shown below the BCD data set in X020 to X057 is controlled by the zone from 10000 to 10000 and the controlled value is output to D11 and D10 when X000 turns ON Operation In the case of D1 D0 0 D1 D0 10000 is output to D11 D10 In the case of D1 D0 0 the 0 is output to D11 D10 In the case...

Page 667: ... a different data table configuration is also available For SCL2 FNC269 instruction refer to Section 29 7 1 Instruction format 2 Set data 3 Applicable devices Operand Type Description Data Type Input value used in scaling or device number storing the input value 16 or 32 bit binary Head device number storing the conversion table used in scaling Device number storing the output value controlled by ...

Page 668: ...n the first decimal place is rounded Conversion setting data table for scaling Set item Device assignment in setting data table Number of coordinate points 5 in the case shown in the left figure Point 1 X coordinate 1 Y coordinate 2 Point 2 X coordinate 3 Y coordinate 4 Point 3 X coordinate 5 Y coordinate 6 Point 4 X coordinate 7 Y coordinate 8 Point 5 X coordinate 9 Y coordinate 10 Conversion set...

Page 669: ...1 and later The data table has the following configuration For a setting example refer to the next page Setting example of the conversion table for scaling A setting example for the 16 bit operation is shown below For the 32 bit operation set each item using a 32 bit binary value In the case of the conversion characteristics for scaling shown in the figure below set the following data table Set it...

Page 670: ...nts Set item Setting device and setting contents Remarks When R0 is specified in Setting contents Number of coordinate points R0 K10 Point 1 X coordinate 1 R1 K5 Y coordinate 2 R2 K7 Point 2 X coordinate 3 R3 K20 Y coordinate 4 R4 K30 Point 3 X coordinate 5 R5 K50 Y coordinate 6 R6 K100 Point 4 X coordinate 7 R7 K200 When coordinates are specified using three points in this way the output value ca...

Page 671: ...rogram example In the program example shown below the value input to D0 is processed by scaling based on the conversion table for scaling set in R0 and later and output to D10 Program Operation Conversion setting data table for scaling Set item Device Setting contents Number of coordinate points R0 K6 Point 1 X coordinate R1 K0 Y coordinate R2 K0 Point 2 X coordinate R3 K10 Y coordinate R4 K50 Poi...

Page 672: ... digit is within the range from 30H to 39H 5 When an ASCII code for each digit is 20H space or 00H null it is handled as 30H Operand Type Description Data Type Head device number storing data ASCII codes to be converted into binary data Character string Device number storing conversion result 16 or 32 bit binary Oper and Type Bit Devices Word Devices Others System User Digit Specification System U...

Page 673: ...rror flag M8067 turns ON and the error code is stored in D8067 When the sign data stored in is any value other than 20H space or 2DH error code K6706 When an ASCII code for each digit stored in to 2 5 is any value other than 30H to 39H 20H space or 00H NULL error code K6706 When the numeric range of to 2 5 is outside the following range error code K6706 When to 2 5 exceeds the device range error c...

Page 674: ...N Decimal ASCII to BIN Conversion Program example In the program below the sign and decimal ASCII codes in five digits stored in D20 to D22 are converted into a binary value when X000 is set to ON and stored in D0 D20 b15 b8 b7 b0 276 D0 Binary value 36H 6 37H 7 20H space 32H 2 2DH 20H space END X000 FNC260 DABINP D20 D0 D21 D22 It is regarded as 00276 276 ...

Page 675: ...in is as follows a As sign data low order byte of 20H space is set when the 16 bit binary data stored in is positive and 2DH is set when 16 bit binary data stored in is negative Operand Type Description Data Type Device number storing binary data to be converted into ASCII codes 16 or 32 bit binary Head device number storing conversion result Character string Oper and Type Bit Devices Word Devices...

Page 676: ...n the left side of the effective digits zero suppression c The high order byte of 5 is set as follows depending on the ON OFF status of M8091 ON OFF status Contents of processing M8091 OFF 3 is set to 00H NULL M8091 ON 3 does not change ON OFF status Contents of processing M8091 OFF The high order byte of 5 is set to 00H NULL M8091 ON The high order byte of 5 is set to 20H space 0 0 3 2 5 20H Effe...

Page 677: ...ision method to Y040 to Y051 By setting to OFF the output character selector signal M8091 and setting to ON PR mode flag M8027 ASCII codes up to 00H are output For PR mode flag and PR FNC 77 instruction refer to Section 15 8 Device Name Description M8091 Output character quantity selector signal In the case of 16 bit operation When M8091 is OFF 3 is set to 00H NULL When M8091 is ON 3 does not chan...

Page 678: ...cable devices Operand Type Description Data Type Input value used in scaling or device number storing the input value 16 or 32 bit binary Head device number storing the conversion table used in scaling Device number storing the output value controlled by scaling Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac...

Page 679: ... specified conversion characteristics and stored to a device number specified in 1 Conversion for scaling is executed based on the data table stored in a device specified in 1 and later If the output data is not an integer however a number in the first decimal place is rounded Conversion setting data table for scaling Set item Device assignment in setting data table Number of coordinate points 5 i...

Page 680: ... on the data table stored in a device specified in 1 and later The data table has the following configuration For a setting example refer to the next page Set item Device assignment in setting data table 16 bit operation 32 bit operation Number of coordinate points 1 X coordinate Point 1 1 3 2 Point 2 2 5 4 Point n last n 2n 1 2n Y coordinate Point 1 n 1 2n 3 2n 2 Point 2 n 2 2n 5 2n 4 Point n las...

Page 681: ...ediate value In this example the output value intermediate value is specified by the Y coordinate of the point 5 If the X coordinate is same at three points or more the value at the second point is output also 2 When coordinates are specified using two points as shown in the points 8 and 9 the output value is the Y coordinate at the next point In this example the output value is specified by the Y...

Page 682: ... outside the data table error code K6706 When the value exceeds the 32 bit data range in the middle of operation error code K6706 In this case check whether the distance between points is not 65535 or more If the distance is 65535 or more reduce the distance between points Program example In the program example shown below the value input to D0 is processed by scaling based on the conversion table...

Page 683: ...29 FNC250 FNC269 Data Table Operation 30 FNC270 FNC274 Ex Device Inverter Comms 30 External Device Communication Inverter Communication FNC270 to FNC274 FNC270 to FNC274 provide instructions for controlling operations and reading writing parameters while two or more FREQROL inverters are connected FNC No Mnemonic Symbol Function Reference 270 IVCK Inverter Status Check Section 30 1 271 IVDR Invert...

Page 684: ...whose station number is specified in is read and transferred to 1 Mitsubishi FREQROL F700 3 A700 3 V500 F500 A500 E500 S500 having the communication function Series general purpose inverters 2 Refer to the instruction code list shown on the next page Refer to pages in the inverter manual on which the computer link function is explained in detail 3 Mitsubishi FREQROL F700 A700 Series general purpos...

Page 685: ...is instruction are added depending on the version as shown in the table below Instruction code of inverter specified in Read contents Corresponding inverter F700 A700 V500 F500 A500 E500 S500 H7B Operation mode 3 3 3 3 3 3 3 H6F Output frequency number of rotations 3 3 3 3 3 3 3 H70 Output current 3 3 3 3 3 3 3 H71 Output voltage 3 3 3 3 3 3 H72 Special monitor 3 3 3 3 3 H73 Special monitor select...

Page 686: ... Mitsubishi FREQROL F700 3 A700 3 V500 F500 A500 E500 S500 having the communication function Series general purpose inverters 2 Refer to the instruction code list shown on the next page Refer to pages in the inverter manual on which the computer link function is explained in detail 3 Mitsubishi FREQROL F700 A700 Series general purpose inverters are supported in Ver 2 00 and later Operand Type Desc...

Page 687: ... change depending on the version Inverter models available in this instruction are added depending on the version as shown in the table below Hexadecimal instruction code of inverter specified in Written contents Corresponding inverter F700 A700 V500 F500 A500 E500 S500 HFB Operation mode 3 3 3 3 3 3 3 HF3 Special monitor selection number 3 3 3 3 3 HF9 Operation command extension 3 3 HFA Operation...

Page 688: ...s read from an inverter 1 connected to a communication port n whose station number is and output to 1 Mitsubishi FREQROL F700 3 A700 3 V500 F500 A500 E500 S500 having the communication function Series general purpose inverters 2 Mitsubishi FREQROL F700 A700 Series general purpose inverters are supported in Ver 2 00 and later Operand Type Description Data Type Station number of an inverter K0 to K3...

Page 689: ...C274 for the same port Two or more inverter communication instructions FNC270 to FNC274 can be driven for the same port at the same time Function change depending on the version Inverter models available in this instruction are added depending on the version as shown in the table below Number Description Number Description ch1 ch2 ch1 ch2 M8029 Instruction execution complete D8063 D8438 Error code...

Page 690: ...connected to a communication port n whose station number is 1 Mitsubishi FREQROL F700 3 A700 3 V500 F500 A500 E500 S500 having the communication function Series general purpose inverters 2 Mitsubishi FREQROL F700 A700 Series general purpose inverters are supported in Ver 2 00 and later Operand Type Description Data Type Station number of an inverter K0 to K31 16 bit binary Parameter number in an i...

Page 691: ... FNC274 for the same port Two or more inverter communication instructions FNC270 to FNC274 can be driven for the same port at the same time Function change depending on the version Inverter models available in this instruction are added depending on the version as shown in the table below Number Description Number Description ch1 ch2 ch1 ch2 M8029 Instruction execution complete D8063 D8438 Error c...

Page 692: ...at 2 Set data 3 Applicable devices Operand Type Description Data Type Station number of an inverter K0 to K31 16 bit binary Number of parameters in an inverter to be written at one time Head device number of a parameter table to be written to an inverter n Used channel K1 ch 1 K2 ch 2 Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con s...

Page 693: ... the instruction execution complete flag use method refer to Subsection 6 5 2 1 Cleared when the PLC mode switches from STOP to RUN 2 Initial value 1 Cautions For other cautions refer to the Communication Control Manual It is not permitted to use the RS FNC 80 RS2 FNC 87 instruction and an inverter communication instruction FNC270 to FNC274 for the same port Two or more inverter communication inst...

Page 694: ...4 IVBWR Inverter Parameter Block Write Function change depending on the version Inverter models available in this instruction are added depending on the version as shown in the table below Applicable version Item Outline of function FX3U FX3UC Ver 2 00 or later Ver 2 00 or later Addition of applicable models Mitsubishi FREQROL F700 A700 Series general purpose inverters are supported ...

Page 695: ...5 Interrupt Function 36 Special Device 37 Error Code A Version Up Information B Execution Times C Applicable Instruction List 31 Data Transfer 3 FNC275 to FNC279 FNC275 to FNC279 provide instructions for executing more complicated processing for fundamental applied instructions and for special processing FNC No Mnemonic Symbol Function Reference 275 276 277 278 RBFM Divided BFM Read Section 31 1 2...

Page 696: ...fer to Section 15 9 1 Instruction format 2 Set data 3 Applicable devices S Except special data register D Operand Type Description Data Type m1 Unit number 0 to 7 16 bit binary data m2 Head buffer memory BFM number 0 to 32766 Head device number storing data to be read from buffer memory BFM n1 Number of all buffer memories BFM to be read 1 to 32767 n2 Number of points transferred in one operation ...

Page 697: ...lag M8328 is set to ON and execution of such an instruction is waited When execution of another target instruction is completed the waiting status of an instruction is executed Related devices For the flag use methods for instruction execution complete and instruction execution abnormally complete refer to Subsection 6 5 2 Related instructions Errors An operation error is caused in the following c...

Page 698: ...uffer memory number is from 0 to 32766 and the contents are determined according to each special function unit block Setting range K0 to K32766 For the contents of buffer memories refer to the manual of the used special function block unit Cautions A watchdog timer error may occur when many numbers of points are transferred in one operation cycle In such a case take either of the following counter...

Page 699: ...exing is executed the contents of index registers at the begining of execution are used Even if the contents of index registers are changed after the instruction such changes do not affect the process of the instruction The contents of n1 devices starting from change while RBFM FNC278 instruction is executed After execution of the instruction is completed execute another instruction for n1 devices...

Page 700: ...lag is set to ON FNC279 WBFM K2 K1001 D100 K80 K16 BFM write start M0 BFM write start M8029 Instruction execution complete RST M0 M8329 Instruction execution abnormally complete RST M0 X001 SET M5 BFM read start FNC278 RBFM K2 K2001 D200 K80 K16 M5 BFM read start M8029 Instruction execution complete RST M5 M8329 Instruction execution abnormally complete RST M5 END D100 to D179 80 points are writte...

Page 701: ...me division method TO FNC 79 instruction is also available to write data to the buffer memory BFM For TO FNC 79 instruction refer to Section 15 10 1 Instruction format 2 Set data 3 Applicable devices S Except special data register D Operand Type Description Data Type m1 Unit number 0 to 7 16 bit binary data m2 Head buffer memory BFM number 0 to 32766 Head device number storing data to be written t...

Page 702: ...d the waiting status of an instruction is executed Related devices For the flag use methods for instruction execution complete and instruction execution abnormally complete refer to Subsection 6 5 2 Related instructions Errors An operation error is caused in the following case The error flag M8067 turns ON and the error code is stored in D8067 When the unit number m1 does not exist error code K670...

Page 703: ...Processing 2 33 FNC290 FNC299 Extension File Register 34 SFC STL Programming 35 Interrupt Function 36 Special Device 37 Error Code A Version Up Information B Execution Times C Applicable Instruction List 32 High Speed Processing 2 FNC280 to FNC289 FNC No Mnemonic Symbol Function Reference 280 HSCT High Speed Counter Compare With Data Table Section 32 1 281 282 283 284 285 286 287 288 289 n HSCT D ...

Page 704: ...nd is stored in and later and then the output status ON or OFF specified in the data table is output to to n 1 Operand Type Description Data Type Head device number storing a data table 16 or 32 bit binary m Number of data tables number of comparison points 1 m 128 16 bit binary High speed counter number C235 to C255 32 bit binary Head device number to which the operation status is output 16 bit b...

Page 705: ... When specifying an output Y make sure that the least significant digit of the device number is 0 Examples Y000 Y010 and Y020 3 Immediately after the step 2 1 is added to the current value of the table counter D8138 4 The next table is set as the comparison target data 5 The steps 2 and 3 are repeated until the current value of the table counter D8131 becomes m When the current value becomes m the...

Page 706: ... H0007 1 2 D207 D206 K543 D208 H0002 2 3 D210 D209 K764 D211 H0000 3 4 D213 D212 K800 D214 H0003 4 Repeated from 0 Device Name Description M8138 HSCT FNC280 complete flag Turns ON when the operation for the final table No m 1 is completed D8138 HSCT FNC280 table counter Stores the table number handled as the comparison target X000 FNC280 DHSCT D200 K5 C235 Y010 K3 FNC 54 DHSCR C235 C235 M8000 K900...

Page 707: ...Y make sure that the least significant digit of the device number is 0 Examples Y000 Y010 and Y020 When a high speed counter specified in is indexed with index all high speed counters are handled as software counters For this instruction only one table in one line is handled as the comparison target at one time Comparison will not move to the next table until the current value becomes equivalent t...

Page 708: ...to Y010 to Y013 Operation example Table number Comparison data SET RESET pattern Table counter D8138 Device Current value Device Current value 0 R1 R0 K100 R2 H0007 0 1 R4 R3 K150 R5 H0004 1 2 R7 R6 K200 R8 H0003 2 3 R10 R9 K250 R11 H0006 3 4 R13 R12 K300 R14 H0008 4 Repeated from 0 M8000 FNC 12 MOVP H0008 K1Y010 FNC 54 DHSCR C235 C235 FNC280 DHSCT R0 K4 K400 Y010 K5 END C235 is used as an up coun...

Page 709: ...n 36 Special Device 37 Error Code A Version Up Information B Execution Times C Applicable Instruction List 33 Extension File Register Control FNC290 to FNC299 FNC No Mnemonic Symbol Function Reference 290 LOADR Load From ER Section 33 1 291 SAVER Save to ER Section 33 2 292 INITR Initialize R and ER Section 33 3 293 LOGR Logging R and ER Section 33 4 294 RWER Rewrite to ER Section 33 5 295 INITER ...

Page 710: ...ed Different from SAVER FNC291 INITR FNC292 and LOGR FNC293 instructions it is not necessary to execute this instruction in units of sector If n is set to 0 it is handled as 32768 when the instruction is executed Operand Type Description Data Type Device number of extension register transfer destination to which data is to be transferred The extension file register having the same number is handle...

Page 711: ...tored in D8067 When the last device number to be transferred exceeds 32767 error code K6706 At this time devices up to the last one R32767 are read and transferred When a memory cassette is not connected error code K6771 Program example In the program example shown below the contents current value of 4000 extension file registers ER1 to ER4000 inside the memory cassette are read and transferred to...

Page 712: ...rred to extension file registers ER inside a memory cassette flash memory having the same device numbers in 2048 n operation cycles 2048 n 1 cycles if there is the remainder While the instruction is being executed the number of already written points is stored in Operand Type Description Data Type Device number of extension register to which data is to be written Only the head device number of a s...

Page 713: ...longer by 50 to 60 ms If the operation cycle is severely affected write data in two or more operation cycles When writing data in two or more operation cycles set n in the range from K1 to K1024 Sector number Head device number Written device range Sector number Head device number Written device range Sector 0 R0 ER0 to ER2047 Sector 8 R16384 ER16384 to ER18431 Sector 1 R2048 ER2048 to ER4095 Sect...

Page 714: ...tion 2 When storing the contents of an arbitrary number of extension registers R to extension file registers ER Use RWER instruction For RWER FNC294 instruction refer to Section 33 5 When the FX3UC PLC is former than Ver 1 30 1 When storing data of 2048 extension registers R in one sector to extension file registers ER If the extension registers R have data to be stored in extension file registers...

Page 715: ...s R may be lost To avoid the data loss back up the data of extension registers R in advance using the following procedure 1 Set the PLC mode to STOP 2 Create a new project in GX Developer This step is not necessary if it is alright to overwrite the current project 3 Read the contents of extension registers R to GX Developer 1 Select Online Read from PLC to display the Read from PLC window 2 Click ...

Page 716: ...ion M0 X000 R0 K1 SET M0 M8029 RST M0 FNC295 INITERP FNC 07 WDTP END FNC291 SAVER R0 K128 D0 1 Instruction execution complete flag R0 K100 R1 K105 R10 K200 R11 K215 Setting data Device number Current value Extension registers R R12 K400 R19 K350 R99 K1000 R100 HFFFF HFFFF R2047 ER0 K100 ER1 K105 ER10 K300 ER11 K330 Setting backup data Device number Current value Extension file registers ER ER12 K3...

Page 717: ...2047 HFFFF ER2047 K2048 R0 K100 R1 K105 R10 K200 R11 K215 Device number Current value Extension registers R R12 K400 R19 K350 R99 K1000 R100 HFFFF HFFFF R127 1st operation cycle HFFFF R128 HFFFF R255 HFFFF R256 HFFFF R1919 HFFFF R1920 ER0 K100 ER1 K105 ER10 K200 ER11 K215 Device number Current value Extension file registers ER ER12 K400 ER19 K350 ER1000 K1000 ER100 HFFFF HFFFF ER127 HFFFF ER128 HF...

Page 718: ...7 WDTP FNC291 SAVER R0 K128 D0 END Instruction execution complete flag 1 2 FNC 15 BMOVP R30720 R0 K100 3 4 R0 K100 R1 K105 R10 K200 R11 K215 Setting data Device number Current value Extension registers R R12 K400 R19 K350 R99 K1000 R100 HFFFF HFFFF R2047 ER0 K100 ER1 K105 ER10 K300 ER11 K330 Setting backup data Extension file registers ER ER12 K350 ER19 K400 ER99 K1000 ER100 HFFFF HFFFF ER2047 R30...

Page 719: ...K100 R1 K105 R10 K200 R11 K215 R12 K400 R19 K350 K1000 R99 HFFFF R100 HFFFF R2047 R0 K100 R1 K105 R10 K200 R11 K215 Extension registers R R12 K400 R19 K350 R99 K1000 R100 HFFFF HFFFF R127 HFFFF R128 HFFFF R255 HFFFF R256 HFFFF R1919 HFFFF R1920 ER0 K100 ER1 K105 ER10 K200 ER11 K215 Extension file registers ER ER12 K400 ER19 K350 ER1000 K1000 ER100 HFFFF HFFFF ER127 HFFFF ER128 HFFFF ER255 HFFFF ER...

Page 720: ... cassette is not used extension file registers ER are not initialized 3 Applicable devices Explanation of function and operation 1 16 bit operation INITR and INITRP n sectors of extension registers in the PLC s built in RAM starting from the one specified by and n sectors of extension file registers in a memory cassette flash memory having the same device numbers are initialized to HFFFF K 1 Initi...

Page 721: ...umber Head device number Initialized device range Sector number Head device number Initialized device range Sector 0 R0 R0 to R2047 ER0 to ER2047 Sector 8 R16384 R16384 to R18431 ER16384 to ER18431 Sector 1 R2048 R2048 to R4095 ER2048 to ER4095 Sector 9 R18432 R18432 to R20479 ER18432 to ER20479 Sector 2 R4096 R4096 to R6143 ER4096 to ER6143 Sector 10 R20480 R20480 to R22527 ER20480 to ER22527 Sec...

Page 722: ... one tenth of the value added 50 to 100 to D8013 Setting WDT FNC 07 instruction just before and after INITR instruction as shown below Errors An operation error is caused in the following cases The error flag M8067 turns ON and the error code is stored in D8067 When any device number other than the head device number of a sector of extension file registers is set to error code K6706 When a device ...

Page 723: ...uction is driven m devices starting from are logged until n sectors of extension registers R starting from and extension file registers ER in a memory cassette are filled The number of logged data is stored to If a memory cassette is not used data is not written to extension file registers ER Operand Type Description Data Type Head device number to be logged 1 16 bit binary m Number of devices to ...

Page 724: ...39 ER8192 to ER10239 Sector 12 R24576 R24576 to R26623 ER24576 to ER26623 Sector 5 R10240 R10240 to R12287 ER10240 to ER12287 Sector 13 R26624 R26624 to R28671 ER26624 to ER28671 Sector 6 R12288 R12288 to R14335 ER12288 to ER14335 Sector 14 R28672 R28672 to R30719 ER28672 to ER30719 Sector 7 R14336 R14336 to R16383 ER14336 to ER16383 Sector 15 R30720 R30720 to R32767 ER30720 to ER32767 Destination...

Page 725: ...ile registers is set to error code K6706 While data is written the remaining area and the data quantity to be written are compared with each other If the remaining storage area is insufficient only a limited amount of data is written error code K6706 When the protect switch of the memory cassette is set to ON error code K6770 When the collation result after data writing is mismatch due to omission...

Page 726: ...sette in Cautions on the previous page 5 To the PLC write the data which was temporarily withdrawn to GX Developer 1 Select Online Write to PLC to display the Write to PLC window 2 Click Parameter and MAIN to put a check mark to each of them 3 Click Execute button to execute writing 2 In some versions of GX Developer FX3UC is offered as the PLC type 6 Change the PLC mode from STOP to RUN execute t...

Page 727: ...xample In the program example shown below D1 and D2 are logged to the area from R2048 to R4095 every time X001 turns ON X001 FNC293 LOGRP D1 K2 R2048 K2 D100 HFFFF HFFFF R2048 R2049 HFFFF HFFFF R2050 R2051 HFFFF HFFFF R2052 R5899 HFFFF R5900 HFFFF R5901 HFFFF R6143 Initial value H1234 H5678 HFFFF HFFFF HFFFF HFFFC HFFFF HFFFF HFFFF X001 OFF ON 1st time H1234 H5678 D1 D2 H1234 H5678 H9ABC H1122 HFF...

Page 728: ...d to extension file registers having the same device numbers in a memory cassette flash memory When n is set to 0 it is handled as 32768 when the instruction is executed Operand Type Description Data Type Device number of extension register storing data 16 bit binary n Number of written transferred devices 0 n 32767 Oper and Type Bit Devices Word Devices Others System User Digit Specification Syst...

Page 729: ...e of the watchdog timer D8000 before executing this instruction The table below shows the head device number in each sector Do not turn OFF the power while this instruction is being executed If the power is turned OFF execution of this instruction may be aborted If execution is aborted the data may be lost Make sure to back up the data before executing this instruction For the backup method refer ...

Page 730: ...lect Online Read from PLC to display the Read from PLC window 2 Click Parameter and Device data to put a check mark next to each of them 1 In some versions of GX Developer FX3UC is offered as the PLC type 3 Select Ext file register and Ext register on the Device data tab In GX Developer former than Ver 8 18U the extension file register range cannot be set 4 Click Execute button to execute reading ...

Page 731: ...ogram example shown below the contents of extension registers R10 to R19 sector 0 used for setting data are reflected on extension file registers ER when X000 turns ON Program Operation M0 MOV D8000 D200 X000 K66 D8000 PLS M0 END FNC294 RWER R10 K10 ADD D8000 MOVP D200 D8000 FNC 07 WDT FNC 07 WDT R0 K100 R1 K105 R10 K200 R11 K215 R12 K400 R19 K350 R99 K1000 R100 HFFFF HFFFF R2047 ER0 K100 ER1 K105...

Page 732: ...ized It is possible to specify only the head device number in a sector of extension registers 16 bit binary n Number of sectors of extension registers and extension file registers to be initialized Oper and Type Bit Devices Word Devices Others System User Digit Specification System User Special Unit Index Con stant Real Number Charac ter String Pointer X Y M T C S D b KnX KnY KnM KnS T C D R U G V...

Page 733: ...he watchdog timer set value If an acquired value is 200 ms or less however it is not necessary to change the watchdog timer set value 1 Write a program to be executed from GX Developer to the PLC Online Write to PLC 2 Set the current value of D8000 to 1000 using the device test function in GX Developer Online Debug Device test Word device buffer memory in Device test dialogbox 3 Set the PLC mode t...

Page 734: ...code K6706 When a device number to be initialized exceeds 32767 error code K6706 In this case devices up to R32767 ER32767 are initialized When the protect switch of the memory cassette is set to ON error code K6770 When a memory cassette is not connected error code K6771 Program example In the program example shown below the extension file registers ER0 to ER2047 in sector 0 are initialized Exten...

Page 735: ...atible each other As a result the substantially same contents can be handled in relay ladder charts which are familiar and easy to understand 34 1 2 Explanation of function and operation In SFC programs a state relay State S is regarded as one control process and the input condition and output control sequence are programmed in each process Because the preceding process is not performed any more w...

Page 736: ...unction in the same way 2 When the truck moves backward and the limit switch LS2 turns ON the truck stops for 5 seconds and then starts to move forward again When the limit switch LS3 turns ON the truck immediately starts to move backward 3 When LS2 turns ON after that the truck driving motor stops 4 When the start pushbutton switch is pressed again after a series of operations finish the above op...

Page 737: ...ion from top to bottom 2 Connect each process with vertical lines and write the condition for each proceeding process When performing repeated operations indicate with an arrow the process the truck will return to after a series of operations finish 3 Write the operation performed in each process on the right side of each rectangle indicating a process Initial process 1st process 2nd process Stop ...

Page 738: ...t timer number etc used for an operation performed in each process Many devices such as timers counters and auxiliary relays are provided in a PLC and can be used arbitrarily The timer T0 is used here Because T0 works by the 0 1 sec clock the output contact turns ON five seconds after a coil is driven when the set value is K50 If there are two or more loads such as timers and counters which are dr...

Page 739: ...o RUN When inputting a program using GX Developer write a relay ladder program to a ladder block and write an SFC program to an SFC block Programs expressing operations in state relays and transfer conditions are handled as internal circuits of the state relays and transfer conditions Create each one using a relay ladder For the details of programming procedure in GX Developer refer to GX Develope...

Page 740: ...driven by a contact other than the STL instruction in this way is called the initial state relay and should be described at the top of the flow Role of the initial state relay 1 Used as an identification device for inverse conversion In inverse conversion from an instruction list into an SFC program it is necessary to identify the top of the flow For this purpose use the initial state relay S0 to ...

Page 741: ...er however it is not necessary to input RET instruction because RET instruction is automatically written In a PLC two or more SFC blocks can be put between step 0 and the END instruction When there are ladder blocks and SFC blocks put RET instruction at the end of each SFC program 34 1 7 Preliminary knowledge for creating SFC program List of sequence instructions available in states STL instructio...

Page 742: ... as the program input condition requiring the normally driven status or for indicating the PLC operation status M8002 Initial pulse This relay turns ON and remains ON only instantaneously when the PLC mode is changed from STOP to RUN Use this relay for the initial setting of a program or for setting the initial state relay M8040 STL transfer disable When this relay is set to ON transfer to the ON ...

Page 743: ... coil a timer coil can be programmed in different state relays However it is not permitted to program the same timer coil in adjacent state relays If the same timer coil is programmed in adjacent state relays the timer coil is not set to OFF at process transfer so the current value is not reset Output driving method It is not permitted to write program an instruction not requiring a contact after ...

Page 744: ...ram 2 Transfer destination program In GX Developer z is automatically displayed in the transfer destination state relay 3 Reset circuit program In the program example shown below S65 is reset from S65 by way of X007 Reset of another state relay S70 for example from S65 is executed in the same way but in this case S65 is not reset because this is not transfer In GX Developer z is automatically disp...

Page 745: ... OFF all output relays Y in a PLC Even while the special auxiliary relay M8034 is ON the sequence program is executed continuously but all output relays Y turn OFF These output relays are in the ON status in the monitor Position of MPS MRD and MPP instructions MPS MRD or MPP instruction cannot be used directly from a bus line in a state relay inside the STL Program MPS MRD or MPP instruction after...

Page 746: ...ition is already satisfied In some cases it is necessary to execute the next transfer after the limit switch X030 working as the transfer condition in the ON status is set to OFF once and then set to ON again In such a case make the transfer condition into pulses as shown below so that transfer is not executed by M100 when S30 turns ON for the first time Change 31 3 30 Y000 1 2 X004 X000 X001 TRAN...

Page 747: ...50 turns ON When M0 turns ON again the ON status is transferred to S51 2 Procedure using a pulse contact instruction M2800 to M3071 By using an auxiliary relay M2800 to M3071 in a rising falling edge detection instruction LDP LDF ANDP ANDF ORP or ORF the ON status can be efficiently transferred by the same signal When M2800 or later is specified as a device in a rising falling edge detection instr...

Page 748: ...e state relay turns ON the next time When it is necessary to immediately detect the rising edge or falling edge for a condition which may change while a state relay is OFF change the program as shown below When the ON status is transferred to S70 at the falling edge of X013 and then X014 turns OFF after that the falling edge of X014 is not detected at this point because S3 is OFF When S3 turns ON ...

Page 749: ...ats This paragraph shows operation patterns of single flows and operation patterns when selective branches and parallel branches are combined in SFC programs 1 Jump and repeat flows 1 Jump Direct transfer to a state relay in a lower position or transfer to a state relay in a different flow is called jump and the transfer destination state relay is indicated by 2 Repeat Transfer to a state relay in...

Page 750: ...C programs created by block separation jump to a different flow A state relay in a program created in a different block can be used as a contact for the internal circuit or transfer condition of another state relay 1 Separation of flow 2 Jump to another flow 3 Using a state relay in a program created in a different block 20 21 3 3 22 SFC block 1 40 41 4 4 42 SFC block 3 20 21 3 3 22 SFC block 1 40...

Page 751: ...ental style in process transfer control Only single flow is sufficient in sequence control for simple operations When various input conditions and operator manipulations intervene however complicated conditions can be easily handled by using selective branches and parallel branches A branch for selectively processing many processes depending on a condition is called selective branch A branch for p...

Page 752: ...branch After making a branch create a transfer condition Selective recombination After creating a transfer condition recombine Parallel branch After creating a transfer condition make a branch Parallel recombination After recombining create a transfer condition 21 20 X000 1 TRAN 31 X001 11 TRAN 41 X002 21 TRAN 50 29 X010 10 TRAN 20 X011 39 TRAN 30 X012 49 TRAN 21 20 X000 1 TRAN 31 41 50 29 X010 10...

Page 753: ...ch circuit Limitation in the number of branch circuits In one parallel branch or selective branch up to eight circuits can be provided When there are many parallel branches and selective branches however the total number of circuits per initial state is limited to 16 or less It is not permitted to execute transfer or reset from a recombination line or state relay before recombination to a branch s...

Page 754: ...ecombination line is directly connected to a branch line without a state relay as shown below it is recommended to provide a dummy state relay between the lines There are no dedicated numbers for dummy state relays Use a state relay number not used in a program as a dummy state relay Dummy state relay 20 30 40 50 60 20 30 40 50 60 20 30 40 50 20 30 40 50 20 30 40 50 60 20 30 40 50 60 20 30 40 50 2...

Page 755: ...e A Version Up Information B Execution Times C Applicable Instruction List 2 When there are selective branches continuously reduce the number of branches X000 20 1 2 X001 21 3 22 4 5 29 X003 X007 6 X004 23 7 24 8 X006 9 10 25 11 26 12 13 X013 X017 X010 X011 14 27 15 28 16 X014 X016 20 1 X000 21 2 22 3 24 4 23 5 24 6 7 25 8 26 9 10 27 11 28 12 TRAN X001 TRAN TRAN TRAN TRAN TRAN TRAN TRAN TRAN TRAN ...

Page 756: ...Program 3 It is not permitted to provide a selective transfer condition after parallel branches or to recombine parallel branches after a transfer condition 4 In the flow shown below it is not determined whether a selective or parallel branch is provided Change it as shown below X000 TRAN X000 TRAN X001 X000 TRAN X001 X000 TRAN X001 1 2 1 2 ...

Page 757: ...r Code A Version Up Information B Execution Times C Applicable Instruction List 5 The following flows are allowed Flow B is alright In flow A however note that an operation is paused at a point where parallel branches are recombined 6 It is not permitted to cross flows in SFC programs Change a flow on the left to a flow on the right This change enables inverse conversion from a program on the inst...

Page 758: ... When the PLC mode is changed from STOP to RUN the state relay S3 is driven by the initial pulse M8002 2 The state relay S3 outputs Y000 One second later the ON status transfers to the state relay S20 3 The state relay S20 outputs Y001 1 5 seconds later the ON status returns to the state relay S3 1 second 1 5 seconds Y000 Y001 20 M8002 3 1 3 Ladder block SFC block 0 TRAN T0 S3 SET Y000 T0 Y001 T1 ...

Page 759: ... center fountain Y003 loop line lamp Y007 loop line fountain Y000 wait indication and then the outputs return to the wait status Each output is switched in turn every 2 seconds by a timer 2 Continuous operation X001 ON Y001 to Y007 turn ON in turn repeatedly 3 Stepping operation X002 ON Every time the start button is pressed each output turns ON in turn M8000 Ladder block 20 3 1 0 TRAN X000 Y000 Y...

Page 760: ...pts latched battery backed type state relays so that the operation is restarted from this process when the start button is pressed even after the power is interrupted in the middle of operation However all outputs except Y020 are disabled until the start button is pressed M8034 All outputs disable When M8034 is set to ON all outputs to the outside turn OFF even though the PLC is executing each pro...

Page 761: ... a condition and the execution is transferred to a state in a lower position The execution can be transferred to a state in an upper position 20 M8002 0 1 Ladder block SFC block 0 TRAN X000 S0 SET T0 TRAN T0 K20 Initial pulse Start Y000 SET Motor M1 is started X001 21 T1 K30 Y001 SET Motor M2 is started 27 TRAN X001 Stop 9 2 TRAN T1 X001 22 T2 K40 Y002 SET Motor M3 is started 26 X001 Stop 10 TRAN ...

Page 762: ...20 Initial pulse Start Y000 SET X001 21 T1 K30 Y001 SET 2 T1 X001 22 T2 K40 Y002 SET 3 T2 X001 23 Y003 SET 24 T4 K40 Y003 RST 4 X001 Stop 5 T4 25 T5 K30 Y002 RST 6 T5 26 T6 K20 Y001 RST 7 T6 27 Y000 RST 8 Y000 0 RET END TRAN X001 Stop 9 30 TRAN S30 10 31 TRAN X001 11 TRAN S31 12 32 TRAN X001 13 TRAN S32 14 Dummy state relay TRAN TRAN TRAN TRAN TRAN TRAN TRAN TRAN For example if X001 turns ON while...

Page 763: ... and S41 do not turn ON The recombination state relay S50 is driven by either one among S22 S32 and S42 2 Example of selecting and carrying large and small balls The figure below shows a mechanism which selects and carries large and small balls using conveyors The upper left position is regarded as the origin and the mechanism performs in the order moving down suction moving up moving rightward mo...

Page 764: ...Y002 Moving up TRAN X003 Upper limit switch 32 7 X004 33 8 Y004 Moving leftward TRAN X001 X001 Left limit switch 0 9 25 10 26 11 27 12 Origin TRAN T0 X002 Lower limit switch OFF large ball T1 K10 Y001 SET Suction T1 TRAN TRAN Y002 Moving up X003 Y003 Moving rightward TRAN X005 Right limit switch large bucket X005 When a ball is small when X002 turns ON the left flow is valid When a ball is large t...

Page 765: ... type crosswalk shown in the figure below can be expressed in flows having parallel branches and recombination Y003 Green Y002 Yellow Y001 Red The SFC program for a pushbutton type crosswalk is as shown below In this example a partial flow jump to a state relay located in an upper position is repeated for blinking the green lamp on the crosswalk When the PLC mode is changed from STOP to RUN the in...

Page 766: ...ng button Y003 Road Green T0 K300 22 2 T1 TRAN Y002 Road Yellow T1 K100 23 Y001 T2 K50 Road Red 30 3 T2 31 4 T3 32 5 T4 33 6 C0 T5 34 8 T6 TRAN TRAN Y005 Sidewalk Red TRAN Y006 Sidewalk Green T3 K150 T4 K5 TRAN Y006 C0 K5 T5 K5 TRAN 7 C0 TRAN T5 32 Y005 T6 C0 RST K50 S0 Y003 Road Green Y005 Sidewalk Red TRAN This counter counts how many times the state relay S33 turns ON When S33 turns ON five tim...

Page 767: ...grammed in a state relay Because the preceding process is not performed any more when the program execution proceeds to the next process a machine can be controlled using simple sequences for each process Operation of step ladder instructions In a step ladder program each process performed by the machine is expressed by a state relay A state relay consists of a drive coil and contact STL contact i...

Page 768: ...X002 SET S22 STL S22 T0 K50 T0 SET S23 STL S23 Y021 Y023 X003 SET S24 STL S24 Y023 Y021 S0 X002 RET END It is necessary to input RET instruction in a program Y023 Y021 Ladder block SFC block M8002 SET S0 Program for setting to ON an initial state relay State number and transfer condition number are indicated 0 20 0 1 21 2 22 3 23 4 24 5 S0 RET END X000 TRAN Y021 Y023 X001 T0 X002 Y023 Y021 T0 Y021...

Page 769: ...ly For the program creation procedure refer to the description on SFC programs For the program creation procedure refer to Subsection 34 1 3 For the handling and role of initial state relays refer to Subsection 34 1 4 For latched battery backed type state relays refer to Subsection 34 1 5 For RET instruction refer to Subsection 34 1 6 1 SET and RST instructions for a state relay are two step instr...

Page 770: ...bited to use jump instructions in state relays But it is not recommended to use jump instructions because complicated movements will be resulted 1 MPS instruction cannot be used immediately after an STL instruction even in a drive processing circuit Instruction State relay LD LDI LDP LDF AND ANI ANDP ANDF OR ORI ORP ORF INV OUT SET RST PLS PLF ANB ORB MPS MRD MPP MC MCR Initial general state relay...

Page 771: ...ion requiring the normally driven status or for indicating the PLC operation status M8002 Initial pulse This relay turns ON and remains ON only instantaneously when the PLC mode is changed from STOP to RUN Use this relay for the initial setting of a program or for setting the initial state relay M8040 STL transfer disable When this relay is set to ON transfer of the ON status is disabled among all...

Page 772: ...am Replacing and V Replace the symbol used in SFC programs to express repeat jump or transfer to a state relay in another separate flow with the OUT instruction Replace the symbol V used to express reset of a state relay with the RST instruction Y001 Change Y002 Y003 Y001 X005 Y002 Y003 Move the position Y001 M8000 Y003 Y002 Insert a NC contact X005 RUN monitor or STL S20 STL S20 STL S20 X005 Chan...

Page 773: ...mbination 1 Example of selective branch Do not use MPS MRD MPP ANB and ORB instructions in a transfer processing program with branches and recombination Even in a load driving circuit MPS instructions cannot be used immediately after STL instructions In the same way as programs for general state relays program the drive processing first and then program the transfer processing Continuously program...

Page 774: ...at a branch line does not cross a recombination line Before recombination first program the drive processing of state relays After that program only the transfer processing to recombination state relays This rule should be observed to enable inverse conversion into an SFC program STL OUT STL OUT STL OUT STL LD SET STL LD SET STL LD SET 50 29 1 Y010 STL S29 STL S39 S29 Y010 S39 Y011 S49 Y012 S29 X0...

Page 775: ... processing 4 Example of parallel recombination Do not use MPS MRD MPP ANB and ORB instructions in a program with branches and recombination Even in a load driving circuit MPS instructions cannot be used immediately after STL instructions Pay attention to the programming order so that a branch line does not cross a recombination line Before recombination first program the drive processing of state...

Page 776: ... LD SET STL LD SET STL LD SET LD SET 100 20 1 X000 X000 TRAN 2 X001 STL S20 SET S100 S20 X000 S100 S30 X001 S100 S100 X003 S50 X004 S60 30 3 50 60 X001 TRAN X003 TRAN 4 X004 TRAN Dummy state SET S100 STL S30 X003 SET S50 STL S100 X004 SET S60 Step ladder SFC program List program STL STL LD SET STL LD SET SET 101 20 1 X000 X000 TRAN S101 STL S20 SET S50 S20 S30 X000 S101 S101 S101 S50 S60 30 2 50 6...

Page 777: ...3 is driven by the initial pulse M8002 The state relay S3 outputs Y000 1 second later the ON status transfers to the state relay S20 The state relay S20 outputs Y001 1 5 seconds later the ON status returns to the state relay S3 List program STL STL LD SET STL LD SET LD SET 103 20 1 X000 TRAN X000 STL S20 SET S103 S20 S30 X000 S103 S103 X001 S40 X002 S50 30 2 40 50 X001 TRAN 3 X002 TRAN STL S30 X00...

Page 778: ...LD SET STL OUT LD SET STL OUT OUT LD SET STL OUT OUT LD SET STL OUT OUT LD SET STL OUT OUT LD AND OUT LD ANI OUT RET END M8000 M8047 X002 X000 M8040 M8002 S3 S3 Y000 X000 S20 S20 Y001 T1 K20 T1 S21 S21 Y002 T2 K20 T2 S22 S22 Y003 T3 K20 T3 S27 S27 Y007 T7 K20 T7 X001 S20 T7 X001 S3 M8000 0 1 3 4 5 7 8 10 11 12 13 15 16 17 20 21 23 24 25 28 29 31 32 33 36 37 39 40 41 44 45 46 48 49 50 52 53 0 3 10 ...

Page 779: ...hanism which selects and carries large and small balls using conveyors The upper left position is regarded as the origin and the mechanism performs in the order moving down suction moving up moving rightward moving down release moving up moving leftward When the arm moves down and the electromagnet pushes a large ball the lower limit switch LS2 turns OFF When the electromagnet pushes a small ball ...

Page 780: ... ANI OUT STL LD SET STL LD 34 35 38 39 41 42 43 44 46 47 48 49 51 52 53 54 55 56 57 58 59 60 61 63 64 S30 S30 Y000 X002 S31 S31 Y001 T2 K10 T2 S32 S32 Y002 X003 S33 S33 X001 Y003 Y004 X001 S0 SET STL OUT LD SET STL RST OUT LD SET STL OUT LD SET STL LDI ANI OUT LD OUT RET END 65 67 68 69 70 72 73 74 77 78 80 81 82 83 85 86 87 88 89 90 92 93 Y007 T1 T1 K10 K10 Y000 T0 K20 Y002 Y002 Y003 Y003 Y001 SE...

Page 781: ...ay located in an upper position is repeated for blinking the green lamp on the crosswalk When the PLC mode is changed from STOP to RUN the initial state relay S0 turns ON Normally the green lamp is ON for the road and the red lamp is ON for the sidewalk When the crossing button X000 or X001 is pressed the state relay S21 specifies road green and the state relay S30 specifies sidewalk red The signa...

Page 782: ... 50 51 53 54 55 T5 K5 C0 T5 S34 C0 T5 S32 S34 Y005 C0 T6 K50 S23 S34 T6 S0 OUT LD AND SET LDI AND OUT STL OUT RST OUT STL STL LD OUT RET END 58 61 62 63 65 66 67 69 70 71 73 76 77 78 79 81 82 X000 X001 6 13 21 T2 26 33 30 T1 61 C0 T5 C0 T5 T6 12 25 41 38 T3 42 47 46 78 T6 S0 S0 STL SET C0 K5 Y003 T0 K100 Y002 Y006 T5 K5 K50 T2 Y003 T1 S22 SET S30 STL S22 STL S31 SET Y005 K300 S31 STL S23 SET Y006 ...

Page 783: ... refer to Section 35 3 2 Input interrupt delay function interrupt of external signal input X By the input signal from an input X000 to X005 the main sequence program is paused and an interrupt routine program is executed with priority after the delay time set in units of 1 ms The input interrupt execution timing can be specified on the rising edge or falling edge of the signal by the pointer numbe...

Page 784: ...one Even if an interrupt is generated between the DI instruction and EI instruction interrupt disabled zone the interrupt is executed after the EI instruction 2 Program example 3 Cautions a The interrupt inputs with special auxiliary relay for interrupt disable M8050 to M8059 turned ON are excluded These special auxiliary relays are not valid for the pulse catch function b When the disabled zone i...

Page 785: ...without being affected by the operation cycle of the PLC 2 Interrupt operation while FROM TO instruction is executed The interrupt operation is executed as follows depending on the ON OFF status of the special auxiliary relay M8028 1 While M8028 is OFF While FROM TO instructions are being executed interrupts are automatically disabled Input interrupts and timer interrupts are not executed Interrup...

Page 786: ...is used Even when a 1 ms retentive type timer is used rigid attention should be paid In an interrupt routine use timers for routine program T192 to T199 4 Non overlap of input input interrupt with without delay function and pulse catch function The inputs X000 to X007 can be used for high speed counters input interrupts pulse catch SPD ZRN DSZR and DVIT instructions and for general purpose inputs ...

Page 787: ...01 triggered by X000 X001 Current value of C0 1 2 3 Counter is reset Because the C0 reset instruction is valid the current value of C0 remains unchanged even if a pulses are input C0 remains reset Y007 is being output Outputs are latched RST C0 Y007 Interrupt program RST C0 X002 FNC 06 FEND RST C0 RST Y007 Program to reset Y007 at an arbitrary timing Program to deactivate the preceding C0 reset in...

Page 788: ...ogram Interrupts are enabled FNC 04 EI FNC 06 FEND FNC 03 IRET I001 Interrupt pointer When the rising edge of X000 is detected FNC 03 IRET Step 0 End of main program Main program Interrupt return I100 Interrupt pointer When the falling edge of X001 is detected END Interrupt routine 2 interrupt program Interrupt return Main program Interrupt inputs are accepted after EI instruction It is not necess...

Page 789: ...y it is not necessary to change the filter value using REFF FNC 51 instruction or special data register D8020 input filter adjustment The input filter of an input relay not being used as an input interrupt pointer operates at 10 ms initial value 3 Pulse width of input interrupt For executing input interrupt by an external signal it is necessary to input the ON or OFF signal having the duration sho...

Page 790: ...nd REF FNC 50 instruction is not executed Step 0 I001 Interrupt pointer When the rising edge of X000 is detected M8000 RUN monitor FNC 06 FEND FNC 04 EI Y000 K8 1 FNC 50 REF FNC 03 IRET END SET Y000 Interrupts are enabled by EI instruction The main program is described The main program is finished by FEND instruction When an interrupt routine is executed by turning ON of X000 Y000 is set to ON unc...

Page 791: ...tep 0 I201 Interrupt pointer When the rising edge of X002 is detected M8000 RUN monitor FNC 04 EI END FNC 06 FEND D0 FNC 24 INC FNC 03 IRET Interrupts are enabled by EI instruction The main program is described The main program is finished by FEND instruction When X002 turns ON 1 is added to the value of D0 INC instruction executes increment in every operation cycle but the interrupt routine is ex...

Page 792: ...ime is measured X010 Preparation for measurement SW X000 X001 24V Step 0 I001 Interrupt pointer M8000 X010 K32767 I100 Interrupt pointer When the falling edge of X001 is detected X010 M0 K1 M8000 Reset image is reset Timer is driven Measurement is completed Timer is stopped Timer is reset Measurement data When the rising edge of X000 is detected FNC 04 EI FNC 06 FEND T246 FNC 03 IRET FNC 12 M0V T2...

Page 793: ...peed ring counter Step 0 I001 Interrupt pointer X010 I100 Interrupt pointer X010 X010 Measurement data When the rising edge of X000 is detected When the falling edge of X001 is detected D8099 is set to ON Measurement is completed FNC 04 EI M8099 FNC 06 FEND FNC 03 IRET FNC 12 M0V FNC 03 IRET END RST D8099 RST M0 D8099 D0 SET M0 When X001 turns OFF The ring counter value is transferred to D0 and me...

Page 794: ...djusted electrically without changing the actual position 2 Programming procedure 3 Timing chart M8393 FNC 12 MOV K Delay time specification program Make sure to describe the delay time specification program shown on the left at the head of an interrupt routine program Because this program is a pattern program change only the delay time 1 For specifying the time here only a constant K or data regi...

Page 795: ...clic interrupt processing without regard to the operation cycle of a PLC If the timer time is set to 9 ms or less however the timer interrupt processing may not be executed in an accurate cycle in the following cases When the interrupt program processing time is long When the main program contains an applied instruction whose processing time is long 1 Cleared when the PLC mode is changed from RUN ...

Page 796: ...ries of operations in synchronization with the scan time Because the total time may be too long or time fluctuation may cause a problem in these instructions it is recommended to execute these instructions at a constant time interval using the timer interrupt function When not using the timer interrupt function use the constant scan mode Step 0 I610 Interrupt pointer When interrupt is given at eve...

Page 797: ...B Execution Times C Applicable Instruction List 1 Timer interrupt processing of HKY FNC 71 instruction For HKY FNC 71 instruction refer to Section 15 2 Step 0 I620 Interrupt pointer When interrupt is given at every 20 ms M8000 RUN monitor FNC 04 EI FNC 06 FEND FNC 50 REF FNC 71 HKY FNC 03 IRET FNC 50 REF END Y000 K8 X000 Y000 D0 M0 K8 X000 Interrupts are enabled by EI instruction The main program ...

Page 798: ...ND M 1 FNC 67 RAMP D 1 D 2 D 3 K1000 Initial value Target value Current value Number of times of transfer M 1 M8029 FNC 03 IRET END I610 M8026 Interrupt pointer Step 0 When interrupt is given at every 10 ms RST Interrupts are enabled by EI instruction The main program is described With M8026 turned ON when the value of D3 reaches the final value D2 the final value is latched As soon as the start c...

Page 799: ...hen END instruction is executed 4 Number and operation of six timer interrupt pointers 1 Cleared when the PLC mode is changed from RUN to STOP 5 When setting an interrupt output Y or M to ON or OFF using a high speed counter When only controlling the ON OFF status of an output relay Y or auxiliary relay M according to the current value of a high speed counter a required program can be easily creat...

Page 800: ...d from STOP to RUN 2 Program example 1 When using the pulse catch function at 5 µs or when receiving a pulse whose response frequency is 50 k to 100 kHz using a high speed counter perform the following Make sure that the wiring length is 5 m or less Connect a bleeder resistor of 1 5 kΩ 1 W or more to an input terminal and make sure that the load current of the open collector transistor output in t...

Page 801: ...Up Information B Execution Times C Applicable Instruction List 3 Cautions on use 1 When receiving an input again it is necessary to reset using a program a device which was once set Accordingly until a device is reset a new input cannot be received 2 When it is necessary to receive continuous short pulses input signals use the external input interrupt function or high speed counter function 3 A fi...

Page 802: ...M 8002 Initial pulse NO contact 3 3 3 3 3 3 3 M 8003 Initial pulse NC contact 3 3 3 3 3 3 3 M 8004 Error occurrence FX3U FX3UC ON when either M8060 M8061 M8064 M8065 M8066 or M8067 is ON FX1S FX1N FX2N FX1NC FX2NC ON when either M8060 M8061 M8063 M8064 M8065 M8066 or M8067 is ON 3 3 D8004 3 3 3 3 3 M 8005 Battery voltage low ON when battery voltage is below the value set in D8006 Refer to Subsecti...

Page 803: ... clock Refer to Subsection 36 2 7 3 3 3 Always ON 3 M 8019 Real time clock RTC error For real time clock Refer to Subsection 36 2 7 3 3 3 3 3 3 3 3 Flag M 8020 Zero ON when the result of addition subtraction is 0 Refer to Subsection 6 5 2 for usage 3 3 3 3 3 3 3 M 8021 Borrow ON when the result of subtraction is less than the min negative number Refer to Subsection 6 5 2 for usage 3 3 3 3 3 3 3 M ...

Page 804: ...emory and data memory are retained Refer to Subsection 36 2 12 3 3 3 3 3 3 3 M 8034 1 All outputs disable All external output contacts of PLC are turned OFF Refer to Subsection 36 2 13 3 3 3 3 3 3 3 M 8035 Forced RUN mode Refer to Subsection 36 2 14 for details 3 3 3 3 3 3 3 M 8036 Forced RUN signal 3 3 3 3 3 3 3 M 8037 Forced STOP signal 3 3 3 3 3 3 3 M 8038 Parameter setting Communication parame...

Page 805: ... 3 3 3 3 M 8049 1 Annunciator enable D8049 is enabled when M8049 is ON 3 3 D8049 M8048 3 3 1 Cleared when PLC switches from RUN to STOP 2 Executed at END instruction 3 S1000 to S4095 are available only in the FX3U FX3UC Series PLC Interrupt Disable Refer to Subsection 35 2 1 for details M8050 input interrupt I00 disable 4 If an input interrupt or timer interrupt occurs while a special auxiliary re...

Page 806: ...t cleared in an FX3U or FX3UC PLC 2 Serial communication error 2 ch2 in FX3U and FX3UC PLCs is detected by M8438 3 Cleared when PLC switches from STOP to RUN 4 When M8069 is ON I O bus check is executed Refer to Subsection 37 3 1 for details 5 FX3U FX3UC only supported Parallel Link M 8070 6 Parallel link Set M8070 when using master station 3 3 3 3 3 3 3 M 8071 6 Parallel link Set M8071 when using...

Page 807: ...ter D8099 will operate after END instruction is executed while M8099 is ON For FX3U FX3UC 0 1ms high speed ring counter D8099 will operate after M8099 turns ON Memory Information M 8101 Not used M 8102 M 8103 M 8104 ON when function extension memory is installed D8104 D8105 3 3 3 3 M 8105 ON when writing to flash memory 3 3 M 8106 Not used M 8107 Device comment registration check 3 3 D8107 M 8108 ...

Page 808: ...n is OFF High Speed Counter Comparison High Speed Table and Positioning Positioning is supported in FX1S FX1N and FX1NC PLCs M 8130 HSZ FNC 55 instruction Table comparison mode 3 3 D8130 3 3 M 8131 HSZ FNC 55 instruction Table comparison mode completion flag 3 3 3 3 M 8132 HSZ FNC 55 and PLSY FNC 57 instructions Speed pattern mode 3 3 D8131 to D8134 3 3 M 8133 HSZ FNC 55 and PLSY FNC 57 instructio...

Page 809: ... 3 2 M 8157 1 Inverter communication error ch2 3 3 D8157 Communication error in EXTR FNC180 instruction is latched D8157 3 2 3 2 M 8158 1 Inverter communication error latch ch2 3 3 D8158 M 8159 1 IVBWR FNC274 instruction error ch2 3 3 D8159 1 Cleared when PLC switches from STOP to RUN 2 Available in Ver 3 00 or later Advanced Function M 8160 3 SWAP function of XCH FNC 17 3 3 3 3 M 8161 3 4 8 bit p...

Page 810: ...eating M8179 in setting program N N Network Refer to FX Series User s Manual Data Communication Edition for details M 8180 Not used M 8181 M 8182 M 8183 3 Data communication error Master station 3 3 D8201 to D8218 M504 3 3 4 3 3 M 8184 3 Data communication error Slave station No 1 3 3 M505 3 3 4 3 3 M 8185 3 Data communication error Slave station No 2 3 3 M506 3 3 4 3 3 M 8186 3 Data communication...

Page 811: ... 3 3 M 8203 C203 3 3 3 3 3 3 M 8204 C204 3 3 3 3 3 3 M 8205 C205 3 3 3 3 3 3 M 8206 C206 3 3 3 3 3 3 M 8207 C207 3 3 3 3 3 3 M 8208 C208 3 3 3 3 3 3 M 8209 C209 3 3 3 3 3 3 M 8210 C210 3 3 3 3 3 3 M 8211 C211 3 3 3 3 3 3 M 8212 C212 3 3 3 3 3 3 M 8213 C213 3 3 3 3 3 3 M 8214 C214 3 3 3 3 3 3 M 8215 C215 3 3 3 3 3 3 M 8216 C216 3 3 3 3 3 3 M 8217 C217 3 3 3 3 3 3 M 8218 C218 3 3 3 3 3 3 M 8219 C219...

Page 812: ...9 Not used Analog Special Adapter Refer to Subsection 36 2 17 for applicability of each analog special adapter M 8260 to M 8269 1 1st special adapter 3 3 2 M 8270 to M 8279 1 2nd special adapter 3 3 2 M 8280 to M 8289 1 3rd special adapter 3 3 2 M 8290 to M 8299 1 4th special adapter 3 3 2 M 8300 to M 8315 Not used 1 The unit number of the analog special adapter is counted from the main units side...

Page 813: ...fication 3 3 M 8343 Y000 Forward limit 3 3 M 8344 Y000 Reverse limit 3 3 M 8345 2 Y000 DOG signal logic reverse 3 3 M 8346 2 Y000 Zero point signal logic reverse 3 3 M 8347 2 Y000 Interrupt signal logic reverse 3 3 M 8348 Y000 Positioning instruction activation 3 3 M 8349 2 Y000 Pulse output stop command 3 3 M 8350 Y001 Pulse output monitor ON BUSY OFF READY 3 3 M 8351 2 Y001 Clear signal output f...

Page 814: ...f C235 C241 C244 C246 C247 C249 C251 C252 and C254 3 3 M 8381 3 Operation status of C236 3 3 M 8382 3 Operation status of C237 C242 and C245 3 3 M 8383 3 Operation status of C238 C248 C248 OP C250 C253 and C255 3 3 M 8384 3 Operation status of C239 and C243 3 3 M 8385 3 Operation status of C240 3 3 M 8386 3 Operation status of C244 OP 3 3 M 8387 3 Operation status of C245 OP 3 3 M 8388 Contact for...

Page 815: ... On demand error flag 3 3 M 8429 Computer link ch2 On demand Word Byte changeover RS2 FNC 87 ch2 Time out check flag 3 3 2 Cleared when PLC switches from RUN to STOP or when RS2 instruction ch2 is OFF Error Detection Refer to Chapter 37 for details M 8430 to M 8437 Not used M 8438 Serial communication error 2 ch2 3 3 D8438 M 8439 to M 8448 Not used M 8449 Special block error flag 3 3 3 D8449 M 845...

Page 816: ...2 3 2 3 8 3 4 8 3 8 3 4 8 D 8003 Memory type Type of RAM EEPROM EPROM cassette or ON OFF status of memory protect switch is stored 3 3 3 3 3 3 3 D 8004 Error number M 3 3 M8004 3 3 3 3 3 D 8005 Battery voltage 3 3 M8005 3 3 D 8006 Low battery voltage detection level Default FX2N and FX2NC PLCs 3 0V in units of 0 1V FX3U and FX3UC PLCs 2 7V in units of 0 1V Writes from system ROM at power ON 3 3 M8...

Page 817: ... to D8008 for correction Do not make any change in a sequence program For FX3U and FX3UC PLCs refer to Subsection 36 2 4 Clock D 8010 Present scan time Accumulated instruction execution time from 0 step in units of 0 1 ms Refer to Subsection 36 2 5 3 Same as on the right 3 Same as on the right 3 Indicated value includes waiting time of constant scan operation when M8039 is activated D 8011 Minimum...

Page 818: ...9 Value of V0 V register 2 3 3 3 3 3 3 3 1 In FX1N PLCs the input filter can be adjusted in X000 to X007 2 The values of Z1 to Z7 and V1 to V7 are stored in D8182 to D8195 Analog Volume FX1S FX1N D 8030 Value of analog volume VR1 Integer from 0 to 255 3 3 D 8031 Value of analog volume VR2 Integer from 0 to 255 3 3 Constant Scan D 8032 Not used D 8033 D 8034 D 8035 D 8036 D 8037 D 8038 D 8039 Const...

Page 819: ...from S900 to S999 is stored in D8049 3 3 M8049 3 3 D 8050 to D 8059 Not used 1 Executed at END instruction 2 S1000 to S4095 are available only in FX3U FX3UC PLCs Error Detection Refer to Chapter 37 for details D 8060 If the unit or block corresponding to a programmed I O number is not actually loaded M8060 is set to ON and the first device number of the erroneous block is written to D8060 3 3 M806...

Page 820: ... 3 3 3 3 D 8081 3 3 3 3 D 8082 3 3 3 3 D 8083 3 3 3 3 D 8084 3 3 3 3 D 8085 3 3 3 3 D 8086 3 3 3 3 D 8087 3 3 3 3 D 8088 3 3 3 3 D 8089 3 3 3 3 D 8090 3 3 3 3 D 8091 3 3 3 3 D 8092 3 3 3 3 D 8093 3 3 3 3 D 8094 3 3 3 3 D 8095 3 3 3 3 D 8096 3 3 3 3 D 8097 3 3 3 3 D 8098 3 3 3 3 1 The sampling trace devices are used by peripheral equipment High Speed Ring Counter D 8099 Up operation high speed ring...

Page 821: ...edicated to FX1S and FX1N D 8112 FX1N 2AD BD Digital value of ch1 M8112 3 3 D 8113 FX1N 2AD BD Digital value of ch2 M8113 3 3 D 8114 FX1N 1DA BD Digital value to be output M8112 3 3 D 8115 to D 8119 Not used RS FNC 80 and Computer Link ch1 Refer to Data Communication Edition for details D 8120 2 RS FNC 80 instruction and computer link ch1 Communication format setting 3 3 3 3 3 3 3 D 8121 2 Compute...

Page 822: ...able count 3 3 D8138 D 8139 HSCS FNC 53 HSCR FNC 54 HSZ FNC 55 and HSCT FNC280 instructions Number of instructions being executed 3 3 D8139 D 8140 Lower Accumulated number of pulses output to Y000 for PLSY FNC 57 and PLSR FNC 59 instructions or current address of Y000 for positioning instruction 3 3 3 3 3 3 3 D 8141 Upper D 8142 Lower Accumulated number of pulses output to Y001 for PLSY FNC 57 and...

Page 823: ... occurs during IVBWR FNC274 instruction ch1 Default 1 3 3 M8154 Response waiting time of EXTR FNC180 instruction 3 2 3 2 D 8155 Response wait time of inverter communication ch2 3 3 D 8155 Step number during communication of EXTR FNC180 instruction M8155 3 2 3 2 D 8156 Step number of instruction during inverter communication ch2 Default 1 3 3 M8156 Error code for EXTR FNC180 instruction M8156 3 2 3...

Page 824: ...D 8172 D 8173 Station number 3 3 3 3 3 3 3 3 D 8174 Total number of slave stations 3 3 3 3 3 3 3 3 D 8175 Refresh range 3 3 3 3 3 3 3 3 D 8176 Station number setting 3 3 M8038 3 3 3 3 3 3 D 8177 Total slave station number setting 3 3 3 3 3 3 3 3 D 8178 Refresh range setting 3 3 3 3 3 3 3 3 D 8179 Retry count setting 3 3 3 3 3 3 3 3 D 8180 Comms time out setting 3 3 3 3 3 3 3 3 D 8181 Not used 3 Av...

Page 825: ...8203 1 Number of communication error at master station 3 3 M8183 to M8191 D203 3 3 2 3 3 D 8204 1 Number of communication error at slave station No 1 3 3 D204 3 3 2 3 3 D 8205 1 Number of communication error at slave station No 2 3 3 D205 3 3 2 3 3 D 8206 1 Number of communication error at slave station No 3 3 3 D206 3 3 2 3 3 D 8207 1 Number of communication error at slave station No 4 3 3 D207 3...

Page 826: ...0 English Other than K0 3 3 D 8303 LCD contrast setting value Default K0 3 3 D 8304 Not used D 8305 D 8306 D 8307 D 8308 D 8309 3 Latch battery backed device RND FNC184 D 8310 Lower RND FNC184 instruction Data for generating random number Default K1 3 3 D 8311 Upper Syntax Circuit Operation or Unconnected I O Designation Error Step Number Refer to Chapter 37 for details D 8312 Lower Operation erro...

Page 827: ...FNC186 instruction Scan counting for timing clock output 5 3 3 1 D 8336 DVIT FNC151 instruction Specification of interrupt input 3 3 2 M8336 D 8337 to D 8339 Not used D 8340 Lower Y000 Current value register Default 0 3 3 D 8341 Upper 3 3 D 8342 Y000 Bias speed Default 0 3 3 D 8343 Lower Y000 Maximum speed Default 100000 3 3 D 8344 Upper 3 3 D 8345 Y000 Creep speed Default 1000 3 3 D 8346 Lower Y0...

Page 828: ...r Y003 Current value register Default 0 3 1 D 8371 Upper D 8372 Y003 Bias speed Default 0 3 1 D 8373 Lower Y003 Maximum speed Default 100000 3 1 D 8374 Upper D 8375 Y003 Creep speed Default 1000 3 1 D 8376 Lower Y003 Zero return speed Default 50000 3 1 D 8377 Upper D 8378 Y003 Acceleration time Default 100 3 1 D 8379 Y003 Deceleration time Default 100 3 1 D 8380 to D 8392 Not used 1 Available only...

Page 829: ...15 RS2 FNC 87 ch1 Receive sum calculated result 3 3 D 8416 RS2 FNC 87 ch1 Send sum 3 3 D 8417 Not used D 8418 D 8419 Operation mode display ch1 3 3 RS2 FNC 87 ch2 and Computer Link ch2 Refer to Data Communication Edition for details D 8420 RS2 FNC 87 ch2 Communication format setting 3 3 D 8421 Computer link ch2 Station number setting 3 3 D 8422 1 RS2 FNC 87 ch2 Remaining points of transmit data 3 ...

Page 830: ... Ver 2 00 or later Positioning FX3U and FX3UC PLCs Refer to Positioning Control Edition for details D 8460 to D 8463 Not used 3 3 D 8464 DSZR FNC150 and ZRN FNC156 instructions Y000 Clear signal device specification 3 3 2 M8464 D 8465 DSZR FNC150 and ZRN FNC156 instructions Y001 Clear signal device specification 3 3 2 M8465 D 8466 DSZR FNC150 and ZRN FNC156 instructions Y002 Clear signal device sp...

Page 831: ... always OFF while the PLC is in the RUN mode 2 Flag operation timing 2 Initial pulse M8002 and M8003 The initial pulse M8002 M8003 is turned to ON or OFF during the 1st scan of the PLC program It can be utilized as an initial setting signal in a program for initializing the program for writing a specified value or for another purpose 1 Example program M8003 turns OFF momentarily for only 1 scan ti...

Page 832: ...dog timer error to occur 2 When executing many FROM TO instructions at the same time When many FROM TO instructions are executed or when many buffer memories are transferred it extends the scan time and a watchdog timer error may occur 3 When using many high speed counters software counters When many high speed counters are programmed and high frequency is counted at the same time it extends the s...

Page 833: ...tary power failure time in the FX3UC PLC DC power supply type is 5 ms Do not overwrite the power failure detection time in device D8008 36 2 5 Scan time monitor D8010 to D8012 The present value minimum value and maximum value of the PLC scan time operation time are stored in D8010 D8011 and D8012 respectively When using the constant scan mode the values stored in these devices include the waiting ...

Page 834: ... When the second data is from 0 to 29 it is set to 0 When the second data is from 30 to 59 it is set to 0 and the minute data is incriminated by 1 M8018 Installation detection This device is always ON M8019 Real time clock RTC error When the data stored in special data registers is outside the allowable time setting range this device turns ON Number Name Set value range Operation and function D801...

Page 835: ... digit year mode on the second ladder scan in RUN mode 1 The PLC is usually operating in the two digit year mode When the above instruction is executed during RUN and K2000 fixed value is transferred to D8018 year data D8018 switches to the four digit year mode 2 Execute this program every time the PLC enters RUN Only the year data display switches to four digit mode when K2000 is transferred The ...

Page 836: ... the order year month day hour minute second When the last second value is decided by pressing OK key the message Current time is set appears and setting of the present time is completed 5 Press OK or ESC key to return to selection screen 6 Press ESC key to return to MENU screen Operation key Contents of operation ESC Return to the previous setting item When pressing while year data is flickering ...

Page 837: ... value change function in the device monitor of the programming tool input the date and time time several minutes ahead to each data register 3 Finishing the time change When the actual time reaches the input data reset M8015 by forced ON OFF Point a While M8015 is OFF the registers for date and time cannot be changed Make sure to set M8015 to ON and then input date and time b When inputting the t...

Page 838: ...en 0 is specified 1 When setting the input filter to 5 µs or when receiving pulses whose response frequency is 50 k to 100 kHz using high speed counters perform the following Input wiring length should be 5 m 16 4 or less Connect a bleeder resistor 1 5 kΩ 1 2 W to an input terminal The load current of the open collector transistor output in the device on the other end should be 20 mA or more inclu...

Page 839: ...egister R 2 Applicable programming tool Some programming tool versions do not support batteryless mode In such versions input a sequence program to enable the batteryless operation as explained below 3 Conditions for batteryless operation 1 An FLROM optional memory cassette for program memory is installed so that programs are not erased 2 The latch battery backed devices such as auxiliary relays a...

Page 840: ...witches from RUN to STOP 1 Example program For example when a heater is driven by the PLC the PLC can be stopped while the heater and other equipment are kept driven and then the PLC can be started again after program changes 36 2 13 All outputs disable M8034 When M8034 is turned ON the output latch memory is cleared As a result all actual output relay terminals are turned OFF and the PLC is opera...

Page 841: ...ternal RUN STOP input valid by specifying an input between X000 and X017 1 for the RUN input signal 1 X000 to X007 in the FX3U 16M a Display the parameter setting in the programming tool In GX Developer case double click Parameter PC parameter in the project tree to display the dialog box Click PLC system 1 tab and set RUN terminal input b Specify the input X number to switch from STOP mode to RUN...

Page 842: ...cial data register D8039 the scan time in the PLC does not become shorter than the value stored in D8039 The PLC pauses for the remaining time when the operation ends earlier and then returns to step 0 1 Example program 2 Cautions 1 When using an instruction executed in synchronization with a scan a When using an instruction executed in synchronization with a scan such as RAMP FNC 67 HKY FNC 71 SE...

Page 843: ...tching Ch1 Output mode switching Ch1 Temperature unit selection Temperature unit selection M 8271 Input mode switching Ch2 Output mode switching Ch2 Not used Type K J switching M 8272 Input mode switching Ch3 Output mode switching Ch3 Not used Not used M 8273 Input mode switching Ch4 Output mode switching Ch4 Not used Not used M 8274 Not used Output hold mode cancel Ch1 Not used Not used M 8275 No...

Page 844: ...mes for Ch3 1 to 4095 Number of averaging times for Ch3 1 to 4095 D 8277 Number of averaging times for Ch4 1 to 4095 Not used Number of averaging times for Ch4 1 to 4095 Number of averaging times for Ch4 1 to 4095 D 8278 Error status Error status Error status Error status D 8279 Model code K1 Model code K2 Model code K20 Model code K10 3rd analog special adapter D 8280 Input data Ch1 Output data C...

Page 845: ...unlit FX3U FX3UC LED status PLC status Action Lit The voltage is correctly supplied to the power terminal The power supply is normal Flickering The following status occurred The voltage or current is incorrectly supplied to the power terminal The wiring is incorrect There is fault inside the PLC Check the power supply voltage Disconnect cables except the power cable turn the PLC power ON again and...

Page 846: ... scan time Make sure that the frequency of the pulse duty 50 input to a high speed counter is within the specifications range Adding WDT instruction Use two or more WDT instructions in a program so that the watchdog timer is reset several times in one scan time Change the set value of the watchdog timer Change the set value D8000 of the watchdog timer in a program so that it is larger than the max...

Page 847: ...shi Electric Distributor Mode LED status PLC status Action ONLINE Lit Unit disconnection Outside control range station error Securely connect the built in master and a remote I O unit Make sure that actually connected remote I O units are consistent with the detailed information on remote stations Flickering All stations are abnormal Securely connect the built in master and a remote I O unit Make ...

Page 848: ...l the operation and return to menu screen Operation key Contents of operation ESC Return to TOP screen Moves up the cursor Moves up the cursor when pressing for 1 second or more When the cursor is located at the top key operation is invalid Moves down the cursor Moves down the cursor when pressing for 1 second or more When the cursor is located at the bottom key operation is invalid OK Selects a f...

Page 849: ...al Device 37 Error Code A Version Up Information B Execution Times C Applicable Instruction List 37 2 2 Error code check method by GX Developer 1 Connect a personal computer to PLC 2 Execute PLC diagnostics Click Diagnostics PLC diagnostics on the tool menu and execute the PLC diagnostics 3 Check the diagnostics result The error check result displays in the following windows The LED status in FX P...

Page 850: ... the powered extension unit with DC 24V output failure to D8009 3 If the unit or block corresponding to a programmed I O number is not actually loaded M8060 is set to ON and the first device number of the erroneous block is written to D8060 4 When a device number is specified directly or indirectly with an index by the LD AND OR or OUT instruction and if the device numbers specified in those instr...

Page 851: ...ax error Flickering STOP M8066 Circuit error Flickering STOP M8067 Operation error Unlit RUN RUN mode M8068 Operation error latch Unlit RUN M8109 I O refresh error Unlit RUN Always M8316 Unconnected I O designation error Unlit RUN RUN mode M8318 BFM initialization failure Unlit RUN Check M8449 Special function unit block error Unlit RUN Always M8069 I O bus check By monitoring the contents of spec...

Page 852: ...according to applications Remote maintenance Ensure modem power is ON and check the settings of the AT commands Wiring Check the communication cables for correct wiring 3802 Communication character error 3803 Communication data sum check error 3804 Communication data format error 3805 Command error 3806 Communication time out detected 3807 Modem initialization error 3808 N N network parameter erro...

Page 853: ...or 6304 Communication data format error 6305 Command error 6306 Communication time out detected 6307 Modem initialization error 6308 N N network parameter error 6312 Parallel link character error 6313 Parallel link sum error 6314 Parallel link format error 6320 Inverter communication error Parameter error M8064 D8064 0000 No error 6401 Stops operation Program sum check error STOP the PLC and corre...

Page 854: ... Invalid instruction is programmed within STL RET loop MC MCR I interrupt pointer SRET or IRET 6627 No RET instruction 6628 Invalid instruction is used in main program I interrupt pointer SRET or IRET 6629 No P or I interrupt pointer 6630 No SRET or IRET instruction 6631 SRET programmed in invalid location 6632 FEND programmed in invalid location Operation error M8067 D8067 0000 No error 6701 Cont...

Page 855: ...0 PID instruction is stopped This error occurs in the parameter setting value or operation data executing PID instruction Check the contents of the parameters 6732 Incompatible input filter constant α α 0 or 100 α 6733 Incompatible proportional gain KP KP 0 6734 Incompatible integral time TI TI 0 6735 Incompatible derivative gain KD KD 0 or 201 KD 6736 Incompatible derivative time TD TD 0 6740 Sam...

Page 856: ...ethod Abnormal PV threshold hysteresis set value for auto tuning SHPV 0 6755 Limit cycle method Abnormal auto tuning transfer status Data of device controlling transfer status is abnormally overwritten Auto tuning is forcibly finished PID operation is not started Ensure that devices occupied by PID instruction are not overwritten in the program 6756 Limit cycle method Abnormal result due to excess...

Page 857: ...t number is already used in a positioning instruction or pulse output instruction PLSY PWM etc Check to make sure the pulse output destination is not being driven by another positioning instruction 6765 Number of applied instruction exceeds limit The number of times an applied instruction is used in the program exceeds the specified limit 6770 Writing error to flash memory cassette 6771 Flash memo...

Page 858: ... an alternative model is set In this case however programming is enabled only in the function ranges such as instructions device ranges and program sizes available in a PLC selected as the alternative model 3 The model selection is FX3UC in some versions of GX Developer Ver 8 23Z or later FX3U PLC version Model name Media model name is shown below Applicable GX Developer version Remarks Ver 2 00 t...

Page 859: ... write during RUN in the instruction and device ranges in FX2N PLCs Ver 3 00 or later Ver 8 13P or later Supports write during RUN in the instruction and device ranges in FX3UC PLCs Ver 1 00 or later Ver 8 18U or later Supports write during RUN in the instruction and device ranges in FX3UC PLCs Ver 1 30 or later Ver 8 23Z or later Supports write during RUN in the instruction and device ranges in F...

Page 860: ...lse When write during RUN is completed for a circuit including an instruction for falling edge pulse LDF ANDF or ORF instruction the instruction for falling edge pulse is not executed without regard to the ON OFF status of the target device of the instruction for falling edge pulse When write during RUN is completed for a circuit including an instruction for falling edge pulse PLF instruction the ...

Page 861: ... by way of USB in the GOT1000 Series make sure to execute the following setting If the following setting is not provided a communication error occurs Setting in GX Developer Ver 8 22Y or later 1 Select Online Transfer setup to open Transfer setup dialog box 2 Double click Serial in PC side I F to open PC side I F Serial setting dialog box 3 Select USB GOT Transparent mode 4 Click OK button to fini...

Page 862: ...nline Transfer setup to open Transfer Setup dialog box 2 Double click PLC module in PLC side I F to open PLC side I F Detailed setting of PLC module dialog box 3 Put a check mark to the check box via GOT F900 transparent mode as shown below 4 Click OK button to finish the setting GX Developer Ver 8 12N or earlier 1 GX Developer Ver 8 13P or later GX Developer Ver 8 22Y or later When using transpar...

Page 863: ... 2 How to look at manufacturer s serial number The year and month of the production can be checked in the control number indicated in SERIAL on a label adhered on the right side seen from the front face Appendix A 2 3 Version upgrade history FX3U For the method to look at the manufacturer s serial number refer to Appendix A 2 2 Version Manufacturer s serial number Contents of version upgrade Ver 2...

Page 864: ...C102 ZPOP FNC103 WSUM FNC140 WTOB FNC141 BTOW FNC142 UNI FNC143 DIS FNC144 SORT2 FNC149 TBL FNC152 COMRD FNC182 DUTY FNC186 BK FNC192 BK FNC193 BKCMP FNC194 BKCMP FNC195 BKCMP FNC196 BKCMP FNC197 BKCMP FNC198 BKCMP FNC199 STR FNC200 VAL FNC201 INSTR FNC208 FDEL FNC210 FINS FNC211 DABIN FNC260 BINDA FNC261 RBFM FNC278 WBFM FNC279 Adds function of following 5 instructions SPD FNC 56 DSZR FNC150 DVIT...

Page 865: ...Execution time in ON status µs Execution time in OFF status µs Remarks 16 bit instruction 32 bit instruction 16 bit instruction 32 bit instruction Contact instructions LD 0 065 0 129 µs in 2 step instruction 1 0 193 µs in 3 step instruction 3 LDI 0 065 0 129 µs in 2 step instruction 1 0 193 µs in 3 step instruction 3 LDP 7 8 LDF 7 8 AND 0 065 0 129 µs in 2 step instruction 1 0 193 µs in 3 step ins...

Page 866: ...ion 3 SET S 4 7 or 6 6 0 9n 0 13 n Number of recombination 4 7 µs when there is no recombination RST Y M 0 065 0 129 µs in 2 step instruction 2 0 193 µs in 3 step instruction 3 RST S 4 6 0 13 RST T 0 45 0 45 RST C 0 45 5 8 0 45 4 8 RST D 5 4 0 195 PLS Y M 0 257 0 321 µs in M3584 to M7679 PLF Y M 0 257 0 321 µs in M3584 to M7679 Master control instructions MC 4 3 4 7 MCR 3 9 Other instruction NOP 0...

Page 867: ...nstruction 32 bit instruction 16 bit instruction 32 bit instruction Program flow 00 CJ 8 0 0 195 01 CALL 13 5 CALL SRET 0 195 02 SRET 03 IRET 4 4 04 EI 3 8 05 DI 3 7 06 FEND 113 9 2 13X 3 25Y Even if FEND and END are used together execution time of only END is required X Number of input points Y Number of output points 07 WDT 5 4 0 065 08 FOR 11 6 FOR NEXT 09 NEXT Move and compare 10 CMP 15 5 16 0...

Page 868: ... 0 455 43 SUM 12 7 16 9 0 325 0 585 44 BON 14 4 15 1 0 455 0 845 45 MEAN 11 8 0 41n 17 8 2 13n 0 455 0 845 46 ANS 20 4 19 7 47 ANR 7 0 0 065 48 SQR 9 7 12 1 0 325 0 585 49 FLT 9 8 9 5 0 325 0 585 High speed processing 50 REF 4 5 1 39n 0 325 51 REFF 14 4 0 24n 0 195 52 MTR 5 9 5 5 53 HSCS 20 0 0 845 54 HSCR 20 0 0 845 55 HSZ 22 0 1 105 56 SPD 16 0 16 0 12 6 12 6 57 PLSY 20 0 13 6 6 9 6 9 58 PWM 10 ...

Page 869: ...5 1 105 TO 2 16 9 1100n 18 4 2197n 0 585 1 105 TO 3 96 7 119 2n 17 3 297 7n 0 585 1 105 1 When the instruction is executed to BFM 0 to BFM 31 in a special function block unit for the FX0N FX2N FX2NC Series or in the CC Link LT built in the FX3UC 32MT LT 2 When the instruction is executed to BFM 32 or later in a special function block unit for the FX0N FX2N FX2NC Series or in the CC Link LT built i...

Page 870: ...45 124 EXP 11 9 0 585 125 LOGE 24 0 0 585 126 LOG10 24 3 0 585 127 ESQR 10 6 0 585 128 ENEG 8 9 0 325 129 INT 13 2 13 0 0 325 0 585 130 SIN 12 0 0 585 131 COS 23 2 0 585 132 TAN 12 0 0 585 133 ASIN 13 5 0 585 134 ACOS 13 5 0 585 135 ATAN 12 0 0 585 136 RAD 14 9 0 585 137 DEG 14 9 0 585 138 139 Data operation 2 140 WSUM 11 7 0 38n 14 1 1 94n 0 455 0 845 141 WTOB 12 6 1 43n 0 455 142 BTOW 12 6 0 92n...

Page 871: ... 22 6 0 585 162 TADD 13 4 0 455 163 TSUB 13 4 0 455 164 HTOS 10 8 11 0 0 325 0 585 165 STOH 11 4 11 6 0 325 0 585 166 TRD 10 0 0 195 167 TWR 344 4 0 195 168 169 HOUR 15 5 16 1 15 2 15 9 External device 170 GRY 10 2 10 7 0 325 0 585 171 GBIN 15 4 16 0 0 325 0 585 176 RD3A 3A 693 1 0 455 FX0N 3A RD3A 2AD 906 0 0 455 FX2N 2AD 177 WR3A 3A 713 9 0 455 FX0N 3A WR3A 2DA 1415 9 0 455 FX2N 2DA Extension fu...

Page 872: ...1 0 74n 0 44m 0 455 n Number of character strings m Number of character data 206 MIDR 25 0 59n 0 68m 0 455 n Character position m Number of characters 207 MIDW 25 8 0 3m 0 44n 0 455 n Character position m Number of stored characters 208 INSTR 6 64 2 36m 0 585 m Number of searched characters 1 209 MOV 16 1 52n 0 325 1 Number of characters from the head of the searched character string to detected c...

Page 873: ... 1 22 1 48 For details refer to Appendix B 6 2 231 232 AND 1 22 1 48 1 22 1 48 For details refer to Appendix B 6 2 233 ADN 1 22 1 48 1 22 1 48 For details refer to Appendix B 6 2 234 AND 1 22 1 48 1 22 1 48 For details refer to Appendix B 6 2 235 236 AND 1 22 1 48 1 22 1 48 For details refer to Appendix B 6 2 237 AND 1 22 1 48 1 22 1 48 For details refer to Appendix B 6 2 238 AND 1 22 1 48 1 22 1 ...

Page 874: ... IVRD 16 2 6 5 273 IVWR 16 2 6 5 274 IVBWR 20 0 6 5 Data move 3 275 276 277 278 RBFM 1 1086n 0 715 n Number of points transferred in one operation cycle RBFM 2 244 103n 0 715 279 WBFM 1 1099n 0 715 n Number of points transferred in one operation cycle WBFM 2 292 116n 0 715 1 When the instruction is executed to a BFM in a special function block unit for the FX0N FX2N FX2NC Series or in the CC Link ...

Page 875: ...on Extension file register control 290 LOADR 13 2 0 44n 0 325 291 SAVER 4300 215 2048 n 6 4 292 INITR 17600n 0 325 293 LOGR 244 17 9n 0 715 294 RWER 46700n 0 325 n Number of write target sectors 295 INITER 24 950n 0 325 296 to 299 Applied instruction Execution time Remarks MOV instruction FNC 12 Execution time at rising edge of input Execution time in ON status 1 22 µs in MOVP instruction Non exec...

Page 876: ...ations are handled as exceptions because high speed processing is adopted in the technique Specified device type Condition Instruction execution time Bit device Without indexing 0 065 With indexing 11 9 Word device Bit specification 8 8 Command contact S source D destination Without indexing µs With indexing µs KnY KnM KnS T C D R U G KnY KnM KnS T C D R U G ON KnX KnY KnM K nS 15 5 12 1 13 8 250 ...

Page 877: ...omparison instruction 32 bit operation 1 These combinations are handled as exceptions because high speed processing is adopted in the technique S source D destination Without indexing µs With indexing µs KnY KnM KnS T C D R U G KnY KnM KnS T C D R U G KnX KnY KnM K nS 16 2 13 0 14 7 228 2 19 4 17 4 17 6 230 9 T C D 13 0 1 22 1 11 3 224 8 17 4 15 4 15 7 229 0 R 14 7 11 3 12 9 226 5 17 6 15 7 16 0 2...

Page 878: ...CML FNC 14 Complement 228 BMOV FNC 15 Block Move 230 FMOV FNC 16 Fill Move 234 PRUN FNC 81 Parallel Run Octal Mode 436 XCH FNC 17 Exchange 237 SWAP FNC147 Byte Swap 520 EMOV FNC112 Floating Point Move 464 HCMOV FNC189 High Speed Counter Move 580 2 Data conversion instructions Mnemonic FNC No Function Ref Page BCD FNC 18 Conversion to Binary Coded Decimal 239 BIN FNC 19 Conversion to Binary 242 GRY...

Page 879: ...V FNC123 Floating Point Division 483 BK FNC192 Block Data Addition 586 BK FNC193 Block Data Subtraction 589 INC FNC 24 Increment 257 3 Comparison instructions Mnemonic FNC No Function Ref Page S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 DEC FNC 25 Decrement 259 5 Logical operation instructions Mnemonic FNC No Function Ref Page WAND FNC 26 Logical Word AND 260 WOR FNC 27...

Page 880: ... to Decimal ASCII Conversion 674 ASCI FNC 82 Hexadecimal to ASCII Conversion 438 HEX FNC 83 ASCII to Hexadecimal Conversion 441 MOV FNC209 Character String Transfer 628 FNC202 Link Character Strings 608 LEN FNC203 Character String Length Detection 611 RIGH FNC204 Extracting Character String Data From the Right 613 LEFT FNC205 Extracting Character String Data from the Left 616 MIDR FNC206 Random Se...

Page 881: ...cated Analog Block 564 RBFM FNC278 Divided BFM Read 695 WBFM FNC279 Divided BFM Write 700 17 Extension register extension file register control instructions Mnemonic FNC No Function Ref Page LOADR FNC290 Load From ER 709 SAVER FNC291 Save to ER 711 RWER FNC294 Rewrite to ER 727 INITR FNC292 Initialize R and ER 719 INITER FNC295 Initialize ER 731 LOGR FNC293 Logging R and ER 722 18 Other handy inst...

Page 882: ...on to Binary 242 BINDA FNC261 BIN to Decimal ASCII Conversion 674 BK FNC193 Block Data Subtraction 589 BK FNC192 Block Data Addition 586 BKCMP FNC196 Block Data Compare 592 BKCMP FNC198 Block Data Compare 592 BKCMP FNC197 Block Data Compare 592 BKCMP FNC194 Block Data Compare 592 BKCMP FNC195 Block Data Compare 592 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 BKCMP FNC199 Bloc...

Page 883: ...cimal to Gray Code Conversion 561 H HCMOV FNC189 High Speed Counter Move 580 HEX FNC 83 ASCII to Hexadecimal Conversion 441 HKY FNC 71 Hexadecimal Input 402 HOUR FNC169 Hour Meter 558 HSCR FNC 54 High Speed Counter Reset 332 HSCS FNC 53 High Speed Counter Set 327 HSCT FNC280 High Speed Counter Compare With Data Table 703 HSZ FNC 55 High Speed Counter Zone Compare 335 HTOS FNC164 Hour to Second Con...

Page 884: ... 727 Mnemonic FNC No Function Ref Page S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S1 S2 S SAVER FNC291 Save to ER 711 SCL FNC259 Scaling Coordinate by Point Data 666 SCL2 FNC269 Scaling 2 Coordinate by X Y Data 677 SEGD FNC 73 Seven Segment Decoder 409 SEGL FNC 74 Seven Segment With Latch 411 SER FNC 61 Search a Data Stack 375 SFL FNC214 Bit Shift Left with Carry 641 SFR FNC213 Bit Shift Right with Carry 639 S...

Page 885: ...mes C Applicable Instruction List W WAND FNC 26 Logical Word AND 260 WBFM FNC279 Divided BFM Write 700 WDT FNC 07 Watchdog Timer Refresh 210 WOR FNC 27 Logical Word OR 262 WR3A FNC177 Write to Dedicated Analog Block 564 WSFL FNC 37 Word Shift Left 285 WSFR FNC 36 Word Shift Right 283 WSUM FNC140 Sum of Word Data 509 WTOB FNC141 WORD to BYTE 511 WXOR FNC 28 Logical Exclusive OR 264 X XCH FNC 17 Exc...

Page 886: ... FX3UC Series Programmable Controllers Programming Manual Basic Applied Instruction Edition C Applied Instruction List by Instruction Type in Alphabetic Order C 2 Applied instructions in alphabetical order MEMO ...

Page 887: ... Any other failure found not to be the responsibility of Mitsubishi or that admitted not to be so by the user 2 Onerous repair term after discontinuation of production 1 Mitsubishi shall accept onerous product repairs for seven 7 years after production of the product is discontinued Discontinuation of production shall be notified with Mitsubishi Technical Bulletins etc 2 Product supply including r...

Page 888: ...886 Revised History FX3U FX3UC Series Programmable Controllers Programming Manual Basic Applied Instruction Edition Revised History Date Revision Discription 7 2005 A First Edition ...

Page 889: ......

Page 890: ...0 HIMEJI WORKS 840 CHIYODA CHO HIMEJI JAPAN JY997D16601A MEE Effective Jul 2005 Specifications are subject to change without notice PROGRAMMING MANUAL Basic Applied Instructions Edition FX3U FX3UC SERIES PROGRAMMABLE CONTROLLERS MODEL FX P3 E MODEL CODE 09R517 ...

Reviews: